@skyramp/mcp 0.2.7 → 0.2.150-rc.mntnc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +5 -2
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.js +24 -5
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.d.ts +2 -0
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +114 -0
- package/build/prompts/sut-setup/modes/dockerComposePrompt.d.ts +2 -0
- package/build/prompts/sut-setup/modes/dockerComposePrompt.js +292 -0
- package/build/prompts/sut-setup/shared.d.ts +39 -0
- package/build/prompts/sut-setup/shared.js +132 -0
- package/build/prompts/test-maintenance/driftAnalysisSections.js +9 -3
- package/build/prompts/test-recommendation/analysisOutputPrompt.js +1 -1
- package/build/prompts/testbot/testbot-prompts.d.ts +1 -1
- package/build/prompts/testbot/testbot-prompts.js +23 -16
- package/build/prompts/testbot/testbot-prompts.test.js +0 -44
- package/build/resources/sutSetupResource.d.ts +2 -0
- package/build/resources/sutSetupResource.js +45 -0
- package/build/resources/testbotResource.js +1 -1
- package/build/services/TestDiscoveryService.d.ts +2 -2
- package/build/services/TestDiscoveryService.js +22 -12
- package/build/services/TestExecutionService.d.ts +9 -0
- package/build/services/TestExecutionService.js +158 -26
- package/build/services/TestExecutionService.test.js +306 -0
- package/build/tools/executeSkyrampTestTool.js +17 -4
- package/build/tools/generate-tests/generateBatchScenarioRestTool.js +1 -1
- package/build/tools/submitReportTool.js +81 -35
- package/build/tools/submitReportTool.test.js +264 -50
- package/build/tools/test-management/actionsTool.js +10 -0
- package/build/tools/test-management/analyzeChangesTool.d.ts +0 -1
- package/build/tools/test-management/analyzeChangesTool.js +84 -41
- package/build/tools/test-management/analyzeChangesTool.test.js +4 -34
- package/build/tools/test-management/analyzeTestHealthTool.js +6 -3
- package/build/types/TestAnalysis.d.ts +2 -1
- package/build/types/TestExecution.d.ts +12 -2
- package/build/types/TestExecution.js +11 -1
- package/build/types/TestbotReport.d.ts +68 -0
- package/build/types/TestbotReport.js +1 -0
- package/build/types/index.d.ts +4 -0
- package/build/types/index.js +3 -0
- package/build/utils/AnalysisStateManager.js +10 -1
- package/build/utils/routeParsers.d.ts +0 -10
- package/build/utils/routeParsers.js +31 -38
- package/build/utils/scenarioDrafting.d.ts +1 -1
- package/build/utils/scenarioDrafting.js +23 -1
- package/build/utils/utils.d.ts +7 -1
- package/build/utils/utils.js +10 -0
- package/node_modules/playwright/LICENSE +202 -0
- package/node_modules/playwright/NOTICE +5 -0
- package/node_modules/playwright/README.md +168 -0
- package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +13 -9
- package/node_modules/playwright/lib/mcp/test/skyRampExport.js +4 -3
- package/node_modules/playwright/node_modules/playwright-core/LICENSE +202 -0
- package/node_modules/playwright/node_modules/playwright-core/NOTICE +5 -0
- package/node_modules/playwright/node_modules/playwright-core/ThirdPartyNotices.txt +23 -126
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/{codeMirrorModule-B0JOjboO.js → codeMirrorModule-B5kqh2EV.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/assets/{defaultSettingsView-1anWeyDf.js → defaultSettingsView-CZ9npQ3N.js} +79 -79
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.Cc5029a3.js → index.BCnxj-_b.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +2 -2
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{uiMode.Wo5yvvVh.js → uiMode.1Ym0Ivn8.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +2 -2
- package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
- package/node_modules/playwright/package.json +1 -1
- package/package.json +9 -2
- package/node_modules/playwright/node_modules/playwright-core/.DS_Store +0 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/.bin/node-which +0 -52
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/.bin/is-docker +0 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/.bin/mime +0 -46
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/.bin/yaml +0 -11
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.CP3Y8Zsb.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-B5kqh2EV.js","../codeMirrorModule.DYBRYzYX.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
var Yw=Object.defineProperty;var Kw=(i,e,t)=>e in i?Yw(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var Pa=(i,e,t)=>Kw(i,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function t(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(a){if(a.ep)return;a.ep=!0;const o=t(a);fetch(a.href,o)}})();function Jw(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var bh={exports:{}},Ua={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
@@ -7,7 +7,7 @@ var Yw=Object.defineProperty;var Kw=(i,e,t)=>e in i?Yw(i,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 h_;function Ww(){if(h_)return Ua;h_=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(s,a,o){var c=null;if(o!==void 0&&(c=""+o),a.key!==void 0&&(c=""+a.key),"key"in a){o={};for(var d in a)d!=="key"&&(o[d]=a[d])}else o=a;return a=o.ref,{$$typeof:i,type:s,key:c,ref:a!==void 0?a:null,props:o}}return Ua.Fragment=e,Ua.jsx=t,Ua.jsxs=t,Ua}var f_;function Zw(){return f_||(f_=1,bh.exports=Ww()),bh.exports}var
|
|
10
|
+
*/var h_;function Ww(){if(h_)return Ua;h_=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(s,a,o){var c=null;if(o!==void 0&&(c=""+o),a.key!==void 0&&(c=""+a.key),"key"in a){o={};for(var d in a)d!=="key"&&(o[d]=a[d])}else o=a;return a=o.ref,{$$typeof:i,type:s,key:c,ref:a!==void 0?a:null,props:o}}return Ua.Fragment=e,Ua.jsx=t,Ua.jsxs=t,Ua}var f_;function Zw(){return f_||(f_=1,bh.exports=Ww()),bh.exports}var x=Zw(),vh={exports:{}},fe={};/**
|
|
11
11
|
* @license React
|
|
12
12
|
* react.production.js
|
|
13
13
|
*
|
|
@@ -15,7 +15,7 @@ var Yw=Object.defineProperty;var Kw=(i,e,t)=>e in i?Yw(i,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 g_;function Qw(){if(g_)return fe;g_=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),_=Symbol.iterator;function b(N){return N===null||typeof N!="object"?null:(N=_&&N[_]||N["@@iterator"],typeof N=="function"?N:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,T={};function A(N,G,ee){this.props=N,this.context=G,this.refs=T,this.updater=ee||x}A.prototype.isReactComponent={},A.prototype.setState=function(N,G){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,G,"setState")},A.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function C(){}C.prototype=A.prototype;function L(N,G,ee){this.props=N,this.context=G,this.refs=T,this.updater=ee||x}var j=L.prototype=new C;j.constructor=L,v(j,A.prototype),j.isPureReactComponent=!0;var D=Array.isArray;function F(){}var B={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function O(N,G,ee){var ne=ee.ref;return{$$typeof:i,type:N,key:G,ref:ne!==void 0?ne:null,props:ee}}function Q(N,G){return O(N.type,G,N.props)}function se(N){return typeof N=="object"&&N!==null&&N.$$typeof===i}function Y(N){var G={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(ee){return G[ee]})}var J=/\/+/g;function te(N,G){return typeof N=="object"&&N!==null&&N.key!=null?Y(""+N.key):G.toString(36)}function Ne(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(F,F):(N.status="pending",N.then(function(G){N.status==="pending"&&(N.status="fulfilled",N.value=G)},function(G){N.status==="pending"&&(N.status="rejected",N.reason=G)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function I(N,G,ee,ne,de){var oe=typeof N;(oe==="undefined"||oe==="boolean")&&(N=null);var Ee=!1;if(N===null)Ee=!0;else switch(oe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(N.$$typeof){case i:case e:Ee=!0;break;case y:return Ee=N._init,I(Ee(N._payload),G,ee,ne,de)}}if(Ee)return de=de(N),Ee=ne===""?"."+te(N,0):ne,D(de)?(ee="",Ee!=null&&(ee=Ee.replace(J,"$&/")+"/"),I(de,G,ee,"",function(Yi){return Yi})):de!=null&&(se(de)&&(de=Q(de,ee+(de.key==null||N&&N.key===de.key?"":(""+de.key).replace(J,"$&/")+"/")+Ee)),G.push(de)),1;Ee=0;var st=ne===""?".":ne+":";if(D(N))for(var ze=0;ze<N.length;ze++)ne=N[ze],oe=st+te(ne,ze),Ee+=I(ne,G,ee,oe,de);else if(ze=b(N),typeof ze=="function")for(N=ze.call(N),ze=0;!(ne=N.next()).done;)ne=ne.value,oe=st+te(ne,ze++),Ee+=I(ne,G,ee,oe,de);else if(oe==="object"){if(typeof N.then=="function")return I(Ne(N),G,ee,ne,de);throw G=String(N),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function Z(N,G,ee){if(N==null)return N;var ne=[],de=0;return I(N,ne,"","",function(oe){return G.call(ee,oe,de++)}),ne}function ae(N){if(N._status===-1){var G=N._result;G=G(),G.then(function(ee){(N._status===0||N._status===-1)&&(N._status=1,N._result=ee)},function(ee){(N._status===0||N._status===-1)&&(N._status=2,N._result=ee)}),N._status===-1&&(N._status=0,N._result=G)}if(N._status===1)return N._result.default;throw N._result}var we=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},xe={map:Z,forEach:function(N,G,ee){Z(N,function(){G.apply(this,arguments)},ee)},count:function(N){var G=0;return Z(N,function(){G++}),G},toArray:function(N){return Z(N,function(G){return G})||[]},only:function(N){if(!se(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return fe.Activity=m,fe.Children=xe,fe.Component=A,fe.Fragment=t,fe.Profiler=a,fe.PureComponent=L,fe.StrictMode=s,fe.Suspense=h,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,fe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return B.H.useMemoCache(N)}},fe.cache=function(N){return function(){return N.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(N,G,ee){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ne=v({},N.props),de=N.key;if(G!=null)for(oe in G.key!==void 0&&(de=""+G.key),G)!q.call(G,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&G.ref===void 0||(ne[oe]=G[oe]);var oe=arguments.length-2;if(oe===1)ne.children=ee;else if(1<oe){for(var Ee=Array(oe),st=0;st<oe;st++)Ee[st]=arguments[st+2];ne.children=Ee}return O(N.type,de,ne)},fe.createContext=function(N){return N={$$typeof:c,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:o,_context:N},N},fe.createElement=function(N,G,ee){var ne,de={},oe=null;if(G!=null)for(ne in G.key!==void 0&&(oe=""+G.key),G)q.call(G,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(de[ne]=G[ne]);var Ee=arguments.length-2;if(Ee===1)de.children=ee;else if(1<Ee){for(var st=Array(Ee),ze=0;ze<Ee;ze++)st[ze]=arguments[ze+2];de.children=st}if(N&&N.defaultProps)for(ne in Ee=N.defaultProps,Ee)de[ne]===void 0&&(de[ne]=Ee[ne]);return O(N,oe,de)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(N){return{$$typeof:d,render:N}},fe.isValidElement=se,fe.lazy=function(N){return{$$typeof:y,_payload:{_status:-1,_result:N},_init:ae}},fe.memo=function(N,G){return{$$typeof:f,type:N,compare:G===void 0?null:G}},fe.startTransition=function(N){var G=B.T,ee={};B.T=ee;try{var ne=N(),de=B.S;de!==null&&de(ee,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(F,we)}catch(oe){we(oe)}finally{G!==null&&ee.types!==null&&(G.types=ee.types),B.T=G}},fe.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},fe.use=function(N){return B.H.use(N)},fe.useActionState=function(N,G,ee){return B.H.useActionState(N,G,ee)},fe.useCallback=function(N,G){return B.H.useCallback(N,G)},fe.useContext=function(N){return B.H.useContext(N)},fe.useDebugValue=function(){},fe.useDeferredValue=function(N,G){return B.H.useDeferredValue(N,G)},fe.useEffect=function(N,G){return B.H.useEffect(N,G)},fe.useEffectEvent=function(N){return B.H.useEffectEvent(N)},fe.useId=function(){return B.H.useId()},fe.useImperativeHandle=function(N,G,ee){return B.H.useImperativeHandle(N,G,ee)},fe.useInsertionEffect=function(N,G){return B.H.useInsertionEffect(N,G)},fe.useLayoutEffect=function(N,G){return B.H.useLayoutEffect(N,G)},fe.useMemo=function(N,G){return B.H.useMemo(N,G)},fe.useOptimistic=function(N,G){return B.H.useOptimistic(N,G)},fe.useReducer=function(N,G,ee){return B.H.useReducer(N,G,ee)},fe.useRef=function(N){return B.H.useRef(N)},fe.useState=function(N){return B.H.useState(N)},fe.useSyncExternalStore=function(N,G,ee){return B.H.useSyncExternalStore(N,G,ee)},fe.useTransition=function(){return B.H.useTransition()},fe.version="19.2.1",fe}var p_;function vf(){return p_||(p_=1,vh.exports=Qw()),vh.exports}var P=vf();const bt=Jw(P);function mc(i,e,t,s){const[a,o]=bt.useState(t);return bt.useEffect(()=>{let c=!1;return i().then(d=>{c||o(d)}),()=>{c=!0}},e),a}function Es(){const i=bt.useRef(null),[e]=Yh(i);return[e,i]}function Yh(i){const[e,t]=bt.useState(new DOMRect(0,0,10,10)),s=bt.useCallback(()=>{const a=i==null?void 0:i.current;a&&t(a.getBoundingClientRect())},[i]);return bt.useLayoutEffect(()=>{const a=i==null?void 0:i.current;if(!a)return;s();const o=new ResizeObserver(s);return o.observe(a),window.addEventListener("resize",s),()=>{o.disconnect(),window.removeEventListener("resize",s)}},[s,i]),[e,s]}function kt(i){if(i<0||!isFinite(i))return"-";if(i===0)return"0";if(i<1e3)return i.toFixed(0)+"ms";const e=i/1e3;if(e<60)return e.toFixed(1)+"s";const t=e/60;if(t<60)return t.toFixed(1)+"m";const s=t/60;return s<24?s.toFixed(1)+"h":(s/24).toFixed(1)+"d"}function ex(i){if(i<0||!isFinite(i))return"-";if(i===0)return"0";if(i<1e3)return i.toFixed(0);const e=i/1024;if(e<1e3)return e.toFixed(1)+"K";const t=e/1024;return t<1e3?t.toFixed(1)+"M":(t/1024).toFixed(1)+"G"}function Mb(i,e,t,s,a){let o=0,c=i.length;for(;o<c;){const d=o+c>>1;t(e,i[d])>=0?o=d+1:c=d}return c}function m_(i){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=i,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function hn(i,e){i&&(e=_s.getObject(i,e));const[t,s]=bt.useState(e),a=bt.useCallback(o=>{i?_s.setObject(i,o):s(o)},[i,s]);return bt.useEffect(()=>{if(i){const o=()=>s(_s.getObject(i,e));return _s.onChangeEmitter.addEventListener(i,o),()=>_s.onChangeEmitter.removeEventListener(i,o)}},[e,i]),[t,a]}const Kh=new Map,Db=new Map;let yc;function $i(i,e){const[t,s]=bt.useState();Db.set(i,{setter:s,defaultValue:e});const a=bt.useCallback(o=>{const c=Kh.get(yc||"default")||{};c[i]=o,Kh.set(yc||"default",c),s(o)},[i]);return[t,a]}function tx(i){if(yc===i)return;yc=i;const e=Kh.get(i)||{};for(const[t,s]of Db.entries())s.setter(e[t]||s.defaultValue)}class nx{constructor(){this.onChangeEmitter=new EventTarget}getString(e,t){return localStorage[e]||t}setString(e,t){var s;localStorage[e]=t,this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}getObject(e,t){if(!localStorage[e])return t;try{return JSON.parse(localStorage[e])}catch{return t}}setObject(e,t){var s;localStorage[e]=JSON.stringify(t),this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}}const _s=new nx;function We(...i){return i.filter(Boolean).join(" ")}function Lb(i){i&&(i!=null&&i.scrollIntoViewIfNeeded?i.scrollIntoViewIfNeeded(!1):i==null||i.scrollIntoView())}const y_="\\u0000-\\u0020\\u007f-\\u009f",Ob=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+y_+'"]{2,}[^\\s'+y_+`"')}\\],:;.!?]`,"ug");function ix(){const[i,e]=bt.useState(!1),t=bt.useCallback(()=>{const s=[];return e(a=>(s.push(setTimeout(()=>e(!1),1e3)),a?(s.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>s.forEach(clearTimeout)},[e]);return[i,t]}const sx="system",Rb="theme",rx=[{label:"Dark mode",value:"dark-mode"},{label:"Light mode",value:"light-mode"},{label:"System",value:"system"}],jb=window.matchMedia("(prefers-color-scheme: dark)");function tN(){document.playwrightThemeInitialized||(document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",i=>{i.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",i=>{document.body.classList.add("inactive")},!1),Jh(Wh()),jb.addEventListener("change",()=>{Jh(Wh())}))}const Sf=new Set;function Jh(i){const e=ax(),t=i==="system"?jb.matches?"dark-mode":"light-mode":i;if(e!==t){e&&document.documentElement.classList.remove(e),document.documentElement.classList.add(t);for(const s of Sf)s(t)}}function nN(i){Sf.add(i)}function iN(i){Sf.delete(i)}function Wh(){return _s.getString(Rb,sx)}function ax(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":document.documentElement.classList.contains("light-mode")?"light-mode":null}function ox(){const[i,e]=bt.useState(Wh());return bt.useEffect(()=>{_s.setString(Rb,i),Jh(i)},[i]),[i,e]}var Sh={exports:{}},qa={},wh={exports:{}},xh={};/**
|
|
18
|
+
*/var g_;function Qw(){if(g_)return fe;g_=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),_=Symbol.iterator;function b(N){return N===null||typeof N!="object"?null:(N=_&&N[_]||N["@@iterator"],typeof N=="function"?N:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,T={};function A(N,G,ee){this.props=N,this.context=G,this.refs=T,this.updater=ee||w}A.prototype.isReactComponent={},A.prototype.setState=function(N,G){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,G,"setState")},A.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function C(){}C.prototype=A.prototype;function L(N,G,ee){this.props=N,this.context=G,this.refs=T,this.updater=ee||w}var j=L.prototype=new C;j.constructor=L,v(j,A.prototype),j.isPureReactComponent=!0;var D=Array.isArray;function F(){}var B={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function O(N,G,ee){var ne=ee.ref;return{$$typeof:i,type:N,key:G,ref:ne!==void 0?ne:null,props:ee}}function Q(N,G){return O(N.type,G,N.props)}function se(N){return typeof N=="object"&&N!==null&&N.$$typeof===i}function Y(N){var G={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(ee){return G[ee]})}var J=/\/+/g;function te(N,G){return typeof N=="object"&&N!==null&&N.key!=null?Y(""+N.key):G.toString(36)}function Ne(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(F,F):(N.status="pending",N.then(function(G){N.status==="pending"&&(N.status="fulfilled",N.value=G)},function(G){N.status==="pending"&&(N.status="rejected",N.reason=G)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function I(N,G,ee,ne,de){var oe=typeof N;(oe==="undefined"||oe==="boolean")&&(N=null);var Ee=!1;if(N===null)Ee=!0;else switch(oe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(N.$$typeof){case i:case e:Ee=!0;break;case y:return Ee=N._init,I(Ee(N._payload),G,ee,ne,de)}}if(Ee)return de=de(N),Ee=ne===""?"."+te(N,0):ne,D(de)?(ee="",Ee!=null&&(ee=Ee.replace(J,"$&/")+"/"),I(de,G,ee,"",function(Yi){return Yi})):de!=null&&(se(de)&&(de=Q(de,ee+(de.key==null||N&&N.key===de.key?"":(""+de.key).replace(J,"$&/")+"/")+Ee)),G.push(de)),1;Ee=0;var st=ne===""?".":ne+":";if(D(N))for(var ze=0;ze<N.length;ze++)ne=N[ze],oe=st+te(ne,ze),Ee+=I(ne,G,ee,oe,de);else if(ze=b(N),typeof ze=="function")for(N=ze.call(N),ze=0;!(ne=N.next()).done;)ne=ne.value,oe=st+te(ne,ze++),Ee+=I(ne,G,ee,oe,de);else if(oe==="object"){if(typeof N.then=="function")return I(Ne(N),G,ee,ne,de);throw G=String(N),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function Z(N,G,ee){if(N==null)return N;var ne=[],de=0;return I(N,ne,"","",function(oe){return G.call(ee,oe,de++)}),ne}function ae(N){if(N._status===-1){var G=N._result;G=G(),G.then(function(ee){(N._status===0||N._status===-1)&&(N._status=1,N._result=ee)},function(ee){(N._status===0||N._status===-1)&&(N._status=2,N._result=ee)}),N._status===-1&&(N._status=0,N._result=G)}if(N._status===1)return N._result.default;throw N._result}var we=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},xe={map:Z,forEach:function(N,G,ee){Z(N,function(){G.apply(this,arguments)},ee)},count:function(N){var G=0;return Z(N,function(){G++}),G},toArray:function(N){return Z(N,function(G){return G})||[]},only:function(N){if(!se(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return fe.Activity=m,fe.Children=xe,fe.Component=A,fe.Fragment=t,fe.Profiler=a,fe.PureComponent=L,fe.StrictMode=s,fe.Suspense=h,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,fe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return B.H.useMemoCache(N)}},fe.cache=function(N){return function(){return N.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(N,G,ee){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ne=v({},N.props),de=N.key;if(G!=null)for(oe in G.key!==void 0&&(de=""+G.key),G)!q.call(G,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&G.ref===void 0||(ne[oe]=G[oe]);var oe=arguments.length-2;if(oe===1)ne.children=ee;else if(1<oe){for(var Ee=Array(oe),st=0;st<oe;st++)Ee[st]=arguments[st+2];ne.children=Ee}return O(N.type,de,ne)},fe.createContext=function(N){return N={$$typeof:c,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:o,_context:N},N},fe.createElement=function(N,G,ee){var ne,de={},oe=null;if(G!=null)for(ne in G.key!==void 0&&(oe=""+G.key),G)q.call(G,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(de[ne]=G[ne]);var Ee=arguments.length-2;if(Ee===1)de.children=ee;else if(1<Ee){for(var st=Array(Ee),ze=0;ze<Ee;ze++)st[ze]=arguments[ze+2];de.children=st}if(N&&N.defaultProps)for(ne in Ee=N.defaultProps,Ee)de[ne]===void 0&&(de[ne]=Ee[ne]);return O(N,oe,de)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(N){return{$$typeof:d,render:N}},fe.isValidElement=se,fe.lazy=function(N){return{$$typeof:y,_payload:{_status:-1,_result:N},_init:ae}},fe.memo=function(N,G){return{$$typeof:f,type:N,compare:G===void 0?null:G}},fe.startTransition=function(N){var G=B.T,ee={};B.T=ee;try{var ne=N(),de=B.S;de!==null&&de(ee,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(F,we)}catch(oe){we(oe)}finally{G!==null&&ee.types!==null&&(G.types=ee.types),B.T=G}},fe.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},fe.use=function(N){return B.H.use(N)},fe.useActionState=function(N,G,ee){return B.H.useActionState(N,G,ee)},fe.useCallback=function(N,G){return B.H.useCallback(N,G)},fe.useContext=function(N){return B.H.useContext(N)},fe.useDebugValue=function(){},fe.useDeferredValue=function(N,G){return B.H.useDeferredValue(N,G)},fe.useEffect=function(N,G){return B.H.useEffect(N,G)},fe.useEffectEvent=function(N){return B.H.useEffectEvent(N)},fe.useId=function(){return B.H.useId()},fe.useImperativeHandle=function(N,G,ee){return B.H.useImperativeHandle(N,G,ee)},fe.useInsertionEffect=function(N,G){return B.H.useInsertionEffect(N,G)},fe.useLayoutEffect=function(N,G){return B.H.useLayoutEffect(N,G)},fe.useMemo=function(N,G){return B.H.useMemo(N,G)},fe.useOptimistic=function(N,G){return B.H.useOptimistic(N,G)},fe.useReducer=function(N,G,ee){return B.H.useReducer(N,G,ee)},fe.useRef=function(N){return B.H.useRef(N)},fe.useState=function(N){return B.H.useState(N)},fe.useSyncExternalStore=function(N,G,ee){return B.H.useSyncExternalStore(N,G,ee)},fe.useTransition=function(){return B.H.useTransition()},fe.version="19.2.1",fe}var p_;function vf(){return p_||(p_=1,vh.exports=Qw()),vh.exports}var P=vf();const bt=Jw(P);function mc(i,e,t,s){const[a,o]=bt.useState(t);return bt.useEffect(()=>{let c=!1;return i().then(d=>{c||o(d)}),()=>{c=!0}},e),a}function Es(){const i=bt.useRef(null),[e]=Yh(i);return[e,i]}function Yh(i){const[e,t]=bt.useState(new DOMRect(0,0,10,10)),s=bt.useCallback(()=>{const a=i==null?void 0:i.current;a&&t(a.getBoundingClientRect())},[i]);return bt.useLayoutEffect(()=>{const a=i==null?void 0:i.current;if(!a)return;s();const o=new ResizeObserver(s);return o.observe(a),window.addEventListener("resize",s),()=>{o.disconnect(),window.removeEventListener("resize",s)}},[s,i]),[e,s]}function kt(i){if(i<0||!isFinite(i))return"-";if(i===0)return"0";if(i<1e3)return i.toFixed(0)+"ms";const e=i/1e3;if(e<60)return e.toFixed(1)+"s";const t=e/60;if(t<60)return t.toFixed(1)+"m";const s=t/60;return s<24?s.toFixed(1)+"h":(s/24).toFixed(1)+"d"}function ex(i){if(i<0||!isFinite(i))return"-";if(i===0)return"0";if(i<1e3)return i.toFixed(0);const e=i/1024;if(e<1e3)return e.toFixed(1)+"K";const t=e/1024;return t<1e3?t.toFixed(1)+"M":(t/1024).toFixed(1)+"G"}function Mb(i,e,t,s,a){let o=0,c=i.length;for(;o<c;){const d=o+c>>1;t(e,i[d])>=0?o=d+1:c=d}return c}function m_(i){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=i,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function hn(i,e){i&&(e=_s.getObject(i,e));const[t,s]=bt.useState(e),a=bt.useCallback(o=>{i?_s.setObject(i,o):s(o)},[i,s]);return bt.useEffect(()=>{if(i){const o=()=>s(_s.getObject(i,e));return _s.onChangeEmitter.addEventListener(i,o),()=>_s.onChangeEmitter.removeEventListener(i,o)}},[e,i]),[t,a]}const Kh=new Map,Db=new Map;let yc;function $i(i,e){const[t,s]=bt.useState();Db.set(i,{setter:s,defaultValue:e});const a=bt.useCallback(o=>{const c=Kh.get(yc||"default")||{};c[i]=o,Kh.set(yc||"default",c),s(o)},[i]);return[t,a]}function tx(i){if(yc===i)return;yc=i;const e=Kh.get(i)||{};for(const[t,s]of Db.entries())s.setter(e[t]||s.defaultValue)}class nx{constructor(){this.onChangeEmitter=new EventTarget}getString(e,t){return localStorage[e]||t}setString(e,t){var s;localStorage[e]=t,this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}getObject(e,t){if(!localStorage[e])return t;try{return JSON.parse(localStorage[e])}catch{return t}}setObject(e,t){var s;localStorage[e]=JSON.stringify(t),this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}}const _s=new nx;function We(...i){return i.filter(Boolean).join(" ")}function Lb(i){i&&(i!=null&&i.scrollIntoViewIfNeeded?i.scrollIntoViewIfNeeded(!1):i==null||i.scrollIntoView())}const y_="\\u0000-\\u0020\\u007f-\\u009f",Ob=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+y_+'"]{2,}[^\\s'+y_+`"')}\\],:;.!?]`,"ug");function ix(){const[i,e]=bt.useState(!1),t=bt.useCallback(()=>{const s=[];return e(a=>(s.push(setTimeout(()=>e(!1),1e3)),a?(s.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>s.forEach(clearTimeout)},[e]);return[i,t]}const sx="system",Rb="theme",rx=[{label:"Dark mode",value:"dark-mode"},{label:"Light mode",value:"light-mode"},{label:"System",value:"system"}],jb=window.matchMedia("(prefers-color-scheme: dark)");function oN(){document.playwrightThemeInitialized||(document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",i=>{i.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",i=>{document.body.classList.add("inactive")},!1),Jh(Wh()),jb.addEventListener("change",()=>{Jh(Wh())}))}const Sf=new Set;function Jh(i){const e=ax(),t=i==="system"?jb.matches?"dark-mode":"light-mode":i;if(e!==t){e&&document.documentElement.classList.remove(e),document.documentElement.classList.add(t);for(const s of Sf)s(t)}}function lN(i){Sf.add(i)}function cN(i){Sf.delete(i)}function Wh(){return _s.getString(Rb,sx)}function ax(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":document.documentElement.classList.contains("light-mode")?"light-mode":null}function ox(){const[i,e]=bt.useState(Wh());return bt.useEffect(()=>{_s.setString(Rb,i),Jh(i)},[i]),[i,e]}var Sh={exports:{}},qa={},wh={exports:{}},xh={};/**
|
|
19
19
|
* @license React
|
|
20
20
|
* scheduler.production.js
|
|
21
21
|
*
|
|
@@ -23,7 +23,7 @@ var Yw=Object.defineProperty;var Kw=(i,e,t)=>e in i?Yw(i,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 __;function lx(){return __||(__=1,(function(i){function e(I,Z){var ae=I.length;I.push(Z);e:for(;0<ae;){var we=ae-1>>>1,xe=I[we];if(0<a(xe,Z))I[we]=Z,I[ae]=xe,ae=we;else break e}}function t(I){return I.length===0?null:I[0]}function s(I){if(I.length===0)return null;var Z=I[0],ae=I.pop();if(ae!==Z){I[0]=ae;e:for(var we=0,xe=I.length,N=xe>>>1;we<N;){var G=2*(we+1)-1,ee=I[G],ne=G+1,de=I[ne];if(0>a(ee,ae))ne<xe&&0>a(de,ee)?(I[we]=de,I[ne]=ae,we=ne):(I[we]=ee,I[G]=ae,we=G);else if(ne<xe&&0>a(de,ae))I[we]=de,I[ne]=ae,we=ne;else break e}}return Z}function a(I,Z){var ae=I.sortIndex-Z.sortIndex;return ae!==0?ae:I.id-Z.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;i.unstable_now=function(){return o.now()}}else{var c=Date,d=c.now();i.unstable_now=function(){return c.now()-d}}var h=[],f=[],y=1,m=null,_=3,b=!1,
|
|
26
|
+
*/var __;function lx(){return __||(__=1,(function(i){function e(I,Z){var ae=I.length;I.push(Z);e:for(;0<ae;){var we=ae-1>>>1,xe=I[we];if(0<a(xe,Z))I[we]=Z,I[ae]=xe,ae=we;else break e}}function t(I){return I.length===0?null:I[0]}function s(I){if(I.length===0)return null;var Z=I[0],ae=I.pop();if(ae!==Z){I[0]=ae;e:for(var we=0,xe=I.length,N=xe>>>1;we<N;){var G=2*(we+1)-1,ee=I[G],ne=G+1,de=I[ne];if(0>a(ee,ae))ne<xe&&0>a(de,ee)?(I[we]=de,I[ne]=ae,we=ne):(I[we]=ee,I[G]=ae,we=G);else if(ne<xe&&0>a(de,ae))I[we]=de,I[ne]=ae,we=ne;else break e}}return Z}function a(I,Z){var ae=I.sortIndex-Z.sortIndex;return ae!==0?ae:I.id-Z.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;i.unstable_now=function(){return o.now()}}else{var c=Date,d=c.now();i.unstable_now=function(){return c.now()-d}}var h=[],f=[],y=1,m=null,_=3,b=!1,w=!1,v=!1,T=!1,A=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function j(I){for(var Z=t(f);Z!==null;){if(Z.callback===null)s(f);else if(Z.startTime<=I)s(f),Z.sortIndex=Z.expirationTime,e(h,Z);else break;Z=t(f)}}function D(I){if(v=!1,j(I),!w)if(t(h)!==null)w=!0,F||(F=!0,Y());else{var Z=t(f);Z!==null&&Ne(D,Z.startTime-I)}}var F=!1,B=-1,q=5,O=-1;function Q(){return T?!0:!(i.unstable_now()-O<q)}function se(){if(T=!1,F){var I=i.unstable_now();O=I;var Z=!0;try{e:{w=!1,v&&(v=!1,C(B),B=-1),b=!0;var ae=_;try{t:{for(j(I),m=t(h);m!==null&&!(m.expirationTime>I&&Q());){var we=m.callback;if(typeof we=="function"){m.callback=null,_=m.priorityLevel;var xe=we(m.expirationTime<=I);if(I=i.unstable_now(),typeof xe=="function"){m.callback=xe,j(I),Z=!0;break t}m===t(h)&&s(h),j(I)}else s(h);m=t(h)}if(m!==null)Z=!0;else{var N=t(f);N!==null&&Ne(D,N.startTime-I),Z=!1}}break e}finally{m=null,_=ae,b=!1}Z=void 0}}finally{Z?Y():F=!1}}}var Y;if(typeof L=="function")Y=function(){L(se)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,te=J.port2;J.port1.onmessage=se,Y=function(){te.postMessage(null)}}else Y=function(){A(se,0)};function Ne(I,Z){B=A(function(){I(i.unstable_now())},Z)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(I){I.callback=null},i.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<I?Math.floor(1e3/I):5},i.unstable_getCurrentPriorityLevel=function(){return _},i.unstable_next=function(I){switch(_){case 1:case 2:case 3:var Z=3;break;default:Z=_}var ae=_;_=Z;try{return I()}finally{_=ae}},i.unstable_requestPaint=function(){T=!0},i.unstable_runWithPriority=function(I,Z){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var ae=_;_=I;try{return Z()}finally{_=ae}},i.unstable_scheduleCallback=function(I,Z,ae){var we=i.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?we+ae:we):ae=we,I){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=ae+xe,I={id:y++,callback:Z,priorityLevel:I,startTime:ae,expirationTime:xe,sortIndex:-1},ae>we?(I.sortIndex=ae,e(f,I),t(h)===null&&I===t(f)&&(v?(C(B),B=-1):v=!0,Ne(D,ae-we))):(I.sortIndex=xe,e(h,I),w||b||(w=!0,F||(F=!0,Y()))),I},i.unstable_shouldYield=Q,i.unstable_wrapCallback=function(I){var Z=_;return function(){var ae=_;_=Z;try{return I.apply(this,arguments)}finally{_=ae}}}})(xh)),xh}var b_;function cx(){return b_||(b_=1,wh.exports=lx()),wh.exports}var Th={exports:{}},vt={};/**
|
|
27
27
|
* @license React
|
|
28
28
|
* react-dom.production.js
|
|
29
29
|
*
|
|
@@ -39,25 +39,25 @@ var Yw=Object.defineProperty;var Kw=(i,e,t)=>e in i?Yw(i,e,{enumerable:!0,config
|
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the MIT license found in the
|
|
41
41
|
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var w_;function hx(){if(w_)return qa;w_=1;var i=cx(),e=vf(),t=dx();function s(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function o(n){var r=n,l=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(l=r.return),n=r.return;while(n)}return r.tag===3?l:null}function c(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function h(n){if(o(n)!==n)throw Error(s(188))}function f(n){var r=n.alternate;if(!r){if(r=o(n),r===null)throw Error(s(188));return r!==n?null:n}for(var l=n,u=r;;){var g=l.return;if(g===null)break;var p=g.alternate;if(p===null){if(u=g.return,u!==null){l=u;continue}break}if(g.child===p.child){for(p=g.child;p;){if(p===l)return h(g),n;if(p===u)return h(g),r;p=p.sibling}throw Error(s(188))}if(l.return!==u.return)l=g,u=p;else{for(var S=!1,E=g.child;E;){if(E===l){S=!0,l=g,u=p;break}if(E===u){S=!0,u=g,l=p;break}E=E.sibling}if(!S){for(E=p.child;E;){if(E===l){S=!0,l=p,u=g;break}if(E===u){S=!0,u=p,l=g;break}E=E.sibling}if(!S)throw Error(s(189))}}if(l.alternate!==u)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var m=Object.assign,_=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),
|
|
42
|
+
*/var w_;function hx(){if(w_)return qa;w_=1;var i=cx(),e=vf(),t=dx();function s(n){var r="https://react.dev/errors/"+n;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function o(n){var r=n,l=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(l=r.return),n=r.return;while(n)}return r.tag===3?l:null}function c(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function d(n){if(n.tag===31){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function h(n){if(o(n)!==n)throw Error(s(188))}function f(n){var r=n.alternate;if(!r){if(r=o(n),r===null)throw Error(s(188));return r!==n?null:n}for(var l=n,u=r;;){var g=l.return;if(g===null)break;var p=g.alternate;if(p===null){if(u=g.return,u!==null){l=u;continue}break}if(g.child===p.child){for(p=g.child;p;){if(p===l)return h(g),n;if(p===u)return h(g),r;p=p.sibling}throw Error(s(188))}if(l.return!==u.return)l=g,u=p;else{for(var S=!1,E=g.child;E;){if(E===l){S=!0,l=g,u=p;break}if(E===u){S=!0,u=g,l=p;break}E=E.sibling}if(!S){for(E=p.child;E;){if(E===l){S=!0,l=p,u=g;break}if(E===u){S=!0,u=p,l=g;break}E=E.sibling}if(!S)throw Error(s(189))}}if(l.alternate!==u)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?n:r}function y(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n;for(n=n.child;n!==null;){if(r=y(n),r!==null)return r;n=n.sibling}return null}var m=Object.assign,_=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),L=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),Q=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function Y(n){return n===null||typeof n!="object"?null:(n=se&&n[se]||n["@@iterator"],typeof n=="function"?n:null)}var J=Symbol.for("react.client.reference");function te(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===J?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case v:return"Fragment";case A:return"Profiler";case T:return"StrictMode";case D:return"Suspense";case F:return"SuspenseList";case O:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case w:return"Portal";case L:return n.displayName||"Context";case C:return(n._context.displayName||"Context")+".Consumer";case j:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case B:return r=n.displayName||null,r!==null?r:te(n.type)||"Memo";case q:r=n._payload,n=n._init;try{return te(n(r))}catch{}}return null}var Ne=Array.isArray,I=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},we=[],xe=-1;function N(n){return{current:n}}function G(n){0>xe||(n.current=we[xe],we[xe]=null,xe--)}function ee(n,r){xe++,we[xe]=n.current,n.current=r}var ne=N(null),de=N(null),oe=N(null),Ee=N(null);function st(n,r){switch(ee(oe,r),ee(de,n),ee(ne,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?jy(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=jy(r),n=Hy(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}G(ne),ee(ne,n)}function ze(){G(ne),G(de),G(oe)}function Yi(n){n.memoizedState!==null&&ee(Ee,n);var r=ne.current,l=Hy(r,n.type);r!==l&&(ee(de,n),ee(ne,l))}function zn(n){de.current===n&&(G(ne),G(de)),Ee.current===n&&(G(Ee),za._currentValue=ae)}var mn,Gr;function rt(n){if(mn===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);mn=r&&r[1]||"",Gr=-1<l.stack.indexOf(`
|
|
43
43
|
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
44
|
`+mn+n+Gr}var Ns=!1;function Xr(n,r){if(!n||Ns)return"";Ns=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(U){var $=U}Reflect.construct(n,[],K)}else{try{K.call()}catch(U){$=U}n.call(K.prototype)}}else{try{throw Error()}catch(U){$=U}(K=n())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(U){if(U&&$&&typeof U.stack=="string")return[U.stack,$.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=u.DetermineComponentFrameRoot(),S=p[0],E=p[1];if(S&&E){var k=S.split(`
|
|
45
45
|
`),z=E.split(`
|
|
46
46
|
`);for(g=u=0;u<k.length&&!k[u].includes("DetermineComponentFrameRoot");)u++;for(;g<z.length&&!z[g].includes("DetermineComponentFrameRoot");)g++;if(u===k.length||g===z.length)for(u=k.length-1,g=z.length-1;1<=u&&0<=g&&k[u]!==z[g];)g--;for(;1<=u&&0<=g;u--,g--)if(k[u]!==z[g]){if(u!==1||g!==1)do if(u--,g--,0>g||k[u]!==z[g]){var V=`
|
|
47
47
|
`+k[u].replace(" at new "," at ");return n.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",n.displayName)),V}while(1<=u&&0<=g);break}}}finally{Ns=!1,Error.prepareStackTrace=l}return(l=n?n.displayName||n.name:"")?rt(l):""}function tu(n,r){switch(n.tag){case 26:case 27:case 5:return rt(n.type);case 16:return rt("Lazy");case 13:return n.child!==r&&r!==null?rt("Suspense Fallback"):rt("Suspense");case 19:return rt("SuspenseList");case 0:case 15:return Xr(n.type,!1);case 11:return Xr(n.type.render,!1);case 1:return Xr(n.type,!0);case 31:return rt("Activity");default:return""}}function Ms(n){try{var r="",l=null;do r+=tu(n,l),l=n,n=n.return;while(n);return r}catch(u){return`
|
|
48
48
|
Error generating stack: `+u.message+`
|
|
49
|
-
`+u.stack}}var Ki=Object.prototype.hasOwnProperty,di=i.unstable_scheduleCallback,Yr=i.unstable_cancelCallback,hi=i.unstable_shouldYield,nu=i.unstable_requestPaint,xt=i.unstable_now,iu=i.unstable_getCurrentPriorityLevel,ko=i.unstable_ImmediatePriority,Kr=i.unstable_UserBlockingPriority,fi=i.unstable_NormalPriority,su=i.unstable_LowPriority,No=i.unstable_IdlePriority,ru=i.log,Ji=i.unstable_setDisableYieldValue,$n=null,ct=null;function En(n){if(typeof ru=="function"&&Ji(n),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode($n,n)}catch{}}var Tt=Math.clz32?Math.clz32:ue,au=Math.log,Mo=Math.LN2;function ue(n){return n>>>=0,n===0?32:31-(au(n)/Mo|0)|0}var An=256,Zt=262144,Do=4194304;function Wi(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Lo(n,r,l){var u=n.pendingLanes;if(u===0)return 0;var g=0,p=n.suspendedLanes,S=n.pingedLanes;n=n.warmLanes;var E=u&134217727;return E!==0?(u=E&~p,u!==0?g=Wi(u):(S&=E,S!==0?g=Wi(S):l||(l=E&~n,l!==0&&(g=Wi(l))))):(E=u&~p,E!==0?g=Wi(E):S!==0?g=Wi(S):l||(l=u&~n,l!==0&&(g=Wi(l)))),g===0?0:r!==0&&r!==g&&(r&p)===0&&(p=g&-g,l=r&-r,p>=l||p===32&&(l&4194048)!==0)?r:g}function Jr(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function jS(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mg(){var n=Do;return Do<<=1,(Do&62914560)===0&&(Do=4194304),n}function ou(n){for(var r=[],l=0;31>l;l++)r.push(n);return r}function Wr(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function HS(n,r,l,u,g,p){var S=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var E=n.entanglements,k=n.expirationTimes,z=n.hiddenUpdates;for(l=S&~l;0<l;){var V=31-Tt(l),K=1<<V;E[V]=0,k[V]=-1;var $=z[V];if($!==null)for(z[V]=null,V=0;V<$.length;V++){var U=$[V];U!==null&&(U.lane&=-536870913)}l&=~K}u!==0&&yg(n,u,0),p!==0&&g===0&&n.tag!==0&&(n.suspendedLanes|=p&~(S&~r))}function yg(n,r,l){n.pendingLanes|=r,n.suspendedLanes&=~r;var u=31-Tt(r);n.entangledLanes|=r,n.entanglements[u]=n.entanglements[u]|1073741824|l&261930}function _g(n,r){var l=n.entangledLanes|=r;for(n=n.entanglements;l;){var u=31-Tt(l),g=1<<u;g&r|n[u]&r&&(n[u]|=r),l&=~g}}function bg(n,r){var l=r&-r;return l=(l&42)!==0?1:lu(l),(l&(n.suspendedLanes|r))!==0?0:l}function lu(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function cu(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function vg(){var n=Z.p;return n!==0?n:(n=window.event,n===void 0?32:r_(n.type))}function Sg(n,r){var l=Z.p;try{return Z.p=n,r()}finally{Z.p=l}}var gi=Math.random().toString(36).slice(2),ft="__reactFiber$"+gi,Mt="__reactProps$"+gi,Ds="__reactContainer$"+gi,uu="__reactEvents$"+gi,zS="__reactListeners$"+gi,$S="__reactHandles$"+gi,wg="__reactResources$"+gi,Zr="__reactMarker$"+gi;function du(n){delete n[ft],delete n[Mt],delete n[uu],delete n[zS],delete n[$S]}function Ls(n){var r=n[ft];if(r)return r;for(var l=n.parentNode;l;){if(r=l[Ds]||l[ft]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(n=qy(n);n!==null;){if(l=n[ft])return l;n=qy(n)}return r}n=l,l=n.parentNode}return null}function Os(n){if(n=n[ft]||n[Ds]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function Qr(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(s(33))}function Rs(n){var r=n[wg];return r||(r=n[wg]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function ut(n){n[Zr]=!0}var xg=new Set,Tg={};function Zi(n,r){js(n,r),js(n+"Capture",r)}function js(n,r){for(Tg[n]=r,n=0;n<r.length;n++)xg.add(r[n])}var BS=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Eg={},Ag={};function IS(n){return Ki.call(Ag,n)?!0:Ki.call(Eg,n)?!1:BS.test(n)?Ag[n]=!0:(Eg[n]=!0,!1)}function Oo(n,r,l){if(IS(r))if(l===null)n.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+l)}}function Ro(n,r,l){if(l===null)n.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+l)}}function Bn(n,r,l,u){if(u===null)n.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(l);return}n.setAttributeNS(r,l,""+u)}}function Qt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Cg(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function PS(n,r,l){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,p=u.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return g.call(this)},set:function(S){l=""+S,p.call(this,S)}}),Object.defineProperty(n,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(S){l=""+S},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function hu(n){if(!n._valueTracker){var r=Cg(n)?"checked":"value";n._valueTracker=PS(n,r,""+n[r])}}function kg(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return n&&(u=Cg(n)?n.checked?"true":"false":n.value),n=u,n!==l?(r.setValue(n),!0):!1}function jo(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var US=/[\n"\\]/g;function en(n){return n.replace(US,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function fu(n,r,l,u,g,p,S,E){n.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.type=S:n.removeAttribute("type"),r!=null?S==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+Qt(r)):n.value!==""+Qt(r)&&(n.value=""+Qt(r)):S!=="submit"&&S!=="reset"||n.removeAttribute("value"),r!=null?gu(n,S,Qt(r)):l!=null?gu(n,S,Qt(l)):u!=null&&n.removeAttribute("value"),g==null&&p!=null&&(n.defaultChecked=!!p),g!=null&&(n.checked=g&&typeof g!="function"&&typeof g!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.name=""+Qt(E):n.removeAttribute("name")}function Ng(n,r,l,u,g,p,S,E){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(n.type=p),r!=null||l!=null){if(!(p!=="submit"&&p!=="reset"||r!=null)){hu(n);return}l=l!=null?""+Qt(l):"",r=r!=null?""+Qt(r):l,E||r===n.value||(n.value=r),n.defaultValue=r}u=u??g,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=E?n.checked:!!u,n.defaultChecked=!!u,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(n.name=S),hu(n)}function gu(n,r,l){r==="number"&&jo(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function Hs(n,r,l,u){if(n=n.options,r){r={};for(var g=0;g<l.length;g++)r["$"+l[g]]=!0;for(l=0;l<n.length;l++)g=r.hasOwnProperty("$"+n[l].value),n[l].selected!==g&&(n[l].selected=g),g&&u&&(n[l].defaultSelected=!0)}else{for(l=""+Qt(l),r=null,g=0;g<n.length;g++){if(n[g].value===l){n[g].selected=!0,u&&(n[g].defaultSelected=!0);return}r!==null||n[g].disabled||(r=n[g])}r!==null&&(r.selected=!0)}}function Mg(n,r,l){if(r!=null&&(r=""+Qt(r),r!==n.value&&(n.value=r),l==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=l!=null?""+Qt(l):""}function Dg(n,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(s(92));if(Ne(u)){if(1<u.length)throw Error(s(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=Qt(r),n.defaultValue=l,u=n.textContent,u===l&&u!==""&&u!==null&&(n.value=u),hu(n)}function zs(n,r){if(r){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=r;return}}n.textContent=r}var qS=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Lg(n,r,l){var u=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":u?n.setProperty(r,l):typeof l!="number"||l===0||qS.has(r)?r==="float"?n.cssFloat=l:n[r]=(""+l).trim():n[r]=l+"px"}function Og(n,r,l){if(r!=null&&typeof r!="object")throw Error(s(62));if(n=n.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var g in r)u=r[g],r.hasOwnProperty(g)&&l[g]!==u&&Lg(n,g,u)}else for(var p in r)r.hasOwnProperty(p)&&Lg(n,p,r[p])}function pu(n){if(n.indexOf("-")===-1)return!1;switch(n){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 VS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),FS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ho(n){return FS.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function In(){}var mu=null;function yu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var $s=null,Bs=null;function Rg(n){var r=Os(n);if(r&&(n=r.stateNode)){var l=n[Mt]||null;e:switch(n=r.stateNode,r.type){case"input":if(fu(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=n;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+en(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==n&&u.form===n.form){var g=u[Mt]||null;if(!g)throw Error(s(90));fu(u,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===n.form&&kg(u)}break e;case"textarea":Mg(n,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&Hs(n,!!l.multiple,r,!1)}}}var _u=!1;function jg(n,r,l){if(_u)return n(r,l);_u=!0;try{var u=n(r);return u}finally{if(_u=!1,($s!==null||Bs!==null)&&(xl(),$s&&(r=$s,n=Bs,Bs=$s=null,Rg(r),n)))for(r=0;r<n.length;r++)Rg(n[r])}}function ea(n,r){var l=n.stateNode;if(l===null)return null;var u=l[Mt]||null;if(u===null)return null;l=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(l&&typeof l!="function")throw Error(s(231,r,typeof l));return l}var Pn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bu=!1;if(Pn)try{var ta={};Object.defineProperty(ta,"passive",{get:function(){bu=!0}}),window.addEventListener("test",ta,ta),window.removeEventListener("test",ta,ta)}catch{bu=!1}var pi=null,vu=null,zo=null;function Hg(){if(zo)return zo;var n,r=vu,l=r.length,u,g="value"in pi?pi.value:pi.textContent,p=g.length;for(n=0;n<l&&r[n]===g[n];n++);var S=l-n;for(u=1;u<=S&&r[l-u]===g[p-u];u++);return zo=g.slice(n,1<u?1-u:void 0)}function $o(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Bo(){return!0}function zg(){return!1}function Dt(n){function r(l,u,g,p,S){this._reactName=l,this._targetInst=g,this.type=u,this.nativeEvent=p,this.target=S,this.currentTarget=null;for(var E in n)n.hasOwnProperty(E)&&(l=n[E],this[E]=l?l(p):p[E]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Bo:zg,this.isPropagationStopped=zg,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Bo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Bo)},persist:function(){},isPersistent:Bo}),r}var Qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Io=Dt(Qi),na=m({},Qi,{view:0,detail:0}),GS=Dt(na),Su,wu,ia,Po=m({},na,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==ia&&(ia&&n.type==="mousemove"?(Su=n.screenX-ia.screenX,wu=n.screenY-ia.screenY):wu=Su=0,ia=n),Su)},movementY:function(n){return"movementY"in n?n.movementY:wu}}),$g=Dt(Po),XS=m({},Po,{dataTransfer:0}),YS=Dt(XS),KS=m({},na,{relatedTarget:0}),xu=Dt(KS),JS=m({},Qi,{animationName:0,elapsedTime:0,pseudoElement:0}),WS=Dt(JS),ZS=m({},Qi,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),QS=Dt(ZS),e1=m({},Qi,{data:0}),Bg=Dt(e1),t1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},n1={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"},i1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function s1(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=i1[n])?!!r[n]:!1}function Tu(){return s1}var r1=m({},na,{key:function(n){if(n.key){var r=t1[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=$o(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?n1[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tu,charCode:function(n){return n.type==="keypress"?$o(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?$o(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),a1=Dt(r1),o1=m({},Po,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ig=Dt(o1),l1=m({},na,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tu}),c1=Dt(l1),u1=m({},Qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),d1=Dt(u1),h1=m({},Po,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),f1=Dt(h1),g1=m({},Qi,{newState:0,oldState:0}),p1=Dt(g1),m1=[9,13,27,32],Eu=Pn&&"CompositionEvent"in window,sa=null;Pn&&"documentMode"in document&&(sa=document.documentMode);var y1=Pn&&"TextEvent"in window&&!sa,Pg=Pn&&(!Eu||sa&&8<sa&&11>=sa),Ug=" ",qg=!1;function Vg(n,r){switch(n){case"keyup":return m1.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Is=!1;function _1(n,r){switch(n){case"compositionend":return Fg(r);case"keypress":return r.which!==32?null:(qg=!0,Ug);case"textInput":return n=r.data,n===Ug&&qg?null:n;default:return null}}function b1(n,r){if(Is)return n==="compositionend"||!Eu&&Vg(n,r)?(n=Hg(),zo=vu=pi=null,Is=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Pg&&r.locale!=="ko"?null:r.data;default:return null}}var v1={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 Gg(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!v1[n.type]:r==="textarea"}function Xg(n,r,l,u){$s?Bs?Bs.push(u):Bs=[u]:$s=u,r=Ml(r,"onChange"),0<r.length&&(l=new Io("onChange","change",null,l,u),n.push({event:l,listeners:r}))}var ra=null,aa=null;function S1(n){Ny(n,0)}function Uo(n){var r=Qr(n);if(kg(r))return n}function Yg(n,r){if(n==="change")return r}var Kg=!1;if(Pn){var Au;if(Pn){var Cu="oninput"in document;if(!Cu){var Jg=document.createElement("div");Jg.setAttribute("oninput","return;"),Cu=typeof Jg.oninput=="function"}Au=Cu}else Au=!1;Kg=Au&&(!document.documentMode||9<document.documentMode)}function Wg(){ra&&(ra.detachEvent("onpropertychange",Zg),aa=ra=null)}function Zg(n){if(n.propertyName==="value"&&Uo(aa)){var r=[];Xg(r,aa,n,yu(n)),jg(S1,r)}}function w1(n,r,l){n==="focusin"?(Wg(),ra=r,aa=l,ra.attachEvent("onpropertychange",Zg)):n==="focusout"&&Wg()}function x1(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Uo(aa)}function T1(n,r){if(n==="click")return Uo(r)}function E1(n,r){if(n==="input"||n==="change")return Uo(r)}function A1(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Vt=typeof Object.is=="function"?Object.is:A1;function oa(n,r){if(Vt(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var l=Object.keys(n),u=Object.keys(r);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var g=l[u];if(!Ki.call(r,g)||!Vt(n[g],r[g]))return!1}return!0}function Qg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function ep(n,r){var l=Qg(n);n=0;for(var u;l;){if(l.nodeType===3){if(u=n+l.textContent.length,n<=r&&u>=r)return{node:l,offset:r-n};n=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Qg(l)}}function tp(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?tp(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function np(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=jo(n.document);r instanceof n.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)n=r.contentWindow;else break;r=jo(n.document)}return r}function ku(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var C1=Pn&&"documentMode"in document&&11>=document.documentMode,Ps=null,Nu=null,la=null,Mu=!1;function ip(n,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Mu||Ps==null||Ps!==jo(u)||(u=Ps,"selectionStart"in u&&ku(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),la&&oa(la,u)||(la=u,u=Ml(Nu,"onSelect"),0<u.length&&(r=new Io("onSelect","select",null,r,l),n.push({event:r,listeners:u}),r.target=Ps)))}function es(n,r){var l={};return l[n.toLowerCase()]=r.toLowerCase(),l["Webkit"+n]="webkit"+r,l["Moz"+n]="moz"+r,l}var Us={animationend:es("Animation","AnimationEnd"),animationiteration:es("Animation","AnimationIteration"),animationstart:es("Animation","AnimationStart"),transitionrun:es("Transition","TransitionRun"),transitionstart:es("Transition","TransitionStart"),transitioncancel:es("Transition","TransitionCancel"),transitionend:es("Transition","TransitionEnd")},Du={},sp={};Pn&&(sp=document.createElement("div").style,"AnimationEvent"in window||(delete Us.animationend.animation,delete Us.animationiteration.animation,delete Us.animationstart.animation),"TransitionEvent"in window||delete Us.transitionend.transition);function ts(n){if(Du[n])return Du[n];if(!Us[n])return n;var r=Us[n],l;for(l in r)if(r.hasOwnProperty(l)&&l in sp)return Du[n]=r[l];return n}var rp=ts("animationend"),ap=ts("animationiteration"),op=ts("animationstart"),k1=ts("transitionrun"),N1=ts("transitionstart"),M1=ts("transitioncancel"),lp=ts("transitionend"),cp=new Map,Lu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Lu.push("scrollEnd");function yn(n,r){cp.set(n,r),Zi(r,[n])}var qo=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},tn=[],qs=0,Ou=0;function Vo(){for(var n=qs,r=Ou=qs=0;r<n;){var l=tn[r];tn[r++]=null;var u=tn[r];tn[r++]=null;var g=tn[r];tn[r++]=null;var p=tn[r];if(tn[r++]=null,u!==null&&g!==null){var S=u.pending;S===null?g.next=g:(g.next=S.next,S.next=g),u.pending=g}p!==0&&up(l,g,p)}}function Fo(n,r,l,u){tn[qs++]=n,tn[qs++]=r,tn[qs++]=l,tn[qs++]=u,Ou|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function Ru(n,r,l,u){return Fo(n,r,l,u),Go(n)}function ns(n,r){return Fo(n,null,null,r),Go(n)}function up(n,r,l){n.lanes|=l;var u=n.alternate;u!==null&&(u.lanes|=l);for(var g=!1,p=n.return;p!==null;)p.childLanes|=l,u=p.alternate,u!==null&&(u.childLanes|=l),p.tag===22&&(n=p.stateNode,n===null||n._visibility&1||(g=!0)),n=p,p=p.return;return n.tag===3?(p=n.stateNode,g&&r!==null&&(g=31-Tt(l),n=p.hiddenUpdates,u=n[g],u===null?n[g]=[r]:u.push(r),r.lane=l|536870912),p):null}function Go(n){if(50<Ma)throw Ma=0,qd=null,Error(s(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Vs={};function D1(n,r,l,u){this.tag=n,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(n,r,l,u){return new D1(n,r,l,u)}function ju(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Un(n,r){var l=n.alternate;return l===null?(l=Ft(n.tag,r,n.key,n.mode),l.elementType=n.elementType,l.type=n.type,l.stateNode=n.stateNode,l.alternate=n,n.alternate=l):(l.pendingProps=r,l.type=n.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=n.flags&65011712,l.childLanes=n.childLanes,l.lanes=n.lanes,l.child=n.child,l.memoizedProps=n.memoizedProps,l.memoizedState=n.memoizedState,l.updateQueue=n.updateQueue,r=n.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=n.sibling,l.index=n.index,l.ref=n.ref,l.refCleanup=n.refCleanup,l}function dp(n,r){n.flags&=65011714;var l=n.alternate;return l===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,r=l.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Xo(n,r,l,u,g,p){var S=0;if(u=n,typeof n=="function")ju(n)&&(S=1);else if(typeof n=="string")S=Hw(n,l,ne.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case O:return n=Ft(31,l,r,g),n.elementType=O,n.lanes=p,n;case v:return is(l.children,g,p,r);case T:S=8,g|=24;break;case A:return n=Ft(12,l,r,g|2),n.elementType=A,n.lanes=p,n;case D:return n=Ft(13,l,r,g),n.elementType=D,n.lanes=p,n;case F:return n=Ft(19,l,r,g),n.elementType=F,n.lanes=p,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case L:S=10;break e;case C:S=9;break e;case j:S=11;break e;case B:S=14;break e;case q:S=16,u=null;break e}S=29,l=Error(s(130,n===null?"null":typeof n,"")),u=null}return r=Ft(S,l,r,g),r.elementType=n,r.type=u,r.lanes=p,r}function is(n,r,l,u){return n=Ft(7,n,u,r),n.lanes=l,n}function Hu(n,r,l){return n=Ft(6,n,null,r),n.lanes=l,n}function hp(n){var r=Ft(18,null,null,0);return r.stateNode=n,r}function zu(n,r,l){return r=Ft(4,n.children!==null?n.children:[],n.key,r),r.lanes=l,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var fp=new WeakMap;function nn(n,r){if(typeof n=="object"&&n!==null){var l=fp.get(n);return l!==void 0?l:(r={value:n,source:r,stack:Ms(r)},fp.set(n,r),r)}return{value:n,source:r,stack:Ms(r)}}var Fs=[],Gs=0,Yo=null,ca=0,sn=[],rn=0,mi=null,Cn=1,kn="";function qn(n,r){Fs[Gs++]=ca,Fs[Gs++]=Yo,Yo=n,ca=r}function gp(n,r,l){sn[rn++]=Cn,sn[rn++]=kn,sn[rn++]=mi,mi=n;var u=Cn;n=kn;var g=32-Tt(u)-1;u&=~(1<<g),l+=1;var p=32-Tt(r)+g;if(30<p){var S=g-g%5;p=(u&(1<<S)-1).toString(32),u>>=S,g-=S,Cn=1<<32-Tt(r)+g|l<<g|u,kn=p+n}else Cn=1<<p|l<<g|u,kn=n}function $u(n){n.return!==null&&(qn(n,1),gp(n,1,0))}function Bu(n){for(;n===Yo;)Yo=Fs[--Gs],Fs[Gs]=null,ca=Fs[--Gs],Fs[Gs]=null;for(;n===mi;)mi=sn[--rn],sn[rn]=null,kn=sn[--rn],sn[rn]=null,Cn=sn[--rn],sn[rn]=null}function pp(n,r){sn[rn++]=Cn,sn[rn++]=kn,sn[rn++]=mi,Cn=r.id,kn=r.overflow,mi=n}var gt=null,$e=null,Se=!1,yi=null,an=!1,Iu=Error(s(519));function _i(n){var r=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ua(nn(r,n)),Iu}function mp(n){var r=n.stateNode,l=n.type,u=n.memoizedProps;switch(r[ft]=n,r[Mt]=u,l){case"dialog":_e("cancel",r),_e("close",r);break;case"iframe":case"object":case"embed":_e("load",r);break;case"video":case"audio":for(l=0;l<La.length;l++)_e(La[l],r);break;case"source":_e("error",r);break;case"img":case"image":case"link":_e("error",r),_e("load",r);break;case"details":_e("toggle",r);break;case"input":_e("invalid",r),Ng(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":_e("invalid",r);break;case"textarea":_e("invalid",r),Dg(r,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||u.suppressHydrationWarning===!0||Oy(r.textContent,l)?(u.popover!=null&&(_e("beforetoggle",r),_e("toggle",r)),u.onScroll!=null&&_e("scroll",r),u.onScrollEnd!=null&&_e("scrollend",r),u.onClick!=null&&(r.onclick=In),r=!0):r=!1,r||_i(n,!0)}function yp(n){for(gt=n.return;gt;)switch(gt.tag){case 5:case 31:case 13:an=!1;return;case 27:case 3:an=!0;return;default:gt=gt.return}}function Xs(n){if(n!==gt)return!1;if(!Se)return yp(n),Se=!0,!1;var r=n.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=n.type,l=!(l!=="form"&&l!=="button")||sh(n.type,n.memoizedProps)),l=!l),l&&$e&&_i(n),yp(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));$e=Uy(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));$e=Uy(n)}else r===27?(r=$e,Li(n.type)?(n=ch,ch=null,$e=n):$e=r):$e=gt?ln(n.stateNode.nextSibling):null;return!0}function ss(){$e=gt=null,Se=!1}function Pu(){var n=yi;return n!==null&&(jt===null?jt=n:jt.push.apply(jt,n),yi=null),n}function ua(n){yi===null?yi=[n]:yi.push(n)}var Uu=N(null),rs=null,Vn=null;function bi(n,r,l){ee(Uu,r._currentValue),r._currentValue=l}function Fn(n){n._currentValue=Uu.current,G(Uu)}function qu(n,r,l){for(;n!==null;){var u=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),n===l)break;n=n.return}}function Vu(n,r,l,u){var g=n.child;for(g!==null&&(g.return=n);g!==null;){var p=g.dependencies;if(p!==null){var S=g.child;p=p.firstContext;e:for(;p!==null;){var E=p;p=g;for(var k=0;k<r.length;k++)if(E.context===r[k]){p.lanes|=l,E=p.alternate,E!==null&&(E.lanes|=l),qu(p.return,l,n),u||(S=null);break e}p=E.next}}else if(g.tag===18){if(S=g.return,S===null)throw Error(s(341));S.lanes|=l,p=S.alternate,p!==null&&(p.lanes|=l),qu(S,l,n),S=null}else S=g.child;if(S!==null)S.return=g;else for(S=g;S!==null;){if(S===n){S=null;break}if(g=S.sibling,g!==null){g.return=S.return,S=g;break}S=S.return}g=S}}function Ys(n,r,l,u){n=null;for(var g=r,p=!1;g!==null;){if(!p){if((g.flags&524288)!==0)p=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var S=g.alternate;if(S===null)throw Error(s(387));if(S=S.memoizedProps,S!==null){var E=g.type;Vt(g.pendingProps.value,S.value)||(n!==null?n.push(E):n=[E])}}else if(g===Ee.current){if(S=g.alternate,S===null)throw Error(s(387));S.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(n!==null?n.push(za):n=[za])}g=g.return}n!==null&&Vu(r,n,l,u),r.flags|=262144}function Ko(n){for(n=n.firstContext;n!==null;){if(!Vt(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function as(n){rs=n,Vn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function pt(n){return _p(rs,n)}function Jo(n,r){return rs===null&&as(n),_p(n,r)}function _p(n,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Vn===null){if(n===null)throw Error(s(308));Vn=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else Vn=Vn.next=r;return l}var L1=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(l,u){n.push(u)}};this.abort=function(){r.aborted=!0,n.forEach(function(l){return l()})}},O1=i.unstable_scheduleCallback,R1=i.unstable_NormalPriority,Qe={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fu(){return{controller:new L1,data:new Map,refCount:0}}function da(n){n.refCount--,n.refCount===0&&O1(R1,function(){n.controller.abort()})}var ha=null,Gu=0,Ks=0,Js=null;function j1(n,r){if(ha===null){var l=ha=[];Gu=0,Ks=Kd(),Js={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Gu++,r.then(bp,bp),r}function bp(){if(--Gu===0&&ha!==null){Js!==null&&(Js.status="fulfilled");var n=ha;ha=null,Ks=0,Js=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function H1(n,r){var l=[],u={status:"pending",value:null,reason:null,then:function(g){l.push(g)}};return n.then(function(){u.status="fulfilled",u.value=r;for(var g=0;g<l.length;g++)(0,l[g])(r)},function(g){for(u.status="rejected",u.reason=g,g=0;g<l.length;g++)(0,l[g])(void 0)}),u}var vp=I.S;I.S=function(n,r){iy=xt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&j1(n,r),vp!==null&&vp(n,r)};var os=N(null);function Xu(){var n=os.current;return n!==null?n:je.pooledCache}function Wo(n,r){r===null?ee(os,os.current):ee(os,r.pool)}function Sp(){var n=Xu();return n===null?null:{parent:Qe._currentValue,pool:n}}var Ws=Error(s(460)),Yu=Error(s(474)),Zo=Error(s(542)),Qo={then:function(){}};function wp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function xp(n,r,l){switch(l=n[l],l===void 0?n.push(r):l!==r&&(r.then(In,In),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Ep(n),n;default:if(typeof r.status=="string")r.then(In,In);else{if(n=je,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=r,n.status="pending",n.then(function(u){if(r.status==="pending"){var g=r;g.status="fulfilled",g.value=u}},function(u){if(r.status==="pending"){var g=r;g.status="rejected",g.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Ep(n),n}throw cs=r,Ws}}function ls(n){try{var r=n._init;return r(n._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(cs=l,Ws):l}}var cs=null;function Tp(){if(cs===null)throw Error(s(459));var n=cs;return cs=null,n}function Ep(n){if(n===Ws||n===Zo)throw Error(s(483))}var Zs=null,fa=0;function el(n){var r=fa;return fa+=1,Zs===null&&(Zs=[]),xp(Zs,n,r)}function ga(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function tl(n,r){throw r.$$typeof===_?Error(s(525)):(n=Object.prototype.toString.call(r),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function Ap(n){function r(R,M){if(n){var H=R.deletions;H===null?(R.deletions=[M],R.flags|=16):H.push(M)}}function l(R,M){if(!n)return null;for(;M!==null;)r(R,M),M=M.sibling;return null}function u(R){for(var M=new Map;R!==null;)R.key!==null?M.set(R.key,R):M.set(R.index,R),R=R.sibling;return M}function g(R,M){return R=Un(R,M),R.index=0,R.sibling=null,R}function p(R,M,H){return R.index=H,n?(H=R.alternate,H!==null?(H=H.index,H<M?(R.flags|=67108866,M):H):(R.flags|=67108866,M)):(R.flags|=1048576,M)}function S(R){return n&&R.alternate===null&&(R.flags|=67108866),R}function E(R,M,H,X){return M===null||M.tag!==6?(M=Hu(H,R.mode,X),M.return=R,M):(M=g(M,H),M.return=R,M)}function k(R,M,H,X){var le=H.type;return le===v?V(R,M,H.props.children,X,H.key):M!==null&&(M.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===q&&ls(le)===M.type)?(M=g(M,H.props),ga(M,H),M.return=R,M):(M=Xo(H.type,H.key,H.props,null,R.mode,X),ga(M,H),M.return=R,M)}function z(R,M,H,X){return M===null||M.tag!==4||M.stateNode.containerInfo!==H.containerInfo||M.stateNode.implementation!==H.implementation?(M=zu(H,R.mode,X),M.return=R,M):(M=g(M,H.children||[]),M.return=R,M)}function V(R,M,H,X,le){return M===null||M.tag!==7?(M=is(H,R.mode,X,le),M.return=R,M):(M=g(M,H),M.return=R,M)}function K(R,M,H){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Hu(""+M,R.mode,H),M.return=R,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return H=Xo(M.type,M.key,M.props,null,R.mode,H),ga(H,M),H.return=R,H;case x:return M=zu(M,R.mode,H),M.return=R,M;case q:return M=ls(M),K(R,M,H)}if(Ne(M)||Y(M))return M=is(M,R.mode,H,null),M.return=R,M;if(typeof M.then=="function")return K(R,el(M),H);if(M.$$typeof===L)return K(R,Jo(R,M),H);tl(R,M)}return null}function $(R,M,H,X){var le=M!==null?M.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return le!==null?null:E(R,M,""+H,X);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return H.key===le?k(R,M,H,X):null;case x:return H.key===le?z(R,M,H,X):null;case q:return H=ls(H),$(R,M,H,X)}if(Ne(H)||Y(H))return le!==null?null:V(R,M,H,X,null);if(typeof H.then=="function")return $(R,M,el(H),X);if(H.$$typeof===L)return $(R,M,Jo(R,H),X);tl(R,H)}return null}function U(R,M,H,X,le){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return R=R.get(H)||null,E(M,R,""+X,le);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case b:return R=R.get(X.key===null?H:X.key)||null,k(M,R,X,le);case x:return R=R.get(X.key===null?H:X.key)||null,z(M,R,X,le);case q:return X=ls(X),U(R,M,H,X,le)}if(Ne(X)||Y(X))return R=R.get(H)||null,V(M,R,X,le,null);if(typeof X.then=="function")return U(R,M,H,el(X),le);if(X.$$typeof===L)return U(R,M,H,Jo(M,X),le);tl(M,X)}return null}function ie(R,M,H,X){for(var le=null,Ae=null,re=M,me=M=0,ve=null;re!==null&&me<H.length;me++){re.index>me?(ve=re,re=null):ve=re.sibling;var Ce=$(R,re,H[me],X);if(Ce===null){re===null&&(re=ve);break}n&&re&&Ce.alternate===null&&r(R,re),M=p(Ce,M,me),Ae===null?le=Ce:Ae.sibling=Ce,Ae=Ce,re=ve}if(me===H.length)return l(R,re),Se&&qn(R,me),le;if(re===null){for(;me<H.length;me++)re=K(R,H[me],X),re!==null&&(M=p(re,M,me),Ae===null?le=re:Ae.sibling=re,Ae=re);return Se&&qn(R,me),le}for(re=u(re);me<H.length;me++)ve=U(re,R,me,H[me],X),ve!==null&&(n&&ve.alternate!==null&&re.delete(ve.key===null?me:ve.key),M=p(ve,M,me),Ae===null?le=ve:Ae.sibling=ve,Ae=ve);return n&&re.forEach(function(zi){return r(R,zi)}),Se&&qn(R,me),le}function ce(R,M,H,X){if(H==null)throw Error(s(151));for(var le=null,Ae=null,re=M,me=M=0,ve=null,Ce=H.next();re!==null&&!Ce.done;me++,Ce=H.next()){re.index>me?(ve=re,re=null):ve=re.sibling;var zi=$(R,re,Ce.value,X);if(zi===null){re===null&&(re=ve);break}n&&re&&zi.alternate===null&&r(R,re),M=p(zi,M,me),Ae===null?le=zi:Ae.sibling=zi,Ae=zi,re=ve}if(Ce.done)return l(R,re),Se&&qn(R,me),le;if(re===null){for(;!Ce.done;me++,Ce=H.next())Ce=K(R,Ce.value,X),Ce!==null&&(M=p(Ce,M,me),Ae===null?le=Ce:Ae.sibling=Ce,Ae=Ce);return Se&&qn(R,me),le}for(re=u(re);!Ce.done;me++,Ce=H.next())Ce=U(re,R,me,Ce.value,X),Ce!==null&&(n&&Ce.alternate!==null&&re.delete(Ce.key===null?me:Ce.key),M=p(Ce,M,me),Ae===null?le=Ce:Ae.sibling=Ce,Ae=Ce);return n&&re.forEach(function(Xw){return r(R,Xw)}),Se&&qn(R,me),le}function Re(R,M,H,X){if(typeof H=="object"&&H!==null&&H.type===v&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case b:e:{for(var le=H.key;M!==null;){if(M.key===le){if(le=H.type,le===v){if(M.tag===7){l(R,M.sibling),X=g(M,H.props.children),X.return=R,R=X;break e}}else if(M.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===q&&ls(le)===M.type){l(R,M.sibling),X=g(M,H.props),ga(X,H),X.return=R,R=X;break e}l(R,M);break}else r(R,M);M=M.sibling}H.type===v?(X=is(H.props.children,R.mode,X,H.key),X.return=R,R=X):(X=Xo(H.type,H.key,H.props,null,R.mode,X),ga(X,H),X.return=R,R=X)}return S(R);case x:e:{for(le=H.key;M!==null;){if(M.key===le)if(M.tag===4&&M.stateNode.containerInfo===H.containerInfo&&M.stateNode.implementation===H.implementation){l(R,M.sibling),X=g(M,H.children||[]),X.return=R,R=X;break e}else{l(R,M);break}else r(R,M);M=M.sibling}X=zu(H,R.mode,X),X.return=R,R=X}return S(R);case q:return H=ls(H),Re(R,M,H,X)}if(Ne(H))return ie(R,M,H,X);if(Y(H)){if(le=Y(H),typeof le!="function")throw Error(s(150));return H=le.call(H),ce(R,M,H,X)}if(typeof H.then=="function")return Re(R,M,el(H),X);if(H.$$typeof===L)return Re(R,M,Jo(R,H),X);tl(R,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,M!==null&&M.tag===6?(l(R,M.sibling),X=g(M,H),X.return=R,R=X):(l(R,M),X=Hu(H,R.mode,X),X.return=R,R=X),S(R)):l(R,M)}return function(R,M,H,X){try{fa=0;var le=Re(R,M,H,X);return Zs=null,le}catch(re){if(re===Ws||re===Zo)throw re;var Ae=Ft(29,re,null,R.mode);return Ae.lanes=X,Ae.return=R,Ae}finally{}}}var us=Ap(!0),Cp=Ap(!1),vi=!1;function Ku(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ju(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Si(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function wi(n,r,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(ke&2)!==0){var g=u.pending;return g===null?r.next=r:(r.next=g.next,g.next=r),u.pending=r,r=Go(n),up(n,null,l),r}return Fo(n,u,r,l),Go(n)}function pa(n,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,_g(n,l)}}function Wu(n,r){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var g=null,p=null;if(l=l.firstBaseUpdate,l!==null){do{var S={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};p===null?g=p=S:p=p.next=S,l=l.next}while(l!==null);p===null?g=p=r:p=p.next=r}else g=p=r;l={baseState:u.baseState,firstBaseUpdate:g,lastBaseUpdate:p,shared:u.shared,callbacks:u.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=r:n.next=r,l.lastBaseUpdate=r}var Zu=!1;function ma(){if(Zu){var n=Js;if(n!==null)throw n}}function ya(n,r,l,u){Zu=!1;var g=n.updateQueue;vi=!1;var p=g.firstBaseUpdate,S=g.lastBaseUpdate,E=g.shared.pending;if(E!==null){g.shared.pending=null;var k=E,z=k.next;k.next=null,S===null?p=z:S.next=z,S=k;var V=n.alternate;V!==null&&(V=V.updateQueue,E=V.lastBaseUpdate,E!==S&&(E===null?V.firstBaseUpdate=z:E.next=z,V.lastBaseUpdate=k))}if(p!==null){var K=g.baseState;S=0,V=z=k=null,E=p;do{var $=E.lane&-536870913,U=$!==E.lane;if(U?(be&$)===$:(u&$)===$){$!==0&&$===Ks&&(Zu=!0),V!==null&&(V=V.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ie=n,ce=E;$=r;var Re=l;switch(ce.tag){case 1:if(ie=ce.payload,typeof ie=="function"){K=ie.call(Re,K,$);break e}K=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=ce.payload,$=typeof ie=="function"?ie.call(Re,K,$):ie,$==null)break e;K=m({},K,$);break e;case 2:vi=!0}}$=E.callback,$!==null&&(n.flags|=64,U&&(n.flags|=8192),U=g.callbacks,U===null?g.callbacks=[$]:U.push($))}else U={lane:$,tag:E.tag,payload:E.payload,callback:E.callback,next:null},V===null?(z=V=U,k=K):V=V.next=U,S|=$;if(E=E.next,E===null){if(E=g.shared.pending,E===null)break;U=E,E=U.next,U.next=null,g.lastBaseUpdate=U,g.shared.pending=null}}while(!0);V===null&&(k=K),g.baseState=k,g.firstBaseUpdate=z,g.lastBaseUpdate=V,p===null&&(g.shared.lanes=0),Ci|=S,n.lanes=S,n.memoizedState=K}}function kp(n,r){if(typeof n!="function")throw Error(s(191,n));n.call(r)}function Np(n,r){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)kp(l[n],r)}var Qs=N(null),nl=N(0);function Mp(n,r){n=ei,ee(nl,n),ee(Qs,r),ei=n|r.baseLanes}function Qu(){ee(nl,ei),ee(Qs,Qs.current)}function ed(){ei=nl.current,G(Qs),G(nl)}var Gt=N(null),on=null;function xi(n){var r=n.alternate;ee(Xe,Xe.current&1),ee(Gt,n),on===null&&(r===null||Qs.current!==null||r.memoizedState!==null)&&(on=n)}function td(n){ee(Xe,Xe.current),ee(Gt,n),on===null&&(on=n)}function Dp(n){n.tag===22?(ee(Xe,Xe.current),ee(Gt,n),on===null&&(on=n)):Ti()}function Ti(){ee(Xe,Xe.current),ee(Gt,Gt.current)}function Xt(n){G(Gt),on===n&&(on=null),G(Xe)}var Xe=N(0);function il(n){for(var r=n;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||oh(l)||lh(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Gn=0,pe=null,Le=null,et=null,sl=!1,er=!1,ds=!1,rl=0,_a=0,tr=null,z1=0;function Fe(){throw Error(s(321))}function nd(n,r){if(r===null)return!1;for(var l=0;l<r.length&&l<n.length;l++)if(!Vt(n[l],r[l]))return!1;return!0}function id(n,r,l,u,g,p){return Gn=p,pe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,I.H=n===null||n.memoizedState===null?gm:_d,ds=!1,p=l(u,g),ds=!1,er&&(p=Op(r,l,u,g)),Lp(n),p}function Lp(n){I.H=Sa;var r=Le!==null&&Le.next!==null;if(Gn=0,et=Le=pe=null,sl=!1,_a=0,tr=null,r)throw Error(s(300));n===null||tt||(n=n.dependencies,n!==null&&Ko(n)&&(tt=!0))}function Op(n,r,l,u){pe=n;var g=0;do{if(er&&(tr=null),_a=0,er=!1,25<=g)throw Error(s(301));if(g+=1,et=Le=null,n.updateQueue!=null){var p=n.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}I.H=pm,p=r(l,u)}while(er);return p}function $1(){var n=I.H,r=n.useState()[0];return r=typeof r.then=="function"?ba(r):r,n=n.useState()[0],(Le!==null?Le.memoizedState:null)!==n&&(pe.flags|=1024),r}function sd(){var n=rl!==0;return rl=0,n}function rd(n,r,l){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~l}function ad(n){if(sl){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}sl=!1}Gn=0,et=Le=pe=null,er=!1,_a=rl=0,tr=null}function Et(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?pe.memoizedState=et=n:et=et.next=n,et}function Ye(){if(Le===null){var n=pe.alternate;n=n!==null?n.memoizedState:null}else n=Le.next;var r=et===null?pe.memoizedState:et.next;if(r!==null)et=r,Le=n;else{if(n===null)throw pe.alternate===null?Error(s(467)):Error(s(310));Le=n,n={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},et===null?pe.memoizedState=et=n:et=et.next=n}return et}function al(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ba(n){var r=_a;return _a+=1,tr===null&&(tr=[]),n=xp(tr,n,r),r=pe,(et===null?r.memoizedState:et.next)===null&&(r=r.alternate,I.H=r===null||r.memoizedState===null?gm:_d),n}function ol(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return ba(n);if(n.$$typeof===L)return pt(n)}throw Error(s(438,String(n)))}function od(n){var r=null,l=pe.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=pe.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(g){return g.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=al(),pe.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(n),u=0;u<n;u++)l[u]=Q;return r.index++,l}function Xn(n,r){return typeof r=="function"?r(n):r}function ll(n){var r=Ye();return ld(r,Le,n)}function ld(n,r,l){var u=n.queue;if(u===null)throw Error(s(311));u.lastRenderedReducer=l;var g=n.baseQueue,p=u.pending;if(p!==null){if(g!==null){var S=g.next;g.next=p.next,p.next=S}r.baseQueue=g=p,u.pending=null}if(p=n.baseState,g===null)n.memoizedState=p;else{r=g.next;var E=S=null,k=null,z=r,V=!1;do{var K=z.lane&-536870913;if(K!==z.lane?(be&K)===K:(Gn&K)===K){var $=z.revertLane;if($===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),K===Ks&&(V=!0);else if((Gn&$)===$){z=z.next,$===Ks&&(V=!0);continue}else K={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},k===null?(E=k=K,S=p):k=k.next=K,pe.lanes|=$,Ci|=$;K=z.action,ds&&l(p,K),p=z.hasEagerState?z.eagerState:l(p,K)}else $={lane:K,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},k===null?(E=k=$,S=p):k=k.next=$,pe.lanes|=K,Ci|=K;z=z.next}while(z!==null&&z!==r);if(k===null?S=p:k.next=E,!Vt(p,n.memoizedState)&&(tt=!0,V&&(l=Js,l!==null)))throw l;n.memoizedState=p,n.baseState=S,n.baseQueue=k,u.lastRenderedState=p}return g===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function cd(n){var r=Ye(),l=r.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=n;var u=l.dispatch,g=l.pending,p=r.memoizedState;if(g!==null){l.pending=null;var S=g=g.next;do p=n(p,S.action),S=S.next;while(S!==g);Vt(p,r.memoizedState)||(tt=!0),r.memoizedState=p,r.baseQueue===null&&(r.baseState=p),l.lastRenderedState=p}return[p,u]}function Rp(n,r,l){var u=pe,g=Ye(),p=Se;if(p){if(l===void 0)throw Error(s(407));l=l()}else l=r();var S=!Vt((Le||g).memoizedState,l);if(S&&(g.memoizedState=l,tt=!0),g=g.queue,hd(zp.bind(null,u,g,n),[n]),g.getSnapshot!==r||S||et!==null&&et.memoizedState.tag&1){if(u.flags|=2048,nr(9,{destroy:void 0},Hp.bind(null,u,g,l,r),null),je===null)throw Error(s(349));p||(Gn&127)!==0||jp(u,r,l)}return l}function jp(n,r,l){n.flags|=16384,n={getSnapshot:r,value:l},r=pe.updateQueue,r===null?(r=al(),pe.updateQueue=r,r.stores=[n]):(l=r.stores,l===null?r.stores=[n]:l.push(n))}function Hp(n,r,l,u){r.value=l,r.getSnapshot=u,$p(r)&&Bp(n)}function zp(n,r,l){return l(function(){$p(r)&&Bp(n)})}function $p(n){var r=n.getSnapshot;n=n.value;try{var l=r();return!Vt(n,l)}catch{return!0}}function Bp(n){var r=ns(n,2);r!==null&&Ht(r,n,2)}function ud(n){var r=Et();if(typeof n=="function"){var l=n;if(n=l(),ds){En(!0);try{l()}finally{En(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:n},r}function Ip(n,r,l,u){return n.baseState=l,ld(n,Le,typeof u=="function"?u:Xn)}function B1(n,r,l,u,g){if(dl(n))throw Error(s(485));if(n=r.action,n!==null){var p={payload:g,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){p.listeners.push(S)}};I.T!==null?l(!0):p.isTransition=!1,u(p),l=r.pending,l===null?(p.next=r.pending=p,Pp(r,p)):(p.next=l.next,r.pending=l.next=p)}}function Pp(n,r){var l=r.action,u=r.payload,g=n.state;if(r.isTransition){var p=I.T,S={};I.T=S;try{var E=l(g,u),k=I.S;k!==null&&k(S,E),Up(n,r,E)}catch(z){dd(n,r,z)}finally{p!==null&&S.types!==null&&(p.types=S.types),I.T=p}}else try{p=l(g,u),Up(n,r,p)}catch(z){dd(n,r,z)}}function Up(n,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){qp(n,r,u)},function(u){return dd(n,r,u)}):qp(n,r,l)}function qp(n,r,l){r.status="fulfilled",r.value=l,Vp(r),n.state=l,r=n.pending,r!==null&&(l=r.next,l===r?n.pending=null:(l=l.next,r.next=l,Pp(n,l)))}function dd(n,r,l){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,Vp(r),r=r.next;while(r!==u)}n.action=null}function Vp(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function Fp(n,r){return r}function Gp(n,r){if(Se){var l=je.formState;if(l!==null){e:{var u=pe;if(Se){if($e){t:{for(var g=$e,p=an;g.nodeType!==8;){if(!p){g=null;break t}if(g=ln(g.nextSibling),g===null){g=null;break t}}p=g.data,g=p==="F!"||p==="F"?g:null}if(g){$e=ln(g.nextSibling),u=g.data==="F!";break e}}_i(u)}u=!1}u&&(r=l[0])}}return l=Et(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fp,lastRenderedState:r},l.queue=u,l=dm.bind(null,pe,u),u.dispatch=l,u=ud(!1),p=yd.bind(null,pe,!1,u.queue),u=Et(),g={state:r,dispatch:null,action:n,pending:null},u.queue=g,l=B1.bind(null,pe,g,p,l),g.dispatch=l,u.memoizedState=n,[r,l,!1]}function Xp(n){var r=Ye();return Yp(r,Le,n)}function Yp(n,r,l){if(r=ld(n,r,Fp)[0],n=ll(Xn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=ba(r)}catch(S){throw S===Ws?Zo:S}else u=r;r=Ye();var g=r.queue,p=g.dispatch;return l!==r.memoizedState&&(pe.flags|=2048,nr(9,{destroy:void 0},I1.bind(null,g,l),null)),[u,p,n]}function I1(n,r){n.action=r}function Kp(n){var r=Ye(),l=Le;if(l!==null)return Yp(r,l,n);Ye(),r=r.memoizedState,l=Ye();var u=l.queue.dispatch;return l.memoizedState=n,[r,u,!1]}function nr(n,r,l,u){return n={tag:n,create:l,deps:u,inst:r,next:null},r=pe.updateQueue,r===null&&(r=al(),pe.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=n.next=n:(u=l.next,l.next=n,n.next=u,r.lastEffect=n),n}function Jp(){return Ye().memoizedState}function cl(n,r,l,u){var g=Et();pe.flags|=n,g.memoizedState=nr(1|r,{destroy:void 0},l,u===void 0?null:u)}function ul(n,r,l,u){var g=Ye();u=u===void 0?null:u;var p=g.memoizedState.inst;Le!==null&&u!==null&&nd(u,Le.memoizedState.deps)?g.memoizedState=nr(r,p,l,u):(pe.flags|=n,g.memoizedState=nr(1|r,p,l,u))}function Wp(n,r){cl(8390656,8,n,r)}function hd(n,r){ul(2048,8,n,r)}function P1(n){pe.flags|=4;var r=pe.updateQueue;if(r===null)r=al(),pe.updateQueue=r,r.events=[n];else{var l=r.events;l===null?r.events=[n]:l.push(n)}}function Zp(n){var r=Ye().memoizedState;return P1({ref:r,nextImpl:n}),function(){if((ke&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}function Qp(n,r){return ul(4,2,n,r)}function em(n,r){return ul(4,4,n,r)}function tm(n,r){if(typeof r=="function"){n=n();var l=r(n);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function nm(n,r,l){l=l!=null?l.concat([n]):null,ul(4,4,tm.bind(null,r,n),l)}function fd(){}function im(n,r){var l=Ye();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&nd(r,u[1])?u[0]:(l.memoizedState=[n,r],n)}function sm(n,r){var l=Ye();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&nd(r,u[1]))return u[0];if(u=n(),ds){En(!0);try{n()}finally{En(!1)}}return l.memoizedState=[u,r],u}function gd(n,r,l){return l===void 0||(Gn&1073741824)!==0&&(be&261930)===0?n.memoizedState=r:(n.memoizedState=l,n=ry(),pe.lanes|=n,Ci|=n,l)}function rm(n,r,l,u){return Vt(l,r)?l:Qs.current!==null?(n=gd(n,l,u),Vt(n,r)||(tt=!0),n):(Gn&42)===0||(Gn&1073741824)!==0&&(be&261930)===0?(tt=!0,n.memoizedState=l):(n=ry(),pe.lanes|=n,Ci|=n,r)}function am(n,r,l,u,g){var p=Z.p;Z.p=p!==0&&8>p?p:8;var S=I.T,E={};I.T=E,yd(n,!1,r,l);try{var k=g(),z=I.S;if(z!==null&&z(E,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var V=H1(k,u);va(n,r,V,Jt(n))}else va(n,r,u,Jt(n))}catch(K){va(n,r,{then:function(){},status:"rejected",reason:K},Jt())}finally{Z.p=p,S!==null&&E.types!==null&&(S.types=E.types),I.T=S}}function U1(){}function pd(n,r,l,u){if(n.tag!==5)throw Error(s(476));var g=om(n).queue;am(n,g,r,ae,l===null?U1:function(){return lm(n),l(u)})}function om(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:ae},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:l},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function lm(n){var r=om(n);r.next===null&&(r=n.alternate.memoizedState),va(n,r.next.queue,{},Jt())}function md(){return pt(za)}function cm(){return Ye().memoizedState}function um(){return Ye().memoizedState}function q1(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var l=Jt();n=Si(l);var u=wi(r,n,l);u!==null&&(Ht(u,r,l),pa(u,r,l)),r={cache:Fu()},n.payload=r;return}r=r.return}}function V1(n,r,l){var u=Jt();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},dl(n)?hm(r,l):(l=Ru(n,r,l,u),l!==null&&(Ht(l,n,u),fm(l,r,u)))}function dm(n,r,l){var u=Jt();va(n,r,l,u)}function va(n,r,l,u){var g={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(dl(n))hm(r,g);else{var p=n.alternate;if(n.lanes===0&&(p===null||p.lanes===0)&&(p=r.lastRenderedReducer,p!==null))try{var S=r.lastRenderedState,E=p(S,l);if(g.hasEagerState=!0,g.eagerState=E,Vt(E,S))return Fo(n,r,g,0),je===null&&Vo(),!1}catch{}finally{}if(l=Ru(n,r,g,u),l!==null)return Ht(l,n,u),fm(l,r,u),!0}return!1}function yd(n,r,l,u){if(u={lane:2,revertLane:Kd(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},dl(n)){if(r)throw Error(s(479))}else r=Ru(n,l,u,2),r!==null&&Ht(r,n,2)}function dl(n){var r=n.alternate;return n===pe||r!==null&&r===pe}function hm(n,r){er=sl=!0;var l=n.pending;l===null?r.next=r:(r.next=l.next,l.next=r),n.pending=r}function fm(n,r,l){if((l&4194048)!==0){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,_g(n,l)}}var Sa={readContext:pt,use:ol,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe};Sa.useEffectEvent=Fe;var gm={readContext:pt,use:ol,useCallback:function(n,r){return Et().memoizedState=[n,r===void 0?null:r],n},useContext:pt,useEffect:Wp,useImperativeHandle:function(n,r,l){l=l!=null?l.concat([n]):null,cl(4194308,4,tm.bind(null,r,n),l)},useLayoutEffect:function(n,r){return cl(4194308,4,n,r)},useInsertionEffect:function(n,r){cl(4,2,n,r)},useMemo:function(n,r){var l=Et();r=r===void 0?null:r;var u=n();if(ds){En(!0);try{n()}finally{En(!1)}}return l.memoizedState=[u,r],u},useReducer:function(n,r,l){var u=Et();if(l!==void 0){var g=l(r);if(ds){En(!0);try{l(r)}finally{En(!1)}}}else g=r;return u.memoizedState=u.baseState=g,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:g},u.queue=n,n=n.dispatch=V1.bind(null,pe,n),[u.memoizedState,n]},useRef:function(n){var r=Et();return n={current:n},r.memoizedState=n},useState:function(n){n=ud(n);var r=n.queue,l=dm.bind(null,pe,r);return r.dispatch=l,[n.memoizedState,l]},useDebugValue:fd,useDeferredValue:function(n,r){var l=Et();return gd(l,n,r)},useTransition:function(){var n=ud(!1);return n=am.bind(null,pe,n.queue,!0,!1),Et().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,l){var u=pe,g=Et();if(Se){if(l===void 0)throw Error(s(407));l=l()}else{if(l=r(),je===null)throw Error(s(349));(be&127)!==0||jp(u,r,l)}g.memoizedState=l;var p={value:l,getSnapshot:r};return g.queue=p,Wp(zp.bind(null,u,p,n),[n]),u.flags|=2048,nr(9,{destroy:void 0},Hp.bind(null,u,p,l,r),null),l},useId:function(){var n=Et(),r=je.identifierPrefix;if(Se){var l=kn,u=Cn;l=(u&~(1<<32-Tt(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=rl++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=z1++,r="_"+r+"r_"+l.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:md,useFormState:Gp,useActionState:Gp,useOptimistic:function(n){var r=Et();r.memoizedState=r.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=yd.bind(null,pe,!0,l),l.dispatch=r,[n,r]},useMemoCache:od,useCacheRefresh:function(){return Et().memoizedState=q1.bind(null,pe)},useEffectEvent:function(n){var r=Et(),l={impl:n};return r.memoizedState=l,function(){if((ke&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},_d={readContext:pt,use:ol,useCallback:im,useContext:pt,useEffect:hd,useImperativeHandle:nm,useInsertionEffect:Qp,useLayoutEffect:em,useMemo:sm,useReducer:ll,useRef:Jp,useState:function(){return ll(Xn)},useDebugValue:fd,useDeferredValue:function(n,r){var l=Ye();return rm(l,Le.memoizedState,n,r)},useTransition:function(){var n=ll(Xn)[0],r=Ye().memoizedState;return[typeof n=="boolean"?n:ba(n),r]},useSyncExternalStore:Rp,useId:cm,useHostTransitionStatus:md,useFormState:Xp,useActionState:Xp,useOptimistic:function(n,r){var l=Ye();return Ip(l,Le,n,r)},useMemoCache:od,useCacheRefresh:um};_d.useEffectEvent=Zp;var pm={readContext:pt,use:ol,useCallback:im,useContext:pt,useEffect:hd,useImperativeHandle:nm,useInsertionEffect:Qp,useLayoutEffect:em,useMemo:sm,useReducer:cd,useRef:Jp,useState:function(){return cd(Xn)},useDebugValue:fd,useDeferredValue:function(n,r){var l=Ye();return Le===null?gd(l,n,r):rm(l,Le.memoizedState,n,r)},useTransition:function(){var n=cd(Xn)[0],r=Ye().memoizedState;return[typeof n=="boolean"?n:ba(n),r]},useSyncExternalStore:Rp,useId:cm,useHostTransitionStatus:md,useFormState:Kp,useActionState:Kp,useOptimistic:function(n,r){var l=Ye();return Le!==null?Ip(l,Le,n,r):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:od,useCacheRefresh:um};pm.useEffectEvent=Zp;function bd(n,r,l,u){r=n.memoizedState,l=l(u,r),l=l==null?r:m({},r,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var vd={enqueueSetState:function(n,r,l){n=n._reactInternals;var u=Jt(),g=Si(u);g.payload=r,l!=null&&(g.callback=l),r=wi(n,g,u),r!==null&&(Ht(r,n,u),pa(r,n,u))},enqueueReplaceState:function(n,r,l){n=n._reactInternals;var u=Jt(),g=Si(u);g.tag=1,g.payload=r,l!=null&&(g.callback=l),r=wi(n,g,u),r!==null&&(Ht(r,n,u),pa(r,n,u))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var l=Jt(),u=Si(l);u.tag=2,r!=null&&(u.callback=r),r=wi(n,u,l),r!==null&&(Ht(r,n,l),pa(r,n,l))}};function mm(n,r,l,u,g,p,S){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,p,S):r.prototype&&r.prototype.isPureReactComponent?!oa(l,u)||!oa(g,p):!0}function ym(n,r,l,u){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,u),r.state!==n&&vd.enqueueReplaceState(r,r.state,null)}function hs(n,r){var l=r;if("ref"in r){l={};for(var u in r)u!=="ref"&&(l[u]=r[u])}if(n=n.defaultProps){l===r&&(l=m({},l));for(var g in n)l[g]===void 0&&(l[g]=n[g])}return l}function _m(n){qo(n)}function bm(n){console.error(n)}function vm(n){qo(n)}function hl(n,r){try{var l=n.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function Sm(n,r,l){try{var u=n.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function Sd(n,r,l){return l=Si(l),l.tag=3,l.payload={element:null},l.callback=function(){hl(n,r)},l}function wm(n){return n=Si(n),n.tag=3,n}function xm(n,r,l,u){var g=l.type.getDerivedStateFromError;if(typeof g=="function"){var p=u.value;n.payload=function(){return g(p)},n.callback=function(){Sm(r,l,u)}}var S=l.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(n.callback=function(){Sm(r,l,u),typeof g!="function"&&(ki===null?ki=new Set([this]):ki.add(this));var E=u.stack;this.componentDidCatch(u.value,{componentStack:E!==null?E:""})})}function F1(n,r,l,u,g){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Ys(r,l,g,!0),l=Gt.current,l!==null){switch(l.tag){case 31:case 13:return on===null?Tl():l.alternate===null&&Ge===0&&(Ge=3),l.flags&=-257,l.flags|=65536,l.lanes=g,u===Qo?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),Gd(n,u,g)),!1;case 22:return l.flags|=65536,u===Qo?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([u]):l.add(u)),Gd(n,u,g)),!1}throw Error(s(435,l.tag))}return Gd(n,u,g),Tl(),!1}if(Se)return r=Gt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=g,u!==Iu&&(n=Error(s(422),{cause:u}),ua(nn(n,l)))):(u!==Iu&&(r=Error(s(423),{cause:u}),ua(nn(r,l))),n=n.current.alternate,n.flags|=65536,g&=-g,n.lanes|=g,u=nn(u,l),g=Sd(n.stateNode,u,g),Wu(n,g),Ge!==4&&(Ge=2)),!1;var p=Error(s(520),{cause:u});if(p=nn(p,l),Na===null?Na=[p]:Na.push(p),Ge!==4&&(Ge=2),r===null)return!0;u=nn(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,n=g&-g,l.lanes|=n,n=Sd(l.stateNode,u,n),Wu(l,n),!1;case 1:if(r=l.type,p=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(ki===null||!ki.has(p))))return l.flags|=65536,g&=-g,l.lanes|=g,g=wm(g),xm(g,n,l,u),Wu(l,g),!1}l=l.return}while(l!==null);return!1}var wd=Error(s(461)),tt=!1;function mt(n,r,l,u){r.child=n===null?Cp(r,null,l,u):us(r,n.child,l,u)}function Tm(n,r,l,u,g){l=l.render;var p=r.ref;if("ref"in u){var S={};for(var E in u)E!=="ref"&&(S[E]=u[E])}else S=u;return as(r),u=id(n,r,l,S,p,g),E=sd(),n!==null&&!tt?(rd(n,r,g),Yn(n,r,g)):(Se&&E&&$u(r),r.flags|=1,mt(n,r,u,g),r.child)}function Em(n,r,l,u,g){if(n===null){var p=l.type;return typeof p=="function"&&!ju(p)&&p.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=p,Am(n,r,p,u,g)):(n=Xo(l.type,null,u,r,r.mode,g),n.ref=r.ref,n.return=r,r.child=n)}if(p=n.child,!Md(n,g)){var S=p.memoizedProps;if(l=l.compare,l=l!==null?l:oa,l(S,u)&&n.ref===r.ref)return Yn(n,r,g)}return r.flags|=1,n=Un(p,u),n.ref=r.ref,n.return=r,r.child=n}function Am(n,r,l,u,g){if(n!==null){var p=n.memoizedProps;if(oa(p,u)&&n.ref===r.ref)if(tt=!1,r.pendingProps=u=p,Md(n,g))(n.flags&131072)!==0&&(tt=!0);else return r.lanes=n.lanes,Yn(n,r,g)}return xd(n,r,l,u,g)}function Cm(n,r,l,u){var g=u.children,p=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(p=p!==null?p.baseLanes|l:l,n!==null){for(u=r.child=n.child,g=0;u!==null;)g=g|u.lanes|u.childLanes,u=u.sibling;u=g&~p}else u=0,r.child=null;return km(n,r,p,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Wo(r,p!==null?p.cachePool:null),p!==null?Mp(r,p):Qu(),Dp(r);else return u=r.lanes=536870912,km(n,r,p!==null?p.baseLanes|l:l,l,u)}else p!==null?(Wo(r,p.cachePool),Mp(r,p),Ti(),r.memoizedState=null):(n!==null&&Wo(r,null),Qu(),Ti());return mt(n,r,g,l),r.child}function wa(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function km(n,r,l,u,g){var p=Xu();return p=p===null?null:{parent:Qe._currentValue,pool:p},r.memoizedState={baseLanes:l,cachePool:p},n!==null&&Wo(r,null),Qu(),Dp(r),n!==null&&Ys(n,r,u,!0),r.childLanes=g,null}function fl(n,r){return r=pl({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Nm(n,r,l){return us(r,n.child,null,l),n=fl(r,r.pendingProps),n.flags|=2,Xt(r),r.memoizedState=null,n}function G1(n,r,l){var u=r.pendingProps,g=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Se){if(u.mode==="hidden")return n=fl(r,u),r.lanes=536870912,wa(null,n);if(td(r),(n=$e)?(n=Py(n,an),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:mi!==null?{id:Cn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},l=hp(n),l.return=r,r.child=l,gt=r,$e=null)):n=null,n===null)throw _i(r);return r.lanes=536870912,null}return fl(r,u)}var p=n.memoizedState;if(p!==null){var S=p.dehydrated;if(td(r),g)if(r.flags&256)r.flags&=-257,r=Nm(n,r,l);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(s(558));else if(tt||Ys(n,r,l,!1),g=(l&n.childLanes)!==0,tt||g){if(u=je,u!==null&&(S=bg(u,l),S!==0&&S!==p.retryLane))throw p.retryLane=S,ns(n,S),Ht(u,n,S),wd;Tl(),r=Nm(n,r,l)}else n=p.treeContext,$e=ln(S.nextSibling),gt=r,Se=!0,yi=null,an=!1,n!==null&&pp(r,n),r=fl(r,u),r.flags|=4096;return r}return n=Un(n.child,{mode:u.mode,children:u.children}),n.ref=r.ref,r.child=n,n.return=r,n}function gl(n,r){var l=r.ref;if(l===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(n===null||n.ref!==l)&&(r.flags|=4194816)}}function xd(n,r,l,u,g){return as(r),l=id(n,r,l,u,void 0,g),u=sd(),n!==null&&!tt?(rd(n,r,g),Yn(n,r,g)):(Se&&u&&$u(r),r.flags|=1,mt(n,r,l,g),r.child)}function Mm(n,r,l,u,g,p){return as(r),r.updateQueue=null,l=Op(r,u,l,g),Lp(n),u=sd(),n!==null&&!tt?(rd(n,r,p),Yn(n,r,p)):(Se&&u&&$u(r),r.flags|=1,mt(n,r,l,p),r.child)}function Dm(n,r,l,u,g){if(as(r),r.stateNode===null){var p=Vs,S=l.contextType;typeof S=="object"&&S!==null&&(p=pt(S)),p=new l(u,p),r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=vd,r.stateNode=p,p._reactInternals=r,p=r.stateNode,p.props=u,p.state=r.memoizedState,p.refs={},Ku(r),S=l.contextType,p.context=typeof S=="object"&&S!==null?pt(S):Vs,p.state=r.memoizedState,S=l.getDerivedStateFromProps,typeof S=="function"&&(bd(r,l,S,u),p.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(S=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),S!==p.state&&vd.enqueueReplaceState(p,p.state,null),ya(r,u,p,g),ma(),p.state=r.memoizedState),typeof p.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(n===null){p=r.stateNode;var E=r.memoizedProps,k=hs(l,E);p.props=k;var z=p.context,V=l.contextType;S=Vs,typeof V=="object"&&V!==null&&(S=pt(V));var K=l.getDerivedStateFromProps;V=typeof K=="function"||typeof p.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,V||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(E||z!==S)&&ym(r,p,u,S),vi=!1;var $=r.memoizedState;p.state=$,ya(r,u,p,g),ma(),z=r.memoizedState,E||$!==z||vi?(typeof K=="function"&&(bd(r,l,K,u),z=r.memoizedState),(k=vi||mm(r,l,k,u,$,z,S))?(V||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(r.flags|=4194308)):(typeof p.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=z),p.props=u,p.state=z,p.context=S,u=k):(typeof p.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{p=r.stateNode,Ju(n,r),S=r.memoizedProps,V=hs(l,S),p.props=V,K=r.pendingProps,$=p.context,z=l.contextType,k=Vs,typeof z=="object"&&z!==null&&(k=pt(z)),E=l.getDerivedStateFromProps,(z=typeof E=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(S!==K||$!==k)&&ym(r,p,u,k),vi=!1,$=r.memoizedState,p.state=$,ya(r,u,p,g),ma();var U=r.memoizedState;S!==K||$!==U||vi||n!==null&&n.dependencies!==null&&Ko(n.dependencies)?(typeof E=="function"&&(bd(r,l,E,u),U=r.memoizedState),(V=vi||mm(r,l,V,u,$,U,k)||n!==null&&n.dependencies!==null&&Ko(n.dependencies))?(z||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(u,U,k),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(u,U,k)),typeof p.componentDidUpdate=="function"&&(r.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof p.componentDidUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(r.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=U),p.props=u,p.state=U,p.context=k,u=V):(typeof p.componentDidUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(r.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(r.flags|=1024),u=!1)}return p=u,gl(n,r),u=(r.flags&128)!==0,p||u?(p=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:p.render(),r.flags|=1,n!==null&&u?(r.child=us(r,n.child,null,g),r.child=us(r,null,l,g)):mt(n,r,l,g),r.memoizedState=p.state,n=r.child):n=Yn(n,r,g),n}function Lm(n,r,l,u){return ss(),r.flags|=256,mt(n,r,l,u),r.child}var Td={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ed(n){return{baseLanes:n,cachePool:Sp()}}function Ad(n,r,l){return n=n!==null?n.childLanes&~l:0,r&&(n|=Kt),n}function Om(n,r,l){var u=r.pendingProps,g=!1,p=(r.flags&128)!==0,S;if((S=p)||(S=n!==null&&n.memoizedState===null?!1:(Xe.current&2)!==0),S&&(g=!0,r.flags&=-129),S=(r.flags&32)!==0,r.flags&=-33,n===null){if(Se){if(g?xi(r):Ti(),(n=$e)?(n=Py(n,an),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:mi!==null?{id:Cn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},l=hp(n),l.return=r,r.child=l,gt=r,$e=null)):n=null,n===null)throw _i(r);return lh(n)?r.lanes=32:r.lanes=536870912,null}var E=u.children;return u=u.fallback,g?(Ti(),g=r.mode,E=pl({mode:"hidden",children:E},g),u=is(u,g,l,null),E.return=r,u.return=r,E.sibling=u,r.child=E,u=r.child,u.memoizedState=Ed(l),u.childLanes=Ad(n,S,l),r.memoizedState=Td,wa(null,u)):(xi(r),Cd(r,E))}var k=n.memoizedState;if(k!==null&&(E=k.dehydrated,E!==null)){if(p)r.flags&256?(xi(r),r.flags&=-257,r=kd(n,r,l)):r.memoizedState!==null?(Ti(),r.child=n.child,r.flags|=128,r=null):(Ti(),E=u.fallback,g=r.mode,u=pl({mode:"visible",children:u.children},g),E=is(E,g,l,null),E.flags|=2,u.return=r,E.return=r,u.sibling=E,r.child=u,us(r,n.child,null,l),u=r.child,u.memoizedState=Ed(l),u.childLanes=Ad(n,S,l),r.memoizedState=Td,r=wa(null,u));else if(xi(r),lh(E)){if(S=E.nextSibling&&E.nextSibling.dataset,S)var z=S.dgst;S=z,u=Error(s(419)),u.stack="",u.digest=S,ua({value:u,source:null,stack:null}),r=kd(n,r,l)}else if(tt||Ys(n,r,l,!1),S=(l&n.childLanes)!==0,tt||S){if(S=je,S!==null&&(u=bg(S,l),u!==0&&u!==k.retryLane))throw k.retryLane=u,ns(n,u),Ht(S,n,u),wd;oh(E)||Tl(),r=kd(n,r,l)}else oh(E)?(r.flags|=192,r.child=n.child,r=null):(n=k.treeContext,$e=ln(E.nextSibling),gt=r,Se=!0,yi=null,an=!1,n!==null&&pp(r,n),r=Cd(r,u.children),r.flags|=4096);return r}return g?(Ti(),E=u.fallback,g=r.mode,k=n.child,z=k.sibling,u=Un(k,{mode:"hidden",children:u.children}),u.subtreeFlags=k.subtreeFlags&65011712,z!==null?E=Un(z,E):(E=is(E,g,l,null),E.flags|=2),E.return=r,u.return=r,u.sibling=E,r.child=u,wa(null,u),u=r.child,E=n.child.memoizedState,E===null?E=Ed(l):(g=E.cachePool,g!==null?(k=Qe._currentValue,g=g.parent!==k?{parent:k,pool:k}:g):g=Sp(),E={baseLanes:E.baseLanes|l,cachePool:g}),u.memoizedState=E,u.childLanes=Ad(n,S,l),r.memoizedState=Td,wa(n.child,u)):(xi(r),l=n.child,n=l.sibling,l=Un(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,n!==null&&(S=r.deletions,S===null?(r.deletions=[n],r.flags|=16):S.push(n)),r.child=l,r.memoizedState=null,l)}function Cd(n,r){return r=pl({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function pl(n,r){return n=Ft(22,n,null,r),n.lanes=0,n}function kd(n,r,l){return us(r,n.child,null,l),n=Cd(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Rm(n,r,l){n.lanes|=r;var u=n.alternate;u!==null&&(u.lanes|=r),qu(n.return,r,l)}function Nd(n,r,l,u,g,p){var S=n.memoizedState;S===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:g,treeForkCount:p}:(S.isBackwards=r,S.rendering=null,S.renderingStartTime=0,S.last=u,S.tail=l,S.tailMode=g,S.treeForkCount=p)}function jm(n,r,l){var u=r.pendingProps,g=u.revealOrder,p=u.tail;u=u.children;var S=Xe.current,E=(S&2)!==0;if(E?(S=S&1|2,r.flags|=128):S&=1,ee(Xe,S),mt(n,r,u,l),u=Se?ca:0,!E&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Rm(n,l,r);else if(n.tag===19)Rm(n,l,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(g){case"forwards":for(l=r.child,g=null;l!==null;)n=l.alternate,n!==null&&il(n)===null&&(g=l),l=l.sibling;l=g,l===null?(g=r.child,r.child=null):(g=l.sibling,l.sibling=null),Nd(r,!1,g,l,p,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,g=r.child,r.child=null;g!==null;){if(n=g.alternate,n!==null&&il(n)===null){r.child=g;break}n=g.sibling,g.sibling=l,l=g,g=n}Nd(r,!0,l,null,p,u);break;case"together":Nd(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function Yn(n,r,l){if(n!==null&&(r.dependencies=n.dependencies),Ci|=r.lanes,(l&r.childLanes)===0)if(n!==null){if(Ys(n,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(s(153));if(r.child!==null){for(n=r.child,l=Un(n,n.pendingProps),r.child=l,l.return=r;n.sibling!==null;)n=n.sibling,l=l.sibling=Un(n,n.pendingProps),l.return=r;l.sibling=null}return r.child}function Md(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&Ko(n)))}function X1(n,r,l){switch(r.tag){case 3:st(r,r.stateNode.containerInfo),bi(r,Qe,n.memoizedState.cache),ss();break;case 27:case 5:Yi(r);break;case 4:st(r,r.stateNode.containerInfo);break;case 10:bi(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,td(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(xi(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Om(n,r,l):(xi(r),n=Yn(n,r,l),n!==null?n.sibling:null);xi(r);break;case 19:var g=(n.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Ys(n,r,l,!1),u=(l&r.childLanes)!==0),g){if(u)return jm(n,r,l);r.flags|=128}if(g=r.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ee(Xe,Xe.current),u)break;return null;case 22:return r.lanes=0,Cm(n,r,l,r.pendingProps);case 24:bi(r,Qe,n.memoizedState.cache)}return Yn(n,r,l)}function Hm(n,r,l){if(n!==null)if(n.memoizedProps!==r.pendingProps)tt=!0;else{if(!Md(n,l)&&(r.flags&128)===0)return tt=!1,X1(n,r,l);tt=(n.flags&131072)!==0}else tt=!1,Se&&(r.flags&1048576)!==0&&gp(r,ca,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(n=ls(r.elementType),r.type=n,typeof n=="function")ju(n)?(u=hs(n,u),r.tag=1,r=Dm(null,r,n,u,l)):(r.tag=0,r=xd(null,r,n,u,l));else{if(n!=null){var g=n.$$typeof;if(g===j){r.tag=11,r=Tm(null,r,n,u,l);break e}else if(g===B){r.tag=14,r=Em(null,r,n,u,l);break e}}throw r=te(n)||n,Error(s(306,r,""))}}return r;case 0:return xd(n,r,r.type,r.pendingProps,l);case 1:return u=r.type,g=hs(u,r.pendingProps),Dm(n,r,u,g,l);case 3:e:{if(st(r,r.stateNode.containerInfo),n===null)throw Error(s(387));u=r.pendingProps;var p=r.memoizedState;g=p.element,Ju(n,r),ya(r,u,null,l);var S=r.memoizedState;if(u=S.cache,bi(r,Qe,u),u!==p.cache&&Vu(r,[Qe],l,!0),ma(),u=S.element,p.isDehydrated)if(p={element:u,isDehydrated:!1,cache:S.cache},r.updateQueue.baseState=p,r.memoizedState=p,r.flags&256){r=Lm(n,r,u,l);break e}else if(u!==g){g=nn(Error(s(424)),r),ua(g),r=Lm(n,r,u,l);break e}else{switch(n=r.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for($e=ln(n.firstChild),gt=r,Se=!0,yi=null,an=!0,l=Cp(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ss(),u===g){r=Yn(n,r,l);break e}mt(n,r,u,l)}r=r.child}return r;case 26:return gl(n,r),n===null?(l=Xy(r.type,null,r.pendingProps,null))?r.memoizedState=l:Se||(l=r.type,n=r.pendingProps,u=Dl(oe.current).createElement(l),u[ft]=r,u[Mt]=n,yt(u,l,n),ut(u),r.stateNode=u):r.memoizedState=Xy(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return Yi(r),n===null&&Se&&(u=r.stateNode=Vy(r.type,r.pendingProps,oe.current),gt=r,an=!0,g=$e,Li(r.type)?(ch=g,$e=ln(u.firstChild)):$e=g),mt(n,r,r.pendingProps.children,l),gl(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Se&&((g=u=$e)&&(u=xw(u,r.type,r.pendingProps,an),u!==null?(r.stateNode=u,gt=r,$e=ln(u.firstChild),an=!1,g=!0):g=!1),g||_i(r)),Yi(r),g=r.type,p=r.pendingProps,S=n!==null?n.memoizedProps:null,u=p.children,sh(g,p)?u=null:S!==null&&sh(g,S)&&(r.flags|=32),r.memoizedState!==null&&(g=id(n,r,$1,null,null,l),za._currentValue=g),gl(n,r),mt(n,r,u,l),r.child;case 6:return n===null&&Se&&((n=l=$e)&&(l=Tw(l,r.pendingProps,an),l!==null?(r.stateNode=l,gt=r,$e=null,n=!0):n=!1),n||_i(r)),null;case 13:return Om(n,r,l);case 4:return st(r,r.stateNode.containerInfo),u=r.pendingProps,n===null?r.child=us(r,null,u,l):mt(n,r,u,l),r.child;case 11:return Tm(n,r,r.type,r.pendingProps,l);case 7:return mt(n,r,r.pendingProps,l),r.child;case 8:return mt(n,r,r.pendingProps.children,l),r.child;case 12:return mt(n,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,bi(r,r.type,u.value),mt(n,r,u.children,l),r.child;case 9:return g=r.type._context,u=r.pendingProps.children,as(r),g=pt(g),u=u(g),r.flags|=1,mt(n,r,u,l),r.child;case 14:return Em(n,r,r.type,r.pendingProps,l);case 15:return Am(n,r,r.type,r.pendingProps,l);case 19:return jm(n,r,l);case 31:return G1(n,r,l);case 22:return Cm(n,r,l,r.pendingProps);case 24:return as(r),u=pt(Qe),n===null?(g=Xu(),g===null&&(g=je,p=Fu(),g.pooledCache=p,p.refCount++,p!==null&&(g.pooledCacheLanes|=l),g=p),r.memoizedState={parent:u,cache:g},Ku(r),bi(r,Qe,g)):((n.lanes&l)!==0&&(Ju(n,r),ya(r,null,null,l),ma()),g=n.memoizedState,p=r.memoizedState,g.parent!==u?(g={parent:u,cache:u},r.memoizedState=g,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=g),bi(r,Qe,u)):(u=p.cache,bi(r,Qe,u),u!==g.cache&&Vu(r,[Qe],l,!0))),mt(n,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function Kn(n){n.flags|=4}function Dd(n,r,l,u,g){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(g&335544128)===g)if(n.stateNode.complete)n.flags|=8192;else if(cy())n.flags|=8192;else throw cs=Qo,Yu}else n.flags&=-16777217}function zm(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Zy(r))if(cy())n.flags|=8192;else throw cs=Qo,Yu}function ml(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?mg():536870912,n.lanes|=r,ar|=r)}function xa(n,r){if(!Se)switch(n.tailMode){case"hidden":r=n.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?n.tail=null:l.sibling=null;break;case"collapsed":l=n.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function Be(n){var r=n.alternate!==null&&n.alternate.child===n.child,l=0,u=0;if(r)for(var g=n.child;g!==null;)l|=g.lanes|g.childLanes,u|=g.subtreeFlags&65011712,u|=g.flags&65011712,g.return=n,g=g.sibling;else for(g=n.child;g!==null;)l|=g.lanes|g.childLanes,u|=g.subtreeFlags,u|=g.flags,g.return=n,g=g.sibling;return n.subtreeFlags|=u,n.childLanes=l,r}function Y1(n,r,l){var u=r.pendingProps;switch(Bu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(r),null;case 1:return Be(r),null;case 3:return l=r.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),Fn(Qe),ze(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(Xs(r)?Kn(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Pu())),Be(r),null;case 26:var g=r.type,p=r.memoizedState;return n===null?(Kn(r),p!==null?(Be(r),zm(r,p)):(Be(r),Dd(r,g,null,u,l))):p?p!==n.memoizedState?(Kn(r),Be(r),zm(r,p)):(Be(r),r.flags&=-16777217):(n=n.memoizedProps,n!==u&&Kn(r),Be(r),Dd(r,g,n,u,l)),null;case 27:if(zn(r),l=oe.current,g=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&Kn(r);else{if(!u){if(r.stateNode===null)throw Error(s(166));return Be(r),null}n=ne.current,Xs(r)?mp(r):(n=Vy(g,u,l),r.stateNode=n,Kn(r))}return Be(r),null;case 5:if(zn(r),g=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&Kn(r);else{if(!u){if(r.stateNode===null)throw Error(s(166));return Be(r),null}if(p=ne.current,Xs(r))mp(r);else{var S=Dl(oe.current);switch(p){case 1:p=S.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:p=S.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":p=S.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":p=S.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":p=S.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof u.is=="string"?S.createElement("select",{is:u.is}):S.createElement("select"),u.multiple?p.multiple=!0:u.size&&(p.size=u.size);break;default:p=typeof u.is=="string"?S.createElement(g,{is:u.is}):S.createElement(g)}}p[ft]=r,p[Mt]=u;e:for(S=r.child;S!==null;){if(S.tag===5||S.tag===6)p.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===r)break e;for(;S.sibling===null;){if(S.return===null||S.return===r)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}r.stateNode=p;e:switch(yt(p,g,u),g){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Kn(r)}}return Be(r),Dd(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,l),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==u&&Kn(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(s(166));if(n=oe.current,Xs(r)){if(n=r.stateNode,l=r.memoizedProps,u=null,g=gt,g!==null)switch(g.tag){case 27:case 5:u=g.memoizedProps}n[ft]=r,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||Oy(n.nodeValue,l)),n||_i(r,!0)}else n=Dl(n).createTextNode(u),n[ft]=r,r.stateNode=n}return Be(r),null;case 31:if(l=r.memoizedState,n===null||n.memoizedState!==null){if(u=Xs(r),l!==null){if(n===null){if(!u)throw Error(s(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[ft]=r}else ss(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Be(r),n=!1}else l=Pu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return r.flags&256?(Xt(r),r):(Xt(r),null);if((r.flags&128)!==0)throw Error(s(558))}return Be(r),null;case 13:if(u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(g=Xs(r),u!==null&&u.dehydrated!==null){if(n===null){if(!g)throw Error(s(318));if(g=r.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(s(317));g[ft]=r}else ss(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Be(r),g=!1}else g=Pu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=g),g=!0;if(!g)return r.flags&256?(Xt(r),r):(Xt(r),null)}return Xt(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,n=n!==null&&n.memoizedState!==null,l&&(u=r.child,g=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(g=u.alternate.memoizedState.cachePool.pool),p=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(p=u.memoizedState.cachePool.pool),p!==g&&(u.flags|=2048)),l!==n&&l&&(r.child.flags|=8192),ml(r,r.updateQueue),Be(r),null);case 4:return ze(),n===null&&Qd(r.stateNode.containerInfo),Be(r),null;case 10:return Fn(r.type),Be(r),null;case 19:if(G(Xe),u=r.memoizedState,u===null)return Be(r),null;if(g=(r.flags&128)!==0,p=u.rendering,p===null)if(g)xa(u,!1);else{if(Ge!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(p=il(n),p!==null){for(r.flags|=128,xa(u,!1),n=p.updateQueue,r.updateQueue=n,ml(r,n),r.subtreeFlags=0,n=l,l=r.child;l!==null;)dp(l,n),l=l.sibling;return ee(Xe,Xe.current&1|2),Se&&qn(r,u.treeForkCount),r.child}n=n.sibling}u.tail!==null&&xt()>Sl&&(r.flags|=128,g=!0,xa(u,!1),r.lanes=4194304)}else{if(!g)if(n=il(p),n!==null){if(r.flags|=128,g=!0,n=n.updateQueue,r.updateQueue=n,ml(r,n),xa(u,!0),u.tail===null&&u.tailMode==="hidden"&&!p.alternate&&!Se)return Be(r),null}else 2*xt()-u.renderingStartTime>Sl&&l!==536870912&&(r.flags|=128,g=!0,xa(u,!1),r.lanes=4194304);u.isBackwards?(p.sibling=r.child,r.child=p):(n=u.last,n!==null?n.sibling=p:r.child=p,u.last=p)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=xt(),n.sibling=null,l=Xe.current,ee(Xe,g?l&1|2:l&1),Se&&qn(r,u.treeForkCount),n):(Be(r),null);case 22:case 23:return Xt(r),ed(),u=r.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(Be(r),r.subtreeFlags&6&&(r.flags|=8192)):Be(r),l=r.updateQueue,l!==null&&ml(r,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),n!==null&&G(os),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Fn(Qe),Be(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function K1(n,r){switch(Bu(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Fn(Qe),ze(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return zn(r),null;case 31:if(r.memoizedState!==null){if(Xt(r),r.alternate===null)throw Error(s(340));ss()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Xt(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(s(340));ss()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return G(Xe),null;case 4:return ze(),null;case 10:return Fn(r.type),null;case 22:case 23:return Xt(r),ed(),n!==null&&G(os),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return Fn(Qe),null;case 25:return null;default:return null}}function $m(n,r){switch(Bu(r),r.tag){case 3:Fn(Qe),ze();break;case 26:case 27:case 5:zn(r);break;case 4:ze();break;case 31:r.memoizedState!==null&&Xt(r);break;case 13:Xt(r);break;case 19:G(Xe);break;case 10:Fn(r.type);break;case 22:case 23:Xt(r),ed(),n!==null&&G(os);break;case 24:Fn(Qe)}}function Ta(n,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var g=u.next;l=g;do{if((l.tag&n)===n){u=void 0;var p=l.create,S=l.inst;u=p(),S.destroy=u}l=l.next}while(l!==g)}}catch(E){De(r,r.return,E)}}function Ei(n,r,l){try{var u=r.updateQueue,g=u!==null?u.lastEffect:null;if(g!==null){var p=g.next;u=p;do{if((u.tag&n)===n){var S=u.inst,E=S.destroy;if(E!==void 0){S.destroy=void 0,g=r;var k=l,z=E;try{z()}catch(V){De(g,k,V)}}}u=u.next}while(u!==p)}}catch(V){De(r,r.return,V)}}function Bm(n){var r=n.updateQueue;if(r!==null){var l=n.stateNode;try{Np(r,l)}catch(u){De(n,n.return,u)}}}function Im(n,r,l){l.props=hs(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){De(n,r,u)}}function Ea(n,r){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof l=="function"?n.refCleanup=l(u):l.current=u}}catch(g){De(n,r,g)}}function Nn(n,r){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(g){De(n,r,g)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(g){De(n,r,g)}else l.current=null}function Pm(n){var r=n.type,l=n.memoizedProps,u=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(g){De(n,n.return,g)}}function Ld(n,r,l){try{var u=n.stateNode;yw(u,n.type,l,r),u[Mt]=r}catch(g){De(n,n.return,g)}}function Um(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Li(n.type)||n.tag===4}function Od(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Um(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Li(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Rd(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(n),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=In));else if(u!==4&&(u===27&&Li(n.type)&&(l=n.stateNode,r=null),n=n.child,n!==null))for(Rd(n,r,l),n=n.sibling;n!==null;)Rd(n,r,l),n=n.sibling}function yl(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?l.insertBefore(n,r):l.appendChild(n);else if(u!==4&&(u===27&&Li(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(yl(n,r,l),n=n.sibling;n!==null;)yl(n,r,l),n=n.sibling}function qm(n){var r=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,g=r.attributes;g.length;)r.removeAttributeNode(g[0]);yt(r,u,l),r[ft]=n,r[Mt]=l}catch(p){De(n,n.return,p)}}var Jn=!1,nt=!1,jd=!1,Vm=typeof WeakSet=="function"?WeakSet:Set,dt=null;function J1(n,r){if(n=n.containerInfo,nh=$l,n=np(n),ku(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var g=u.anchorOffset,p=u.focusNode;u=u.focusOffset;try{l.nodeType,p.nodeType}catch{l=null;break e}var S=0,E=-1,k=-1,z=0,V=0,K=n,$=null;t:for(;;){for(var U;K!==l||g!==0&&K.nodeType!==3||(E=S+g),K!==p||u!==0&&K.nodeType!==3||(k=S+u),K.nodeType===3&&(S+=K.nodeValue.length),(U=K.firstChild)!==null;)$=K,K=U;for(;;){if(K===n)break t;if($===l&&++z===g&&(E=S),$===p&&++V===u&&(k=S),(U=K.nextSibling)!==null)break;K=$,$=K.parentNode}K=U}l=E===-1||k===-1?null:{start:E,end:k}}else l=null}l=l||{start:0,end:0}}else l=null;for(ih={focusedElem:n,selectionRange:l},$l=!1,dt=r;dt!==null;)if(r=dt,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,dt=n;else for(;dt!==null;){switch(r=dt,p=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l<n.length;l++)g=n[l],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&p!==null){n=void 0,l=r,g=p.memoizedProps,p=p.memoizedState,u=l.stateNode;try{var ie=hs(l.type,g);n=u.getSnapshotBeforeUpdate(ie,p),u.__reactInternalSnapshotBeforeUpdate=n}catch(ce){De(l,l.return,ce)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,l=n.nodeType,l===9)ah(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":ah(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(s(163))}if(n=r.sibling,n!==null){n.return=r.return,dt=n;break}dt=r.return}}function Fm(n,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:Zn(n,l),u&4&&Ta(5,l);break;case 1:if(Zn(n,l),u&4)if(n=l.stateNode,r===null)try{n.componentDidMount()}catch(S){De(l,l.return,S)}else{var g=hs(l.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(g,r,n.__reactInternalSnapshotBeforeUpdate)}catch(S){De(l,l.return,S)}}u&64&&Bm(l),u&512&&Ea(l,l.return);break;case 3:if(Zn(n,l),u&64&&(n=l.updateQueue,n!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Np(n,r)}catch(S){De(l,l.return,S)}}break;case 27:r===null&&u&4&&qm(l);case 26:case 5:Zn(n,l),r===null&&u&4&&Pm(l),u&512&&Ea(l,l.return);break;case 12:Zn(n,l);break;case 31:Zn(n,l),u&4&&Ym(n,l);break;case 13:Zn(n,l),u&4&&Km(n,l),u&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=rw.bind(null,l),Ew(n,l))));break;case 22:if(u=l.memoizedState!==null||Jn,!u){r=r!==null&&r.memoizedState!==null||nt,g=Jn;var p=nt;Jn=u,(nt=r)&&!p?Qn(n,l,(l.subtreeFlags&8772)!==0):Zn(n,l),Jn=g,nt=p}break;case 30:break;default:Zn(n,l)}}function Gm(n){var r=n.alternate;r!==null&&(n.alternate=null,Gm(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&du(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Pe=null,Lt=!1;function Wn(n,r,l){for(l=l.child;l!==null;)Xm(n,r,l),l=l.sibling}function Xm(n,r,l){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount($n,l)}catch{}switch(l.tag){case 26:nt||Nn(l,r),Wn(n,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:nt||Nn(l,r);var u=Pe,g=Lt;Li(l.type)&&(Pe=l.stateNode,Lt=!1),Wn(n,r,l),Ra(l.stateNode),Pe=u,Lt=g;break;case 5:nt||Nn(l,r);case 6:if(u=Pe,g=Lt,Pe=null,Wn(n,r,l),Pe=u,Lt=g,Pe!==null)if(Lt)try{(Pe.nodeType===9?Pe.body:Pe.nodeName==="HTML"?Pe.ownerDocument.body:Pe).removeChild(l.stateNode)}catch(p){De(l,r,p)}else try{Pe.removeChild(l.stateNode)}catch(p){De(l,r,p)}break;case 18:Pe!==null&&(Lt?(n=Pe,By(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),gr(n)):By(Pe,l.stateNode));break;case 4:u=Pe,g=Lt,Pe=l.stateNode.containerInfo,Lt=!0,Wn(n,r,l),Pe=u,Lt=g;break;case 0:case 11:case 14:case 15:Ei(2,l,r),nt||Ei(4,l,r),Wn(n,r,l);break;case 1:nt||(Nn(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Im(l,r,u)),Wn(n,r,l);break;case 21:Wn(n,r,l);break;case 22:nt=(u=nt)||l.memoizedState!==null,Wn(n,r,l),nt=u;break;default:Wn(n,r,l)}}function Ym(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{gr(n)}catch(l){De(r,r.return,l)}}}function Km(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{gr(n)}catch(l){De(r,r.return,l)}}function W1(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Vm),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Vm),r;default:throw Error(s(435,n.tag))}}function _l(n,r){var l=W1(n);r.forEach(function(u){if(!l.has(u)){l.add(u);var g=aw.bind(null,n,u);u.then(g,g)}})}function Ot(n,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var g=l[u],p=n,S=r,E=S;e:for(;E!==null;){switch(E.tag){case 27:if(Li(E.type)){Pe=E.stateNode,Lt=!1;break e}break;case 5:Pe=E.stateNode,Lt=!1;break e;case 3:case 4:Pe=E.stateNode.containerInfo,Lt=!0;break e}E=E.return}if(Pe===null)throw Error(s(160));Xm(p,S,g),Pe=null,Lt=!1,p=g.alternate,p!==null&&(p.return=null),g.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Jm(r,n),r=r.sibling}var _n=null;function Jm(n,r){var l=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Ot(r,n),Rt(n),u&4&&(Ei(3,n,n.return),Ta(3,n),Ei(5,n,n.return));break;case 1:Ot(r,n),Rt(n),u&512&&(nt||l===null||Nn(l,l.return)),u&64&&Jn&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(l=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var g=_n;if(Ot(r,n),Rt(n),u&512&&(nt||l===null||Nn(l,l.return)),u&4){var p=l!==null?l.memoizedState:null;if(u=n.memoizedState,l===null)if(u===null)if(n.stateNode===null){e:{u=n.type,l=n.memoizedProps,g=g.ownerDocument||g;t:switch(u){case"title":p=g.getElementsByTagName("title")[0],(!p||p[Zr]||p[ft]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=g.createElement(u),g.head.insertBefore(p,g.querySelector("head > title"))),yt(p,u,l),p[ft]=n,ut(p),u=p;break e;case"link":var S=Jy("link","href",g).get(u+(l.href||""));if(S){for(var E=0;E<S.length;E++)if(p=S[E],p.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&p.getAttribute("rel")===(l.rel==null?null:l.rel)&&p.getAttribute("title")===(l.title==null?null:l.title)&&p.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){S.splice(E,1);break t}}p=g.createElement(u),yt(p,u,l),g.head.appendChild(p);break;case"meta":if(S=Jy("meta","content",g).get(u+(l.content||""))){for(E=0;E<S.length;E++)if(p=S[E],p.getAttribute("content")===(l.content==null?null:""+l.content)&&p.getAttribute("name")===(l.name==null?null:l.name)&&p.getAttribute("property")===(l.property==null?null:l.property)&&p.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&p.getAttribute("charset")===(l.charSet==null?null:l.charSet)){S.splice(E,1);break t}}p=g.createElement(u),yt(p,u,l),g.head.appendChild(p);break;default:throw Error(s(468,u))}p[ft]=n,ut(p),u=p}n.stateNode=u}else Wy(g,n.type,n.stateNode);else n.stateNode=Ky(g,u,n.memoizedProps);else p!==u?(p===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):p.count--,u===null?Wy(g,n.type,n.stateNode):Ky(g,u,n.memoizedProps)):u===null&&n.stateNode!==null&&Ld(n,n.memoizedProps,l.memoizedProps)}break;case 27:Ot(r,n),Rt(n),u&512&&(nt||l===null||Nn(l,l.return)),l!==null&&u&4&&Ld(n,n.memoizedProps,l.memoizedProps);break;case 5:if(Ot(r,n),Rt(n),u&512&&(nt||l===null||Nn(l,l.return)),n.flags&32){g=n.stateNode;try{zs(g,"")}catch(ie){De(n,n.return,ie)}}u&4&&n.stateNode!=null&&(g=n.memoizedProps,Ld(n,g,l!==null?l.memoizedProps:g)),u&1024&&(jd=!0);break;case 6:if(Ot(r,n),Rt(n),u&4){if(n.stateNode===null)throw Error(s(162));u=n.memoizedProps,l=n.stateNode;try{l.nodeValue=u}catch(ie){De(n,n.return,ie)}}break;case 3:if(Rl=null,g=_n,_n=Ll(r.containerInfo),Ot(r,n),_n=g,Rt(n),u&4&&l!==null&&l.memoizedState.isDehydrated)try{gr(r.containerInfo)}catch(ie){De(n,n.return,ie)}jd&&(jd=!1,Wm(n));break;case 4:u=_n,_n=Ll(n.stateNode.containerInfo),Ot(r,n),Rt(n),_n=u;break;case 12:Ot(r,n),Rt(n);break;case 31:Ot(r,n),Rt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,_l(n,u)));break;case 13:Ot(r,n),Rt(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(vl=xt()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,_l(n,u)));break;case 22:g=n.memoizedState!==null;var k=l!==null&&l.memoizedState!==null,z=Jn,V=nt;if(Jn=z||g,nt=V||k,Ot(r,n),nt=V,Jn=z,Rt(n),u&8192)e:for(r=n.stateNode,r._visibility=g?r._visibility&-2:r._visibility|1,g&&(l===null||k||Jn||nt||fs(n)),l=null,r=n;;){if(r.tag===5||r.tag===26){if(l===null){k=l=r;try{if(p=k.stateNode,g)S=p.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{E=k.stateNode;var K=k.memoizedProps.style,$=K!=null&&K.hasOwnProperty("display")?K.display:null;E.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(ie){De(k,k.return,ie)}}}else if(r.tag===6){if(l===null){k=r;try{k.stateNode.nodeValue=g?"":k.memoizedProps}catch(ie){De(k,k.return,ie)}}}else if(r.tag===18){if(l===null){k=r;try{var U=k.stateNode;g?Iy(U,!0):Iy(k.stateNode,!1)}catch(ie){De(k,k.return,ie)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=n.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,_l(n,l))));break;case 19:Ot(r,n),Rt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,_l(n,u)));break;case 30:break;case 21:break;default:Ot(r,n),Rt(n)}}function Rt(n){var r=n.flags;if(r&2){try{for(var l,u=n.return;u!==null;){if(Um(u)){l=u;break}u=u.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var g=l.stateNode,p=Od(n);yl(n,p,g);break;case 5:var S=l.stateNode;l.flags&32&&(zs(S,""),l.flags&=-33);var E=Od(n);yl(n,E,S);break;case 3:case 4:var k=l.stateNode.containerInfo,z=Od(n);Rd(n,z,k);break;default:throw Error(s(161))}}catch(V){De(n,n.return,V)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function Wm(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;Wm(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function Zn(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Fm(n,r.alternate,r),r=r.sibling}function fs(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:Ei(4,r,r.return),fs(r);break;case 1:Nn(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Im(r,r.return,l),fs(r);break;case 27:Ra(r.stateNode);case 26:case 5:Nn(r,r.return),fs(r);break;case 22:r.memoizedState===null&&fs(r);break;case 30:fs(r);break;default:fs(r)}n=n.sibling}}function Qn(n,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,g=n,p=r,S=p.flags;switch(p.tag){case 0:case 11:case 15:Qn(g,p,l),Ta(4,p);break;case 1:if(Qn(g,p,l),u=p,g=u.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(z){De(u,u.return,z)}if(u=p,g=u.updateQueue,g!==null){var E=u.stateNode;try{var k=g.shared.hiddenCallbacks;if(k!==null)for(g.shared.hiddenCallbacks=null,g=0;g<k.length;g++)kp(k[g],E)}catch(z){De(u,u.return,z)}}l&&S&64&&Bm(p),Ea(p,p.return);break;case 27:qm(p);case 26:case 5:Qn(g,p,l),l&&u===null&&S&4&&Pm(p),Ea(p,p.return);break;case 12:Qn(g,p,l);break;case 31:Qn(g,p,l),l&&S&4&&Ym(g,p);break;case 13:Qn(g,p,l),l&&S&4&&Km(g,p);break;case 22:p.memoizedState===null&&Qn(g,p,l),Ea(p,p.return);break;case 30:break;default:Qn(g,p,l)}r=r.sibling}}function Hd(n,r){var l=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==l&&(n!=null&&n.refCount++,l!=null&&da(l))}function zd(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&da(n))}function bn(n,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Zm(n,r,l,u),r=r.sibling}function Zm(n,r,l,u){var g=r.flags;switch(r.tag){case 0:case 11:case 15:bn(n,r,l,u),g&2048&&Ta(9,r);break;case 1:bn(n,r,l,u);break;case 3:bn(n,r,l,u),g&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&da(n)));break;case 12:if(g&2048){bn(n,r,l,u),n=r.stateNode;try{var p=r.memoizedProps,S=p.id,E=p.onPostCommit;typeof E=="function"&&E(S,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(k){De(r,r.return,k)}}else bn(n,r,l,u);break;case 31:bn(n,r,l,u);break;case 13:bn(n,r,l,u);break;case 23:break;case 22:p=r.stateNode,S=r.alternate,r.memoizedState!==null?p._visibility&2?bn(n,r,l,u):Aa(n,r):p._visibility&2?bn(n,r,l,u):(p._visibility|=2,ir(n,r,l,u,(r.subtreeFlags&10256)!==0||!1)),g&2048&&Hd(S,r);break;case 24:bn(n,r,l,u),g&2048&&zd(r.alternate,r);break;default:bn(n,r,l,u)}}function ir(n,r,l,u,g){for(g=g&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var p=n,S=r,E=l,k=u,z=S.flags;switch(S.tag){case 0:case 11:case 15:ir(p,S,E,k,g),Ta(8,S);break;case 23:break;case 22:var V=S.stateNode;S.memoizedState!==null?V._visibility&2?ir(p,S,E,k,g):Aa(p,S):(V._visibility|=2,ir(p,S,E,k,g)),g&&z&2048&&Hd(S.alternate,S);break;case 24:ir(p,S,E,k,g),g&&z&2048&&zd(S.alternate,S);break;default:ir(p,S,E,k,g)}r=r.sibling}}function Aa(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=n,u=r,g=u.flags;switch(u.tag){case 22:Aa(l,u),g&2048&&Hd(u.alternate,u);break;case 24:Aa(l,u),g&2048&&zd(u.alternate,u);break;default:Aa(l,u)}r=r.sibling}}var Ca=8192;function sr(n,r,l){if(n.subtreeFlags&Ca)for(n=n.child;n!==null;)Qm(n,r,l),n=n.sibling}function Qm(n,r,l){switch(n.tag){case 26:sr(n,r,l),n.flags&Ca&&n.memoizedState!==null&&zw(l,_n,n.memoizedState,n.memoizedProps);break;case 5:sr(n,r,l);break;case 3:case 4:var u=_n;_n=Ll(n.stateNode.containerInfo),sr(n,r,l),_n=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=Ca,Ca=16777216,sr(n,r,l),Ca=u):sr(n,r,l));break;default:sr(n,r,l)}}function ey(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function ka(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];dt=u,ny(u,n)}ey(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)ty(n),n=n.sibling}function ty(n){switch(n.tag){case 0:case 11:case 15:ka(n),n.flags&2048&&Ei(9,n,n.return);break;case 3:ka(n);break;case 12:ka(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,bl(n)):ka(n);break;default:ka(n)}}function bl(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];dt=u,ny(u,n)}ey(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Ei(8,r,r.return),bl(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,bl(r));break;default:bl(r)}n=n.sibling}}function ny(n,r){for(;dt!==null;){var l=dt;switch(l.tag){case 0:case 11:case 15:Ei(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:da(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,dt=u;else e:for(l=n;dt!==null;){u=dt;var g=u.sibling,p=u.return;if(Gm(u),u===l){dt=null;break e}if(g!==null){g.return=p,dt=g;break e}dt=p}}}var Z1={getCacheForType:function(n){var r=pt(Qe),l=r.data.get(n);return l===void 0&&(l=n(),r.data.set(n,l)),l},cacheSignal:function(){return pt(Qe).controller.signal}},Q1=typeof WeakMap=="function"?WeakMap:Map,ke=0,je=null,ye=null,be=0,Me=0,Yt=null,Ai=!1,rr=!1,$d=!1,ei=0,Ge=0,Ci=0,gs=0,Bd=0,Kt=0,ar=0,Na=null,jt=null,Id=!1,vl=0,iy=0,Sl=1/0,wl=null,ki=null,at=0,Ni=null,or=null,ti=0,Pd=0,Ud=null,sy=null,Ma=0,qd=null;function Jt(){return(ke&2)!==0&&be!==0?be&-be:I.T!==null?Kd():vg()}function ry(){if(Kt===0)if((be&536870912)===0||Se){var n=Zt;Zt<<=1,(Zt&3932160)===0&&(Zt=262144),Kt=n}else Kt=536870912;return n=Gt.current,n!==null&&(n.flags|=32),Kt}function Ht(n,r,l){(n===je&&(Me===2||Me===9)||n.cancelPendingCommit!==null)&&(lr(n,0),Mi(n,be,Kt,!1)),Wr(n,l),((ke&2)===0||n!==je)&&(n===je&&((ke&2)===0&&(gs|=l),Ge===4&&Mi(n,be,Kt,!1)),Mn(n))}function ay(n,r,l){if((ke&6)!==0)throw Error(s(327));var u=!l&&(r&127)===0&&(r&n.expiredLanes)===0||Jr(n,r),g=u?nw(n,r):Fd(n,r,!0),p=u;do{if(g===0){rr&&!u&&Mi(n,r,0,!1);break}else{if(l=n.current.alternate,p&&!ew(l)){g=Fd(n,r,!1),p=!1;continue}if(g===2){if(p=r,n.errorRecoveryDisabledLanes&p)var S=0;else S=n.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){r=S;e:{var E=n;g=Na;var k=E.current.memoizedState.isDehydrated;if(k&&(lr(E,S).flags|=256),S=Fd(E,S,!1),S!==2){if($d&&!k){E.errorRecoveryDisabledLanes|=p,gs|=p,g=4;break e}p=jt,jt=g,p!==null&&(jt===null?jt=p:jt.push.apply(jt,p))}g=S}if(p=!1,g!==2)continue}}if(g===1){lr(n,0),Mi(n,r,0,!0);break}e:{switch(u=n,p=g,p){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:Mi(u,r,Kt,!Ai);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(g=vl+300-xt(),10<g)){if(Mi(u,r,Kt,!Ai),Lo(u,0,!0)!==0)break e;ti=r,u.timeoutHandle=zy(oy.bind(null,u,l,jt,wl,Id,r,Kt,gs,ar,Ai,p,"Throttled",-0,0),g);break e}oy(u,l,jt,wl,Id,r,Kt,gs,ar,Ai,p,null,-0,0)}}break}while(!0);Mn(n)}function oy(n,r,l,u,g,p,S,E,k,z,V,K,$,U){if(n.timeoutHandle=-1,K=r.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},Qm(r,p,K);var ie=(p&62914560)===p?vl-xt():(p&4194048)===p?iy-xt():0;if(ie=$w(K,ie),ie!==null){ti=p,n.cancelPendingCommit=ie(py.bind(null,n,r,p,l,u,g,S,E,k,V,K,null,$,U)),Mi(n,p,S,!z);return}}py(n,r,p,l,u,g,S,E,k)}function ew(n){for(var r=n;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var g=l[u],p=g.getSnapshot;g=g.value;try{if(!Vt(p(),g))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Mi(n,r,l,u){r&=~Bd,r&=~gs,n.suspendedLanes|=r,n.pingedLanes&=~r,u&&(n.warmLanes|=r),u=n.expirationTimes;for(var g=r;0<g;){var p=31-Tt(g),S=1<<p;u[p]=-1,g&=~S}l!==0&&yg(n,l,r)}function xl(){return(ke&6)===0?(Da(0),!1):!0}function Vd(){if(ye!==null){if(Me===0)var n=ye.return;else n=ye,Vn=rs=null,ad(n),Zs=null,fa=0,n=ye;for(;n!==null;)$m(n.alternate,n),n=n.return;ye=null}}function lr(n,r){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,vw(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),ti=0,Vd(),je=n,ye=l=Un(n.current,null),be=r,Me=0,Yt=null,Ai=!1,rr=Jr(n,r),$d=!1,ar=Kt=Bd=gs=Ci=Ge=0,jt=Na=null,Id=!1,(r&8)!==0&&(r|=r&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=r;0<u;){var g=31-Tt(u),p=1<<g;r|=n[g],u&=~p}return ei=r,Vo(),l}function ly(n,r){pe=null,I.H=Sa,r===Ws||r===Zo?(r=Tp(),Me=3):r===Yu?(r=Tp(),Me=4):Me=r===wd?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Yt=r,ye===null&&(Ge=1,hl(n,nn(r,n.current)))}function cy(){var n=Gt.current;return n===null?!0:(be&4194048)===be?on===null:(be&62914560)===be||(be&536870912)!==0?n===on:!1}function uy(){var n=I.H;return I.H=Sa,n===null?Sa:n}function dy(){var n=I.A;return I.A=Z1,n}function Tl(){Ge=4,Ai||(be&4194048)!==be&&Gt.current!==null||(rr=!0),(Ci&134217727)===0&&(gs&134217727)===0||je===null||Mi(je,be,Kt,!1)}function Fd(n,r,l){var u=ke;ke|=2;var g=uy(),p=dy();(je!==n||be!==r)&&(wl=null,lr(n,r)),r=!1;var S=Ge;e:do try{if(Me!==0&&ye!==null){var E=ye,k=Yt;switch(Me){case 8:Vd(),S=6;break e;case 3:case 2:case 9:case 6:Gt.current===null&&(r=!0);var z=Me;if(Me=0,Yt=null,cr(n,E,k,z),l&&rr){S=0;break e}break;default:z=Me,Me=0,Yt=null,cr(n,E,k,z)}}tw(),S=Ge;break}catch(V){ly(n,V)}while(!0);return r&&n.shellSuspendCounter++,Vn=rs=null,ke=u,I.H=g,I.A=p,ye===null&&(je=null,be=0,Vo()),S}function tw(){for(;ye!==null;)hy(ye)}function nw(n,r){var l=ke;ke|=2;var u=uy(),g=dy();je!==n||be!==r?(wl=null,Sl=xt()+500,lr(n,r)):rr=Jr(n,r);e:do try{if(Me!==0&&ye!==null){r=ye;var p=Yt;t:switch(Me){case 1:Me=0,Yt=null,cr(n,r,p,1);break;case 2:case 9:if(wp(p)){Me=0,Yt=null,fy(r);break}r=function(){Me!==2&&Me!==9||je!==n||(Me=7),Mn(n)},p.then(r,r);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:wp(p)?(Me=0,Yt=null,fy(r)):(Me=0,Yt=null,cr(n,r,p,7));break;case 5:var S=null;switch(ye.tag){case 26:S=ye.memoizedState;case 5:case 27:var E=ye;if(S?Zy(S):E.stateNode.complete){Me=0,Yt=null;var k=E.sibling;if(k!==null)ye=k;else{var z=E.return;z!==null?(ye=z,El(z)):ye=null}break t}}Me=0,Yt=null,cr(n,r,p,5);break;case 6:Me=0,Yt=null,cr(n,r,p,6);break;case 8:Vd(),Ge=6;break e;default:throw Error(s(462))}}iw();break}catch(V){ly(n,V)}while(!0);return Vn=rs=null,I.H=u,I.A=g,ke=l,ye!==null?0:(je=null,be=0,Vo(),Ge)}function iw(){for(;ye!==null&&!hi();)hy(ye)}function hy(n){var r=Hm(n.alternate,n,ei);n.memoizedProps=n.pendingProps,r===null?El(n):ye=r}function fy(n){var r=n,l=r.alternate;switch(r.tag){case 15:case 0:r=Mm(l,r,r.pendingProps,r.type,void 0,be);break;case 11:r=Mm(l,r,r.pendingProps,r.type.render,r.ref,be);break;case 5:ad(r);default:$m(l,r),r=ye=dp(r,ei),r=Hm(l,r,ei)}n.memoizedProps=n.pendingProps,r===null?El(n):ye=r}function cr(n,r,l,u){Vn=rs=null,ad(r),Zs=null,fa=0;var g=r.return;try{if(F1(n,g,r,l,be)){Ge=1,hl(n,nn(l,n.current)),ye=null;return}}catch(p){if(g!==null)throw ye=g,p;Ge=1,hl(n,nn(l,n.current)),ye=null;return}r.flags&32768?(Se||u===1?n=!0:rr||(be&536870912)!==0?n=!1:(Ai=n=!0,(u===2||u===9||u===3||u===6)&&(u=Gt.current,u!==null&&u.tag===13&&(u.flags|=16384))),gy(r,n)):El(r)}function El(n){var r=n;do{if((r.flags&32768)!==0){gy(r,Ai);return}n=r.return;var l=Y1(r.alternate,r,ei);if(l!==null){ye=l;return}if(r=r.sibling,r!==null){ye=r;return}ye=r=n}while(r!==null);Ge===0&&(Ge=5)}function gy(n,r){do{var l=K1(n.alternate,n);if(l!==null){l.flags&=32767,ye=l;return}if(l=n.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(n=n.sibling,n!==null)){ye=n;return}ye=n=l}while(n!==null);Ge=6,ye=null}function py(n,r,l,u,g,p,S,E,k){n.cancelPendingCommit=null;do Al();while(at!==0);if((ke&6)!==0)throw Error(s(327));if(r!==null){if(r===n.current)throw Error(s(177));if(p=r.lanes|r.childLanes,p|=Ou,HS(n,l,p,S,E,k),n===je&&(ye=je=null,be=0),or=r,Ni=n,ti=l,Pd=p,Ud=g,sy=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,ow(fi,function(){return vy(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=I.T,I.T=null,g=Z.p,Z.p=2,S=ke,ke|=4;try{J1(n,r,l)}finally{ke=S,Z.p=g,I.T=u}}at=1,my(),yy(),_y()}}function my(){if(at===1){at=0;var n=Ni,r=or,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=I.T,I.T=null;var u=Z.p;Z.p=2;var g=ke;ke|=4;try{Jm(r,n);var p=ih,S=np(n.containerInfo),E=p.focusedElem,k=p.selectionRange;if(S!==E&&E&&E.ownerDocument&&tp(E.ownerDocument.documentElement,E)){if(k!==null&&ku(E)){var z=k.start,V=k.end;if(V===void 0&&(V=z),"selectionStart"in E)E.selectionStart=z,E.selectionEnd=Math.min(V,E.value.length);else{var K=E.ownerDocument||document,$=K&&K.defaultView||window;if($.getSelection){var U=$.getSelection(),ie=E.textContent.length,ce=Math.min(k.start,ie),Re=k.end===void 0?ce:Math.min(k.end,ie);!U.extend&&ce>Re&&(S=Re,Re=ce,ce=S);var R=ep(E,ce),M=ep(E,Re);if(R&&M&&(U.rangeCount!==1||U.anchorNode!==R.node||U.anchorOffset!==R.offset||U.focusNode!==M.node||U.focusOffset!==M.offset)){var H=K.createRange();H.setStart(R.node,R.offset),U.removeAllRanges(),ce>Re?(U.addRange(H),U.extend(M.node,M.offset)):(H.setEnd(M.node,M.offset),U.addRange(H))}}}}for(K=[],U=E;U=U.parentNode;)U.nodeType===1&&K.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<K.length;E++){var X=K[E];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}$l=!!nh,ih=nh=null}finally{ke=g,Z.p=u,I.T=l}}n.current=r,at=2}}function yy(){if(at===2){at=0;var n=Ni,r=or,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=I.T,I.T=null;var u=Z.p;Z.p=2;var g=ke;ke|=4;try{Fm(n,r.alternate,r)}finally{ke=g,Z.p=u,I.T=l}}at=3}}function _y(){if(at===4||at===3){at=0,nu();var n=Ni,r=or,l=ti,u=sy;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?at=5:(at=0,or=Ni=null,by(n,n.pendingLanes));var g=n.pendingLanes;if(g===0&&(ki=null),cu(l),r=r.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot($n,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=I.T,g=Z.p,Z.p=2,I.T=null;try{for(var p=n.onRecoverableError,S=0;S<u.length;S++){var E=u[S];p(E.value,{componentStack:E.stack})}}finally{I.T=r,Z.p=g}}(ti&3)!==0&&Al(),Mn(n),g=n.pendingLanes,(l&261930)!==0&&(g&42)!==0?n===qd?Ma++:(Ma=0,qd=n):Ma=0,Da(0)}}function by(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,da(r)))}function Al(){return my(),yy(),_y(),vy()}function vy(){if(at!==5)return!1;var n=Ni,r=Pd;Pd=0;var l=cu(ti),u=I.T,g=Z.p;try{Z.p=32>l?32:l,I.T=null,l=Ud,Ud=null;var p=Ni,S=ti;if(at=0,or=Ni=null,ti=0,(ke&6)!==0)throw Error(s(331));var E=ke;if(ke|=4,ty(p.current),Zm(p,p.current,S,l),ke=E,Da(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot($n,p)}catch{}return!0}finally{Z.p=g,I.T=u,by(n,r)}}function Sy(n,r,l){r=nn(l,r),r=Sd(n.stateNode,r,2),n=wi(n,r,2),n!==null&&(Wr(n,2),Mn(n))}function De(n,r,l){if(n.tag===3)Sy(n,n,l);else for(;r!==null;){if(r.tag===3){Sy(r,n,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ki===null||!ki.has(u))){n=nn(l,n),l=wm(2),u=wi(r,l,2),u!==null&&(xm(l,u,r,n),Wr(u,2),Mn(u));break}}r=r.return}}function Gd(n,r,l){var u=n.pingCache;if(u===null){u=n.pingCache=new Q1;var g=new Set;u.set(r,g)}else g=u.get(r),g===void 0&&(g=new Set,u.set(r,g));g.has(l)||($d=!0,g.add(l),n=sw.bind(null,n,r,l),r.then(n,n))}function sw(n,r,l){var u=n.pingCache;u!==null&&u.delete(r),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,je===n&&(be&l)===l&&(Ge===4||Ge===3&&(be&62914560)===be&&300>xt()-vl?(ke&2)===0&&lr(n,0):Bd|=l,ar===be&&(ar=0)),Mn(n)}function wy(n,r){r===0&&(r=mg()),n=ns(n,r),n!==null&&(Wr(n,r),Mn(n))}function rw(n){var r=n.memoizedState,l=0;r!==null&&(l=r.retryLane),wy(n,l)}function aw(n,r){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,g=n.memoizedState;g!==null&&(l=g.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(s(314))}u!==null&&u.delete(r),wy(n,l)}function ow(n,r){return di(n,r)}var Cl=null,ur=null,Xd=!1,kl=!1,Yd=!1,Di=0;function Mn(n){n!==ur&&n.next===null&&(ur===null?Cl=ur=n:ur=ur.next=n),kl=!0,Xd||(Xd=!0,cw())}function Da(n,r){if(!Yd&&kl){Yd=!0;do for(var l=!1,u=Cl;u!==null;){if(n!==0){var g=u.pendingLanes;if(g===0)var p=0;else{var S=u.suspendedLanes,E=u.pingedLanes;p=(1<<31-Tt(42|n)+1)-1,p&=g&~(S&~E),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(l=!0,Ay(u,p))}else p=be,p=Lo(u,u===je?p:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(p&3)===0||Jr(u,p)||(l=!0,Ay(u,p));u=u.next}while(l);Yd=!1}}function lw(){xy()}function xy(){kl=Xd=!1;var n=0;Di!==0&&bw()&&(n=Di);for(var r=xt(),l=null,u=Cl;u!==null;){var g=u.next,p=Ty(u,r);p===0?(u.next=null,l===null?Cl=g:l.next=g,g===null&&(ur=l)):(l=u,(n!==0||(p&3)!==0)&&(kl=!0)),u=g}at!==0&&at!==5||Da(n),Di!==0&&(Di=0)}function Ty(n,r){for(var l=n.suspendedLanes,u=n.pingedLanes,g=n.expirationTimes,p=n.pendingLanes&-62914561;0<p;){var S=31-Tt(p),E=1<<S,k=g[S];k===-1?((E&l)===0||(E&u)!==0)&&(g[S]=jS(E,r)):k<=r&&(n.expiredLanes|=E),p&=~E}if(r=je,l=be,l=Lo(n,n===r?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,l===0||n===r&&(Me===2||Me===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&Yr(u),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||Jr(n,l)){if(r=l&-l,r===n.callbackPriority)return r;switch(u!==null&&Yr(u),cu(l)){case 2:case 8:l=Kr;break;case 32:l=fi;break;case 268435456:l=No;break;default:l=fi}return u=Ey.bind(null,n),l=di(l,u),n.callbackPriority=r,n.callbackNode=l,r}return u!==null&&u!==null&&Yr(u),n.callbackPriority=2,n.callbackNode=null,2}function Ey(n,r){if(at!==0&&at!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(Al()&&n.callbackNode!==l)return null;var u=be;return u=Lo(n,n===je?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(ay(n,u,r),Ty(n,xt()),n.callbackNode!=null&&n.callbackNode===l?Ey.bind(null,n):null)}function Ay(n,r){if(Al())return null;ay(n,r,!0)}function cw(){Sw(function(){(ke&6)!==0?di(ko,lw):xy()})}function Kd(){if(Di===0){var n=Ks;n===0&&(n=An,An<<=1,(An&261888)===0&&(An=256)),Di=n}return Di}function Cy(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Ho(""+n)}function ky(n,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,n.id&&l.setAttribute("form",n.id),r.parentNode.insertBefore(l,r),n=new FormData(n),l.parentNode.removeChild(l),n}function uw(n,r,l,u,g){if(r==="submit"&&l&&l.stateNode===g){var p=Cy((g[Mt]||null).action),S=u.submitter;S&&(r=(r=S[Mt]||null)?Cy(r.formAction):S.getAttribute("formAction"),r!==null&&(p=r,S=null));var E=new Io("action","action",null,u,g);n.push({event:E,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Di!==0){var k=S?ky(g,S):new FormData(g);pd(l,{pending:!0,data:k,method:g.method,action:p},null,k)}}else typeof p=="function"&&(E.preventDefault(),k=S?ky(g,S):new FormData(g),pd(l,{pending:!0,data:k,method:g.method,action:p},p,k))},currentTarget:g}]})}}for(var Jd=0;Jd<Lu.length;Jd++){var Wd=Lu[Jd],dw=Wd.toLowerCase(),hw=Wd[0].toUpperCase()+Wd.slice(1);yn(dw,"on"+hw)}yn(rp,"onAnimationEnd"),yn(ap,"onAnimationIteration"),yn(op,"onAnimationStart"),yn("dblclick","onDoubleClick"),yn("focusin","onFocus"),yn("focusout","onBlur"),yn(k1,"onTransitionRun"),yn(N1,"onTransitionStart"),yn(M1,"onTransitionCancel"),yn(lp,"onTransitionEnd"),js("onMouseEnter",["mouseout","mouseover"]),js("onMouseLeave",["mouseout","mouseover"]),js("onPointerEnter",["pointerout","pointerover"]),js("onPointerLeave",["pointerout","pointerover"]),Zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var La="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(" "),fw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(La));function Ny(n,r){r=(r&4)!==0;for(var l=0;l<n.length;l++){var u=n[l],g=u.event;u=u.listeners;e:{var p=void 0;if(r)for(var S=u.length-1;0<=S;S--){var E=u[S],k=E.instance,z=E.currentTarget;if(E=E.listener,k!==p&&g.isPropagationStopped())break e;p=E,g.currentTarget=z;try{p(g)}catch(V){qo(V)}g.currentTarget=null,p=k}else for(S=0;S<u.length;S++){if(E=u[S],k=E.instance,z=E.currentTarget,E=E.listener,k!==p&&g.isPropagationStopped())break e;p=E,g.currentTarget=z;try{p(g)}catch(V){qo(V)}g.currentTarget=null,p=k}}}}function _e(n,r){var l=r[uu];l===void 0&&(l=r[uu]=new Set);var u=n+"__bubble";l.has(u)||(My(r,n,2,!1),l.add(u))}function Zd(n,r,l){var u=0;r&&(u|=4),My(l,n,u,r)}var Nl="_reactListening"+Math.random().toString(36).slice(2);function Qd(n){if(!n[Nl]){n[Nl]=!0,xg.forEach(function(l){l!=="selectionchange"&&(fw.has(l)||Zd(l,!1,n),Zd(l,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Nl]||(r[Nl]=!0,Zd("selectionchange",!1,r))}}function My(n,r,l,u){switch(r_(r)){case 2:var g=Pw;break;case 8:g=Uw;break;default:g=gh}l=g.bind(null,r,l,n),g=void 0,!bu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(g=!0),u?g!==void 0?n.addEventListener(r,l,{capture:!0,passive:g}):n.addEventListener(r,l,!0):g!==void 0?n.addEventListener(r,l,{passive:g}):n.addEventListener(r,l,!1)}function eh(n,r,l,u,g){var p=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var S=u.tag;if(S===3||S===4){var E=u.stateNode.containerInfo;if(E===g)break;if(S===4)for(S=u.return;S!==null;){var k=S.tag;if((k===3||k===4)&&S.stateNode.containerInfo===g)return;S=S.return}for(;E!==null;){if(S=Ls(E),S===null)return;if(k=S.tag,k===5||k===6||k===26||k===27){u=p=S;continue e}E=E.parentNode}}u=u.return}jg(function(){var z=p,V=yu(l),K=[];e:{var $=cp.get(n);if($!==void 0){var U=Io,ie=n;switch(n){case"keypress":if($o(l)===0)break e;case"keydown":case"keyup":U=a1;break;case"focusin":ie="focus",U=xu;break;case"focusout":ie="blur",U=xu;break;case"beforeblur":case"afterblur":U=xu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U=$g;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=YS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=c1;break;case rp:case ap:case op:U=WS;break;case lp:U=d1;break;case"scroll":case"scrollend":U=GS;break;case"wheel":U=f1;break;case"copy":case"cut":case"paste":U=QS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=Ig;break;case"toggle":case"beforetoggle":U=p1}var ce=(r&4)!==0,Re=!ce&&(n==="scroll"||n==="scrollend"),R=ce?$!==null?$+"Capture":null:$;ce=[];for(var M=z,H;M!==null;){var X=M;if(H=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||H===null||R===null||(X=ea(M,R),X!=null&&ce.push(Oa(M,X,H))),Re)break;M=M.return}0<ce.length&&($=new U($,ie,null,l,V),K.push({event:$,listeners:ce}))}}if((r&7)===0){e:{if($=n==="mouseover"||n==="pointerover",U=n==="mouseout"||n==="pointerout",$&&l!==mu&&(ie=l.relatedTarget||l.fromElement)&&(Ls(ie)||ie[Ds]))break e;if((U||$)&&($=V.window===V?V:($=V.ownerDocument)?$.defaultView||$.parentWindow:window,U?(ie=l.relatedTarget||l.toElement,U=z,ie=ie?Ls(ie):null,ie!==null&&(Re=o(ie),ce=ie.tag,ie!==Re||ce!==5&&ce!==27&&ce!==6)&&(ie=null)):(U=null,ie=z),U!==ie)){if(ce=$g,X="onMouseLeave",R="onMouseEnter",M="mouse",(n==="pointerout"||n==="pointerover")&&(ce=Ig,X="onPointerLeave",R="onPointerEnter",M="pointer"),Re=U==null?$:Qr(U),H=ie==null?$:Qr(ie),$=new ce(X,M+"leave",U,l,V),$.target=Re,$.relatedTarget=H,X=null,Ls(V)===z&&(ce=new ce(R,M+"enter",ie,l,V),ce.target=H,ce.relatedTarget=Re,X=ce),Re=X,U&&ie)t:{for(ce=gw,R=U,M=ie,H=0,X=R;X;X=ce(X))H++;X=0;for(var le=M;le;le=ce(le))X++;for(;0<H-X;)R=ce(R),H--;for(;0<X-H;)M=ce(M),X--;for(;H--;){if(R===M||M!==null&&R===M.alternate){ce=R;break t}R=ce(R),M=ce(M)}ce=null}else ce=null;U!==null&&Dy(K,$,U,ce,!1),ie!==null&&Re!==null&&Dy(K,Re,ie,ce,!0)}}e:{if($=z?Qr(z):window,U=$.nodeName&&$.nodeName.toLowerCase(),U==="select"||U==="input"&&$.type==="file")var Ae=Yg;else if(Gg($))if(Kg)Ae=E1;else{Ae=x1;var re=w1}else U=$.nodeName,!U||U.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?z&&pu(z.elementType)&&(Ae=Yg):Ae=T1;if(Ae&&(Ae=Ae(n,z))){Xg(K,Ae,l,V);break e}re&&re(n,$,z),n==="focusout"&&z&&$.type==="number"&&z.memoizedProps.value!=null&&gu($,"number",$.value)}switch(re=z?Qr(z):window,n){case"focusin":(Gg(re)||re.contentEditable==="true")&&(Ps=re,Nu=z,la=null);break;case"focusout":la=Nu=Ps=null;break;case"mousedown":Mu=!0;break;case"contextmenu":case"mouseup":case"dragend":Mu=!1,ip(K,l,V);break;case"selectionchange":if(C1)break;case"keydown":case"keyup":ip(K,l,V)}var me;if(Eu)e:{switch(n){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else Is?Vg(n,l)&&(ve="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(ve="onCompositionStart");ve&&(Pg&&l.locale!=="ko"&&(Is||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&Is&&(me=Hg()):(pi=V,vu="value"in pi?pi.value:pi.textContent,Is=!0)),re=Ml(z,ve),0<re.length&&(ve=new Bg(ve,n,null,l,V),K.push({event:ve,listeners:re}),me?ve.data=me:(me=Fg(l),me!==null&&(ve.data=me)))),(me=y1?_1(n,l):b1(n,l))&&(ve=Ml(z,"onBeforeInput"),0<ve.length&&(re=new Bg("onBeforeInput","beforeinput",null,l,V),K.push({event:re,listeners:ve}),re.data=me)),uw(K,n,z,l,V)}Ny(K,r)})}function Oa(n,r,l){return{instance:n,listener:r,currentTarget:l}}function Ml(n,r){for(var l=r+"Capture",u=[];n!==null;){var g=n,p=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||p===null||(g=ea(n,l),g!=null&&u.unshift(Oa(n,g,p)),g=ea(n,r),g!=null&&u.push(Oa(n,g,p))),n.tag===3)return u;n=n.return}return[]}function gw(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Dy(n,r,l,u,g){for(var p=r._reactName,S=[];l!==null&&l!==u;){var E=l,k=E.alternate,z=E.stateNode;if(E=E.tag,k!==null&&k===u)break;E!==5&&E!==26&&E!==27||z===null||(k=z,g?(z=ea(l,p),z!=null&&S.unshift(Oa(l,z,k))):g||(z=ea(l,p),z!=null&&S.push(Oa(l,z,k)))),l=l.return}S.length!==0&&n.push({event:r,listeners:S})}var pw=/\r\n?/g,mw=/\u0000|\uFFFD/g;function Ly(n){return(typeof n=="string"?n:""+n).replace(pw,`
|
|
50
|
-
`).replace(mw,"")}function Oy(n,r){return r=Ly(r),Ly(n)===r}function Oe(n,r,l,u,g,p){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||zs(n,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&zs(n,""+u);break;case"className":Ro(n,"class",u);break;case"tabIndex":Ro(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Ro(n,l,u);break;case"style":Og(n,u,p);break;case"data":if(r!=="object"){Ro(n,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){n.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=Ho(""+u),n.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(l==="formAction"?(r!=="input"&&Oe(n,r,"name",g.name,g,null),Oe(n,r,"formEncType",g.formEncType,g,null),Oe(n,r,"formMethod",g.formMethod,g,null),Oe(n,r,"formTarget",g.formTarget,g,null)):(Oe(n,r,"encType",g.encType,g,null),Oe(n,r,"method",g.method,g,null),Oe(n,r,"target",g.target,g,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=Ho(""+u),n.setAttribute(l,u);break;case"onClick":u!=null&&(n.onclick=In);break;case"onScroll":u!=null&&_e("scroll",n);break;case"onScrollEnd":u!=null&&_e("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(s(61));if(l=u.__html,l!=null){if(g.children!=null)throw Error(s(60));n.innerHTML=l}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}l=Ho(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""+u):n.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""):n.removeAttribute(l);break;case"capture":case"download":u===!0?n.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,u):n.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(l,u):n.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(l):n.setAttribute(l,u);break;case"popover":_e("beforetoggle",n),_e("toggle",n),Oo(n,"popover",u);break;case"xlinkActuate":Bn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Bn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Bn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Bn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Bn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Bn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Bn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Bn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Bn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Oo(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=VS.get(l)||l,Oo(n,l,u))}}function th(n,r,l,u,g,p){switch(l){case"style":Og(n,u,p);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(s(61));if(l=u.__html,l!=null){if(g.children!=null)throw Error(s(60));n.innerHTML=l}}break;case"children":typeof u=="string"?zs(n,u):(typeof u=="number"||typeof u=="bigint")&&zs(n,""+u);break;case"onScroll":u!=null&&_e("scroll",n);break;case"onScrollEnd":u!=null&&_e("scrollend",n);break;case"onClick":u!=null&&(n.onclick=In);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Tg.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(g=l.endsWith("Capture"),r=l.slice(2,g?l.length-7:void 0),p=n[Mt]||null,p=p!=null?p[l]:null,typeof p=="function"&&n.removeEventListener(r,p,g),typeof u=="function")){typeof p!="function"&&p!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(r,u,g);break e}l in n?n[l]=u:u===!0?n.setAttribute(l,""):Oo(n,l,u)}}}function yt(n,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",n),_e("load",n);var u=!1,g=!1,p;for(p in l)if(l.hasOwnProperty(p)){var S=l[p];if(S!=null)switch(p){case"src":u=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Oe(n,r,p,S,l,null)}}g&&Oe(n,r,"srcSet",l.srcSet,l,null),u&&Oe(n,r,"src",l.src,l,null);return;case"input":_e("invalid",n);var E=p=S=g=null,k=null,z=null;for(u in l)if(l.hasOwnProperty(u)){var V=l[u];if(V!=null)switch(u){case"name":g=V;break;case"type":S=V;break;case"checked":k=V;break;case"defaultChecked":z=V;break;case"value":p=V;break;case"defaultValue":E=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(s(137,r));break;default:Oe(n,r,u,V,l,null)}}Ng(n,p,E,k,z,S,g,!1);return;case"select":_e("invalid",n),u=S=p=null;for(g in l)if(l.hasOwnProperty(g)&&(E=l[g],E!=null))switch(g){case"value":p=E;break;case"defaultValue":S=E;break;case"multiple":u=E;default:Oe(n,r,g,E,l,null)}r=p,l=S,n.multiple=!!u,r!=null?Hs(n,!!u,r,!1):l!=null&&Hs(n,!!u,l,!0);return;case"textarea":_e("invalid",n),p=g=u=null;for(S in l)if(l.hasOwnProperty(S)&&(E=l[S],E!=null))switch(S){case"value":u=E;break;case"defaultValue":g=E;break;case"children":p=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(s(91));break;default:Oe(n,r,S,E,l,null)}Dg(n,u,g,p);return;case"option":for(k in l)if(l.hasOwnProperty(k)&&(u=l[k],u!=null))switch(k){case"selected":n.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Oe(n,r,k,u,l,null)}return;case"dialog":_e("beforetoggle",n),_e("toggle",n),_e("cancel",n),_e("close",n);break;case"iframe":case"object":_e("load",n);break;case"video":case"audio":for(u=0;u<La.length;u++)_e(La[u],n);break;case"image":_e("error",n),_e("load",n);break;case"details":_e("toggle",n);break;case"embed":case"source":case"link":_e("error",n),_e("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(z in l)if(l.hasOwnProperty(z)&&(u=l[z],u!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Oe(n,r,z,u,l,null)}return;default:if(pu(r)){for(V in l)l.hasOwnProperty(V)&&(u=l[V],u!==void 0&&th(n,r,V,u,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(u=l[E],u!=null&&Oe(n,r,E,u,l,null))}function yw(n,r,l,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,p=null,S=null,E=null,k=null,z=null,V=null;for(U in l){var K=l[U];if(l.hasOwnProperty(U)&&K!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":k=K;default:u.hasOwnProperty(U)||Oe(n,r,U,null,u,K)}}for(var $ in u){var U=u[$];if(K=l[$],u.hasOwnProperty($)&&(U!=null||K!=null))switch($){case"type":p=U;break;case"name":g=U;break;case"checked":z=U;break;case"defaultChecked":V=U;break;case"value":S=U;break;case"defaultValue":E=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,r));break;default:U!==K&&Oe(n,r,$,U,u,K)}}fu(n,S,E,k,z,V,p,g);return;case"select":U=S=E=$=null;for(p in l)if(k=l[p],l.hasOwnProperty(p)&&k!=null)switch(p){case"value":break;case"multiple":U=k;default:u.hasOwnProperty(p)||Oe(n,r,p,null,u,k)}for(g in u)if(p=u[g],k=l[g],u.hasOwnProperty(g)&&(p!=null||k!=null))switch(g){case"value":$=p;break;case"defaultValue":E=p;break;case"multiple":S=p;default:p!==k&&Oe(n,r,g,p,u,k)}r=E,l=S,u=U,$!=null?Hs(n,!!l,$,!1):!!u!=!!l&&(r!=null?Hs(n,!!l,r,!0):Hs(n,!!l,l?[]:"",!1));return;case"textarea":U=$=null;for(E in l)if(g=l[E],l.hasOwnProperty(E)&&g!=null&&!u.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Oe(n,r,E,null,u,g)}for(S in u)if(g=u[S],p=l[S],u.hasOwnProperty(S)&&(g!=null||p!=null))switch(S){case"value":$=g;break;case"defaultValue":U=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(s(91));break;default:g!==p&&Oe(n,r,S,g,u,p)}Mg(n,$,U);return;case"option":for(var ie in l)if($=l[ie],l.hasOwnProperty(ie)&&$!=null&&!u.hasOwnProperty(ie))switch(ie){case"selected":n.selected=!1;break;default:Oe(n,r,ie,null,u,$)}for(k in u)if($=u[k],U=l[k],u.hasOwnProperty(k)&&$!==U&&($!=null||U!=null))switch(k){case"selected":n.selected=$&&typeof $!="function"&&typeof $!="symbol";break;default:Oe(n,r,k,$,u,U)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ce in l)$=l[ce],l.hasOwnProperty(ce)&&$!=null&&!u.hasOwnProperty(ce)&&Oe(n,r,ce,null,u,$);for(z in u)if($=u[z],U=l[z],u.hasOwnProperty(z)&&$!==U&&($!=null||U!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(s(137,r));break;default:Oe(n,r,z,$,u,U)}return;default:if(pu(r)){for(var Re in l)$=l[Re],l.hasOwnProperty(Re)&&$!==void 0&&!u.hasOwnProperty(Re)&&th(n,r,Re,void 0,u,$);for(V in u)$=u[V],U=l[V],!u.hasOwnProperty(V)||$===U||$===void 0&&U===void 0||th(n,r,V,$,u,U);return}}for(var R in l)$=l[R],l.hasOwnProperty(R)&&$!=null&&!u.hasOwnProperty(R)&&Oe(n,r,R,null,u,$);for(K in u)$=u[K],U=l[K],!u.hasOwnProperty(K)||$===U||$==null&&U==null||Oe(n,r,K,$,u,U)}function Ry(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _w(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var g=l[u],p=g.transferSize,S=g.initiatorType,E=g.duration;if(p&&E&&Ry(S)){for(S=0,E=g.responseEnd,u+=1;u<l.length;u++){var k=l[u],z=k.startTime;if(z>E)break;var V=k.transferSize,K=k.initiatorType;V&&Ry(K)&&(k=k.responseEnd,S+=V*(k<E?1:(E-z)/(k-z)))}if(--u,r+=8*(p+S)/(g.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var nh=null,ih=null;function Dl(n){return n.nodeType===9?n:n.ownerDocument}function jy(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Hy(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function sh(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var rh=null;function bw(){var n=window.event;return n&&n.type==="popstate"?n===rh?!1:(rh=n,!0):(rh=null,!1)}var zy=typeof setTimeout=="function"?setTimeout:void 0,vw=typeof clearTimeout=="function"?clearTimeout:void 0,$y=typeof Promise=="function"?Promise:void 0,Sw=typeof queueMicrotask=="function"?queueMicrotask:typeof $y<"u"?function(n){return $y.resolve(null).then(n).catch(ww)}:zy;function ww(n){setTimeout(function(){throw n})}function Li(n){return n==="head"}function By(n,r){var l=r,u=0;do{var g=l.nextSibling;if(n.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"||l==="/&"){if(u===0){n.removeChild(g),gr(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")Ra(n.ownerDocument.documentElement);else if(l==="head"){l=n.ownerDocument.head,Ra(l);for(var p=l.firstChild;p;){var S=p.nextSibling,E=p.nodeName;p[Zr]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&p.rel.toLowerCase()==="stylesheet"||l.removeChild(p),p=S}}else l==="body"&&Ra(n.ownerDocument.body);l=g}while(l);gr(r)}function Iy(n,r){var l=n;n=0;do{var u=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(n===0)break;n--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||n++;l=u}while(l)}function ah(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":ah(l),du(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function xw(n,r,l,u){for(;n.nodeType===1;){var g=l;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[Zr])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(p=n.getAttribute("rel"),p==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(p!==g.rel||n.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||n.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||n.getAttribute("title")!==(g.title==null?null:g.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(p=n.getAttribute("src"),(p!==(g.src==null?null:g.src)||n.getAttribute("type")!==(g.type==null?null:g.type)||n.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&p&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var p=g.name==null?null:""+g.name;if(g.type==="hidden"&&n.getAttribute("name")===p)return n}else return n;if(n=ln(n.nextSibling),n===null)break}return null}function Tw(n,r,l){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=ln(n.nextSibling),n===null))return null;return n}function Py(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=ln(n.nextSibling),n===null))return null;return n}function oh(n){return n.data==="$?"||n.data==="$~"}function lh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function Ew(n,r){var l=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||l.readyState!=="loading")r();else{var u=function(){r(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function ln(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var ch=null;function Uy(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="/$"||l==="/&"){if(r===0)return ln(n.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}n=n.nextSibling}return null}function qy(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return n;r--}else l!=="/$"&&l!=="/&"||r++}n=n.previousSibling}return null}function Vy(n,r,l){switch(r=Dl(l),n){case"html":if(n=r.documentElement,!n)throw Error(s(452));return n;case"head":if(n=r.head,!n)throw Error(s(453));return n;case"body":if(n=r.body,!n)throw Error(s(454));return n;default:throw Error(s(451))}}function Ra(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);du(n)}var cn=new Map,Fy=new Set;function Ll(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ni=Z.d;Z.d={f:Aw,r:Cw,D:kw,C:Nw,L:Mw,m:Dw,X:Ow,S:Lw,M:Rw};function Aw(){var n=ni.f(),r=xl();return n||r}function Cw(n){var r=Os(n);r!==null&&r.tag===5&&r.type==="form"?lm(r):ni.r(n)}var dr=typeof document>"u"?null:document;function Gy(n,r,l){var u=dr;if(u&&typeof r=="string"&&r){var g=en(r);g='link[rel="'+n+'"][href="'+g+'"]',typeof l=="string"&&(g+='[crossorigin="'+l+'"]'),Fy.has(g)||(Fy.add(g),n={rel:n,crossOrigin:l,href:r},u.querySelector(g)===null&&(r=u.createElement("link"),yt(r,"link",n),ut(r),u.head.appendChild(r)))}}function kw(n){ni.D(n),Gy("dns-prefetch",n,null)}function Nw(n,r){ni.C(n,r),Gy("preconnect",n,r)}function Mw(n,r,l){ni.L(n,r,l);var u=dr;if(u&&n&&r){var g='link[rel="preload"][as="'+en(r)+'"]';r==="image"&&l&&l.imageSrcSet?(g+='[imagesrcset="'+en(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(g+='[imagesizes="'+en(l.imageSizes)+'"]')):g+='[href="'+en(n)+'"]';var p=g;switch(r){case"style":p=hr(n);break;case"script":p=fr(n)}cn.has(p)||(n=m({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:n,as:r},l),cn.set(p,n),u.querySelector(g)!==null||r==="style"&&u.querySelector(ja(p))||r==="script"&&u.querySelector(Ha(p))||(r=u.createElement("link"),yt(r,"link",n),ut(r),u.head.appendChild(r)))}}function Dw(n,r){ni.m(n,r);var l=dr;if(l&&n){var u=r&&typeof r.as=="string"?r.as:"script",g='link[rel="modulepreload"][as="'+en(u)+'"][href="'+en(n)+'"]',p=g;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=fr(n)}if(!cn.has(p)&&(n=m({rel:"modulepreload",href:n},r),cn.set(p,n),l.querySelector(g)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ha(p)))return}u=l.createElement("link"),yt(u,"link",n),ut(u),l.head.appendChild(u)}}}function Lw(n,r,l){ni.S(n,r,l);var u=dr;if(u&&n){var g=Rs(u).hoistableStyles,p=hr(n);r=r||"default";var S=g.get(p);if(!S){var E={loading:0,preload:null};if(S=u.querySelector(ja(p)))E.loading=5;else{n=m({rel:"stylesheet",href:n,"data-precedence":r},l),(l=cn.get(p))&&uh(n,l);var k=S=u.createElement("link");ut(k),yt(k,"link",n),k._p=new Promise(function(z,V){k.onload=z,k.onerror=V}),k.addEventListener("load",function(){E.loading|=1}),k.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Ol(S,r,u)}S={type:"stylesheet",instance:S,count:1,state:E},g.set(p,S)}}}function Ow(n,r){ni.X(n,r);var l=dr;if(l&&n){var u=Rs(l).hoistableScripts,g=fr(n),p=u.get(g);p||(p=l.querySelector(Ha(g)),p||(n=m({src:n,async:!0},r),(r=cn.get(g))&&dh(n,r),p=l.createElement("script"),ut(p),yt(p,"link",n),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},u.set(g,p))}}function Rw(n,r){ni.M(n,r);var l=dr;if(l&&n){var u=Rs(l).hoistableScripts,g=fr(n),p=u.get(g);p||(p=l.querySelector(Ha(g)),p||(n=m({src:n,async:!0,type:"module"},r),(r=cn.get(g))&&dh(n,r),p=l.createElement("script"),ut(p),yt(p,"link",n),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},u.set(g,p))}}function Xy(n,r,l,u){var g=(g=oe.current)?Ll(g):null;if(!g)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=hr(l.href),l=Rs(g).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=hr(l.href);var p=Rs(g).hoistableStyles,S=p.get(n);if(S||(g=g.ownerDocument||g,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(n,S),(p=g.querySelector(ja(n)))&&!p._p&&(S.instance=p,S.state.loading=5),cn.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},cn.set(n,l),p||jw(g,n,l,S.state))),r&&u===null)throw Error(s(528,""));return S}if(r&&u!==null)throw Error(s(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=fr(l),l=Rs(g).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function hr(n){return'href="'+en(n)+'"'}function ja(n){return'link[rel="stylesheet"]['+n+"]"}function Yy(n){return m({},n,{"data-precedence":n.precedence,precedence:null})}function jw(n,r,l,u){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=n.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),yt(r,"link",l),ut(r),n.head.appendChild(r))}function fr(n){return'[src="'+en(n)+'"]'}function Ha(n){return"script[async]"+n}function Ky(n,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=n.querySelector('style[data-href~="'+en(l.href)+'"]');if(u)return r.instance=u,ut(u),u;var g=m({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),ut(u),yt(u,"style",g),Ol(u,l.precedence,n),r.instance=u;case"stylesheet":g=hr(l.href);var p=n.querySelector(ja(g));if(p)return r.state.loading|=4,r.instance=p,ut(p),p;u=Yy(l),(g=cn.get(g))&&uh(u,g),p=(n.ownerDocument||n).createElement("link"),ut(p);var S=p;return S._p=new Promise(function(E,k){S.onload=E,S.onerror=k}),yt(p,"link",u),r.state.loading|=4,Ol(p,l.precedence,n),r.instance=p;case"script":return p=fr(l.src),(g=n.querySelector(Ha(p)))?(r.instance=g,ut(g),g):(u=l,(g=cn.get(p))&&(u=m({},l),dh(u,g)),n=n.ownerDocument||n,g=n.createElement("script"),ut(g),yt(g,"link",u),n.head.appendChild(g),r.instance=g);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Ol(u,l.precedence,n));return r.instance}function Ol(n,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=u.length?u[u.length-1]:null,p=g,S=0;S<u.length;S++){var E=u[S];if(E.dataset.precedence===r)p=E;else if(p!==g)break}p?p.parentNode.insertBefore(n,p.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(n,r.firstChild))}function uh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function dh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Rl=null;function Jy(n,r,l){if(Rl===null){var u=new Map,g=Rl=new Map;g.set(l,u)}else g=Rl,u=g.get(l),u||(u=new Map,g.set(l,u));if(u.has(n))return u;for(u.set(n,null),l=l.getElementsByTagName(n),g=0;g<l.length;g++){var p=l[g];if(!(p[Zr]||p[ft]||n==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var S=p.getAttribute(r)||"";S=n+S;var E=u.get(S);E?E.push(p):u.set(S,[p])}}return u}function Wy(n,r,l){n=n.ownerDocument||n,n.head.insertBefore(l,r==="title"?n.querySelector("head > title"):null)}function Hw(n,r,l){if(l===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return n=r.disabled,typeof r.precedence=="string"&&n==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Zy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function zw(n,r,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var g=hr(u.href),p=r.querySelector(ja(g));if(p){r=p._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=jl.bind(n),r.then(n,n)),l.state.loading|=4,l.instance=p,ut(p);return}p=r.ownerDocument||r,u=Yy(u),(g=cn.get(g))&&uh(u,g),p=p.createElement("link"),ut(p);var S=p;S._p=new Promise(function(E,k){S.onload=E,S.onerror=k}),yt(p,"link",u),l.instance=p}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=jl.bind(n),r.addEventListener("load",l),r.addEventListener("error",l))}}var hh=0;function $w(n,r){return n.stylesheets&&n.count===0&&zl(n,n.stylesheets),0<n.count||0<n.imgCount?function(l){var u=setTimeout(function(){if(n.stylesheets&&zl(n,n.stylesheets),n.unsuspend){var p=n.unsuspend;n.unsuspend=null,p()}},6e4+r);0<n.imgBytes&&hh===0&&(hh=62500*_w());var g=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&zl(n,n.stylesheets),n.unsuspend)){var p=n.unsuspend;n.unsuspend=null,p()}},(n.imgBytes>hh?50:800)+r);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(g)}}:null}function jl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zl(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Hl=null;function zl(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Hl=new Map,r.forEach(Bw,n),Hl=null,jl.call(n))}function Bw(n,r){if(!(r.state.loading&4)){var l=Hl.get(n);if(l)var u=l.get(null);else{l=new Map,Hl.set(n,l);for(var g=n.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<g.length;p++){var S=g[p];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(l.set(S.dataset.precedence,S),u=S)}u&&l.set(null,u)}g=r.instance,S=g.getAttribute("data-precedence"),p=l.get(S)||u,p===u&&l.set(null,g),l.set(S,g),this.count++,u=jl.bind(this),g.addEventListener("load",u),g.addEventListener("error",u),p?p.parentNode.insertBefore(g,p.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(g,n.firstChild)),r.state.loading|=4}}var za={$$typeof:L,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function Iw(n,r,l,u,g,p,S,E,k){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ou(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ou(0),this.hiddenUpdates=ou(null),this.identifierPrefix=u,this.onUncaughtError=g,this.onCaughtError=p,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function Qy(n,r,l,u,g,p,S,E,k,z,V,K){return n=new Iw(n,r,l,S,k,z,V,K,E),r=1,p===!0&&(r|=24),p=Ft(3,null,null,r),n.current=p,p.stateNode=n,r=Fu(),r.refCount++,n.pooledCache=r,r.refCount++,p.memoizedState={element:u,isDehydrated:l,cache:r},Ku(p),n}function e_(n){return n?(n=Vs,n):Vs}function t_(n,r,l,u,g,p){g=e_(g),u.context===null?u.context=g:u.pendingContext=g,u=Si(r),u.payload={element:l},p=p===void 0?null:p,p!==null&&(u.callback=p),l=wi(n,u,r),l!==null&&(Ht(l,n,r),pa(l,n,r))}function n_(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<r?l:r}}function fh(n,r){n_(n,r),(n=n.alternate)&&n_(n,r)}function i_(n){if(n.tag===13||n.tag===31){var r=ns(n,67108864);r!==null&&Ht(r,n,67108864),fh(n,67108864)}}function s_(n){if(n.tag===13||n.tag===31){var r=Jt();r=lu(r);var l=ns(n,r);l!==null&&Ht(l,n,r),fh(n,r)}}var $l=!0;function Pw(n,r,l,u){var g=I.T;I.T=null;var p=Z.p;try{Z.p=2,gh(n,r,l,u)}finally{Z.p=p,I.T=g}}function Uw(n,r,l,u){var g=I.T;I.T=null;var p=Z.p;try{Z.p=8,gh(n,r,l,u)}finally{Z.p=p,I.T=g}}function gh(n,r,l,u){if($l){var g=ph(u);if(g===null)eh(n,r,u,Bl,l),a_(n,u);else if(Vw(g,n,r,l,u))u.stopPropagation();else if(a_(n,u),r&4&&-1<qw.indexOf(n)){for(;g!==null;){var p=Os(g);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var S=Wi(p.pendingLanes);if(S!==0){var E=p;for(E.pendingLanes|=2,E.entangledLanes|=2;S;){var k=1<<31-Tt(S);E.entanglements[1]|=k,S&=~k}Mn(p),(ke&6)===0&&(Sl=xt()+500,Da(0))}}break;case 31:case 13:E=ns(p,2),E!==null&&Ht(E,p,2),xl(),fh(p,2)}if(p=ph(u),p===null&&eh(n,r,u,Bl,l),p===g)break;g=p}g!==null&&u.stopPropagation()}else eh(n,r,u,null,l)}}function ph(n){return n=yu(n),mh(n)}var Bl=null;function mh(n){if(Bl=null,n=Ls(n),n!==null){var r=o(n);if(r===null)n=null;else{var l=r.tag;if(l===13){if(n=c(r),n!==null)return n;n=null}else if(l===31){if(n=d(r),n!==null)return n;n=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Bl=n,null}function r_(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(iu()){case ko:return 2;case Kr:return 8;case fi:case su:return 32;case No:return 268435456;default:return 32}default:return 32}}var yh=!1,Oi=null,Ri=null,ji=null,$a=new Map,Ba=new Map,Hi=[],qw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function a_(n,r){switch(n){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Ri=null;break;case"mouseover":case"mouseout":ji=null;break;case"pointerover":case"pointerout":$a.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ba.delete(r.pointerId)}}function Ia(n,r,l,u,g,p){return n===null||n.nativeEvent!==p?(n={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:p,targetContainers:[g]},r!==null&&(r=Os(r),r!==null&&i_(r)),n):(n.eventSystemFlags|=u,r=n.targetContainers,g!==null&&r.indexOf(g)===-1&&r.push(g),n)}function Vw(n,r,l,u,g){switch(r){case"focusin":return Oi=Ia(Oi,n,r,l,u,g),!0;case"dragenter":return Ri=Ia(Ri,n,r,l,u,g),!0;case"mouseover":return ji=Ia(ji,n,r,l,u,g),!0;case"pointerover":var p=g.pointerId;return $a.set(p,Ia($a.get(p)||null,n,r,l,u,g)),!0;case"gotpointercapture":return p=g.pointerId,Ba.set(p,Ia(Ba.get(p)||null,n,r,l,u,g)),!0}return!1}function o_(n){var r=Ls(n.target);if(r!==null){var l=o(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){n.blockedOn=r,Sg(n.priority,function(){s_(l)});return}}else if(r===31){if(r=d(l),r!==null){n.blockedOn=r,Sg(n.priority,function(){s_(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){n.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Il(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var l=ph(n.nativeEvent);if(l===null){l=n.nativeEvent;var u=new l.constructor(l.type,l);mu=u,l.target.dispatchEvent(u),mu=null}else return r=Os(l),r!==null&&i_(r),n.blockedOn=l,!1;r.shift()}return!0}function l_(n,r,l){Il(n)&&l.delete(r)}function Fw(){yh=!1,Oi!==null&&Il(Oi)&&(Oi=null),Ri!==null&&Il(Ri)&&(Ri=null),ji!==null&&Il(ji)&&(ji=null),$a.forEach(l_),Ba.forEach(l_)}function Pl(n,r){n.blockedOn===r&&(n.blockedOn=null,yh||(yh=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Fw)))}var Ul=null;function c_(n){Ul!==n&&(Ul=n,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Ul===n&&(Ul=null);for(var r=0;r<n.length;r+=3){var l=n[r],u=n[r+1],g=n[r+2];if(typeof u!="function"){if(mh(u||l)===null)continue;break}var p=Os(l);p!==null&&(n.splice(r,3),r-=3,pd(p,{pending:!0,data:g,method:l.method,action:u},u,g))}}))}function gr(n){function r(k){return Pl(k,n)}Oi!==null&&Pl(Oi,n),Ri!==null&&Pl(Ri,n),ji!==null&&Pl(ji,n),$a.forEach(r),Ba.forEach(r);for(var l=0;l<Hi.length;l++){var u=Hi[l];u.blockedOn===n&&(u.blockedOn=null)}for(;0<Hi.length&&(l=Hi[0],l.blockedOn===null);)o_(l),l.blockedOn===null&&Hi.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var g=l[u],p=l[u+1],S=g[Mt]||null;if(typeof p=="function")S||c_(l);else if(S){var E=null;if(p&&p.hasAttribute("formAction")){if(g=p,S=p[Mt]||null)E=S.formAction;else if(mh(g)!==null)continue}else E=S.action;typeof E=="function"?l[u+1]=E:(l.splice(u,3),u-=3),c_(l)}}}function u_(){function n(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(S){return g=S})},focusReset:"manual",scroll:"manual"})}function r(){g!==null&&(g(),g=null),u||setTimeout(l,20)}function l(){if(!u&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,g=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),g!==null&&(g(),g=null)}}}function _h(n){this._internalRoot=n}ql.prototype.render=_h.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(s(409));var l=r.current,u=Jt();t_(l,u,n,r,null,null)},ql.prototype.unmount=_h.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;t_(n.current,2,null,n,null,null),xl(),r[Ds]=null}};function ql(n){this._internalRoot=n}ql.prototype.unstable_scheduleHydration=function(n){if(n){var r=vg();n={blockedOn:null,target:n,priority:r};for(var l=0;l<Hi.length&&r!==0&&r<Hi[l].priority;l++);Hi.splice(l,0,n),l===0&&o_(n)}};var d_=e.version;if(d_!=="19.2.1")throw Error(s(527,d_,"19.2.1"));Z.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=f(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var Gw={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vl.isDisabled&&Vl.supportsFiber)try{$n=Vl.inject(Gw),ct=Vl}catch{}}return qa.createRoot=function(n,r){if(!a(n))throw Error(s(299));var l=!1,u="",g=_m,p=bm,S=vm;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(g=r.onUncaughtError),r.onCaughtError!==void 0&&(p=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError)),r=Qy(n,1,!1,null,null,l,u,null,g,p,S,u_),n[Ds]=r.current,Qd(n),new _h(r)},qa.hydrateRoot=function(n,r,l){if(!a(n))throw Error(s(299));var u=!1,g="",p=_m,S=bm,E=vm,k=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(p=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(k=l.formState)),r=Qy(n,1,!0,r,l??null,u,g,k,p,S,E,u_),r.context=e_(null),l=r.current,u=Jt(),u=lu(u),g=Si(u),g.callback=null,wi(l,g,u),l=u,r.current.lanes=l,Wr(r,l),Mn(r),n[Ds]=r.current,Qd(n),new ql(r)},qa.version="19.2.1",qa}var x_;function fx(){if(x_)return Sh.exports;x_=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),Sh.exports=hx(),Sh.exports}var sN=fx();const wf=new Map([["APIRequestContext.fetch",{title:'{method} "{url}"'}],["APIRequestContext.fetchResponseBody",{title:"Get response body",group:"getter"}],["APIRequestContext.fetchLog",{internal:!0}],["APIRequestContext.storageState",{title:"Get storage state"}],["APIRequestContext.disposeAPIResponse",{internal:!0}],["APIRequestContext.dispose",{internal:!0}],["LocalUtils.zip",{internal:!0}],["LocalUtils.harOpen",{internal:!0}],["LocalUtils.harLookup",{internal:!0}],["LocalUtils.harClose",{internal:!0}],["LocalUtils.harUnzip",{internal:!0}],["LocalUtils.connect",{internal:!0}],["LocalUtils.tracingStarted",{internal:!0}],["LocalUtils.addStackToTracingNoReply",{internal:!0}],["LocalUtils.traceDiscarded",{internal:!0}],["LocalUtils.globToRegex",{internal:!0}],["Root.initialize",{internal:!0}],["Playwright.newRequest",{title:"Create request context"}],["DebugController.initialize",{internal:!0}],["DebugController.setReportStateChanged",{internal:!0}],["DebugController.setRecorderMode",{internal:!0}],["DebugController.highlight",{internal:!0}],["DebugController.hideHighlight",{internal:!0}],["DebugController.resume",{internal:!0}],["DebugController.kill",{internal:!0}],["SocksSupport.socksConnected",{internal:!0}],["SocksSupport.socksFailed",{internal:!0}],["SocksSupport.socksData",{internal:!0}],["SocksSupport.socksError",{internal:!0}],["SocksSupport.socksEnd",{internal:!0}],["BrowserType.launch",{title:"Launch browser"}],["BrowserType.launchPersistentContext",{title:"Launch persistent context"}],["BrowserType.connectOverCDP",{title:"Connect over CDP"}],["Browser.close",{title:"Close browser",pausesBeforeAction:!0}],["Browser.killForTests",{internal:!0}],["Browser.defaultUserAgentForTest",{internal:!0}],["Browser.newContext",{title:"Create context"}],["Browser.newContextForReuse",{internal:!0}],["Browser.disconnectFromReusedContext",{internal:!0}],["Browser.newBrowserCDPSession",{title:"Create CDP session",group:"configuration"}],["Browser.startTracing",{title:"Start browser tracing",group:"configuration"}],["Browser.stopTracing",{title:"Stop browser tracing",group:"configuration"}],["EventTarget.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Page.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Worker.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["WebSocket.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["ElectronApplication.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["AndroidDevice.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["PageAgent.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.addCookies",{title:"Add cookies",group:"configuration"}],["BrowserContext.addInitScript",{title:"Add init script",group:"configuration"}],["BrowserContext.clearCookies",{title:"Clear cookies",group:"configuration"}],["BrowserContext.clearPermissions",{title:"Clear permissions",group:"configuration"}],["BrowserContext.close",{title:"Close context",pausesBeforeAction:!0}],["BrowserContext.cookies",{title:"Get cookies",group:"getter"}],["BrowserContext.exposeBinding",{title:"Expose binding",group:"configuration"}],["BrowserContext.grantPermissions",{title:"Grant permissions",group:"configuration"}],["BrowserContext.newPage",{title:"Create page"}],["BrowserContext.registerSelectorEngine",{internal:!0}],["BrowserContext.setTestIdAttributeName",{internal:!0}],["BrowserContext.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["BrowserContext.setGeolocation",{title:"Set geolocation",group:"configuration"}],["BrowserContext.setHTTPCredentials",{title:"Set HTTP credentials",group:"configuration"}],["BrowserContext.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["BrowserContext.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["BrowserContext.setOffline",{title:"Set offline mode"}],["BrowserContext.storageState",{title:"Get storage state"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.exposeConsoleApi",{internal:!0}],["BrowserContext.newCDPSession",{title:"Create CDP session",group:"configuration"}],["BrowserContext.harStart",{internal:!0}],["BrowserContext.harExport",{internal:!0}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber|timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber|timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber|timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber|timeString}"'}],["Page.addInitScript",{title:"Add init script",group:"configuration"}],["Page.close",{title:"Close page",pausesBeforeAction:!0}],["Page.consoleMessages",{title:"Get console messages",group:"getter"}],["Page.emulateMedia",{title:"Emulate media",snapshot:!0,pausesBeforeAction:!0}],["Page.exposeBinding",{title:"Expose binding",group:"configuration"}],["Page.goBack",{title:"Go back",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.goForward",{title:"Go forward",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.requestGC",{title:"Request garbage collection",group:"configuration"}],["Page.registerLocatorHandler",{title:"Register locator handler"}],["Page.resolveLocatorHandlerNoReply",{internal:!0}],["Page.unregisterLocatorHandler",{title:"Unregister locator handler"}],["Page.reload",{title:"Reload",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.expectScreenshot",{title:"Expect screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["Page.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["Page.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["Page.setViewportSize",{title:"Set viewport size",snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardDown",{title:'Key down "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardUp",{title:'Key up "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardInsertText",{title:'Insert "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardType",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardPress",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseMove",{title:"Mouse move",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseDown",{title:"Mouse down",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseUp",{title:"Mouse up",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseClick",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseWheel",{title:"Mouse wheel",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.touchscreenTap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.pageErrors",{title:"Get page errors",group:"getter"}],["Page.pdf",{title:"PDF"}],["Page.requests",{title:"Get network requests",group:"getter"}],["Page.snapshotForAI",{internal:!0}],["Page.startJSCoverage",{title:"Start JS coverage",group:"configuration"}],["Page.stopJSCoverage",{title:"Stop JS coverage",group:"configuration"}],["Page.startCSSCoverage",{title:"Start CSS coverage",group:"configuration"}],["Page.stopCSSCoverage",{title:"Stop CSS coverage",group:"configuration"}],["Page.bringToFront",{title:"Bring to front"}],["Page.updateSubscription",{internal:!0}],["Page.agent",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",snapshot:!0,pausesBeforeAction:!0}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.content",{title:"Get content",snapshot:!0,pausesBeforeAction:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.frameElement",{title:"Get frame element",group:"getter"}],["Frame.resolveSelector",{internal:!0}],["Frame.highlight",{title:"Highlight element",group:"configuration"}],["Frame.getAttribute",{title:'Get attribute "{name}"',snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0,pausesBeforeAction:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.setContent",{title:"Set content",snapshot:!0,pausesBeforeAction:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.title",{title:"Get page title",group:"getter"}],["Frame.type",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0,pausesBeforeAction:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0,pausesBeforeAction:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["Worker.updateSubscription",{internal:!0}],["JSHandle.dispose",{internal:!0}],["ElementHandle.dispose",{internal:!0}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.getPropertyList",{title:"Get property list",group:"getter"}],["ElementHandle.getPropertyList",{title:"Get property list",group:"getter"}],["JSHandle.getProperty",{title:"Get JS property",group:"getter"}],["ElementHandle.getProperty",{title:"Get JS property",group:"getter"}],["JSHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.contentFrame",{title:"Get content frame",group:"getter"}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.getAttribute",{title:"Get attribute",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.ownerFrame",{title:"Get owner frame",group:"getter"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{title:"Abort request",group:"route"}],["Route.continue",{title:"Continue request",group:"route"}],["Route.fulfill",{title:"Fulfill request",group:"route"}],["WebSocketRoute.connect",{title:"Connect WebSocket to server",group:"route"}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.sendToServer",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{title:"Get response body",group:"getter"}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.sizes",{internal:!0}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Dialog.accept",{title:"Accept dialog"}],["Dialog.dismiss",{title:"Dismiss dialog"}],["Tracing.tracingStart",{title:"Start tracing",group:"configuration"}],["Tracing.tracingStartChunk",{title:"Start tracing",group:"configuration"}],["Tracing.tracingGroup",{title:'Trace "{name}"'}],["Tracing.tracingGroupEnd",{title:"Group end"}],["Tracing.tracingStopChunk",{title:"Stop tracing",group:"configuration"}],["Tracing.tracingStop",{title:"Stop tracing",group:"configuration"}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["CDPSession.send",{title:"Send CDP command",group:"configuration"}],["CDPSession.detach",{title:"Detach CDP session",group:"configuration"}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{title:"Wait"}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{title:"Execute shell command",group:"configuration"}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{title:"Connect to Web View"}],["AndroidDevice.close",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}],["PageAgent.perform",{title:'Perform "{task}"'}],["PageAgent.expect",{title:'Expect "{expectation}"'}],["PageAgent.extract",{title:'Extract "{query}"'}],["PageAgent.dispose",{internal:!0}],["PageAgent.usage",{title:"Get agent usage",group:"configuration"}]]);function Hb(i,e){var t;return(t=gx(i,e))==null?void 0:t.replaceAll(`
|
|
51
|
-
`,"\\n")}function gx(i,e){if(i)for(const t of e.split("|")){if(t==="url")try{const a=new URL(i[t]);return a.protocol==="data:"?a.protocol:a.protocol==="about:"?i[t]:a.pathname+a.search}catch{if(i[t]!==void 0)return i[t]}if(t==="timeNumber"&&i[t]!==void 0)return new Date(i[t]).toString();const s=px(i,t);if(s!==void 0)return s}}function px(i,e){const t=e.split(".");let s=i;for(const a of t){if(typeof s!="object"||s===null)return;s=s[a]}if(s!==void 0)return String(s)}function mx(i){var t;return(i.title??((t=wf.get(i.type+"."+i.method))==null?void 0:t.title)??i.method).replace(/\{([^}]+)\}/g,(s,a)=>Hb(i.params,a)??s)}function yx(i){var e;return(e=wf.get(i.type+"."+i.method))==null?void 0:e.group}const eo=Symbol("context"),zb=Symbol("nextInContext"),$b=Symbol("prevByEndTime"),Bb=Symbol("nextByStartTime"),T_=Symbol("events");class rN{constructor(e,t){var a;t.forEach(o=>_x(o));const s=t.find(o=>o.origin==="library");this.traceUri=e,this.browserName=(s==null?void 0:s.browserName)||"",this.sdkLanguage=s==null?void 0:s.sdkLanguage,this.channel=s==null?void 0:s.channel,this.testIdAttributeName=s==null?void 0:s.testIdAttributeName,this.platform=(s==null?void 0:s.platform)||"",this.playwrightVersion=(a=t.find(o=>o.playwrightVersion))==null?void 0:a.playwrightVersion,this.title=(s==null?void 0:s.title)||"",this.options=(s==null?void 0:s.options)||{},this.actions=bx(t),this.pages=[].concat(...t.map(o=>o.pages)),this.wallTime=t.map(o=>o.wallTime).reduce((o,c)=>Math.min(o||Number.MAX_VALUE,c),Number.MAX_VALUE),this.startTime=t.map(o=>o.startTime).reduce((o,c)=>Math.min(o,c),Number.MAX_VALUE),this.endTime=t.map(o=>o.endTime).reduce((o,c)=>Math.max(o,c),Number.MIN_VALUE),this.events=[].concat(...t.map(o=>o.events)),this.stdio=[].concat(...t.map(o=>o.stdio)),this.errors=[].concat(...t.map(o=>o.errors)),this.hasSource=t.some(o=>o.hasSource),this.hasStepData=t.some(o=>o.origin==="testRunner"),this.resources=[...t.map(o=>o.resources)].flat(),this.attachments=this.actions.flatMap(o=>{var c;return((c=o.attachments)==null?void 0:c.map(d=>({...d,callId:o.callId,traceUri:e})))??[]}),this.visibleAttachments=this.attachments.filter(o=>!o.name.startsWith("_")),this.events.sort((o,c)=>o.time-c.time),this.resources.sort((o,c)=>o._monotonicTime-c._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=Ax(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const o of this.actions)o.group=o.group??yx({type:o.class,method:o.method}),o.group&&this.actionCounters.set(o.group,1+(this.actionCounters.get(o.group)||0))}createRelativeUrl(e){const t=new URL("http://localhost/"+e);return t.searchParams.set("trace",this.traceUri),t.toString().substring(17)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const t=new Set(e);return this.actions.filter(s=>!s.group||t.has(s.group))}renderActionTree(e){const t=this.filteredActions(e??[]),{rootItem:s}=Ib(t),a=[],o=(c,d)=>{const h=mx({...c.action,type:c.action.class});a.push(`${d}${h||c.id}`);for(const f of c.children)o(f,d+" ")};return s.children.forEach(c=>o(c,"")),a}_errorDescriptorsFromActions(){var t;const e=[];for(const s of this.actions||[])(t=s.error)!=null&&t.message&&e.push({action:s,stack:s.stack,message:s.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,t)=>({stack:e.stack,message:e.message}))}}function _x(i){for(const t of i.pages)t[eo]=i;for(let t=0;t<i.actions.length;++t){const s=i.actions[t];s[eo]=i}let e;for(let t=i.actions.length-1;t>=0;t--){const s=i.actions[t];s[zb]=e,s.class!=="Route"&&(e=s)}for(const t of i.events)t[eo]=i;for(const t of i.resources)t[eo]=i}function bx(i){const e=[],t=vx(i);e.push(...t),e.sort((s,a)=>a.parentId===s.callId?1:s.parentId===a.callId?-1:s.endTime-a.endTime);for(let s=1;s<e.length;++s)e[s][$b]=e[s-1];e.sort((s,a)=>a.parentId===s.callId?-1:s.parentId===a.callId?1:s.startTime-a.startTime);for(let s=0;s+1<e.length;++s)e[s][Bb]=e[s+1];return e}let E_=0;function vx(i){const e=new Map,t=i.filter(c=>c.origin==="library"),s=i.filter(c=>c.origin==="testRunner");if(!s.length||!t.length)return i.map(c=>c.actions.map(d=>({...d,context:c}))).flat();for(const c of t)for(const d of c.actions)e.set(d.stepId||`tmp-step@${++E_}`,{...d,context:c});const a=wx(s,e);a&&Sx(t,a);const o=new Map;for(const c of s)for(const d of c.actions){const h=d.stepId&&e.get(d.stepId);if(h){o.set(d.callId,h.callId),d.error&&(h.error=d.error),d.attachments&&(h.attachments=d.attachments),d.annotations&&(h.annotations=d.annotations),d.parentId&&(h.parentId=o.get(d.parentId)??d.parentId),d.group&&(h.group=d.group),h.startTime=d.startTime,h.endTime=d.endTime;continue}d.parentId&&(d.parentId=o.get(d.parentId)??d.parentId),e.set(d.stepId||`tmp-step@${++E_}`,{...d,context:c})}return[...e.values()]}function Sx(i,e){for(const t of i){t.startTime+=e,t.endTime+=e;for(const s of t.actions)s.startTime&&(s.startTime+=e),s.endTime&&(s.endTime+=e);for(const s of t.events)s.time+=e;for(const s of t.stdio)s.timestamp+=e;for(const s of t.pages)for(const a of s.screencastFrames)a.timestamp+=e;for(const s of t.resources)s._monotonicTime&&(s._monotonicTime+=e)}}function wx(i,e){for(const t of i)for(const s of t.actions){if(!s.startTime)continue;const a=s.stepId?e.get(s.stepId):void 0;if(a)return s.startTime-a.startTime}return 0}function Ib(i){const e=new Map;for(const a of i)e.set(a.callId,{id:a.callId,parent:void 0,children:[],action:a});const t={action:{...Cx},id:"",parent:void 0,children:[]};for(const a of e.values()){t.action.startTime=Math.min(t.action.startTime,a.action.startTime),t.action.endTime=Math.max(t.action.endTime,a.action.endTime);const o=a.action.parentId&&e.get(a.action.parentId)||t;o.children.push(a),a.parent=o}const s=a=>{for(const o of a.children)o.action.stack=o.action.stack??a.action.stack,s(o)};return s(t),{rootItem:t,itemMap:e}}function Pb(i){return i[eo]}function xx(i){return i[zb]}function A_(i){return i[$b]}function C_(i){return i[Bb]}function Tx(i){let e=0,t=0;for(const s of Ex(i)){if(s.type==="console"){const a=s.messageType;a==="warning"?++t:a==="error"&&++e}s.type==="event"&&s.method==="pageError"&&++e}return{errors:e,warnings:t}}function Ex(i){let e=i[T_];if(e)return e;const t=xx(i);return e=Pb(i).events.filter(s=>s.time>=i.startTime&&(!t||s.time<t.startTime)),i[T_]=e,e}function Ax(i,e){var s;const t=new Map;for(const a of i)for(const o of a.stack||[]){let c=t.get(o.file);c||(c={errors:[],content:void 0},t.set(o.file,c))}for(const a of e){const{action:o,stack:c,message:d}=a;!o||!c||(s=t.get(c[0].file))==null||s.errors.push({line:c[0].line||0,message:d})}return t}const Cx={type:"action",callId:"",startTime:0,endTime:0,class:"",method:"",params:{},log:[],context:{origin:"library",startTime:0,endTime:0,browserName:"",wallTime:0,options:{},pages:[],resources:[],actions:[],events:[],stdio:[],errors:[],hasSource:!1,contextId:""}},kx=50,_c=({sidebarSize:i,sidebarHidden:e=!1,sidebarIsFirst:t=!1,orientation:s="vertical",minSidebarSize:a=kx,settingName:o,sidebar:c,main:d})=>{const h=Math.max(a,i)*window.devicePixelRatio,[f,y]=hn(o?o+"."+s+":size":void 0,h),[m,_]=hn(o?o+"."+s+":size":void 0,h),[b,x]=P.useState(null),[v,T]=Es();let A;s==="vertical"?(A=m/window.devicePixelRatio,v&&v.height<A&&(A=v.height-10)):(A=f/window.devicePixelRatio,v&&v.width<A&&(A=v.width-10)),document.body.style.userSelect=b?"none":"inherit";let C={};return s==="vertical"?t?C={top:b?0:A-4,bottom:b?0:void 0,height:b?"initial":8}:C={bottom:b?0:A-4,top:b?0:void 0,height:b?"initial":8}:t?C={left:b?0:A-4,right:b?0:void 0,width:b?"initial":8}:C={right:b?0:A-4,left:b?0:void 0,width:b?"initial":8},w.jsxs("div",{className:We("split-view",s,t&&"sidebar-first"),ref:T,children:[w.jsx("div",{className:"split-view-main",children:d}),!e&&w.jsx("div",{style:{flexBasis:A},className:"split-view-sidebar",children:c}),!e&&w.jsx("div",{style:C,className:"split-view-resizer",onMouseDown:L=>x({offset:s==="vertical"?L.clientY:L.clientX,size:A}),onMouseUp:()=>x(null),onMouseMove:L=>{if(!L.buttons)x(null);else if(b){const D=(s==="vertical"?L.clientY:L.clientX)-b.offset,F=t?b.size+D:b.size-D,q=L.target.parentElement.getBoundingClientRect(),O=Math.min(Math.max(a,F),(s==="vertical"?q.height:q.width)-a);s==="vertical"?_(O*window.devicePixelRatio):y(O*window.devicePixelRatio)}}})]})},it=function(i,e,t){return i>=e&&i<=t};function zt(i){return it(i,48,57)}function k_(i){return zt(i)||it(i,65,70)||it(i,97,102)}function Nx(i){return it(i,65,90)}function Mx(i){return it(i,97,122)}function Dx(i){return Nx(i)||Mx(i)}function Lx(i){return i>=128}function nc(i){return Dx(i)||Lx(i)||i===95}function N_(i){return nc(i)||zt(i)||i===45}function Ox(i){return it(i,0,8)||i===11||it(i,14,31)||i===127}function ic(i){return i===10}function ii(i){return ic(i)||i===9||i===32}const Rx=1114111;class xf extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function jx(i){const e=[];for(let t=0;t<i.length;t++){let s=i.charCodeAt(t);if(s===13&&i.charCodeAt(t+1)===10&&(s=10,t++),(s===13||s===12)&&(s=10),s===0&&(s=65533),it(s,55296,56319)&&it(i.charCodeAt(t+1),56320,57343)){const a=s-55296,o=i.charCodeAt(t+1)-56320;s=Math.pow(2,16)+a*Math.pow(2,10)+o,t++}e.push(s)}return e}function ot(i){if(i<=65535)return String.fromCharCode(i);i-=Math.pow(2,16);const e=Math.floor(i/Math.pow(2,10))+55296,t=i%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(t)}function Ub(i){const e=jx(i);let t=-1;const s=[];let a;const o=function(Y){return Y>=e.length?-1:e[Y]},c=function(Y){if(Y===void 0&&(Y=1),Y>3)throw"Spec Error: no more than three codepoints of lookahead.";return o(t+Y)},d=function(Y){return Y===void 0&&(Y=1),t+=Y,a=o(t),!0},h=function(){return t-=1,!0},f=function(Y){return Y===void 0&&(Y=a),Y===-1},y=function(){if(m(),d(),ii(a)){for(;ii(c());)d();return new bc}else{if(a===34)return x();if(a===35)if(N_(c())||A(c(1),c(2))){const Y=new t0("");return L(c(1),c(2),c(3))&&(Y.type="id"),Y.value=B(),Y}else return new _t(a);else return a===36?c()===61?(d(),new Bx):new _t(a):a===39?x():a===40?new Zb:a===41?new Tf:a===42?c()===61?(d(),new Ix):new _t(a):a===43?F()?(h(),_()):new _t(a):a===44?new Yb:a===45?F()?(h(),_()):c(1)===45&&c(2)===62?(d(2),new Fb):j()?(h(),b()):new _t(a):a===46?F()?(h(),_()):new _t(a):a===58?new Gb:a===59?new Xb:a===60?c(1)===33&&c(2)===45&&c(3)===45?(d(3),new Vb):new _t(a):a===64?L(c(1),c(2),c(3))?new e0(B()):new _t(a):a===91?new Wb:a===92?C()?(h(),b()):new _t(a):a===93?new Zh:a===94?c()===61?(d(),new $x):new _t(a):a===123?new Kb:a===124?c()===61?(d(),new zx):c()===124?(d(),new Qb):new _t(a):a===125?new Jb:a===126?c()===61?(d(),new Hx):new _t(a):zt(a)?(h(),_()):nc(a)?(h(),b()):f()?new rc:new _t(a)}},m=function(){for(;c(1)===47&&c(2)===42;)for(d(2);;)if(d(),a===42&&c()===47){d();break}else if(f())return},_=function(){const Y=q();if(L(c(1),c(2),c(3))){const J=new Px;return J.value=Y.value,J.repr=Y.repr,J.type=Y.type,J.unit=B(),J}else if(c()===37){d();const J=new s0;return J.value=Y.value,J.repr=Y.repr,J}else{const J=new i0;return J.value=Y.value,J.repr=Y.repr,J.type=Y.type,J}},b=function(){const Y=B();if(Y.toLowerCase()==="url"&&c()===40){for(d();ii(c(1))&&ii(c(2));)d();return c()===34||c()===39?new ro(Y):ii(c())&&(c(2)===34||c(2)===39)?new ro(Y):v()}else return c()===40?(d(),new ro(Y)):new Ef(Y)},x=function(Y){Y===void 0&&(Y=a);let J="";for(;d();){if(a===Y||f())return new Af(J);if(ic(a))return h(),new qb;a===92?f(c())||(ic(c())?d():J+=ot(T())):J+=ot(a)}throw new Error("Internal error")},v=function(){const Y=new n0("");for(;ii(c());)d();if(f(c()))return Y;for(;d();){if(a===41||f())return Y;if(ii(a)){for(;ii(c());)d();return c()===41||f(c())?(d(),Y):(Q(),new sc)}else{if(a===34||a===39||a===40||Ox(a))return Q(),new sc;if(a===92)if(C())Y.value+=ot(T());else return Q(),new sc;else Y.value+=ot(a)}}throw new Error("Internal error")},T=function(){if(d(),k_(a)){const Y=[a];for(let te=0;te<5&&k_(c());te++)d(),Y.push(a);ii(c())&&d();let J=parseInt(Y.map(function(te){return String.fromCharCode(te)}).join(""),16);return J>Rx&&(J=65533),J}else return f()?65533:a},A=function(Y,J){return!(Y!==92||ic(J))},C=function(){return A(a,c())},L=function(Y,J,te){return Y===45?nc(J)||J===45||A(J,te):nc(Y)?!0:Y===92?A(Y,J):!1},j=function(){return L(a,c(1),c(2))},D=function(Y,J,te){return Y===43||Y===45?!!(zt(J)||J===46&&zt(te)):Y===46?!!zt(J):!!zt(Y)},F=function(){return D(a,c(1),c(2))},B=function(){let Y="";for(;d();)if(N_(a))Y+=ot(a);else if(C())Y+=ot(T());else return h(),Y;throw new Error("Internal parse error")},q=function(){let Y="",J="integer";for((c()===43||c()===45)&&(d(),Y+=ot(a));zt(c());)d(),Y+=ot(a);if(c(1)===46&&zt(c(2)))for(d(),Y+=ot(a),d(),Y+=ot(a),J="number";zt(c());)d(),Y+=ot(a);const te=c(1),Ne=c(2),I=c(3);if((te===69||te===101)&&zt(Ne))for(d(),Y+=ot(a),d(),Y+=ot(a),J="number";zt(c());)d(),Y+=ot(a);else if((te===69||te===101)&&(Ne===43||Ne===45)&&zt(I))for(d(),Y+=ot(a),d(),Y+=ot(a),d(),Y+=ot(a),J="number";zt(c());)d(),Y+=ot(a);const Z=O(Y);return{type:J,value:Z,repr:Y}},O=function(Y){return+Y},Q=function(){for(;d();){if(a===41||f())return;C()&&T()}};let se=0;for(;!f(c());)if(s.push(y()),se++,se>e.length*2)throw new Error("I'm infinite-looping!");return s}class Ze{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class qb extends Ze{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class sc extends Ze{constructor(){super(...arguments),this.tokenType="BADURL"}}class bc extends Ze{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class Vb extends Ze{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class Fb extends Ze{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class Gb extends Ze{constructor(){super(...arguments),this.tokenType=":"}}class Xb extends Ze{constructor(){super(...arguments),this.tokenType=";"}}class Yb extends Ze{constructor(){super(...arguments),this.tokenType=","}}class zr extends Ze{constructor(){super(...arguments),this.value="",this.mirror=""}}class Kb extends zr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class Jb extends zr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class Wb extends zr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Zh extends zr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class Zb extends zr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Tf extends zr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class Hx extends Ze{constructor(){super(...arguments),this.tokenType="~="}}class zx extends Ze{constructor(){super(...arguments),this.tokenType="|="}}class $x extends Ze{constructor(){super(...arguments),this.tokenType="^="}}class Bx extends Ze{constructor(){super(...arguments),this.tokenType="$="}}class Ix extends Ze{constructor(){super(...arguments),this.tokenType="*="}}class Qb extends Ze{constructor(){super(...arguments),this.tokenType="||"}}class rc extends Ze{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class _t extends Ze{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=ot(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==="\\"?`\\
|
|
52
|
-
`:this.value}}class $r extends Ze{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 Ef extends $r{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return xo(this.value)}}class ro extends $r{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return xo(this.value)+"("}}class e0 extends $r{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+xo(this.value)}}class t0 extends $r{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"?"#"+xo(this.value):"#"+Ux(this.value)}}class Af extends $r{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+r0(this.value)+'"'}}class n0 extends $r{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+r0(this.value)+'")'}}class i0 extends Ze{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 s0 extends Ze{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 Px extends Ze{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 t=xo(this.unit);return t[0].toLowerCase()==="e"&&(t[1]==="-"||it(t.charCodeAt(1),48,57))&&(t="\\65 "+t.slice(1,t.length)),e+t}}function xo(i){i=""+i;let e="";const t=i.charCodeAt(0);for(let s=0;s<i.length;s++){const a=i.charCodeAt(s);if(a===0)throw new xf("Invalid character: the input contains U+0000.");it(a,1,31)||a===127||s===0&&it(a,48,57)||s===1&&it(a,48,57)&&t===45?e+="\\"+a.toString(16)+" ":a>=128||a===45||a===95||it(a,48,57)||it(a,65,90)||it(a,97,122)?e+=i[s]:e+="\\"+i[s]}return e}function Ux(i){i=""+i;let e="";for(let t=0;t<i.length;t++){const s=i.charCodeAt(t);if(s===0)throw new xf("Invalid character: the input contains U+0000.");s>=128||s===45||s===95||it(s,48,57)||it(s,65,90)||it(s,97,122)?e+=i[t]:e+="\\"+s.toString(16)+" "}return e}function r0(i){i=""+i;let e="";for(let t=0;t<i.length;t++){const s=i.charCodeAt(t);if(s===0)throw new xf("Invalid character: the input contains U+0000.");it(s,1,31)||s===127?e+="\\"+s.toString(16)+" ":s===34||s===92?e+="\\"+i[t]:e+=i[t]}return e}class $t extends Error{}function qx(i,e){let t;try{t=Ub(i),t[t.length-1]instanceof rc||t.push(new rc)}catch(O){const Q=O.message+` while parsing css selector "${i}". Did you mean to CSS.escape it?`,se=(O.stack||"").indexOf(O.message);throw se!==-1&&(O.stack=O.stack.substring(0,se)+Q+O.stack.substring(se+O.message.length)),O.message=Q,O}const s=t.find(O=>O instanceof e0||O instanceof qb||O instanceof sc||O instanceof Qb||O instanceof Vb||O instanceof Fb||O instanceof Xb||O instanceof Kb||O instanceof Jb||O instanceof n0||O instanceof s0);if(s)throw new $t(`Unsupported token "${s.toSource()}" while parsing css selector "${i}". Did you mean to CSS.escape it?`);let a=0;const o=new Set;function c(){return new $t(`Unexpected token "${t[a].toSource()}" while parsing css selector "${i}". Did you mean to CSS.escape it?`)}function d(){for(;t[a]instanceof bc;)a++}function h(O=a){return t[O]instanceof Ef}function f(O=a){return t[O]instanceof Af}function y(O=a){return t[O]instanceof i0}function m(O=a){return t[O]instanceof Yb}function _(O=a){return t[O]instanceof Zb}function b(O=a){return t[O]instanceof Tf}function x(O=a){return t[O]instanceof ro}function v(O=a){return t[O]instanceof _t&&t[O].value==="*"}function T(O=a){return t[O]instanceof rc}function A(O=a){return t[O]instanceof _t&&[">","+","~"].includes(t[O].value)}function C(O=a){return m(O)||b(O)||T(O)||A(O)||t[O]instanceof bc}function L(){const O=[j()];for(;d(),!!m();)a++,O.push(j());return O}function j(){return d(),y()||f()?t[a++].value:D()}function D(){const O={simples:[]};for(d(),A()?O.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):O.simples.push({selector:F(),combinator:""});;){if(d(),A())O.simples[O.simples.length-1].combinator=t[a++].value,d();else if(C())break;O.simples.push({combinator:"",selector:F()})}return O}function F(){let O="";const Q=[];for(;!C();)if(h()||v())O+=t[a++].toSource();else if(t[a]instanceof t0)O+=t[a++].toSource();else if(t[a]instanceof _t&&t[a].value===".")if(a++,h())O+="."+t[a++].toSource();else throw c();else if(t[a]instanceof Gb)if(a++,h())if(!e.has(t[a].value.toLowerCase()))O+=":"+t[a++].toSource();else{const se=t[a++].value.toLowerCase();Q.push({name:se,args:[]}),o.add(se)}else if(x()){const se=t[a++].value.toLowerCase();if(e.has(se)?(Q.push({name:se,args:L()}),o.add(se)):O+=`:${se}(${B()})`,d(),!b())throw c();a++}else throw c();else if(t[a]instanceof Wb){for(O+="[",a++;!(t[a]instanceof Zh)&&!T();)O+=t[a++].toSource();if(!(t[a]instanceof Zh))throw c();O+="]",a++}else throw c();if(!O&&!Q.length)throw c();return{css:O||void 0,functions:Q}}function B(){let O="",Q=1;for(;!T()&&((_()||x())&&Q++,b()&&Q--,!!Q);)O+=t[a++].toSource();return O}const q=L();if(!T())throw c();if(q.some(O=>typeof O!="object"||!("simples"in O)))throw new $t(`Error while parsing css selector "${i}". Did you mean to CSS.escape it?`);return{selector:q,names:Array.from(o)}}const Qh=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Vx=new Set(["left-of","right-of","above","below","near"]),a0=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(i){const e=Xx(i),t=[];for(const s of e.parts){if(s.name==="css"||s.name==="css:light"){s.name==="css:light"&&(s.body=":light("+s.body+")");const a=qx(s.body,a0);t.push({name:"css",body:a.selector,source:s.body});continue}if(Qh.has(s.name)){let a,o;try{const f=JSON.parse("["+s.body+"]");if(!Array.isArray(f)||f.length<1||f.length>2||typeof f[0]!="string")throw new $t(`Malformed selector: ${s.name}=`+s.body);if(a=f[0],f.length===2){if(typeof f[1]!="number"||!Vx.has(s.name))throw new $t(`Malformed selector: ${s.name}=`+s.body);o=f[1]}}catch{throw new $t(`Malformed selector: ${s.name}=`+s.body)}const c={name:s.name,source:s.body,body:{parsed:To(a),distance:o}},d=[...c.body.parsed.parts].reverse().find(f=>f.name==="internal:control"&&f.body==="enter-frame"),h=d?c.body.parsed.parts.indexOf(d):-1;h!==-1&&Fx(c.body.parsed.parts.slice(0,h+1),t.slice(0,h+1))&&c.body.parsed.parts.splice(0,h+1),t.push(c);continue}t.push({...s,source:s.body})}if(Qh.has(t[0].name))throw new $t(`"${t[0].name}" selector cannot be first`);return{capture:e.capture,parts:t}}function Fx(i,e){return Rn({parts:i})===Rn({parts:e})}function Rn(i,e){return typeof i=="string"?i:i.parts.map((t,s)=>{let a=!0;!e&&s!==i.capture&&(t.name==="css"||t.name==="xpath"&&t.source.startsWith("//")||t.source.startsWith(".."))&&(a=!1);const o=a?t.name+"=":"";return`${s===i.capture?"*":""}${o}${t.source}`}).join(" >> ")}function Gx(i,e){const t=(s,a)=>{for(const o of s.parts)e(o,a),Qh.has(o.name)&&t(o.body.parsed,!0)};t(i,!1)}function Xx(i){let e=0,t,s=0;const a={parts:[]},o=()=>{const d=i.substring(s,e).trim(),h=d.indexOf("=");let f,y;h!==-1&&d.substring(0,h).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(f=d.substring(0,h).trim(),y=d.substring(h+1)):d.length>1&&d[0]==='"'&&d[d.length-1]==='"'||d.length>1&&d[0]==="'"&&d[d.length-1]==="'"?(f="text",y=d):/^\(*\/\//.test(d)||d.startsWith("..")?(f="xpath",y=d):(f="css",y=d);let m=!1;if(f[0]==="*"&&(m=!0,f=f.substring(1)),a.parts.push({name:f,body:y}),m){if(a.capture!==void 0)throw new $t("Only one of the selectors can capture using * modifier");a.capture=a.parts.length-1}};if(!i.includes(">>"))return e=i.length,o(),a;const c=()=>{const h=i.substring(s,e).match(/^\s*text\s*=(.*)$/);return!!h&&!!h[1]};for(;e<i.length;){const d=i[e];d==="\\"&&e+1<i.length?e+=2:d===t?(t=void 0,e++):!t&&(d==='"'||d==="'"||d==="`")&&!c()?(t=d,e++):!t&&d===">"&&i[e+1]===">"?(o(),e+=2,s=e):e++}return o(),a}function xs(i,e){let t=0,s=i.length===0;const a=()=>i[t]||"",o=()=>{const T=a();return++t,s=t>=i.length,T},c=T=>{throw s?new $t(`Unexpected end of selector while parsing selector \`${i}\``):new $t(`Error while parsing selector \`${i}\` - unexpected symbol "${a()}" at position ${t}`+(T?" during "+T:""))};function d(){for(;!s&&/\s/.test(a());)o()}function h(T){return T>=""||T>="0"&&T<="9"||T>="A"&&T<="Z"||T>="a"&&T<="z"||T>="0"&&T<="9"||T==="_"||T==="-"}function f(){let T="";for(d();!s&&h(a());)T+=o();return T}function y(T){let A=o();for(A!==T&&c("parsing quoted string");!s&&a()!==T;)a()==="\\"&&o(),A+=o();return a()!==T&&c("parsing quoted string"),A+=o(),A}function m(){o()!=="/"&&c("parsing regular expression");let T="",A=!1;for(;!s;){if(a()==="\\")T+=o(),s&&c("parsing regular expression");else if(A&&a()==="]")A=!1;else if(!A&&a()==="[")A=!0;else if(!A&&a()==="/")break;T+=o()}o()!=="/"&&c("parsing regular expression");let C="";for(;!s&&a().match(/[dgimsuy]/);)C+=o();try{return new RegExp(T,C)}catch(L){throw new $t(`Error while parsing selector \`${i}\`: ${L.message}`)}}function _(){let T="";return d(),a()==="'"||a()==='"'?T=y(a()).slice(1,-1):T=f(),T||c("parsing property path"),T}function b(){d();let T="";return s||(T+=o()),!s&&T!=="="&&(T+=o()),["=","*=","^=","$=","|=","~="].includes(T)||c("parsing operator"),T}function x(){o();const T=[];for(T.push(_()),d();a()===".";)o(),T.push(_()),d();if(a()==="]")return o(),{name:T.join("."),jsonPath:T,op:"<truthy>",value:null,caseSensitive:!1};const A=b();let C,L=!0;if(d(),a()==="/"){if(A!=="=")throw new $t(`Error while parsing selector \`${i}\` - cannot use ${A} in attribute with regular expression`);C=m()}else if(a()==="'"||a()==='"')C=y(a()).slice(1,-1),d(),a()==="i"||a()==="I"?(L=!1,o()):(a()==="s"||a()==="S")&&(L=!0,o());else{for(C="";!s&&(h(a())||a()==="+"||a()===".");)C+=o();C==="true"?C=!0:C==="false"?C=!1:e||(C=+C,Number.isNaN(C)&&c("parsing attribute value"))}if(d(),a()!=="]"&&c("parsing attribute value"),o(),A!=="="&&typeof C!="string")throw new $t(`Error while parsing selector \`${i}\` - cannot use ${A} in attribute with non-string matching value - ${C}`);return{name:T.join("."),jsonPath:T,op:A,value:C,caseSensitive:L}}const v={name:"",attributes:[]};for(v.name=f(),d();a()==="[";)v.attributes.push(x()),d();if(s||c(void 0),!v.name&&!v.attributes.length)throw new $t(`Error while parsing selector \`${i}\` - selector cannot be empty`);return v}function Lc(i,e="'"){const t=JSON.stringify(i),s=t.substring(1,t.length-1).replace(/\\"/g,'"');if(e==="'")return e+s.replace(/[']/g,"\\'")+e;if(e==='"')return e+s.replace(/["]/g,'\\"')+e;if(e==="`")return e+s.replace(/[`]/g,"\\`")+e;throw new Error("Invalid escape char")}function vc(i){return i.charAt(0).toUpperCase()+i.substring(1)}function o0(i){return i.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function Bi(i){return`"${i.replace(/["\\]/g,e=>"\\"+e)}"`}let ps;function Yx(){ps=new Map}function Nt(i){let e=ps==null?void 0:ps.get(i);return e===void 0&&(e=i.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),ps==null||ps.set(i,e)),e}function Oc(i){return i.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function l0(i){return i.unicode||i.unicodeSets?String(i):String(i).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Bt(i,e){return typeof i!="string"?l0(i):`${JSON.stringify(i)}${e?"s":"i"}`}function It(i,e){return typeof i!="string"?l0(i):`"${i.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function Kx(i,e,t=""){if(i.length<=e)return i;const s=[...i];return s.length>e?s.slice(0,e-t.length).join("")+t:s.join("")}function M_(i,e){return Kx(i,e,"…")}function Sc(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jx(i,e){const t=i.length,s=e.length;let a=0,o=0;const c=Array(t+1).fill(null).map(()=>Array(s+1).fill(0));for(let d=1;d<=t;d++)for(let h=1;h<=s;h++)i[d-1]===e[h-1]&&(c[d][h]=c[d-1][h-1]+1,c[d][h]>a&&(a=c[d][h],o=d));return i.slice(o-a,o)}function Wx(i,e){try{const t=To(e),s=Zx(t);return s||bs(new u0[i],t,!1,1)[0]}catch{return e}}function Zx(i){const e=i.parts[i.parts.length-1];if((e==null?void 0:e.name)==="internal:describe"){const t=JSON.parse(e.body);if(typeof t=="string")return t}}function qi(i,e,t=!1){return c0(i,e,t,1)[0]}function c0(i,e,t=!1,s=20,a){try{return bs(new u0[i](a),To(e),t,s)}catch{return[e]}}function bs(i,e,t=!1,s=20){const a=[...e.parts],o=[];let c=t?"frame-locator":"page";for(let d=0;d<a.length;d++){const h=a[d],f=c;if(c="locator",h.name==="internal:describe")continue;if(h.name==="nth"){h.body==="0"?o.push([i.generateLocator(f,"first",""),i.generateLocator(f,"nth","0")]):h.body==="-1"?o.push([i.generateLocator(f,"last",""),i.generateLocator(f,"nth","-1")]):o.push([i.generateLocator(f,"nth",h.body)]);continue}if(h.name==="visible"){o.push([i.generateLocator(f,"visible",h.body),i.generateLocator(f,"default",`visible=${h.body}`)]);continue}if(h.name==="internal:text"){const{exact:x,text:v}=Va(h.body);o.push([i.generateLocator(f,"text",v,{exact:x})]);continue}if(h.name==="internal:has-text"){const{exact:x,text:v}=Va(h.body);if(!x){o.push([i.generateLocator(f,"has-text",v,{exact:x})]);continue}}if(h.name==="internal:has-not-text"){const{exact:x,text:v}=Va(h.body);if(!x){o.push([i.generateLocator(f,"has-not-text",v,{exact:x})]);continue}}if(h.name==="internal:has"){const x=bs(i,h.body.parsed,!1,s);o.push(x.map(v=>i.generateLocator(f,"has",v)));continue}if(h.name==="internal:has-not"){const x=bs(i,h.body.parsed,!1,s);o.push(x.map(v=>i.generateLocator(f,"hasNot",v)));continue}if(h.name==="internal:and"){const x=bs(i,h.body.parsed,!1,s);o.push(x.map(v=>i.generateLocator(f,"and",v)));continue}if(h.name==="internal:or"){const x=bs(i,h.body.parsed,!1,s);o.push(x.map(v=>i.generateLocator(f,"or",v)));continue}if(h.name==="internal:chain"){const x=bs(i,h.body.parsed,!1,s);o.push(x.map(v=>i.generateLocator(f,"chain",v)));continue}if(h.name==="internal:label"){const{exact:x,text:v}=Va(h.body);o.push([i.generateLocator(f,"label",v,{exact:x})]);continue}if(h.name==="internal:role"){const x=xs(h.body,!0),v={attrs:[]};for(const T of x.attributes)T.name==="name"?(v.exact=T.caseSensitive,v.name=T.value):(T.name==="level"&&typeof T.value=="string"&&(T.value=+T.value),v.attrs.push({name:T.name==="include-hidden"?"includeHidden":T.name,value:T.value}));o.push([i.generateLocator(f,"role",x.name,v)]);continue}if(h.name==="internal:testid"){const x=xs(h.body,!0),{value:v}=x.attributes[0];o.push([i.generateLocator(f,"test-id",v)]);continue}if(h.name==="internal:attr"){const x=xs(h.body,!0),{name:v,value:T,caseSensitive:A}=x.attributes[0],C=T,L=!!A;if(v==="placeholder"){o.push([i.generateLocator(f,"placeholder",C,{exact:L})]);continue}if(v==="alt"){o.push([i.generateLocator(f,"alt",C,{exact:L})]);continue}if(v==="title"){o.push([i.generateLocator(f,"title",C,{exact:L})]);continue}}if(h.name==="internal:control"&&h.body==="enter-frame"){const x=o[o.length-1],v=a[d-1],T=x.map(A=>i.chainLocators([A,i.generateLocator(f,"frame","")]));["xpath","css"].includes(v.name)&&T.push(i.generateLocator(f,"frame-locator",Rn({parts:[v]})),i.generateLocator(f,"frame-locator",Rn({parts:[v]},!0))),x.splice(0,x.length,...T),c="frame-locator";continue}const y=a[d+1],m=Rn({parts:[h]}),_=i.generateLocator(f,"default",m);if(y&&["internal:has-text","internal:has-not-text"].includes(y.name)){const{exact:x,text:v}=Va(y.body);if(!x){const T=i.generateLocator("locator",y.name==="internal:has-text"?"has-text":"has-not-text",v,{exact:x}),A={};y.name==="internal:has-text"?A.hasText=v:A.hasNotText=v;const C=i.generateLocator(f,"default",m,A);o.push([i.chainLocators([_,T]),C]),d++;continue}}let b;if(["xpath","css"].includes(h.name)){const x=Rn({parts:[h]},!0);b=i.generateLocator(f,"default",x)}o.push([_,b].filter(Boolean))}return Qx(i,o,s)}function Qx(i,e,t){const s=e.map(()=>""),a=[],o=c=>{if(c===e.length)return a.push(i.chainLocators(s)),a.length<t;for(const d of e[c])if(s[c]=d,!o(c+1))return!1;return!0};return o(0),a}function Va(i){let e=!1;const t=i.match(/^\/(.*)\/([igm]*)$/);return t?{text:new RegExp(t[1],t[2])}:(i.endsWith('"')?(i=JSON.parse(i),e=!0):i.endsWith('"s')?(i=JSON.parse(i.substring(0,i.length-1)),e=!0):i.endsWith('"i')&&(i=JSON.parse(i.substring(0,i.length-1)),e=!1),{exact:e,text:i})}class eT{constructor(e){this.preferredQuote=e}generateLocator(e,t,s,a={}){switch(t){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, { hasText: ${this.toHasText(a.hasText)} })`:a.hasNotText!==void 0?`locator(${this.quote(s)}, { hasNotText: ${this.toHasText(a.hasNotText)} })`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${s==="true"?"true":"false"} })`;case"role":const o=[];Ke(a.name)?o.push(`name: ${this.regexToSourceString(a.name)}`):typeof a.name=="string"&&(o.push(`name: ${this.quote(a.name)}`),a.exact&&o.push("exact: true"));for(const{name:d,value:h}of a.attrs)o.push(`${d}: ${typeof h=="string"?this.quote(h):h}`);const c=o.length?`, { ${o.join(", ")} }`:"";return`getByRole(${this.quote(s)}${c})`;case"has-text":return`filter({ hasText: ${this.toHasText(s)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(s)} })`;case"has":return`filter({ has: page.${s} })`;case"hasNot":return`filter({ hasNot: page.${s} })`;case"and":return`and(page.${s})`;case"or":return`or(page.${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("getByText",s,!!a.exact);case"alt":return this.toCallWithExact("getByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact("getByLabel",s,!!a.exact);case"title":return this.toCallWithExact("getByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return Oc(String(e))}toCallWithExact(e,t,s){return Ke(t)?`${e}(${this.regexToSourceString(t)})`:s?`${e}(${this.quote(t)}, { exact: true })`:`${e}(${this.quote(t)})`}toHasText(e){return Ke(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return Ke(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return Lc(e,this.preferredQuote??"'")}}class tT{generateLocator(e,t,s,a={}){switch(t){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, has_text=${this.toHasText(a.hasText)})`:a.hasNotText!==void 0?`locator(${this.quote(s)}, has_not_text=${this.toHasText(a.hasNotText)})`:`locator(${this.quote(s)})`;case"frame-locator":return`frame_locator(${this.quote(s)})`;case"frame":return"content_frame";case"nth":return`nth(${s})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${s==="true"?"True":"False"})`;case"role":const o=[];Ke(a.name)?o.push(`name=${this.regexToString(a.name)}`):typeof a.name=="string"&&(o.push(`name=${this.quote(a.name)}`),a.exact&&o.push("exact=True"));for(const{name:d,value:h}of a.attrs){let f=typeof h=="string"?this.quote(h):h;typeof h=="boolean"&&(f=h?"True":"False"),o.push(`${o0(d)}=${f}`)}const c=o.length?`, ${o.join(", ")}`:"";return`get_by_role(${this.quote(s)}${c})`;case"has-text":return`filter(has_text=${this.toHasText(s)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(s)})`;case"has":return`filter(has=page.${s})`;case"hasNot":return`filter(has_not=page.${s})`;case"and":return`and_(page.${s})`;case"or":return`or_(page.${s})`;case"chain":return`locator(${s})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("get_by_text",s,!!a.exact);case"alt":return this.toCallWithExact("get_by_alt_text",s,!!a.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",s,!!a.exact);case"label":return this.toCallWithExact("get_by_label",s,!!a.exact);case"title":return this.toCallWithExact("get_by_title",s,!!a.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToString(e){const t=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${Oc(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${t})`}toCallWithExact(e,t,s){return Ke(t)?`${e}(${this.regexToString(t)})`:s?`${e}(${this.quote(t)}, exact=True)`:`${e}(${this.quote(t)})`}toHasText(e){return Ke(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return Ke(e)?this.regexToString(e):this.quote(e)}quote(e){return Lc(e,'"')}}class nT{generateLocator(e,t,s,a={}){let o;switch(e){case"page":o="Page";break;case"frame-locator":o="FrameLocator";break;case"locator":o="Locator";break}switch(t){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(a.hasText)}))`:a.hasNotText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(a.hasNotText)}))`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${o}.FilterOptions().setVisible(${s==="true"?"true":"false"}))`;case"role":const c=[];Ke(a.name)?c.push(`.setName(${this.regexToString(a.name)})`):typeof a.name=="string"&&(c.push(`.setName(${this.quote(a.name)})`),a.exact&&c.push(".setExact(true)"));for(const{name:h,value:f}of a.attrs)c.push(`.set${vc(h)}(${typeof f=="string"?this.quote(f):f})`);const d=c.length?`, new ${o}.GetByRoleOptions()${c.join("")}`:"";return`getByRole(AriaRole.${o0(s).toUpperCase()}${d})`;case"has-text":return`filter(new ${o}.FilterOptions().setHasText(${this.toHasText(s)}))`;case"has-not-text":return`filter(new ${o}.FilterOptions().setHasNotText(${this.toHasText(s)}))`;case"has":return`filter(new ${o}.FilterOptions().setHas(page.${s}))`;case"hasNot":return`filter(new ${o}.FilterOptions().setHasNot(page.${s}))`;case"and":return`and(page.${s})`;case"or":return`or(page.${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact(o,"getByText",s,!!a.exact);case"alt":return this.toCallWithExact(o,"getByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact(o,"getByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact(o,"getByLabel",s,!!a.exact);case"title":return this.toCallWithExact(o,"getByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToString(e){const t=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(Oc(e.source))}${t})`}toCallWithExact(e,t,s,a){return Ke(s)?`${t}(${this.regexToString(s)})`:a?`${t}(${this.quote(s)}, new ${e}.${vc(t)}Options().setExact(true))`:`${t}(${this.quote(s)})`}toHasText(e){return Ke(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return Ke(e)?this.regexToString(e):this.quote(e)}quote(e){return Lc(e,'"')}}class iT{generateLocator(e,t,s,a={}){switch(t){case"default":return a.hasText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasText(a.hasText)} })`:a.hasNotText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasNotText(a.hasNotText)} })`:`Locator(${this.quote(s)})`;case"frame-locator":return`FrameLocator(${this.quote(s)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${s})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${s==="true"?"true":"false"} })`;case"role":const o=[];Ke(a.name)?o.push(`NameRegex = ${this.regexToString(a.name)}`):typeof a.name=="string"&&(o.push(`Name = ${this.quote(a.name)}`),a.exact&&o.push("Exact = true"));for(const{name:d,value:h}of a.attrs)o.push(`${vc(d)} = ${typeof h=="string"?this.quote(h):h}`);const c=o.length?`, new() { ${o.join(", ")} }`:"";return`GetByRole(AriaRole.${vc(s)}${c})`;case"has-text":return`Filter(new() { ${this.toHasText(s)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(s)} })`;case"has":return`Filter(new() { Has = Page.${s} })`;case"hasNot":return`Filter(new() { HasNot = Page.${s} })`;case"and":return`And(Page.${s})`;case"or":return`Or(Page.${s})`;case"chain":return`Locator(${s})`;case"test-id":return`GetByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("GetByText",s,!!a.exact);case"alt":return this.toCallWithExact("GetByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact("GetByLabel",s,!!a.exact);case"title":return this.toCallWithExact("GetByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToString(e){const t=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(Oc(e.source))}${t})`}toCallWithExact(e,t,s){return Ke(t)?`${e}(${this.regexToString(t)})`:s?`${e}(${this.quote(t)}, new() { Exact = true })`:`${e}(${this.quote(t)})`}toHasText(e){return Ke(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return Ke(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return Ke(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return Lc(e,'"')}}class sT{generateLocator(e,t,s,a={}){return JSON.stringify({kind:t,body:ac(s),options:rT(a)})}chainLocators(e){const t=e.map(s=>JSON.parse(s));for(let s=0;s<t.length-1;++s)t[s].next=t[s+1];return JSON.stringify(t[0])}}function ac(i){return Ke(i)?`/${i.source}/${i.flags}`:i}function rT(i){const e={...i};return Ke(e.name)&&(e.name=ac(e.name)),Ke(e.hasText)&&(e.hasText=ac(e.hasText)),Ke(e.hasNotText)&&(e.hasNotText=ac(e.hasNotText)),e}const u0={javascript:eT,python:tT,java:nT,csharp:iT,jsonl:sT};function Ke(i){return i instanceof RegExp}const D_=new Map;function aT({name:i,rootItem:e,render:t,title:s,icon:a,isError:o,isVisible:c,selectedItem:d,onAccepted:h,onSelected:f,onHighlighted:y,treeState:m,setTreeState:_,noItemsMessage:b,dataTestId:x,autoExpandDepth:v}){const T=P.useMemo(()=>oT(e,d,m.expandedItems,v||0,c),[e,d,m,v,c]),A=P.useRef(null),[C,L]=P.useState(),[j,D]=P.useState(!1);P.useEffect(()=>{y==null||y(C)},[y,C]),P.useEffect(()=>{const q=A.current;if(!q)return;const O=()=>{D_.set(i,q.scrollTop)};return q.addEventListener("scroll",O,{passive:!0}),()=>q.removeEventListener("scroll",O)},[i]),P.useEffect(()=>{A.current&&(A.current.scrollTop=D_.get(i)||0)},[i]);const F=P.useCallback(q=>{const{expanded:O}=T.get(q);if(O){for(let Q=d;Q;Q=Q.parent)if(Q===q){f==null||f(q);break}m.expandedItems.set(q.id,!1)}else m.expandedItems.set(q.id,!0);_({...m})},[T,d,f,m,_]),B=P.useCallback(q=>{const{expanded:O}=T.get(q),Q=[q];for(;Q.length;){const se=Q.pop();Q.push(...se.children),m.expandedItems.set(se.id,!O)}_({...m})},[T,m,_]);return w.jsx("div",{className:We("tree-view vbox",i+"-tree-view"),"data-testid":x||i+"-tree",children:w.jsxs("div",{className:We("tree-view-content"),role:T.size>0?"tree":void 0,tabIndex:0,onKeyDown:q=>{if(d&&q.key==="Enter"){h==null||h(d);return}if(q.key!=="ArrowDown"&&q.key!=="ArrowUp"&&q.key!=="ArrowLeft"&&q.key!=="ArrowRight")return;if(q.stopPropagation(),q.preventDefault(),d&&q.key==="ArrowLeft"){const{expanded:Q,parent:se}=T.get(d);Q?(m.expandedItems.set(d.id,!1),_({...m})):se&&(f==null||f(se));return}if(d&&q.key==="ArrowRight"){d.children.length&&(m.expandedItems.set(d.id,!0),_({...m}));return}let O=d;if(q.key==="ArrowDown"&&(d?O=T.get(d).next:T.size&&(O=[...T.keys()][0])),q.key==="ArrowUp"){if(d)O=T.get(d).prev;else if(T.size){const Q=[...T.keys()];O=Q[Q.length-1]}}y==null||y(void 0),O&&(D(!0),f==null||f(O)),L(void 0)},ref:A,children:[b&&T.size===0&&w.jsx("div",{className:"tree-view-empty",children:b}),e.children.map(q=>T.get(q)&&w.jsx(d0,{item:q,treeItems:T,selectedItem:d,onSelected:f,onAccepted:h,isError:o,toggleExpanded:F,toggleSubtree:B,highlightedItem:C,setHighlightedItem:L,render:t,icon:a,title:s,isKeyboardNavigation:j,setIsKeyboardNavigation:D},q.id))]})})}function d0({item:i,treeItems:e,selectedItem:t,onSelected:s,highlightedItem:a,setHighlightedItem:o,isError:c,onAccepted:d,toggleExpanded:h,toggleSubtree:f,render:y,title:m,icon:_,isKeyboardNavigation:b,setIsKeyboardNavigation:x}){const v=P.useId(),T=P.useRef(null);P.useEffect(()=>{t===i&&b&&T.current&&(Lb(T.current),x(!1))},[i,t,b,x]);const A=e.get(i),C=A.depth,L=A.expanded;let j="codicon-blank";typeof L=="boolean"&&(j=L?"codicon-chevron-down":"codicon-chevron-right");const D=y(i),F=L&&i.children.length?i.children:[],B=m==null?void 0:m(i),q=(_==null?void 0:_(i))||"codicon-blank";return w.jsxs("div",{ref:T,role:"treeitem","aria-selected":i===t,"aria-expanded":L,"aria-controls":v,title:B,className:"vbox",style:{flex:"none"},children:[w.jsxs("div",{onDoubleClick:()=>d==null?void 0:d(i),className:We("tree-view-entry",t===i&&"selected",a===i&&"highlighted",(c==null?void 0:c(i))&&"error"),onClick:()=>s==null?void 0:s(i),onMouseEnter:()=>o(i),onMouseLeave:()=>o(void 0),children:[C?new Array(C).fill(0).map((O,Q)=>w.jsx("div",{className:"tree-view-indent"},"indent-"+Q)):void 0,w.jsx("div",{"aria-hidden":"true",className:"codicon "+j,style:{minWidth:16,marginRight:4},onDoubleClick:O=>{O.preventDefault(),O.stopPropagation()},onClick:O=>{O.stopPropagation(),O.preventDefault(),O.altKey?f(i):h(i)}}),_&&w.jsx("div",{className:"codicon "+q,style:{minWidth:16,marginRight:4},"aria-label":"["+q.replace("codicon","icon")+"]"}),typeof D=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:D}):D]}),!!F.length&&w.jsx("div",{id:v,role:"group",children:F.map(O=>e.get(O)&&w.jsx(d0,{item:O,treeItems:e,selectedItem:t,onSelected:s,onAccepted:d,isError:c,toggleExpanded:h,toggleSubtree:f,highlightedItem:a,setHighlightedItem:o,render:y,title:m,icon:_,isKeyboardNavigation:b,setIsKeyboardNavigation:x},O.id))})]})}function oT(i,e,t,s,a=()=>!0){if(!a(i))return new Map;const o=new Map,c=new Set;for(let f=e==null?void 0:e.parent;f;f=f.parent)c.add(f.id);let d=null;const h=(f,y)=>{for(const m of f.children){if(!a(m))continue;const _=c.has(m.id)||t.get(m.id),b=s>y&&o.size<25&&_!==!1,x=m.children.length?_??b:void 0,v={depth:y,expanded:x,parent:i===f?null:f,next:null,prev:d};d&&(o.get(d).next=m),d=m,o.set(m,v),x&&h(m,y+1)}};return h(i,0),o}const qt=P.forwardRef(function({children:e,title:t="",icon:s,disabled:a=!1,toggled:o=!1,onClick:c=()=>{},style:d,testId:h,className:f,ariaLabel:y},m){return w.jsxs("button",{ref:m,className:We(f,"toolbar-button",s,o&&"toggled"),onMouseDown:L_,onClick:c,onDoubleClick:L_,title:t,disabled:!!a,style:d,"data-testid":h,"aria-label":y||t,children:[s&&w.jsx("span",{className:`codicon codicon-${s}`,style:e?{marginRight:5}:{}}),e]})}),L_=i=>{i.stopPropagation(),i.preventDefault()};function h0(i){return i==="scheduled"?"codicon-clock":i==="running"?"codicon-loading":i==="failed"?"codicon-error":i==="passed"?"codicon-check":i==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function lT(i){return i==="scheduled"?"Pending":i==="running"?"Running":i==="failed"?"Failed":i==="passed"?"Passed":i==="skipped"?"Skipped":"Did not run"}const cT=aT,uT=({actions:i,selectedAction:e,selectedTime:t,setSelectedTime:s,treeState:a,setTreeState:o,sdkLanguage:c,onSelected:d,onHighlighted:h,revealConsole:f,revealActionAttachment:y,isLive:m})=>{const{rootItem:_,itemMap:b}=P.useMemo(()=>Ib(i),[i]),{selectedItem:x}=P.useMemo(()=>({selectedItem:e?b.get(e.callId):void 0}),[b,e]),v=P.useCallback(D=>{var F;return!!((F=D.action.error)!=null&&F.message)},[]),T=P.useCallback(D=>s({minimum:D.action.startTime,maximum:D.action.endTime}),[s]),A=P.useCallback(D=>{var B;const F=!!y&&!!((B=D.action.attachments)!=null&&B.length);return Cf(D.action,{sdkLanguage:c,revealConsole:f,revealActionAttachment:()=>y==null?void 0:y(D.action.callId),isLive:m,showDuration:!0,showBadges:!0,showAttachments:F})},[m,f,y,c]),C=P.useCallback(D=>!t||!D.action||D.action.startTime<=t.maximum&&D.action.endTime>=t.minimum,[t]),L=P.useCallback(D=>{d==null||d(D.action)},[d]),j=P.useCallback(D=>{h==null||h(D==null?void 0:D.action)},[h]);return w.jsxs("div",{className:"vbox",children:[t&&w.jsxs("div",{className:"action-list-show-all",onClick:()=>s(void 0),children:[w.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),w.jsx(cT,{name:"actions",rootItem:_,treeState:a,setTreeState:o,selectedItem:x,onSelected:L,onHighlighted:j,onAccepted:T,isError:v,isVisible:C,render:A})]})},Cf=(i,e)=>{var T;const{sdkLanguage:t,revealConsole:s,revealActionAttachment:a,isLive:o,showDuration:c,showBadges:d,showAttachments:h}=e,{errors:f,warnings:y}=Tx(i),m=i.params.selector?Wx(t||"javascript",i.params.selector):void 0,_=i.class==="Test"&&i.method==="test.step"&&((T=i.annotations)==null?void 0:T.some(A=>A.type==="skip"));let b="";i.endTime?b=kt(i.endTime-i.startTime):i.error?b="Timed out":o||(b="-");const{elements:x,title:v}=f0(i);return w.jsxs("div",{className:"action-title vbox",children:[w.jsxs("div",{className:"hbox",children:[w.jsx("span",{className:"action-title-method",title:v,children:x}),(c||d||h||_)&&w.jsx("div",{className:"spacer"}),h&&w.jsx(qt,{icon:"attach",title:"Open Attachment",onClick:()=>a==null?void 0:a()}),c&&!_&&w.jsx("div",{className:"action-duration",children:b||w.jsx("span",{className:"codicon codicon-loading"})}),_&&w.jsx("span",{className:We("action-skipped","codicon",h0("skipped")),title:"skipped"}),d&&w.jsxs("div",{className:"action-icons",onClick:()=>s==null?void 0:s(),children:[!!f&&w.jsxs("div",{className:"action-icon",children:[w.jsx("span",{className:"codicon codicon-error"}),w.jsx("span",{className:"action-icon-value",children:f})]}),!!y&&w.jsxs("div",{className:"action-icon",children:[w.jsx("span",{className:"codicon codicon-warning"}),w.jsx("span",{className:"action-icon-value",children:y})]})]})]}),m&&w.jsx("div",{className:"action-title-selector",title:m,children:m})]})};function f0(i){var d;let e=i.title??((d=wf.get(i.class+"."+i.method))==null?void 0:d.title)??i.method;e=e.replace(/\n/g," ");const t=[],s=[];let a=0;const o=/\{([^}]+)\}/g;let c;for(;(c=o.exec(e))!==null;){const[h,f]=c,y=e.slice(a,c.index);t.push(y),s.push(y);const m=Hb(i.params,f);m===void 0?(t.push(h),s.push(h)):c.index===0?(t.push(m),s.push(m)):(t.push(w.jsx("span",{className:"action-title-param",children:m},t.length)),s.push(m)),a=c.index+h.length}if(a<e.length){const h=e.slice(a);t.push(h),s.push(h)}return{elements:t,title:s.join("")}}const kf=({value:i,description:e})=>{const[t,s]=P.useState("copy"),a=P.useCallback(()=>{(typeof i=="function"?i():Promise.resolve(i)).then(c=>{navigator.clipboard.writeText(c).then(()=>{s("check"),setTimeout(()=>{s("copy")},3e3)},()=>{s("close")})},()=>{s("close")})},[i]);return w.jsx(qt,{title:e||"Copy",icon:t,onClick:a})},oc=({value:i,description:e,copiedDescription:t=e,style:s})=>{const[a,o]=P.useState(!1),c=P.useCallback(async()=>{const d=typeof i=="function"?await i():i;await navigator.clipboard.writeText(d),o(!0),setTimeout(()=>o(!1),3e3)},[i]);return w.jsx(qt,{style:s,title:e,onClick:c,className:"copy-to-clipboard-text-button",children:a?t:e})},As=({text:i})=>w.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:i}),dT=({action:i,startTimeOffset:e,sdkLanguage:t})=>{const s=P.useMemo(()=>Object.keys((i==null?void 0:i.params)??{}).filter(d=>d!=="info"),[i]);if(!i)return w.jsx(As,{text:"No action selected"});const a=i.startTime-e,o=kt(a),{title:c}=f0(i);return w.jsxs("div",{className:"call-tab",children:[w.jsx("div",{className:"call-line",children:c}),w.jsx("div",{className:"call-section",children:"Time"}),Fl({name:"start",type:"literal",text:o}),Fl({name:"duration",type:"literal",text:hT(i)}),!!s.length&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",children:"Parameters"}),s.map(d=>Fl(O_(i,d,i.params[d],t)))]}),!!i.result&&w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(i.result).map(d=>Fl(O_(i,d,i.result[d],t)))]})]})};function hT(i){return i.endTime?kt(i.endTime-i.startTime):i.error?"Timed Out":"Running"}function Fl(i){let e=i.text.replace(/\n/g,"↵");return i.type==="string"&&(e=`"${e}"`),w.jsxs("div",{className:"call-line",children:[i.name,":",w.jsx("span",{className:We("call-value",i.type),title:i.text,children:e}),["literal","string","number","object","locator"].includes(i.type)&&w.jsx(kf,{value:i.text})]},i.name)}function O_(i,e,t,s){const a=i.method.includes("eval")||i.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&a)&&(t=wc(t.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&a||e==="received"&&i.method==="expect")&&(t=wc(t,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:qi(s||"javascript",i.params.selector),type:"locator",name:"locator"};const o=typeof t;return o!=="object"||t===null?{text:String(t),type:o,name:e}:t.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(t).slice(0,1e3),type:"object",name:e}}function wc(i,e){if(i.n!==void 0)return i.n;if(i.s!==void 0)return i.s;if(i.b!==void 0)return i.b;if(i.v!==void 0){if(i.v==="undefined")return;if(i.v==="null")return null;if(i.v==="NaN")return NaN;if(i.v==="Infinity")return 1/0;if(i.v==="-Infinity")return-1/0;if(i.v==="-0")return-0}if(i.d!==void 0)return new Date(i.d);if(i.r!==void 0)return new RegExp(i.r.p,i.r.f);if(i.a!==void 0)return i.a.map(t=>wc(t,e));if(i.o!==void 0){const t={};for(const{k:s,v:a}of i.o)t[s]=wc(a,e);return t}return i.h!==void 0?e===void 0?"<object>":e[i.h]:"<object>"}const R_=new Map;function Rc({name:i,items:e=[],id:t,render:s,icon:a,isError:o,isWarning:c,isInfo:d,selectedItem:h,onAccepted:f,onSelected:y,onHighlighted:m,onIconClicked:_,noItemsMessage:b,dataTestId:x,notSelectable:v,ariaLabel:T}){const A=P.useRef(null),[C,L]=P.useState();return P.useEffect(()=>{m==null||m(C)},[m,C]),P.useEffect(()=>{const j=A.current;if(!j)return;const D=()=>{R_.set(i,j.scrollTop)};return j.addEventListener("scroll",D,{passive:!0}),()=>j.removeEventListener("scroll",D)},[i]),P.useEffect(()=>{A.current&&(A.current.scrollTop=R_.get(i)||0)},[i]),w.jsx("div",{className:We("list-view vbox",i+"-list-view"),role:e.length>0?"list":void 0,"aria-label":T,children:w.jsxs("div",{className:We("list-view-content",v&&"not-selectable"),tabIndex:0,onKeyDown:j=>{var q;if(h&&j.key==="Enter"){f==null||f(h,e.indexOf(h));return}if(j.key!=="ArrowDown"&&j.key!=="ArrowUp")return;j.stopPropagation(),j.preventDefault();const D=h?e.indexOf(h):-1;let F=D;j.key==="ArrowDown"&&(D===-1?F=0:F=Math.min(D+1,e.length-1)),j.key==="ArrowUp"&&(D===-1?F=e.length-1:F=Math.max(D-1,0));const B=(q=A.current)==null?void 0:q.children.item(F);Lb(B||void 0),m==null||m(void 0),y==null||y(e[F],F),L(void 0)},ref:A,children:[b&&e.length===0&&w.jsx("div",{className:"list-view-empty",children:b}),e.map((j,D)=>{const F=s(j,D);return w.jsxs("div",{onDoubleClick:()=>f==null?void 0:f(j,D),role:"listitem",className:We("list-view-entry",h===j&&"selected",!v&&C===j&&"highlighted",(o==null?void 0:o(j,D))&&"error",(c==null?void 0:c(j,D))&&"warning",(d==null?void 0:d(j,D))&&"info"),"aria-selected":h===j,onClick:()=>y==null?void 0:y(j,D),onMouseEnter:()=>L(j),onMouseLeave:()=>L(void 0),children:[a&&w.jsx("div",{className:"codicon "+(a(j,D)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:B=>{B.preventDefault(),B.stopPropagation()},onClick:B=>{B.stopPropagation(),B.preventDefault(),_==null||_(j,D)}}),typeof F=="string"?w.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:F}):F]},(t==null?void 0:t(j,D))||D)})]})})}const fT=Rc,gT=({action:i,isLive:e})=>{const t=P.useMemo(()=>{var c;if(!i||!i.log.length)return[];const s=i.log,a=i.context.wallTime-i.context.startTime,o=[];for(let d=0;d<s.length;++d){let h="";if(s[d].time!==-1){const f=(c=s[d])==null?void 0:c.time;d+1<s.length?h=kt(s[d+1].time-f):i.endTime>0?h=kt(i.endTime-f):e?h=kt(Date.now()-a-f):h="-"}o.push({message:s[d].message,time:h})}return o},[i,e]);return t.length?w.jsx(fT,{name:"log",ariaLabel:"Log entries",items:t,render:s=>w.jsxs("div",{className:"log-list-item",children:[w.jsx("span",{className:"log-list-duration",children:s.time}),s.message]}),notSelectable:!0}):w.jsx(As,{text:"No log entries"})};function mo(i,e){const t=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,s=[];let a,o={},c=!1,d=e==null?void 0:e.fg,h=e==null?void 0:e.bg;for(;(a=t.exec(i))!==null;){const[,,f,,y]=a;if(f){const m=+f;switch(m){case 0:o={};break;case 1:o["font-weight"]="bold";break;case 2:o.opacity="0.8";break;case 3:o["font-style"]="italic";break;case 4:o["text-decoration"]="underline";break;case 7:c=!0;break;case 8:o.display="none";break;case 9:o["text-decoration"]="line-through";break;case 22:delete o["font-weight"],delete o["font-style"],delete o.opacity,delete o["text-decoration"];break;case 23:delete o["font-weight"],delete o["font-style"],delete o.opacity;break;case 24:delete o["text-decoration"];break;case 27:c=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:d=j_[m-30];break;case 39:d=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:h=j_[m-40];break;case 49:h=e==null?void 0:e.bg;break;case 53:o["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:d=H_[m-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:h=H_[m-100];break}}else if(y){const m={...o},_=c?h:d;_!==void 0&&(m.color=_);const b=c?d:h;b!==void 0&&(m["background-color"]=b),s.push(`<span style="${mT(m)}">${pT(y)}</span>`)}}return s.join("")}const j_={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)"},H_={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 pT(i){return i.replace(/[&"<>]/g,e=>({"&":"&",'"':""","<":"<",">":">"})[e])}function mT(i){return Object.entries(i).map(([e,t])=>`${e}: ${t}`).join("; ")}const yT=({error:i})=>{const e=P.useMemo(()=>mo(i),[i]);return w.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},g0=({cursor:i,onPaneMouseMove:e,onPaneMouseUp:t,onPaneDoubleClick:s})=>(bt.useEffect(()=>{const a=document.createElement("div");return a.style.position="fixed",a.style.top="0",a.style.right="0",a.style.bottom="0",a.style.left="0",a.style.zIndex="9999",a.style.cursor=i,document.body.appendChild(a),e&&a.addEventListener("mousemove",e),t&&a.addEventListener("mouseup",t),s&&document.body.addEventListener("dblclick",s),()=>{e&&a.removeEventListener("mousemove",e),t&&a.removeEventListener("mouseup",t),s&&document.body.removeEventListener("dblclick",s),document.body.removeChild(a)}},[i,e,t,s]),w.jsx(w.Fragment,{})),_T={position:"absolute",top:0,right:0,bottom:0,left:0},p0=({orientation:i,offsets:e,setOffsets:t,resizerColor:s,resizerWidth:a,minColumnWidth:o})=>{const c=o||0,[d,h]=bt.useState(null),[f,y]=Es(),m={position:"absolute",right:i==="horizontal"?void 0:0,bottom:i==="horizontal"?0:void 0,width:i==="horizontal"?7:void 0,height:i==="horizontal"?void 0:7,borderTopWidth:i==="horizontal"?void 0:(7-a)/2,borderRightWidth:i==="horizontal"?(7-a)/2:void 0,borderBottomWidth:i==="horizontal"?void 0:(7-a)/2,borderLeftWidth:i==="horizontal"?(7-a)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:i==="horizontal"?"ew-resize":"ns-resize"};return w.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-a)/2,zIndex:100,pointerEvents:"none"},ref:y,children:[!!d&&w.jsx(g0,{cursor:i==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>h(null),onPaneMouseMove:_=>{if(!_.buttons)h(null);else if(d){const b=i==="horizontal"?_.clientX-d.clientX:_.clientY-d.clientY,x=d.offset+b,v=d.index>0?e[d.index-1]:0,T=i==="horizontal"?f.width:f.height,A=Math.min(Math.max(v+c,x),T-c)-e[d.index];for(let C=d.index;C<e.length;++C)e[C]=e[C]+A;t([...e])}}}),e.map((_,b)=>w.jsx("div",{style:{...m,top:i==="horizontal"?0:_,left:i==="horizontal"?_:0,pointerEvents:"initial"},onMouseDown:x=>h({clientX:x.clientX,clientY:x.clientY,offset:_,index:b}),children:w.jsx("div",{style:{..._T,background:s}})},b))]})};async function Eh(i){const e=new Image;return i&&(e.src=i,await new Promise((t,s)=>{e.onload=t,e.onerror=t})),e}const ef={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
|
|
49
|
+
`+u.stack}}var Ki=Object.prototype.hasOwnProperty,di=i.unstable_scheduleCallback,Yr=i.unstable_cancelCallback,hi=i.unstable_shouldYield,nu=i.unstable_requestPaint,xt=i.unstable_now,iu=i.unstable_getCurrentPriorityLevel,ko=i.unstable_ImmediatePriority,Kr=i.unstable_UserBlockingPriority,fi=i.unstable_NormalPriority,su=i.unstable_LowPriority,No=i.unstable_IdlePriority,ru=i.log,Ji=i.unstable_setDisableYieldValue,$n=null,ct=null;function En(n){if(typeof ru=="function"&&Ji(n),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode($n,n)}catch{}}var Tt=Math.clz32?Math.clz32:ue,au=Math.log,Mo=Math.LN2;function ue(n){return n>>>=0,n===0?32:31-(au(n)/Mo|0)|0}var An=256,Zt=262144,Do=4194304;function Wi(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Lo(n,r,l){var u=n.pendingLanes;if(u===0)return 0;var g=0,p=n.suspendedLanes,S=n.pingedLanes;n=n.warmLanes;var E=u&134217727;return E!==0?(u=E&~p,u!==0?g=Wi(u):(S&=E,S!==0?g=Wi(S):l||(l=E&~n,l!==0&&(g=Wi(l))))):(E=u&~p,E!==0?g=Wi(E):S!==0?g=Wi(S):l||(l=u&~n,l!==0&&(g=Wi(l)))),g===0?0:r!==0&&r!==g&&(r&p)===0&&(p=g&-g,l=r&-r,p>=l||p===32&&(l&4194048)!==0)?r:g}function Jr(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function jS(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mg(){var n=Do;return Do<<=1,(Do&62914560)===0&&(Do=4194304),n}function ou(n){for(var r=[],l=0;31>l;l++)r.push(n);return r}function Wr(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function HS(n,r,l,u,g,p){var S=n.pendingLanes;n.pendingLanes=l,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=l,n.entangledLanes&=l,n.errorRecoveryDisabledLanes&=l,n.shellSuspendCounter=0;var E=n.entanglements,k=n.expirationTimes,z=n.hiddenUpdates;for(l=S&~l;0<l;){var V=31-Tt(l),K=1<<V;E[V]=0,k[V]=-1;var $=z[V];if($!==null)for(z[V]=null,V=0;V<$.length;V++){var U=$[V];U!==null&&(U.lane&=-536870913)}l&=~K}u!==0&&yg(n,u,0),p!==0&&g===0&&n.tag!==0&&(n.suspendedLanes|=p&~(S&~r))}function yg(n,r,l){n.pendingLanes|=r,n.suspendedLanes&=~r;var u=31-Tt(r);n.entangledLanes|=r,n.entanglements[u]=n.entanglements[u]|1073741824|l&261930}function _g(n,r){var l=n.entangledLanes|=r;for(n=n.entanglements;l;){var u=31-Tt(l),g=1<<u;g&r|n[u]&r&&(n[u]|=r),l&=~g}}function bg(n,r){var l=r&-r;return l=(l&42)!==0?1:lu(l),(l&(n.suspendedLanes|r))!==0?0:l}function lu(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function cu(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function vg(){var n=Z.p;return n!==0?n:(n=window.event,n===void 0?32:r_(n.type))}function Sg(n,r){var l=Z.p;try{return Z.p=n,r()}finally{Z.p=l}}var gi=Math.random().toString(36).slice(2),ft="__reactFiber$"+gi,Mt="__reactProps$"+gi,Ds="__reactContainer$"+gi,uu="__reactEvents$"+gi,zS="__reactListeners$"+gi,$S="__reactHandles$"+gi,wg="__reactResources$"+gi,Zr="__reactMarker$"+gi;function du(n){delete n[ft],delete n[Mt],delete n[uu],delete n[zS],delete n[$S]}function Ls(n){var r=n[ft];if(r)return r;for(var l=n.parentNode;l;){if(r=l[Ds]||l[ft]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(n=qy(n);n!==null;){if(l=n[ft])return l;n=qy(n)}return r}n=l,l=n.parentNode}return null}function Os(n){if(n=n[ft]||n[Ds]){var r=n.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return n}return null}function Qr(n){var r=n.tag;if(r===5||r===26||r===27||r===6)return n.stateNode;throw Error(s(33))}function Rs(n){var r=n[wg];return r||(r=n[wg]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function ut(n){n[Zr]=!0}var xg=new Set,Tg={};function Zi(n,r){js(n,r),js(n+"Capture",r)}function js(n,r){for(Tg[n]=r,n=0;n<r.length;n++)xg.add(r[n])}var BS=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Eg={},Ag={};function IS(n){return Ki.call(Ag,n)?!0:Ki.call(Eg,n)?!1:BS.test(n)?Ag[n]=!0:(Eg[n]=!0,!1)}function Oo(n,r,l){if(IS(r))if(l===null)n.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":n.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(r);return}}n.setAttribute(r,""+l)}}function Ro(n,r,l){if(l===null)n.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttribute(r,""+l)}}function Bn(n,r,l,u){if(u===null)n.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(l);return}n.setAttributeNS(r,l,""+u)}}function Qt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Cg(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function PS(n,r,l){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,r);if(!n.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,p=u.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return g.call(this)},set:function(S){l=""+S,p.call(this,S)}}),Object.defineProperty(n,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(S){l=""+S},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function hu(n){if(!n._valueTracker){var r=Cg(n)?"checked":"value";n._valueTracker=PS(n,r,""+n[r])}}function kg(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return n&&(u=Cg(n)?n.checked?"true":"false":n.value),n=u,n!==l?(r.setValue(n),!0):!1}function jo(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var US=/[\n"\\]/g;function en(n){return n.replace(US,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function fu(n,r,l,u,g,p,S,E){n.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.type=S:n.removeAttribute("type"),r!=null?S==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+Qt(r)):n.value!==""+Qt(r)&&(n.value=""+Qt(r)):S!=="submit"&&S!=="reset"||n.removeAttribute("value"),r!=null?gu(n,S,Qt(r)):l!=null?gu(n,S,Qt(l)):u!=null&&n.removeAttribute("value"),g==null&&p!=null&&(n.defaultChecked=!!p),g!=null&&(n.checked=g&&typeof g!="function"&&typeof g!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.name=""+Qt(E):n.removeAttribute("name")}function Ng(n,r,l,u,g,p,S,E){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(n.type=p),r!=null||l!=null){if(!(p!=="submit"&&p!=="reset"||r!=null)){hu(n);return}l=l!=null?""+Qt(l):"",r=r!=null?""+Qt(r):l,E||r===n.value||(n.value=r),n.defaultValue=r}u=u??g,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=E?n.checked:!!u,n.defaultChecked=!!u,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(n.name=S),hu(n)}function gu(n,r,l){r==="number"&&jo(n.ownerDocument)===n||n.defaultValue===""+l||(n.defaultValue=""+l)}function Hs(n,r,l,u){if(n=n.options,r){r={};for(var g=0;g<l.length;g++)r["$"+l[g]]=!0;for(l=0;l<n.length;l++)g=r.hasOwnProperty("$"+n[l].value),n[l].selected!==g&&(n[l].selected=g),g&&u&&(n[l].defaultSelected=!0)}else{for(l=""+Qt(l),r=null,g=0;g<n.length;g++){if(n[g].value===l){n[g].selected=!0,u&&(n[g].defaultSelected=!0);return}r!==null||n[g].disabled||(r=n[g])}r!==null&&(r.selected=!0)}}function Mg(n,r,l){if(r!=null&&(r=""+Qt(r),r!==n.value&&(n.value=r),l==null)){n.defaultValue!==r&&(n.defaultValue=r);return}n.defaultValue=l!=null?""+Qt(l):""}function Dg(n,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(s(92));if(Ne(u)){if(1<u.length)throw Error(s(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=Qt(r),n.defaultValue=l,u=n.textContent,u===l&&u!==""&&u!==null&&(n.value=u),hu(n)}function zs(n,r){if(r){var l=n.firstChild;if(l&&l===n.lastChild&&l.nodeType===3){l.nodeValue=r;return}}n.textContent=r}var qS=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Lg(n,r,l){var u=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?n.setProperty(r,""):r==="float"?n.cssFloat="":n[r]="":u?n.setProperty(r,l):typeof l!="number"||l===0||qS.has(r)?r==="float"?n.cssFloat=l:n[r]=(""+l).trim():n[r]=l+"px"}function Og(n,r,l){if(r!=null&&typeof r!="object")throw Error(s(62));if(n=n.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var g in r)u=r[g],r.hasOwnProperty(g)&&l[g]!==u&&Lg(n,g,u)}else for(var p in r)r.hasOwnProperty(p)&&Lg(n,p,r[p])}function pu(n){if(n.indexOf("-")===-1)return!1;switch(n){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 VS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),FS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ho(n){return FS.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function In(){}var mu=null;function yu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var $s=null,Bs=null;function Rg(n){var r=Os(n);if(r&&(n=r.stateNode)){var l=n[Mt]||null;e:switch(n=r.stateNode,r.type){case"input":if(fu(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=n;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+en(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==n&&u.form===n.form){var g=u[Mt]||null;if(!g)throw Error(s(90));fu(u,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===n.form&&kg(u)}break e;case"textarea":Mg(n,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&Hs(n,!!l.multiple,r,!1)}}}var _u=!1;function jg(n,r,l){if(_u)return n(r,l);_u=!0;try{var u=n(r);return u}finally{if(_u=!1,($s!==null||Bs!==null)&&(xl(),$s&&(r=$s,n=Bs,Bs=$s=null,Rg(r),n)))for(r=0;r<n.length;r++)Rg(n[r])}}function ea(n,r){var l=n.stateNode;if(l===null)return null;var u=l[Mt]||null;if(u===null)return null;l=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(l&&typeof l!="function")throw Error(s(231,r,typeof l));return l}var Pn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bu=!1;if(Pn)try{var ta={};Object.defineProperty(ta,"passive",{get:function(){bu=!0}}),window.addEventListener("test",ta,ta),window.removeEventListener("test",ta,ta)}catch{bu=!1}var pi=null,vu=null,zo=null;function Hg(){if(zo)return zo;var n,r=vu,l=r.length,u,g="value"in pi?pi.value:pi.textContent,p=g.length;for(n=0;n<l&&r[n]===g[n];n++);var S=l-n;for(u=1;u<=S&&r[l-u]===g[p-u];u++);return zo=g.slice(n,1<u?1-u:void 0)}function $o(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Bo(){return!0}function zg(){return!1}function Dt(n){function r(l,u,g,p,S){this._reactName=l,this._targetInst=g,this.type=u,this.nativeEvent=p,this.target=S,this.currentTarget=null;for(var E in n)n.hasOwnProperty(E)&&(l=n[E],this[E]=l?l(p):p[E]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Bo:zg,this.isPropagationStopped=zg,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Bo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Bo)},persist:function(){},isPersistent:Bo}),r}var Qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Io=Dt(Qi),na=m({},Qi,{view:0,detail:0}),GS=Dt(na),Su,wu,ia,Po=m({},na,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==ia&&(ia&&n.type==="mousemove"?(Su=n.screenX-ia.screenX,wu=n.screenY-ia.screenY):wu=Su=0,ia=n),Su)},movementY:function(n){return"movementY"in n?n.movementY:wu}}),$g=Dt(Po),XS=m({},Po,{dataTransfer:0}),YS=Dt(XS),KS=m({},na,{relatedTarget:0}),xu=Dt(KS),JS=m({},Qi,{animationName:0,elapsedTime:0,pseudoElement:0}),WS=Dt(JS),ZS=m({},Qi,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),QS=Dt(ZS),e1=m({},Qi,{data:0}),Bg=Dt(e1),t1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},n1={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"},i1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function s1(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=i1[n])?!!r[n]:!1}function Tu(){return s1}var r1=m({},na,{key:function(n){if(n.key){var r=t1[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=$o(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?n1[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tu,charCode:function(n){return n.type==="keypress"?$o(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?$o(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),a1=Dt(r1),o1=m({},Po,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ig=Dt(o1),l1=m({},na,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tu}),c1=Dt(l1),u1=m({},Qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),d1=Dt(u1),h1=m({},Po,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),f1=Dt(h1),g1=m({},Qi,{newState:0,oldState:0}),p1=Dt(g1),m1=[9,13,27,32],Eu=Pn&&"CompositionEvent"in window,sa=null;Pn&&"documentMode"in document&&(sa=document.documentMode);var y1=Pn&&"TextEvent"in window&&!sa,Pg=Pn&&(!Eu||sa&&8<sa&&11>=sa),Ug=" ",qg=!1;function Vg(n,r){switch(n){case"keyup":return m1.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Is=!1;function _1(n,r){switch(n){case"compositionend":return Fg(r);case"keypress":return r.which!==32?null:(qg=!0,Ug);case"textInput":return n=r.data,n===Ug&&qg?null:n;default:return null}}function b1(n,r){if(Is)return n==="compositionend"||!Eu&&Vg(n,r)?(n=Hg(),zo=vu=pi=null,Is=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Pg&&r.locale!=="ko"?null:r.data;default:return null}}var v1={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 Gg(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!v1[n.type]:r==="textarea"}function Xg(n,r,l,u){$s?Bs?Bs.push(u):Bs=[u]:$s=u,r=Ml(r,"onChange"),0<r.length&&(l=new Io("onChange","change",null,l,u),n.push({event:l,listeners:r}))}var ra=null,aa=null;function S1(n){Ny(n,0)}function Uo(n){var r=Qr(n);if(kg(r))return n}function Yg(n,r){if(n==="change")return r}var Kg=!1;if(Pn){var Au;if(Pn){var Cu="oninput"in document;if(!Cu){var Jg=document.createElement("div");Jg.setAttribute("oninput","return;"),Cu=typeof Jg.oninput=="function"}Au=Cu}else Au=!1;Kg=Au&&(!document.documentMode||9<document.documentMode)}function Wg(){ra&&(ra.detachEvent("onpropertychange",Zg),aa=ra=null)}function Zg(n){if(n.propertyName==="value"&&Uo(aa)){var r=[];Xg(r,aa,n,yu(n)),jg(S1,r)}}function w1(n,r,l){n==="focusin"?(Wg(),ra=r,aa=l,ra.attachEvent("onpropertychange",Zg)):n==="focusout"&&Wg()}function x1(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Uo(aa)}function T1(n,r){if(n==="click")return Uo(r)}function E1(n,r){if(n==="input"||n==="change")return Uo(r)}function A1(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Vt=typeof Object.is=="function"?Object.is:A1;function oa(n,r){if(Vt(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var l=Object.keys(n),u=Object.keys(r);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var g=l[u];if(!Ki.call(r,g)||!Vt(n[g],r[g]))return!1}return!0}function Qg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function ep(n,r){var l=Qg(n);n=0;for(var u;l;){if(l.nodeType===3){if(u=n+l.textContent.length,n<=r&&u>=r)return{node:l,offset:r-n};n=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Qg(l)}}function tp(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?tp(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function np(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=jo(n.document);r instanceof n.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)n=r.contentWindow;else break;r=jo(n.document)}return r}function ku(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var C1=Pn&&"documentMode"in document&&11>=document.documentMode,Ps=null,Nu=null,la=null,Mu=!1;function ip(n,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Mu||Ps==null||Ps!==jo(u)||(u=Ps,"selectionStart"in u&&ku(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),la&&oa(la,u)||(la=u,u=Ml(Nu,"onSelect"),0<u.length&&(r=new Io("onSelect","select",null,r,l),n.push({event:r,listeners:u}),r.target=Ps)))}function es(n,r){var l={};return l[n.toLowerCase()]=r.toLowerCase(),l["Webkit"+n]="webkit"+r,l["Moz"+n]="moz"+r,l}var Us={animationend:es("Animation","AnimationEnd"),animationiteration:es("Animation","AnimationIteration"),animationstart:es("Animation","AnimationStart"),transitionrun:es("Transition","TransitionRun"),transitionstart:es("Transition","TransitionStart"),transitioncancel:es("Transition","TransitionCancel"),transitionend:es("Transition","TransitionEnd")},Du={},sp={};Pn&&(sp=document.createElement("div").style,"AnimationEvent"in window||(delete Us.animationend.animation,delete Us.animationiteration.animation,delete Us.animationstart.animation),"TransitionEvent"in window||delete Us.transitionend.transition);function ts(n){if(Du[n])return Du[n];if(!Us[n])return n;var r=Us[n],l;for(l in r)if(r.hasOwnProperty(l)&&l in sp)return Du[n]=r[l];return n}var rp=ts("animationend"),ap=ts("animationiteration"),op=ts("animationstart"),k1=ts("transitionrun"),N1=ts("transitionstart"),M1=ts("transitioncancel"),lp=ts("transitionend"),cp=new Map,Lu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Lu.push("scrollEnd");function yn(n,r){cp.set(n,r),Zi(r,[n])}var qo=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},tn=[],qs=0,Ou=0;function Vo(){for(var n=qs,r=Ou=qs=0;r<n;){var l=tn[r];tn[r++]=null;var u=tn[r];tn[r++]=null;var g=tn[r];tn[r++]=null;var p=tn[r];if(tn[r++]=null,u!==null&&g!==null){var S=u.pending;S===null?g.next=g:(g.next=S.next,S.next=g),u.pending=g}p!==0&&up(l,g,p)}}function Fo(n,r,l,u){tn[qs++]=n,tn[qs++]=r,tn[qs++]=l,tn[qs++]=u,Ou|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function Ru(n,r,l,u){return Fo(n,r,l,u),Go(n)}function ns(n,r){return Fo(n,null,null,r),Go(n)}function up(n,r,l){n.lanes|=l;var u=n.alternate;u!==null&&(u.lanes|=l);for(var g=!1,p=n.return;p!==null;)p.childLanes|=l,u=p.alternate,u!==null&&(u.childLanes|=l),p.tag===22&&(n=p.stateNode,n===null||n._visibility&1||(g=!0)),n=p,p=p.return;return n.tag===3?(p=n.stateNode,g&&r!==null&&(g=31-Tt(l),n=p.hiddenUpdates,u=n[g],u===null?n[g]=[r]:u.push(r),r.lane=l|536870912),p):null}function Go(n){if(50<Ma)throw Ma=0,qd=null,Error(s(185));for(var r=n.return;r!==null;)n=r,r=n.return;return n.tag===3?n.stateNode:null}var Vs={};function D1(n,r,l,u){this.tag=n,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(n,r,l,u){return new D1(n,r,l,u)}function ju(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Un(n,r){var l=n.alternate;return l===null?(l=Ft(n.tag,r,n.key,n.mode),l.elementType=n.elementType,l.type=n.type,l.stateNode=n.stateNode,l.alternate=n,n.alternate=l):(l.pendingProps=r,l.type=n.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=n.flags&65011712,l.childLanes=n.childLanes,l.lanes=n.lanes,l.child=n.child,l.memoizedProps=n.memoizedProps,l.memoizedState=n.memoizedState,l.updateQueue=n.updateQueue,r=n.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=n.sibling,l.index=n.index,l.ref=n.ref,l.refCleanup=n.refCleanup,l}function dp(n,r){n.flags&=65011714;var l=n.alternate;return l===null?(n.childLanes=0,n.lanes=r,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=l.childLanes,n.lanes=l.lanes,n.child=l.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=l.memoizedProps,n.memoizedState=l.memoizedState,n.updateQueue=l.updateQueue,n.type=l.type,r=l.dependencies,n.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),n}function Xo(n,r,l,u,g,p){var S=0;if(u=n,typeof n=="function")ju(n)&&(S=1);else if(typeof n=="string")S=Hw(n,l,ne.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case O:return n=Ft(31,l,r,g),n.elementType=O,n.lanes=p,n;case v:return is(l.children,g,p,r);case T:S=8,g|=24;break;case A:return n=Ft(12,l,r,g|2),n.elementType=A,n.lanes=p,n;case D:return n=Ft(13,l,r,g),n.elementType=D,n.lanes=p,n;case F:return n=Ft(19,l,r,g),n.elementType=F,n.lanes=p,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case L:S=10;break e;case C:S=9;break e;case j:S=11;break e;case B:S=14;break e;case q:S=16,u=null;break e}S=29,l=Error(s(130,n===null?"null":typeof n,"")),u=null}return r=Ft(S,l,r,g),r.elementType=n,r.type=u,r.lanes=p,r}function is(n,r,l,u){return n=Ft(7,n,u,r),n.lanes=l,n}function Hu(n,r,l){return n=Ft(6,n,null,r),n.lanes=l,n}function hp(n){var r=Ft(18,null,null,0);return r.stateNode=n,r}function zu(n,r,l){return r=Ft(4,n.children!==null?n.children:[],n.key,r),r.lanes=l,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}var fp=new WeakMap;function nn(n,r){if(typeof n=="object"&&n!==null){var l=fp.get(n);return l!==void 0?l:(r={value:n,source:r,stack:Ms(r)},fp.set(n,r),r)}return{value:n,source:r,stack:Ms(r)}}var Fs=[],Gs=0,Yo=null,ca=0,sn=[],rn=0,mi=null,Cn=1,kn="";function qn(n,r){Fs[Gs++]=ca,Fs[Gs++]=Yo,Yo=n,ca=r}function gp(n,r,l){sn[rn++]=Cn,sn[rn++]=kn,sn[rn++]=mi,mi=n;var u=Cn;n=kn;var g=32-Tt(u)-1;u&=~(1<<g),l+=1;var p=32-Tt(r)+g;if(30<p){var S=g-g%5;p=(u&(1<<S)-1).toString(32),u>>=S,g-=S,Cn=1<<32-Tt(r)+g|l<<g|u,kn=p+n}else Cn=1<<p|l<<g|u,kn=n}function $u(n){n.return!==null&&(qn(n,1),gp(n,1,0))}function Bu(n){for(;n===Yo;)Yo=Fs[--Gs],Fs[Gs]=null,ca=Fs[--Gs],Fs[Gs]=null;for(;n===mi;)mi=sn[--rn],sn[rn]=null,kn=sn[--rn],sn[rn]=null,Cn=sn[--rn],sn[rn]=null}function pp(n,r){sn[rn++]=Cn,sn[rn++]=kn,sn[rn++]=mi,Cn=r.id,kn=r.overflow,mi=n}var gt=null,$e=null,Se=!1,yi=null,an=!1,Iu=Error(s(519));function _i(n){var r=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ua(nn(r,n)),Iu}function mp(n){var r=n.stateNode,l=n.type,u=n.memoizedProps;switch(r[ft]=n,r[Mt]=u,l){case"dialog":_e("cancel",r),_e("close",r);break;case"iframe":case"object":case"embed":_e("load",r);break;case"video":case"audio":for(l=0;l<La.length;l++)_e(La[l],r);break;case"source":_e("error",r);break;case"img":case"image":case"link":_e("error",r),_e("load",r);break;case"details":_e("toggle",r);break;case"input":_e("invalid",r),Ng(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":_e("invalid",r);break;case"textarea":_e("invalid",r),Dg(r,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||u.suppressHydrationWarning===!0||Oy(r.textContent,l)?(u.popover!=null&&(_e("beforetoggle",r),_e("toggle",r)),u.onScroll!=null&&_e("scroll",r),u.onScrollEnd!=null&&_e("scrollend",r),u.onClick!=null&&(r.onclick=In),r=!0):r=!1,r||_i(n,!0)}function yp(n){for(gt=n.return;gt;)switch(gt.tag){case 5:case 31:case 13:an=!1;return;case 27:case 3:an=!0;return;default:gt=gt.return}}function Xs(n){if(n!==gt)return!1;if(!Se)return yp(n),Se=!0,!1;var r=n.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=n.type,l=!(l!=="form"&&l!=="button")||sh(n.type,n.memoizedProps)),l=!l),l&&$e&&_i(n),yp(n),r===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));$e=Uy(n)}else if(r===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));$e=Uy(n)}else r===27?(r=$e,Li(n.type)?(n=ch,ch=null,$e=n):$e=r):$e=gt?ln(n.stateNode.nextSibling):null;return!0}function ss(){$e=gt=null,Se=!1}function Pu(){var n=yi;return n!==null&&(jt===null?jt=n:jt.push.apply(jt,n),yi=null),n}function ua(n){yi===null?yi=[n]:yi.push(n)}var Uu=N(null),rs=null,Vn=null;function bi(n,r,l){ee(Uu,r._currentValue),r._currentValue=l}function Fn(n){n._currentValue=Uu.current,G(Uu)}function qu(n,r,l){for(;n!==null;){var u=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),n===l)break;n=n.return}}function Vu(n,r,l,u){var g=n.child;for(g!==null&&(g.return=n);g!==null;){var p=g.dependencies;if(p!==null){var S=g.child;p=p.firstContext;e:for(;p!==null;){var E=p;p=g;for(var k=0;k<r.length;k++)if(E.context===r[k]){p.lanes|=l,E=p.alternate,E!==null&&(E.lanes|=l),qu(p.return,l,n),u||(S=null);break e}p=E.next}}else if(g.tag===18){if(S=g.return,S===null)throw Error(s(341));S.lanes|=l,p=S.alternate,p!==null&&(p.lanes|=l),qu(S,l,n),S=null}else S=g.child;if(S!==null)S.return=g;else for(S=g;S!==null;){if(S===n){S=null;break}if(g=S.sibling,g!==null){g.return=S.return,S=g;break}S=S.return}g=S}}function Ys(n,r,l,u){n=null;for(var g=r,p=!1;g!==null;){if(!p){if((g.flags&524288)!==0)p=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var S=g.alternate;if(S===null)throw Error(s(387));if(S=S.memoizedProps,S!==null){var E=g.type;Vt(g.pendingProps.value,S.value)||(n!==null?n.push(E):n=[E])}}else if(g===Ee.current){if(S=g.alternate,S===null)throw Error(s(387));S.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(n!==null?n.push(za):n=[za])}g=g.return}n!==null&&Vu(r,n,l,u),r.flags|=262144}function Ko(n){for(n=n.firstContext;n!==null;){if(!Vt(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function as(n){rs=n,Vn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function pt(n){return _p(rs,n)}function Jo(n,r){return rs===null&&as(n),_p(n,r)}function _p(n,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Vn===null){if(n===null)throw Error(s(308));Vn=r,n.dependencies={lanes:0,firstContext:r},n.flags|=524288}else Vn=Vn.next=r;return l}var L1=typeof AbortController<"u"?AbortController:function(){var n=[],r=this.signal={aborted:!1,addEventListener:function(l,u){n.push(u)}};this.abort=function(){r.aborted=!0,n.forEach(function(l){return l()})}},O1=i.unstable_scheduleCallback,R1=i.unstable_NormalPriority,Qe={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fu(){return{controller:new L1,data:new Map,refCount:0}}function da(n){n.refCount--,n.refCount===0&&O1(R1,function(){n.controller.abort()})}var ha=null,Gu=0,Ks=0,Js=null;function j1(n,r){if(ha===null){var l=ha=[];Gu=0,Ks=Kd(),Js={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Gu++,r.then(bp,bp),r}function bp(){if(--Gu===0&&ha!==null){Js!==null&&(Js.status="fulfilled");var n=ha;ha=null,Ks=0,Js=null;for(var r=0;r<n.length;r++)(0,n[r])()}}function H1(n,r){var l=[],u={status:"pending",value:null,reason:null,then:function(g){l.push(g)}};return n.then(function(){u.status="fulfilled",u.value=r;for(var g=0;g<l.length;g++)(0,l[g])(r)},function(g){for(u.status="rejected",u.reason=g,g=0;g<l.length;g++)(0,l[g])(void 0)}),u}var vp=I.S;I.S=function(n,r){iy=xt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&j1(n,r),vp!==null&&vp(n,r)};var os=N(null);function Xu(){var n=os.current;return n!==null?n:je.pooledCache}function Wo(n,r){r===null?ee(os,os.current):ee(os,r.pool)}function Sp(){var n=Xu();return n===null?null:{parent:Qe._currentValue,pool:n}}var Ws=Error(s(460)),Yu=Error(s(474)),Zo=Error(s(542)),Qo={then:function(){}};function wp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function xp(n,r,l){switch(l=n[l],l===void 0?n.push(r):l!==r&&(r.then(In,In),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Ep(n),n;default:if(typeof r.status=="string")r.then(In,In);else{if(n=je,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=r,n.status="pending",n.then(function(u){if(r.status==="pending"){var g=r;g.status="fulfilled",g.value=u}},function(u){if(r.status==="pending"){var g=r;g.status="rejected",g.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw n=r.reason,Ep(n),n}throw cs=r,Ws}}function ls(n){try{var r=n._init;return r(n._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(cs=l,Ws):l}}var cs=null;function Tp(){if(cs===null)throw Error(s(459));var n=cs;return cs=null,n}function Ep(n){if(n===Ws||n===Zo)throw Error(s(483))}var Zs=null,fa=0;function el(n){var r=fa;return fa+=1,Zs===null&&(Zs=[]),xp(Zs,n,r)}function ga(n,r){r=r.props.ref,n.ref=r!==void 0?r:null}function tl(n,r){throw r.$$typeof===_?Error(s(525)):(n=Object.prototype.toString.call(r),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)))}function Ap(n){function r(R,M){if(n){var H=R.deletions;H===null?(R.deletions=[M],R.flags|=16):H.push(M)}}function l(R,M){if(!n)return null;for(;M!==null;)r(R,M),M=M.sibling;return null}function u(R){for(var M=new Map;R!==null;)R.key!==null?M.set(R.key,R):M.set(R.index,R),R=R.sibling;return M}function g(R,M){return R=Un(R,M),R.index=0,R.sibling=null,R}function p(R,M,H){return R.index=H,n?(H=R.alternate,H!==null?(H=H.index,H<M?(R.flags|=67108866,M):H):(R.flags|=67108866,M)):(R.flags|=1048576,M)}function S(R){return n&&R.alternate===null&&(R.flags|=67108866),R}function E(R,M,H,X){return M===null||M.tag!==6?(M=Hu(H,R.mode,X),M.return=R,M):(M=g(M,H),M.return=R,M)}function k(R,M,H,X){var le=H.type;return le===v?V(R,M,H.props.children,X,H.key):M!==null&&(M.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===q&&ls(le)===M.type)?(M=g(M,H.props),ga(M,H),M.return=R,M):(M=Xo(H.type,H.key,H.props,null,R.mode,X),ga(M,H),M.return=R,M)}function z(R,M,H,X){return M===null||M.tag!==4||M.stateNode.containerInfo!==H.containerInfo||M.stateNode.implementation!==H.implementation?(M=zu(H,R.mode,X),M.return=R,M):(M=g(M,H.children||[]),M.return=R,M)}function V(R,M,H,X,le){return M===null||M.tag!==7?(M=is(H,R.mode,X,le),M.return=R,M):(M=g(M,H),M.return=R,M)}function K(R,M,H){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Hu(""+M,R.mode,H),M.return=R,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return H=Xo(M.type,M.key,M.props,null,R.mode,H),ga(H,M),H.return=R,H;case w:return M=zu(M,R.mode,H),M.return=R,M;case q:return M=ls(M),K(R,M,H)}if(Ne(M)||Y(M))return M=is(M,R.mode,H,null),M.return=R,M;if(typeof M.then=="function")return K(R,el(M),H);if(M.$$typeof===L)return K(R,Jo(R,M),H);tl(R,M)}return null}function $(R,M,H,X){var le=M!==null?M.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return le!==null?null:E(R,M,""+H,X);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return H.key===le?k(R,M,H,X):null;case w:return H.key===le?z(R,M,H,X):null;case q:return H=ls(H),$(R,M,H,X)}if(Ne(H)||Y(H))return le!==null?null:V(R,M,H,X,null);if(typeof H.then=="function")return $(R,M,el(H),X);if(H.$$typeof===L)return $(R,M,Jo(R,H),X);tl(R,H)}return null}function U(R,M,H,X,le){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return R=R.get(H)||null,E(M,R,""+X,le);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case b:return R=R.get(X.key===null?H:X.key)||null,k(M,R,X,le);case w:return R=R.get(X.key===null?H:X.key)||null,z(M,R,X,le);case q:return X=ls(X),U(R,M,H,X,le)}if(Ne(X)||Y(X))return R=R.get(H)||null,V(M,R,X,le,null);if(typeof X.then=="function")return U(R,M,H,el(X),le);if(X.$$typeof===L)return U(R,M,H,Jo(M,X),le);tl(M,X)}return null}function ie(R,M,H,X){for(var le=null,Ae=null,re=M,me=M=0,ve=null;re!==null&&me<H.length;me++){re.index>me?(ve=re,re=null):ve=re.sibling;var Ce=$(R,re,H[me],X);if(Ce===null){re===null&&(re=ve);break}n&&re&&Ce.alternate===null&&r(R,re),M=p(Ce,M,me),Ae===null?le=Ce:Ae.sibling=Ce,Ae=Ce,re=ve}if(me===H.length)return l(R,re),Se&&qn(R,me),le;if(re===null){for(;me<H.length;me++)re=K(R,H[me],X),re!==null&&(M=p(re,M,me),Ae===null?le=re:Ae.sibling=re,Ae=re);return Se&&qn(R,me),le}for(re=u(re);me<H.length;me++)ve=U(re,R,me,H[me],X),ve!==null&&(n&&ve.alternate!==null&&re.delete(ve.key===null?me:ve.key),M=p(ve,M,me),Ae===null?le=ve:Ae.sibling=ve,Ae=ve);return n&&re.forEach(function(zi){return r(R,zi)}),Se&&qn(R,me),le}function ce(R,M,H,X){if(H==null)throw Error(s(151));for(var le=null,Ae=null,re=M,me=M=0,ve=null,Ce=H.next();re!==null&&!Ce.done;me++,Ce=H.next()){re.index>me?(ve=re,re=null):ve=re.sibling;var zi=$(R,re,Ce.value,X);if(zi===null){re===null&&(re=ve);break}n&&re&&zi.alternate===null&&r(R,re),M=p(zi,M,me),Ae===null?le=zi:Ae.sibling=zi,Ae=zi,re=ve}if(Ce.done)return l(R,re),Se&&qn(R,me),le;if(re===null){for(;!Ce.done;me++,Ce=H.next())Ce=K(R,Ce.value,X),Ce!==null&&(M=p(Ce,M,me),Ae===null?le=Ce:Ae.sibling=Ce,Ae=Ce);return Se&&qn(R,me),le}for(re=u(re);!Ce.done;me++,Ce=H.next())Ce=U(re,R,me,Ce.value,X),Ce!==null&&(n&&Ce.alternate!==null&&re.delete(Ce.key===null?me:Ce.key),M=p(Ce,M,me),Ae===null?le=Ce:Ae.sibling=Ce,Ae=Ce);return n&&re.forEach(function(Xw){return r(R,Xw)}),Se&&qn(R,me),le}function Re(R,M,H,X){if(typeof H=="object"&&H!==null&&H.type===v&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case b:e:{for(var le=H.key;M!==null;){if(M.key===le){if(le=H.type,le===v){if(M.tag===7){l(R,M.sibling),X=g(M,H.props.children),X.return=R,R=X;break e}}else if(M.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===q&&ls(le)===M.type){l(R,M.sibling),X=g(M,H.props),ga(X,H),X.return=R,R=X;break e}l(R,M);break}else r(R,M);M=M.sibling}H.type===v?(X=is(H.props.children,R.mode,X,H.key),X.return=R,R=X):(X=Xo(H.type,H.key,H.props,null,R.mode,X),ga(X,H),X.return=R,R=X)}return S(R);case w:e:{for(le=H.key;M!==null;){if(M.key===le)if(M.tag===4&&M.stateNode.containerInfo===H.containerInfo&&M.stateNode.implementation===H.implementation){l(R,M.sibling),X=g(M,H.children||[]),X.return=R,R=X;break e}else{l(R,M);break}else r(R,M);M=M.sibling}X=zu(H,R.mode,X),X.return=R,R=X}return S(R);case q:return H=ls(H),Re(R,M,H,X)}if(Ne(H))return ie(R,M,H,X);if(Y(H)){if(le=Y(H),typeof le!="function")throw Error(s(150));return H=le.call(H),ce(R,M,H,X)}if(typeof H.then=="function")return Re(R,M,el(H),X);if(H.$$typeof===L)return Re(R,M,Jo(R,H),X);tl(R,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,M!==null&&M.tag===6?(l(R,M.sibling),X=g(M,H),X.return=R,R=X):(l(R,M),X=Hu(H,R.mode,X),X.return=R,R=X),S(R)):l(R,M)}return function(R,M,H,X){try{fa=0;var le=Re(R,M,H,X);return Zs=null,le}catch(re){if(re===Ws||re===Zo)throw re;var Ae=Ft(29,re,null,R.mode);return Ae.lanes=X,Ae.return=R,Ae}finally{}}}var us=Ap(!0),Cp=Ap(!1),vi=!1;function Ku(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ju(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Si(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function wi(n,r,l){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(ke&2)!==0){var g=u.pending;return g===null?r.next=r:(r.next=g.next,g.next=r),u.pending=r,r=Go(n),up(n,null,l),r}return Fo(n,u,r,l),Go(n)}function pa(n,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,_g(n,l)}}function Wu(n,r){var l=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var g=null,p=null;if(l=l.firstBaseUpdate,l!==null){do{var S={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};p===null?g=p=S:p=p.next=S,l=l.next}while(l!==null);p===null?g=p=r:p=p.next=r}else g=p=r;l={baseState:u.baseState,firstBaseUpdate:g,lastBaseUpdate:p,shared:u.shared,callbacks:u.callbacks},n.updateQueue=l;return}n=l.lastBaseUpdate,n===null?l.firstBaseUpdate=r:n.next=r,l.lastBaseUpdate=r}var Zu=!1;function ma(){if(Zu){var n=Js;if(n!==null)throw n}}function ya(n,r,l,u){Zu=!1;var g=n.updateQueue;vi=!1;var p=g.firstBaseUpdate,S=g.lastBaseUpdate,E=g.shared.pending;if(E!==null){g.shared.pending=null;var k=E,z=k.next;k.next=null,S===null?p=z:S.next=z,S=k;var V=n.alternate;V!==null&&(V=V.updateQueue,E=V.lastBaseUpdate,E!==S&&(E===null?V.firstBaseUpdate=z:E.next=z,V.lastBaseUpdate=k))}if(p!==null){var K=g.baseState;S=0,V=z=k=null,E=p;do{var $=E.lane&-536870913,U=$!==E.lane;if(U?(be&$)===$:(u&$)===$){$!==0&&$===Ks&&(Zu=!0),V!==null&&(V=V.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ie=n,ce=E;$=r;var Re=l;switch(ce.tag){case 1:if(ie=ce.payload,typeof ie=="function"){K=ie.call(Re,K,$);break e}K=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=ce.payload,$=typeof ie=="function"?ie.call(Re,K,$):ie,$==null)break e;K=m({},K,$);break e;case 2:vi=!0}}$=E.callback,$!==null&&(n.flags|=64,U&&(n.flags|=8192),U=g.callbacks,U===null?g.callbacks=[$]:U.push($))}else U={lane:$,tag:E.tag,payload:E.payload,callback:E.callback,next:null},V===null?(z=V=U,k=K):V=V.next=U,S|=$;if(E=E.next,E===null){if(E=g.shared.pending,E===null)break;U=E,E=U.next,U.next=null,g.lastBaseUpdate=U,g.shared.pending=null}}while(!0);V===null&&(k=K),g.baseState=k,g.firstBaseUpdate=z,g.lastBaseUpdate=V,p===null&&(g.shared.lanes=0),Ci|=S,n.lanes=S,n.memoizedState=K}}function kp(n,r){if(typeof n!="function")throw Error(s(191,n));n.call(r)}function Np(n,r){var l=n.callbacks;if(l!==null)for(n.callbacks=null,n=0;n<l.length;n++)kp(l[n],r)}var Qs=N(null),nl=N(0);function Mp(n,r){n=ei,ee(nl,n),ee(Qs,r),ei=n|r.baseLanes}function Qu(){ee(nl,ei),ee(Qs,Qs.current)}function ed(){ei=nl.current,G(Qs),G(nl)}var Gt=N(null),on=null;function xi(n){var r=n.alternate;ee(Xe,Xe.current&1),ee(Gt,n),on===null&&(r===null||Qs.current!==null||r.memoizedState!==null)&&(on=n)}function td(n){ee(Xe,Xe.current),ee(Gt,n),on===null&&(on=n)}function Dp(n){n.tag===22?(ee(Xe,Xe.current),ee(Gt,n),on===null&&(on=n)):Ti()}function Ti(){ee(Xe,Xe.current),ee(Gt,Gt.current)}function Xt(n){G(Gt),on===n&&(on=null),G(Xe)}var Xe=N(0);function il(n){for(var r=n;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||oh(l)||lh(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Gn=0,pe=null,Le=null,et=null,sl=!1,er=!1,ds=!1,rl=0,_a=0,tr=null,z1=0;function Fe(){throw Error(s(321))}function nd(n,r){if(r===null)return!1;for(var l=0;l<r.length&&l<n.length;l++)if(!Vt(n[l],r[l]))return!1;return!0}function id(n,r,l,u,g,p){return Gn=p,pe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,I.H=n===null||n.memoizedState===null?gm:_d,ds=!1,p=l(u,g),ds=!1,er&&(p=Op(r,l,u,g)),Lp(n),p}function Lp(n){I.H=Sa;var r=Le!==null&&Le.next!==null;if(Gn=0,et=Le=pe=null,sl=!1,_a=0,tr=null,r)throw Error(s(300));n===null||tt||(n=n.dependencies,n!==null&&Ko(n)&&(tt=!0))}function Op(n,r,l,u){pe=n;var g=0;do{if(er&&(tr=null),_a=0,er=!1,25<=g)throw Error(s(301));if(g+=1,et=Le=null,n.updateQueue!=null){var p=n.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}I.H=pm,p=r(l,u)}while(er);return p}function $1(){var n=I.H,r=n.useState()[0];return r=typeof r.then=="function"?ba(r):r,n=n.useState()[0],(Le!==null?Le.memoizedState:null)!==n&&(pe.flags|=1024),r}function sd(){var n=rl!==0;return rl=0,n}function rd(n,r,l){r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~l}function ad(n){if(sl){for(n=n.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}sl=!1}Gn=0,et=Le=pe=null,er=!1,_a=rl=0,tr=null}function Et(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?pe.memoizedState=et=n:et=et.next=n,et}function Ye(){if(Le===null){var n=pe.alternate;n=n!==null?n.memoizedState:null}else n=Le.next;var r=et===null?pe.memoizedState:et.next;if(r!==null)et=r,Le=n;else{if(n===null)throw pe.alternate===null?Error(s(467)):Error(s(310));Le=n,n={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},et===null?pe.memoizedState=et=n:et=et.next=n}return et}function al(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ba(n){var r=_a;return _a+=1,tr===null&&(tr=[]),n=xp(tr,n,r),r=pe,(et===null?r.memoizedState:et.next)===null&&(r=r.alternate,I.H=r===null||r.memoizedState===null?gm:_d),n}function ol(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return ba(n);if(n.$$typeof===L)return pt(n)}throw Error(s(438,String(n)))}function od(n){var r=null,l=pe.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=pe.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(g){return g.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=al(),pe.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(n),u=0;u<n;u++)l[u]=Q;return r.index++,l}function Xn(n,r){return typeof r=="function"?r(n):r}function ll(n){var r=Ye();return ld(r,Le,n)}function ld(n,r,l){var u=n.queue;if(u===null)throw Error(s(311));u.lastRenderedReducer=l;var g=n.baseQueue,p=u.pending;if(p!==null){if(g!==null){var S=g.next;g.next=p.next,p.next=S}r.baseQueue=g=p,u.pending=null}if(p=n.baseState,g===null)n.memoizedState=p;else{r=g.next;var E=S=null,k=null,z=r,V=!1;do{var K=z.lane&-536870913;if(K!==z.lane?(be&K)===K:(Gn&K)===K){var $=z.revertLane;if($===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),K===Ks&&(V=!0);else if((Gn&$)===$){z=z.next,$===Ks&&(V=!0);continue}else K={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},k===null?(E=k=K,S=p):k=k.next=K,pe.lanes|=$,Ci|=$;K=z.action,ds&&l(p,K),p=z.hasEagerState?z.eagerState:l(p,K)}else $={lane:K,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},k===null?(E=k=$,S=p):k=k.next=$,pe.lanes|=K,Ci|=K;z=z.next}while(z!==null&&z!==r);if(k===null?S=p:k.next=E,!Vt(p,n.memoizedState)&&(tt=!0,V&&(l=Js,l!==null)))throw l;n.memoizedState=p,n.baseState=S,n.baseQueue=k,u.lastRenderedState=p}return g===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function cd(n){var r=Ye(),l=r.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=n;var u=l.dispatch,g=l.pending,p=r.memoizedState;if(g!==null){l.pending=null;var S=g=g.next;do p=n(p,S.action),S=S.next;while(S!==g);Vt(p,r.memoizedState)||(tt=!0),r.memoizedState=p,r.baseQueue===null&&(r.baseState=p),l.lastRenderedState=p}return[p,u]}function Rp(n,r,l){var u=pe,g=Ye(),p=Se;if(p){if(l===void 0)throw Error(s(407));l=l()}else l=r();var S=!Vt((Le||g).memoizedState,l);if(S&&(g.memoizedState=l,tt=!0),g=g.queue,hd(zp.bind(null,u,g,n),[n]),g.getSnapshot!==r||S||et!==null&&et.memoizedState.tag&1){if(u.flags|=2048,nr(9,{destroy:void 0},Hp.bind(null,u,g,l,r),null),je===null)throw Error(s(349));p||(Gn&127)!==0||jp(u,r,l)}return l}function jp(n,r,l){n.flags|=16384,n={getSnapshot:r,value:l},r=pe.updateQueue,r===null?(r=al(),pe.updateQueue=r,r.stores=[n]):(l=r.stores,l===null?r.stores=[n]:l.push(n))}function Hp(n,r,l,u){r.value=l,r.getSnapshot=u,$p(r)&&Bp(n)}function zp(n,r,l){return l(function(){$p(r)&&Bp(n)})}function $p(n){var r=n.getSnapshot;n=n.value;try{var l=r();return!Vt(n,l)}catch{return!0}}function Bp(n){var r=ns(n,2);r!==null&&Ht(r,n,2)}function ud(n){var r=Et();if(typeof n=="function"){var l=n;if(n=l(),ds){En(!0);try{l()}finally{En(!1)}}}return r.memoizedState=r.baseState=n,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:n},r}function Ip(n,r,l,u){return n.baseState=l,ld(n,Le,typeof u=="function"?u:Xn)}function B1(n,r,l,u,g){if(dl(n))throw Error(s(485));if(n=r.action,n!==null){var p={payload:g,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){p.listeners.push(S)}};I.T!==null?l(!0):p.isTransition=!1,u(p),l=r.pending,l===null?(p.next=r.pending=p,Pp(r,p)):(p.next=l.next,r.pending=l.next=p)}}function Pp(n,r){var l=r.action,u=r.payload,g=n.state;if(r.isTransition){var p=I.T,S={};I.T=S;try{var E=l(g,u),k=I.S;k!==null&&k(S,E),Up(n,r,E)}catch(z){dd(n,r,z)}finally{p!==null&&S.types!==null&&(p.types=S.types),I.T=p}}else try{p=l(g,u),Up(n,r,p)}catch(z){dd(n,r,z)}}function Up(n,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){qp(n,r,u)},function(u){return dd(n,r,u)}):qp(n,r,l)}function qp(n,r,l){r.status="fulfilled",r.value=l,Vp(r),n.state=l,r=n.pending,r!==null&&(l=r.next,l===r?n.pending=null:(l=l.next,r.next=l,Pp(n,l)))}function dd(n,r,l){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,Vp(r),r=r.next;while(r!==u)}n.action=null}function Vp(n){n=n.listeners;for(var r=0;r<n.length;r++)(0,n[r])()}function Fp(n,r){return r}function Gp(n,r){if(Se){var l=je.formState;if(l!==null){e:{var u=pe;if(Se){if($e){t:{for(var g=$e,p=an;g.nodeType!==8;){if(!p){g=null;break t}if(g=ln(g.nextSibling),g===null){g=null;break t}}p=g.data,g=p==="F!"||p==="F"?g:null}if(g){$e=ln(g.nextSibling),u=g.data==="F!";break e}}_i(u)}u=!1}u&&(r=l[0])}}return l=Et(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fp,lastRenderedState:r},l.queue=u,l=dm.bind(null,pe,u),u.dispatch=l,u=ud(!1),p=yd.bind(null,pe,!1,u.queue),u=Et(),g={state:r,dispatch:null,action:n,pending:null},u.queue=g,l=B1.bind(null,pe,g,p,l),g.dispatch=l,u.memoizedState=n,[r,l,!1]}function Xp(n){var r=Ye();return Yp(r,Le,n)}function Yp(n,r,l){if(r=ld(n,r,Fp)[0],n=ll(Xn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=ba(r)}catch(S){throw S===Ws?Zo:S}else u=r;r=Ye();var g=r.queue,p=g.dispatch;return l!==r.memoizedState&&(pe.flags|=2048,nr(9,{destroy:void 0},I1.bind(null,g,l),null)),[u,p,n]}function I1(n,r){n.action=r}function Kp(n){var r=Ye(),l=Le;if(l!==null)return Yp(r,l,n);Ye(),r=r.memoizedState,l=Ye();var u=l.queue.dispatch;return l.memoizedState=n,[r,u,!1]}function nr(n,r,l,u){return n={tag:n,create:l,deps:u,inst:r,next:null},r=pe.updateQueue,r===null&&(r=al(),pe.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=n.next=n:(u=l.next,l.next=n,n.next=u,r.lastEffect=n),n}function Jp(){return Ye().memoizedState}function cl(n,r,l,u){var g=Et();pe.flags|=n,g.memoizedState=nr(1|r,{destroy:void 0},l,u===void 0?null:u)}function ul(n,r,l,u){var g=Ye();u=u===void 0?null:u;var p=g.memoizedState.inst;Le!==null&&u!==null&&nd(u,Le.memoizedState.deps)?g.memoizedState=nr(r,p,l,u):(pe.flags|=n,g.memoizedState=nr(1|r,p,l,u))}function Wp(n,r){cl(8390656,8,n,r)}function hd(n,r){ul(2048,8,n,r)}function P1(n){pe.flags|=4;var r=pe.updateQueue;if(r===null)r=al(),pe.updateQueue=r,r.events=[n];else{var l=r.events;l===null?r.events=[n]:l.push(n)}}function Zp(n){var r=Ye().memoizedState;return P1({ref:r,nextImpl:n}),function(){if((ke&2)!==0)throw Error(s(440));return r.impl.apply(void 0,arguments)}}function Qp(n,r){return ul(4,2,n,r)}function em(n,r){return ul(4,4,n,r)}function tm(n,r){if(typeof r=="function"){n=n();var l=r(n);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function nm(n,r,l){l=l!=null?l.concat([n]):null,ul(4,4,tm.bind(null,r,n),l)}function fd(){}function im(n,r){var l=Ye();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&nd(r,u[1])?u[0]:(l.memoizedState=[n,r],n)}function sm(n,r){var l=Ye();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&nd(r,u[1]))return u[0];if(u=n(),ds){En(!0);try{n()}finally{En(!1)}}return l.memoizedState=[u,r],u}function gd(n,r,l){return l===void 0||(Gn&1073741824)!==0&&(be&261930)===0?n.memoizedState=r:(n.memoizedState=l,n=ry(),pe.lanes|=n,Ci|=n,l)}function rm(n,r,l,u){return Vt(l,r)?l:Qs.current!==null?(n=gd(n,l,u),Vt(n,r)||(tt=!0),n):(Gn&42)===0||(Gn&1073741824)!==0&&(be&261930)===0?(tt=!0,n.memoizedState=l):(n=ry(),pe.lanes|=n,Ci|=n,r)}function am(n,r,l,u,g){var p=Z.p;Z.p=p!==0&&8>p?p:8;var S=I.T,E={};I.T=E,yd(n,!1,r,l);try{var k=g(),z=I.S;if(z!==null&&z(E,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var V=H1(k,u);va(n,r,V,Jt(n))}else va(n,r,u,Jt(n))}catch(K){va(n,r,{then:function(){},status:"rejected",reason:K},Jt())}finally{Z.p=p,S!==null&&E.types!==null&&(S.types=E.types),I.T=S}}function U1(){}function pd(n,r,l,u){if(n.tag!==5)throw Error(s(476));var g=om(n).queue;am(n,g,r,ae,l===null?U1:function(){return lm(n),l(u)})}function om(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:ae},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:l},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function lm(n){var r=om(n);r.next===null&&(r=n.alternate.memoizedState),va(n,r.next.queue,{},Jt())}function md(){return pt(za)}function cm(){return Ye().memoizedState}function um(){return Ye().memoizedState}function q1(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var l=Jt();n=Si(l);var u=wi(r,n,l);u!==null&&(Ht(u,r,l),pa(u,r,l)),r={cache:Fu()},n.payload=r;return}r=r.return}}function V1(n,r,l){var u=Jt();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},dl(n)?hm(r,l):(l=Ru(n,r,l,u),l!==null&&(Ht(l,n,u),fm(l,r,u)))}function dm(n,r,l){var u=Jt();va(n,r,l,u)}function va(n,r,l,u){var g={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(dl(n))hm(r,g);else{var p=n.alternate;if(n.lanes===0&&(p===null||p.lanes===0)&&(p=r.lastRenderedReducer,p!==null))try{var S=r.lastRenderedState,E=p(S,l);if(g.hasEagerState=!0,g.eagerState=E,Vt(E,S))return Fo(n,r,g,0),je===null&&Vo(),!1}catch{}finally{}if(l=Ru(n,r,g,u),l!==null)return Ht(l,n,u),fm(l,r,u),!0}return!1}function yd(n,r,l,u){if(u={lane:2,revertLane:Kd(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},dl(n)){if(r)throw Error(s(479))}else r=Ru(n,l,u,2),r!==null&&Ht(r,n,2)}function dl(n){var r=n.alternate;return n===pe||r!==null&&r===pe}function hm(n,r){er=sl=!0;var l=n.pending;l===null?r.next=r:(r.next=l.next,l.next=r),n.pending=r}function fm(n,r,l){if((l&4194048)!==0){var u=r.lanes;u&=n.pendingLanes,l|=u,r.lanes=l,_g(n,l)}}var Sa={readContext:pt,use:ol,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe};Sa.useEffectEvent=Fe;var gm={readContext:pt,use:ol,useCallback:function(n,r){return Et().memoizedState=[n,r===void 0?null:r],n},useContext:pt,useEffect:Wp,useImperativeHandle:function(n,r,l){l=l!=null?l.concat([n]):null,cl(4194308,4,tm.bind(null,r,n),l)},useLayoutEffect:function(n,r){return cl(4194308,4,n,r)},useInsertionEffect:function(n,r){cl(4,2,n,r)},useMemo:function(n,r){var l=Et();r=r===void 0?null:r;var u=n();if(ds){En(!0);try{n()}finally{En(!1)}}return l.memoizedState=[u,r],u},useReducer:function(n,r,l){var u=Et();if(l!==void 0){var g=l(r);if(ds){En(!0);try{l(r)}finally{En(!1)}}}else g=r;return u.memoizedState=u.baseState=g,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:g},u.queue=n,n=n.dispatch=V1.bind(null,pe,n),[u.memoizedState,n]},useRef:function(n){var r=Et();return n={current:n},r.memoizedState=n},useState:function(n){n=ud(n);var r=n.queue,l=dm.bind(null,pe,r);return r.dispatch=l,[n.memoizedState,l]},useDebugValue:fd,useDeferredValue:function(n,r){var l=Et();return gd(l,n,r)},useTransition:function(){var n=ud(!1);return n=am.bind(null,pe,n.queue,!0,!1),Et().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,l){var u=pe,g=Et();if(Se){if(l===void 0)throw Error(s(407));l=l()}else{if(l=r(),je===null)throw Error(s(349));(be&127)!==0||jp(u,r,l)}g.memoizedState=l;var p={value:l,getSnapshot:r};return g.queue=p,Wp(zp.bind(null,u,p,n),[n]),u.flags|=2048,nr(9,{destroy:void 0},Hp.bind(null,u,p,l,r),null),l},useId:function(){var n=Et(),r=je.identifierPrefix;if(Se){var l=kn,u=Cn;l=(u&~(1<<32-Tt(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=rl++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=z1++,r="_"+r+"r_"+l.toString(32)+"_";return n.memoizedState=r},useHostTransitionStatus:md,useFormState:Gp,useActionState:Gp,useOptimistic:function(n){var r=Et();r.memoizedState=r.baseState=n;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=yd.bind(null,pe,!0,l),l.dispatch=r,[n,r]},useMemoCache:od,useCacheRefresh:function(){return Et().memoizedState=q1.bind(null,pe)},useEffectEvent:function(n){var r=Et(),l={impl:n};return r.memoizedState=l,function(){if((ke&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},_d={readContext:pt,use:ol,useCallback:im,useContext:pt,useEffect:hd,useImperativeHandle:nm,useInsertionEffect:Qp,useLayoutEffect:em,useMemo:sm,useReducer:ll,useRef:Jp,useState:function(){return ll(Xn)},useDebugValue:fd,useDeferredValue:function(n,r){var l=Ye();return rm(l,Le.memoizedState,n,r)},useTransition:function(){var n=ll(Xn)[0],r=Ye().memoizedState;return[typeof n=="boolean"?n:ba(n),r]},useSyncExternalStore:Rp,useId:cm,useHostTransitionStatus:md,useFormState:Xp,useActionState:Xp,useOptimistic:function(n,r){var l=Ye();return Ip(l,Le,n,r)},useMemoCache:od,useCacheRefresh:um};_d.useEffectEvent=Zp;var pm={readContext:pt,use:ol,useCallback:im,useContext:pt,useEffect:hd,useImperativeHandle:nm,useInsertionEffect:Qp,useLayoutEffect:em,useMemo:sm,useReducer:cd,useRef:Jp,useState:function(){return cd(Xn)},useDebugValue:fd,useDeferredValue:function(n,r){var l=Ye();return Le===null?gd(l,n,r):rm(l,Le.memoizedState,n,r)},useTransition:function(){var n=cd(Xn)[0],r=Ye().memoizedState;return[typeof n=="boolean"?n:ba(n),r]},useSyncExternalStore:Rp,useId:cm,useHostTransitionStatus:md,useFormState:Kp,useActionState:Kp,useOptimistic:function(n,r){var l=Ye();return Le!==null?Ip(l,Le,n,r):(l.baseState=n,[n,l.queue.dispatch])},useMemoCache:od,useCacheRefresh:um};pm.useEffectEvent=Zp;function bd(n,r,l,u){r=n.memoizedState,l=l(u,r),l=l==null?r:m({},r,l),n.memoizedState=l,n.lanes===0&&(n.updateQueue.baseState=l)}var vd={enqueueSetState:function(n,r,l){n=n._reactInternals;var u=Jt(),g=Si(u);g.payload=r,l!=null&&(g.callback=l),r=wi(n,g,u),r!==null&&(Ht(r,n,u),pa(r,n,u))},enqueueReplaceState:function(n,r,l){n=n._reactInternals;var u=Jt(),g=Si(u);g.tag=1,g.payload=r,l!=null&&(g.callback=l),r=wi(n,g,u),r!==null&&(Ht(r,n,u),pa(r,n,u))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var l=Jt(),u=Si(l);u.tag=2,r!=null&&(u.callback=r),r=wi(n,u,l),r!==null&&(Ht(r,n,l),pa(r,n,l))}};function mm(n,r,l,u,g,p,S){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,p,S):r.prototype&&r.prototype.isPureReactComponent?!oa(l,u)||!oa(g,p):!0}function ym(n,r,l,u){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,u),r.state!==n&&vd.enqueueReplaceState(r,r.state,null)}function hs(n,r){var l=r;if("ref"in r){l={};for(var u in r)u!=="ref"&&(l[u]=r[u])}if(n=n.defaultProps){l===r&&(l=m({},l));for(var g in n)l[g]===void 0&&(l[g]=n[g])}return l}function _m(n){qo(n)}function bm(n){console.error(n)}function vm(n){qo(n)}function hl(n,r){try{var l=n.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function Sm(n,r,l){try{var u=n.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function Sd(n,r,l){return l=Si(l),l.tag=3,l.payload={element:null},l.callback=function(){hl(n,r)},l}function wm(n){return n=Si(n),n.tag=3,n}function xm(n,r,l,u){var g=l.type.getDerivedStateFromError;if(typeof g=="function"){var p=u.value;n.payload=function(){return g(p)},n.callback=function(){Sm(r,l,u)}}var S=l.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(n.callback=function(){Sm(r,l,u),typeof g!="function"&&(ki===null?ki=new Set([this]):ki.add(this));var E=u.stack;this.componentDidCatch(u.value,{componentStack:E!==null?E:""})})}function F1(n,r,l,u,g){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Ys(r,l,g,!0),l=Gt.current,l!==null){switch(l.tag){case 31:case 13:return on===null?Tl():l.alternate===null&&Ge===0&&(Ge=3),l.flags&=-257,l.flags|=65536,l.lanes=g,u===Qo?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),Gd(n,u,g)),!1;case 22:return l.flags|=65536,u===Qo?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([u]):l.add(u)),Gd(n,u,g)),!1}throw Error(s(435,l.tag))}return Gd(n,u,g),Tl(),!1}if(Se)return r=Gt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=g,u!==Iu&&(n=Error(s(422),{cause:u}),ua(nn(n,l)))):(u!==Iu&&(r=Error(s(423),{cause:u}),ua(nn(r,l))),n=n.current.alternate,n.flags|=65536,g&=-g,n.lanes|=g,u=nn(u,l),g=Sd(n.stateNode,u,g),Wu(n,g),Ge!==4&&(Ge=2)),!1;var p=Error(s(520),{cause:u});if(p=nn(p,l),Na===null?Na=[p]:Na.push(p),Ge!==4&&(Ge=2),r===null)return!0;u=nn(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,n=g&-g,l.lanes|=n,n=Sd(l.stateNode,u,n),Wu(l,n),!1;case 1:if(r=l.type,p=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(ki===null||!ki.has(p))))return l.flags|=65536,g&=-g,l.lanes|=g,g=wm(g),xm(g,n,l,u),Wu(l,g),!1}l=l.return}while(l!==null);return!1}var wd=Error(s(461)),tt=!1;function mt(n,r,l,u){r.child=n===null?Cp(r,null,l,u):us(r,n.child,l,u)}function Tm(n,r,l,u,g){l=l.render;var p=r.ref;if("ref"in u){var S={};for(var E in u)E!=="ref"&&(S[E]=u[E])}else S=u;return as(r),u=id(n,r,l,S,p,g),E=sd(),n!==null&&!tt?(rd(n,r,g),Yn(n,r,g)):(Se&&E&&$u(r),r.flags|=1,mt(n,r,u,g),r.child)}function Em(n,r,l,u,g){if(n===null){var p=l.type;return typeof p=="function"&&!ju(p)&&p.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=p,Am(n,r,p,u,g)):(n=Xo(l.type,null,u,r,r.mode,g),n.ref=r.ref,n.return=r,r.child=n)}if(p=n.child,!Md(n,g)){var S=p.memoizedProps;if(l=l.compare,l=l!==null?l:oa,l(S,u)&&n.ref===r.ref)return Yn(n,r,g)}return r.flags|=1,n=Un(p,u),n.ref=r.ref,n.return=r,r.child=n}function Am(n,r,l,u,g){if(n!==null){var p=n.memoizedProps;if(oa(p,u)&&n.ref===r.ref)if(tt=!1,r.pendingProps=u=p,Md(n,g))(n.flags&131072)!==0&&(tt=!0);else return r.lanes=n.lanes,Yn(n,r,g)}return xd(n,r,l,u,g)}function Cm(n,r,l,u){var g=u.children,p=n!==null?n.memoizedState:null;if(n===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(p=p!==null?p.baseLanes|l:l,n!==null){for(u=r.child=n.child,g=0;u!==null;)g=g|u.lanes|u.childLanes,u=u.sibling;u=g&~p}else u=0,r.child=null;return km(n,r,p,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},n!==null&&Wo(r,p!==null?p.cachePool:null),p!==null?Mp(r,p):Qu(),Dp(r);else return u=r.lanes=536870912,km(n,r,p!==null?p.baseLanes|l:l,l,u)}else p!==null?(Wo(r,p.cachePool),Mp(r,p),Ti(),r.memoizedState=null):(n!==null&&Wo(r,null),Qu(),Ti());return mt(n,r,g,l),r.child}function wa(n,r){return n!==null&&n.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function km(n,r,l,u,g){var p=Xu();return p=p===null?null:{parent:Qe._currentValue,pool:p},r.memoizedState={baseLanes:l,cachePool:p},n!==null&&Wo(r,null),Qu(),Dp(r),n!==null&&Ys(n,r,u,!0),r.childLanes=g,null}function fl(n,r){return r=pl({mode:r.mode,children:r.children},n.mode),r.ref=n.ref,n.child=r,r.return=n,r}function Nm(n,r,l){return us(r,n.child,null,l),n=fl(r,r.pendingProps),n.flags|=2,Xt(r),r.memoizedState=null,n}function G1(n,r,l){var u=r.pendingProps,g=(r.flags&128)!==0;if(r.flags&=-129,n===null){if(Se){if(u.mode==="hidden")return n=fl(r,u),r.lanes=536870912,wa(null,n);if(td(r),(n=$e)?(n=Py(n,an),n=n!==null&&n.data==="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:mi!==null?{id:Cn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},l=hp(n),l.return=r,r.child=l,gt=r,$e=null)):n=null,n===null)throw _i(r);return r.lanes=536870912,null}return fl(r,u)}var p=n.memoizedState;if(p!==null){var S=p.dehydrated;if(td(r),g)if(r.flags&256)r.flags&=-257,r=Nm(n,r,l);else if(r.memoizedState!==null)r.child=n.child,r.flags|=128,r=null;else throw Error(s(558));else if(tt||Ys(n,r,l,!1),g=(l&n.childLanes)!==0,tt||g){if(u=je,u!==null&&(S=bg(u,l),S!==0&&S!==p.retryLane))throw p.retryLane=S,ns(n,S),Ht(u,n,S),wd;Tl(),r=Nm(n,r,l)}else n=p.treeContext,$e=ln(S.nextSibling),gt=r,Se=!0,yi=null,an=!1,n!==null&&pp(r,n),r=fl(r,u),r.flags|=4096;return r}return n=Un(n.child,{mode:u.mode,children:u.children}),n.ref=r.ref,r.child=n,n.return=r,n}function gl(n,r){var l=r.ref;if(l===null)n!==null&&n.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(n===null||n.ref!==l)&&(r.flags|=4194816)}}function xd(n,r,l,u,g){return as(r),l=id(n,r,l,u,void 0,g),u=sd(),n!==null&&!tt?(rd(n,r,g),Yn(n,r,g)):(Se&&u&&$u(r),r.flags|=1,mt(n,r,l,g),r.child)}function Mm(n,r,l,u,g,p){return as(r),r.updateQueue=null,l=Op(r,u,l,g),Lp(n),u=sd(),n!==null&&!tt?(rd(n,r,p),Yn(n,r,p)):(Se&&u&&$u(r),r.flags|=1,mt(n,r,l,p),r.child)}function Dm(n,r,l,u,g){if(as(r),r.stateNode===null){var p=Vs,S=l.contextType;typeof S=="object"&&S!==null&&(p=pt(S)),p=new l(u,p),r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=vd,r.stateNode=p,p._reactInternals=r,p=r.stateNode,p.props=u,p.state=r.memoizedState,p.refs={},Ku(r),S=l.contextType,p.context=typeof S=="object"&&S!==null?pt(S):Vs,p.state=r.memoizedState,S=l.getDerivedStateFromProps,typeof S=="function"&&(bd(r,l,S,u),p.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(S=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),S!==p.state&&vd.enqueueReplaceState(p,p.state,null),ya(r,u,p,g),ma(),p.state=r.memoizedState),typeof p.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(n===null){p=r.stateNode;var E=r.memoizedProps,k=hs(l,E);p.props=k;var z=p.context,V=l.contextType;S=Vs,typeof V=="object"&&V!==null&&(S=pt(V));var K=l.getDerivedStateFromProps;V=typeof K=="function"||typeof p.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,V||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(E||z!==S)&&ym(r,p,u,S),vi=!1;var $=r.memoizedState;p.state=$,ya(r,u,p,g),ma(),z=r.memoizedState,E||$!==z||vi?(typeof K=="function"&&(bd(r,l,K,u),z=r.memoizedState),(k=vi||mm(r,l,k,u,$,z,S))?(V||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(r.flags|=4194308)):(typeof p.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=z),p.props=u,p.state=z,p.context=S,u=k):(typeof p.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{p=r.stateNode,Ju(n,r),S=r.memoizedProps,V=hs(l,S),p.props=V,K=r.pendingProps,$=p.context,z=l.contextType,k=Vs,typeof z=="object"&&z!==null&&(k=pt(z)),E=l.getDerivedStateFromProps,(z=typeof E=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(S!==K||$!==k)&&ym(r,p,u,k),vi=!1,$=r.memoizedState,p.state=$,ya(r,u,p,g),ma();var U=r.memoizedState;S!==K||$!==U||vi||n!==null&&n.dependencies!==null&&Ko(n.dependencies)?(typeof E=="function"&&(bd(r,l,E,u),U=r.memoizedState),(V=vi||mm(r,l,V,u,$,U,k)||n!==null&&n.dependencies!==null&&Ko(n.dependencies))?(z||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(u,U,k),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(u,U,k)),typeof p.componentDidUpdate=="function"&&(r.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof p.componentDidUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(r.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=U),p.props=u,p.state=U,p.context=k,u=V):(typeof p.componentDidUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(r.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||S===n.memoizedProps&&$===n.memoizedState||(r.flags|=1024),u=!1)}return p=u,gl(n,r),u=(r.flags&128)!==0,p||u?(p=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:p.render(),r.flags|=1,n!==null&&u?(r.child=us(r,n.child,null,g),r.child=us(r,null,l,g)):mt(n,r,l,g),r.memoizedState=p.state,n=r.child):n=Yn(n,r,g),n}function Lm(n,r,l,u){return ss(),r.flags|=256,mt(n,r,l,u),r.child}var Td={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ed(n){return{baseLanes:n,cachePool:Sp()}}function Ad(n,r,l){return n=n!==null?n.childLanes&~l:0,r&&(n|=Kt),n}function Om(n,r,l){var u=r.pendingProps,g=!1,p=(r.flags&128)!==0,S;if((S=p)||(S=n!==null&&n.memoizedState===null?!1:(Xe.current&2)!==0),S&&(g=!0,r.flags&=-129),S=(r.flags&32)!==0,r.flags&=-33,n===null){if(Se){if(g?xi(r):Ti(),(n=$e)?(n=Py(n,an),n=n!==null&&n.data!=="&"?n:null,n!==null&&(r.memoizedState={dehydrated:n,treeContext:mi!==null?{id:Cn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},l=hp(n),l.return=r,r.child=l,gt=r,$e=null)):n=null,n===null)throw _i(r);return lh(n)?r.lanes=32:r.lanes=536870912,null}var E=u.children;return u=u.fallback,g?(Ti(),g=r.mode,E=pl({mode:"hidden",children:E},g),u=is(u,g,l,null),E.return=r,u.return=r,E.sibling=u,r.child=E,u=r.child,u.memoizedState=Ed(l),u.childLanes=Ad(n,S,l),r.memoizedState=Td,wa(null,u)):(xi(r),Cd(r,E))}var k=n.memoizedState;if(k!==null&&(E=k.dehydrated,E!==null)){if(p)r.flags&256?(xi(r),r.flags&=-257,r=kd(n,r,l)):r.memoizedState!==null?(Ti(),r.child=n.child,r.flags|=128,r=null):(Ti(),E=u.fallback,g=r.mode,u=pl({mode:"visible",children:u.children},g),E=is(E,g,l,null),E.flags|=2,u.return=r,E.return=r,u.sibling=E,r.child=u,us(r,n.child,null,l),u=r.child,u.memoizedState=Ed(l),u.childLanes=Ad(n,S,l),r.memoizedState=Td,r=wa(null,u));else if(xi(r),lh(E)){if(S=E.nextSibling&&E.nextSibling.dataset,S)var z=S.dgst;S=z,u=Error(s(419)),u.stack="",u.digest=S,ua({value:u,source:null,stack:null}),r=kd(n,r,l)}else if(tt||Ys(n,r,l,!1),S=(l&n.childLanes)!==0,tt||S){if(S=je,S!==null&&(u=bg(S,l),u!==0&&u!==k.retryLane))throw k.retryLane=u,ns(n,u),Ht(S,n,u),wd;oh(E)||Tl(),r=kd(n,r,l)}else oh(E)?(r.flags|=192,r.child=n.child,r=null):(n=k.treeContext,$e=ln(E.nextSibling),gt=r,Se=!0,yi=null,an=!1,n!==null&&pp(r,n),r=Cd(r,u.children),r.flags|=4096);return r}return g?(Ti(),E=u.fallback,g=r.mode,k=n.child,z=k.sibling,u=Un(k,{mode:"hidden",children:u.children}),u.subtreeFlags=k.subtreeFlags&65011712,z!==null?E=Un(z,E):(E=is(E,g,l,null),E.flags|=2),E.return=r,u.return=r,u.sibling=E,r.child=u,wa(null,u),u=r.child,E=n.child.memoizedState,E===null?E=Ed(l):(g=E.cachePool,g!==null?(k=Qe._currentValue,g=g.parent!==k?{parent:k,pool:k}:g):g=Sp(),E={baseLanes:E.baseLanes|l,cachePool:g}),u.memoizedState=E,u.childLanes=Ad(n,S,l),r.memoizedState=Td,wa(n.child,u)):(xi(r),l=n.child,n=l.sibling,l=Un(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,n!==null&&(S=r.deletions,S===null?(r.deletions=[n],r.flags|=16):S.push(n)),r.child=l,r.memoizedState=null,l)}function Cd(n,r){return r=pl({mode:"visible",children:r},n.mode),r.return=n,n.child=r}function pl(n,r){return n=Ft(22,n,null,r),n.lanes=0,n}function kd(n,r,l){return us(r,n.child,null,l),n=Cd(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Rm(n,r,l){n.lanes|=r;var u=n.alternate;u!==null&&(u.lanes|=r),qu(n.return,r,l)}function Nd(n,r,l,u,g,p){var S=n.memoizedState;S===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:g,treeForkCount:p}:(S.isBackwards=r,S.rendering=null,S.renderingStartTime=0,S.last=u,S.tail=l,S.tailMode=g,S.treeForkCount=p)}function jm(n,r,l){var u=r.pendingProps,g=u.revealOrder,p=u.tail;u=u.children;var S=Xe.current,E=(S&2)!==0;if(E?(S=S&1|2,r.flags|=128):S&=1,ee(Xe,S),mt(n,r,u,l),u=Se?ca:0,!E&&n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Rm(n,l,r);else if(n.tag===19)Rm(n,l,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(g){case"forwards":for(l=r.child,g=null;l!==null;)n=l.alternate,n!==null&&il(n)===null&&(g=l),l=l.sibling;l=g,l===null?(g=r.child,r.child=null):(g=l.sibling,l.sibling=null),Nd(r,!1,g,l,p,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,g=r.child,r.child=null;g!==null;){if(n=g.alternate,n!==null&&il(n)===null){r.child=g;break}n=g.sibling,g.sibling=l,l=g,g=n}Nd(r,!0,l,null,p,u);break;case"together":Nd(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function Yn(n,r,l){if(n!==null&&(r.dependencies=n.dependencies),Ci|=r.lanes,(l&r.childLanes)===0)if(n!==null){if(Ys(n,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(n!==null&&r.child!==n.child)throw Error(s(153));if(r.child!==null){for(n=r.child,l=Un(n,n.pendingProps),r.child=l,l.return=r;n.sibling!==null;)n=n.sibling,l=l.sibling=Un(n,n.pendingProps),l.return=r;l.sibling=null}return r.child}function Md(n,r){return(n.lanes&r)!==0?!0:(n=n.dependencies,!!(n!==null&&Ko(n)))}function X1(n,r,l){switch(r.tag){case 3:st(r,r.stateNode.containerInfo),bi(r,Qe,n.memoizedState.cache),ss();break;case 27:case 5:Yi(r);break;case 4:st(r,r.stateNode.containerInfo);break;case 10:bi(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,td(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(xi(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Om(n,r,l):(xi(r),n=Yn(n,r,l),n!==null?n.sibling:null);xi(r);break;case 19:var g=(n.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Ys(n,r,l,!1),u=(l&r.childLanes)!==0),g){if(u)return jm(n,r,l);r.flags|=128}if(g=r.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ee(Xe,Xe.current),u)break;return null;case 22:return r.lanes=0,Cm(n,r,l,r.pendingProps);case 24:bi(r,Qe,n.memoizedState.cache)}return Yn(n,r,l)}function Hm(n,r,l){if(n!==null)if(n.memoizedProps!==r.pendingProps)tt=!0;else{if(!Md(n,l)&&(r.flags&128)===0)return tt=!1,X1(n,r,l);tt=(n.flags&131072)!==0}else tt=!1,Se&&(r.flags&1048576)!==0&&gp(r,ca,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(n=ls(r.elementType),r.type=n,typeof n=="function")ju(n)?(u=hs(n,u),r.tag=1,r=Dm(null,r,n,u,l)):(r.tag=0,r=xd(null,r,n,u,l));else{if(n!=null){var g=n.$$typeof;if(g===j){r.tag=11,r=Tm(null,r,n,u,l);break e}else if(g===B){r.tag=14,r=Em(null,r,n,u,l);break e}}throw r=te(n)||n,Error(s(306,r,""))}}return r;case 0:return xd(n,r,r.type,r.pendingProps,l);case 1:return u=r.type,g=hs(u,r.pendingProps),Dm(n,r,u,g,l);case 3:e:{if(st(r,r.stateNode.containerInfo),n===null)throw Error(s(387));u=r.pendingProps;var p=r.memoizedState;g=p.element,Ju(n,r),ya(r,u,null,l);var S=r.memoizedState;if(u=S.cache,bi(r,Qe,u),u!==p.cache&&Vu(r,[Qe],l,!0),ma(),u=S.element,p.isDehydrated)if(p={element:u,isDehydrated:!1,cache:S.cache},r.updateQueue.baseState=p,r.memoizedState=p,r.flags&256){r=Lm(n,r,u,l);break e}else if(u!==g){g=nn(Error(s(424)),r),ua(g),r=Lm(n,r,u,l);break e}else{switch(n=r.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for($e=ln(n.firstChild),gt=r,Se=!0,yi=null,an=!0,l=Cp(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ss(),u===g){r=Yn(n,r,l);break e}mt(n,r,u,l)}r=r.child}return r;case 26:return gl(n,r),n===null?(l=Xy(r.type,null,r.pendingProps,null))?r.memoizedState=l:Se||(l=r.type,n=r.pendingProps,u=Dl(oe.current).createElement(l),u[ft]=r,u[Mt]=n,yt(u,l,n),ut(u),r.stateNode=u):r.memoizedState=Xy(r.type,n.memoizedProps,r.pendingProps,n.memoizedState),null;case 27:return Yi(r),n===null&&Se&&(u=r.stateNode=Vy(r.type,r.pendingProps,oe.current),gt=r,an=!0,g=$e,Li(r.type)?(ch=g,$e=ln(u.firstChild)):$e=g),mt(n,r,r.pendingProps.children,l),gl(n,r),n===null&&(r.flags|=4194304),r.child;case 5:return n===null&&Se&&((g=u=$e)&&(u=xw(u,r.type,r.pendingProps,an),u!==null?(r.stateNode=u,gt=r,$e=ln(u.firstChild),an=!1,g=!0):g=!1),g||_i(r)),Yi(r),g=r.type,p=r.pendingProps,S=n!==null?n.memoizedProps:null,u=p.children,sh(g,p)?u=null:S!==null&&sh(g,S)&&(r.flags|=32),r.memoizedState!==null&&(g=id(n,r,$1,null,null,l),za._currentValue=g),gl(n,r),mt(n,r,u,l),r.child;case 6:return n===null&&Se&&((n=l=$e)&&(l=Tw(l,r.pendingProps,an),l!==null?(r.stateNode=l,gt=r,$e=null,n=!0):n=!1),n||_i(r)),null;case 13:return Om(n,r,l);case 4:return st(r,r.stateNode.containerInfo),u=r.pendingProps,n===null?r.child=us(r,null,u,l):mt(n,r,u,l),r.child;case 11:return Tm(n,r,r.type,r.pendingProps,l);case 7:return mt(n,r,r.pendingProps,l),r.child;case 8:return mt(n,r,r.pendingProps.children,l),r.child;case 12:return mt(n,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,bi(r,r.type,u.value),mt(n,r,u.children,l),r.child;case 9:return g=r.type._context,u=r.pendingProps.children,as(r),g=pt(g),u=u(g),r.flags|=1,mt(n,r,u,l),r.child;case 14:return Em(n,r,r.type,r.pendingProps,l);case 15:return Am(n,r,r.type,r.pendingProps,l);case 19:return jm(n,r,l);case 31:return G1(n,r,l);case 22:return Cm(n,r,l,r.pendingProps);case 24:return as(r),u=pt(Qe),n===null?(g=Xu(),g===null&&(g=je,p=Fu(),g.pooledCache=p,p.refCount++,p!==null&&(g.pooledCacheLanes|=l),g=p),r.memoizedState={parent:u,cache:g},Ku(r),bi(r,Qe,g)):((n.lanes&l)!==0&&(Ju(n,r),ya(r,null,null,l),ma()),g=n.memoizedState,p=r.memoizedState,g.parent!==u?(g={parent:u,cache:u},r.memoizedState=g,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=g),bi(r,Qe,u)):(u=p.cache,bi(r,Qe,u),u!==g.cache&&Vu(r,[Qe],l,!0))),mt(n,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function Kn(n){n.flags|=4}function Dd(n,r,l,u,g){if((r=(n.mode&32)!==0)&&(r=!1),r){if(n.flags|=16777216,(g&335544128)===g)if(n.stateNode.complete)n.flags|=8192;else if(cy())n.flags|=8192;else throw cs=Qo,Yu}else n.flags&=-16777217}function zm(n,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Zy(r))if(cy())n.flags|=8192;else throw cs=Qo,Yu}function ml(n,r){r!==null&&(n.flags|=4),n.flags&16384&&(r=n.tag!==22?mg():536870912,n.lanes|=r,ar|=r)}function xa(n,r){if(!Se)switch(n.tailMode){case"hidden":r=n.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?n.tail=null:l.sibling=null;break;case"collapsed":l=n.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function Be(n){var r=n.alternate!==null&&n.alternate.child===n.child,l=0,u=0;if(r)for(var g=n.child;g!==null;)l|=g.lanes|g.childLanes,u|=g.subtreeFlags&65011712,u|=g.flags&65011712,g.return=n,g=g.sibling;else for(g=n.child;g!==null;)l|=g.lanes|g.childLanes,u|=g.subtreeFlags,u|=g.flags,g.return=n,g=g.sibling;return n.subtreeFlags|=u,n.childLanes=l,r}function Y1(n,r,l){var u=r.pendingProps;switch(Bu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(r),null;case 1:return Be(r),null;case 3:return l=r.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),Fn(Qe),ze(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(n===null||n.child===null)&&(Xs(r)?Kn(r):n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Pu())),Be(r),null;case 26:var g=r.type,p=r.memoizedState;return n===null?(Kn(r),p!==null?(Be(r),zm(r,p)):(Be(r),Dd(r,g,null,u,l))):p?p!==n.memoizedState?(Kn(r),Be(r),zm(r,p)):(Be(r),r.flags&=-16777217):(n=n.memoizedProps,n!==u&&Kn(r),Be(r),Dd(r,g,n,u,l)),null;case 27:if(zn(r),l=oe.current,g=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&Kn(r);else{if(!u){if(r.stateNode===null)throw Error(s(166));return Be(r),null}n=ne.current,Xs(r)?mp(r):(n=Vy(g,u,l),r.stateNode=n,Kn(r))}return Be(r),null;case 5:if(zn(r),g=r.type,n!==null&&r.stateNode!=null)n.memoizedProps!==u&&Kn(r);else{if(!u){if(r.stateNode===null)throw Error(s(166));return Be(r),null}if(p=ne.current,Xs(r))mp(r);else{var S=Dl(oe.current);switch(p){case 1:p=S.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:p=S.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":p=S.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":p=S.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":p=S.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof u.is=="string"?S.createElement("select",{is:u.is}):S.createElement("select"),u.multiple?p.multiple=!0:u.size&&(p.size=u.size);break;default:p=typeof u.is=="string"?S.createElement(g,{is:u.is}):S.createElement(g)}}p[ft]=r,p[Mt]=u;e:for(S=r.child;S!==null;){if(S.tag===5||S.tag===6)p.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===r)break e;for(;S.sibling===null;){if(S.return===null||S.return===r)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}r.stateNode=p;e:switch(yt(p,g,u),g){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Kn(r)}}return Be(r),Dd(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,l),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==u&&Kn(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(s(166));if(n=oe.current,Xs(r)){if(n=r.stateNode,l=r.memoizedProps,u=null,g=gt,g!==null)switch(g.tag){case 27:case 5:u=g.memoizedProps}n[ft]=r,n=!!(n.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||Oy(n.nodeValue,l)),n||_i(r,!0)}else n=Dl(n).createTextNode(u),n[ft]=r,r.stateNode=n}return Be(r),null;case 31:if(l=r.memoizedState,n===null||n.memoizedState!==null){if(u=Xs(r),l!==null){if(n===null){if(!u)throw Error(s(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[ft]=r}else ss(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Be(r),n=!1}else l=Pu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=l),n=!0;if(!n)return r.flags&256?(Xt(r),r):(Xt(r),null);if((r.flags&128)!==0)throw Error(s(558))}return Be(r),null;case 13:if(u=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(g=Xs(r),u!==null&&u.dehydrated!==null){if(n===null){if(!g)throw Error(s(318));if(g=r.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(s(317));g[ft]=r}else ss(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Be(r),g=!1}else g=Pu(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=g),g=!0;if(!g)return r.flags&256?(Xt(r),r):(Xt(r),null)}return Xt(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,n=n!==null&&n.memoizedState!==null,l&&(u=r.child,g=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(g=u.alternate.memoizedState.cachePool.pool),p=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(p=u.memoizedState.cachePool.pool),p!==g&&(u.flags|=2048)),l!==n&&l&&(r.child.flags|=8192),ml(r,r.updateQueue),Be(r),null);case 4:return ze(),n===null&&Qd(r.stateNode.containerInfo),Be(r),null;case 10:return Fn(r.type),Be(r),null;case 19:if(G(Xe),u=r.memoizedState,u===null)return Be(r),null;if(g=(r.flags&128)!==0,p=u.rendering,p===null)if(g)xa(u,!1);else{if(Ge!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(p=il(n),p!==null){for(r.flags|=128,xa(u,!1),n=p.updateQueue,r.updateQueue=n,ml(r,n),r.subtreeFlags=0,n=l,l=r.child;l!==null;)dp(l,n),l=l.sibling;return ee(Xe,Xe.current&1|2),Se&&qn(r,u.treeForkCount),r.child}n=n.sibling}u.tail!==null&&xt()>Sl&&(r.flags|=128,g=!0,xa(u,!1),r.lanes=4194304)}else{if(!g)if(n=il(p),n!==null){if(r.flags|=128,g=!0,n=n.updateQueue,r.updateQueue=n,ml(r,n),xa(u,!0),u.tail===null&&u.tailMode==="hidden"&&!p.alternate&&!Se)return Be(r),null}else 2*xt()-u.renderingStartTime>Sl&&l!==536870912&&(r.flags|=128,g=!0,xa(u,!1),r.lanes=4194304);u.isBackwards?(p.sibling=r.child,r.child=p):(n=u.last,n!==null?n.sibling=p:r.child=p,u.last=p)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=xt(),n.sibling=null,l=Xe.current,ee(Xe,g?l&1|2:l&1),Se&&qn(r,u.treeForkCount),n):(Be(r),null);case 22:case 23:return Xt(r),ed(),u=r.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(Be(r),r.subtreeFlags&6&&(r.flags|=8192)):Be(r),l=r.updateQueue,l!==null&&ml(r,l.retryQueue),l=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),n!==null&&G(os),null;case 24:return l=null,n!==null&&(l=n.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Fn(Qe),Be(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function K1(n,r){switch(Bu(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Fn(Qe),ze(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return zn(r),null;case 31:if(r.memoizedState!==null){if(Xt(r),r.alternate===null)throw Error(s(340));ss()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if(Xt(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(s(340));ss()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return G(Xe),null;case 4:return ze(),null;case 10:return Fn(r.type),null;case 22:case 23:return Xt(r),ed(),n!==null&&G(os),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return Fn(Qe),null;case 25:return null;default:return null}}function $m(n,r){switch(Bu(r),r.tag){case 3:Fn(Qe),ze();break;case 26:case 27:case 5:zn(r);break;case 4:ze();break;case 31:r.memoizedState!==null&&Xt(r);break;case 13:Xt(r);break;case 19:G(Xe);break;case 10:Fn(r.type);break;case 22:case 23:Xt(r),ed(),n!==null&&G(os);break;case 24:Fn(Qe)}}function Ta(n,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var g=u.next;l=g;do{if((l.tag&n)===n){u=void 0;var p=l.create,S=l.inst;u=p(),S.destroy=u}l=l.next}while(l!==g)}}catch(E){De(r,r.return,E)}}function Ei(n,r,l){try{var u=r.updateQueue,g=u!==null?u.lastEffect:null;if(g!==null){var p=g.next;u=p;do{if((u.tag&n)===n){var S=u.inst,E=S.destroy;if(E!==void 0){S.destroy=void 0,g=r;var k=l,z=E;try{z()}catch(V){De(g,k,V)}}}u=u.next}while(u!==p)}}catch(V){De(r,r.return,V)}}function Bm(n){var r=n.updateQueue;if(r!==null){var l=n.stateNode;try{Np(r,l)}catch(u){De(n,n.return,u)}}}function Im(n,r,l){l.props=hs(n.type,n.memoizedProps),l.state=n.memoizedState;try{l.componentWillUnmount()}catch(u){De(n,r,u)}}function Ea(n,r){try{var l=n.ref;if(l!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof l=="function"?n.refCleanup=l(u):l.current=u}}catch(g){De(n,r,g)}}function Nn(n,r){var l=n.ref,u=n.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(g){De(n,r,g)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(g){De(n,r,g)}else l.current=null}function Pm(n){var r=n.type,l=n.memoizedProps,u=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(g){De(n,n.return,g)}}function Ld(n,r,l){try{var u=n.stateNode;yw(u,n.type,l,r),u[Mt]=r}catch(g){De(n,n.return,g)}}function Um(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Li(n.type)||n.tag===4}function Od(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Um(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Li(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Rd(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(n,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(n),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=In));else if(u!==4&&(u===27&&Li(n.type)&&(l=n.stateNode,r=null),n=n.child,n!==null))for(Rd(n,r,l),n=n.sibling;n!==null;)Rd(n,r,l),n=n.sibling}function yl(n,r,l){var u=n.tag;if(u===5||u===6)n=n.stateNode,r?l.insertBefore(n,r):l.appendChild(n);else if(u!==4&&(u===27&&Li(n.type)&&(l=n.stateNode),n=n.child,n!==null))for(yl(n,r,l),n=n.sibling;n!==null;)yl(n,r,l),n=n.sibling}function qm(n){var r=n.stateNode,l=n.memoizedProps;try{for(var u=n.type,g=r.attributes;g.length;)r.removeAttributeNode(g[0]);yt(r,u,l),r[ft]=n,r[Mt]=l}catch(p){De(n,n.return,p)}}var Jn=!1,nt=!1,jd=!1,Vm=typeof WeakSet=="function"?WeakSet:Set,dt=null;function J1(n,r){if(n=n.containerInfo,nh=$l,n=np(n),ku(n)){if("selectionStart"in n)var l={start:n.selectionStart,end:n.selectionEnd};else e:{l=(l=n.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var g=u.anchorOffset,p=u.focusNode;u=u.focusOffset;try{l.nodeType,p.nodeType}catch{l=null;break e}var S=0,E=-1,k=-1,z=0,V=0,K=n,$=null;t:for(;;){for(var U;K!==l||g!==0&&K.nodeType!==3||(E=S+g),K!==p||u!==0&&K.nodeType!==3||(k=S+u),K.nodeType===3&&(S+=K.nodeValue.length),(U=K.firstChild)!==null;)$=K,K=U;for(;;){if(K===n)break t;if($===l&&++z===g&&(E=S),$===p&&++V===u&&(k=S),(U=K.nextSibling)!==null)break;K=$,$=K.parentNode}K=U}l=E===-1||k===-1?null:{start:E,end:k}}else l=null}l=l||{start:0,end:0}}else l=null;for(ih={focusedElem:n,selectionRange:l},$l=!1,dt=r;dt!==null;)if(r=dt,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,dt=n;else for(;dt!==null;){switch(r=dt,p=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(l=0;l<n.length;l++)g=n[l],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&p!==null){n=void 0,l=r,g=p.memoizedProps,p=p.memoizedState,u=l.stateNode;try{var ie=hs(l.type,g);n=u.getSnapshotBeforeUpdate(ie,p),u.__reactInternalSnapshotBeforeUpdate=n}catch(ce){De(l,l.return,ce)}}break;case 3:if((n&1024)!==0){if(n=r.stateNode.containerInfo,l=n.nodeType,l===9)ah(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":ah(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(s(163))}if(n=r.sibling,n!==null){n.return=r.return,dt=n;break}dt=r.return}}function Fm(n,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:Zn(n,l),u&4&&Ta(5,l);break;case 1:if(Zn(n,l),u&4)if(n=l.stateNode,r===null)try{n.componentDidMount()}catch(S){De(l,l.return,S)}else{var g=hs(l.type,r.memoizedProps);r=r.memoizedState;try{n.componentDidUpdate(g,r,n.__reactInternalSnapshotBeforeUpdate)}catch(S){De(l,l.return,S)}}u&64&&Bm(l),u&512&&Ea(l,l.return);break;case 3:if(Zn(n,l),u&64&&(n=l.updateQueue,n!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Np(n,r)}catch(S){De(l,l.return,S)}}break;case 27:r===null&&u&4&&qm(l);case 26:case 5:Zn(n,l),r===null&&u&4&&Pm(l),u&512&&Ea(l,l.return);break;case 12:Zn(n,l);break;case 31:Zn(n,l),u&4&&Ym(n,l);break;case 13:Zn(n,l),u&4&&Km(n,l),u&64&&(n=l.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(l=rw.bind(null,l),Ew(n,l))));break;case 22:if(u=l.memoizedState!==null||Jn,!u){r=r!==null&&r.memoizedState!==null||nt,g=Jn;var p=nt;Jn=u,(nt=r)&&!p?Qn(n,l,(l.subtreeFlags&8772)!==0):Zn(n,l),Jn=g,nt=p}break;case 30:break;default:Zn(n,l)}}function Gm(n){var r=n.alternate;r!==null&&(n.alternate=null,Gm(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&du(r)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Pe=null,Lt=!1;function Wn(n,r,l){for(l=l.child;l!==null;)Xm(n,r,l),l=l.sibling}function Xm(n,r,l){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount($n,l)}catch{}switch(l.tag){case 26:nt||Nn(l,r),Wn(n,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:nt||Nn(l,r);var u=Pe,g=Lt;Li(l.type)&&(Pe=l.stateNode,Lt=!1),Wn(n,r,l),Ra(l.stateNode),Pe=u,Lt=g;break;case 5:nt||Nn(l,r);case 6:if(u=Pe,g=Lt,Pe=null,Wn(n,r,l),Pe=u,Lt=g,Pe!==null)if(Lt)try{(Pe.nodeType===9?Pe.body:Pe.nodeName==="HTML"?Pe.ownerDocument.body:Pe).removeChild(l.stateNode)}catch(p){De(l,r,p)}else try{Pe.removeChild(l.stateNode)}catch(p){De(l,r,p)}break;case 18:Pe!==null&&(Lt?(n=Pe,By(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,l.stateNode),gr(n)):By(Pe,l.stateNode));break;case 4:u=Pe,g=Lt,Pe=l.stateNode.containerInfo,Lt=!0,Wn(n,r,l),Pe=u,Lt=g;break;case 0:case 11:case 14:case 15:Ei(2,l,r),nt||Ei(4,l,r),Wn(n,r,l);break;case 1:nt||(Nn(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Im(l,r,u)),Wn(n,r,l);break;case 21:Wn(n,r,l);break;case 22:nt=(u=nt)||l.memoizedState!==null,Wn(n,r,l),nt=u;break;default:Wn(n,r,l)}}function Ym(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{gr(n)}catch(l){De(r,r.return,l)}}}function Km(n,r){if(r.memoizedState===null&&(n=r.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{gr(n)}catch(l){De(r,r.return,l)}}function W1(n){switch(n.tag){case 31:case 13:case 19:var r=n.stateNode;return r===null&&(r=n.stateNode=new Vm),r;case 22:return n=n.stateNode,r=n._retryCache,r===null&&(r=n._retryCache=new Vm),r;default:throw Error(s(435,n.tag))}}function _l(n,r){var l=W1(n);r.forEach(function(u){if(!l.has(u)){l.add(u);var g=aw.bind(null,n,u);u.then(g,g)}})}function Ot(n,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var g=l[u],p=n,S=r,E=S;e:for(;E!==null;){switch(E.tag){case 27:if(Li(E.type)){Pe=E.stateNode,Lt=!1;break e}break;case 5:Pe=E.stateNode,Lt=!1;break e;case 3:case 4:Pe=E.stateNode.containerInfo,Lt=!0;break e}E=E.return}if(Pe===null)throw Error(s(160));Xm(p,S,g),Pe=null,Lt=!1,p=g.alternate,p!==null&&(p.return=null),g.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Jm(r,n),r=r.sibling}var _n=null;function Jm(n,r){var l=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Ot(r,n),Rt(n),u&4&&(Ei(3,n,n.return),Ta(3,n),Ei(5,n,n.return));break;case 1:Ot(r,n),Rt(n),u&512&&(nt||l===null||Nn(l,l.return)),u&64&&Jn&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(l=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var g=_n;if(Ot(r,n),Rt(n),u&512&&(nt||l===null||Nn(l,l.return)),u&4){var p=l!==null?l.memoizedState:null;if(u=n.memoizedState,l===null)if(u===null)if(n.stateNode===null){e:{u=n.type,l=n.memoizedProps,g=g.ownerDocument||g;t:switch(u){case"title":p=g.getElementsByTagName("title")[0],(!p||p[Zr]||p[ft]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=g.createElement(u),g.head.insertBefore(p,g.querySelector("head > title"))),yt(p,u,l),p[ft]=n,ut(p),u=p;break e;case"link":var S=Jy("link","href",g).get(u+(l.href||""));if(S){for(var E=0;E<S.length;E++)if(p=S[E],p.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&p.getAttribute("rel")===(l.rel==null?null:l.rel)&&p.getAttribute("title")===(l.title==null?null:l.title)&&p.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){S.splice(E,1);break t}}p=g.createElement(u),yt(p,u,l),g.head.appendChild(p);break;case"meta":if(S=Jy("meta","content",g).get(u+(l.content||""))){for(E=0;E<S.length;E++)if(p=S[E],p.getAttribute("content")===(l.content==null?null:""+l.content)&&p.getAttribute("name")===(l.name==null?null:l.name)&&p.getAttribute("property")===(l.property==null?null:l.property)&&p.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&p.getAttribute("charset")===(l.charSet==null?null:l.charSet)){S.splice(E,1);break t}}p=g.createElement(u),yt(p,u,l),g.head.appendChild(p);break;default:throw Error(s(468,u))}p[ft]=n,ut(p),u=p}n.stateNode=u}else Wy(g,n.type,n.stateNode);else n.stateNode=Ky(g,u,n.memoizedProps);else p!==u?(p===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):p.count--,u===null?Wy(g,n.type,n.stateNode):Ky(g,u,n.memoizedProps)):u===null&&n.stateNode!==null&&Ld(n,n.memoizedProps,l.memoizedProps)}break;case 27:Ot(r,n),Rt(n),u&512&&(nt||l===null||Nn(l,l.return)),l!==null&&u&4&&Ld(n,n.memoizedProps,l.memoizedProps);break;case 5:if(Ot(r,n),Rt(n),u&512&&(nt||l===null||Nn(l,l.return)),n.flags&32){g=n.stateNode;try{zs(g,"")}catch(ie){De(n,n.return,ie)}}u&4&&n.stateNode!=null&&(g=n.memoizedProps,Ld(n,g,l!==null?l.memoizedProps:g)),u&1024&&(jd=!0);break;case 6:if(Ot(r,n),Rt(n),u&4){if(n.stateNode===null)throw Error(s(162));u=n.memoizedProps,l=n.stateNode;try{l.nodeValue=u}catch(ie){De(n,n.return,ie)}}break;case 3:if(Rl=null,g=_n,_n=Ll(r.containerInfo),Ot(r,n),_n=g,Rt(n),u&4&&l!==null&&l.memoizedState.isDehydrated)try{gr(r.containerInfo)}catch(ie){De(n,n.return,ie)}jd&&(jd=!1,Wm(n));break;case 4:u=_n,_n=Ll(n.stateNode.containerInfo),Ot(r,n),Rt(n),_n=u;break;case 12:Ot(r,n),Rt(n);break;case 31:Ot(r,n),Rt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,_l(n,u)));break;case 13:Ot(r,n),Rt(n),n.child.flags&8192&&n.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(vl=xt()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,_l(n,u)));break;case 22:g=n.memoizedState!==null;var k=l!==null&&l.memoizedState!==null,z=Jn,V=nt;if(Jn=z||g,nt=V||k,Ot(r,n),nt=V,Jn=z,Rt(n),u&8192)e:for(r=n.stateNode,r._visibility=g?r._visibility&-2:r._visibility|1,g&&(l===null||k||Jn||nt||fs(n)),l=null,r=n;;){if(r.tag===5||r.tag===26){if(l===null){k=l=r;try{if(p=k.stateNode,g)S=p.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{E=k.stateNode;var K=k.memoizedProps.style,$=K!=null&&K.hasOwnProperty("display")?K.display:null;E.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(ie){De(k,k.return,ie)}}}else if(r.tag===6){if(l===null){k=r;try{k.stateNode.nodeValue=g?"":k.memoizedProps}catch(ie){De(k,k.return,ie)}}}else if(r.tag===18){if(l===null){k=r;try{var U=k.stateNode;g?Iy(U,!0):Iy(k.stateNode,!1)}catch(ie){De(k,k.return,ie)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===n)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break e;for(;r.sibling===null;){if(r.return===null||r.return===n)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=n.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,_l(n,l))));break;case 19:Ot(r,n),Rt(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,_l(n,u)));break;case 30:break;case 21:break;default:Ot(r,n),Rt(n)}}function Rt(n){var r=n.flags;if(r&2){try{for(var l,u=n.return;u!==null;){if(Um(u)){l=u;break}u=u.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var g=l.stateNode,p=Od(n);yl(n,p,g);break;case 5:var S=l.stateNode;l.flags&32&&(zs(S,""),l.flags&=-33);var E=Od(n);yl(n,E,S);break;case 3:case 4:var k=l.stateNode.containerInfo,z=Od(n);Rd(n,z,k);break;default:throw Error(s(161))}}catch(V){De(n,n.return,V)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function Wm(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var r=n;Wm(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),n=n.sibling}}function Zn(n,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Fm(n,r.alternate,r),r=r.sibling}function fs(n){for(n=n.child;n!==null;){var r=n;switch(r.tag){case 0:case 11:case 14:case 15:Ei(4,r,r.return),fs(r);break;case 1:Nn(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Im(r,r.return,l),fs(r);break;case 27:Ra(r.stateNode);case 26:case 5:Nn(r,r.return),fs(r);break;case 22:r.memoizedState===null&&fs(r);break;case 30:fs(r);break;default:fs(r)}n=n.sibling}}function Qn(n,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,g=n,p=r,S=p.flags;switch(p.tag){case 0:case 11:case 15:Qn(g,p,l),Ta(4,p);break;case 1:if(Qn(g,p,l),u=p,g=u.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(z){De(u,u.return,z)}if(u=p,g=u.updateQueue,g!==null){var E=u.stateNode;try{var k=g.shared.hiddenCallbacks;if(k!==null)for(g.shared.hiddenCallbacks=null,g=0;g<k.length;g++)kp(k[g],E)}catch(z){De(u,u.return,z)}}l&&S&64&&Bm(p),Ea(p,p.return);break;case 27:qm(p);case 26:case 5:Qn(g,p,l),l&&u===null&&S&4&&Pm(p),Ea(p,p.return);break;case 12:Qn(g,p,l);break;case 31:Qn(g,p,l),l&&S&4&&Ym(g,p);break;case 13:Qn(g,p,l),l&&S&4&&Km(g,p);break;case 22:p.memoizedState===null&&Qn(g,p,l),Ea(p,p.return);break;case 30:break;default:Qn(g,p,l)}r=r.sibling}}function Hd(n,r){var l=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),n=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(n=r.memoizedState.cachePool.pool),n!==l&&(n!=null&&n.refCount++,l!=null&&da(l))}function zd(n,r){n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&da(n))}function bn(n,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Zm(n,r,l,u),r=r.sibling}function Zm(n,r,l,u){var g=r.flags;switch(r.tag){case 0:case 11:case 15:bn(n,r,l,u),g&2048&&Ta(9,r);break;case 1:bn(n,r,l,u);break;case 3:bn(n,r,l,u),g&2048&&(n=null,r.alternate!==null&&(n=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==n&&(r.refCount++,n!=null&&da(n)));break;case 12:if(g&2048){bn(n,r,l,u),n=r.stateNode;try{var p=r.memoizedProps,S=p.id,E=p.onPostCommit;typeof E=="function"&&E(S,r.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(k){De(r,r.return,k)}}else bn(n,r,l,u);break;case 31:bn(n,r,l,u);break;case 13:bn(n,r,l,u);break;case 23:break;case 22:p=r.stateNode,S=r.alternate,r.memoizedState!==null?p._visibility&2?bn(n,r,l,u):Aa(n,r):p._visibility&2?bn(n,r,l,u):(p._visibility|=2,ir(n,r,l,u,(r.subtreeFlags&10256)!==0||!1)),g&2048&&Hd(S,r);break;case 24:bn(n,r,l,u),g&2048&&zd(r.alternate,r);break;default:bn(n,r,l,u)}}function ir(n,r,l,u,g){for(g=g&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var p=n,S=r,E=l,k=u,z=S.flags;switch(S.tag){case 0:case 11:case 15:ir(p,S,E,k,g),Ta(8,S);break;case 23:break;case 22:var V=S.stateNode;S.memoizedState!==null?V._visibility&2?ir(p,S,E,k,g):Aa(p,S):(V._visibility|=2,ir(p,S,E,k,g)),g&&z&2048&&Hd(S.alternate,S);break;case 24:ir(p,S,E,k,g),g&&z&2048&&zd(S.alternate,S);break;default:ir(p,S,E,k,g)}r=r.sibling}}function Aa(n,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=n,u=r,g=u.flags;switch(u.tag){case 22:Aa(l,u),g&2048&&Hd(u.alternate,u);break;case 24:Aa(l,u),g&2048&&zd(u.alternate,u);break;default:Aa(l,u)}r=r.sibling}}var Ca=8192;function sr(n,r,l){if(n.subtreeFlags&Ca)for(n=n.child;n!==null;)Qm(n,r,l),n=n.sibling}function Qm(n,r,l){switch(n.tag){case 26:sr(n,r,l),n.flags&Ca&&n.memoizedState!==null&&zw(l,_n,n.memoizedState,n.memoizedProps);break;case 5:sr(n,r,l);break;case 3:case 4:var u=_n;_n=Ll(n.stateNode.containerInfo),sr(n,r,l),_n=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=Ca,Ca=16777216,sr(n,r,l),Ca=u):sr(n,r,l));break;default:sr(n,r,l)}}function ey(n){var r=n.alternate;if(r!==null&&(n=r.child,n!==null)){r.child=null;do r=n.sibling,n.sibling=null,n=r;while(n!==null)}}function ka(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];dt=u,ny(u,n)}ey(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)ty(n),n=n.sibling}function ty(n){switch(n.tag){case 0:case 11:case 15:ka(n),n.flags&2048&&Ei(9,n,n.return);break;case 3:ka(n);break;case 12:ka(n);break;case 22:var r=n.stateNode;n.memoizedState!==null&&r._visibility&2&&(n.return===null||n.return.tag!==13)?(r._visibility&=-3,bl(n)):ka(n);break;default:ka(n)}}function bl(n){var r=n.deletions;if((n.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];dt=u,ny(u,n)}ey(n)}for(n=n.child;n!==null;){switch(r=n,r.tag){case 0:case 11:case 15:Ei(8,r,r.return),bl(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,bl(r));break;default:bl(r)}n=n.sibling}}function ny(n,r){for(;dt!==null;){var l=dt;switch(l.tag){case 0:case 11:case 15:Ei(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:da(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,dt=u;else e:for(l=n;dt!==null;){u=dt;var g=u.sibling,p=u.return;if(Gm(u),u===l){dt=null;break e}if(g!==null){g.return=p,dt=g;break e}dt=p}}}var Z1={getCacheForType:function(n){var r=pt(Qe),l=r.data.get(n);return l===void 0&&(l=n(),r.data.set(n,l)),l},cacheSignal:function(){return pt(Qe).controller.signal}},Q1=typeof WeakMap=="function"?WeakMap:Map,ke=0,je=null,ye=null,be=0,Me=0,Yt=null,Ai=!1,rr=!1,$d=!1,ei=0,Ge=0,Ci=0,gs=0,Bd=0,Kt=0,ar=0,Na=null,jt=null,Id=!1,vl=0,iy=0,Sl=1/0,wl=null,ki=null,at=0,Ni=null,or=null,ti=0,Pd=0,Ud=null,sy=null,Ma=0,qd=null;function Jt(){return(ke&2)!==0&&be!==0?be&-be:I.T!==null?Kd():vg()}function ry(){if(Kt===0)if((be&536870912)===0||Se){var n=Zt;Zt<<=1,(Zt&3932160)===0&&(Zt=262144),Kt=n}else Kt=536870912;return n=Gt.current,n!==null&&(n.flags|=32),Kt}function Ht(n,r,l){(n===je&&(Me===2||Me===9)||n.cancelPendingCommit!==null)&&(lr(n,0),Mi(n,be,Kt,!1)),Wr(n,l),((ke&2)===0||n!==je)&&(n===je&&((ke&2)===0&&(gs|=l),Ge===4&&Mi(n,be,Kt,!1)),Mn(n))}function ay(n,r,l){if((ke&6)!==0)throw Error(s(327));var u=!l&&(r&127)===0&&(r&n.expiredLanes)===0||Jr(n,r),g=u?nw(n,r):Fd(n,r,!0),p=u;do{if(g===0){rr&&!u&&Mi(n,r,0,!1);break}else{if(l=n.current.alternate,p&&!ew(l)){g=Fd(n,r,!1),p=!1;continue}if(g===2){if(p=r,n.errorRecoveryDisabledLanes&p)var S=0;else S=n.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){r=S;e:{var E=n;g=Na;var k=E.current.memoizedState.isDehydrated;if(k&&(lr(E,S).flags|=256),S=Fd(E,S,!1),S!==2){if($d&&!k){E.errorRecoveryDisabledLanes|=p,gs|=p,g=4;break e}p=jt,jt=g,p!==null&&(jt===null?jt=p:jt.push.apply(jt,p))}g=S}if(p=!1,g!==2)continue}}if(g===1){lr(n,0),Mi(n,r,0,!0);break}e:{switch(u=n,p=g,p){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:Mi(u,r,Kt,!Ai);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(g=vl+300-xt(),10<g)){if(Mi(u,r,Kt,!Ai),Lo(u,0,!0)!==0)break e;ti=r,u.timeoutHandle=zy(oy.bind(null,u,l,jt,wl,Id,r,Kt,gs,ar,Ai,p,"Throttled",-0,0),g);break e}oy(u,l,jt,wl,Id,r,Kt,gs,ar,Ai,p,null,-0,0)}}break}while(!0);Mn(n)}function oy(n,r,l,u,g,p,S,E,k,z,V,K,$,U){if(n.timeoutHandle=-1,K=r.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},Qm(r,p,K);var ie=(p&62914560)===p?vl-xt():(p&4194048)===p?iy-xt():0;if(ie=$w(K,ie),ie!==null){ti=p,n.cancelPendingCommit=ie(py.bind(null,n,r,p,l,u,g,S,E,k,V,K,null,$,U)),Mi(n,p,S,!z);return}}py(n,r,p,l,u,g,S,E,k)}function ew(n){for(var r=n;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var g=l[u],p=g.getSnapshot;g=g.value;try{if(!Vt(p(),g))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Mi(n,r,l,u){r&=~Bd,r&=~gs,n.suspendedLanes|=r,n.pingedLanes&=~r,u&&(n.warmLanes|=r),u=n.expirationTimes;for(var g=r;0<g;){var p=31-Tt(g),S=1<<p;u[p]=-1,g&=~S}l!==0&&yg(n,l,r)}function xl(){return(ke&6)===0?(Da(0),!1):!0}function Vd(){if(ye!==null){if(Me===0)var n=ye.return;else n=ye,Vn=rs=null,ad(n),Zs=null,fa=0,n=ye;for(;n!==null;)$m(n.alternate,n),n=n.return;ye=null}}function lr(n,r){var l=n.timeoutHandle;l!==-1&&(n.timeoutHandle=-1,vw(l)),l=n.cancelPendingCommit,l!==null&&(n.cancelPendingCommit=null,l()),ti=0,Vd(),je=n,ye=l=Un(n.current,null),be=r,Me=0,Yt=null,Ai=!1,rr=Jr(n,r),$d=!1,ar=Kt=Bd=gs=Ci=Ge=0,jt=Na=null,Id=!1,(r&8)!==0&&(r|=r&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=r;0<u;){var g=31-Tt(u),p=1<<g;r|=n[g],u&=~p}return ei=r,Vo(),l}function ly(n,r){pe=null,I.H=Sa,r===Ws||r===Zo?(r=Tp(),Me=3):r===Yu?(r=Tp(),Me=4):Me=r===wd?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Yt=r,ye===null&&(Ge=1,hl(n,nn(r,n.current)))}function cy(){var n=Gt.current;return n===null?!0:(be&4194048)===be?on===null:(be&62914560)===be||(be&536870912)!==0?n===on:!1}function uy(){var n=I.H;return I.H=Sa,n===null?Sa:n}function dy(){var n=I.A;return I.A=Z1,n}function Tl(){Ge=4,Ai||(be&4194048)!==be&&Gt.current!==null||(rr=!0),(Ci&134217727)===0&&(gs&134217727)===0||je===null||Mi(je,be,Kt,!1)}function Fd(n,r,l){var u=ke;ke|=2;var g=uy(),p=dy();(je!==n||be!==r)&&(wl=null,lr(n,r)),r=!1;var S=Ge;e:do try{if(Me!==0&&ye!==null){var E=ye,k=Yt;switch(Me){case 8:Vd(),S=6;break e;case 3:case 2:case 9:case 6:Gt.current===null&&(r=!0);var z=Me;if(Me=0,Yt=null,cr(n,E,k,z),l&&rr){S=0;break e}break;default:z=Me,Me=0,Yt=null,cr(n,E,k,z)}}tw(),S=Ge;break}catch(V){ly(n,V)}while(!0);return r&&n.shellSuspendCounter++,Vn=rs=null,ke=u,I.H=g,I.A=p,ye===null&&(je=null,be=0,Vo()),S}function tw(){for(;ye!==null;)hy(ye)}function nw(n,r){var l=ke;ke|=2;var u=uy(),g=dy();je!==n||be!==r?(wl=null,Sl=xt()+500,lr(n,r)):rr=Jr(n,r);e:do try{if(Me!==0&&ye!==null){r=ye;var p=Yt;t:switch(Me){case 1:Me=0,Yt=null,cr(n,r,p,1);break;case 2:case 9:if(wp(p)){Me=0,Yt=null,fy(r);break}r=function(){Me!==2&&Me!==9||je!==n||(Me=7),Mn(n)},p.then(r,r);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:wp(p)?(Me=0,Yt=null,fy(r)):(Me=0,Yt=null,cr(n,r,p,7));break;case 5:var S=null;switch(ye.tag){case 26:S=ye.memoizedState;case 5:case 27:var E=ye;if(S?Zy(S):E.stateNode.complete){Me=0,Yt=null;var k=E.sibling;if(k!==null)ye=k;else{var z=E.return;z!==null?(ye=z,El(z)):ye=null}break t}}Me=0,Yt=null,cr(n,r,p,5);break;case 6:Me=0,Yt=null,cr(n,r,p,6);break;case 8:Vd(),Ge=6;break e;default:throw Error(s(462))}}iw();break}catch(V){ly(n,V)}while(!0);return Vn=rs=null,I.H=u,I.A=g,ke=l,ye!==null?0:(je=null,be=0,Vo(),Ge)}function iw(){for(;ye!==null&&!hi();)hy(ye)}function hy(n){var r=Hm(n.alternate,n,ei);n.memoizedProps=n.pendingProps,r===null?El(n):ye=r}function fy(n){var r=n,l=r.alternate;switch(r.tag){case 15:case 0:r=Mm(l,r,r.pendingProps,r.type,void 0,be);break;case 11:r=Mm(l,r,r.pendingProps,r.type.render,r.ref,be);break;case 5:ad(r);default:$m(l,r),r=ye=dp(r,ei),r=Hm(l,r,ei)}n.memoizedProps=n.pendingProps,r===null?El(n):ye=r}function cr(n,r,l,u){Vn=rs=null,ad(r),Zs=null,fa=0;var g=r.return;try{if(F1(n,g,r,l,be)){Ge=1,hl(n,nn(l,n.current)),ye=null;return}}catch(p){if(g!==null)throw ye=g,p;Ge=1,hl(n,nn(l,n.current)),ye=null;return}r.flags&32768?(Se||u===1?n=!0:rr||(be&536870912)!==0?n=!1:(Ai=n=!0,(u===2||u===9||u===3||u===6)&&(u=Gt.current,u!==null&&u.tag===13&&(u.flags|=16384))),gy(r,n)):El(r)}function El(n){var r=n;do{if((r.flags&32768)!==0){gy(r,Ai);return}n=r.return;var l=Y1(r.alternate,r,ei);if(l!==null){ye=l;return}if(r=r.sibling,r!==null){ye=r;return}ye=r=n}while(r!==null);Ge===0&&(Ge=5)}function gy(n,r){do{var l=K1(n.alternate,n);if(l!==null){l.flags&=32767,ye=l;return}if(l=n.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(n=n.sibling,n!==null)){ye=n;return}ye=n=l}while(n!==null);Ge=6,ye=null}function py(n,r,l,u,g,p,S,E,k){n.cancelPendingCommit=null;do Al();while(at!==0);if((ke&6)!==0)throw Error(s(327));if(r!==null){if(r===n.current)throw Error(s(177));if(p=r.lanes|r.childLanes,p|=Ou,HS(n,l,p,S,E,k),n===je&&(ye=je=null,be=0),or=r,Ni=n,ti=l,Pd=p,Ud=g,sy=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,ow(fi,function(){return vy(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=I.T,I.T=null,g=Z.p,Z.p=2,S=ke,ke|=4;try{J1(n,r,l)}finally{ke=S,Z.p=g,I.T=u}}at=1,my(),yy(),_y()}}function my(){if(at===1){at=0;var n=Ni,r=or,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=I.T,I.T=null;var u=Z.p;Z.p=2;var g=ke;ke|=4;try{Jm(r,n);var p=ih,S=np(n.containerInfo),E=p.focusedElem,k=p.selectionRange;if(S!==E&&E&&E.ownerDocument&&tp(E.ownerDocument.documentElement,E)){if(k!==null&&ku(E)){var z=k.start,V=k.end;if(V===void 0&&(V=z),"selectionStart"in E)E.selectionStart=z,E.selectionEnd=Math.min(V,E.value.length);else{var K=E.ownerDocument||document,$=K&&K.defaultView||window;if($.getSelection){var U=$.getSelection(),ie=E.textContent.length,ce=Math.min(k.start,ie),Re=k.end===void 0?ce:Math.min(k.end,ie);!U.extend&&ce>Re&&(S=Re,Re=ce,ce=S);var R=ep(E,ce),M=ep(E,Re);if(R&&M&&(U.rangeCount!==1||U.anchorNode!==R.node||U.anchorOffset!==R.offset||U.focusNode!==M.node||U.focusOffset!==M.offset)){var H=K.createRange();H.setStart(R.node,R.offset),U.removeAllRanges(),ce>Re?(U.addRange(H),U.extend(M.node,M.offset)):(H.setEnd(M.node,M.offset),U.addRange(H))}}}}for(K=[],U=E;U=U.parentNode;)U.nodeType===1&&K.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<K.length;E++){var X=K[E];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}$l=!!nh,ih=nh=null}finally{ke=g,Z.p=u,I.T=l}}n.current=r,at=2}}function yy(){if(at===2){at=0;var n=Ni,r=or,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=I.T,I.T=null;var u=Z.p;Z.p=2;var g=ke;ke|=4;try{Fm(n,r.alternate,r)}finally{ke=g,Z.p=u,I.T=l}}at=3}}function _y(){if(at===4||at===3){at=0,nu();var n=Ni,r=or,l=ti,u=sy;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?at=5:(at=0,or=Ni=null,by(n,n.pendingLanes));var g=n.pendingLanes;if(g===0&&(ki=null),cu(l),r=r.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot($n,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=I.T,g=Z.p,Z.p=2,I.T=null;try{for(var p=n.onRecoverableError,S=0;S<u.length;S++){var E=u[S];p(E.value,{componentStack:E.stack})}}finally{I.T=r,Z.p=g}}(ti&3)!==0&&Al(),Mn(n),g=n.pendingLanes,(l&261930)!==0&&(g&42)!==0?n===qd?Ma++:(Ma=0,qd=n):Ma=0,Da(0)}}function by(n,r){(n.pooledCacheLanes&=r)===0&&(r=n.pooledCache,r!=null&&(n.pooledCache=null,da(r)))}function Al(){return my(),yy(),_y(),vy()}function vy(){if(at!==5)return!1;var n=Ni,r=Pd;Pd=0;var l=cu(ti),u=I.T,g=Z.p;try{Z.p=32>l?32:l,I.T=null,l=Ud,Ud=null;var p=Ni,S=ti;if(at=0,or=Ni=null,ti=0,(ke&6)!==0)throw Error(s(331));var E=ke;if(ke|=4,ty(p.current),Zm(p,p.current,S,l),ke=E,Da(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot($n,p)}catch{}return!0}finally{Z.p=g,I.T=u,by(n,r)}}function Sy(n,r,l){r=nn(l,r),r=Sd(n.stateNode,r,2),n=wi(n,r,2),n!==null&&(Wr(n,2),Mn(n))}function De(n,r,l){if(n.tag===3)Sy(n,n,l);else for(;r!==null;){if(r.tag===3){Sy(r,n,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ki===null||!ki.has(u))){n=nn(l,n),l=wm(2),u=wi(r,l,2),u!==null&&(xm(l,u,r,n),Wr(u,2),Mn(u));break}}r=r.return}}function Gd(n,r,l){var u=n.pingCache;if(u===null){u=n.pingCache=new Q1;var g=new Set;u.set(r,g)}else g=u.get(r),g===void 0&&(g=new Set,u.set(r,g));g.has(l)||($d=!0,g.add(l),n=sw.bind(null,n,r,l),r.then(n,n))}function sw(n,r,l){var u=n.pingCache;u!==null&&u.delete(r),n.pingedLanes|=n.suspendedLanes&l,n.warmLanes&=~l,je===n&&(be&l)===l&&(Ge===4||Ge===3&&(be&62914560)===be&&300>xt()-vl?(ke&2)===0&&lr(n,0):Bd|=l,ar===be&&(ar=0)),Mn(n)}function wy(n,r){r===0&&(r=mg()),n=ns(n,r),n!==null&&(Wr(n,r),Mn(n))}function rw(n){var r=n.memoizedState,l=0;r!==null&&(l=r.retryLane),wy(n,l)}function aw(n,r){var l=0;switch(n.tag){case 31:case 13:var u=n.stateNode,g=n.memoizedState;g!==null&&(l=g.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(s(314))}u!==null&&u.delete(r),wy(n,l)}function ow(n,r){return di(n,r)}var Cl=null,ur=null,Xd=!1,kl=!1,Yd=!1,Di=0;function Mn(n){n!==ur&&n.next===null&&(ur===null?Cl=ur=n:ur=ur.next=n),kl=!0,Xd||(Xd=!0,cw())}function Da(n,r){if(!Yd&&kl){Yd=!0;do for(var l=!1,u=Cl;u!==null;){if(n!==0){var g=u.pendingLanes;if(g===0)var p=0;else{var S=u.suspendedLanes,E=u.pingedLanes;p=(1<<31-Tt(42|n)+1)-1,p&=g&~(S&~E),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(l=!0,Ay(u,p))}else p=be,p=Lo(u,u===je?p:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(p&3)===0||Jr(u,p)||(l=!0,Ay(u,p));u=u.next}while(l);Yd=!1}}function lw(){xy()}function xy(){kl=Xd=!1;var n=0;Di!==0&&bw()&&(n=Di);for(var r=xt(),l=null,u=Cl;u!==null;){var g=u.next,p=Ty(u,r);p===0?(u.next=null,l===null?Cl=g:l.next=g,g===null&&(ur=l)):(l=u,(n!==0||(p&3)!==0)&&(kl=!0)),u=g}at!==0&&at!==5||Da(n),Di!==0&&(Di=0)}function Ty(n,r){for(var l=n.suspendedLanes,u=n.pingedLanes,g=n.expirationTimes,p=n.pendingLanes&-62914561;0<p;){var S=31-Tt(p),E=1<<S,k=g[S];k===-1?((E&l)===0||(E&u)!==0)&&(g[S]=jS(E,r)):k<=r&&(n.expiredLanes|=E),p&=~E}if(r=je,l=be,l=Lo(n,n===r?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,l===0||n===r&&(Me===2||Me===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&Yr(u),n.callbackNode=null,n.callbackPriority=0;if((l&3)===0||Jr(n,l)){if(r=l&-l,r===n.callbackPriority)return r;switch(u!==null&&Yr(u),cu(l)){case 2:case 8:l=Kr;break;case 32:l=fi;break;case 268435456:l=No;break;default:l=fi}return u=Ey.bind(null,n),l=di(l,u),n.callbackPriority=r,n.callbackNode=l,r}return u!==null&&u!==null&&Yr(u),n.callbackPriority=2,n.callbackNode=null,2}function Ey(n,r){if(at!==0&&at!==5)return n.callbackNode=null,n.callbackPriority=0,null;var l=n.callbackNode;if(Al()&&n.callbackNode!==l)return null;var u=be;return u=Lo(n,n===je?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(ay(n,u,r),Ty(n,xt()),n.callbackNode!=null&&n.callbackNode===l?Ey.bind(null,n):null)}function Ay(n,r){if(Al())return null;ay(n,r,!0)}function cw(){Sw(function(){(ke&6)!==0?di(ko,lw):xy()})}function Kd(){if(Di===0){var n=Ks;n===0&&(n=An,An<<=1,(An&261888)===0&&(An=256)),Di=n}return Di}function Cy(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Ho(""+n)}function ky(n,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,n.id&&l.setAttribute("form",n.id),r.parentNode.insertBefore(l,r),n=new FormData(n),l.parentNode.removeChild(l),n}function uw(n,r,l,u,g){if(r==="submit"&&l&&l.stateNode===g){var p=Cy((g[Mt]||null).action),S=u.submitter;S&&(r=(r=S[Mt]||null)?Cy(r.formAction):S.getAttribute("formAction"),r!==null&&(p=r,S=null));var E=new Io("action","action",null,u,g);n.push({event:E,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Di!==0){var k=S?ky(g,S):new FormData(g);pd(l,{pending:!0,data:k,method:g.method,action:p},null,k)}}else typeof p=="function"&&(E.preventDefault(),k=S?ky(g,S):new FormData(g),pd(l,{pending:!0,data:k,method:g.method,action:p},p,k))},currentTarget:g}]})}}for(var Jd=0;Jd<Lu.length;Jd++){var Wd=Lu[Jd],dw=Wd.toLowerCase(),hw=Wd[0].toUpperCase()+Wd.slice(1);yn(dw,"on"+hw)}yn(rp,"onAnimationEnd"),yn(ap,"onAnimationIteration"),yn(op,"onAnimationStart"),yn("dblclick","onDoubleClick"),yn("focusin","onFocus"),yn("focusout","onBlur"),yn(k1,"onTransitionRun"),yn(N1,"onTransitionStart"),yn(M1,"onTransitionCancel"),yn(lp,"onTransitionEnd"),js("onMouseEnter",["mouseout","mouseover"]),js("onMouseLeave",["mouseout","mouseover"]),js("onPointerEnter",["pointerout","pointerover"]),js("onPointerLeave",["pointerout","pointerover"]),Zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var La="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(" "),fw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(La));function Ny(n,r){r=(r&4)!==0;for(var l=0;l<n.length;l++){var u=n[l],g=u.event;u=u.listeners;e:{var p=void 0;if(r)for(var S=u.length-1;0<=S;S--){var E=u[S],k=E.instance,z=E.currentTarget;if(E=E.listener,k!==p&&g.isPropagationStopped())break e;p=E,g.currentTarget=z;try{p(g)}catch(V){qo(V)}g.currentTarget=null,p=k}else for(S=0;S<u.length;S++){if(E=u[S],k=E.instance,z=E.currentTarget,E=E.listener,k!==p&&g.isPropagationStopped())break e;p=E,g.currentTarget=z;try{p(g)}catch(V){qo(V)}g.currentTarget=null,p=k}}}}function _e(n,r){var l=r[uu];l===void 0&&(l=r[uu]=new Set);var u=n+"__bubble";l.has(u)||(My(r,n,2,!1),l.add(u))}function Zd(n,r,l){var u=0;r&&(u|=4),My(l,n,u,r)}var Nl="_reactListening"+Math.random().toString(36).slice(2);function Qd(n){if(!n[Nl]){n[Nl]=!0,xg.forEach(function(l){l!=="selectionchange"&&(fw.has(l)||Zd(l,!1,n),Zd(l,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Nl]||(r[Nl]=!0,Zd("selectionchange",!1,r))}}function My(n,r,l,u){switch(r_(r)){case 2:var g=Pw;break;case 8:g=Uw;break;default:g=gh}l=g.bind(null,r,l,n),g=void 0,!bu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(g=!0),u?g!==void 0?n.addEventListener(r,l,{capture:!0,passive:g}):n.addEventListener(r,l,!0):g!==void 0?n.addEventListener(r,l,{passive:g}):n.addEventListener(r,l,!1)}function eh(n,r,l,u,g){var p=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var S=u.tag;if(S===3||S===4){var E=u.stateNode.containerInfo;if(E===g)break;if(S===4)for(S=u.return;S!==null;){var k=S.tag;if((k===3||k===4)&&S.stateNode.containerInfo===g)return;S=S.return}for(;E!==null;){if(S=Ls(E),S===null)return;if(k=S.tag,k===5||k===6||k===26||k===27){u=p=S;continue e}E=E.parentNode}}u=u.return}jg(function(){var z=p,V=yu(l),K=[];e:{var $=cp.get(n);if($!==void 0){var U=Io,ie=n;switch(n){case"keypress":if($o(l)===0)break e;case"keydown":case"keyup":U=a1;break;case"focusin":ie="focus",U=xu;break;case"focusout":ie="blur",U=xu;break;case"beforeblur":case"afterblur":U=xu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U=$g;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=YS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=c1;break;case rp:case ap:case op:U=WS;break;case lp:U=d1;break;case"scroll":case"scrollend":U=GS;break;case"wheel":U=f1;break;case"copy":case"cut":case"paste":U=QS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=Ig;break;case"toggle":case"beforetoggle":U=p1}var ce=(r&4)!==0,Re=!ce&&(n==="scroll"||n==="scrollend"),R=ce?$!==null?$+"Capture":null:$;ce=[];for(var M=z,H;M!==null;){var X=M;if(H=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||H===null||R===null||(X=ea(M,R),X!=null&&ce.push(Oa(M,X,H))),Re)break;M=M.return}0<ce.length&&($=new U($,ie,null,l,V),K.push({event:$,listeners:ce}))}}if((r&7)===0){e:{if($=n==="mouseover"||n==="pointerover",U=n==="mouseout"||n==="pointerout",$&&l!==mu&&(ie=l.relatedTarget||l.fromElement)&&(Ls(ie)||ie[Ds]))break e;if((U||$)&&($=V.window===V?V:($=V.ownerDocument)?$.defaultView||$.parentWindow:window,U?(ie=l.relatedTarget||l.toElement,U=z,ie=ie?Ls(ie):null,ie!==null&&(Re=o(ie),ce=ie.tag,ie!==Re||ce!==5&&ce!==27&&ce!==6)&&(ie=null)):(U=null,ie=z),U!==ie)){if(ce=$g,X="onMouseLeave",R="onMouseEnter",M="mouse",(n==="pointerout"||n==="pointerover")&&(ce=Ig,X="onPointerLeave",R="onPointerEnter",M="pointer"),Re=U==null?$:Qr(U),H=ie==null?$:Qr(ie),$=new ce(X,M+"leave",U,l,V),$.target=Re,$.relatedTarget=H,X=null,Ls(V)===z&&(ce=new ce(R,M+"enter",ie,l,V),ce.target=H,ce.relatedTarget=Re,X=ce),Re=X,U&&ie)t:{for(ce=gw,R=U,M=ie,H=0,X=R;X;X=ce(X))H++;X=0;for(var le=M;le;le=ce(le))X++;for(;0<H-X;)R=ce(R),H--;for(;0<X-H;)M=ce(M),X--;for(;H--;){if(R===M||M!==null&&R===M.alternate){ce=R;break t}R=ce(R),M=ce(M)}ce=null}else ce=null;U!==null&&Dy(K,$,U,ce,!1),ie!==null&&Re!==null&&Dy(K,Re,ie,ce,!0)}}e:{if($=z?Qr(z):window,U=$.nodeName&&$.nodeName.toLowerCase(),U==="select"||U==="input"&&$.type==="file")var Ae=Yg;else if(Gg($))if(Kg)Ae=E1;else{Ae=x1;var re=w1}else U=$.nodeName,!U||U.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?z&&pu(z.elementType)&&(Ae=Yg):Ae=T1;if(Ae&&(Ae=Ae(n,z))){Xg(K,Ae,l,V);break e}re&&re(n,$,z),n==="focusout"&&z&&$.type==="number"&&z.memoizedProps.value!=null&&gu($,"number",$.value)}switch(re=z?Qr(z):window,n){case"focusin":(Gg(re)||re.contentEditable==="true")&&(Ps=re,Nu=z,la=null);break;case"focusout":la=Nu=Ps=null;break;case"mousedown":Mu=!0;break;case"contextmenu":case"mouseup":case"dragend":Mu=!1,ip(K,l,V);break;case"selectionchange":if(C1)break;case"keydown":case"keyup":ip(K,l,V)}var me;if(Eu)e:{switch(n){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else Is?Vg(n,l)&&(ve="onCompositionEnd"):n==="keydown"&&l.keyCode===229&&(ve="onCompositionStart");ve&&(Pg&&l.locale!=="ko"&&(Is||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&Is&&(me=Hg()):(pi=V,vu="value"in pi?pi.value:pi.textContent,Is=!0)),re=Ml(z,ve),0<re.length&&(ve=new Bg(ve,n,null,l,V),K.push({event:ve,listeners:re}),me?ve.data=me:(me=Fg(l),me!==null&&(ve.data=me)))),(me=y1?_1(n,l):b1(n,l))&&(ve=Ml(z,"onBeforeInput"),0<ve.length&&(re=new Bg("onBeforeInput","beforeinput",null,l,V),K.push({event:re,listeners:ve}),re.data=me)),uw(K,n,z,l,V)}Ny(K,r)})}function Oa(n,r,l){return{instance:n,listener:r,currentTarget:l}}function Ml(n,r){for(var l=r+"Capture",u=[];n!==null;){var g=n,p=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||p===null||(g=ea(n,l),g!=null&&u.unshift(Oa(n,g,p)),g=ea(n,r),g!=null&&u.push(Oa(n,g,p))),n.tag===3)return u;n=n.return}return[]}function gw(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Dy(n,r,l,u,g){for(var p=r._reactName,S=[];l!==null&&l!==u;){var E=l,k=E.alternate,z=E.stateNode;if(E=E.tag,k!==null&&k===u)break;E!==5&&E!==26&&E!==27||z===null||(k=z,g?(z=ea(l,p),z!=null&&S.unshift(Oa(l,z,k))):g||(z=ea(l,p),z!=null&&S.push(Oa(l,z,k)))),l=l.return}S.length!==0&&n.push({event:r,listeners:S})}var pw=/\r\n?/g,mw=/\u0000|\uFFFD/g;function Ly(n){return(typeof n=="string"?n:""+n).replace(pw,`
|
|
50
|
+
`).replace(mw,"")}function Oy(n,r){return r=Ly(r),Ly(n)===r}function Oe(n,r,l,u,g,p){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||zs(n,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&zs(n,""+u);break;case"className":Ro(n,"class",u);break;case"tabIndex":Ro(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Ro(n,l,u);break;case"style":Og(n,u,p);break;case"data":if(r!=="object"){Ro(n,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){n.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=Ho(""+u),n.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(l==="formAction"?(r!=="input"&&Oe(n,r,"name",g.name,g,null),Oe(n,r,"formEncType",g.formEncType,g,null),Oe(n,r,"formMethod",g.formMethod,g,null),Oe(n,r,"formTarget",g.formTarget,g,null)):(Oe(n,r,"encType",g.encType,g,null),Oe(n,r,"method",g.method,g,null),Oe(n,r,"target",g.target,g,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(l);break}u=Ho(""+u),n.setAttribute(l,u);break;case"onClick":u!=null&&(n.onclick=In);break;case"onScroll":u!=null&&_e("scroll",n);break;case"onScrollEnd":u!=null&&_e("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(s(61));if(l=u.__html,l!=null){if(g.children!=null)throw Error(s(60));n.innerHTML=l}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}l=Ho(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""+u):n.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,""):n.removeAttribute(l);break;case"capture":case"download":u===!0?n.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(l,u):n.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(l,u):n.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(l):n.setAttribute(l,u);break;case"popover":_e("beforetoggle",n),_e("toggle",n),Oo(n,"popover",u);break;case"xlinkActuate":Bn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Bn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Bn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Bn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Bn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Bn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Bn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Bn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Bn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Oo(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=VS.get(l)||l,Oo(n,l,u))}}function th(n,r,l,u,g,p){switch(l){case"style":Og(n,u,p);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(s(61));if(l=u.__html,l!=null){if(g.children!=null)throw Error(s(60));n.innerHTML=l}}break;case"children":typeof u=="string"?zs(n,u):(typeof u=="number"||typeof u=="bigint")&&zs(n,""+u);break;case"onScroll":u!=null&&_e("scroll",n);break;case"onScrollEnd":u!=null&&_e("scrollend",n);break;case"onClick":u!=null&&(n.onclick=In);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Tg.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(g=l.endsWith("Capture"),r=l.slice(2,g?l.length-7:void 0),p=n[Mt]||null,p=p!=null?p[l]:null,typeof p=="function"&&n.removeEventListener(r,p,g),typeof u=="function")){typeof p!="function"&&p!==null&&(l in n?n[l]=null:n.hasAttribute(l)&&n.removeAttribute(l)),n.addEventListener(r,u,g);break e}l in n?n[l]=u:u===!0?n.setAttribute(l,""):Oo(n,l,u)}}}function yt(n,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",n),_e("load",n);var u=!1,g=!1,p;for(p in l)if(l.hasOwnProperty(p)){var S=l[p];if(S!=null)switch(p){case"src":u=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Oe(n,r,p,S,l,null)}}g&&Oe(n,r,"srcSet",l.srcSet,l,null),u&&Oe(n,r,"src",l.src,l,null);return;case"input":_e("invalid",n);var E=p=S=g=null,k=null,z=null;for(u in l)if(l.hasOwnProperty(u)){var V=l[u];if(V!=null)switch(u){case"name":g=V;break;case"type":S=V;break;case"checked":k=V;break;case"defaultChecked":z=V;break;case"value":p=V;break;case"defaultValue":E=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(s(137,r));break;default:Oe(n,r,u,V,l,null)}}Ng(n,p,E,k,z,S,g,!1);return;case"select":_e("invalid",n),u=S=p=null;for(g in l)if(l.hasOwnProperty(g)&&(E=l[g],E!=null))switch(g){case"value":p=E;break;case"defaultValue":S=E;break;case"multiple":u=E;default:Oe(n,r,g,E,l,null)}r=p,l=S,n.multiple=!!u,r!=null?Hs(n,!!u,r,!1):l!=null&&Hs(n,!!u,l,!0);return;case"textarea":_e("invalid",n),p=g=u=null;for(S in l)if(l.hasOwnProperty(S)&&(E=l[S],E!=null))switch(S){case"value":u=E;break;case"defaultValue":g=E;break;case"children":p=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(s(91));break;default:Oe(n,r,S,E,l,null)}Dg(n,u,g,p);return;case"option":for(k in l)if(l.hasOwnProperty(k)&&(u=l[k],u!=null))switch(k){case"selected":n.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Oe(n,r,k,u,l,null)}return;case"dialog":_e("beforetoggle",n),_e("toggle",n),_e("cancel",n),_e("close",n);break;case"iframe":case"object":_e("load",n);break;case"video":case"audio":for(u=0;u<La.length;u++)_e(La[u],n);break;case"image":_e("error",n),_e("load",n);break;case"details":_e("toggle",n);break;case"embed":case"source":case"link":_e("error",n),_e("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(z in l)if(l.hasOwnProperty(z)&&(u=l[z],u!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:Oe(n,r,z,u,l,null)}return;default:if(pu(r)){for(V in l)l.hasOwnProperty(V)&&(u=l[V],u!==void 0&&th(n,r,V,u,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(u=l[E],u!=null&&Oe(n,r,E,u,l,null))}function yw(n,r,l,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,p=null,S=null,E=null,k=null,z=null,V=null;for(U in l){var K=l[U];if(l.hasOwnProperty(U)&&K!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":k=K;default:u.hasOwnProperty(U)||Oe(n,r,U,null,u,K)}}for(var $ in u){var U=u[$];if(K=l[$],u.hasOwnProperty($)&&(U!=null||K!=null))switch($){case"type":p=U;break;case"name":g=U;break;case"checked":z=U;break;case"defaultChecked":V=U;break;case"value":S=U;break;case"defaultValue":E=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,r));break;default:U!==K&&Oe(n,r,$,U,u,K)}}fu(n,S,E,k,z,V,p,g);return;case"select":U=S=E=$=null;for(p in l)if(k=l[p],l.hasOwnProperty(p)&&k!=null)switch(p){case"value":break;case"multiple":U=k;default:u.hasOwnProperty(p)||Oe(n,r,p,null,u,k)}for(g in u)if(p=u[g],k=l[g],u.hasOwnProperty(g)&&(p!=null||k!=null))switch(g){case"value":$=p;break;case"defaultValue":E=p;break;case"multiple":S=p;default:p!==k&&Oe(n,r,g,p,u,k)}r=E,l=S,u=U,$!=null?Hs(n,!!l,$,!1):!!u!=!!l&&(r!=null?Hs(n,!!l,r,!0):Hs(n,!!l,l?[]:"",!1));return;case"textarea":U=$=null;for(E in l)if(g=l[E],l.hasOwnProperty(E)&&g!=null&&!u.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Oe(n,r,E,null,u,g)}for(S in u)if(g=u[S],p=l[S],u.hasOwnProperty(S)&&(g!=null||p!=null))switch(S){case"value":$=g;break;case"defaultValue":U=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(s(91));break;default:g!==p&&Oe(n,r,S,g,u,p)}Mg(n,$,U);return;case"option":for(var ie in l)if($=l[ie],l.hasOwnProperty(ie)&&$!=null&&!u.hasOwnProperty(ie))switch(ie){case"selected":n.selected=!1;break;default:Oe(n,r,ie,null,u,$)}for(k in u)if($=u[k],U=l[k],u.hasOwnProperty(k)&&$!==U&&($!=null||U!=null))switch(k){case"selected":n.selected=$&&typeof $!="function"&&typeof $!="symbol";break;default:Oe(n,r,k,$,u,U)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ce in l)$=l[ce],l.hasOwnProperty(ce)&&$!=null&&!u.hasOwnProperty(ce)&&Oe(n,r,ce,null,u,$);for(z in u)if($=u[z],U=l[z],u.hasOwnProperty(z)&&$!==U&&($!=null||U!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(s(137,r));break;default:Oe(n,r,z,$,u,U)}return;default:if(pu(r)){for(var Re in l)$=l[Re],l.hasOwnProperty(Re)&&$!==void 0&&!u.hasOwnProperty(Re)&&th(n,r,Re,void 0,u,$);for(V in u)$=u[V],U=l[V],!u.hasOwnProperty(V)||$===U||$===void 0&&U===void 0||th(n,r,V,$,u,U);return}}for(var R in l)$=l[R],l.hasOwnProperty(R)&&$!=null&&!u.hasOwnProperty(R)&&Oe(n,r,R,null,u,$);for(K in u)$=u[K],U=l[K],!u.hasOwnProperty(K)||$===U||$==null&&U==null||Oe(n,r,K,$,u,U)}function Ry(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _w(){if(typeof performance.getEntriesByType=="function"){for(var n=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var g=l[u],p=g.transferSize,S=g.initiatorType,E=g.duration;if(p&&E&&Ry(S)){for(S=0,E=g.responseEnd,u+=1;u<l.length;u++){var k=l[u],z=k.startTime;if(z>E)break;var V=k.transferSize,K=k.initiatorType;V&&Ry(K)&&(k=k.responseEnd,S+=V*(k<E?1:(E-z)/(k-z)))}if(--u,r+=8*(p+S)/(g.duration/1e3),n++,10<n)break}}if(0<n)return r/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var nh=null,ih=null;function Dl(n){return n.nodeType===9?n:n.ownerDocument}function jy(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Hy(n,r){if(n===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&r==="foreignObject"?0:n}function sh(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var rh=null;function bw(){var n=window.event;return n&&n.type==="popstate"?n===rh?!1:(rh=n,!0):(rh=null,!1)}var zy=typeof setTimeout=="function"?setTimeout:void 0,vw=typeof clearTimeout=="function"?clearTimeout:void 0,$y=typeof Promise=="function"?Promise:void 0,Sw=typeof queueMicrotask=="function"?queueMicrotask:typeof $y<"u"?function(n){return $y.resolve(null).then(n).catch(ww)}:zy;function ww(n){setTimeout(function(){throw n})}function Li(n){return n==="head"}function By(n,r){var l=r,u=0;do{var g=l.nextSibling;if(n.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"||l==="/&"){if(u===0){n.removeChild(g),gr(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")Ra(n.ownerDocument.documentElement);else if(l==="head"){l=n.ownerDocument.head,Ra(l);for(var p=l.firstChild;p;){var S=p.nextSibling,E=p.nodeName;p[Zr]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&p.rel.toLowerCase()==="stylesheet"||l.removeChild(p),p=S}}else l==="body"&&Ra(n.ownerDocument.body);l=g}while(l);gr(r)}function Iy(n,r){var l=n;n=0;do{var u=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(n===0)break;n--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||n++;l=u}while(l)}function ah(n){var r=n.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":ah(l),du(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}n.removeChild(l)}}function xw(n,r,l,u){for(;n.nodeType===1;){var g=l;if(n.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[Zr])switch(r){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(p=n.getAttribute("rel"),p==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(p!==g.rel||n.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||n.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||n.getAttribute("title")!==(g.title==null?null:g.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(p=n.getAttribute("src"),(p!==(g.src==null?null:g.src)||n.getAttribute("type")!==(g.type==null?null:g.type)||n.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&p&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(r==="input"&&n.type==="hidden"){var p=g.name==null?null:""+g.name;if(g.type==="hidden"&&n.getAttribute("name")===p)return n}else return n;if(n=ln(n.nextSibling),n===null)break}return null}function Tw(n,r,l){if(r==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!l||(n=ln(n.nextSibling),n===null))return null;return n}function Py(n,r){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=ln(n.nextSibling),n===null))return null;return n}function oh(n){return n.data==="$?"||n.data==="$~"}function lh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function Ew(n,r){var l=n.ownerDocument;if(n.data==="$~")n._reactRetry=r;else if(n.data!=="$?"||l.readyState!=="loading")r();else{var u=function(){r(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function ln(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return n}var ch=null;function Uy(n){n=n.nextSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="/$"||l==="/&"){if(r===0)return ln(n.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}n=n.nextSibling}return null}function qy(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var l=n.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return n;r--}else l!=="/$"&&l!=="/&"||r++}n=n.previousSibling}return null}function Vy(n,r,l){switch(r=Dl(l),n){case"html":if(n=r.documentElement,!n)throw Error(s(452));return n;case"head":if(n=r.head,!n)throw Error(s(453));return n;case"body":if(n=r.body,!n)throw Error(s(454));return n;default:throw Error(s(451))}}function Ra(n){for(var r=n.attributes;r.length;)n.removeAttributeNode(r[0]);du(n)}var cn=new Map,Fy=new Set;function Ll(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ni=Z.d;Z.d={f:Aw,r:Cw,D:kw,C:Nw,L:Mw,m:Dw,X:Ow,S:Lw,M:Rw};function Aw(){var n=ni.f(),r=xl();return n||r}function Cw(n){var r=Os(n);r!==null&&r.tag===5&&r.type==="form"?lm(r):ni.r(n)}var dr=typeof document>"u"?null:document;function Gy(n,r,l){var u=dr;if(u&&typeof r=="string"&&r){var g=en(r);g='link[rel="'+n+'"][href="'+g+'"]',typeof l=="string"&&(g+='[crossorigin="'+l+'"]'),Fy.has(g)||(Fy.add(g),n={rel:n,crossOrigin:l,href:r},u.querySelector(g)===null&&(r=u.createElement("link"),yt(r,"link",n),ut(r),u.head.appendChild(r)))}}function kw(n){ni.D(n),Gy("dns-prefetch",n,null)}function Nw(n,r){ni.C(n,r),Gy("preconnect",n,r)}function Mw(n,r,l){ni.L(n,r,l);var u=dr;if(u&&n&&r){var g='link[rel="preload"][as="'+en(r)+'"]';r==="image"&&l&&l.imageSrcSet?(g+='[imagesrcset="'+en(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(g+='[imagesizes="'+en(l.imageSizes)+'"]')):g+='[href="'+en(n)+'"]';var p=g;switch(r){case"style":p=hr(n);break;case"script":p=fr(n)}cn.has(p)||(n=m({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:n,as:r},l),cn.set(p,n),u.querySelector(g)!==null||r==="style"&&u.querySelector(ja(p))||r==="script"&&u.querySelector(Ha(p))||(r=u.createElement("link"),yt(r,"link",n),ut(r),u.head.appendChild(r)))}}function Dw(n,r){ni.m(n,r);var l=dr;if(l&&n){var u=r&&typeof r.as=="string"?r.as:"script",g='link[rel="modulepreload"][as="'+en(u)+'"][href="'+en(n)+'"]',p=g;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=fr(n)}if(!cn.has(p)&&(n=m({rel:"modulepreload",href:n},r),cn.set(p,n),l.querySelector(g)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ha(p)))return}u=l.createElement("link"),yt(u,"link",n),ut(u),l.head.appendChild(u)}}}function Lw(n,r,l){ni.S(n,r,l);var u=dr;if(u&&n){var g=Rs(u).hoistableStyles,p=hr(n);r=r||"default";var S=g.get(p);if(!S){var E={loading:0,preload:null};if(S=u.querySelector(ja(p)))E.loading=5;else{n=m({rel:"stylesheet",href:n,"data-precedence":r},l),(l=cn.get(p))&&uh(n,l);var k=S=u.createElement("link");ut(k),yt(k,"link",n),k._p=new Promise(function(z,V){k.onload=z,k.onerror=V}),k.addEventListener("load",function(){E.loading|=1}),k.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Ol(S,r,u)}S={type:"stylesheet",instance:S,count:1,state:E},g.set(p,S)}}}function Ow(n,r){ni.X(n,r);var l=dr;if(l&&n){var u=Rs(l).hoistableScripts,g=fr(n),p=u.get(g);p||(p=l.querySelector(Ha(g)),p||(n=m({src:n,async:!0},r),(r=cn.get(g))&&dh(n,r),p=l.createElement("script"),ut(p),yt(p,"link",n),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},u.set(g,p))}}function Rw(n,r){ni.M(n,r);var l=dr;if(l&&n){var u=Rs(l).hoistableScripts,g=fr(n),p=u.get(g);p||(p=l.querySelector(Ha(g)),p||(n=m({src:n,async:!0,type:"module"},r),(r=cn.get(g))&&dh(n,r),p=l.createElement("script"),ut(p),yt(p,"link",n),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},u.set(g,p))}}function Xy(n,r,l,u){var g=(g=oe.current)?Ll(g):null;if(!g)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=hr(l.href),l=Rs(g).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){n=hr(l.href);var p=Rs(g).hoistableStyles,S=p.get(n);if(S||(g=g.ownerDocument||g,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(n,S),(p=g.querySelector(ja(n)))&&!p._p&&(S.instance=p,S.state.loading=5),cn.has(n)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},cn.set(n,l),p||jw(g,n,l,S.state))),r&&u===null)throw Error(s(528,""));return S}if(r&&u!==null)throw Error(s(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=fr(l),l=Rs(g).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function hr(n){return'href="'+en(n)+'"'}function ja(n){return'link[rel="stylesheet"]['+n+"]"}function Yy(n){return m({},n,{"data-precedence":n.precedence,precedence:null})}function jw(n,r,l,u){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=n.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),yt(r,"link",l),ut(r),n.head.appendChild(r))}function fr(n){return'[src="'+en(n)+'"]'}function Ha(n){return"script[async]"+n}function Ky(n,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=n.querySelector('style[data-href~="'+en(l.href)+'"]');if(u)return r.instance=u,ut(u),u;var g=m({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),ut(u),yt(u,"style",g),Ol(u,l.precedence,n),r.instance=u;case"stylesheet":g=hr(l.href);var p=n.querySelector(ja(g));if(p)return r.state.loading|=4,r.instance=p,ut(p),p;u=Yy(l),(g=cn.get(g))&&uh(u,g),p=(n.ownerDocument||n).createElement("link"),ut(p);var S=p;return S._p=new Promise(function(E,k){S.onload=E,S.onerror=k}),yt(p,"link",u),r.state.loading|=4,Ol(p,l.precedence,n),r.instance=p;case"script":return p=fr(l.src),(g=n.querySelector(Ha(p)))?(r.instance=g,ut(g),g):(u=l,(g=cn.get(p))&&(u=m({},l),dh(u,g)),n=n.ownerDocument||n,g=n.createElement("script"),ut(g),yt(g,"link",u),n.head.appendChild(g),r.instance=g);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Ol(u,l.precedence,n));return r.instance}function Ol(n,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=u.length?u[u.length-1]:null,p=g,S=0;S<u.length;S++){var E=u[S];if(E.dataset.precedence===r)p=E;else if(p!==g)break}p?p.parentNode.insertBefore(n,p.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(n,r.firstChild))}function uh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.title==null&&(n.title=r.title)}function dh(n,r){n.crossOrigin==null&&(n.crossOrigin=r.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=r.referrerPolicy),n.integrity==null&&(n.integrity=r.integrity)}var Rl=null;function Jy(n,r,l){if(Rl===null){var u=new Map,g=Rl=new Map;g.set(l,u)}else g=Rl,u=g.get(l),u||(u=new Map,g.set(l,u));if(u.has(n))return u;for(u.set(n,null),l=l.getElementsByTagName(n),g=0;g<l.length;g++){var p=l[g];if(!(p[Zr]||p[ft]||n==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var S=p.getAttribute(r)||"";S=n+S;var E=u.get(S);E?E.push(p):u.set(S,[p])}}return u}function Wy(n,r,l){n=n.ownerDocument||n,n.head.insertBefore(l,r==="title"?n.querySelector("head > title"):null)}function Hw(n,r,l){if(l===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return n=r.disabled,typeof r.precedence=="string"&&n==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Zy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function zw(n,r,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var g=hr(u.href),p=r.querySelector(ja(g));if(p){r=p._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=jl.bind(n),r.then(n,n)),l.state.loading|=4,l.instance=p,ut(p);return}p=r.ownerDocument||r,u=Yy(u),(g=cn.get(g))&&uh(u,g),p=p.createElement("link"),ut(p);var S=p;S._p=new Promise(function(E,k){S.onload=E,S.onerror=k}),yt(p,"link",u),l.instance=p}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(n.count++,l=jl.bind(n),r.addEventListener("load",l),r.addEventListener("error",l))}}var hh=0;function $w(n,r){return n.stylesheets&&n.count===0&&zl(n,n.stylesheets),0<n.count||0<n.imgCount?function(l){var u=setTimeout(function(){if(n.stylesheets&&zl(n,n.stylesheets),n.unsuspend){var p=n.unsuspend;n.unsuspend=null,p()}},6e4+r);0<n.imgBytes&&hh===0&&(hh=62500*_w());var g=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&zl(n,n.stylesheets),n.unsuspend)){var p=n.unsuspend;n.unsuspend=null,p()}},(n.imgBytes>hh?50:800)+r);return n.unsuspend=l,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(g)}}:null}function jl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zl(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Hl=null;function zl(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Hl=new Map,r.forEach(Bw,n),Hl=null,jl.call(n))}function Bw(n,r){if(!(r.state.loading&4)){var l=Hl.get(n);if(l)var u=l.get(null);else{l=new Map,Hl.set(n,l);for(var g=n.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<g.length;p++){var S=g[p];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(l.set(S.dataset.precedence,S),u=S)}u&&l.set(null,u)}g=r.instance,S=g.getAttribute("data-precedence"),p=l.get(S)||u,p===u&&l.set(null,g),l.set(S,g),this.count++,u=jl.bind(this),g.addEventListener("load",u),g.addEventListener("error",u),p?p.parentNode.insertBefore(g,p.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(g,n.firstChild)),r.state.loading|=4}}var za={$$typeof:L,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function Iw(n,r,l,u,g,p,S,E,k){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ou(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ou(0),this.hiddenUpdates=ou(null),this.identifierPrefix=u,this.onUncaughtError=g,this.onCaughtError=p,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function Qy(n,r,l,u,g,p,S,E,k,z,V,K){return n=new Iw(n,r,l,S,k,z,V,K,E),r=1,p===!0&&(r|=24),p=Ft(3,null,null,r),n.current=p,p.stateNode=n,r=Fu(),r.refCount++,n.pooledCache=r,r.refCount++,p.memoizedState={element:u,isDehydrated:l,cache:r},Ku(p),n}function e_(n){return n?(n=Vs,n):Vs}function t_(n,r,l,u,g,p){g=e_(g),u.context===null?u.context=g:u.pendingContext=g,u=Si(r),u.payload={element:l},p=p===void 0?null:p,p!==null&&(u.callback=p),l=wi(n,u,r),l!==null&&(Ht(l,n,r),pa(l,n,r))}function n_(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var l=n.retryLane;n.retryLane=l!==0&&l<r?l:r}}function fh(n,r){n_(n,r),(n=n.alternate)&&n_(n,r)}function i_(n){if(n.tag===13||n.tag===31){var r=ns(n,67108864);r!==null&&Ht(r,n,67108864),fh(n,67108864)}}function s_(n){if(n.tag===13||n.tag===31){var r=Jt();r=lu(r);var l=ns(n,r);l!==null&&Ht(l,n,r),fh(n,r)}}var $l=!0;function Pw(n,r,l,u){var g=I.T;I.T=null;var p=Z.p;try{Z.p=2,gh(n,r,l,u)}finally{Z.p=p,I.T=g}}function Uw(n,r,l,u){var g=I.T;I.T=null;var p=Z.p;try{Z.p=8,gh(n,r,l,u)}finally{Z.p=p,I.T=g}}function gh(n,r,l,u){if($l){var g=ph(u);if(g===null)eh(n,r,u,Bl,l),a_(n,u);else if(Vw(g,n,r,l,u))u.stopPropagation();else if(a_(n,u),r&4&&-1<qw.indexOf(n)){for(;g!==null;){var p=Os(g);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var S=Wi(p.pendingLanes);if(S!==0){var E=p;for(E.pendingLanes|=2,E.entangledLanes|=2;S;){var k=1<<31-Tt(S);E.entanglements[1]|=k,S&=~k}Mn(p),(ke&6)===0&&(Sl=xt()+500,Da(0))}}break;case 31:case 13:E=ns(p,2),E!==null&&Ht(E,p,2),xl(),fh(p,2)}if(p=ph(u),p===null&&eh(n,r,u,Bl,l),p===g)break;g=p}g!==null&&u.stopPropagation()}else eh(n,r,u,null,l)}}function ph(n){return n=yu(n),mh(n)}var Bl=null;function mh(n){if(Bl=null,n=Ls(n),n!==null){var r=o(n);if(r===null)n=null;else{var l=r.tag;if(l===13){if(n=c(r),n!==null)return n;n=null}else if(l===31){if(n=d(r),n!==null)return n;n=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null)}}return Bl=n,null}function r_(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(iu()){case ko:return 2;case Kr:return 8;case fi:case su:return 32;case No:return 268435456;default:return 32}default:return 32}}var yh=!1,Oi=null,Ri=null,ji=null,$a=new Map,Ba=new Map,Hi=[],qw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function a_(n,r){switch(n){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Ri=null;break;case"mouseover":case"mouseout":ji=null;break;case"pointerover":case"pointerout":$a.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ba.delete(r.pointerId)}}function Ia(n,r,l,u,g,p){return n===null||n.nativeEvent!==p?(n={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:p,targetContainers:[g]},r!==null&&(r=Os(r),r!==null&&i_(r)),n):(n.eventSystemFlags|=u,r=n.targetContainers,g!==null&&r.indexOf(g)===-1&&r.push(g),n)}function Vw(n,r,l,u,g){switch(r){case"focusin":return Oi=Ia(Oi,n,r,l,u,g),!0;case"dragenter":return Ri=Ia(Ri,n,r,l,u,g),!0;case"mouseover":return ji=Ia(ji,n,r,l,u,g),!0;case"pointerover":var p=g.pointerId;return $a.set(p,Ia($a.get(p)||null,n,r,l,u,g)),!0;case"gotpointercapture":return p=g.pointerId,Ba.set(p,Ia(Ba.get(p)||null,n,r,l,u,g)),!0}return!1}function o_(n){var r=Ls(n.target);if(r!==null){var l=o(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){n.blockedOn=r,Sg(n.priority,function(){s_(l)});return}}else if(r===31){if(r=d(l),r!==null){n.blockedOn=r,Sg(n.priority,function(){s_(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){n.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Il(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var l=ph(n.nativeEvent);if(l===null){l=n.nativeEvent;var u=new l.constructor(l.type,l);mu=u,l.target.dispatchEvent(u),mu=null}else return r=Os(l),r!==null&&i_(r),n.blockedOn=l,!1;r.shift()}return!0}function l_(n,r,l){Il(n)&&l.delete(r)}function Fw(){yh=!1,Oi!==null&&Il(Oi)&&(Oi=null),Ri!==null&&Il(Ri)&&(Ri=null),ji!==null&&Il(ji)&&(ji=null),$a.forEach(l_),Ba.forEach(l_)}function Pl(n,r){n.blockedOn===r&&(n.blockedOn=null,yh||(yh=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Fw)))}var Ul=null;function c_(n){Ul!==n&&(Ul=n,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Ul===n&&(Ul=null);for(var r=0;r<n.length;r+=3){var l=n[r],u=n[r+1],g=n[r+2];if(typeof u!="function"){if(mh(u||l)===null)continue;break}var p=Os(l);p!==null&&(n.splice(r,3),r-=3,pd(p,{pending:!0,data:g,method:l.method,action:u},u,g))}}))}function gr(n){function r(k){return Pl(k,n)}Oi!==null&&Pl(Oi,n),Ri!==null&&Pl(Ri,n),ji!==null&&Pl(ji,n),$a.forEach(r),Ba.forEach(r);for(var l=0;l<Hi.length;l++){var u=Hi[l];u.blockedOn===n&&(u.blockedOn=null)}for(;0<Hi.length&&(l=Hi[0],l.blockedOn===null);)o_(l),l.blockedOn===null&&Hi.shift();if(l=(n.ownerDocument||n).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var g=l[u],p=l[u+1],S=g[Mt]||null;if(typeof p=="function")S||c_(l);else if(S){var E=null;if(p&&p.hasAttribute("formAction")){if(g=p,S=p[Mt]||null)E=S.formAction;else if(mh(g)!==null)continue}else E=S.action;typeof E=="function"?l[u+1]=E:(l.splice(u,3),u-=3),c_(l)}}}function u_(){function n(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(S){return g=S})},focusReset:"manual",scroll:"manual"})}function r(){g!==null&&(g(),g=null),u||setTimeout(l,20)}function l(){if(!u&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,g=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),g!==null&&(g(),g=null)}}}function _h(n){this._internalRoot=n}ql.prototype.render=_h.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(s(409));var l=r.current,u=Jt();t_(l,u,n,r,null,null)},ql.prototype.unmount=_h.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;t_(n.current,2,null,n,null,null),xl(),r[Ds]=null}};function ql(n){this._internalRoot=n}ql.prototype.unstable_scheduleHydration=function(n){if(n){var r=vg();n={blockedOn:null,target:n,priority:r};for(var l=0;l<Hi.length&&r!==0&&r<Hi[l].priority;l++);Hi.splice(l,0,n),l===0&&o_(n)}};var d_=e.version;if(d_!=="19.2.1")throw Error(s(527,d_,"19.2.1"));Z.findDOMNode=function(n){var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=f(r),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var Gw={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vl.isDisabled&&Vl.supportsFiber)try{$n=Vl.inject(Gw),ct=Vl}catch{}}return qa.createRoot=function(n,r){if(!a(n))throw Error(s(299));var l=!1,u="",g=_m,p=bm,S=vm;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(g=r.onUncaughtError),r.onCaughtError!==void 0&&(p=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError)),r=Qy(n,1,!1,null,null,l,u,null,g,p,S,u_),n[Ds]=r.current,Qd(n),new _h(r)},qa.hydrateRoot=function(n,r,l){if(!a(n))throw Error(s(299));var u=!1,g="",p=_m,S=bm,E=vm,k=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(p=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(k=l.formState)),r=Qy(n,1,!0,r,l??null,u,g,k,p,S,E,u_),r.context=e_(null),l=r.current,u=Jt(),u=lu(u),g=Si(u),g.callback=null,wi(l,g,u),l=u,r.current.lanes=l,Wr(r,l),Mn(r),n[Ds]=r.current,Qd(n),new ql(r)},qa.version="19.2.1",qa}var x_;function fx(){if(x_)return Sh.exports;x_=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),Sh.exports=hx(),Sh.exports}var uN=fx();const wf=new Map([["APIRequestContext.fetch",{title:'{method} "{url}"'}],["APIRequestContext.fetchResponseBody",{title:"Get response body",group:"getter"}],["APIRequestContext.fetchLog",{internal:!0}],["APIRequestContext.storageState",{title:"Get storage state"}],["APIRequestContext.disposeAPIResponse",{internal:!0}],["APIRequestContext.dispose",{internal:!0}],["LocalUtils.zip",{internal:!0}],["LocalUtils.harOpen",{internal:!0}],["LocalUtils.harLookup",{internal:!0}],["LocalUtils.harClose",{internal:!0}],["LocalUtils.harUnzip",{internal:!0}],["LocalUtils.connect",{internal:!0}],["LocalUtils.tracingStarted",{internal:!0}],["LocalUtils.addStackToTracingNoReply",{internal:!0}],["LocalUtils.traceDiscarded",{internal:!0}],["LocalUtils.globToRegex",{internal:!0}],["Root.initialize",{internal:!0}],["Playwright.newRequest",{title:"Create request context"}],["DebugController.initialize",{internal:!0}],["DebugController.setReportStateChanged",{internal:!0}],["DebugController.setRecorderMode",{internal:!0}],["DebugController.highlight",{internal:!0}],["DebugController.hideHighlight",{internal:!0}],["DebugController.resume",{internal:!0}],["DebugController.kill",{internal:!0}],["SocksSupport.socksConnected",{internal:!0}],["SocksSupport.socksFailed",{internal:!0}],["SocksSupport.socksData",{internal:!0}],["SocksSupport.socksError",{internal:!0}],["SocksSupport.socksEnd",{internal:!0}],["BrowserType.launch",{title:"Launch browser"}],["BrowserType.launchPersistentContext",{title:"Launch persistent context"}],["BrowserType.connectOverCDP",{title:"Connect over CDP"}],["Browser.close",{title:"Close browser",pausesBeforeAction:!0}],["Browser.killForTests",{internal:!0}],["Browser.defaultUserAgentForTest",{internal:!0}],["Browser.newContext",{title:"Create context"}],["Browser.newContextForReuse",{internal:!0}],["Browser.disconnectFromReusedContext",{internal:!0}],["Browser.newBrowserCDPSession",{title:"Create CDP session",group:"configuration"}],["Browser.startTracing",{title:"Start browser tracing",group:"configuration"}],["Browser.stopTracing",{title:"Stop browser tracing",group:"configuration"}],["EventTarget.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Page.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Worker.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["WebSocket.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["ElectronApplication.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["AndroidDevice.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["PageAgent.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.addCookies",{title:"Add cookies",group:"configuration"}],["BrowserContext.addInitScript",{title:"Add init script",group:"configuration"}],["BrowserContext.clearCookies",{title:"Clear cookies",group:"configuration"}],["BrowserContext.clearPermissions",{title:"Clear permissions",group:"configuration"}],["BrowserContext.close",{title:"Close context",pausesBeforeAction:!0}],["BrowserContext.cookies",{title:"Get cookies",group:"getter"}],["BrowserContext.exposeBinding",{title:"Expose binding",group:"configuration"}],["BrowserContext.grantPermissions",{title:"Grant permissions",group:"configuration"}],["BrowserContext.newPage",{title:"Create page"}],["BrowserContext.registerSelectorEngine",{internal:!0}],["BrowserContext.setTestIdAttributeName",{internal:!0}],["BrowserContext.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["BrowserContext.setGeolocation",{title:"Set geolocation",group:"configuration"}],["BrowserContext.setHTTPCredentials",{title:"Set HTTP credentials",group:"configuration"}],["BrowserContext.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["BrowserContext.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["BrowserContext.setOffline",{title:"Set offline mode"}],["BrowserContext.storageState",{title:"Get storage state"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.exposeConsoleApi",{internal:!0}],["BrowserContext.newCDPSession",{title:"Create CDP session",group:"configuration"}],["BrowserContext.harStart",{internal:!0}],["BrowserContext.harExport",{internal:!0}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber|timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber|timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber|timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber|timeString}"'}],["Page.addInitScript",{title:"Add init script",group:"configuration"}],["Page.close",{title:"Close page",pausesBeforeAction:!0}],["Page.consoleMessages",{title:"Get console messages",group:"getter"}],["Page.emulateMedia",{title:"Emulate media",snapshot:!0,pausesBeforeAction:!0}],["Page.exposeBinding",{title:"Expose binding",group:"configuration"}],["Page.goBack",{title:"Go back",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.goForward",{title:"Go forward",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.requestGC",{title:"Request garbage collection",group:"configuration"}],["Page.registerLocatorHandler",{title:"Register locator handler"}],["Page.resolveLocatorHandlerNoReply",{internal:!0}],["Page.unregisterLocatorHandler",{title:"Unregister locator handler"}],["Page.reload",{title:"Reload",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.expectScreenshot",{title:"Expect screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["Page.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["Page.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["Page.setViewportSize",{title:"Set viewport size",snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardDown",{title:'Key down "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardUp",{title:'Key up "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardInsertText",{title:'Insert "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardType",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardPress",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseMove",{title:"Mouse move",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseDown",{title:"Mouse down",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseUp",{title:"Mouse up",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseClick",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseWheel",{title:"Mouse wheel",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.touchscreenTap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.pageErrors",{title:"Get page errors",group:"getter"}],["Page.pdf",{title:"PDF"}],["Page.requests",{title:"Get network requests",group:"getter"}],["Page.snapshotForAI",{internal:!0}],["Page.startJSCoverage",{title:"Start JS coverage",group:"configuration"}],["Page.stopJSCoverage",{title:"Stop JS coverage",group:"configuration"}],["Page.startCSSCoverage",{title:"Start CSS coverage",group:"configuration"}],["Page.stopCSSCoverage",{title:"Stop CSS coverage",group:"configuration"}],["Page.bringToFront",{title:"Bring to front"}],["Page.updateSubscription",{internal:!0}],["Page.agent",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",snapshot:!0,pausesBeforeAction:!0}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.content",{title:"Get content",snapshot:!0,pausesBeforeAction:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.frameElement",{title:"Get frame element",group:"getter"}],["Frame.resolveSelector",{internal:!0}],["Frame.highlight",{title:"Highlight element",group:"configuration"}],["Frame.getAttribute",{title:'Get attribute "{name}"',snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0,pausesBeforeAction:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.setContent",{title:"Set content",snapshot:!0,pausesBeforeAction:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.title",{title:"Get page title",group:"getter"}],["Frame.type",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0,pausesBeforeAction:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0,pausesBeforeAction:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["Worker.updateSubscription",{internal:!0}],["JSHandle.dispose",{internal:!0}],["ElementHandle.dispose",{internal:!0}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.getPropertyList",{title:"Get property list",group:"getter"}],["ElementHandle.getPropertyList",{title:"Get property list",group:"getter"}],["JSHandle.getProperty",{title:"Get JS property",group:"getter"}],["ElementHandle.getProperty",{title:"Get JS property",group:"getter"}],["JSHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.contentFrame",{title:"Get content frame",group:"getter"}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.getAttribute",{title:"Get attribute",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.ownerFrame",{title:"Get owner frame",group:"getter"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{title:"Abort request",group:"route"}],["Route.continue",{title:"Continue request",group:"route"}],["Route.fulfill",{title:"Fulfill request",group:"route"}],["WebSocketRoute.connect",{title:"Connect WebSocket to server",group:"route"}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.sendToServer",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{title:"Get response body",group:"getter"}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.sizes",{internal:!0}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Dialog.accept",{title:"Accept dialog"}],["Dialog.dismiss",{title:"Dismiss dialog"}],["Tracing.tracingStart",{title:"Start tracing",group:"configuration"}],["Tracing.tracingStartChunk",{title:"Start tracing",group:"configuration"}],["Tracing.tracingGroup",{title:'Trace "{name}"'}],["Tracing.tracingGroupEnd",{title:"Group end"}],["Tracing.tracingStopChunk",{title:"Stop tracing",group:"configuration"}],["Tracing.tracingStop",{title:"Stop tracing",group:"configuration"}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["CDPSession.send",{title:"Send CDP command",group:"configuration"}],["CDPSession.detach",{title:"Detach CDP session",group:"configuration"}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{title:"Wait"}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{title:"Execute shell command",group:"configuration"}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{title:"Connect to Web View"}],["AndroidDevice.close",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}],["PageAgent.perform",{title:'Perform "{task}"'}],["PageAgent.expect",{title:'Expect "{expectation}"'}],["PageAgent.extract",{title:'Extract "{query}"'}],["PageAgent.dispose",{internal:!0}],["PageAgent.usage",{title:"Get agent usage",group:"configuration"}]]);function Hb(i,e){var t;return(t=gx(i,e))==null?void 0:t.replaceAll(`
|
|
51
|
+
`,"\\n")}function gx(i,e){if(i)for(const t of e.split("|")){if(t==="url")try{const a=new URL(i[t]);return a.protocol==="data:"?a.protocol:a.protocol==="about:"?i[t]:a.pathname+a.search}catch{if(i[t]!==void 0)return i[t]}if(t==="timeNumber"&&i[t]!==void 0)return new Date(i[t]).toString();const s=px(i,t);if(s!==void 0)return s}}function px(i,e){const t=e.split(".");let s=i;for(const a of t){if(typeof s!="object"||s===null)return;s=s[a]}if(s!==void 0)return String(s)}function mx(i){var t;return(i.title??((t=wf.get(i.type+"."+i.method))==null?void 0:t.title)??i.method).replace(/\{([^}]+)\}/g,(s,a)=>Hb(i.params,a)??s)}function yx(i){var e;return(e=wf.get(i.type+"."+i.method))==null?void 0:e.group}const eo=Symbol("context"),zb=Symbol("nextInContext"),$b=Symbol("prevByEndTime"),Bb=Symbol("nextByStartTime"),T_=Symbol("events");class dN{constructor(e,t){var a;t.forEach(o=>_x(o));const s=t.find(o=>o.origin==="library");this.traceUri=e,this.browserName=(s==null?void 0:s.browserName)||"",this.sdkLanguage=s==null?void 0:s.sdkLanguage,this.channel=s==null?void 0:s.channel,this.testIdAttributeName=s==null?void 0:s.testIdAttributeName,this.platform=(s==null?void 0:s.platform)||"",this.playwrightVersion=(a=t.find(o=>o.playwrightVersion))==null?void 0:a.playwrightVersion,this.title=(s==null?void 0:s.title)||"",this.options=(s==null?void 0:s.options)||{},this.actions=bx(t),this.pages=[].concat(...t.map(o=>o.pages)),this.wallTime=t.map(o=>o.wallTime).reduce((o,c)=>Math.min(o||Number.MAX_VALUE,c),Number.MAX_VALUE),this.startTime=t.map(o=>o.startTime).reduce((o,c)=>Math.min(o,c),Number.MAX_VALUE),this.endTime=t.map(o=>o.endTime).reduce((o,c)=>Math.max(o,c),Number.MIN_VALUE),this.events=[].concat(...t.map(o=>o.events)),this.stdio=[].concat(...t.map(o=>o.stdio)),this.errors=[].concat(...t.map(o=>o.errors)),this.hasSource=t.some(o=>o.hasSource),this.hasStepData=t.some(o=>o.origin==="testRunner"),this.resources=[...t.map(o=>o.resources)].flat(),this.attachments=this.actions.flatMap(o=>{var c;return((c=o.attachments)==null?void 0:c.map(d=>({...d,callId:o.callId,traceUri:e})))??[]}),this.visibleAttachments=this.attachments.filter(o=>!o.name.startsWith("_")),this.events.sort((o,c)=>o.time-c.time),this.resources.sort((o,c)=>o._monotonicTime-c._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=Ax(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const o of this.actions)o.group=o.group??yx({type:o.class,method:o.method}),o.group&&this.actionCounters.set(o.group,1+(this.actionCounters.get(o.group)||0))}createRelativeUrl(e){const t=new URL("http://localhost/"+e);return t.searchParams.set("trace",this.traceUri),t.toString().substring(17)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const t=new Set(e);return this.actions.filter(s=>!s.group||t.has(s.group))}renderActionTree(e){const t=this.filteredActions(e??[]),{rootItem:s}=Ib(t),a=[],o=(c,d)=>{const h=mx({...c.action,type:c.action.class});a.push(`${d}${h||c.id}`);for(const f of c.children)o(f,d+" ")};return s.children.forEach(c=>o(c,"")),a}_errorDescriptorsFromActions(){var t;const e=[];for(const s of this.actions||[])(t=s.error)!=null&&t.message&&e.push({action:s,stack:s.stack,message:s.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,t)=>({stack:e.stack,message:e.message}))}}function _x(i){for(const t of i.pages)t[eo]=i;for(let t=0;t<i.actions.length;++t){const s=i.actions[t];s[eo]=i}let e;for(let t=i.actions.length-1;t>=0;t--){const s=i.actions[t];s[zb]=e,s.class!=="Route"&&(e=s)}for(const t of i.events)t[eo]=i;for(const t of i.resources)t[eo]=i}function bx(i){const e=[],t=vx(i);e.push(...t),e.sort((s,a)=>a.parentId===s.callId?1:s.parentId===a.callId?-1:s.endTime-a.endTime);for(let s=1;s<e.length;++s)e[s][$b]=e[s-1];e.sort((s,a)=>a.parentId===s.callId?-1:s.parentId===a.callId?1:s.startTime-a.startTime);for(let s=0;s+1<e.length;++s)e[s][Bb]=e[s+1];return e}let E_=0;function vx(i){const e=new Map,t=i.filter(c=>c.origin==="library"),s=i.filter(c=>c.origin==="testRunner");if(!s.length||!t.length)return i.map(c=>c.actions.map(d=>({...d,context:c}))).flat();for(const c of t)for(const d of c.actions)e.set(d.stepId||`tmp-step@${++E_}`,{...d,context:c});const a=wx(s,e);a&&Sx(t,a);const o=new Map;for(const c of s)for(const d of c.actions){const h=d.stepId&&e.get(d.stepId);if(h){o.set(d.callId,h.callId),d.error&&(h.error=d.error),d.attachments&&(h.attachments=d.attachments),d.annotations&&(h.annotations=d.annotations),d.parentId&&(h.parentId=o.get(d.parentId)??d.parentId),d.group&&(h.group=d.group),h.startTime=d.startTime,h.endTime=d.endTime;continue}d.parentId&&(d.parentId=o.get(d.parentId)??d.parentId),e.set(d.stepId||`tmp-step@${++E_}`,{...d,context:c})}return[...e.values()]}function Sx(i,e){for(const t of i){t.startTime+=e,t.endTime+=e;for(const s of t.actions)s.startTime&&(s.startTime+=e),s.endTime&&(s.endTime+=e);for(const s of t.events)s.time+=e;for(const s of t.stdio)s.timestamp+=e;for(const s of t.pages)for(const a of s.screencastFrames)a.timestamp+=e;for(const s of t.resources)s._monotonicTime&&(s._monotonicTime+=e)}}function wx(i,e){for(const t of i)for(const s of t.actions){if(!s.startTime)continue;const a=s.stepId?e.get(s.stepId):void 0;if(a)return s.startTime-a.startTime}return 0}function Ib(i){const e=new Map;for(const a of i)e.set(a.callId,{id:a.callId,parent:void 0,children:[],action:a});const t={action:{...Cx},id:"",parent:void 0,children:[]};for(const a of e.values()){t.action.startTime=Math.min(t.action.startTime,a.action.startTime),t.action.endTime=Math.max(t.action.endTime,a.action.endTime);const o=a.action.parentId&&e.get(a.action.parentId)||t;o.children.push(a),a.parent=o}const s=a=>{for(const o of a.children)o.action.stack=o.action.stack??a.action.stack,s(o)};return s(t),{rootItem:t,itemMap:e}}function Pb(i){return i[eo]}function xx(i){return i[zb]}function A_(i){return i[$b]}function C_(i){return i[Bb]}function Tx(i){let e=0,t=0;for(const s of Ex(i)){if(s.type==="console"){const a=s.messageType;a==="warning"?++t:a==="error"&&++e}s.type==="event"&&s.method==="pageError"&&++e}return{errors:e,warnings:t}}function Ex(i){let e=i[T_];if(e)return e;const t=xx(i);return e=Pb(i).events.filter(s=>s.time>=i.startTime&&(!t||s.time<t.startTime)),i[T_]=e,e}function Ax(i,e){var s;const t=new Map;for(const a of i)for(const o of a.stack||[]){let c=t.get(o.file);c||(c={errors:[],content:void 0},t.set(o.file,c))}for(const a of e){const{action:o,stack:c,message:d}=a;!o||!c||(s=t.get(c[0].file))==null||s.errors.push({line:c[0].line||0,message:d})}return t}const Cx={type:"action",callId:"",startTime:0,endTime:0,class:"",method:"",params:{},log:[],context:{origin:"library",startTime:0,endTime:0,browserName:"",wallTime:0,options:{},pages:[],resources:[],actions:[],events:[],stdio:[],errors:[],hasSource:!1,contextId:""}},kx=50,_c=({sidebarSize:i,sidebarHidden:e=!1,sidebarIsFirst:t=!1,orientation:s="vertical",minSidebarSize:a=kx,settingName:o,sidebar:c,main:d})=>{const h=Math.max(a,i)*window.devicePixelRatio,[f,y]=hn(o?o+"."+s+":size":void 0,h),[m,_]=hn(o?o+"."+s+":size":void 0,h),[b,w]=P.useState(null),[v,T]=Es();let A;s==="vertical"?(A=m/window.devicePixelRatio,v&&v.height<A&&(A=v.height-10)):(A=f/window.devicePixelRatio,v&&v.width<A&&(A=v.width-10)),document.body.style.userSelect=b?"none":"inherit";let C={};return s==="vertical"?t?C={top:b?0:A-4,bottom:b?0:void 0,height:b?"initial":8}:C={bottom:b?0:A-4,top:b?0:void 0,height:b?"initial":8}:t?C={left:b?0:A-4,right:b?0:void 0,width:b?"initial":8}:C={right:b?0:A-4,left:b?0:void 0,width:b?"initial":8},x.jsxs("div",{className:We("split-view",s,t&&"sidebar-first"),ref:T,children:[x.jsx("div",{className:"split-view-main",children:d}),!e&&x.jsx("div",{style:{flexBasis:A},className:"split-view-sidebar",children:c}),!e&&x.jsx("div",{style:C,className:"split-view-resizer",onMouseDown:L=>w({offset:s==="vertical"?L.clientY:L.clientX,size:A}),onMouseUp:()=>w(null),onMouseMove:L=>{if(!L.buttons)w(null);else if(b){const D=(s==="vertical"?L.clientY:L.clientX)-b.offset,F=t?b.size+D:b.size-D,q=L.target.parentElement.getBoundingClientRect(),O=Math.min(Math.max(a,F),(s==="vertical"?q.height:q.width)-a);s==="vertical"?_(O*window.devicePixelRatio):y(O*window.devicePixelRatio)}}})]})},it=function(i,e,t){return i>=e&&i<=t};function zt(i){return it(i,48,57)}function k_(i){return zt(i)||it(i,65,70)||it(i,97,102)}function Nx(i){return it(i,65,90)}function Mx(i){return it(i,97,122)}function Dx(i){return Nx(i)||Mx(i)}function Lx(i){return i>=128}function nc(i){return Dx(i)||Lx(i)||i===95}function N_(i){return nc(i)||zt(i)||i===45}function Ox(i){return it(i,0,8)||i===11||it(i,14,31)||i===127}function ic(i){return i===10}function ii(i){return ic(i)||i===9||i===32}const Rx=1114111;class xf extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function jx(i){const e=[];for(let t=0;t<i.length;t++){let s=i.charCodeAt(t);if(s===13&&i.charCodeAt(t+1)===10&&(s=10,t++),(s===13||s===12)&&(s=10),s===0&&(s=65533),it(s,55296,56319)&&it(i.charCodeAt(t+1),56320,57343)){const a=s-55296,o=i.charCodeAt(t+1)-56320;s=Math.pow(2,16)+a*Math.pow(2,10)+o,t++}e.push(s)}return e}function ot(i){if(i<=65535)return String.fromCharCode(i);i-=Math.pow(2,16);const e=Math.floor(i/Math.pow(2,10))+55296,t=i%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(t)}function Ub(i){const e=jx(i);let t=-1;const s=[];let a;const o=function(Y){return Y>=e.length?-1:e[Y]},c=function(Y){if(Y===void 0&&(Y=1),Y>3)throw"Spec Error: no more than three codepoints of lookahead.";return o(t+Y)},d=function(Y){return Y===void 0&&(Y=1),t+=Y,a=o(t),!0},h=function(){return t-=1,!0},f=function(Y){return Y===void 0&&(Y=a),Y===-1},y=function(){if(m(),d(),ii(a)){for(;ii(c());)d();return new bc}else{if(a===34)return w();if(a===35)if(N_(c())||A(c(1),c(2))){const Y=new t0("");return L(c(1),c(2),c(3))&&(Y.type="id"),Y.value=B(),Y}else return new _t(a);else return a===36?c()===61?(d(),new Bx):new _t(a):a===39?w():a===40?new Zb:a===41?new Tf:a===42?c()===61?(d(),new Ix):new _t(a):a===43?F()?(h(),_()):new _t(a):a===44?new Yb:a===45?F()?(h(),_()):c(1)===45&&c(2)===62?(d(2),new Fb):j()?(h(),b()):new _t(a):a===46?F()?(h(),_()):new _t(a):a===58?new Gb:a===59?new Xb:a===60?c(1)===33&&c(2)===45&&c(3)===45?(d(3),new Vb):new _t(a):a===64?L(c(1),c(2),c(3))?new e0(B()):new _t(a):a===91?new Wb:a===92?C()?(h(),b()):new _t(a):a===93?new Zh:a===94?c()===61?(d(),new $x):new _t(a):a===123?new Kb:a===124?c()===61?(d(),new zx):c()===124?(d(),new Qb):new _t(a):a===125?new Jb:a===126?c()===61?(d(),new Hx):new _t(a):zt(a)?(h(),_()):nc(a)?(h(),b()):f()?new rc:new _t(a)}},m=function(){for(;c(1)===47&&c(2)===42;)for(d(2);;)if(d(),a===42&&c()===47){d();break}else if(f())return},_=function(){const Y=q();if(L(c(1),c(2),c(3))){const J=new Px;return J.value=Y.value,J.repr=Y.repr,J.type=Y.type,J.unit=B(),J}else if(c()===37){d();const J=new s0;return J.value=Y.value,J.repr=Y.repr,J}else{const J=new i0;return J.value=Y.value,J.repr=Y.repr,J.type=Y.type,J}},b=function(){const Y=B();if(Y.toLowerCase()==="url"&&c()===40){for(d();ii(c(1))&&ii(c(2));)d();return c()===34||c()===39?new ro(Y):ii(c())&&(c(2)===34||c(2)===39)?new ro(Y):v()}else return c()===40?(d(),new ro(Y)):new Ef(Y)},w=function(Y){Y===void 0&&(Y=a);let J="";for(;d();){if(a===Y||f())return new Af(J);if(ic(a))return h(),new qb;a===92?f(c())||(ic(c())?d():J+=ot(T())):J+=ot(a)}throw new Error("Internal error")},v=function(){const Y=new n0("");for(;ii(c());)d();if(f(c()))return Y;for(;d();){if(a===41||f())return Y;if(ii(a)){for(;ii(c());)d();return c()===41||f(c())?(d(),Y):(Q(),new sc)}else{if(a===34||a===39||a===40||Ox(a))return Q(),new sc;if(a===92)if(C())Y.value+=ot(T());else return Q(),new sc;else Y.value+=ot(a)}}throw new Error("Internal error")},T=function(){if(d(),k_(a)){const Y=[a];for(let te=0;te<5&&k_(c());te++)d(),Y.push(a);ii(c())&&d();let J=parseInt(Y.map(function(te){return String.fromCharCode(te)}).join(""),16);return J>Rx&&(J=65533),J}else return f()?65533:a},A=function(Y,J){return!(Y!==92||ic(J))},C=function(){return A(a,c())},L=function(Y,J,te){return Y===45?nc(J)||J===45||A(J,te):nc(Y)?!0:Y===92?A(Y,J):!1},j=function(){return L(a,c(1),c(2))},D=function(Y,J,te){return Y===43||Y===45?!!(zt(J)||J===46&&zt(te)):Y===46?!!zt(J):!!zt(Y)},F=function(){return D(a,c(1),c(2))},B=function(){let Y="";for(;d();)if(N_(a))Y+=ot(a);else if(C())Y+=ot(T());else return h(),Y;throw new Error("Internal parse error")},q=function(){let Y="",J="integer";for((c()===43||c()===45)&&(d(),Y+=ot(a));zt(c());)d(),Y+=ot(a);if(c(1)===46&&zt(c(2)))for(d(),Y+=ot(a),d(),Y+=ot(a),J="number";zt(c());)d(),Y+=ot(a);const te=c(1),Ne=c(2),I=c(3);if((te===69||te===101)&&zt(Ne))for(d(),Y+=ot(a),d(),Y+=ot(a),J="number";zt(c());)d(),Y+=ot(a);else if((te===69||te===101)&&(Ne===43||Ne===45)&&zt(I))for(d(),Y+=ot(a),d(),Y+=ot(a),d(),Y+=ot(a),J="number";zt(c());)d(),Y+=ot(a);const Z=O(Y);return{type:J,value:Z,repr:Y}},O=function(Y){return+Y},Q=function(){for(;d();){if(a===41||f())return;C()&&T()}};let se=0;for(;!f(c());)if(s.push(y()),se++,se>e.length*2)throw new Error("I'm infinite-looping!");return s}class Ze{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class qb extends Ze{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class sc extends Ze{constructor(){super(...arguments),this.tokenType="BADURL"}}class bc extends Ze{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class Vb extends Ze{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class Fb extends Ze{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class Gb extends Ze{constructor(){super(...arguments),this.tokenType=":"}}class Xb extends Ze{constructor(){super(...arguments),this.tokenType=";"}}class Yb extends Ze{constructor(){super(...arguments),this.tokenType=","}}class zr extends Ze{constructor(){super(...arguments),this.value="",this.mirror=""}}class Kb extends zr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class Jb extends zr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class Wb extends zr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Zh extends zr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class Zb extends zr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Tf extends zr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class Hx extends Ze{constructor(){super(...arguments),this.tokenType="~="}}class zx extends Ze{constructor(){super(...arguments),this.tokenType="|="}}class $x extends Ze{constructor(){super(...arguments),this.tokenType="^="}}class Bx extends Ze{constructor(){super(...arguments),this.tokenType="$="}}class Ix extends Ze{constructor(){super(...arguments),this.tokenType="*="}}class Qb extends Ze{constructor(){super(...arguments),this.tokenType="||"}}class rc extends Ze{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class _t extends Ze{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=ot(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==="\\"?`\\
|
|
52
|
+
`:this.value}}class $r extends Ze{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 Ef extends $r{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return xo(this.value)}}class ro extends $r{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return xo(this.value)+"("}}class e0 extends $r{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+xo(this.value)}}class t0 extends $r{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"?"#"+xo(this.value):"#"+Ux(this.value)}}class Af extends $r{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+r0(this.value)+'"'}}class n0 extends $r{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+r0(this.value)+'")'}}class i0 extends Ze{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 s0 extends Ze{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 Px extends Ze{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 t=xo(this.unit);return t[0].toLowerCase()==="e"&&(t[1]==="-"||it(t.charCodeAt(1),48,57))&&(t="\\65 "+t.slice(1,t.length)),e+t}}function xo(i){i=""+i;let e="";const t=i.charCodeAt(0);for(let s=0;s<i.length;s++){const a=i.charCodeAt(s);if(a===0)throw new xf("Invalid character: the input contains U+0000.");it(a,1,31)||a===127||s===0&&it(a,48,57)||s===1&&it(a,48,57)&&t===45?e+="\\"+a.toString(16)+" ":a>=128||a===45||a===95||it(a,48,57)||it(a,65,90)||it(a,97,122)?e+=i[s]:e+="\\"+i[s]}return e}function Ux(i){i=""+i;let e="";for(let t=0;t<i.length;t++){const s=i.charCodeAt(t);if(s===0)throw new xf("Invalid character: the input contains U+0000.");s>=128||s===45||s===95||it(s,48,57)||it(s,65,90)||it(s,97,122)?e+=i[t]:e+="\\"+s.toString(16)+" "}return e}function r0(i){i=""+i;let e="";for(let t=0;t<i.length;t++){const s=i.charCodeAt(t);if(s===0)throw new xf("Invalid character: the input contains U+0000.");it(s,1,31)||s===127?e+="\\"+s.toString(16)+" ":s===34||s===92?e+="\\"+i[t]:e+=i[t]}return e}class $t extends Error{}function qx(i,e){let t;try{t=Ub(i),t[t.length-1]instanceof rc||t.push(new rc)}catch(O){const Q=O.message+` while parsing css selector "${i}". Did you mean to CSS.escape it?`,se=(O.stack||"").indexOf(O.message);throw se!==-1&&(O.stack=O.stack.substring(0,se)+Q+O.stack.substring(se+O.message.length)),O.message=Q,O}const s=t.find(O=>O instanceof e0||O instanceof qb||O instanceof sc||O instanceof Qb||O instanceof Vb||O instanceof Fb||O instanceof Xb||O instanceof Kb||O instanceof Jb||O instanceof n0||O instanceof s0);if(s)throw new $t(`Unsupported token "${s.toSource()}" while parsing css selector "${i}". Did you mean to CSS.escape it?`);let a=0;const o=new Set;function c(){return new $t(`Unexpected token "${t[a].toSource()}" while parsing css selector "${i}". Did you mean to CSS.escape it?`)}function d(){for(;t[a]instanceof bc;)a++}function h(O=a){return t[O]instanceof Ef}function f(O=a){return t[O]instanceof Af}function y(O=a){return t[O]instanceof i0}function m(O=a){return t[O]instanceof Yb}function _(O=a){return t[O]instanceof Zb}function b(O=a){return t[O]instanceof Tf}function w(O=a){return t[O]instanceof ro}function v(O=a){return t[O]instanceof _t&&t[O].value==="*"}function T(O=a){return t[O]instanceof rc}function A(O=a){return t[O]instanceof _t&&[">","+","~"].includes(t[O].value)}function C(O=a){return m(O)||b(O)||T(O)||A(O)||t[O]instanceof bc}function L(){const O=[j()];for(;d(),!!m();)a++,O.push(j());return O}function j(){return d(),y()||f()?t[a++].value:D()}function D(){const O={simples:[]};for(d(),A()?O.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):O.simples.push({selector:F(),combinator:""});;){if(d(),A())O.simples[O.simples.length-1].combinator=t[a++].value,d();else if(C())break;O.simples.push({combinator:"",selector:F()})}return O}function F(){let O="";const Q=[];for(;!C();)if(h()||v())O+=t[a++].toSource();else if(t[a]instanceof t0)O+=t[a++].toSource();else if(t[a]instanceof _t&&t[a].value===".")if(a++,h())O+="."+t[a++].toSource();else throw c();else if(t[a]instanceof Gb)if(a++,h())if(!e.has(t[a].value.toLowerCase()))O+=":"+t[a++].toSource();else{const se=t[a++].value.toLowerCase();Q.push({name:se,args:[]}),o.add(se)}else if(w()){const se=t[a++].value.toLowerCase();if(e.has(se)?(Q.push({name:se,args:L()}),o.add(se)):O+=`:${se}(${B()})`,d(),!b())throw c();a++}else throw c();else if(t[a]instanceof Wb){for(O+="[",a++;!(t[a]instanceof Zh)&&!T();)O+=t[a++].toSource();if(!(t[a]instanceof Zh))throw c();O+="]",a++}else throw c();if(!O&&!Q.length)throw c();return{css:O||void 0,functions:Q}}function B(){let O="",Q=1;for(;!T()&&((_()||w())&&Q++,b()&&Q--,!!Q);)O+=t[a++].toSource();return O}const q=L();if(!T())throw c();if(q.some(O=>typeof O!="object"||!("simples"in O)))throw new $t(`Error while parsing css selector "${i}". Did you mean to CSS.escape it?`);return{selector:q,names:Array.from(o)}}const Qh=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Vx=new Set(["left-of","right-of","above","below","near"]),a0=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(i){const e=Xx(i),t=[];for(const s of e.parts){if(s.name==="css"||s.name==="css:light"){s.name==="css:light"&&(s.body=":light("+s.body+")");const a=qx(s.body,a0);t.push({name:"css",body:a.selector,source:s.body});continue}if(Qh.has(s.name)){let a,o;try{const f=JSON.parse("["+s.body+"]");if(!Array.isArray(f)||f.length<1||f.length>2||typeof f[0]!="string")throw new $t(`Malformed selector: ${s.name}=`+s.body);if(a=f[0],f.length===2){if(typeof f[1]!="number"||!Vx.has(s.name))throw new $t(`Malformed selector: ${s.name}=`+s.body);o=f[1]}}catch{throw new $t(`Malformed selector: ${s.name}=`+s.body)}const c={name:s.name,source:s.body,body:{parsed:To(a),distance:o}},d=[...c.body.parsed.parts].reverse().find(f=>f.name==="internal:control"&&f.body==="enter-frame"),h=d?c.body.parsed.parts.indexOf(d):-1;h!==-1&&Fx(c.body.parsed.parts.slice(0,h+1),t.slice(0,h+1))&&c.body.parsed.parts.splice(0,h+1),t.push(c);continue}t.push({...s,source:s.body})}if(Qh.has(t[0].name))throw new $t(`"${t[0].name}" selector cannot be first`);return{capture:e.capture,parts:t}}function Fx(i,e){return Rn({parts:i})===Rn({parts:e})}function Rn(i,e){return typeof i=="string"?i:i.parts.map((t,s)=>{let a=!0;!e&&s!==i.capture&&(t.name==="css"||t.name==="xpath"&&t.source.startsWith("//")||t.source.startsWith(".."))&&(a=!1);const o=a?t.name+"=":"";return`${s===i.capture?"*":""}${o}${t.source}`}).join(" >> ")}function Gx(i,e){const t=(s,a)=>{for(const o of s.parts)e(o,a),Qh.has(o.name)&&t(o.body.parsed,!0)};t(i,!1)}function Xx(i){let e=0,t,s=0;const a={parts:[]},o=()=>{const d=i.substring(s,e).trim(),h=d.indexOf("=");let f,y;h!==-1&&d.substring(0,h).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(f=d.substring(0,h).trim(),y=d.substring(h+1)):d.length>1&&d[0]==='"'&&d[d.length-1]==='"'||d.length>1&&d[0]==="'"&&d[d.length-1]==="'"?(f="text",y=d):/^\(*\/\//.test(d)||d.startsWith("..")?(f="xpath",y=d):(f="css",y=d);let m=!1;if(f[0]==="*"&&(m=!0,f=f.substring(1)),a.parts.push({name:f,body:y}),m){if(a.capture!==void 0)throw new $t("Only one of the selectors can capture using * modifier");a.capture=a.parts.length-1}};if(!i.includes(">>"))return e=i.length,o(),a;const c=()=>{const h=i.substring(s,e).match(/^\s*text\s*=(.*)$/);return!!h&&!!h[1]};for(;e<i.length;){const d=i[e];d==="\\"&&e+1<i.length?e+=2:d===t?(t=void 0,e++):!t&&(d==='"'||d==="'"||d==="`")&&!c()?(t=d,e++):!t&&d===">"&&i[e+1]===">"?(o(),e+=2,s=e):e++}return o(),a}function xs(i,e){let t=0,s=i.length===0;const a=()=>i[t]||"",o=()=>{const T=a();return++t,s=t>=i.length,T},c=T=>{throw s?new $t(`Unexpected end of selector while parsing selector \`${i}\``):new $t(`Error while parsing selector \`${i}\` - unexpected symbol "${a()}" at position ${t}`+(T?" during "+T:""))};function d(){for(;!s&&/\s/.test(a());)o()}function h(T){return T>=""||T>="0"&&T<="9"||T>="A"&&T<="Z"||T>="a"&&T<="z"||T>="0"&&T<="9"||T==="_"||T==="-"}function f(){let T="";for(d();!s&&h(a());)T+=o();return T}function y(T){let A=o();for(A!==T&&c("parsing quoted string");!s&&a()!==T;)a()==="\\"&&o(),A+=o();return a()!==T&&c("parsing quoted string"),A+=o(),A}function m(){o()!=="/"&&c("parsing regular expression");let T="",A=!1;for(;!s;){if(a()==="\\")T+=o(),s&&c("parsing regular expression");else if(A&&a()==="]")A=!1;else if(!A&&a()==="[")A=!0;else if(!A&&a()==="/")break;T+=o()}o()!=="/"&&c("parsing regular expression");let C="";for(;!s&&a().match(/[dgimsuy]/);)C+=o();try{return new RegExp(T,C)}catch(L){throw new $t(`Error while parsing selector \`${i}\`: ${L.message}`)}}function _(){let T="";return d(),a()==="'"||a()==='"'?T=y(a()).slice(1,-1):T=f(),T||c("parsing property path"),T}function b(){d();let T="";return s||(T+=o()),!s&&T!=="="&&(T+=o()),["=","*=","^=","$=","|=","~="].includes(T)||c("parsing operator"),T}function w(){o();const T=[];for(T.push(_()),d();a()===".";)o(),T.push(_()),d();if(a()==="]")return o(),{name:T.join("."),jsonPath:T,op:"<truthy>",value:null,caseSensitive:!1};const A=b();let C,L=!0;if(d(),a()==="/"){if(A!=="=")throw new $t(`Error while parsing selector \`${i}\` - cannot use ${A} in attribute with regular expression`);C=m()}else if(a()==="'"||a()==='"')C=y(a()).slice(1,-1),d(),a()==="i"||a()==="I"?(L=!1,o()):(a()==="s"||a()==="S")&&(L=!0,o());else{for(C="";!s&&(h(a())||a()==="+"||a()===".");)C+=o();C==="true"?C=!0:C==="false"?C=!1:e||(C=+C,Number.isNaN(C)&&c("parsing attribute value"))}if(d(),a()!=="]"&&c("parsing attribute value"),o(),A!=="="&&typeof C!="string")throw new $t(`Error while parsing selector \`${i}\` - cannot use ${A} in attribute with non-string matching value - ${C}`);return{name:T.join("."),jsonPath:T,op:A,value:C,caseSensitive:L}}const v={name:"",attributes:[]};for(v.name=f(),d();a()==="[";)v.attributes.push(w()),d();if(s||c(void 0),!v.name&&!v.attributes.length)throw new $t(`Error while parsing selector \`${i}\` - selector cannot be empty`);return v}function Lc(i,e="'"){const t=JSON.stringify(i),s=t.substring(1,t.length-1).replace(/\\"/g,'"');if(e==="'")return e+s.replace(/[']/g,"\\'")+e;if(e==='"')return e+s.replace(/["]/g,'\\"')+e;if(e==="`")return e+s.replace(/[`]/g,"\\`")+e;throw new Error("Invalid escape char")}function vc(i){return i.charAt(0).toUpperCase()+i.substring(1)}function o0(i){return i.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function Bi(i){return`"${i.replace(/["\\]/g,e=>"\\"+e)}"`}let ps;function Yx(){ps=new Map}function Nt(i){let e=ps==null?void 0:ps.get(i);return e===void 0&&(e=i.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),ps==null||ps.set(i,e)),e}function Oc(i){return i.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function l0(i){return i.unicode||i.unicodeSets?String(i):String(i).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Bt(i,e){return typeof i!="string"?l0(i):`${JSON.stringify(i)}${e?"s":"i"}`}function It(i,e){return typeof i!="string"?l0(i):`"${i.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function Kx(i,e,t=""){if(i.length<=e)return i;const s=[...i];return s.length>e?s.slice(0,e-t.length).join("")+t:s.join("")}function M_(i,e){return Kx(i,e,"…")}function Sc(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jx(i,e){const t=i.length,s=e.length;let a=0,o=0;const c=Array(t+1).fill(null).map(()=>Array(s+1).fill(0));for(let d=1;d<=t;d++)for(let h=1;h<=s;h++)i[d-1]===e[h-1]&&(c[d][h]=c[d-1][h-1]+1,c[d][h]>a&&(a=c[d][h],o=d));return i.slice(o-a,o)}function Wx(i,e){try{const t=To(e),s=Zx(t);return s||bs(new u0[i],t,!1,1)[0]}catch{return e}}function Zx(i){const e=i.parts[i.parts.length-1];if((e==null?void 0:e.name)==="internal:describe"){const t=JSON.parse(e.body);if(typeof t=="string")return t}}function qi(i,e,t=!1){return c0(i,e,t,1)[0]}function c0(i,e,t=!1,s=20,a){try{return bs(new u0[i](a),To(e),t,s)}catch{return[e]}}function bs(i,e,t=!1,s=20){const a=[...e.parts],o=[];let c=t?"frame-locator":"page";for(let d=0;d<a.length;d++){const h=a[d],f=c;if(c="locator",h.name==="internal:describe")continue;if(h.name==="nth"){h.body==="0"?o.push([i.generateLocator(f,"first",""),i.generateLocator(f,"nth","0")]):h.body==="-1"?o.push([i.generateLocator(f,"last",""),i.generateLocator(f,"nth","-1")]):o.push([i.generateLocator(f,"nth",h.body)]);continue}if(h.name==="visible"){o.push([i.generateLocator(f,"visible",h.body),i.generateLocator(f,"default",`visible=${h.body}`)]);continue}if(h.name==="internal:text"){const{exact:w,text:v}=Va(h.body);o.push([i.generateLocator(f,"text",v,{exact:w})]);continue}if(h.name==="internal:has-text"){const{exact:w,text:v}=Va(h.body);if(!w){o.push([i.generateLocator(f,"has-text",v,{exact:w})]);continue}}if(h.name==="internal:has-not-text"){const{exact:w,text:v}=Va(h.body);if(!w){o.push([i.generateLocator(f,"has-not-text",v,{exact:w})]);continue}}if(h.name==="internal:has"){const w=bs(i,h.body.parsed,!1,s);o.push(w.map(v=>i.generateLocator(f,"has",v)));continue}if(h.name==="internal:has-not"){const w=bs(i,h.body.parsed,!1,s);o.push(w.map(v=>i.generateLocator(f,"hasNot",v)));continue}if(h.name==="internal:and"){const w=bs(i,h.body.parsed,!1,s);o.push(w.map(v=>i.generateLocator(f,"and",v)));continue}if(h.name==="internal:or"){const w=bs(i,h.body.parsed,!1,s);o.push(w.map(v=>i.generateLocator(f,"or",v)));continue}if(h.name==="internal:chain"){const w=bs(i,h.body.parsed,!1,s);o.push(w.map(v=>i.generateLocator(f,"chain",v)));continue}if(h.name==="internal:label"){const{exact:w,text:v}=Va(h.body);o.push([i.generateLocator(f,"label",v,{exact:w})]);continue}if(h.name==="internal:role"){const w=xs(h.body,!0),v={attrs:[]};for(const T of w.attributes)T.name==="name"?(v.exact=T.caseSensitive,v.name=T.value):(T.name==="level"&&typeof T.value=="string"&&(T.value=+T.value),v.attrs.push({name:T.name==="include-hidden"?"includeHidden":T.name,value:T.value}));o.push([i.generateLocator(f,"role",w.name,v)]);continue}if(h.name==="internal:testid"){const w=xs(h.body,!0),{value:v}=w.attributes[0];o.push([i.generateLocator(f,"test-id",v)]);continue}if(h.name==="internal:attr"){const w=xs(h.body,!0),{name:v,value:T,caseSensitive:A}=w.attributes[0],C=T,L=!!A;if(v==="placeholder"){o.push([i.generateLocator(f,"placeholder",C,{exact:L})]);continue}if(v==="alt"){o.push([i.generateLocator(f,"alt",C,{exact:L})]);continue}if(v==="title"){o.push([i.generateLocator(f,"title",C,{exact:L})]);continue}}if(h.name==="internal:control"&&h.body==="enter-frame"){const w=o[o.length-1],v=a[d-1],T=w.map(A=>i.chainLocators([A,i.generateLocator(f,"frame","")]));["xpath","css"].includes(v.name)&&T.push(i.generateLocator(f,"frame-locator",Rn({parts:[v]})),i.generateLocator(f,"frame-locator",Rn({parts:[v]},!0))),w.splice(0,w.length,...T),c="frame-locator";continue}const y=a[d+1],m=Rn({parts:[h]}),_=i.generateLocator(f,"default",m);if(y&&["internal:has-text","internal:has-not-text"].includes(y.name)){const{exact:w,text:v}=Va(y.body);if(!w){const T=i.generateLocator("locator",y.name==="internal:has-text"?"has-text":"has-not-text",v,{exact:w}),A={};y.name==="internal:has-text"?A.hasText=v:A.hasNotText=v;const C=i.generateLocator(f,"default",m,A);o.push([i.chainLocators([_,T]),C]),d++;continue}}let b;if(["xpath","css"].includes(h.name)){const w=Rn({parts:[h]},!0);b=i.generateLocator(f,"default",w)}o.push([_,b].filter(Boolean))}return Qx(i,o,s)}function Qx(i,e,t){const s=e.map(()=>""),a=[],o=c=>{if(c===e.length)return a.push(i.chainLocators(s)),a.length<t;for(const d of e[c])if(s[c]=d,!o(c+1))return!1;return!0};return o(0),a}function Va(i){let e=!1;const t=i.match(/^\/(.*)\/([igm]*)$/);return t?{text:new RegExp(t[1],t[2])}:(i.endsWith('"')?(i=JSON.parse(i),e=!0):i.endsWith('"s')?(i=JSON.parse(i.substring(0,i.length-1)),e=!0):i.endsWith('"i')&&(i=JSON.parse(i.substring(0,i.length-1)),e=!1),{exact:e,text:i})}class eT{constructor(e){this.preferredQuote=e}generateLocator(e,t,s,a={}){switch(t){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, { hasText: ${this.toHasText(a.hasText)} })`:a.hasNotText!==void 0?`locator(${this.quote(s)}, { hasNotText: ${this.toHasText(a.hasNotText)} })`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${s==="true"?"true":"false"} })`;case"role":const o=[];Ke(a.name)?o.push(`name: ${this.regexToSourceString(a.name)}`):typeof a.name=="string"&&(o.push(`name: ${this.quote(a.name)}`),a.exact&&o.push("exact: true"));for(const{name:d,value:h}of a.attrs)o.push(`${d}: ${typeof h=="string"?this.quote(h):h}`);const c=o.length?`, { ${o.join(", ")} }`:"";return`getByRole(${this.quote(s)}${c})`;case"has-text":return`filter({ hasText: ${this.toHasText(s)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(s)} })`;case"has":return`filter({ has: page.${s} })`;case"hasNot":return`filter({ hasNot: page.${s} })`;case"and":return`and(page.${s})`;case"or":return`or(page.${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("getByText",s,!!a.exact);case"alt":return this.toCallWithExact("getByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact("getByLabel",s,!!a.exact);case"title":return this.toCallWithExact("getByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return Oc(String(e))}toCallWithExact(e,t,s){return Ke(t)?`${e}(${this.regexToSourceString(t)})`:s?`${e}(${this.quote(t)}, { exact: true })`:`${e}(${this.quote(t)})`}toHasText(e){return Ke(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return Ke(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return Lc(e,this.preferredQuote??"'")}}class tT{generateLocator(e,t,s,a={}){switch(t){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, has_text=${this.toHasText(a.hasText)})`:a.hasNotText!==void 0?`locator(${this.quote(s)}, has_not_text=${this.toHasText(a.hasNotText)})`:`locator(${this.quote(s)})`;case"frame-locator":return`frame_locator(${this.quote(s)})`;case"frame":return"content_frame";case"nth":return`nth(${s})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${s==="true"?"True":"False"})`;case"role":const o=[];Ke(a.name)?o.push(`name=${this.regexToString(a.name)}`):typeof a.name=="string"&&(o.push(`name=${this.quote(a.name)}`),a.exact&&o.push("exact=True"));for(const{name:d,value:h}of a.attrs){let f=typeof h=="string"?this.quote(h):h;typeof h=="boolean"&&(f=h?"True":"False"),o.push(`${o0(d)}=${f}`)}const c=o.length?`, ${o.join(", ")}`:"";return`get_by_role(${this.quote(s)}${c})`;case"has-text":return`filter(has_text=${this.toHasText(s)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(s)})`;case"has":return`filter(has=page.${s})`;case"hasNot":return`filter(has_not=page.${s})`;case"and":return`and_(page.${s})`;case"or":return`or_(page.${s})`;case"chain":return`locator(${s})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("get_by_text",s,!!a.exact);case"alt":return this.toCallWithExact("get_by_alt_text",s,!!a.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",s,!!a.exact);case"label":return this.toCallWithExact("get_by_label",s,!!a.exact);case"title":return this.toCallWithExact("get_by_title",s,!!a.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToString(e){const t=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${Oc(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${t})`}toCallWithExact(e,t,s){return Ke(t)?`${e}(${this.regexToString(t)})`:s?`${e}(${this.quote(t)}, exact=True)`:`${e}(${this.quote(t)})`}toHasText(e){return Ke(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return Ke(e)?this.regexToString(e):this.quote(e)}quote(e){return Lc(e,'"')}}class nT{generateLocator(e,t,s,a={}){let o;switch(e){case"page":o="Page";break;case"frame-locator":o="FrameLocator";break;case"locator":o="Locator";break}switch(t){case"default":return a.hasText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(a.hasText)}))`:a.hasNotText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(a.hasNotText)}))`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${o}.FilterOptions().setVisible(${s==="true"?"true":"false"}))`;case"role":const c=[];Ke(a.name)?c.push(`.setName(${this.regexToString(a.name)})`):typeof a.name=="string"&&(c.push(`.setName(${this.quote(a.name)})`),a.exact&&c.push(".setExact(true)"));for(const{name:h,value:f}of a.attrs)c.push(`.set${vc(h)}(${typeof f=="string"?this.quote(f):f})`);const d=c.length?`, new ${o}.GetByRoleOptions()${c.join("")}`:"";return`getByRole(AriaRole.${o0(s).toUpperCase()}${d})`;case"has-text":return`filter(new ${o}.FilterOptions().setHasText(${this.toHasText(s)}))`;case"has-not-text":return`filter(new ${o}.FilterOptions().setHasNotText(${this.toHasText(s)}))`;case"has":return`filter(new ${o}.FilterOptions().setHas(page.${s}))`;case"hasNot":return`filter(new ${o}.FilterOptions().setHasNot(page.${s}))`;case"and":return`and(page.${s})`;case"or":return`or(page.${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact(o,"getByText",s,!!a.exact);case"alt":return this.toCallWithExact(o,"getByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact(o,"getByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact(o,"getByLabel",s,!!a.exact);case"title":return this.toCallWithExact(o,"getByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToString(e){const t=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(Oc(e.source))}${t})`}toCallWithExact(e,t,s,a){return Ke(s)?`${t}(${this.regexToString(s)})`:a?`${t}(${this.quote(s)}, new ${e}.${vc(t)}Options().setExact(true))`:`${t}(${this.quote(s)})`}toHasText(e){return Ke(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return Ke(e)?this.regexToString(e):this.quote(e)}quote(e){return Lc(e,'"')}}class iT{generateLocator(e,t,s,a={}){switch(t){case"default":return a.hasText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasText(a.hasText)} })`:a.hasNotText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasNotText(a.hasNotText)} })`:`Locator(${this.quote(s)})`;case"frame-locator":return`FrameLocator(${this.quote(s)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${s})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${s==="true"?"true":"false"} })`;case"role":const o=[];Ke(a.name)?o.push(`NameRegex = ${this.regexToString(a.name)}`):typeof a.name=="string"&&(o.push(`Name = ${this.quote(a.name)}`),a.exact&&o.push("Exact = true"));for(const{name:d,value:h}of a.attrs)o.push(`${vc(d)} = ${typeof h=="string"?this.quote(h):h}`);const c=o.length?`, new() { ${o.join(", ")} }`:"";return`GetByRole(AriaRole.${vc(s)}${c})`;case"has-text":return`Filter(new() { ${this.toHasText(s)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(s)} })`;case"has":return`Filter(new() { Has = Page.${s} })`;case"hasNot":return`Filter(new() { HasNot = Page.${s} })`;case"and":return`And(Page.${s})`;case"or":return`Or(Page.${s})`;case"chain":return`Locator(${s})`;case"test-id":return`GetByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("GetByText",s,!!a.exact);case"alt":return this.toCallWithExact("GetByAltText",s,!!a.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",s,!!a.exact);case"label":return this.toCallWithExact("GetByLabel",s,!!a.exact);case"title":return this.toCallWithExact("GetByTitle",s,!!a.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToString(e){const t=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(Oc(e.source))}${t})`}toCallWithExact(e,t,s){return Ke(t)?`${e}(${this.regexToString(t)})`:s?`${e}(${this.quote(t)}, new() { Exact = true })`:`${e}(${this.quote(t)})`}toHasText(e){return Ke(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return Ke(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return Ke(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return Lc(e,'"')}}class sT{generateLocator(e,t,s,a={}){return JSON.stringify({kind:t,body:ac(s),options:rT(a)})}chainLocators(e){const t=e.map(s=>JSON.parse(s));for(let s=0;s<t.length-1;++s)t[s].next=t[s+1];return JSON.stringify(t[0])}}function ac(i){return Ke(i)?`/${i.source}/${i.flags}`:i}function rT(i){const e={...i};return Ke(e.name)&&(e.name=ac(e.name)),Ke(e.hasText)&&(e.hasText=ac(e.hasText)),Ke(e.hasNotText)&&(e.hasNotText=ac(e.hasNotText)),e}const u0={javascript:eT,python:tT,java:nT,csharp:iT,jsonl:sT};function Ke(i){return i instanceof RegExp}const D_=new Map;function aT({name:i,rootItem:e,render:t,title:s,icon:a,isError:o,isVisible:c,selectedItem:d,onAccepted:h,onSelected:f,onHighlighted:y,treeState:m,setTreeState:_,noItemsMessage:b,dataTestId:w,autoExpandDepth:v}){const T=P.useMemo(()=>oT(e,d,m.expandedItems,v||0,c),[e,d,m,v,c]),A=P.useRef(null),[C,L]=P.useState(),[j,D]=P.useState(!1);P.useEffect(()=>{y==null||y(C)},[y,C]),P.useEffect(()=>{const q=A.current;if(!q)return;const O=()=>{D_.set(i,q.scrollTop)};return q.addEventListener("scroll",O,{passive:!0}),()=>q.removeEventListener("scroll",O)},[i]),P.useEffect(()=>{A.current&&(A.current.scrollTop=D_.get(i)||0)},[i]);const F=P.useCallback(q=>{const{expanded:O}=T.get(q);if(O){for(let Q=d;Q;Q=Q.parent)if(Q===q){f==null||f(q);break}m.expandedItems.set(q.id,!1)}else m.expandedItems.set(q.id,!0);_({...m})},[T,d,f,m,_]),B=P.useCallback(q=>{const{expanded:O}=T.get(q),Q=[q];for(;Q.length;){const se=Q.pop();Q.push(...se.children),m.expandedItems.set(se.id,!O)}_({...m})},[T,m,_]);return x.jsx("div",{className:We("tree-view vbox",i+"-tree-view"),"data-testid":w||i+"-tree",children:x.jsxs("div",{className:We("tree-view-content"),role:T.size>0?"tree":void 0,tabIndex:0,onKeyDown:q=>{if(d&&q.key==="Enter"){h==null||h(d);return}if(q.key!=="ArrowDown"&&q.key!=="ArrowUp"&&q.key!=="ArrowLeft"&&q.key!=="ArrowRight")return;if(q.stopPropagation(),q.preventDefault(),d&&q.key==="ArrowLeft"){const{expanded:Q,parent:se}=T.get(d);Q?(m.expandedItems.set(d.id,!1),_({...m})):se&&(f==null||f(se));return}if(d&&q.key==="ArrowRight"){d.children.length&&(m.expandedItems.set(d.id,!0),_({...m}));return}let O=d;if(q.key==="ArrowDown"&&(d?O=T.get(d).next:T.size&&(O=[...T.keys()][0])),q.key==="ArrowUp"){if(d)O=T.get(d).prev;else if(T.size){const Q=[...T.keys()];O=Q[Q.length-1]}}y==null||y(void 0),O&&(D(!0),f==null||f(O)),L(void 0)},ref:A,children:[b&&T.size===0&&x.jsx("div",{className:"tree-view-empty",children:b}),e.children.map(q=>T.get(q)&&x.jsx(d0,{item:q,treeItems:T,selectedItem:d,onSelected:f,onAccepted:h,isError:o,toggleExpanded:F,toggleSubtree:B,highlightedItem:C,setHighlightedItem:L,render:t,icon:a,title:s,isKeyboardNavigation:j,setIsKeyboardNavigation:D},q.id))]})})}function d0({item:i,treeItems:e,selectedItem:t,onSelected:s,highlightedItem:a,setHighlightedItem:o,isError:c,onAccepted:d,toggleExpanded:h,toggleSubtree:f,render:y,title:m,icon:_,isKeyboardNavigation:b,setIsKeyboardNavigation:w}){const v=P.useId(),T=P.useRef(null);P.useEffect(()=>{t===i&&b&&T.current&&(Lb(T.current),w(!1))},[i,t,b,w]);const A=e.get(i),C=A.depth,L=A.expanded;let j="codicon-blank";typeof L=="boolean"&&(j=L?"codicon-chevron-down":"codicon-chevron-right");const D=y(i),F=L&&i.children.length?i.children:[],B=m==null?void 0:m(i),q=(_==null?void 0:_(i))||"codicon-blank";return x.jsxs("div",{ref:T,role:"treeitem","aria-selected":i===t,"aria-expanded":L,"aria-controls":v,title:B,className:"vbox",style:{flex:"none"},children:[x.jsxs("div",{onDoubleClick:()=>d==null?void 0:d(i),className:We("tree-view-entry",t===i&&"selected",a===i&&"highlighted",(c==null?void 0:c(i))&&"error"),onClick:()=>s==null?void 0:s(i),onMouseEnter:()=>o(i),onMouseLeave:()=>o(void 0),children:[C?new Array(C).fill(0).map((O,Q)=>x.jsx("div",{className:"tree-view-indent"},"indent-"+Q)):void 0,x.jsx("div",{"aria-hidden":"true",className:"codicon "+j,style:{minWidth:16,marginRight:4},onDoubleClick:O=>{O.preventDefault(),O.stopPropagation()},onClick:O=>{O.stopPropagation(),O.preventDefault(),O.altKey?f(i):h(i)}}),_&&x.jsx("div",{className:"codicon "+q,style:{minWidth:16,marginRight:4},"aria-label":"["+q.replace("codicon","icon")+"]"}),typeof D=="string"?x.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:D}):D]}),!!F.length&&x.jsx("div",{id:v,role:"group",children:F.map(O=>e.get(O)&&x.jsx(d0,{item:O,treeItems:e,selectedItem:t,onSelected:s,onAccepted:d,isError:c,toggleExpanded:h,toggleSubtree:f,highlightedItem:a,setHighlightedItem:o,render:y,title:m,icon:_,isKeyboardNavigation:b,setIsKeyboardNavigation:w},O.id))})]})}function oT(i,e,t,s,a=()=>!0){if(!a(i))return new Map;const o=new Map,c=new Set;for(let f=e==null?void 0:e.parent;f;f=f.parent)c.add(f.id);let d=null;const h=(f,y)=>{for(const m of f.children){if(!a(m))continue;const _=c.has(m.id)||t.get(m.id),b=s>y&&o.size<25&&_!==!1,w=m.children.length?_??b:void 0,v={depth:y,expanded:w,parent:i===f?null:f,next:null,prev:d};d&&(o.get(d).next=m),d=m,o.set(m,v),w&&h(m,y+1)}};return h(i,0),o}const qt=P.forwardRef(function({children:e,title:t="",icon:s,disabled:a=!1,toggled:o=!1,onClick:c=()=>{},style:d,testId:h,className:f,ariaLabel:y},m){return x.jsxs("button",{ref:m,className:We(f,"toolbar-button",s,o&&"toggled"),onMouseDown:L_,onClick:c,onDoubleClick:L_,title:t,disabled:!!a,style:d,"data-testid":h,"aria-label":y||t,children:[s&&x.jsx("span",{className:`codicon codicon-${s}`,style:e?{marginRight:5}:{}}),e]})}),L_=i=>{i.stopPropagation(),i.preventDefault()};function h0(i){return i==="scheduled"?"codicon-clock":i==="running"?"codicon-loading":i==="failed"?"codicon-error":i==="passed"?"codicon-check":i==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function lT(i){return i==="scheduled"?"Pending":i==="running"?"Running":i==="failed"?"Failed":i==="passed"?"Passed":i==="skipped"?"Skipped":"Did not run"}const cT=aT,uT=({actions:i,selectedAction:e,selectedTime:t,setSelectedTime:s,treeState:a,setTreeState:o,sdkLanguage:c,onSelected:d,onHighlighted:h,revealConsole:f,revealActionAttachment:y,isLive:m})=>{const{rootItem:_,itemMap:b}=P.useMemo(()=>Ib(i),[i]),{selectedItem:w}=P.useMemo(()=>({selectedItem:e?b.get(e.callId):void 0}),[b,e]),v=P.useCallback(D=>{var F;return!!((F=D.action.error)!=null&&F.message)},[]),T=P.useCallback(D=>s({minimum:D.action.startTime,maximum:D.action.endTime}),[s]),A=P.useCallback(D=>{var B;const F=!!y&&!!((B=D.action.attachments)!=null&&B.length);return Cf(D.action,{sdkLanguage:c,revealConsole:f,revealActionAttachment:()=>y==null?void 0:y(D.action.callId),isLive:m,showDuration:!0,showBadges:!0,showAttachments:F})},[m,f,y,c]),C=P.useCallback(D=>!t||!D.action||D.action.startTime<=t.maximum&&D.action.endTime>=t.minimum,[t]),L=P.useCallback(D=>{d==null||d(D.action)},[d]),j=P.useCallback(D=>{h==null||h(D==null?void 0:D.action)},[h]);return x.jsxs("div",{className:"vbox",children:[t&&x.jsxs("div",{className:"action-list-show-all",onClick:()=>s(void 0),children:[x.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),x.jsx(cT,{name:"actions",rootItem:_,treeState:a,setTreeState:o,selectedItem:w,onSelected:L,onHighlighted:j,onAccepted:T,isError:v,isVisible:C,render:A})]})},Cf=(i,e)=>{var T;const{sdkLanguage:t,revealConsole:s,revealActionAttachment:a,isLive:o,showDuration:c,showBadges:d,showAttachments:h}=e,{errors:f,warnings:y}=Tx(i),m=i.params.selector?Wx(t||"javascript",i.params.selector):void 0,_=i.class==="Test"&&i.method==="test.step"&&((T=i.annotations)==null?void 0:T.some(A=>A.type==="skip"));let b="";i.endTime?b=kt(i.endTime-i.startTime):i.error?b="Timed out":o||(b="-");const{elements:w,title:v}=f0(i);return x.jsxs("div",{className:"action-title vbox",children:[x.jsxs("div",{className:"hbox",children:[x.jsx("span",{className:"action-title-method",title:v,children:w}),(c||d||h||_)&&x.jsx("div",{className:"spacer"}),h&&x.jsx(qt,{icon:"attach",title:"Open Attachment",onClick:()=>a==null?void 0:a()}),c&&!_&&x.jsx("div",{className:"action-duration",children:b||x.jsx("span",{className:"codicon codicon-loading"})}),_&&x.jsx("span",{className:We("action-skipped","codicon",h0("skipped")),title:"skipped"}),d&&x.jsxs("div",{className:"action-icons",onClick:()=>s==null?void 0:s(),children:[!!f&&x.jsxs("div",{className:"action-icon",children:[x.jsx("span",{className:"codicon codicon-error"}),x.jsx("span",{className:"action-icon-value",children:f})]}),!!y&&x.jsxs("div",{className:"action-icon",children:[x.jsx("span",{className:"codicon codicon-warning"}),x.jsx("span",{className:"action-icon-value",children:y})]})]})]}),m&&x.jsx("div",{className:"action-title-selector",title:m,children:m})]})};function f0(i){var d;let e=i.title??((d=wf.get(i.class+"."+i.method))==null?void 0:d.title)??i.method;e=e.replace(/\n/g," ");const t=[],s=[];let a=0;const o=/\{([^}]+)\}/g;let c;for(;(c=o.exec(e))!==null;){const[h,f]=c,y=e.slice(a,c.index);t.push(y),s.push(y);const m=Hb(i.params,f);m===void 0?(t.push(h),s.push(h)):c.index===0?(t.push(m),s.push(m)):(t.push(x.jsx("span",{className:"action-title-param",children:m},t.length)),s.push(m)),a=c.index+h.length}if(a<e.length){const h=e.slice(a);t.push(h),s.push(h)}return{elements:t,title:s.join("")}}const kf=({value:i,description:e})=>{const[t,s]=P.useState("copy"),a=P.useCallback(()=>{(typeof i=="function"?i():Promise.resolve(i)).then(c=>{navigator.clipboard.writeText(c).then(()=>{s("check"),setTimeout(()=>{s("copy")},3e3)},()=>{s("close")})},()=>{s("close")})},[i]);return x.jsx(qt,{title:e||"Copy",icon:t,onClick:a})},oc=({value:i,description:e,copiedDescription:t=e,style:s})=>{const[a,o]=P.useState(!1),c=P.useCallback(async()=>{const d=typeof i=="function"?await i():i;await navigator.clipboard.writeText(d),o(!0),setTimeout(()=>o(!1),3e3)},[i]);return x.jsx(qt,{style:s,title:e,onClick:c,className:"copy-to-clipboard-text-button",children:a?t:e})},As=({text:i})=>x.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:i}),dT=({action:i,startTimeOffset:e,sdkLanguage:t})=>{const s=P.useMemo(()=>Object.keys((i==null?void 0:i.params)??{}).filter(d=>d!=="info"),[i]);if(!i)return x.jsx(As,{text:"No action selected"});const a=i.startTime-e,o=kt(a),{title:c}=f0(i);return x.jsxs("div",{className:"call-tab",children:[x.jsx("div",{className:"call-line",children:c}),x.jsx("div",{className:"call-section",children:"Time"}),Fl({name:"start",type:"literal",text:o}),Fl({name:"duration",type:"literal",text:hT(i)}),!!s.length&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"call-section",children:"Parameters"}),s.map(d=>Fl(O_(i,d,i.params[d],t)))]}),!!i.result&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(i.result).map(d=>Fl(O_(i,d,i.result[d],t)))]})]})};function hT(i){return i.endTime?kt(i.endTime-i.startTime):i.error?"Timed Out":"Running"}function Fl(i){let e=i.text.replace(/\n/g,"↵");return i.type==="string"&&(e=`"${e}"`),x.jsxs("div",{className:"call-line",children:[i.name,":",x.jsx("span",{className:We("call-value",i.type),title:i.text,children:e}),["literal","string","number","object","locator"].includes(i.type)&&x.jsx(kf,{value:i.text})]},i.name)}function O_(i,e,t,s){const a=i.method.includes("eval")||i.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&a)&&(t=wc(t.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&a||e==="received"&&i.method==="expect")&&(t=wc(t,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:qi(s||"javascript",i.params.selector),type:"locator",name:"locator"};const o=typeof t;return o!=="object"||t===null?{text:String(t),type:o,name:e}:t.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(t).slice(0,1e3),type:"object",name:e}}function wc(i,e){if(i.n!==void 0)return i.n;if(i.s!==void 0)return i.s;if(i.b!==void 0)return i.b;if(i.v!==void 0){if(i.v==="undefined")return;if(i.v==="null")return null;if(i.v==="NaN")return NaN;if(i.v==="Infinity")return 1/0;if(i.v==="-Infinity")return-1/0;if(i.v==="-0")return-0}if(i.d!==void 0)return new Date(i.d);if(i.r!==void 0)return new RegExp(i.r.p,i.r.f);if(i.a!==void 0)return i.a.map(t=>wc(t,e));if(i.o!==void 0){const t={};for(const{k:s,v:a}of i.o)t[s]=wc(a,e);return t}return i.h!==void 0?e===void 0?"<object>":e[i.h]:"<object>"}const R_=new Map;function Rc({name:i,items:e=[],id:t,render:s,icon:a,isError:o,isWarning:c,isInfo:d,selectedItem:h,onAccepted:f,onSelected:y,onHighlighted:m,onIconClicked:_,noItemsMessage:b,dataTestId:w,notSelectable:v,ariaLabel:T}){const A=P.useRef(null),[C,L]=P.useState();return P.useEffect(()=>{m==null||m(C)},[m,C]),P.useEffect(()=>{const j=A.current;if(!j)return;const D=()=>{R_.set(i,j.scrollTop)};return j.addEventListener("scroll",D,{passive:!0}),()=>j.removeEventListener("scroll",D)},[i]),P.useEffect(()=>{A.current&&(A.current.scrollTop=R_.get(i)||0)},[i]),x.jsx("div",{className:We("list-view vbox",i+"-list-view"),role:e.length>0?"list":void 0,"aria-label":T,children:x.jsxs("div",{className:We("list-view-content",v&&"not-selectable"),tabIndex:0,onKeyDown:j=>{var q;if(h&&j.key==="Enter"){f==null||f(h,e.indexOf(h));return}if(j.key!=="ArrowDown"&&j.key!=="ArrowUp")return;j.stopPropagation(),j.preventDefault();const D=h?e.indexOf(h):-1;let F=D;j.key==="ArrowDown"&&(D===-1?F=0:F=Math.min(D+1,e.length-1)),j.key==="ArrowUp"&&(D===-1?F=e.length-1:F=Math.max(D-1,0));const B=(q=A.current)==null?void 0:q.children.item(F);Lb(B||void 0),m==null||m(void 0),y==null||y(e[F],F),L(void 0)},ref:A,children:[b&&e.length===0&&x.jsx("div",{className:"list-view-empty",children:b}),e.map((j,D)=>{const F=s(j,D);return x.jsxs("div",{onDoubleClick:()=>f==null?void 0:f(j,D),role:"listitem",className:We("list-view-entry",h===j&&"selected",!v&&C===j&&"highlighted",(o==null?void 0:o(j,D))&&"error",(c==null?void 0:c(j,D))&&"warning",(d==null?void 0:d(j,D))&&"info"),"aria-selected":h===j,onClick:()=>y==null?void 0:y(j,D),onMouseEnter:()=>L(j),onMouseLeave:()=>L(void 0),children:[a&&x.jsx("div",{className:"codicon "+(a(j,D)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:B=>{B.preventDefault(),B.stopPropagation()},onClick:B=>{B.stopPropagation(),B.preventDefault(),_==null||_(j,D)}}),typeof F=="string"?x.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:F}):F]},(t==null?void 0:t(j,D))||D)})]})})}const fT=Rc,gT=({action:i,isLive:e})=>{const t=P.useMemo(()=>{var c;if(!i||!i.log.length)return[];const s=i.log,a=i.context.wallTime-i.context.startTime,o=[];for(let d=0;d<s.length;++d){let h="";if(s[d].time!==-1){const f=(c=s[d])==null?void 0:c.time;d+1<s.length?h=kt(s[d+1].time-f):i.endTime>0?h=kt(i.endTime-f):e?h=kt(Date.now()-a-f):h="-"}o.push({message:s[d].message,time:h})}return o},[i,e]);return t.length?x.jsx(fT,{name:"log",ariaLabel:"Log entries",items:t,render:s=>x.jsxs("div",{className:"log-list-item",children:[x.jsx("span",{className:"log-list-duration",children:s.time}),s.message]}),notSelectable:!0}):x.jsx(As,{text:"No log entries"})};function mo(i,e){const t=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,s=[];let a,o={},c=!1,d=e==null?void 0:e.fg,h=e==null?void 0:e.bg;for(;(a=t.exec(i))!==null;){const[,,f,,y]=a;if(f){const m=+f;switch(m){case 0:o={};break;case 1:o["font-weight"]="bold";break;case 2:o.opacity="0.8";break;case 3:o["font-style"]="italic";break;case 4:o["text-decoration"]="underline";break;case 7:c=!0;break;case 8:o.display="none";break;case 9:o["text-decoration"]="line-through";break;case 22:delete o["font-weight"],delete o["font-style"],delete o.opacity,delete o["text-decoration"];break;case 23:delete o["font-weight"],delete o["font-style"],delete o.opacity;break;case 24:delete o["text-decoration"];break;case 27:c=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:d=j_[m-30];break;case 39:d=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:h=j_[m-40];break;case 49:h=e==null?void 0:e.bg;break;case 53:o["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:d=H_[m-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:h=H_[m-100];break}}else if(y){const m={...o},_=c?h:d;_!==void 0&&(m.color=_);const b=c?d:h;b!==void 0&&(m["background-color"]=b),s.push(`<span style="${mT(m)}">${pT(y)}</span>`)}}return s.join("")}const j_={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)"},H_={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 pT(i){return i.replace(/[&"<>]/g,e=>({"&":"&",'"':""","<":"<",">":">"})[e])}function mT(i){return Object.entries(i).map(([e,t])=>`${e}: ${t}`).join("; ")}const yT=({error:i})=>{const e=P.useMemo(()=>mo(i),[i]);return x.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},g0=({cursor:i,onPaneMouseMove:e,onPaneMouseUp:t,onPaneDoubleClick:s})=>(bt.useEffect(()=>{const a=document.createElement("div");return a.style.position="fixed",a.style.top="0",a.style.right="0",a.style.bottom="0",a.style.left="0",a.style.zIndex="9999",a.style.cursor=i,document.body.appendChild(a),e&&a.addEventListener("mousemove",e),t&&a.addEventListener("mouseup",t),s&&document.body.addEventListener("dblclick",s),()=>{e&&a.removeEventListener("mousemove",e),t&&a.removeEventListener("mouseup",t),s&&document.body.removeEventListener("dblclick",s),document.body.removeChild(a)}},[i,e,t,s]),x.jsx(x.Fragment,{})),_T={position:"absolute",top:0,right:0,bottom:0,left:0},p0=({orientation:i,offsets:e,setOffsets:t,resizerColor:s,resizerWidth:a,minColumnWidth:o})=>{const c=o||0,[d,h]=bt.useState(null),[f,y]=Es(),m={position:"absolute",right:i==="horizontal"?void 0:0,bottom:i==="horizontal"?0:void 0,width:i==="horizontal"?7:void 0,height:i==="horizontal"?void 0:7,borderTopWidth:i==="horizontal"?void 0:(7-a)/2,borderRightWidth:i==="horizontal"?(7-a)/2:void 0,borderBottomWidth:i==="horizontal"?void 0:(7-a)/2,borderLeftWidth:i==="horizontal"?(7-a)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:i==="horizontal"?"ew-resize":"ns-resize"};return x.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-a)/2,zIndex:100,pointerEvents:"none"},ref:y,children:[!!d&&x.jsx(g0,{cursor:i==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>h(null),onPaneMouseMove:_=>{if(!_.buttons)h(null);else if(d){const b=i==="horizontal"?_.clientX-d.clientX:_.clientY-d.clientY,w=d.offset+b,v=d.index>0?e[d.index-1]:0,T=i==="horizontal"?f.width:f.height,A=Math.min(Math.max(v+c,w),T-c)-e[d.index];for(let C=d.index;C<e.length;++C)e[C]=e[C]+A;t([...e])}}}),e.map((_,b)=>x.jsx("div",{style:{...m,top:i==="horizontal"?0:_,left:i==="horizontal"?_:0,pointerEvents:"initial"},onMouseDown:w=>h({clientX:w.clientX,clientY:w.clientY,offset:_,index:b}),children:x.jsx("div",{style:{..._T,background:s}})},b))]})};async function Eh(i){const e=new Image;return i&&(e.src=i,await new Promise((t,s)=>{e.onload=t,e.onerror=t})),e}const ef={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
|
|
53
53
|
linear-gradient(-45deg, #80808020 25%, transparent 25%),
|
|
54
54
|
linear-gradient(45deg, transparent 75%, #80808020 75%),
|
|
55
55
|
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,
|
|
56
56
|
rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
|
|
57
57
|
rgb(0 0 0 / 10%) 0px -2px 4px,
|
|
58
58
|
rgb(0 0 0 / 15%) 0px -6.1px 12px,
|
|
59
|
-
rgb(0 0 0 / 25%) 0px 6px 12px`},bT=({diff:i,noTargetBlank:e,hideDetails:t})=>{const[s,a]=P.useState(i.diff?"diff":"actual"),[o,c]=P.useState(!1),[d,h]=P.useState(null),[f,y]=P.useState("Expected"),[m,_]=P.useState(null),[b,x]=P.useState(null),[v,T]=Es();P.useEffect(()=>{(async()=>{var O,Q,se,Y;h(await Eh((O=i.expected)==null?void 0:O.attachment.path)),y(((Q=i.expected)==null?void 0:Q.title)||"Expected"),_(await Eh((se=i.actual)==null?void 0:se.attachment.path)),x(await Eh((Y=i.diff)==null?void 0:Y.attachment.path))})()},[i]);const A=d&&m&&b,C=A?Math.max(d.naturalWidth,m.naturalWidth,200):500,L=A?Math.max(d.naturalHeight,m.naturalHeight,200):500,j=Math.min(1,(v.width-30)/C),D=Math.min(1,(v.width-50)/C/2),F=C*j,B=L*j,q={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:T,children:A&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[i.diff&&w.jsx("div",{style:{...q,fontWeight:s==="diff"?600:"initial"},onClick:()=>a("diff"),children:"Diff"}),w.jsx("div",{style:{...q,fontWeight:s==="actual"?600:"initial"},onClick:()=>a("actual"),children:"Actual"}),w.jsx("div",{style:{...q,fontWeight:s==="expected"?600:"initial"},onClick:()=>a("expected"),children:f}),w.jsx("div",{style:{...q,fontWeight:s==="sxs"?600:"initial"},onClick:()=>a("sxs"),children:"Side by side"}),w.jsx("div",{style:{...q,fontWeight:s==="slider"?600:"initial"},onClick:()=>a("slider"),children:"Slider"})]}),w.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:B+60},children:[i.diff&&s==="diff"&&w.jsx(si,{image:b,alt:"Diff",hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),i.diff&&s==="actual"&&w.jsx(si,{image:m,alt:"Actual",hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),i.diff&&s==="expected"&&w.jsx(si,{image:d,alt:f,hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),i.diff&&s==="slider"&&w.jsx(vT,{expectedImage:d,actualImage:m,hideSize:t,canvasWidth:F,canvasHeight:B,scale:j,expectedTitle:f}),i.diff&&s==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(si,{image:d,title:f,hideSize:t,canvasWidth:D*C,canvasHeight:D*L,scale:D}),w.jsx(si,{image:o?b:m,title:o?"Diff":"Actual",onClick:()=>c(!o),hideSize:t,canvasWidth:D*C,canvasHeight:D*L,scale:D})]}),!i.diff&&s==="actual"&&w.jsx(si,{image:m,title:"Actual",hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),!i.diff&&s==="expected"&&w.jsx(si,{image:d,title:f,hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),!i.diff&&s==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(si,{image:d,title:f,canvasWidth:D*C,canvasHeight:D*L,scale:D}),w.jsx(si,{image:m,title:"Actual",canvasWidth:D*C,canvasHeight:D*L,scale:D})]})]}),!t&&w.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[w.jsx("div",{children:i.diff&&w.jsx("a",{target:"_blank",href:i.diff.attachment.path,rel:"noreferrer",children:i.diff.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:i.actual.attachment.path,rel:"noreferrer",children:i.actual.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:i.expected.attachment.path,rel:"noreferrer",children:i.expected.attachment.name})})]})]})})},vT=({expectedImage:i,actualImage:e,canvasWidth:t,canvasHeight:s,scale:a,expectedTitle:o,hideSize:c})=>{const d={position:"absolute",top:0,left:0},[h,f]=P.useState(t/2),y=i.naturalWidth===e.naturalWidth&&i.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:[!y&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),w.jsx("span",{children:i.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:i.naturalHeight}),!y&&w.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!y&&w.jsx("span",{children:e.naturalWidth}),!y&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!y&&w.jsx("span",{children:e.naturalHeight})]}),w.jsxs("div",{style:{position:"relative",width:t,height:s,margin:15,...ef},children:[w.jsx(p0,{orientation:"horizontal",offsets:[h],setOffsets:m=>f(m[0]),resizerColor:"#57606a80",resizerWidth:6}),w.jsx("img",{alt:o,style:{width:i.naturalWidth*a,height:i.naturalHeight*a},draggable:"false",src:i.src}),w.jsx("div",{style:{...d,bottom:0,overflow:"hidden",width:h,...ef},children:w.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*a,height:e.naturalHeight*a},draggable:"false",src:e.src})})]})]})},si=({image:i,title:e,alt:t,hideSize:s,canvasWidth:a,canvasHeight:o,scale:c,onClick:d})=>w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!s&&w.jsxs("div",{style:{margin:5},children:[e&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),w.jsx("span",{children:i.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:i.naturalHeight})]}),w.jsx("div",{style:{display:"flex",flex:"none",width:a,height:o,margin:15,...ef},children:w.jsx("img",{width:i.naturalWidth*c,height:i.naturalHeight*c,alt:e||t,style:{cursor:d?"pointer":"initial"},draggable:"false",src:i.src,onClick:d})})]}),ST="modulepreload",wT=function(i,e){return new URL(i,e).href},z_={},xT=function(e,t,s){let a=Promise.resolve();if(t&&t.length>0){let c=function(y){return Promise.all(y.map(m=>Promise.resolve(m).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};const d=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),f=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));a=c(t.map(y=>{if(y=wT(y,s),y in z_)return;z_[y]=!0;const m=y.endsWith(".css"),_=m?'[rel="stylesheet"]':"";if(!!s)for(let v=d.length-1;v>=0;v--){const T=d[v];if(T.href===y&&(!m||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${_}`))return;const x=document.createElement("link");if(x.rel=m?"stylesheet":ST,m||(x.as="script"),x.crossOrigin="",x.href=y,f&&x.setAttribute("nonce",f),document.head.appendChild(x),m)return new Promise((v,T)=>{x.addEventListener("load",v),x.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${y}`)))})}))}function o(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return a.then(c=>{for(const d of c||[])d.status==="rejected"&&o(d.reason);return e().catch(o)})},TT=20,Or=({text:i,highlighter:e,mimeType:t,linkify:s,readOnly:a,highlight:o,revealLine:c,lineNumbers:d,isFocused:h,focusOnChange:f,wrapLines:y,onChange:m,dataTestId:_,placeholder:b})=>{const[x,v]=Es(),[T]=P.useState(xT(()=>import("./codeMirrorModule-B0JOjboO.js"),__vite__mapDeps([0,1]),import.meta.url).then(j=>j.default)),A=P.useRef(null),[C,L]=P.useState();return P.useEffect(()=>{(async()=>{var q,O;const j=await T;AT(j);const D=v.current;if(!D)return;const F=kT(e)||CT(t)||(s?"text/linkified":"");if(A.current&&F===A.current.cm.getOption("mode")&&!!a===A.current.cm.getOption("readOnly")&&d===A.current.cm.getOption("lineNumbers")&&y===A.current.cm.getOption("lineWrapping")&&b===A.current.cm.getOption("placeholder"))return;(O=(q=A.current)==null?void 0:q.cm)==null||O.getWrapperElement().remove();const B=j(D,{value:"",mode:F,readOnly:!!a,lineNumbers:d,lineWrapping:y,placeholder:b,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-F":"findPersistent","Cmd-F":"findPersistent"}});return A.current={cm:B},h&&B.focus(),L(B),B})()},[T,C,v,e,t,s,d,y,a,h,b]),P.useEffect(()=>{A.current&&A.current.cm.setSize(x.width,x.height)},[x]),P.useLayoutEffect(()=>{var F;if(!C)return;let j=!1;if(C.getValue()!==i&&(C.setValue(i),j=!0,f&&(C.execCommand("selectAll"),C.focus())),j||JSON.stringify(o)!==JSON.stringify(A.current.highlight)){for(const O of A.current.highlight||[])C.removeLineClass(O.line-1,"wrap");for(const O of o||[])C.addLineClass(O.line-1,"wrap",`source-line-${O.type}`);for(const O of A.current.widgets||[])C.removeLineWidget(O);for(const O of A.current.markers||[])O.clear();const B=[],q=[];for(const O of o||[]){if(O.type!=="subtle-error"&&O.type!=="error")continue;const Q=(F=A.current)==null?void 0:F.cm.getLine(O.line-1);if(Q){const se={};se.title=O.message||"",q.push(C.markText({line:O.line-1,ch:0},{line:O.line-1,ch:O.column||Q.length},{className:"source-line-error-underline",attributes:se}))}if(O.type==="error"){const se=document.createElement("div");se.innerHTML=mo(O.message||""),se.className="source-line-error-widget",B.push(C.addLineWidget(O.line,se,{above:!0,coverGutter:!1}))}}A.current.highlight=o,A.current.widgets=B,A.current.markers=q}typeof c=="number"&&A.current.cm.lineCount()>=c&&C.scrollIntoView({line:Math.max(0,c-1),ch:0},50);let D;return m&&(D=()=>m(C.getValue()),C.on("change",D)),()=>{D&&C.off("change",D)}},[C,i,o,c,f,m]),w.jsx("div",{"data-testid":_,className:"cm-wrapper",ref:v,onClick:ET})};function ET(i){var t;if(!(i.target instanceof HTMLElement))return;let e;i.target.classList.contains("cm-linkified")?e=i.target.textContent:i.target.classList.contains("cm-link")&&((t=i.target.nextElementSibling)!=null&&t.classList.contains("cm-url"))&&(e=i.target.nextElementSibling.textContent.slice(1,-1)),e&&(i.preventDefault(),i.stopPropagation(),window.open(e,"_blank"))}let $_=!1;function AT(i){$_||($_=!0,i.defineSimpleMode("text/linkified",{start:[{regex:Ob,token:"linkified"}]}))}function CT(i){if(i){if(i.includes("javascript")||i.includes("json"))return"javascript";if(i.includes("python"))return"python";if(i.includes("csharp"))return"text/x-csharp";if(i.includes("java"))return"text/x-java";if(i.includes("markdown"))return"markdown";if(i.includes("html")||i.includes("svg"))return"htmlmixed";if(i.includes("css"))return"css"}}function kT(i){if(i)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[i]}function NT(i){return!!i.match(/^(application\/json|application\/.*?\+json|text\/(x-)?json)(;\s*charset=.*)?$/)}function MT(i){return!!i.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const m0=({title:i,children:e,setExpanded:t,expanded:s,expandOnTitleClick:a,className:o})=>{const c=P.useId(),d=P.useId(),h=P.useCallback(()=>t(!s),[s,t]),f=w.jsx("div",{className:We("codicon",s?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:a?void 0:h});return w.jsxs("div",{className:We("expandable",s&&"expanded",o),children:[a?w.jsxs("div",{id:c,role:"button","aria-expanded":s,"aria-controls":d,className:"expandable-title",onClick:h,children:[f,i]}):w.jsxs("div",{className:"expandable-title",children:[f,i]}),s&&w.jsx("div",{id:d,"aria-labelledby":c,role:"region",className:"expandable-content",children:e})]})};function y0(i){const e=[];let t=0,s;for(;(s=Ob.exec(i))!==null;){const o=i.substring(t,s.index);o&&e.push(o);const c=s[0];e.push(DT(c)),t=s.index+c.length}const a=i.substring(t);return a&&e.push(a),e}function DT(i){let e=i;return e.startsWith("www.")&&(e="https://"+e),w.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:i})}const _0=P.createContext(void 0),ui=()=>P.useContext(_0),LT=({attachment:i,reveal:e})=>{const t=ui(),[s,a]=P.useState(!1),[o,c]=P.useState(null),[d,h]=P.useState(null),[f,y]=ix(),m=P.useRef(null),_=MT(i.contentType),b=!!i.sha1||!!i.path;P.useEffect(()=>{var T;if(e)return(T=m.current)==null||T.scrollIntoView({behavior:"smooth"}),y()},[e,y]),P.useEffect(()=>{s&&o===null&&d===null&&(h("Loading ..."),fetch(jc(t,i)).then(T=>T.text()).then(T=>{c(T),h(null)}).catch(T=>{h("Failed to load: "+T.message)}))},[t,s,o,d,i]);const x=P.useMemo(()=>{const T=o?o.split(`
|
|
60
|
-
`).length:0;return Math.min(Math.max(5,T),20)*TT},[o]),v=
|
|
59
|
+
rgb(0 0 0 / 25%) 0px 6px 12px`},bT=({diff:i,noTargetBlank:e,hideDetails:t})=>{const[s,a]=P.useState(i.diff?"diff":"actual"),[o,c]=P.useState(!1),[d,h]=P.useState(null),[f,y]=P.useState("Expected"),[m,_]=P.useState(null),[b,w]=P.useState(null),[v,T]=Es();P.useEffect(()=>{(async()=>{var O,Q,se,Y;h(await Eh((O=i.expected)==null?void 0:O.attachment.path)),y(((Q=i.expected)==null?void 0:Q.title)||"Expected"),_(await Eh((se=i.actual)==null?void 0:se.attachment.path)),w(await Eh((Y=i.diff)==null?void 0:Y.attachment.path))})()},[i]);const A=d&&m&&b,C=A?Math.max(d.naturalWidth,m.naturalWidth,200):500,L=A?Math.max(d.naturalHeight,m.naturalHeight,200):500,j=Math.min(1,(v.width-30)/C),D=Math.min(1,(v.width-50)/C/2),F=C*j,B=L*j,q={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return x.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:T,children:A&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[i.diff&&x.jsx("div",{style:{...q,fontWeight:s==="diff"?600:"initial"},onClick:()=>a("diff"),children:"Diff"}),x.jsx("div",{style:{...q,fontWeight:s==="actual"?600:"initial"},onClick:()=>a("actual"),children:"Actual"}),x.jsx("div",{style:{...q,fontWeight:s==="expected"?600:"initial"},onClick:()=>a("expected"),children:f}),x.jsx("div",{style:{...q,fontWeight:s==="sxs"?600:"initial"},onClick:()=>a("sxs"),children:"Side by side"}),x.jsx("div",{style:{...q,fontWeight:s==="slider"?600:"initial"},onClick:()=>a("slider"),children:"Slider"})]}),x.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:B+60},children:[i.diff&&s==="diff"&&x.jsx(si,{image:b,alt:"Diff",hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),i.diff&&s==="actual"&&x.jsx(si,{image:m,alt:"Actual",hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),i.diff&&s==="expected"&&x.jsx(si,{image:d,alt:f,hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),i.diff&&s==="slider"&&x.jsx(vT,{expectedImage:d,actualImage:m,hideSize:t,canvasWidth:F,canvasHeight:B,scale:j,expectedTitle:f}),i.diff&&s==="sxs"&&x.jsxs("div",{style:{display:"flex"},children:[x.jsx(si,{image:d,title:f,hideSize:t,canvasWidth:D*C,canvasHeight:D*L,scale:D}),x.jsx(si,{image:o?b:m,title:o?"Diff":"Actual",onClick:()=>c(!o),hideSize:t,canvasWidth:D*C,canvasHeight:D*L,scale:D})]}),!i.diff&&s==="actual"&&x.jsx(si,{image:m,title:"Actual",hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),!i.diff&&s==="expected"&&x.jsx(si,{image:d,title:f,hideSize:t,canvasWidth:F,canvasHeight:B,scale:j}),!i.diff&&s==="sxs"&&x.jsxs("div",{style:{display:"flex"},children:[x.jsx(si,{image:d,title:f,canvasWidth:D*C,canvasHeight:D*L,scale:D}),x.jsx(si,{image:m,title:"Actual",canvasWidth:D*C,canvasHeight:D*L,scale:D})]})]}),!t&&x.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[x.jsx("div",{children:i.diff&&x.jsx("a",{target:"_blank",href:i.diff.attachment.path,rel:"noreferrer",children:i.diff.attachment.name})}),x.jsx("div",{children:x.jsx("a",{target:e?"":"_blank",href:i.actual.attachment.path,rel:"noreferrer",children:i.actual.attachment.name})}),x.jsx("div",{children:x.jsx("a",{target:e?"":"_blank",href:i.expected.attachment.path,rel:"noreferrer",children:i.expected.attachment.name})})]})]})})},vT=({expectedImage:i,actualImage:e,canvasWidth:t,canvasHeight:s,scale:a,expectedTitle:o,hideSize:c})=>{const d={position:"absolute",top:0,left:0},[h,f]=P.useState(t/2),y=i.naturalWidth===e.naturalWidth&&i.naturalHeight===e.naturalHeight;return x.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!c&&x.jsxs("div",{style:{margin:5},children:[!y&&x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),x.jsx("span",{children:i.naturalWidth}),x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),x.jsx("span",{children:i.naturalHeight}),!y&&x.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!y&&x.jsx("span",{children:e.naturalWidth}),!y&&x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!y&&x.jsx("span",{children:e.naturalHeight})]}),x.jsxs("div",{style:{position:"relative",width:t,height:s,margin:15,...ef},children:[x.jsx(p0,{orientation:"horizontal",offsets:[h],setOffsets:m=>f(m[0]),resizerColor:"#57606a80",resizerWidth:6}),x.jsx("img",{alt:o,style:{width:i.naturalWidth*a,height:i.naturalHeight*a},draggable:"false",src:i.src}),x.jsx("div",{style:{...d,bottom:0,overflow:"hidden",width:h,...ef},children:x.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*a,height:e.naturalHeight*a},draggable:"false",src:e.src})})]})]})},si=({image:i,title:e,alt:t,hideSize:s,canvasWidth:a,canvasHeight:o,scale:c,onClick:d})=>x.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!s&&x.jsxs("div",{style:{margin:5},children:[e&&x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),x.jsx("span",{children:i.naturalWidth}),x.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),x.jsx("span",{children:i.naturalHeight})]}),x.jsx("div",{style:{display:"flex",flex:"none",width:a,height:o,margin:15,...ef},children:x.jsx("img",{width:i.naturalWidth*c,height:i.naturalHeight*c,alt:e||t,style:{cursor:d?"pointer":"initial"},draggable:"false",src:i.src,onClick:d})})]}),ST="modulepreload",wT=function(i,e){return new URL(i,e).href},z_={},xT=function(e,t,s){let a=Promise.resolve();if(t&&t.length>0){let c=function(y){return Promise.all(y.map(m=>Promise.resolve(m).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};const d=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),f=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));a=c(t.map(y=>{if(y=wT(y,s),y in z_)return;z_[y]=!0;const m=y.endsWith(".css"),_=m?'[rel="stylesheet"]':"";if(!!s)for(let v=d.length-1;v>=0;v--){const T=d[v];if(T.href===y&&(!m||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${_}`))return;const w=document.createElement("link");if(w.rel=m?"stylesheet":ST,m||(w.as="script"),w.crossOrigin="",w.href=y,f&&w.setAttribute("nonce",f),document.head.appendChild(w),m)return new Promise((v,T)=>{w.addEventListener("load",v),w.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${y}`)))})}))}function o(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return a.then(c=>{for(const d of c||[])d.status==="rejected"&&o(d.reason);return e().catch(o)})},TT=20,Or=({text:i,highlighter:e,mimeType:t,linkify:s,readOnly:a,highlight:o,revealLine:c,lineNumbers:d,isFocused:h,focusOnChange:f,wrapLines:y,onChange:m,dataTestId:_,placeholder:b})=>{const[w,v]=Es(),[T]=P.useState(xT(()=>import("./codeMirrorModule-B5kqh2EV.js"),__vite__mapDeps([0,1]),import.meta.url).then(j=>j.default)),A=P.useRef(null),[C,L]=P.useState();return P.useEffect(()=>{(async()=>{var q,O;const j=await T;AT(j);const D=v.current;if(!D)return;const F=kT(e)||CT(t)||(s?"text/linkified":"");if(A.current&&F===A.current.cm.getOption("mode")&&!!a===A.current.cm.getOption("readOnly")&&d===A.current.cm.getOption("lineNumbers")&&y===A.current.cm.getOption("lineWrapping")&&b===A.current.cm.getOption("placeholder"))return;(O=(q=A.current)==null?void 0:q.cm)==null||O.getWrapperElement().remove();const B=j(D,{value:"",mode:F,readOnly:!!a,lineNumbers:d,lineWrapping:y,placeholder:b,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-F":"findPersistent","Cmd-F":"findPersistent"}});return A.current={cm:B},h&&B.focus(),L(B),B})()},[T,C,v,e,t,s,d,y,a,h,b]),P.useEffect(()=>{A.current&&A.current.cm.setSize(w.width,w.height)},[w]),P.useLayoutEffect(()=>{var F;if(!C)return;let j=!1;if(C.getValue()!==i&&(C.setValue(i),j=!0,f&&(C.execCommand("selectAll"),C.focus())),j||JSON.stringify(o)!==JSON.stringify(A.current.highlight)){for(const O of A.current.highlight||[])C.removeLineClass(O.line-1,"wrap");for(const O of o||[])C.addLineClass(O.line-1,"wrap",`source-line-${O.type}`);for(const O of A.current.widgets||[])C.removeLineWidget(O);for(const O of A.current.markers||[])O.clear();const B=[],q=[];for(const O of o||[]){if(O.type!=="subtle-error"&&O.type!=="error")continue;const Q=(F=A.current)==null?void 0:F.cm.getLine(O.line-1);if(Q){const se={};se.title=O.message||"",q.push(C.markText({line:O.line-1,ch:0},{line:O.line-1,ch:O.column||Q.length},{className:"source-line-error-underline",attributes:se}))}if(O.type==="error"){const se=document.createElement("div");se.innerHTML=mo(O.message||""),se.className="source-line-error-widget",B.push(C.addLineWidget(O.line,se,{above:!0,coverGutter:!1}))}}A.current.highlight=o,A.current.widgets=B,A.current.markers=q}typeof c=="number"&&A.current.cm.lineCount()>=c&&C.scrollIntoView({line:Math.max(0,c-1),ch:0},50);let D;return m&&(D=()=>m(C.getValue()),C.on("change",D)),()=>{D&&C.off("change",D)}},[C,i,o,c,f,m]),x.jsx("div",{"data-testid":_,className:"cm-wrapper",ref:v,onClick:ET})};function ET(i){var t;if(!(i.target instanceof HTMLElement))return;let e;i.target.classList.contains("cm-linkified")?e=i.target.textContent:i.target.classList.contains("cm-link")&&((t=i.target.nextElementSibling)!=null&&t.classList.contains("cm-url"))&&(e=i.target.nextElementSibling.textContent.slice(1,-1)),e&&(i.preventDefault(),i.stopPropagation(),window.open(e,"_blank"))}let $_=!1;function AT(i){$_||($_=!0,i.defineSimpleMode("text/linkified",{start:[{regex:Ob,token:"linkified"}]}))}function CT(i){if(i){if(i.includes("javascript")||i.includes("json"))return"javascript";if(i.includes("python"))return"python";if(i.includes("csharp"))return"text/x-csharp";if(i.includes("java"))return"text/x-java";if(i.includes("markdown"))return"markdown";if(i.includes("html")||i.includes("svg"))return"htmlmixed";if(i.includes("css"))return"css"}}function kT(i){if(i)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[i]}function NT(i){return!!i.match(/^(application\/json|application\/.*?\+json|text\/(x-)?json)(;\s*charset=.*)?$/)}function MT(i){return!!i.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const m0=({title:i,children:e,setExpanded:t,expanded:s,expandOnTitleClick:a,className:o})=>{const c=P.useId(),d=P.useId(),h=P.useCallback(()=>t(!s),[s,t]),f=x.jsx("div",{className:We("codicon",s?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:a?void 0:h});return x.jsxs("div",{className:We("expandable",s&&"expanded",o),children:[a?x.jsxs("div",{id:c,role:"button","aria-expanded":s,"aria-controls":d,className:"expandable-title",onClick:h,children:[f,i]}):x.jsxs("div",{className:"expandable-title",children:[f,i]}),s&&x.jsx("div",{id:d,"aria-labelledby":c,role:"region",className:"expandable-content",children:e})]})};function y0(i){const e=[];let t=0,s;for(;(s=Ob.exec(i))!==null;){const o=i.substring(t,s.index);o&&e.push(o);const c=s[0];e.push(DT(c)),t=s.index+c.length}const a=i.substring(t);return a&&e.push(a),e}function DT(i){let e=i;return e.startsWith("www.")&&(e="https://"+e),x.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:i})}const _0=P.createContext(void 0),ui=()=>P.useContext(_0),LT=({attachment:i,reveal:e})=>{const t=ui(),[s,a]=P.useState(!1),[o,c]=P.useState(null),[d,h]=P.useState(null),[f,y]=ix(),m=P.useRef(null),_=MT(i.contentType),b=!!i.sha1||!!i.path;P.useEffect(()=>{var T;if(e)return(T=m.current)==null||T.scrollIntoView({behavior:"smooth"}),y()},[e,y]),P.useEffect(()=>{s&&o===null&&d===null&&(h("Loading ..."),fetch(jc(t,i)).then(T=>T.text()).then(T=>{c(T),h(null)}).catch(T=>{h("Failed to load: "+T.message)}))},[t,s,o,d,i]);const w=P.useMemo(()=>{const T=o?o.split(`
|
|
60
|
+
`).length:0;return Math.min(Math.max(5,T),20)*TT},[o]),v=x.jsxs("span",{style:{marginLeft:5},ref:m,"aria-label":i.name,children:[x.jsx("span",{children:y0(i.name)}),b&&x.jsx("a",{style:{marginLeft:5},href:lc(t,i),children:"download"})]});return!_||!b?x.jsx("div",{style:{marginLeft:20},children:v}):x.jsxs("div",{className:We(f&&"yellow-flash"),children:[x.jsx(m0,{title:v,expanded:s,setExpanded:a,expandOnTitleClick:!0,children:d&&x.jsx("i",{children:d})}),s&&o!==null&&x.jsx("div",{className:"vbox",style:{height:w},children:x.jsx(Or,{text:o,readOnly:!0,mimeType:i.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},OT=({revealedAttachmentCallId:i})=>{const e=ui(),{diffMap:t,screenshots:s,attachments:a}=P.useMemo(()=>{const o=new Set((e==null?void 0:e.visibleAttachments)??[]),c=new Set,d=new Map;for(const h of o){if(!h.path&&!h.sha1)continue;const f=h.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(f){const y=f[1],m=f[2],_=d.get(y)||{expected:void 0,actual:void 0,diff:void 0};_[m]=h,d.set(y,_),o.delete(h)}else h.contentType.startsWith("image/")&&(c.add(h),o.delete(h))}return{diffMap:d,attachments:o,screenshots:c}},[e]);return!t.size&&!s.size&&!a.size?x.jsx(As,{text:"No attachments"}):x.jsxs("div",{className:"attachments-tab",children:[[...t.values()].map(({expected:o,actual:c,diff:d})=>x.jsxs(x.Fragment,{children:[o&&c&&x.jsx("div",{className:"attachments-section",children:"Image diff"}),o&&c&&x.jsx(bT,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...o,path:lc(e,o)},title:"Expected"},actual:{attachment:{...c,path:lc(e,c)}},diff:d?{attachment:{...d,path:lc(e,d)}}:void 0}})]})),s.size?x.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...s.values()].map((o,c)=>{const d=jc(e,o);return x.jsxs("div",{className:"attachment-item",children:[x.jsx("div",{children:x.jsx("img",{draggable:"false",src:d})}),x.jsx("div",{children:x.jsx("a",{target:"_blank",href:d,rel:"noreferrer",children:o.name})})]},`screenshot-${c}`)}),a.size?x.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...a.values()].map((o,c)=>x.jsx("div",{className:"attachment-item",children:x.jsx(LT,{attachment:o,reveal:i&&o.callId===i.callId?i:void 0})},RT(o,c)))]})};function jc(i,e){return i&&e.sha1?i.createRelativeUrl(`sha1/${e.sha1}`):`file?path=${encodeURIComponent(e.path)}`}function lc(i,e){let t=e.contentType?`&dn=${encodeURIComponent(e.name)}`:"";return e.contentType&&(t+=`&dct=${encodeURIComponent(e.contentType)}`),jc(i,e)+t}function RT(i,e){return e+"-"+(i.sha1?"sha1-"+i.sha1:"path-"+i.path)}const jT=`
|
|
61
61
|
# Instructions
|
|
62
62
|
|
|
63
63
|
- Following Playwright test failed.
|
|
@@ -66,14 +66,14 @@ Error generating stack: `+u.message+`
|
|
|
66
66
|
`.trimStart();async function HT({testInfo:i,metadata:e,errorContext:t,errors:s,buildCodeFrame:a,stdout:o,stderr:c}){var m;const d=new Set(s.filter(_=>_.message&&!_.message.includes(`
|
|
67
67
|
`)).map(_=>_.message));for(const _ of s)for(const b of d.keys())(m=_.message)!=null&&m.includes(b)&&d.delete(b);const h=s.filter(_=>!(!_.message||!_.message.includes(`
|
|
68
68
|
`)&&!d.has(_.message)));if(!h.length)return;const f=[jT,"# Test info","",i];o&&f.push("","# Stdout","","```",cc(o),"```"),c&&f.push("","# Stderr","","```",cc(c),"```"),f.push("","# Error details");for(const _ of h)f.push("","```",cc(_.message||""),"```");t&&f.push(t);const y=await a(h[h.length-1]);return y&&f.push("","# Test source","","```ts",y,"```"),e!=null&&e.gitDiff&&f.push("","# Local changes","","```diff",e.gitDiff,"```"),f.join(`
|
|
69
|
-
`)}const zT=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 cc(i){return i.replace(zT,"")}const $T=Rc,BT=({stack:i,setSelectedFrame:e,selectedFrame:t})=>{const s=i||[];return
|
|
70
|
-
`)[0]||void 0,location:y,linesAbove:100,linesBelow:100})},[o]),h=mc(()=>HT({testInfo:(o==null?void 0:o.title)??"",metadata:a,errorContext:c,errors:(o==null?void 0:o.errorDescriptors)??[],buildCodeFrame:d}),[c,a,o,d],void 0);return i.errors.size?
|
|
69
|
+
`)}const zT=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 cc(i){return i.replace(zT,"")}const $T=Rc,BT=({stack:i,setSelectedFrame:e,selectedFrame:t})=>{const s=i||[];return x.jsx($T,{name:"stack-trace",ariaLabel:"Stack trace",items:s,selectedItem:s[t],render:a=>{const o=a.file[1]===":"?"\\":"/";return x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"stack-trace-frame-function",children:a.function||"(anonymous)"}),x.jsx("span",{className:"stack-trace-frame-location",children:a.file.split(o).pop()}),x.jsx("span",{className:"stack-trace-frame-line",children:":"+a.line})]})},onSelected:a=>e(s.indexOf(a))})},Nf=({noShadow:i,children:e,noMinHeight:t,className:s,sidebarBackground:a,onClick:o})=>x.jsx("div",{className:We("toolbar",i&&"no-shadow",t&&"no-min-height",s,a&&"toolbar-sidebar-background"),onClick:o,children:e});function IT(i,e,t,s,a){const o=ui();return mc(async()=>{var b,w,v,T;const c=i==null?void 0:i[e],d=c!=null&&c.file?c:a;if(!d)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const h=d.file;let f=t.get(h);f||(f={errors:((b=a==null?void 0:a.source)==null?void 0:b.errors)||[],content:(w=a==null?void 0:a.source)==null?void 0:w.content},t.set(h,f));const y=(d==null?void 0:d.line)||((v=f.errors[0])==null?void 0:v.line)||0,m=s&&h.startsWith(s)?h.substring(s.length+1):h,_=f.errors.map(A=>({type:"error",line:A.line,message:A.message}));if(_.push({line:y,type:"running"}),((T=a==null?void 0:a.source)==null?void 0:T.content)!==void 0)f.content=a.source.content;else if(f.content===void 0||d===a){const A=await b0(h);try{let C=o?await fetch(o.createRelativeUrl(`sha1/src@${A}.txt`)):void 0;(!C||C.status===404)&&(C=await fetch(`file?path=${encodeURIComponent(h)}`)),C.status>=400?f.content="":f.content=await C.text()}catch{f.content=`<Unable to read "${h}">`}}return{model:o,source:f,highlight:_,targetLine:y,fileName:m,location:d}},[i,e,s,a],{source:{errors:[],content:"Loading…"},highlight:[]})}const PT=({stack:i,sources:e,rootDir:t,fallbackLocation:s,stackFrameLocation:a,onOpenExternally:o})=>{const[c,d]=P.useState(),[h,f]=P.useState(0);P.useEffect(()=>{c!==i&&(d(i),f(0))},[i,c,d,f]);const{source:y,highlight:m,targetLine:_,fileName:b,location:w}=IT(i,h,e,t,s),v=P.useCallback(()=>{w&&(o?o(w):window.location.href=`vscode://file//${w.file}:${w.line}`)},[o,w]),T=((i==null?void 0:i.length)??0)>1,A=UT(b),C=A.endsWith(".md")?"markdown":"javascript";return x.jsx(_c,{sidebarSize:200,orientation:a==="bottom"?"vertical":"horizontal",sidebarHidden:!T,main:x.jsxs("div",{className:"vbox","data-testid":"source-code",children:[b&&x.jsxs(Nf,{children:[x.jsx("div",{className:"source-tab-file-name",title:b,children:x.jsx("div",{children:A})}),x.jsx(kf,{description:"Copy filename",value:A}),w&&x.jsx(qt,{icon:"link-external",title:"Open in VS Code",onClick:v})]}),x.jsx(Or,{text:y.content||"",highlighter:C,highlight:m,revealLine:_,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:x.jsx(BT,{stack:i,selectedFrame:h,setSelectedFrame:f})})};async function b0(i){const e=new TextEncoder().encode(i),t=await crypto.subtle.digest("SHA-1",e),s=[],a=new DataView(t);for(let o=0;o<a.byteLength;o+=1){const c=a.getUint8(o).toString(16).padStart(2,"0");s.push(c)}return s.join("")}function UT(i){if(!i)return"";const e=i!=null&&i.includes("/")?"/":"\\";return(i==null?void 0:i.split(e).pop())??""}const qT=({prompt:i})=>x.jsx(oc,{value:i,description:"Copy prompt",copiedDescription:x.jsxs(x.Fragment,{children:["Copied ",x.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function VT(i){return P.useMemo(()=>{if(!i)return{errors:new Map};const e=new Map;for(const t of i.errorDescriptors)e.set(t.message,t);return{errors:e}},[i])}function FT({message:i,error:e,sdkLanguage:t,revealInSource:s}){var d;let a,o;const c=(d=e.stack)==null?void 0:d[0];return c&&(a=c.file.replace(/.*[/\\](.*)/,"$1")+":"+c.line,o=c.file+":"+c.line),x.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[x.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&Cf(e.action,{sdkLanguage:t}),a&&x.jsxs("div",{className:"action-location",children:["@ ",x.jsx("span",{title:o,onClick:()=>s(e),children:a})]})]}),x.jsx(yT,{error:i})]})}const GT=({errorsModel:i,sdkLanguage:e,revealInSource:t,wallTime:s,testRunMetadata:a})=>{const o=ui(),c=mc(async()=>{const f=o==null?void 0:o.attachments.find(y=>y.name==="error-context");if(f)return await fetch(jc(o,f)).then(y=>y.text())},[o],void 0),d=P.useCallback(async f=>{var b;const y=(b=f.stack)==null?void 0:b[0];if(!y)return;let m=o?await fetch(o.createRelativeUrl(`sha1/src@${await b0(y.file)}.txt`)):void 0;if((!m||m.status===404)&&(m=await fetch(`file?path=${encodeURIComponent(y.file)}`)),m.status>=400)return;const _=await m.text();return XT({source:_,message:cc(f.message).split(`
|
|
70
|
+
`)[0]||void 0,location:y,linesAbove:100,linesBelow:100})},[o]),h=mc(()=>HT({testInfo:(o==null?void 0:o.title)??"",metadata:a,errorContext:c,errors:(o==null?void 0:o.errorDescriptors)??[],buildCodeFrame:d}),[c,a,o,d],void 0);return i.errors.size?x.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[x.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:h&&x.jsx(qT,{prompt:h})}),[...i.errors.entries()].map(([f,y])=>{const m=`error-${s}-${f}`;return x.jsx(FT,{message:f,error:y,revealInSource:t,sdkLanguage:e},m)})]}):x.jsx(As,{text:"No errors"})};function XT({source:i,message:e,location:t,linesAbove:s,linesBelow:a}){const o=i.split(`
|
|
71
71
|
`).slice(),c=Math.max(0,t.line-s-1),d=Math.min(o.length,t.line+a),h=o.slice(c,d),f=String(d).length,y=h.map((m,_)=>`${c+_+1===t.line?"> ":" "}${(c+_+1).toString().padEnd(f," ")} | ${m}`);return e&&y.splice(t.line-c,0,`${" ".repeat(f+2)} | ${" ".repeat(t.column-2)} ^ ${e}`),y.join(`
|
|
72
|
-
`)}const YT=Rc;function KT(i,e){const{entries:t}=P.useMemo(()=>{if(!i)return{entries:[]};const a=[];function o(d){var y,m,_,b,
|
|
72
|
+
`)}const YT=Rc;function KT(i,e){const{entries:t}=P.useMemo(()=>{if(!i)return{entries:[]};const a=[];function o(d){var y,m,_,b,w,v;const h=a[a.length-1];h&&((y=d.browserMessage)==null?void 0:y.bodyString)===((m=h.browserMessage)==null?void 0:m.bodyString)&&((_=d.browserMessage)==null?void 0:_.location)===((b=h.browserMessage)==null?void 0:b.location)&&d.browserError===h.browserError&&((w=d.nodeMessage)==null?void 0:w.html)===((v=h.nodeMessage)==null?void 0:v.html)&&d.isError===h.isError&&d.isWarning===h.isWarning&&d.timestamp-h.timestamp<1e3?h.repeat++:a.push({...d,repeat:1})}const c=[...i.events,...i.stdio].sort((d,h)=>{const f="time"in d?d.time:d.timestamp,y="time"in h?h.time:h.timestamp;return f-y});for(const d of c){if(d.type==="console"){const h=d.args&&d.args.length?WT(d.args):v0(d.text),f=d.location.url,m=`${f?f.substring(f.lastIndexOf("/")+1):"<anonymous>"}:${d.location.lineNumber}`;o({browserMessage:{body:h,bodyString:d.text,location:m},isError:d.messageType==="error",isWarning:d.messageType==="warning",timestamp:d.time})}if(d.type==="event"&&d.method==="pageError"&&o({browserError:d.params.error,isError:!0,isWarning:!1,timestamp:d.time}),d.type==="stderr"||d.type==="stdout"){let h="";d.text&&(h=mo(d.text.trim())||""),d.base64&&(h=mo(atob(d.base64).trim())||""),o({nodeMessage:{html:h},isError:d.type==="stderr",isWarning:!1,timestamp:d.timestamp})}}return{entries:a}},[i]);return{entries:P.useMemo(()=>e?t.filter(a=>a.timestamp>=e.minimum&&a.timestamp<=e.maximum):t,[t,e])}}const JT=({consoleModel:i,boundaries:e,onEntryHovered:t,onAccepted:s})=>i.entries.length?x.jsx("div",{className:"console-tab",children:x.jsx(YT,{name:"console",onAccepted:s,onHighlighted:a=>t==null?void 0:t(a?i.entries.indexOf(a):void 0),items:i.entries,isError:a=>a.isError,isWarning:a=>a.isWarning,render:a=>{const o=kt(a.timestamp-e.minimum),c=x.jsx("span",{className:"console-time",children:o}),d=a.isError?"status-error":a.isWarning?"status-warning":"status-none",h=a.browserMessage||a.browserError?x.jsx("span",{className:We("codicon","codicon-browser",d),title:"Browser message"}):x.jsx("span",{className:We("codicon","codicon-file",d),title:"Runner message"});let f,y,m,_;const{browserMessage:b,browserError:w,nodeMessage:v}=a;if(b&&(f=b.location,y=b.body),w){const{error:T,value:A}=w;T?(y=T.message,_=T.stack):y=String(A)}return v&&(m=v.html),x.jsxs("div",{className:"console-line",children:[c,h,f&&x.jsx("span",{className:"console-location",children:f}),a.repeat>1&&x.jsx("span",{className:"console-repeat",children:a.repeat}),y&&x.jsx("span",{className:"console-line-message",children:y}),m&&x.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:m}}),_&&x.jsx("div",{className:"console-stack",children:_})]})}})}):x.jsx(As,{text:"No console entries"});function WT(i){if(i.length===1)return v0(i[0].preview);const e=typeof i[0].value=="string"&&i[0].value.includes("%"),t=e?i[0].value:"",s=e?i.slice(1):i;let a=0;const o=/%([%sdifoOc])/g;let c;const d=[];let h=[];d.push(x.jsx("span",{children:h},d.length+1));let f=0;for(;(c=o.exec(t))!==null;){const y=t.substring(f,c.index);h.push(x.jsx("span",{children:y},h.length+1)),f=c.index+2;const m=c[0][1];if(m==="%")h.push(x.jsx("span",{children:"%"},h.length+1));else if(m==="s"||m==="o"||m==="O"||m==="d"||m==="i"||m==="f"){const _=s[a++],b={};typeof(_==null?void 0:_.value)!="string"&&(b.color="var(--vscode-debugTokenExpression-number)"),h.push(x.jsx("span",{style:b,children:(_==null?void 0:_.preview)||""},h.length+1))}else if(m==="c"){h=[];const _=s[a++],b=_?ZT(_.preview):{};d.push(x.jsx("span",{style:b,children:h},d.length+1))}}for(f<t.length&&h.push(x.jsx("span",{children:t.substring(f)},h.length+1));a<s.length;a++){const y=s[a],m={};h.length&&h.push(x.jsx("span",{children:" "},h.length+1)),typeof(y==null?void 0:y.value)!="string"&&(m.color="var(--vscode-debugTokenExpression-number)"),h.push(x.jsx("span",{style:m,children:(y==null?void 0:y.preview)||""},h.length+1))}return d}function v0(i){return[x.jsx("span",{dangerouslySetInnerHTML:{__html:mo(i.trim())}})]}function ZT(i){try{const e={},t=i.split(";");for(const s of t){const a=s.trim();if(!a)continue;let[o,c]=a.split(":");if(o=o.trim(),c=c.trim(),!QT(o))continue;const d=o.replace(/-([a-z])/g,h=>h[1].toUpperCase());e[d]=c}return e}catch{return{}}}function QT(i){return["background","border","color","font","line","margin","padding","text"].some(t=>i.startsWith(t))}const tf=({tabs:i,selectedTab:e,setSelectedTab:t,leftToolbar:s,rightToolbar:a,dataTestId:o,mode:c})=>{const d=P.useId();return e||(e=i[0].id),c||(c="default"),x.jsx("div",{className:"tabbed-pane","data-testid":o,children:x.jsxs("div",{className:"vbox",children:[x.jsxs(Nf,{children:[s&&x.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...s]}),c==="default"&&x.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...i.map(h=>x.jsx(S0,{id:h.id,ariaControls:`${d}-${h.id}`,title:h.title,count:h.count,errorCount:h.errorCount,selected:e===h.id,onSelect:t},h.id))]}),c==="select"&&x.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:x.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},value:e,onChange:h=>{t==null||t(i[h.currentTarget.selectedIndex].id)},children:i.map(h=>{let f="";return h.count&&(f=` (${h.count})`),h.errorCount&&(f=` (${h.errorCount})`),x.jsxs("option",{value:h.id,role:"tab","aria-controls":`${d}-${h.id}`,children:[h.title,f]},h.id)})})}),a&&x.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...a]})]}),i.map(h=>{const f="tab-content tab-"+h.id;if(h.component)return x.jsx("div",{id:`${d}-${h.id}`,role:"tabpanel","aria-label":h.title,className:f,style:{display:e===h.id?"inherit":"none"},children:h.component},h.id);if(e===h.id)return x.jsx("div",{id:`${d}-${h.id}`,role:"tabpanel","aria-label":h.title,className:f,children:h.render()},h.id)})]})})},S0=({id:i,title:e,count:t,errorCount:s,selected:a,onSelect:o,ariaControls:c})=>x.jsxs("div",{className:We("tabbed-pane-tab",a&&"selected"),onClick:()=>o==null?void 0:o(i),role:"tab",title:e,"aria-controls":c,"aria-selected":a,children:[x.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!t&&x.jsx("div",{className:"tabbed-pane-tab-counter",children:t}),!!s&&x.jsx("div",{className:"tabbed-pane-tab-counter error",children:s})]});async function eE(i,e){const t=navigator.platform.includes("Win")?"win":"unix";let s=[];const a=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function o(_){return'^"'+_.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/[^ -~\r\n]/g," ").replace(/\r?\n|\r/g,`^
|
|
73
73
|
|
|
74
|
-
`)+'^"'}function c(_){function b(
|
|
74
|
+
`)+'^"'}function c(_){function b(w){let T=w.charCodeAt(0).toString(16);for(;T.length<4;)T="0"+T;return"\\u"+T}return/[\0-\x1F\x7F-\x9F!]|\'/.test(_)?"$'"+_.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,b)+"'":"'"+_+"'"}const d=t==="win"?o:c;s.push(d(e.request.url).replace(/[[{}\]]/g,"\\$&"));let h="GET";const f=[],y=await w0(i,e);y&&(f.push("--data-raw "+d(y)),a.add("content-length"),h="POST"),e.request.method!==h&&s.push("-X "+d(e.request.method));const m=e.request.headers;for(let _=0;_<m.length;_++){const b=m[_],w=b.name.replace(/^:/,"");if(a.has(w.toLowerCase()))continue;const v=b.value;v.trim()?w.toLowerCase()==="cookie"?s.push("-b "+d(v)):s.push("-H "+d(w+": "+v)):s.push("-H "+d(w+";"))}return s=s.concat(f),"curl "+s.join(s.length>=3?t==="win"?` ^
|
|
75
75
|
`:` \\
|
|
76
|
-
`:" ")}async function tE(i,e,t=0){const s=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"]),a=new Set(["cookie","authorization"]),o=JSON.stringify(e.request.url),c=e.request.headers,d=c.reduce((v,T)=>{const A=T.name;return!s.has(A.toLowerCase())&&!A.includes(":")&&v.append(A,T.value),v},new Headers),h={};for(const v of d)h[v[0]]=v[1];const f=e.request.cookies.length||c.some(({name:v})=>a.has(v.toLowerCase()))?"include":"omit",y=c.find(({name:v})=>v.toLowerCase()==="referer"),m=y?y.value:void 0,_=await w0(i,e),b={headers:Object.keys(h).length?h:void 0,referrer:m,body:_,method:e.request.method,mode:"cors"};if(t===1){const v=c.find(A=>A.name.toLowerCase()==="cookie"),T={};delete b.mode,v&&(T.cookie=v.value),m&&(delete b.referrer,T.Referer=m),Object.keys(T).length&&(b.headers={...h,...T})}else b.credentials=f;const
|
|
76
|
+
`:" ")}async function tE(i,e,t=0){const s=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"]),a=new Set(["cookie","authorization"]),o=JSON.stringify(e.request.url),c=e.request.headers,d=c.reduce((v,T)=>{const A=T.name;return!s.has(A.toLowerCase())&&!A.includes(":")&&v.append(A,T.value),v},new Headers),h={};for(const v of d)h[v[0]]=v[1];const f=e.request.cookies.length||c.some(({name:v})=>a.has(v.toLowerCase()))?"include":"omit",y=c.find(({name:v})=>v.toLowerCase()==="referer"),m=y?y.value:void 0,_=await w0(i,e),b={headers:Object.keys(h).length?h:void 0,referrer:m,body:_,method:e.request.method,mode:"cors"};if(t===1){const v=c.find(A=>A.name.toLowerCase()==="cookie"),T={};delete b.mode,v&&(T.cookie=v.value),m&&(delete b.referrer,T.Referer=m),Object.keys(T).length&&(b.headers={...h,...T})}else b.credentials=f;const w=JSON.stringify(b,null,2);return`fetch(${o}, ${w});`}async function w0(i,e){var t,s;return i&&((t=e.request.postData)!=null&&t._sha1)?await fetch(i.createRelativeUrl(`sha1/${e.request.postData._sha1}`)).then(a=>a.text()):(s=e.request.postData)==null?void 0:s.text}class nE{generatePlaywrightRequestCall(e,t){let s=e.method.toLowerCase();const a=new URL(e.url),o=`${a.origin}${a.pathname}`,c={};["delete","get","head","post","put","patch"].includes(s)||(c.method=s,s="fetch"),a.searchParams.size&&(c.params=Object.fromEntries(a.searchParams.entries())),t&&(c.data=t),e.headers.length&&(c.headers=Object.fromEntries(e.headers.map(f=>[f.name,f.value])));const d=[`'${o}'`];return Object.keys(c).length>0&&d.push(this.prettyPrintObject(c)),`await page.request.${s}(${d.join(", ")});`}prettyPrintObject(e,t=2,s=0){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const d=" ".repeat(s*t),h=" ".repeat((s+1)*t);return`[
|
|
77
77
|
${e.map(y=>`${h}${this.prettyPrintObject(y,t,s+1)}`).join(`,
|
|
78
78
|
`)}
|
|
79
79
|
${d}]`}if(Object.keys(e).length===0)return"{}";const a=" ".repeat(s*t),o=" ".repeat((s+1)*t);return`{
|
|
@@ -102,26 +102,26 @@ ${Object.entries(e).map(([d,h])=>{const f=this.prettyPrintObject(h,t,s+1),y=s===
|
|
|
102
102
|
${a}}`}stringLiteral(e){return JSON.stringify(e)}}class rE{generatePlaywrightRequestCall(e,t){const s=new URL(e.url),a=[`"${s.origin}${s.pathname}"`],o=[];let c=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(c)||(o.push(`setMethod("${c}")`),c="fetch");for(const[d,h]of s.searchParams)o.push(`setQueryParam(${this.stringLiteral(d)}, ${this.stringLiteral(h)})`);t&&o.push(`setData(${this.stringLiteral(t)})`);for(const d of e.headers)o.push(`setHeader(${this.stringLiteral(d.name)}, ${this.stringLiteral(d.value)})`);return o.length>0&&a.push(`RequestOptions.create()
|
|
103
103
|
.${o.join(`
|
|
104
104
|
.`)}
|
|
105
|
-
`),`request.${c}(${a.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function aE(i){if(i==="javascript")return new nE;if(i==="python")return new iE;if(i==="csharp")return new sE;if(i==="java")return new rE;throw new Error("Unsupported language: "+i)}const oE=({resource:i,sdkLanguage:e,startTimeOffset:t,onClose:s})=>{const[a,o]=P.useState("headers"),c=ui(),d=mc(async()=>{if(c&&i.request.postData){const h=i.request.headers.find(y=>y.name.toLowerCase()==="content-type"),f=h?h.value:"";if(i.request.postData._sha1){const y=await fetch(c.createRelativeUrl(`sha1/${i.request.postData._sha1}`));return{text:nf(await y.text(),f),mimeType:f}}else return{text:nf(i.request.postData.text,f),mimeType:f}}else return null},[i],null);return w.jsx(tf,{leftToolbar:[w.jsx(qt,{icon:"close",title:"Close",onClick:s},"close")],rightToolbar:[w.jsx(lE,{requestBody:d,resource:i,sdkLanguage:e},"dropdown")],tabs:[{id:"headers",title:"Headers",render:()=>w.jsx(cE,{resource:i,startTimeOffset:t})},{id:"payload",title:"Payload",render:()=>w.jsx(uE,{resource:i,requestBody:d})},{id:"response",title:"Response",render:()=>w.jsx(dE,{resource:i})}],selectedTab:a,setSelectedTab:o})},lE=({resource:i,sdkLanguage:e,requestBody:t})=>{const s=ui(),a=w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),o=async()=>aE(e).generatePlaywrightRequestCall(i.request,t==null?void 0:t.text);return w.jsxs("div",{className:"copy-request-dropdown",children:[w.jsxs(qt,{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(oc,{description:"Copy as cURL",copiedDescription:a,value:()=>eE(s,i)}),w.jsx(oc,{description:"Copy as Fetch",copiedDescription:a,value:()=>tE(s,i)}),w.jsx(oc,{description:"Copy as Playwright",copiedDescription:a,value:o})]})]})},ao=({title:i,data:e,showCount:t,children:s,className:a})=>{const[o,c]=hn(`trace-viewer-network-details-${i.replaceAll(" ","-")}`,!0);return w.jsxs(m0,{expanded:o,setExpanded:c,expandOnTitleClick:!0,title:w.jsxs("span",{className:"network-request-details-header",children:[i,t&&w.jsxs("span",{className:"network-request-details-header-count",children:[" × ",(e==null?void 0:e.length)??0]})]}),className:a,children:[e&&w.jsx("table",{className:"network-request-details-table",children:w.jsx("tbody",{children:e.map(({name:d,value:h},f)=>h!==null&&w.jsxs("tr",{children:[w.jsx("td",{children:d}),w.jsx("td",{children:h})]},f))})}),s]})},cE=({resource:i,startTimeOffset:e})=>{const t=P.useMemo(()=>Object.entries({URL:i.request.url,Method:i.request.method,"Status Code":i.response.status!==-1&&w.jsxs("span",{className:fE(i.response.status),children:[" ",i.response.status," ",i.response.statusText]}),Start:kt(e),Duration:kt(i.time)}).map(([s,a])=>({name:s,value:a})),[i,e]);return w.jsxs("div",{className:"vbox network-request-details-tab",children:[w.jsx(ao,{title:"General",data:t}),w.jsx(ao,{title:"Request Headers",showCount:!0,data:i.request.headers}),w.jsx(ao,{title:"Response Headers",showCount:!0,data:i.response.headers})]})},uE=({resource:i,requestBody:e})=>w.jsxs("div",{className:"vbox network-request-details-tab",children:[i.request.queryString.length===0&&!e&&w.jsx("em",{className:"network-request-no-payload",children:"No payload for this request."}),i.request.queryString.length>0&&w.jsx(ao,{title:"Query String Parameters",showCount:!0,data:i.request.queryString}),e&&w.jsx(ao,{title:"Request Body",className:"network-request-request-body",children:w.jsx(Or,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})})]}),dE=({resource:i})=>{const e=ui(),[t,s]=P.useState(null);return P.useEffect(()=>{(async()=>{if(e&&i.response.content._sha1){const o=i.response.content.mimeType.includes("image"),c=i.response.content.mimeType.includes("font"),d=await fetch(e.createRelativeUrl(`sha1/${i.response.content._sha1}`));if(o){const h=await d.blob(),f=new FileReader,y=new Promise(m=>f.onload=m);f.readAsDataURL(h),s({dataUrl:(await y).target.result})}else if(c){const h=await d.arrayBuffer();s({font:h})}else{const h=nf(await d.text(),i.response.content.mimeType);s({text:h,mimeType:i.response.content.mimeType})}}else s(null)})()},[i,e]),w.jsxs("div",{className:"vbox network-request-details-tab",children:[!i.response.content._sha1&&w.jsx("div",{children:"Response body is not available for this request."}),t&&t.font&&w.jsx(hE,{font:t.font}),t&&t.dataUrl&&w.jsx("div",{children:w.jsx("img",{draggable:"false",src:t.dataUrl})}),t&&t.text&&w.jsx(Or,{text:t.text,mimeType:t.mimeType,readOnly:!0,lineNumbers:!0})]})},hE=({font:i})=>{const[e,t]=P.useState(!1);return P.useEffect(()=>{let s;try{s=new FontFace("font-preview",i),s.status==="loaded"&&document.fonts.add(s),s.status==="error"&&t(!0)}catch{t(!0)}return()=>{document.fonts.delete(s)}},[i]),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 fE(i){return i<300||i===304?"green-circle":i<400?"yellow-circle":"red-circle"}function nf(i,e){if(i===null)return"Loading...";const t=i;if(t==="")return"<Empty>";if(NT(e))try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(t):t}function gE(i){const[e,t]=P.useState([]);P.useEffect(()=>{const o=[];for(let c=0;c<i.columns.length-1;++c){const d=i.columns[c];o[c]=(o[c-1]||0)+i.columnWidths.get(d)}t(o)},[i.columns,i.columnWidths]);function s(o){const c=new Map(i.columnWidths.entries());for(let d=0;d<o.length;++d){const h=o[d]-(o[d-1]||0),f=i.columns[d];c.set(f,h)}i.setColumnWidths(c)}const a=P.useCallback(o=>{var c,d;(d=i.setSorting)==null||d.call(i,{by:o,negate:((c=i.sorting)==null?void 0:c.by)===o?!i.sorting.negate:!1})},[i]);return w.jsxs("div",{className:`grid-view ${i.name}-grid-view`,children:[w.jsx(p0,{orientation:"horizontal",offsets:e,setOffsets:s,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),w.jsxs("div",{className:"vbox",children:[w.jsx("div",{className:"grid-view-header",children:i.columns.map((o,c)=>w.jsxs("div",{className:"grid-view-header-cell "+pE(o,i.sorting),style:{width:c<i.columns.length-1?i.columnWidths.get(o):void 0},onClick:()=>i.setSorting&&a(o),children:[w.jsx("span",{className:"grid-view-header-cell-title",children:i.columnTitle(o)}),w.jsx("span",{className:"codicon codicon-triangle-up"}),w.jsx("span",{className:"codicon codicon-triangle-down"})]},i.columnTitle(o)))}),w.jsx(Rc,{name:i.name,items:i.items,ariaLabel:i.ariaLabel,id:i.id,render:(o,c)=>w.jsx(w.Fragment,{children:i.columns.map((d,h)=>{const{body:f,title:y}=i.render(o,d,c);return w.jsx("div",{className:`grid-view-cell grid-view-column-${String(d)}`,title:y,style:{width:h<i.columns.length-1?i.columnWidths.get(d):void 0},children:f},i.columnTitle(d))})}),icon:i.icon,isError:i.isError,isWarning:i.isWarning,isInfo:i.isInfo,selectedItem:i.selectedItem,onAccepted:i.onAccepted,onSelected:i.onSelected,onHighlighted:i.onHighlighted,onIconClicked:i.onIconClicked,noItemsMessage:i.noItemsMessage,dataTestId:i.dataTestId,notSelectable:i.notSelectable})]})]})}function pE(i,e){return i===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const mE=["Fetch","HTML","JS","CSS","Font","Image"],yE={searchValue:"",resourceTypes:new Set},_E=({filterState:i,onFilterStateChange:e})=>w.jsxs("div",{className:"network-filters",children:[w.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:i.searchValue,onChange:t=>e({...i,searchValue:t.target.value})}),w.jsxs("div",{className:"network-filters-resource-types",role:"tablist","aria-multiselectable":"true",children:[w.jsx("div",{title:"All",onClick:()=>e({...i,resourceTypes:new Set}),className:`network-filters-resource-type ${i.resourceTypes.size===0?"selected":""}`,children:"All"}),mE.map(t=>w.jsx("div",{title:t,onClick:s=>{let a;s.ctrlKey||s.metaKey?a=i.resourceTypes.symmetricDifference(new Set([t])):a=new Set([t]),e({...i,resourceTypes:a})},className:`network-filters-resource-type ${i.resourceTypes.has(t)?"selected":""}`,role:"tab","aria-selected":i.resourceTypes.has(t),children:t},t))]})]}),bE=gE;function vE(i,e){const t=P.useMemo(()=>((i==null?void 0:i.resources)||[]).filter(c=>e?!!c._monotonicTime&&c._monotonicTime>=e.minimum&&c._monotonicTime<=e.maximum:!0),[i,e]),s=P.useMemo(()=>new AE(i),[i]);return{resources:t,contextIdMap:s}}const SE=({boundaries:i,networkModel:e,onResourceHovered:t,sdkLanguage:s})=>{const[a,o]=P.useState(void 0),[c,d]=P.useState(void 0),[h,f]=P.useState(yE),y=P.useMemo(()=>c&&e.resources.includes(c.resource)?c:void 0,[c,e.resources]),{renderedEntries:m}=P.useMemo(()=>{const T=e.resources.map((A,C)=>CE(A,i,e.contextIdMap,C)).filter(LE(h));return a&&NE(T,a),{renderedEntries:T}},[e.resources,e.contextIdMap,h,a,i]),[_,b]=P.useState(()=>new Map(x0().map(T=>[T,xE(T)]))),x=P.useCallback(T=>{f(T),d(void 0)},[]);if(!e.resources.length)return w.jsx(As,{text:"No network calls"});const v=w.jsx(bE,{name:"network",ariaLabel:"Network requests",items:m,selectedItem:y,onSelected:T=>d(T),onHighlighted:T=>t==null?void 0:t(T==null?void 0:T.ordinal),columns:TE(!!y,m),columnTitle:wE,columnWidths:_,setColumnWidths:b,isError:T=>T.status.code>=400||T.status.code===-1,isInfo:T=>!!T.route,render:(T,A)=>EE(T,A),sorting:a,setSorting:o});return w.jsxs(w.Fragment,{children:[w.jsx(_E,{filterState:h,onFilterStateChange:x}),!y&&v,y&&w.jsx(_c,{sidebarSize:_.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:w.jsx(oE,{resource:y.resource,sdkLanguage:s,startTimeOffset:y.start,onClose:()=>d(void 0)}),sidebar:v})]})},wE=i=>i==="contextId"?"Source":i==="name"?"Name":i==="method"?"Method":i==="status"?"Status":i==="contentType"?"Content Type":i==="duration"?"Duration":i==="size"?"Size":i==="start"?"Start":i==="route"?"Route":"",xE=i=>i==="name"?200:i==="method"||i==="status"?60:i==="contentType"?200:i==="contextId"?60:100;function TE(i,e){if(i){const s=["name"];return B_(e)&&s.unshift("contextId"),s}let t=x0();return B_(e)||(t=t.filter(s=>s!=="contextId")),t}function x0(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const EE=(i,e)=>e==="contextId"?{body:i.contextId,title:i.name.url}:e==="name"?{body:i.name.name,title:i.name.url}:e==="method"?{body:i.method}:e==="status"?{body:i.status.code>0?i.status.code:"",title:i.status.text}:e==="contentType"?{body:i.contentType}:e==="duration"?{body:kt(i.duration)}:e==="size"?{body:ex(i.size)}:e==="start"?{body:kt(i.start)}:e==="route"?{body:i.route}:{body:""};class AE{constructor(e){Pa(this,"_pagerefToShortId",new Map);Pa(this,"_contextToId",new Map);Pa(this,"_lastPageId",0);Pa(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let t=this._pagerefToShortId.get(e);return t||(++this._lastPageId,t="page#"+this._lastPageId,this._pagerefToShortId.set(e,t)),t}_apiRequestContextId(e){const t=Pb(e);if(!t)return"";let s=this._contextToId.get(t);return s||(++this._lastApiRequestContextId,s="api#"+this._lastApiRequestContextId,this._contextToId.set(t,s)),s}}function B_(i){const e=new Set;for(const t of i)if(e.add(t.contextId),e.size>1)return!0;return!1}const CE=(i,e,t,s)=>{const a=kE(i);let o;try{const h=new URL(i.request.url);o=h.pathname.substring(h.pathname.lastIndexOf("/")+1),o||(o=h.host),h.search&&(o+=h.search)}catch{o=i.request.url}let c=i.response.content.mimeType;const d=c.match(/^(.*);\s*charset=.*$/);return d&&(c=d[1]),{ordinal:s,name:{name:o,url:i.request.url},method:i.request.method,status:{code:i.response.status,text:i.response.statusText},contentType:c,duration:i.time,size:i.response._transferSize>0?i.response._transferSize:i.response.bodySize,start:i._monotonicTime-e.minimum,route:a,resource:i,contextId:t.contextId(i)}};function kE(i){return i._wasAborted?"aborted":i._wasContinued?"continued":i._wasFulfilled?"fulfilled":i._apiRequest?"api":""}function NE(i,e){const t=ME(e==null?void 0:e.by);t&&i.sort(t),e.negate&&i.reverse()}function ME(i){if(i==="start")return(e,t)=>e.start-t.start;if(i==="duration")return(e,t)=>e.duration-t.duration;if(i==="status")return(e,t)=>e.status.code-t.status.code;if(i==="method")return(e,t)=>{const s=e.method,a=t.method;return s.localeCompare(a)};if(i==="size")return(e,t)=>e.size-t.size;if(i==="contentType")return(e,t)=>e.contentType.localeCompare(t.contentType);if(i==="name")return(e,t)=>e.name.name.localeCompare(t.name.name);if(i==="route")return(e,t)=>e.route.localeCompare(t.route);if(i==="contextId")return(e,t)=>e.contextId.localeCompare(t.contextId)}const DE={Fetch:i=>i==="application/json",HTML:i=>i==="text/html",CSS:i=>i==="text/css",JS:i=>i.includes("javascript"),Font:i=>i.includes("font"),Image:i=>i.includes("image")};function LE({searchValue:i,resourceTypes:e}){return t=>(e.size===0||Array.from(e).some(a=>DE[a](t.contentType)))&&t.name.url.toLowerCase().includes(i.toLowerCase())}function OE(i,e){if(i.role!==e.role||i.name!==e.name||!RE(i,e)||xc(i)!==xc(e))return!1;const t=Object.keys(i.props),s=Object.keys(e.props);return t.length===s.length&&t.every(a=>i.props[a]===e.props[a])}function xc(i){return i.box.cursor==="pointer"}function RE(i,e){return i.active===e.active&&i.checked===e.checked&&i.disabled===e.disabled&&i.expanded===e.expanded&&i.selected===e.selected&&i.level===e.level&&i.pressed===e.pressed}function Mf(i,e,t={}){var _;const s=new i.LineCounter,a={keepSourceTokens:!0,lineCounter:s,...t},o=i.parseDocument(e,a),c=[],d=b=>[s.linePos(b[0]),s.linePos(b[1])],h=b=>{c.push({message:b.message,range:[s.linePos(b.pos[0]),s.linePos(b.pos[1])]})},f=(b,x)=>{for(const v of x.items){if(v instanceof i.Scalar&&typeof v.value=="string"){const C=Tc.parse(v,a,c);C&&(b.children=b.children||[],b.children.push(C));continue}if(v instanceof i.YAMLMap){y(b,v);continue}c.push({message:"Sequence items should be strings or maps",range:d(v.range||x.range)})}},y=(b,x)=>{for(const v of x.items){if(b.children=b.children||[],!(v.key instanceof i.Scalar&&typeof v.key.value=="string")){c.push({message:"Only string keys are supported",range:d(v.key.range||x.range)});continue}const A=v.key,C=v.value;if(A.value==="text"){if(!(C instanceof i.Scalar&&typeof C.value=="string")){c.push({message:"Text value should be a string",range:d(v.value.range||x.range)});continue}b.children.push({kind:"text",text:Ah(C.value)});continue}if(A.value==="/children"){if(!(C instanceof i.Scalar&&typeof C.value=="string")||C.value!=="contain"&&C.value!=="equal"&&C.value!=="deep-equal"){c.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:d(v.value.range||x.range)});continue}b.containerMode=C.value;continue}if(A.value.startsWith("/")){if(!(C instanceof i.Scalar&&typeof C.value=="string")){c.push({message:"Property value should be a string",range:d(v.value.range||x.range)});continue}b.props=b.props??{},b.props[A.value.slice(1)]=Ah(C.value);continue}const L=Tc.parse(A,a,c);if(!L)continue;if(C instanceof i.Scalar){const F=typeof C.value;if(F!=="string"&&F!=="number"&&F!=="boolean"){c.push({message:"Node value should be a string or a sequence",range:d(v.value.range||x.range)});continue}b.children.push({...L,children:[{kind:"text",text:Ah(String(C.value))}]});continue}if(C instanceof i.YAMLSeq){b.children.push(L),f(L,C);continue}c.push({message:"Map values should be strings or sequences",range:d(v.value.range||x.range)})}},m={kind:"role",role:"fragment"};return o.errors.forEach(h),c.length?{errors:c,fragment:m}:(o.contents instanceof i.YAMLSeq||c.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:o.contents?d(o.contents.range):[{line:0,col:0},{line:0,col:0}]}),c.length?{errors:c,fragment:m}:(f(m,o.contents),c.length?{errors:c,fragment:jE}:((_=m.children)==null?void 0:_.length)===1&&(!m.containerMode||m.containerMode==="contain")?{fragment:m.children[0],errors:[]}:{fragment:m,errors:[]}))}const jE={kind:"role",role:"fragment"};function T0(i){return i.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function Ah(i){return{raw:i,normalized:T0(i)}}class Tc{static parse(e,t,s){try{return new Tc(e.value)._parse()}catch(a){if(a instanceof I_){const o=t.prettyErrors===!1?a.message:a.message+`:
|
|
105
|
+
`),`request.${c}(${a.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function aE(i){if(i==="javascript")return new nE;if(i==="python")return new iE;if(i==="csharp")return new sE;if(i==="java")return new rE;throw new Error("Unsupported language: "+i)}const oE=({resource:i,sdkLanguage:e,startTimeOffset:t,onClose:s})=>{const[a,o]=P.useState("headers"),c=ui(),d=mc(async()=>{if(c&&i.request.postData){const h=i.request.headers.find(y=>y.name.toLowerCase()==="content-type"),f=h?h.value:"";if(i.request.postData._sha1){const y=await fetch(c.createRelativeUrl(`sha1/${i.request.postData._sha1}`));return{text:nf(await y.text(),f),mimeType:f}}else return{text:nf(i.request.postData.text,f),mimeType:f}}else return null},[i],null);return x.jsx(tf,{leftToolbar:[x.jsx(qt,{icon:"close",title:"Close",onClick:s},"close")],rightToolbar:[x.jsx(lE,{requestBody:d,resource:i,sdkLanguage:e},"dropdown")],tabs:[{id:"headers",title:"Headers",render:()=>x.jsx(cE,{resource:i,startTimeOffset:t})},{id:"payload",title:"Payload",render:()=>x.jsx(uE,{resource:i,requestBody:d})},{id:"response",title:"Response",render:()=>x.jsx(dE,{resource:i})}],selectedTab:a,setSelectedTab:o})},lE=({resource:i,sdkLanguage:e,requestBody:t})=>{const s=ui(),a=x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),o=async()=>aE(e).generatePlaywrightRequestCall(i.request,t==null?void 0:t.text);return x.jsxs("div",{className:"copy-request-dropdown",children:[x.jsxs(qt,{className:"copy-request-dropdown-toggle",children:[x.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",x.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),x.jsxs("div",{className:"copy-request-dropdown-menu",children:[x.jsx(oc,{description:"Copy as cURL",copiedDescription:a,value:()=>eE(s,i)}),x.jsx(oc,{description:"Copy as Fetch",copiedDescription:a,value:()=>tE(s,i)}),x.jsx(oc,{description:"Copy as Playwright",copiedDescription:a,value:o})]})]})},ao=({title:i,data:e,showCount:t,children:s,className:a})=>{const[o,c]=hn(`trace-viewer-network-details-${i.replaceAll(" ","-")}`,!0);return x.jsxs(m0,{expanded:o,setExpanded:c,expandOnTitleClick:!0,title:x.jsxs("span",{className:"network-request-details-header",children:[i,t&&x.jsxs("span",{className:"network-request-details-header-count",children:[" × ",(e==null?void 0:e.length)??0]})]}),className:a,children:[e&&x.jsx("table",{className:"network-request-details-table",children:x.jsx("tbody",{children:e.map(({name:d,value:h},f)=>h!==null&&x.jsxs("tr",{children:[x.jsx("td",{children:d}),x.jsx("td",{children:h})]},f))})}),s]})},cE=({resource:i,startTimeOffset:e})=>{const t=P.useMemo(()=>Object.entries({URL:i.request.url,Method:i.request.method,"Status Code":i.response.status!==-1&&x.jsxs("span",{className:fE(i.response.status),children:[" ",i.response.status," ",i.response.statusText]}),Start:kt(e),Duration:kt(i.time)}).map(([s,a])=>({name:s,value:a})),[i,e]);return x.jsxs("div",{className:"vbox network-request-details-tab",children:[x.jsx(ao,{title:"General",data:t}),x.jsx(ao,{title:"Request Headers",showCount:!0,data:i.request.headers}),x.jsx(ao,{title:"Response Headers",showCount:!0,data:i.response.headers})]})},uE=({resource:i,requestBody:e})=>x.jsxs("div",{className:"vbox network-request-details-tab",children:[i.request.queryString.length===0&&!e&&x.jsx("em",{className:"network-request-no-payload",children:"No payload for this request."}),i.request.queryString.length>0&&x.jsx(ao,{title:"Query String Parameters",showCount:!0,data:i.request.queryString}),e&&x.jsx(ao,{title:"Request Body",className:"network-request-request-body",children:x.jsx(Or,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})})]}),dE=({resource:i})=>{const e=ui(),[t,s]=P.useState(null);return P.useEffect(()=>{(async()=>{if(e&&i.response.content._sha1){const o=i.response.content.mimeType.includes("image"),c=i.response.content.mimeType.includes("font"),d=await fetch(e.createRelativeUrl(`sha1/${i.response.content._sha1}`));if(o){const h=await d.blob(),f=new FileReader,y=new Promise(m=>f.onload=m);f.readAsDataURL(h),s({dataUrl:(await y).target.result})}else if(c){const h=await d.arrayBuffer();s({font:h})}else{const h=nf(await d.text(),i.response.content.mimeType);s({text:h,mimeType:i.response.content.mimeType})}}else s(null)})()},[i,e]),x.jsxs("div",{className:"vbox network-request-details-tab",children:[!i.response.content._sha1&&x.jsx("div",{children:"Response body is not available for this request."}),t&&t.font&&x.jsx(hE,{font:t.font}),t&&t.dataUrl&&x.jsx("div",{children:x.jsx("img",{draggable:"false",src:t.dataUrl})}),t&&t.text&&x.jsx(Or,{text:t.text,mimeType:t.mimeType,readOnly:!0,lineNumbers:!0})]})},hE=({font:i})=>{const[e,t]=P.useState(!1);return P.useEffect(()=>{let s;try{s=new FontFace("font-preview",i),s.status==="loaded"&&document.fonts.add(s),s.status==="error"&&t(!0)}catch{t(!0)}return()=>{document.fonts.delete(s)}},[i]),e?x.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):x.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",x.jsx("br",{}),"NOPQRSTUVWXYZ",x.jsx("br",{}),"abcdefghijklm",x.jsx("br",{}),"nopqrstuvwxyz",x.jsx("br",{}),"1234567890"]})};function fE(i){return i<300||i===304?"green-circle":i<400?"yellow-circle":"red-circle"}function nf(i,e){if(i===null)return"Loading...";const t=i;if(t==="")return"<Empty>";if(NT(e))try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(t):t}function gE(i){const[e,t]=P.useState([]);P.useEffect(()=>{const o=[];for(let c=0;c<i.columns.length-1;++c){const d=i.columns[c];o[c]=(o[c-1]||0)+i.columnWidths.get(d)}t(o)},[i.columns,i.columnWidths]);function s(o){const c=new Map(i.columnWidths.entries());for(let d=0;d<o.length;++d){const h=o[d]-(o[d-1]||0),f=i.columns[d];c.set(f,h)}i.setColumnWidths(c)}const a=P.useCallback(o=>{var c,d;(d=i.setSorting)==null||d.call(i,{by:o,negate:((c=i.sorting)==null?void 0:c.by)===o?!i.sorting.negate:!1})},[i]);return x.jsxs("div",{className:`grid-view ${i.name}-grid-view`,children:[x.jsx(p0,{orientation:"horizontal",offsets:e,setOffsets:s,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),x.jsxs("div",{className:"vbox",children:[x.jsx("div",{className:"grid-view-header",children:i.columns.map((o,c)=>x.jsxs("div",{className:"grid-view-header-cell "+pE(o,i.sorting),style:{width:c<i.columns.length-1?i.columnWidths.get(o):void 0},onClick:()=>i.setSorting&&a(o),children:[x.jsx("span",{className:"grid-view-header-cell-title",children:i.columnTitle(o)}),x.jsx("span",{className:"codicon codicon-triangle-up"}),x.jsx("span",{className:"codicon codicon-triangle-down"})]},i.columnTitle(o)))}),x.jsx(Rc,{name:i.name,items:i.items,ariaLabel:i.ariaLabel,id:i.id,render:(o,c)=>x.jsx(x.Fragment,{children:i.columns.map((d,h)=>{const{body:f,title:y}=i.render(o,d,c);return x.jsx("div",{className:`grid-view-cell grid-view-column-${String(d)}`,title:y,style:{width:h<i.columns.length-1?i.columnWidths.get(d):void 0},children:f},i.columnTitle(d))})}),icon:i.icon,isError:i.isError,isWarning:i.isWarning,isInfo:i.isInfo,selectedItem:i.selectedItem,onAccepted:i.onAccepted,onSelected:i.onSelected,onHighlighted:i.onHighlighted,onIconClicked:i.onIconClicked,noItemsMessage:i.noItemsMessage,dataTestId:i.dataTestId,notSelectable:i.notSelectable})]})]})}function pE(i,e){return i===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const mE=["Fetch","HTML","JS","CSS","Font","Image"],yE={searchValue:"",resourceTypes:new Set},_E=({filterState:i,onFilterStateChange:e})=>x.jsxs("div",{className:"network-filters",children:[x.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:i.searchValue,onChange:t=>e({...i,searchValue:t.target.value})}),x.jsxs("div",{className:"network-filters-resource-types",role:"tablist","aria-multiselectable":"true",children:[x.jsx("div",{title:"All",onClick:()=>e({...i,resourceTypes:new Set}),className:`network-filters-resource-type ${i.resourceTypes.size===0?"selected":""}`,children:"All"}),mE.map(t=>x.jsx("div",{title:t,onClick:s=>{let a;s.ctrlKey||s.metaKey?a=i.resourceTypes.symmetricDifference(new Set([t])):a=new Set([t]),e({...i,resourceTypes:a})},className:`network-filters-resource-type ${i.resourceTypes.has(t)?"selected":""}`,role:"tab","aria-selected":i.resourceTypes.has(t),children:t},t))]})]}),bE=gE;function vE(i,e){const t=P.useMemo(()=>((i==null?void 0:i.resources)||[]).filter(c=>e?!!c._monotonicTime&&c._monotonicTime>=e.minimum&&c._monotonicTime<=e.maximum:!0),[i,e]),s=P.useMemo(()=>new AE(i),[i]);return{resources:t,contextIdMap:s}}const SE=({boundaries:i,networkModel:e,onResourceHovered:t,sdkLanguage:s})=>{const[a,o]=P.useState(void 0),[c,d]=P.useState(void 0),[h,f]=P.useState(yE),y=P.useMemo(()=>c&&e.resources.includes(c.resource)?c:void 0,[c,e.resources]),{renderedEntries:m}=P.useMemo(()=>{const T=e.resources.map((A,C)=>CE(A,i,e.contextIdMap,C)).filter(LE(h));return a&&NE(T,a),{renderedEntries:T}},[e.resources,e.contextIdMap,h,a,i]),[_,b]=P.useState(()=>new Map(x0().map(T=>[T,xE(T)]))),w=P.useCallback(T=>{f(T),d(void 0)},[]);if(!e.resources.length)return x.jsx(As,{text:"No network calls"});const v=x.jsx(bE,{name:"network",ariaLabel:"Network requests",items:m,selectedItem:y,onSelected:T=>d(T),onHighlighted:T=>t==null?void 0:t(T==null?void 0:T.ordinal),columns:TE(!!y,m),columnTitle:wE,columnWidths:_,setColumnWidths:b,isError:T=>T.status.code>=400||T.status.code===-1,isInfo:T=>!!T.route,render:(T,A)=>EE(T,A),sorting:a,setSorting:o});return x.jsxs(x.Fragment,{children:[x.jsx(_E,{filterState:h,onFilterStateChange:w}),!y&&v,y&&x.jsx(_c,{sidebarSize:_.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:x.jsx(oE,{resource:y.resource,sdkLanguage:s,startTimeOffset:y.start,onClose:()=>d(void 0)}),sidebar:v})]})},wE=i=>i==="contextId"?"Source":i==="name"?"Name":i==="method"?"Method":i==="status"?"Status":i==="contentType"?"Content Type":i==="duration"?"Duration":i==="size"?"Size":i==="start"?"Start":i==="route"?"Route":"",xE=i=>i==="name"?200:i==="method"||i==="status"?60:i==="contentType"?200:i==="contextId"?60:100;function TE(i,e){if(i){const s=["name"];return B_(e)&&s.unshift("contextId"),s}let t=x0();return B_(e)||(t=t.filter(s=>s!=="contextId")),t}function x0(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const EE=(i,e)=>e==="contextId"?{body:i.contextId,title:i.name.url}:e==="name"?{body:i.name.name,title:i.name.url}:e==="method"?{body:i.method}:e==="status"?{body:i.status.code>0?i.status.code:"",title:i.status.text}:e==="contentType"?{body:i.contentType}:e==="duration"?{body:kt(i.duration)}:e==="size"?{body:ex(i.size)}:e==="start"?{body:kt(i.start)}:e==="route"?{body:i.route}:{body:""};class AE{constructor(e){Pa(this,"_pagerefToShortId",new Map);Pa(this,"_contextToId",new Map);Pa(this,"_lastPageId",0);Pa(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let t=this._pagerefToShortId.get(e);return t||(++this._lastPageId,t="page#"+this._lastPageId,this._pagerefToShortId.set(e,t)),t}_apiRequestContextId(e){const t=Pb(e);if(!t)return"";let s=this._contextToId.get(t);return s||(++this._lastApiRequestContextId,s="api#"+this._lastApiRequestContextId,this._contextToId.set(t,s)),s}}function B_(i){const e=new Set;for(const t of i)if(e.add(t.contextId),e.size>1)return!0;return!1}const CE=(i,e,t,s)=>{const a=kE(i);let o;try{const h=new URL(i.request.url);o=h.pathname.substring(h.pathname.lastIndexOf("/")+1),o||(o=h.host),h.search&&(o+=h.search)}catch{o=i.request.url}let c=i.response.content.mimeType;const d=c.match(/^(.*);\s*charset=.*$/);return d&&(c=d[1]),{ordinal:s,name:{name:o,url:i.request.url},method:i.request.method,status:{code:i.response.status,text:i.response.statusText},contentType:c,duration:i.time,size:i.response._transferSize>0?i.response._transferSize:i.response.bodySize,start:i._monotonicTime-e.minimum,route:a,resource:i,contextId:t.contextId(i)}};function kE(i){return i._wasAborted?"aborted":i._wasContinued?"continued":i._wasFulfilled?"fulfilled":i._apiRequest?"api":""}function NE(i,e){const t=ME(e==null?void 0:e.by);t&&i.sort(t),e.negate&&i.reverse()}function ME(i){if(i==="start")return(e,t)=>e.start-t.start;if(i==="duration")return(e,t)=>e.duration-t.duration;if(i==="status")return(e,t)=>e.status.code-t.status.code;if(i==="method")return(e,t)=>{const s=e.method,a=t.method;return s.localeCompare(a)};if(i==="size")return(e,t)=>e.size-t.size;if(i==="contentType")return(e,t)=>e.contentType.localeCompare(t.contentType);if(i==="name")return(e,t)=>e.name.name.localeCompare(t.name.name);if(i==="route")return(e,t)=>e.route.localeCompare(t.route);if(i==="contextId")return(e,t)=>e.contextId.localeCompare(t.contextId)}const DE={Fetch:i=>i==="application/json",HTML:i=>i==="text/html",CSS:i=>i==="text/css",JS:i=>i.includes("javascript"),Font:i=>i.includes("font"),Image:i=>i.includes("image")};function LE({searchValue:i,resourceTypes:e}){return t=>(e.size===0||Array.from(e).some(a=>DE[a](t.contentType)))&&t.name.url.toLowerCase().includes(i.toLowerCase())}function OE(i,e){if(i.role!==e.role||i.name!==e.name||!RE(i,e)||xc(i)!==xc(e))return!1;const t=Object.keys(i.props),s=Object.keys(e.props);return t.length===s.length&&t.every(a=>i.props[a]===e.props[a])}function xc(i){return i.box.cursor==="pointer"}function RE(i,e){return i.active===e.active&&i.checked===e.checked&&i.disabled===e.disabled&&i.expanded===e.expanded&&i.selected===e.selected&&i.level===e.level&&i.pressed===e.pressed}function Mf(i,e,t={}){var _;const s=new i.LineCounter,a={keepSourceTokens:!0,lineCounter:s,...t},o=i.parseDocument(e,a),c=[],d=b=>[s.linePos(b[0]),s.linePos(b[1])],h=b=>{c.push({message:b.message,range:[s.linePos(b.pos[0]),s.linePos(b.pos[1])]})},f=(b,w)=>{for(const v of w.items){if(v instanceof i.Scalar&&typeof v.value=="string"){const C=Tc.parse(v,a,c);C&&(b.children=b.children||[],b.children.push(C));continue}if(v instanceof i.YAMLMap){y(b,v);continue}c.push({message:"Sequence items should be strings or maps",range:d(v.range||w.range)})}},y=(b,w)=>{for(const v of w.items){if(b.children=b.children||[],!(v.key instanceof i.Scalar&&typeof v.key.value=="string")){c.push({message:"Only string keys are supported",range:d(v.key.range||w.range)});continue}const A=v.key,C=v.value;if(A.value==="text"){if(!(C instanceof i.Scalar&&typeof C.value=="string")){c.push({message:"Text value should be a string",range:d(v.value.range||w.range)});continue}b.children.push({kind:"text",text:Ah(C.value)});continue}if(A.value==="/children"){if(!(C instanceof i.Scalar&&typeof C.value=="string")||C.value!=="contain"&&C.value!=="equal"&&C.value!=="deep-equal"){c.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:d(v.value.range||w.range)});continue}b.containerMode=C.value;continue}if(A.value.startsWith("/")){if(!(C instanceof i.Scalar&&typeof C.value=="string")){c.push({message:"Property value should be a string",range:d(v.value.range||w.range)});continue}b.props=b.props??{},b.props[A.value.slice(1)]=Ah(C.value);continue}const L=Tc.parse(A,a,c);if(!L)continue;if(C instanceof i.Scalar){const F=typeof C.value;if(F!=="string"&&F!=="number"&&F!=="boolean"){c.push({message:"Node value should be a string or a sequence",range:d(v.value.range||w.range)});continue}b.children.push({...L,children:[{kind:"text",text:Ah(String(C.value))}]});continue}if(C instanceof i.YAMLSeq){b.children.push(L),f(L,C);continue}c.push({message:"Map values should be strings or sequences",range:d(v.value.range||w.range)})}},m={kind:"role",role:"fragment"};return o.errors.forEach(h),c.length?{errors:c,fragment:m}:(o.contents instanceof i.YAMLSeq||c.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:o.contents?d(o.contents.range):[{line:0,col:0},{line:0,col:0}]}),c.length?{errors:c,fragment:m}:(f(m,o.contents),c.length?{errors:c,fragment:jE}:((_=m.children)==null?void 0:_.length)===1&&(!m.containerMode||m.containerMode==="contain")?{fragment:m.children[0],errors:[]}:{fragment:m,errors:[]}))}const jE={kind:"role",role:"fragment"};function T0(i){return i.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function Ah(i){return{raw:i,normalized:T0(i)}}class Tc{static parse(e,t,s){try{return new Tc(e.value)._parse()}catch(a){if(a instanceof I_){const o=t.prettyErrors===!1?a.message:a.message+`:
|
|
106
106
|
|
|
107
107
|
`+e.value+`
|
|
108
108
|
`+" ".repeat(a.pos)+`^
|
|
109
|
-
`;return s.push({message:o,range:[t.lineCounter.linePos(e.range[0]),t.lineCounter.linePos(e.range[0]+a.pos)]}),null}throw a}}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 t=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(t,this._pos)}_readString(){let e="",t=!1;for(;!this._eof();){const s=this._next();if(t)e+=s,t=!1;else if(s==="\\")t=!0;else{if(s==='"')return e;e+=s}}this._throwError("Unterminated string")}_throwError(e,t=0){throw new I_(e,t||this._pos)}_readRegex(){let e="",t=!1,s=!1;for(;!this._eof();){const a=this._next();if(t)e+=a,t=!1;else if(a==="\\")t=!0,e+=a;else{if(a==="/"&&!s)return{pattern:e};a==="["?(s=!0,e+=a):a==="]"&&s?(e+=a,s=!1):e+=a}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),T0(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let t=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),t=this._pos;const s=this._readIdentifier("attribute");this._skipWhitespace();let a="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),t=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)a+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,s,a||"true",t)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const t=this._readStringOrRegex()||"",s={kind:"role",role:e,name:t};return this._readAttributes(s),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),s}_applyAttribute(e,t,s,a){if(t==="checked"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',a),e.checked=s==="true"?!0:s==="false"?!1:"mixed";return}if(t==="disabled"){this._assert(s==="true"||s==="false",'Value of "disabled" attribute must be a boolean',a),e.disabled=s==="true";return}if(t==="expanded"){this._assert(s==="true"||s==="false",'Value of "expanded" attribute must be a boolean',a),e.expanded=s==="true";return}if(t==="active"){this._assert(s==="true"||s==="false",'Value of "active" attribute must be a boolean',a),e.active=s==="true";return}if(t==="level"){this._assert(!isNaN(Number(s)),'Value of "level" attribute must be a number',a),e.level=Number(s);return}if(t==="pressed"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',a),e.pressed=s==="true"?!0:s==="false"?!1:"mixed";return}if(t==="selected"){this._assert(s==="true"||s==="false",'Value of "selected" attribute must be a boolean',a),e.selected=s==="true";return}this._assert(!1,`Unsupported attribute [${t}]`,a)}_assert(e,t,s){e||this._throwError(t||"Assertion error",s)}}class I_ extends Error{constructor(e,t){super(e),this.pos=t}}function HE(i,e){var c,d;function t(h,f,y){let m=1,_=y+m;for(const b of h.children||[])typeof b=="string"?(m++,_++):(m+=t(b,f,_),_+=m);if(!["none","presentation","fragment","iframe","generic"].includes(h.role)&&h.name){let b=f.get(h.role);b||(b=new Map,f.set(h.role,b));const
|
|
109
|
+
`;return s.push({message:o,range:[t.lineCounter.linePos(e.range[0]),t.lineCounter.linePos(e.range[0]+a.pos)]}),null}throw a}}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 t=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(t,this._pos)}_readString(){let e="",t=!1;for(;!this._eof();){const s=this._next();if(t)e+=s,t=!1;else if(s==="\\")t=!0;else{if(s==='"')return e;e+=s}}this._throwError("Unterminated string")}_throwError(e,t=0){throw new I_(e,t||this._pos)}_readRegex(){let e="",t=!1,s=!1;for(;!this._eof();){const a=this._next();if(t)e+=a,t=!1;else if(a==="\\")t=!0,e+=a;else{if(a==="/"&&!s)return{pattern:e};a==="["?(s=!0,e+=a):a==="]"&&s?(e+=a,s=!1):e+=a}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),T0(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let t=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),t=this._pos;const s=this._readIdentifier("attribute");this._skipWhitespace();let a="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),t=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)a+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,s,a||"true",t)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const t=this._readStringOrRegex()||"",s={kind:"role",role:e,name:t};return this._readAttributes(s),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),s}_applyAttribute(e,t,s,a){if(t==="checked"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',a),e.checked=s==="true"?!0:s==="false"?!1:"mixed";return}if(t==="disabled"){this._assert(s==="true"||s==="false",'Value of "disabled" attribute must be a boolean',a),e.disabled=s==="true";return}if(t==="expanded"){this._assert(s==="true"||s==="false",'Value of "expanded" attribute must be a boolean',a),e.expanded=s==="true";return}if(t==="active"){this._assert(s==="true"||s==="false",'Value of "active" attribute must be a boolean',a),e.active=s==="true";return}if(t==="level"){this._assert(!isNaN(Number(s)),'Value of "level" attribute must be a number',a),e.level=Number(s);return}if(t==="pressed"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',a),e.pressed=s==="true"?!0:s==="false"?!1:"mixed";return}if(t==="selected"){this._assert(s==="true"||s==="false",'Value of "selected" attribute must be a boolean',a),e.selected=s==="true";return}this._assert(!1,`Unsupported attribute [${t}]`,a)}_assert(e,t,s){e||this._throwError(t||"Assertion error",s)}}class I_ extends Error{constructor(e,t){super(e),this.pos=t}}function HE(i,e){var c,d;function t(h,f,y){let m=1,_=y+m;for(const b of h.children||[])typeof b=="string"?(m++,_++):(m+=t(b,f,_),_+=m);if(!["none","presentation","fragment","iframe","generic"].includes(h.role)&&h.name){let b=f.get(h.role);b||(b=new Map,f.set(h.role,b));const w=b.get(h.name),v=m*100-y;(!w||w.sizeAndPosition<v)&&b.set(h.name,{node:h,sizeAndPosition:v})}return m}const s=new Map;i&&t(i,s,0);const a=new Map;t(e,a,0);const o=[];for(const[h,f]of a)for(const[y,m]of f)((c=s.get(h))==null?void 0:c.get(y))||o.push(m);return o.sort((h,f)=>f.sizeAndPosition-h.sizeAndPosition),(d=o[0])==null?void 0:d.node}function zE(i){return E0(i)?"'"+i.replace(/'/g,"''")+"'":i}function Ch(i){return E0(i)?'"'+i.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
|
|
110
110
|
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':i}function E0(i){return!!(i.length===0||/^\s|\s$/.test(i)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(i)||/^-/.test(i)||/[\n:](\s|$)/.test(i)||/\s#/.test(i)||/[\n\r]/.test(i)||/^[&*\],?!>|@"'#%]/.test(i)||/[{}`]/.test(i)||/^\[/.test(i)||!isNaN(Number(i))||["y","n","yes","no","true","false","on","off","null"].includes(i.toLowerCase()))}let A0={};function $E(i){A0=i}function yo(i,e){for(;e;){if(i.contains(e))return!0;e=k0(e)}return!1}function St(i){if(i.parentElement)return i.parentElement;if(i.parentNode&&i.parentNode.nodeType===11&&i.parentNode.host)return i.parentNode.host}function C0(i){let e=i;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function k0(i){for(;i.parentElement;)i=i.parentElement;return St(i)}function xr(i,e,t){for(;i;){const s=i.closest(e);if(t&&s!==t&&(s!=null&&s.contains(t)))return;if(s)return s;i=k0(i)}}function Gi(i,e){const t=e==="::before"?Lf:e==="::after"?Of:Df;if(t&&t.has(i))return t.get(i);const s=i.ownerDocument&&i.ownerDocument.defaultView?i.ownerDocument.defaultView.getComputedStyle(i,e):void 0;return t==null||t.set(i,s),s}function N0(i,e){if(e=e??Gi(i),!e)return!0;if(Element.prototype.checkVisibility&&A0.browserNameForWorkarounds!=="webkit"){if(!i.checkVisibility())return!1}else{const t=i.closest("details,summary");if(t!==i&&(t==null?void 0:t.nodeName)==="DETAILS"&&!t.open)return!1}return e.visibility==="visible"}function Ec(i){const e=Gi(i);if(!e)return{visible:!0,inline:!1};const t=e.cursor;if(e.display==="contents"){for(let a=i.firstChild;a;a=a.nextSibling){if(a.nodeType===1&&xn(a))return{visible:!0,inline:!1,cursor:t};if(a.nodeType===3&&M0(a))return{visible:!0,inline:!0,cursor:t}}return{visible:!1,inline:!1,cursor:t}}if(!N0(i,e))return{cursor:t,visible:!1,inline:!1};const s=i.getBoundingClientRect();return{cursor:t,visible:s.width>0&&s.height>0,inline:e.display==="inline"}}function xn(i){return Ec(i).visible}function M0(i){const e=i.ownerDocument.createRange();e.selectNode(i);const t=e.getBoundingClientRect();return t.width>0&&t.height>0}function Je(i){const e=i.tagName;return typeof e=="string"?e.toUpperCase():i instanceof HTMLFormElement?"FORM":i.tagName.toUpperCase()}let Df,Lf,Of,D0=0;function Rf(){++D0,Df??(Df=new Map),Lf??(Lf=new Map),Of??(Of=new Map)}function jf(){--D0||(Df=void 0,Lf=void 0,Of=void 0)}function P_(i){return i.hasAttribute("aria-label")||i.hasAttribute("aria-labelledby")}const U_="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]",BE=[["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 L0(i,e){return BE.some(([t,s])=>!(s!=null&&s.includes(e||""))&&i.hasAttribute(t))}function O0(i){return!Number.isNaN(Number(String(i.getAttribute("tabindex"))))}function IE(i){return!F0(i)&&(PE(i)||O0(i))}function PE(i){const e=Je(i);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?i.hasAttribute("href"):e==="INPUT"?!i.hidden:!1}const kh={A:i=>i.hasAttribute("href")?"link":null,AREA:i=>i.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:i=>xr(i,U_)?null:"contentinfo",FORM:i=>P_(i)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:i=>xr(i,U_)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:i=>i.getAttribute("alt")===""&&!i.getAttribute("title")&&!L0(i)&&!O0(i)?"presentation":"img",INPUT:i=>{const e=i.type.toLowerCase();if(e==="search")return i.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const t=Br(i,i.getAttribute("list"))[0];return t&&Je(t)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":iA[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:i=>P_(i)?"region":null,SELECT:i=>i.hasAttribute("multiple")||i.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:i=>{const e=xr(i,"table"),t=e?Hf(e):"";return t==="grid"||t==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:i=>{const e=i.getAttribute("scope");if(e==="col"||e==="colgroup")return"columnheader";if(e==="row"||e==="rowgroup")return"rowheader";const t=i.nextElementSibling,s=i.previousElementSibling,a=i.parentElement&&Je(i.parentElement)==="TR"?i.parentElement:void 0;if(!t&&!s){if(a){const o=xr(a,"table");if(o&&o.rows.length<=1)return null}return"columnheader"}return q_(t)&&q_(s)?"columnheader":V_(t)||V_(s)?"rowheader":"columnheader"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"};function q_(i){return!!i&&Je(i)==="TH"}function V_(i){var e;return!i||Je(i)!=="TD"?!1:!!((e=i.textContent)!=null&&e.trim()||i.children.length>0)}const UE={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 F_(i){var s;const e=((s=kh[Je(i)])==null?void 0:s.call(kh,i))||"";if(!e)return null;let t=i;for(;t;){const a=St(t),o=UE[Je(t)];if(!o||!a||!o.includes(Je(a)))break;const c=Hf(a);if((c==="none"||c==="presentation")&&!R0(a,c))return c;t=a}return e}const qE=["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 Hf(i){return(i.getAttribute("role")||"").split(" ").map(t=>t.trim()).find(t=>qE.includes(t))||null}function R0(i,e){return L0(i,e)||IE(i)}function lt(i){const e=Hf(i);if(!e)return F_(i);if(e==="none"||e==="presentation"){const t=F_(i);if(R0(i,t))return t}return e}function j0(i){return i===null?void 0:i.toLowerCase()==="true"}function H0(i){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Je(i))}function dn(i){if(H0(i))return!0;const e=Gi(i),t=i.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!t){for(let a=i.firstChild;a;a=a.nextSibling)if(a.nodeType===1&&!dn(a)||a.nodeType===3&&M0(a))return!1;return!0}return!(i.nodeName==="OPTION"&&!!i.closest("select"))&&!t&&!N0(i,e)?!0:z0(i)}function z0(i){let e=Ii==null?void 0:Ii.get(i);if(e===void 0){if(e=!1,i.parentElement&&i.parentElement.shadowRoot&&!i.assignedSlot&&(e=!0),!e){const t=Gi(i);e=!t||t.display==="none"||j0(i.getAttribute("aria-hidden"))===!0}if(!e){const t=St(i);t&&(e=z0(t))}Ii==null||Ii.set(i,e)}return e}function Br(i,e){if(!e)return[];const t=C0(i);if(!t)return[];try{const s=e.split(" ").filter(o=>!!o),a=[];for(const o of s){const c=t.querySelector("#"+CSS.escape(o));c&&!a.includes(c)&&a.push(c)}return a}catch{return[]}}function ri(i){return i.trim()}function oo(i){return i.split(" ").map(e=>e.replace(/\r\n/g,`
|
|
111
|
-
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function G_(i,e){const t=[...i.querySelectorAll(e)];for(const s of Br(i,i.getAttribute("aria-owns")))s.matches(e)&&t.push(s),t.push(...s.querySelectorAll(e));return t}function lo(i,e){const t=e==="::before"?Yf:e==="::after"?Kf:Xf;if(t!=null&&t.has(i))return t==null?void 0:t.get(i);const s=Gi(i,e);let a;if(s){const o=s.content;o&&o!=="none"&&o!=="normal"&&s.display!=="none"&&s.visibility!=="hidden"&&(a=VE(i,o,!!e))}return e&&a!==void 0&&((s==null?void 0:s.display)||"inline")!=="inline"&&(a=" "+a+" "),t&&t.set(i,a),a}function VE(i,e,t){if(!(!e||e==="none"||e==="normal"))try{let s=Ub(e).filter(d=>!(d instanceof bc));const a=s.findIndex(d=>d instanceof _t&&d.value==="/");if(a!==-1)s=s.slice(a+1);else if(!t)return;const o=[];let c=0;for(;c<s.length;)if(s[c]instanceof Af)o.push(s[c].value),c++;else if(c+2<s.length&&s[c]instanceof ro&&s[c].value==="attr"&&s[c+1]instanceof Ef&&s[c+2]instanceof Tf){const d=s[c+1].value;o.push(i.getAttribute(d)||""),c+=3}else return;return o.join("")}catch{}}function $0(i){const e=i.getAttribute("aria-labelledby");if(e===null)return null;const t=Br(i,e);return t.length?t:null}function FE(i,e){const t=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(i),s=e&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(i);return t||s}function _o(i,e){const t=e?Vf:qf;let s=t==null?void 0:t.get(i);return s===void 0&&(s="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(lt(i)||"")||(s=oo(wn(i,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),t==null||t.set(i,s)),s}function X_(i,e){const t=e?Gf:Ff;let s=t==null?void 0:t.get(i);if(s===void 0){if(s="",i.hasAttribute("aria-describedby")){const a=Br(i,i.getAttribute("aria-describedby"));s=oo(a.map(o=>wn(o,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:o,hidden:dn(o)}})).join(" "))}else i.hasAttribute("aria-description")?s=oo(i.getAttribute("aria-description")||""):s=oo(i.getAttribute("title")||"");t==null||t.set(i,s)}return s}function GE(i){const e=i.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function XE(i){if("validity"in i){const e=i.validity;return(e==null?void 0:e.valid)===!1}return!1}function YE(i){const e=Tr;let t=Tr==null?void 0:Tr.get(i);if(t===void 0){t="";const s=GE(i)!=="false",a=XE(i);if(s||a){const o=i.getAttribute("aria-errormessage");t=Br(i,o).map(h=>oo(wn(h,{visitedElements:new Set,embeddedInDescribedBy:{element:h,hidden:dn(h)}}))).join(" ").trim()}e==null||e.set(i,t)}return t}function wn(i,e){var h,f,y,m;if(e.visitedElements.has(i))return"";const t={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const _=!!((h=e.embeddedInLabelledBy)!=null&&h.hidden)||!!((f=e.embeddedInDescribedBy)!=null&&f.hidden)||!!((y=e.embeddedInNativeTextAlternative)!=null&&y.hidden)||!!((m=e.embeddedInLabel)!=null&&m.hidden);if(H0(i)||!_&&dn(i))return e.visitedElements.add(i),""}const s=$0(i);if(!e.embeddedInLabelledBy){const _=(s||[]).map(b=>wn(b,{...e,embeddedInLabelledBy:{element:b,hidden:dn(b)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(_)return _}const a=lt(i)||"",o=Je(i);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const _=[...i.labels||[]].includes(i),b=(s||[]).includes(i);if(!_&&!b){if(a==="textbox")return e.visitedElements.add(i),o==="INPUT"||o==="TEXTAREA"?i.value:i.textContent||"";if(["combobox","listbox"].includes(a)){e.visitedElements.add(i);let x;if(o==="SELECT")x=[...i.selectedOptions],!x.length&&i.options.length&&x.push(i.options[0]);else{const v=a==="combobox"?G_(i,"*").find(T=>lt(T)==="listbox"):i;x=v?G_(v,'[aria-selected="true"]').filter(T=>lt(T)==="option"):[]}return!x.length&&o==="INPUT"?i.value:x.map(v=>wn(v,t)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(a))return e.visitedElements.add(i),i.hasAttribute("aria-valuetext")?i.getAttribute("aria-valuetext")||"":i.hasAttribute("aria-valuenow")?i.getAttribute("aria-valuenow")||"":i.getAttribute("value")||"";if(["menu"].includes(a))return e.visitedElements.add(i),""}}const c=i.getAttribute("aria-label")||"";if(ri(c))return e.visitedElements.add(i),c;if(!["presentation","none"].includes(a)){if(o==="INPUT"&&["button","submit","reset"].includes(i.type)){e.visitedElements.add(i);const _=i.value||"";return ri(_)?_:i.type==="submit"?"Submit":i.type==="reset"?"Reset":i.getAttribute("title")||""}if(o==="INPUT"&&i.type==="file"){e.visitedElements.add(i);const _=i.labels||[];return _.length&&!e.embeddedInLabelledBy?Fa(_,e):"Choose File"}if(o==="INPUT"&&i.type==="image"){e.visitedElements.add(i);const _=i.labels||[];if(_.length&&!e.embeddedInLabelledBy)return Fa(_,e);const b=i.getAttribute("alt")||"";if(ri(b))return b;const x=i.getAttribute("title")||"";return ri(x)?x:"Submit"}if(!s&&o==="BUTTON"){e.visitedElements.add(i);const _=i.labels||[];if(_.length)return Fa(_,e)}if(!s&&o==="OUTPUT"){e.visitedElements.add(i);const _=i.labels||[];return _.length?Fa(_,e):i.getAttribute("title")||""}if(!s&&(o==="TEXTAREA"||o==="SELECT"||o==="INPUT")){e.visitedElements.add(i);const _=i.labels||[];if(_.length)return Fa(_,e);const b=o==="INPUT"&&["text","password","search","tel","email","url"].includes(i.type)||o==="TEXTAREA",x=i.getAttribute("placeholder")||"",v=i.getAttribute("title")||"";return!b||v?v:x}if(!s&&o==="FIELDSET"){e.visitedElements.add(i);for(let b=i.firstElementChild;b;b=b.nextElementSibling)if(Je(b)==="LEGEND")return wn(b,{...t,embeddedInNativeTextAlternative:{element:b,hidden:dn(b)}});return i.getAttribute("title")||""}if(!s&&o==="FIGURE"){e.visitedElements.add(i);for(let b=i.firstElementChild;b;b=b.nextElementSibling)if(Je(b)==="FIGCAPTION")return wn(b,{...t,embeddedInNativeTextAlternative:{element:b,hidden:dn(b)}});return i.getAttribute("title")||""}if(o==="IMG"){e.visitedElements.add(i);const _=i.getAttribute("alt")||"";return ri(_)?_:i.getAttribute("title")||""}if(o==="TABLE"){e.visitedElements.add(i);for(let b=i.firstElementChild;b;b=b.nextElementSibling)if(Je(b)==="CAPTION")return wn(b,{...t,embeddedInNativeTextAlternative:{element:b,hidden:dn(b)}});const _=i.getAttribute("summary")||"";if(_)return _}if(o==="AREA"){e.visitedElements.add(i);const _=i.getAttribute("alt")||"";return ri(_)?_:i.getAttribute("title")||""}if(o==="SVG"||i.ownerSVGElement){e.visitedElements.add(i);for(let _=i.firstElementChild;_;_=_.nextElementSibling)if(Je(_)==="TITLE"&&_.ownerSVGElement)return wn(_,{...t,embeddedInLabelledBy:{element:_,hidden:dn(_)}})}if(i.ownerSVGElement&&o==="A"){const _=i.getAttribute("xlink:title")||"";if(ri(_))return e.visitedElements.add(i),_}}const d=o==="SUMMARY"&&!["presentation","none"].includes(a);if(FE(a,e.embeddedInTargetElement==="descendant")||d||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(i);const _=KE(i,t);if(e.embeddedInTargetElement==="self"?ri(_):_)return _}if(!["presentation","none"].includes(a)||o==="IFRAME"){e.visitedElements.add(i);const _=i.getAttribute("title")||"";if(ri(_))return _}return e.visitedElements.add(i),""}function KE(i,e){const t=[],s=(o,c)=>{var d;if(!(c&&o.assignedSlot))if(o.nodeType===1){const h=((d=Gi(o))==null?void 0:d.display)||"inline";let f=wn(o,e);(h!=="inline"||o.nodeName==="BR")&&(f=" "+f+" "),t.push(f)}else o.nodeType===3&&t.push(o.textContent||"")};t.push(lo(i,"::before")||"");const a=lo(i);if(a!==void 0)t.push(a);else{const o=i.nodeName==="SLOT"?i.assignedNodes():[];if(o.length)for(const c of o)s(c,!1);else{for(let c=i.firstChild;c;c=c.nextSibling)s(c,!0);if(i.shadowRoot)for(let c=i.shadowRoot.firstChild;c;c=c.nextSibling)s(c,!0);for(const c of Br(i,i.getAttribute("aria-owns")))s(c,!0)}}return t.push(lo(i,"::after")||""),t.join("")}const zf=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function B0(i){return Je(i)==="OPTION"?i.selected:zf.includes(lt(i)||"")?j0(i.getAttribute("aria-selected"))===!0:!1}const $f=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function I0(i){const e=Bf(i,!0);return e==="error"?!1:e}function JE(i){return Bf(i,!0)}function WE(i){return Bf(i,!1)}function Bf(i,e){const t=Je(i);if(e&&t==="INPUT"&&i.indeterminate)return"mixed";if(t==="INPUT"&&["checkbox","radio"].includes(i.type))return i.checked;if($f.includes(lt(i)||"")){const s=i.getAttribute("aria-checked");return s==="true"?!0:e&&s==="mixed"?"mixed":!1}return"error"}const ZE=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function QE(i){const e=Je(i);return["INPUT","TEXTAREA","SELECT"].includes(e)?i.hasAttribute("readonly"):ZE.includes(lt(i)||"")?i.getAttribute("aria-readonly")==="true":i.isContentEditable?!1:"error"}const If=["button"];function P0(i){if(If.includes(lt(i)||"")){const e=i.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const Pf=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function U0(i){if(Je(i)==="DETAILS")return i.open;if(Pf.includes(lt(i)||"")){const e=i.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const Uf=["heading","listitem","row","treeitem"];function q0(i){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Je(i)];if(e)return e;if(Uf.includes(lt(i)||"")){const t=i.getAttribute("aria-level"),s=t===null?Number.NaN:Number(t);if(Number.isInteger(s)&&s>=1)return s}return 0}const V0=["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 Ac(i){return F0(i)||G0(i)}function F0(i){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(Je(i))&&(i.hasAttribute("disabled")||eA(i)||tA(i))}function eA(i){return Je(i)==="OPTION"&&!!i.closest("OPTGROUP[DISABLED]")}function tA(i){const e=i==null?void 0:i.closest("FIELDSET[DISABLED]");if(!e)return!1;const t=e.querySelector(":scope > LEGEND");return!t||!t.contains(i)}function G0(i,e=!1){if(!i)return!1;if(e||V0.includes(lt(i)||"")){const t=(i.getAttribute("aria-disabled")||"").toLowerCase();return t==="true"?!0:t==="false"?!1:G0(St(i),!0)}return!1}function Fa(i,e){return[...i].map(t=>wn(t,{...e,embeddedInLabel:{element:t,hidden:dn(t)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(t=>!!t).join(" ")}function nA(i){const e=Jf;let t=i,s;const a=[];for(;t;t=St(t)){const o=e.get(t);if(o!==void 0){s=o;break}a.push(t);const c=Gi(t);if(!c){s=!0;break}const d=c.pointerEvents;if(d){s=d!=="none";break}}s===void 0&&(s=!0);for(const o of a)e.set(o,s);return s}let qf,Vf,Ff,Gf,Tr,Ii,Xf,Yf,Kf,Jf,X0=0;function Hc(){Rf(),++X0,qf??(qf=new Map),Vf??(Vf=new Map),Ff??(Ff=new Map),Gf??(Gf=new Map),Tr??(Tr=new Map),Ii??(Ii=new Map),Xf??(Xf=new Map),Yf??(Yf=new Map),Kf??(Kf=new Map),Jf??(Jf=new Map)}function zc(){--X0||(qf=void 0,Vf=void 0,Ff=void 0,Gf=void 0,Tr=void 0,Ii=void 0,Xf=void 0,Yf=void 0,Kf=void 0,Jf=void 0),jf()}const iA={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};let sA=0;function Y0(i){return i.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:i.refPrefix,includeGenericRole:!0,renderActive:!i.doNotRenderActive,renderCursorPointer:!0}:i.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:i.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function co(i,e){const t=Y0(e),s=new Set,a={root:{role:"fragment",name:"",children:[],props:{},box:Ec(i),receivesPointerEvents:!0},elements:new Map,refs:new Map,iframeRefs:[]};sf(a.root,i);const o=(d,h,f)=>{if(s.has(h))return;if(s.add(h),h.nodeType===Node.TEXT_NODE&&h.nodeValue){if(!f)return;const v=h.nodeValue;d.role!=="textbox"&&v&&d.children.push(h.nodeValue||"");return}if(h.nodeType!==Node.ELEMENT_NODE)return;const y=h,m=!dn(y);let _=m;if(t.visibility==="ariaOrVisible"&&(_=m||xn(y)),t.visibility==="ariaAndVisible"&&(_=m&&xn(y)),t.visibility==="aria"&&!_)return;const b=[];if(y.hasAttribute("aria-owns")){const v=y.getAttribute("aria-owns").split(/\s+/);for(const T of v){const A=i.ownerDocument.getElementById(T);A&&b.push(A)}}const x=_?rA(y,t):null;x&&(x.ref&&(a.elements.set(x.ref,y),a.refs.set(y,x.ref),x.role==="iframe"&&a.iframeRefs.push(x.ref)),d.children.push(x)),c(x||d,y,b,_)};function c(d,h,f,y){var x;const _=(((x=Gi(h))==null?void 0:x.display)||"inline")!=="inline"||h.nodeName==="BR"?" ":"";_&&d.children.push(_),d.children.push(lo(h,"::before")||"");const b=h.nodeName==="SLOT"?h.assignedNodes():[];if(b.length)for(const v of b)o(d,v,y);else{for(let v=h.firstChild;v;v=v.nextSibling)v.assignedSlot||o(d,v,y);if(h.shadowRoot)for(let v=h.shadowRoot.firstChild;v;v=v.nextSibling)o(d,v,y)}for(const v of f)o(d,v,y);if(d.children.push(lo(h,"::after")||""),_&&d.children.push(_),d.children.length===1&&d.name===d.children[0]&&(d.children=[]),d.role==="link"&&h.hasAttribute("href")){const v=h.getAttribute("href");d.props.url=v}if(d.role==="textbox"&&h.hasAttribute("placeholder")&&h.getAttribute("placeholder")!==d.name){const v=h.getAttribute("placeholder");d.props.placeholder=v}}Hc();try{o(a.root,i,!0)}finally{zc()}return oA(a.root),aA(a.root),a}function Y_(i,e){if(e.refs==="none"||e.refs==="interactable"&&(!i.box.visible||!i.receivesPointerEvents))return;const t=Zf(i);let s=t._ariaRef;(!s||s.role!==i.role||s.name!==i.name)&&(s={role:i.role,name:i.name,ref:(e.refPrefix??"")+"e"+ ++sA},t._ariaRef=s),i.ref=s.ref}function rA(i,e){const t=i.ownerDocument.activeElement===i;if(i.nodeName==="IFRAME"){const f={role:"iframe",name:"",children:[],props:{},box:Ec(i),receivesPointerEvents:!0,active:t};return sf(f,i),Y_(f,e),f}const s=e.includeGenericRole?"generic":null,a=lt(i)??s;if(!a||a==="presentation"||a==="none")return null;const o=Nt(_o(i,!1)||""),c=nA(i),d=Ec(i);if(a==="generic"&&d.inline&&i.childNodes.length===1&&i.childNodes[0].nodeType===Node.TEXT_NODE)return null;const h={role:a,name:o,children:[],props:{},box:d,receivesPointerEvents:c,active:t};return sf(h,i),Y_(h,e),$f.includes(a)&&(h.checked=I0(i)),V0.includes(a)&&(h.disabled=Ac(i)),Pf.includes(a)&&(h.expanded=U0(i)),Uf.includes(a)&&(h.level=q0(i)),If.includes(a)&&(h.pressed=P0(i)),zf.includes(a)&&(h.selected=B0(i)),(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)&&i.type!=="checkbox"&&i.type!=="radio"&&i.type!=="file"&&(h.children=[i.value]),h}function aA(i){const e=t=>{const s=[];for(const o of t.children||[]){if(typeof o=="string"){s.push(o);continue}const c=e(o);s.push(...c)}return t.role==="generic"&&!t.name&&s.length<=1&&s.every(o=>typeof o!="string"&&!!o.ref)?s:(t.children=s,[t])};e(i)}function oA(i){const e=(s,a)=>{if(!s.length)return;const o=Nt(s.join(""));o&&a.push(o),s.length=0},t=s=>{const a=[],o=[];for(const c of s.children||[])typeof c=="string"?o.push(c):(e(o,a),t(c),a.push(c));e(o,a),s.children=a.length?a:[],s.children.length===1&&s.children[0]===s.name&&(s.children=[])};t(i)}function lA(i,e){return e?i?typeof e=="string"?i===e:!!i.match(new RegExp(e.pattern)):!1:!0}function K_(i,e){if(!(e!=null&&e.normalized))return!0;if(!i)return!1;if(i===e.normalized||i===e.raw)return!0;const t=cA(e);return t?!!i.match(t):!1}const Nh=Symbol("cachedRegex");function cA(i){if(i[Nh]!==void 0)return i[Nh];const{raw:e}=i,t=e.startsWith("/")&&e.endsWith("/")&&e.length>1;let s;try{s=t?new RegExp(e.slice(1,-1)):null}catch{s=null}return i[Nh]=s,s}function uA(i,e){const t=co(i,{mode:"expect"});return{matches:K0(t.root,e,!1,!1),received:{raw:uo(t,{mode:"expect"}),regex:uo(t,{mode:"codegen"})}}}function dA(i,e){const t=co(i,{mode:"expect"}).root;return K0(t,e,!0,!1).map(a=>Zf(a))}function Wf(i,e,t){var s;return typeof i=="string"&&e.kind==="text"?K_(i,e.text):i===null||typeof i!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==i.role||e.checked!==void 0&&e.checked!==i.checked||e.disabled!==void 0&&e.disabled!==i.disabled||e.expanded!==void 0&&e.expanded!==i.expanded||e.level!==void 0&&e.level!==i.level||e.pressed!==void 0&&e.pressed!==i.pressed||e.selected!==void 0&&e.selected!==i.selected||!lA(i.name,e.name)||!K_(i.props.url,(s=e.props)==null?void 0:s.url)?!1:e.containerMode==="contain"?W_(i.children||[],e.children||[]):e.containerMode==="equal"?J_(i.children||[],e.children||[],!1):e.containerMode==="deep-equal"||t?J_(i.children||[],e.children||[],!0):W_(i.children||[],e.children||[])}function J_(i,e,t){if(e.length!==i.length)return!1;for(let s=0;s<e.length;++s)if(!Wf(i[s],e[s],t))return!1;return!0}function W_(i,e){if(e.length>i.length)return!1;const t=i.slice(),s=e.slice();for(const a of s){let o=t.shift();for(;o&&!Wf(o,a,!1);)o=t.shift();if(!o)return!1}return!0}function K0(i,e,t,s){const a=[],o=(c,d)=>{if(Wf(c,e,s)){const h=typeof c=="string"?d:c;return h&&a.push(h),!t}if(typeof c=="string")return!1;for(const h of c.children||[])if(o(h,c))return!0;return!1};return o(i,null),a}function J0(i,e=new Map){i!=null&&i.ref&&e.set(i.ref,i);for(const t of(i==null?void 0:i.children)||[])typeof t!="string"&&J0(t,e);return e}function hA(i,e){var o;const t=J0(e==null?void 0:e.root),s=new Map,a=(c,d)=>{let h=c.children.length===(d==null?void 0:d.children.length)&&OE(c,d),f=h;for(let y=0;y<c.children.length;y++){const m=c.children[y],_=d==null?void 0:d.children[y];if(typeof m=="string")h&&(h=m===_),f&&(f=m===_);else{let b=typeof _!="string"?_:void 0;m.ref&&(b=t.get(m.ref));const x=a(m,b);(!b||!x&&!m.ref||b!==_)&&(f=!1),h&&(h=x&&b===_)}}return s.set(c,h?"same":f?"skip":"changed"),h};return a(i.root,t.get((o=e==null?void 0:e.root)==null?void 0:o.ref)),s}function fA(i,e){const t=[],s=a=>{const o=e.get(a);if(o!=="same")if(o==="skip")for(const c of a.children)typeof c!="string"&&s(c);else t.push(a)};for(const a of i)typeof a=="string"?t.push(a):s(a);return t}function uo(i,e,t){const s=Y0(e),a=[],o=s.renderStringsAsRegex?pA:()=>!0,c=s.renderStringsAsRegex?gA:b=>b;let d=i.root.role==="fragment"?i.root.children:[i.root];const h=hA(i,t);t&&(d=fA(d,h));const f=(b,x)=>{const v=Ch(c(b));v&&a.push(x+"- text: "+v)},y=(b,x)=>{let v=b.role;if(b.name&&b.name.length<=900){const T=c(b.name);if(T){const A=T.startsWith("/")&&T.endsWith("/")?T:JSON.stringify(T);v+=" "+A}}return b.checked==="mixed"&&(v+=" [checked=mixed]"),b.checked===!0&&(v+=" [checked]"),b.disabled&&(v+=" [disabled]"),b.expanded&&(v+=" [expanded]"),b.active&&s.renderActive&&(v+=" [active]"),b.level&&(v+=` [level=${b.level}]`),b.pressed==="mixed"&&(v+=" [pressed=mixed]"),b.pressed===!0&&(v+=" [pressed]"),b.selected===!0&&(v+=" [selected]"),b.ref&&(v+=` [ref=${b.ref}]`,x&&xc(b)&&(v+=" [cursor=pointer]")),v},m=b=>(b==null?void 0:b.children.length)===1&&typeof b.children[0]=="string"&&!Object.keys(b.props).length?b.children[0]:void 0,_=(b,x,v)=>{if(h.get(b)==="same"&&b.ref){a.push(x+`- ref=${b.ref} [unchanged]`);return}const T=!!t&&!x,A=x+"- "+(T?"<changed> ":"")+zE(y(b,v)),C=m(b);if(!b.children.length&&!Object.keys(b.props).length)a.push(A);else if(C!==void 0)o(b,C)?a.push(A+": "+Ch(c(C))):a.push(A);else{a.push(A+":");for(const[D,F]of Object.entries(b.props))a.push(x+" - /"+D+": "+Ch(F));const L=x+" ",j=!!b.ref&&v&&xc(b);for(const D of b.children)typeof D=="string"?f(o(b,D)?D:"",L):_(D,L,v&&!j)}};for(const b of d)typeof b=="string"?f(b,""):_(b,"",!!s.renderCursorPointer);return a.join(`
|
|
112
|
-
`)}function gA(i){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 t="",s=0;const a=new RegExp(e.map(o=>"("+o.regex.source+")").join("|"),"g");return i.replace(a,(o,...c)=>{const d=c[c.length-2],h=c.slice(0,-2);t+=Sc(i.slice(s,d));for(let f=0;f<h.length;f++)if(h[f]){const{replacement:y}=e[f];t+=y;break}return s=d+o.length,o}),t?(t+=Sc(i.slice(s)),String(new RegExp(t))):i}function pA(i,e){if(!e.length)return!1;if(!i.name)return!0;if(i.name.length>e.length)return!1;const t=e.length<=200&&i.name.length<=200?Jx(e,i.name):"";let s=e;for(;t&&s.includes(t);)s=s.replace(t,"");return s.trim().length/e.length>.1}const W0=Symbol("element");function Zf(i){return i[W0]}function sf(i,e){i[W0]=e}function mA(i,e){const t=HE(i,e);return t?Zf(t):void 0}const Z_=":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;min-height:150px;max-height:80vh;max-width:80vw;resize:both;overflow:hidden}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.record.toggled>x-div{clip-path:url(#icon-stop-circle)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.visual-snapshot>x-div{clip-path:url(#icon-snapshot)}x-pw-tool-item.table>x-div{clip-path:url(#icon-table)}x-pw-tool-item.file-upload>x-div{clip-path:url(#icon-file-upload)}x-pw-tool-item.customjson>x-div{clip-path:url(#icon-brackets)}x-pw-tool-item.assert-api-payload>x-div{clip-path:url(#icon-braces-dashes)}x-pw-tool-item.assert-api-payload.toggled>x-div{background-color:#1a73e8}x-pw-tool-item.customjson.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.customjson.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.modular>x-div{clip-path:url(#icon-list-tree);background-color:#3a3a3a}x-pw-tool-item.modular.toggled{background-color:transparent}x-pw-tool-item.modular.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.modular.toggled>x-div{background-color:#1a73e8}x-pw-tool-item.modular.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.modular.disabled.toggled>x-div{opacity:.8}@keyframes modular-pulse{0%{box-shadow:0 0 #1a73e866}70%{box-shadow:0 0 0 4px #1a73e800}to{box-shadow:0 0 #1a73e800}}x-pw-tool-item.modular.toggled{animation:modular-pulse 2s infinite}x-pw-tool-item.drag-record>x-div{clip-path:url(#icon-move)}x-pw-tool-item.gojs-link>x-div{clip-path:url(#icon-gojs-link)}x-pw-tool-item.area-select>x-div{clip-path:url(#icon-selection)}x-pw-tool-item.mouse-path>x-div{clip-path:url(#icon-sketch-tool);transform:scale(.16);transform-origin:0 0;width:100px!important;height:100px!important}x-pw-tool-item.mouse-path.toggled>x-div{background-color:#dc3545}x-pw-tool-item.sketch-tool>x-div{clip-path:url(#icon-sketch-tool);transform:scale(.16);transform-origin:0 0;width:100px!important;height:100px!important}x-pw-tool-item.sketch-tool.toggled>x-div{background-color:#dc3545}x-pw-tool-item.pointer-events>x-div{clip-path:url(#icon-layers)}x-pw-tool-item.pointer-events>x-div{clip-path:url(#icon-layers)}.pw-sketch-tool-cursor{cursor:pointer!important}.pw-deletion-trail{position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:2147483646}.pw-deletion-path{stroke:#dc354580;stroke-width:20;stroke-linecap:round;stroke-linejoin:round;fill:none}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 Mh{constructor(e){this._renderedEntries=[],this._language="javascript",this._injectedScript=e;const t=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=t.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=t.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const s=new this._injectedScript.window.CSSStyleSheet;s.replaceSync(Z_),this._glassPaneShadow.adoptedStyleSheets.push(s)}else{const s=this._injectedScript.document.createElement("style");s.textContent=Z_,this._glassPaneShadow.appendChild(s)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&(!this._injectedScript.document.documentElement.contains(this._glassPaneElement)||this._glassPaneElement.nextElementSibling)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(e){this._language=e}runHighlightOnRaf(e){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest);const t=this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),s=qi(this._language,Rn(e)),a=t.length>1?"#f6b26b7f":"#6fa8dc7f";this.updateHighlight(t.map((o,c)=>{const d=t.length>1?` [${c+1} of ${t.length}]`:"";return{element:o,color:a,tooltipText:s+d}})),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,t){this._actionPointElement.style.top=t+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,t;for(const s of this._renderedEntries)(e=s.highlightElement)==null||e.remove(),(t=s.tooltipElement)==null||t.remove();this._renderedEntries=[]}maskElements(e,t){this.updateHighlight(e.map(s=>({element:s,color:t})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const t of e){const s=this._createHighlightElement();this._glassPaneShadow.appendChild(s);let a;if(t.tooltipText){a=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(a),a.style.top="0",a.style.left="0",a.style.display="flex";const o=this._injectedScript.document.createElement("x-pw-tooltip-line");o.textContent=t.tooltipText,a.appendChild(o)}this._renderedEntries.push({targetElement:t.element,color:t.color,tooltipElement:a,highlightElement:s})}for(const t of this._renderedEntries){if(t.box=t.targetElement.getBoundingClientRect(),!t.tooltipElement)continue;const{anchorLeft:s,anchorTop:a}=this.tooltipPosition(t.box,t.tooltipElement);t.tooltipTop=a,t.tooltipLeft=s}for(const t of this._renderedEntries){t.tooltipElement&&(t.tooltipElement.style.top=t.tooltipTop+"px",t.tooltipElement.style.left=t.tooltipLeft+"px");const s=t.box;t.highlightElement.style.backgroundColor=t.color,t.highlightElement.style.left=s.x+"px",t.highlightElement.style.top=s.y+"px",t.highlightElement.style.width=s.width+"px",t.highlightElement.style.height=s.height+"px",t.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:s.x,y:s.y,width:s.width,height:s.height}))}}}firstBox(){var e;return(e=this._renderedEntries[0])==null?void 0:e.box}firstTooltipBox(){const e=this._renderedEntries[0];if(!(!e||!e.tooltipElement||e.tooltipLeft===void 0||e.tooltipTop===void 0))return{x:e.tooltipLeft,y:e.tooltipTop,left:e.tooltipLeft,top:e.tooltipTop,width:e.tooltipElement.offsetWidth,height:e.tooltipElement.offsetHeight,bottom:e.tooltipTop+e.tooltipElement.offsetHeight,right:e.tooltipLeft+e.tooltipElement.offsetWidth,toJSON:()=>{}}}tooltipPosition(e,t){const s=t.offsetWidth,a=t.offsetHeight,o=this._glassPaneElement.offsetWidth,c=this._glassPaneElement.offsetHeight;let d=Math.max(5,e.left);d+s>o-5&&(d=o-s-5);let h=Math.max(0,e.bottom)+5;return h+a>c-5&&(Math.max(0,e.top)>a+5?h=Math.max(0,e.top)-a-5:h=c-5-a),{anchorLeft:d,anchorTop:h}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let t=0;t<this._renderedEntries.length;++t){if(e[t].element!==this._renderedEntries[t].targetElement||e[t].color!==this._renderedEntries[t].color)return!1;const s=this._renderedEntries[t].box;if(!s)return!1;const a=e[t].element.getBoundingClientRect();if(a.top!==s.top||a.right!==s.right||a.bottom!==s.bottom||a.left!==s.left)return!1}return!0}_createHighlightElement(){return this._injectedScript.document.createElement("x-pw-highlight")}appendChild(e){this._glassPaneShadow.appendChild(e)}onGlassPaneClick(e){this._glassPaneElement.style.pointerEvents="auto",this._glassPaneElement.style.backgroundColor="rgba(0, 0, 0, 0.3)",this._glassPaneElement.addEventListener("click",e)}offGlassPaneClick(e){this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.backgroundColor="transparent",this._glassPaneElement.removeEventListener("click",e)}}function yA(i,e,t){const s=i.left-e.right;if(!(s<0||t!==void 0&&s>t))return s+Math.max(e.bottom-i.bottom,0)+Math.max(i.top-e.top,0)}function _A(i,e,t){const s=e.left-i.right;if(!(s<0||t!==void 0&&s>t))return s+Math.max(e.bottom-i.bottom,0)+Math.max(i.top-e.top,0)}function bA(i,e,t){const s=e.top-i.bottom;if(!(s<0||t!==void 0&&s>t))return s+Math.max(i.left-e.left,0)+Math.max(e.right-i.right,0)}function vA(i,e,t){const s=i.top-e.bottom;if(!(s<0||t!==void 0&&s>t))return s+Math.max(i.left-e.left,0)+Math.max(e.right-i.right,0)}function SA(i,e,t){const s=t===void 0?50:t;let a=0;return i.left-e.right>=0&&(a+=i.left-e.right),e.left-i.right>=0&&(a+=e.left-i.right),e.top-i.bottom>=0&&(a+=e.top-i.bottom),i.top-e.bottom>=0&&(a+=i.top-e.bottom),a>s?void 0:a}const wA=["left-of","right-of","above","below","near"];function Z0(i,e,t,s){const a=e.getBoundingClientRect(),o={"left-of":_A,"right-of":yA,above:bA,below:vA,near:SA}[i];let c;for(const d of t){if(d===e)continue;const h=o(a,d.getBoundingClientRect(),s);h!==void 0&&(c===void 0||h<c)&&(c=h)}return c}function Q0(i,e){for(const t of e.jsonPath)i!=null&&(i=i[t]);return ev(i,e)}function ev(i,e){const t=typeof i=="string"&&!e.caseSensitive?i.toUpperCase():i,s=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!t:e.op==="="?s instanceof RegExp?typeof t=="string"&&!!t.match(s):t===s:typeof t!="string"||typeof s!="string"?!1:e.op==="*="?t.includes(s):e.op==="^="?t.startsWith(s):e.op==="$="?t.endsWith(s):e.op==="|="?t===s||t.startsWith(s+"-"):e.op==="~="?t.split(" ").includes(s):!1}function Qf(i){const e=i.ownerDocument;return i.nodeName==="SCRIPT"||i.nodeName==="NOSCRIPT"||i.nodeName==="STYLE"||e.head&&e.head.contains(i)}function Ut(i,e){let t=i.get(e);if(t===void 0){if(t={full:"",normalized:"",immediate:[]},!Qf(e)){let s="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))t={full:e.value,normalized:Nt(e.value),immediate:[e.value]};else{for(let a=e.firstChild;a;a=a.nextSibling)if(a.nodeType===Node.TEXT_NODE)t.full+=a.nodeValue||"",s+=a.nodeValue||"";else{if(a.nodeType===Node.COMMENT_NODE)continue;s&&t.immediate.push(s),s="",a.nodeType===Node.ELEMENT_NODE&&(t.full+=Ut(i,a).full)}s&&t.immediate.push(s),e.shadowRoot&&(t.full+=Ut(i,e.shadowRoot).full),t.full&&(t.normalized=Nt(t.full))}}i.set(e,t)}return t}function $c(i,e,t){if(Qf(e)||!t(Ut(i,e)))return"none";for(let s=e.firstChild;s;s=s.nextSibling)if(s.nodeType===Node.ELEMENT_NODE&&t(Ut(i,s)))return"selfAndChildren";return e.shadowRoot&&t(Ut(i,e.shadowRoot))?"selfAndChildren":"self"}function tv(i,e){const t=$0(e);if(t)return t.map(o=>Ut(i,o));const s=e.getAttribute("aria-label");if(s!==null&&s.trim())return[{full:s,normalized:Nt(s),immediate:[s]}];const a=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||a){const o=e.labels;if(o)return[...o].map(c=>Ut(i,c))}return[]}function Q_(i){return i.displayName||i.name||"Anonymous"}function xA(i){if(i.type)switch(typeof i.type){case"function":return Q_(i.type);case"string":return i.type;case"object":return i.type.displayName||(i.type.render?Q_(i.type.render):"")}if(i._currentElement){const e=i._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function TA(i){var e;return i.key??((e=i._currentElement)==null?void 0:e.key)}function EA(i){if(i.child){const t=[];for(let s=i.child;s;s=s.sibling)t.push(s);return t}if(!i._currentElement)return[];const e=t=>{var a;const s=(a=t._currentElement)==null?void 0:a.type;return typeof s=="function"||typeof s=="string"};if(i._renderedComponent){const t=i._renderedComponent;return e(t)?[t]:[]}return i._renderedChildren?[...Object.values(i._renderedChildren)].filter(e):[]}function AA(i){var s;const e=i.memoizedProps||((s=i._currentElement)==null?void 0:s.props);if(!e||typeof e=="string")return e;const t={...e};return delete t.children,t}function nv(i){var s;const e={key:TA(i),name:xA(i),children:EA(i).map(nv),rootElements:[],props:AA(i)},t=i.stateNode||i._hostNode||((s=i._renderedComponent)==null?void 0:s._hostNode);if(t instanceof Element)e.rootElements.push(t);else for(const a of e.children)e.rootElements.push(...a.rootElements);return e}function iv(i,e,t=[]){e(i)&&t.push(i);for(const s of i.children)iv(s,e,t);return t}function sv(i,e=[]){const s=(i.ownerDocument||i).createTreeWalker(i,NodeFilter.SHOW_ELEMENT);do{const a=s.currentNode,o=a,c=Object.keys(o).find(h=>h.startsWith("__reactContainer")&&o[h]!==null);if(c)e.push(o[c].stateNode.current);else{const h="_reactRootContainer";o.hasOwnProperty(h)&&o[h]!==null&&e.push(o[h]._internalRoot.current)}if(a instanceof Element&&a.hasAttribute("data-reactroot"))for(const h of Object.keys(a))(h.startsWith("__reactInternalInstance")||h.startsWith("__reactFiber"))&&e.push(a[h]);const d=a instanceof Element?a.shadowRoot:null;d&&sv(d,e)}while(s.nextNode());return e}const CA=()=>({queryAll(i,e){const{name:t,attributes:s}=xs(e,!1),c=sv(i.ownerDocument||i).map(h=>nv(h)).map(h=>iv(h,f=>{const y=f.props??{};if(f.key!==void 0&&(y.key=f.key),t&&f.name!==t||f.rootElements.some(m=>!yo(i,m)))return!1;for(const m of s)if(!Q0(y,m))return!1;return!0})).flat(),d=new Set;for(const h of c)for(const f of h.rootElements)d.add(f);return[...d]}}),rv=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];rv.sort();function Ga(i,e,t){if(!e.includes(t))throw new Error(`"${i}" attribute is only supported for roles: ${e.slice().sort().map(s=>`"${s}"`).join(", ")}`)}function pr(i,e){if(i.op!=="<truthy>"&&!e.includes(i.value))throw new Error(`"${i.name}" must be one of ${e.map(t=>JSON.stringify(t)).join(", ")}`)}function mr(i,e){if(!e.includes(i.op))throw new Error(`"${i.name}" does not support "${i.op}" matcher`)}function kA(i,e){const t={role:e};for(const s of i)switch(s.name){case"checked":{Ga(s.name,$f,e),pr(s,[!0,!1,"mixed"]),mr(s,["<truthy>","="]),t.checked=s.op==="<truthy>"?!0:s.value;break}case"pressed":{Ga(s.name,If,e),pr(s,[!0,!1,"mixed"]),mr(s,["<truthy>","="]),t.pressed=s.op==="<truthy>"?!0:s.value;break}case"selected":{Ga(s.name,zf,e),pr(s,[!0,!1]),mr(s,["<truthy>","="]),t.selected=s.op==="<truthy>"?!0:s.value;break}case"expanded":{Ga(s.name,Pf,e),pr(s,[!0,!1]),mr(s,["<truthy>","="]),t.expanded=s.op==="<truthy>"?!0:s.value;break}case"level":{if(Ga(s.name,Uf,e),typeof s.value=="string"&&(s.value=+s.value),s.op!=="="||typeof s.value!="number"||Number.isNaN(s.value))throw new Error('"level" attribute must be compared to a number');t.level=s.value;break}case"disabled":{pr(s,[!0,!1]),mr(s,["<truthy>","="]),t.disabled=s.op==="<truthy>"?!0:s.value;break}case"name":{if(s.op==="<truthy>")throw new Error('"name" attribute must have a value');if(typeof s.value!="string"&&!(s.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');t.name=s.value,t.nameOp=s.op,t.exact=s.caseSensitive;break}case"include-hidden":{pr(s,[!0,!1]),mr(s,["<truthy>","="]),t.includeHidden=s.op==="<truthy>"?!0:s.value;break}default:throw new Error(`Unknown attribute "${s.name}", must be one of ${rv.map(a=>`"${a}"`).join(", ")}.`)}return t}function NA(i,e,t){const s=[],a=c=>{if(lt(c)===e.role&&!(e.selected!==void 0&&B0(c)!==e.selected)&&!(e.checked!==void 0&&I0(c)!==e.checked)&&!(e.pressed!==void 0&&P0(c)!==e.pressed)&&!(e.expanded!==void 0&&U0(c)!==e.expanded)&&!(e.level!==void 0&&q0(c)!==e.level)&&!(e.disabled!==void 0&&Ac(c)!==e.disabled)&&!(!e.includeHidden&&dn(c))){if(e.name!==void 0){const d=Nt(_o(c,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=Nt(e.name)),t&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!ev(d,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}s.push(c)}},o=c=>{const d=[];c.shadowRoot&&d.push(c.shadowRoot);for(const h of c.querySelectorAll("*"))a(h),h.shadowRoot&&d.push(h.shadowRoot);d.forEach(o)};return o(i),s}function eb(i){return{queryAll:(e,t)=>{const s=xs(t,!0),a=s.name.toLowerCase();if(!a)throw new Error("Role must not be empty");const o=kA(s.attributes,a);Hc();try{return NA(e,o,i)}finally{zc()}}}}class MA{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",OA),this._engines.set("is",to),this._engines.set("where",to),this._engines.set("has",DA),this._engines.set("scope",LA),this._engines.set("light",RA),this._engines.set("visible",jA),this._engines.set("text",HA),this._engines.set("text-is",zA),this._engines.set("text-matches",$A),this._engines.set("has-text",BA),this._engines.set("right-of",Xa("right-of")),this._engines.set("left-of",Xa("left-of")),this._engines.set("above",Xa("above")),this._engines.set("below",Xa("below")),this._engines.set("near",Xa("near")),this._engines.set("nth-match",IA);const e=[...this._engines.keys()];e.sort();const t=[...a0];if(t.sort(),e.join("|")!==t.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join("|")} vs ${t.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,t,s,a){e.has(t)||e.set(t,[]);const o=e.get(t),c=o.find(h=>s.every((f,y)=>h.rest[y]===f));if(c)return c.result;const d=a();return o.push({rest:s,result:d}),d}_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,t,s){const a=this._checkSelector(t);this.begin();try{return this._cached(this._cacheMatches,e,[a,s.scope,s.pierceShadow,s.originalScope],()=>Array.isArray(a)?this._matchesEngine(to,e,a,s):(this._hasScopeClause(a)&&(s=this._expandContextForScopeMatching(s)),this._matchesSimple(e,a.simples[a.simples.length-1].selector,s)?this._matchesParents(e,a,a.simples.length-2,s):!1))}finally{this.end()}}query(e,t){const s=this._checkSelector(t);this.begin();try{return this._cached(this._cacheQuery,s,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(s))return this._queryEngine(to,e,s);this._hasScopeClause(s)&&(e=this._expandContextForScopeMatching(e));const a=this._scoreMap;this._scoreMap=new Map;let o=this._querySimple(e,s.simples[s.simples.length-1].selector);return o=o.filter(c=>this._matchesParents(c,s,s.simples.length-2,e)),this._scoreMap.size&&o.sort((c,d)=>{const h=this._scoreMap.get(c),f=this._scoreMap.get(d);return h===f?0:h===void 0?1:f===void 0?-1:h-f}),this._scoreMap=a,o})}finally{this.end()}}_markScore(e,t){this._scoreMap&&this._scoreMap.set(e,t)}_hasScopeClause(e){return e.simples.some(t=>t.selector.functions.some(s=>s.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const t=St(e.scope);return t?{...e,scope:t,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,t,s){return this._cached(this._cacheMatchesSimple,e,[t,s.scope,s.pierceShadow,s.originalScope],()=>{if(e===s.scope||t.css&&!this._matchesCSS(e,t.css))return!1;for(const a of t.functions)if(!this._matchesEngine(this._getEngine(a.name),e,a.args,s))return!1;return!0})}_querySimple(e,t){return t.functions.length?this._cached(this._cacheQuerySimple,t,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=t.css;const a=t.functions;s==="*"&&a.length&&(s=void 0);let o,c=-1;s!==void 0?o=this._queryCSS(e,s):(c=a.findIndex(d=>this._getEngine(d.name).query!==void 0),c===-1&&(c=0),o=this._queryEngine(this._getEngine(a[c].name),e,a[c].args));for(let d=0;d<a.length;d++){if(d===c)continue;const h=this._getEngine(a[d].name);h.matches!==void 0&&(o=o.filter(f=>this._matchesEngine(h,f,a[d].args,e)))}for(let d=0;d<a.length;d++){if(d===c)continue;const h=this._getEngine(a[d].name);h.matches===void 0&&(o=o.filter(f=>this._matchesEngine(h,f,a[d].args,e)))}return o}):this._queryCSS(e,t.css||"*")}_matchesParents(e,t,s,a){return s<0?!0:this._cached(this._cacheMatchesParents,e,[t,s,a.scope,a.pierceShadow,a.originalScope],()=>{const{selector:o,combinator:c}=t.simples[s];if(c===">"){const d=Gl(e,a);return!d||!this._matchesSimple(d,o,a)?!1:this._matchesParents(d,t,s-1,a)}if(c==="+"){const d=Dh(e,a);return!d||!this._matchesSimple(d,o,a)?!1:this._matchesParents(d,t,s-1,a)}if(c===""){let d=Gl(e,a);for(;d;){if(this._matchesSimple(d,o,a)){if(this._matchesParents(d,t,s-1,a))return!0;if(t.simples[s-1].combinator==="")break}d=Gl(d,a)}return!1}if(c==="~"){let d=Dh(e,a);for(;d;){if(this._matchesSimple(d,o,a)){if(this._matchesParents(d,t,s-1,a))return!0;if(t.simples[s-1].combinator==="~")break}d=Dh(d,a)}return!1}if(c===">="){let d=e;for(;d;){if(this._matchesSimple(d,o,a)){if(this._matchesParents(d,t,s-1,a))return!0;if(t.simples[s-1].combinator==="")break}d=Gl(d,a)}return!1}throw new Error(`Unsupported combinator "${c}"`)})}_matchesEngine(e,t,s,a){if(e.matches)return this._callMatches(e,t,s,a);if(e.query)return this._callQuery(e,s,a).includes(t);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,t,s){if(e.query)return this._callQuery(e,s,t);if(e.matches)return this._queryCSS(t,"*").filter(a=>this._callMatches(e,a,s,t));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,t,s,a){return this._cached(this._cacheCallMatches,t,[e,a.scope,a.pierceShadow,a.originalScope,...s],()=>e.matches(t,s,a,this))}_callQuery(e,t,s){return this._cached(this._cacheCallQuery,e,[s.scope,s.pierceShadow,s.originalScope,...t],()=>e.query(s,t,this))}_matchesCSS(e,t){return e.matches(t)}_queryCSS(e,t){return this._cached(this._cacheQueryCSS,t,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=[];function a(o){if(s=s.concat([...o.querySelectorAll(t)]),!!e.pierceShadow){o.shadowRoot&&a(o.shadowRoot);for(const c of o.querySelectorAll("*"))c.shadowRoot&&a(c.shadowRoot)}}return a(e.scope),s})}_getEngine(e){const t=this._engines.get(e);if(!t)throw new Error(`Unknown selector engine "${e}"`);return t}}const to={matches(i,e,t,s){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(a=>s.matches(i,a,t))},query(i,e,t){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let s=[];for(const a of e)s=s.concat(t.query(i,a));return e.length===1?s:av(s)}},DA={matches(i,e,t,s){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return s.query({...t,scope:i},e).length>0}},LA={matches(i,e,t,s){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const a=t.originalScope||t.scope;return a.nodeType===9?i===a.documentElement:i===a},query(i,e,t){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const s=i.originalScope||i.scope;if(s.nodeType===9){const a=s.documentElement;return a?[a]:[]}return s.nodeType===1?[s]:[]}},OA={matches(i,e,t,s){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!s.matches(i,e,t)}},RA={query(i,e,t){return t.query({...i,pierceShadow:!1},e)},matches(i,e,t,s){return s.matches(i,e,{...t,pierceShadow:!1})}},jA={matches(i,e,t,s){if(e.length)throw new Error('"visible" engine expects no arguments');return xn(i)}},HA={matches(i,e,t,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const a=Nt(e[0]).toLowerCase(),o=c=>c.normalized.toLowerCase().includes(a);return $c(s._cacheText,i,o)==="self"}},zA={matches(i,e,t,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const a=Nt(e[0]),o=c=>!a&&!c.immediate.length?!0:c.immediate.some(d=>Nt(d)===a);return $c(s._cacheText,i,o)!=="none"}},$A={matches(i,e,t,s){if(e.length===0||typeof e[0]!="string"||e.length>2||e.length===2&&typeof e[1]!="string")throw new Error('"text-matches" engine expects a regexp body and optional regexp flags');const a=new RegExp(e[0],e.length===2?e[1]:void 0),o=c=>a.test(c.full);return $c(s._cacheText,i,o)==="self"}},BA={matches(i,e,t,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(Qf(i))return!1;const a=Nt(e[0]).toLowerCase();return(c=>c.normalized.toLowerCase().includes(a))(Ut(s._cacheText,i))}};function Xa(i){return{matches(e,t,s,a){const o=t.length&&typeof t[t.length-1]=="number"?t[t.length-1]:void 0,c=o===void 0?t:t.slice(0,t.length-1);if(t.length<1+(o===void 0?0:1))throw new Error(`"${i}" engine expects a selector list and optional maximum distance in pixels`);const d=a.query(s,c),h=Z0(i,e,d,o);return h===void 0?!1:(a._markScore(e,h),!0)}}}const IA={query(i,e,t){let s=e[e.length-1];if(e.length<2)throw new Error('"nth-match" engine expects non-empty selector list and an index argument');if(typeof s!="number"||s<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const a=to.query(i,e.slice(0,e.length-1),t);return s--,s<a.length?[a[s]]:[]}};function Gl(i,e){if(i!==e.scope)return e.pierceShadow?St(i):i.parentElement||void 0}function Dh(i,e){if(i!==e.scope)return i.previousElementSibling||void 0}function av(i){const e=new Map,t=[],s=[];function a(c){let d=e.get(c);if(d)return d;const h=St(c);return h?a(h).children.push(c):t.push(c),d={children:[],taken:!1},e.set(c,d),d}for(const c of i)a(c).taken=!0;function o(c){const d=e.get(c);if(d.taken&&s.push(c),d.children.length>1){const h=new Set(d.children);d.children=[];let f=c.firstElementChild;for(;f&&d.children.length<h.size;)h.has(f)&&d.children.push(f),f=f.nextElementSibling;for(f=c.shadowRoot?c.shadowRoot.firstElementChild:null;f&&d.children.length<h.size;)h.has(f)&&d.children.push(f),f=f.nextElementSibling}d.children.forEach(o)}return t.forEach(o),s}const ov=10,Ir=ov/2,tb=1,PA=2,UA=10,qA=50,lv=100,cv=120,uv=140,dv=160,uc=180,hv=200,nb=250,VA=cv+Ir,FA=uv+Ir,ib=lv+Ir,GA=dv+Ir,XA=uc+Ir,YA=hv+Ir,KA=300,Lh=500,JA=505,fv=510,WA=515,Oh=520,gv=530,ZA=9e6,Cc=1e4,QA=1e7,sb=Cc+100,e2=1e3,t2=/\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?/;function rb(i){if(!t2.test(i))return!1;const e=i.replace(/[\s,]*\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?\s*$/,"").replace(/^\s*\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?[\s,]+/,"").trim();return e.length>0&&e.length<i.length}function n2(i,e,t,s,a){const o=xr(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link],[role=option],[role=menuitem],[role=tab],[role=treeitem]",a.root);if(o&&xn(o))return o;const c=20,d=[],y=(a.root??e.ownerDocument).querySelectorAll('button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link],[role=option],[role=menuitem],[role=tab],[role=treeitem],[id$="Button"],[id$="button"]');for(const m of y){if(!xn(m))continue;const _=m.getBoundingClientRect(),b=_.left+_.width/2,x=_.top+_.height/2,v=Math.sqrt(Math.pow(t-b,2)+Math.pow(s-x,2));v<=c&&d.push({element:m,distance:v})}return d.length===0?null:(d.sort((m,_)=>m.distance-_.distance),d[0].element)}function ab(i,e,t){i._evaluator.begin();const s={allowText:new Map,disallowText:new Map};Hc(),Rf();try{let a=[];if(t.forTextExpect){let d=no(i,e.ownerDocument.documentElement,t);for(let h=e;h;h=St(h)){const f=ms(s,i,h,{...t,noText:!0});if(!f)continue;if(ys(f)<=e2){d=f;break}}a=[dc(d)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const d=t.__clickX,h=t.__clickY;let f=!1;if(d!==void 0&&h!==void 0){const y=n2(i,e,d,h,t);y&&(e=y,f=!0)}else{const y=xr(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link],[role=option],[role=menuitem],[role=tab],[role=treeitem]",t.root);y&&xn(y)&&(e=y,f=!0)}if(!f){const y=e.closest("svg"),m=y==null?void 0:y.parentElement;m&&xn(m)&&(e=m)}}if(t.multiple){const d=ms(s,i,e,t),h=ms(s,i,e,{...t,noText:!0});let f=[d,h];if(s.allowText.clear(),s.disallowText.clear(),d&&Rh(d)&&f.push(ms(s,i,e,{...t,noCSSId:!0})),h&&Rh(h)&&f.push(ms(s,i,e,{...t,noText:!0,noCSSId:!0})),f=f.filter(Boolean),!f.length){const y=no(i,e,t);f.push(y),Rh(y)&&f.push(no(i,e,{...t,noCSSId:!0}))}a=[...new Set(f.map(y=>dc(y)))]}else{const d=ms(s,i,e,t)||no(i,e,t);a=[dc(d)]}}const o=a[0],c=i.parseSelector(o);return{selector:o,selectors:a,elements:i.querySelectorAll(c,t.root??e.ownerDocument)}}finally{jf(),zc(),i._evaluator.end()}}function ms(i,e,t,s){if(s.root&&!yo(s.root,t))throw new Error("Target element must belong to the root's subtree");if(t===s.root)return[{engine:"css",selector:":scope",score:1}];if(t.ownerDocument.documentElement===t)return[{engine:"css",selector:"html",score:1}];let a=null;const o=d=>{(!a||ys(d)<ys(a))&&(a=d)},c=[];if(!s.noText)for(const d of o2(e,t,!s.isRecursive))c.push({candidate:d,isTextCandidate:!0});for(const d of a2(e,t,s))s.omitInternalEngines&&d.engine.startsWith("internal:")||c.push({candidate:[d],isTextCandidate:!1});c.sort((d,h)=>ys(d.candidate)-ys(h.candidate));for(const{candidate:d,isTextCandidate:h}of c){const f=e.querySelectorAll(e.parseSelector(dc(d)),s.root??t.ownerDocument);if(!f.includes(t))continue;if(f.length===1){o(d);break}const y=new Set(["div","span","a","p","section","article","main","aside","header","footer","nav","ul","ol","li"]);if(d.length===1&&d[0].engine==="css"&&y.has(d[0].selector.toLowerCase())&&f.length>1)continue;const _=f.indexOf(t);if(!(_>5)&&(o([...d,{engine:"nth",selector:String(_),score:Cc}]),!s.isRecursive))for(let b=St(t);b&&b!==s.root;b=St(b)){const x=f.filter(D=>yo(b,D)&&D!==b),v=x.indexOf(t);if(x.length>5||v===-1||v===_&&x.length>1)continue;const T=x.length===1?d:[...d,{engine:"nth",selector:String(v),score:Cc}];if(a&&ys([{engine:"",selector:"",score:1},...T])>=ys(a))continue;const C=!!s.noText||h,L=C?i.disallowText:i.allowText;let j=L.get(b);j===void 0&&(j=ms(i,e,b,{...s,isRecursive:!0,noText:C})||no(e,b,s),L.set(b,j)),j&&o([...j,...T])}}return a}function i2(i){const e=lt(i);return e==="dialog"||e==="alertdialog"?!0:i.getAttribute("aria-modal")==="true"}function pv(i,e){return!!(af(e)||i2(i)&&/[a-zA-Z]\d{3,}$/.test(e))}function s2(i,e){const t=e.match(/^([A-Za-z][A-Za-z_-]{3,})(\d+)$/);if(!t)return!1;const s=t[1],a=i.ownerDocument;if(!a)return!1;const o=new RegExp(`^${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\d+$`);let c;try{c=`[id^="${window.CSS&&window.CSS.escape?window.CSS.escape(s):s}"]`}catch{c=`[id^="${s}"]`}const d=a.querySelectorAll(c);for(const h of d){const f=h.id;if(f!==e&&o.test(f))return!0}return!1}function r2(i){return!!(/\d{2,}[_-][a-zA-Z]/.test(i)||/[-_]\d+$/.test(i)||/^react-aria\d+/.test(i)||/^(mui|mat|cdk)-\d+/.test(i)||/^\d+$/.test(i)||/\d{4,}/.test(i)||/[a-zA-Z]\d{3,}$/.test(i)||i.includes(":"))}function a2(i,e,t){const s=[];{for(const y of["data-testid","data-test-id","data-test"])y!==t.testIdAttributeName&&e.getAttribute(y)&&s.push({engine:"css",selector:`[${y}=${Bi(e.getAttribute(y))}]`,score:PA});if(!t.noCSSId){const y=e.getAttribute("id");y&&!pv(e,y)&&s.push({engine:"css",selector:mv(y),score:Lh})}const c=/--(?:highlight|hover|active|focus|focused|selected|disabled|open|closed|expanded|collapsed|checked|pressed|dragging|visible|hidden)\b/i;for(const y of e.classList)y.indexOf("__")>0&&!af(y)&&!c.test(y)&&s.push({engine:"css",selector:`${Sn(e)}.${yv(y)}`,score:JA});const d=new Set(["div","span","a","p","section","article","main","aside","header","footer","nav","ul","ol","li"]),h=e.nodeName.toLowerCase(),f=d.has(h);if(s.push({engine:"css",selector:Sn(e),score:f?ZA:gv}),f){const y=e.querySelectorAll("input[name], input[id], textarea[name], textarea[id], select[name], select[id], button[name], button[id]");for(const m of y){let _="",b="";const x=m.getAttribute("name");if(x)_="name",b=x;else{const T=m.getAttribute("id");T&&!af(T)&&!s2(m,T)&&(_="id",b=T)}if(!_)continue;const v=m.nodeName.toLowerCase();s.push({engine:"css",selector:`${Sn(e)}:has(${v}[${_}=${Bi(b)}])`,score:WA});break}}}if(e.nodeName==="IFRAME"){for(const d of["name","title"])e.getAttribute(d)&&s.push({engine:"css",selector:`${Sn(e)}[${d}=${Bi(e.getAttribute(d))}]`,score:UA});const c=e.id;if(c&&r2(c)){const d=s.findIndex(f=>f.score===Lh);d!==-1&&s.splice(d,1);const h=e.getAttribute("src");if(h){const f=h.trim();if(f&&!/^(data|blob|javascript|about):/i.test(f)){const m=f.split(/[?#]/,1)[0].split("/").filter(Boolean),_=m[m.length-1];_&&s.push({engine:"css",selector:`iframe[src*=${Bi(_)}]`,score:Lh})}}}return e.getAttribute(t.testIdAttributeName)&&s.push({engine:"css",selector:`[${t.testIdAttributeName}=${Bi(e.getAttribute(t.testIdAttributeName))}]`,score:tb}),rf([s]),s}if(e.getAttribute(t.testIdAttributeName)){const d=`"${e.getAttribute(t.testIdAttributeName).replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"`;s.push({engine:"internal:testid",selector:`[${t.testIdAttributeName}=${d}]`,score:tb})}if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e;if(c.placeholder){s.push({engine:"internal:attr",selector:`[placeholder=${It(c.placeholder,!0)}]`,score:VA});for(const d of Er(c.placeholder))s.push({engine:"internal:attr",selector:`[placeholder=${It(d.text,!1)}]`,score:cv-d.scoreBonus})}}const a=tv(i._evaluator._cacheText,e);for(const c of a){const d=c.normalized;s.push({engine:"internal:label",selector:Bt(d,!0),score:FA});for(const h of Er(d))s.push({engine:"internal:label",selector:Bt(h.text,!1),score:uv-h.scoreBonus})}const o=lt(e);return o&&!["none","presentation"].includes(o)&&s.push({engine:"internal:role",selector:o,score:fv}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&s.push({engine:"css",selector:`${Sn(e)}[name=${Bi(e.getAttribute("name"))}]`,score:Oh}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&s.push({engine:"css",selector:`${Sn(e)}[type=${Bi(e.getAttribute("type"))}]`,score:Oh}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&s.push({engine:"css",selector:Sn(e),score:Oh+1}),rf([s]),s}function o2(i,e,t){if(e.nodeName==="SELECT")return[];const s=[],a=e.getAttribute("title");if(a){s.push([{engine:"internal:attr",selector:`[title=${It(a,!0)}]`,score:YA}]);for(const f of Er(a))s.push([{engine:"internal:attr",selector:`[title=${It(f.text,!1)}]`,score:hv-f.scoreBonus}])}const o=e.getAttribute("alt");if(o&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){s.push([{engine:"internal:attr",selector:`[alt=${It(o,!0)}]`,score:GA}]);for(const f of Er(o))s.push([{engine:"internal:attr",selector:`[alt=${It(f.text,!1)}]`,score:dv-f.scoreBonus}])}const c=Ut(i._evaluator._cacheText,e).normalized,d=c?Er(c):[];if(c){const f=rb(c)?sb:0;if(t){c.length<=80&&s.push([{engine:"internal:text",selector:Bt(c,!0),score:XA+f}]);for(const m of d)s.push([{engine:"internal:text",selector:Bt(m.text,!1),score:uc-m.scoreBonus}])}const y={engine:"css",selector:Sn(e),score:gv};for(const m of d)s.push([y,{engine:"internal:has-text",selector:Bt(m.text,!1),score:uc-m.scoreBonus}]);if(t&&c.length<=80){const m=new RegExp("^"+Sc(c)+"$");s.push([y,{engine:"internal:has-text",selector:Bt(m,!1),score:nb+f}])}}const h=lt(e);if(h&&!["none","presentation"].includes(h)){const f=_o(e,!1);if(f&&!f.match(new RegExp("^\\p{Co}+$","u"))){const y=rb(f)?ib+sb:ib,m={engine:"internal:role",selector:`${h}[name=${It(f,!0)}]`,score:y};s.push([m]);for(const _ of Er(f))s.push([{engine:"internal:role",selector:`${h}[name=${It(_.text,!1)}]`,score:lv-_.scoreBonus}])}else{const y={engine:"internal:role",selector:`${h}`,score:fv};for(const m of d)s.push([y,{engine:"internal:has-text",selector:Bt(m.text,!1),score:uc-m.scoreBonus}]);if(t&&c.length<=80){const m=new RegExp("^"+Sc(c)+"$");s.push([y,{engine:"internal:has-text",selector:Bt(m,!1),score:nb}])}}}return rf(s),s}function mv(i){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(i)?"#"+i:`[id=${Bi(i)}]`}function Rh(i){return i.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function no(i,e,t){const s=t.root??e.ownerDocument,a=[];function o(d){const h=a.slice();d&&h.unshift(d);const f=h.join(" > "),y=i.parseSelector(f);return i.querySelector(y,s,!1)===e?f:void 0}function c(d){const h={engine:"css",selector:d,score:QA},f=i.parseSelector(d),y=i.querySelectorAll(f,s);if(y.length===1)return[h];const m={engine:"nth",selector:String(y.indexOf(e)),score:Cc};return[h,m]}for(let d=e;d&&d!==s;d=St(d)){let h="";if(d.id&&!t.noCSSId&&!pv(d,d.id)){const m=mv(d.id),_=o(m);if(_)return c(_);h=m}const f=d.parentNode,y=[...d.classList].map(yv);for(let m=0;m<y.length;++m){const _="."+y.slice(0,m+1).join("."),b=o(_);if(b)return c(b);!h&&f&&f.querySelectorAll(_).length===1&&(h=_)}if(f){const m=[...f.children],_=d.nodeName,x=m.filter(T=>T.nodeName===_).indexOf(d)===0?Sn(d):`${Sn(d)}:nth-child(${1+m.indexOf(d)})`,v=o(x);if(v)return c(v);h||(h=x)}else h||(h=Sn(d));a.unshift(h)}return c(o())}function rf(i){for(const e of i)for(const t of e)t.score>qA&&t.score<KA&&(t.score+=Math.min(ov,t.selector.length/10|0))}function dc(i){const e=[];let t="";for(const{engine:s,selector:a}of i)e.length&&(t!=="css"||s!=="css"||a.startsWith(":nth-match("))&&e.push(">>"),t=s,s==="css"?e.push(a):e.push(`${s}=${a}`);return e.join(" ")}function ys(i){let e=0;for(let t=0;t<i.length;t++)e+=i[t].score*(i.length-t);return e}function af(i){if(/^\d+$/.test(i)||/^.+__search_[a-zA-Z0-9]{4,}$/.test(i))return!0;let e,t=0;for(let s=0;s<i.length;++s){const a=i[s];let o;if(!(a==="-"||a==="_")){if(a>="a"&&a<="z"?o="lower":a>="A"&&a<="Z"?o="upper":a>="0"&&a<="9"?o="digit":o="other",o==="lower"&&e==="upper"){e=o;continue}e&&e!==o&&++t,e=o}}return t>=i.length/4}function yr(i,e){if(i.length<=e)return i;i=i.substring(0,e);const t=i.match(/^(.*)\b(.+?)$/);return t?t[1].trimEnd():""}function Er(i){let e=[];const t=/^\s*\d{4}[-/]\d{1,2}[-/]\d{1,2}/.test(i),s=/\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?\s*$/.test(i);{const o=i.match(/^([\d.,]+)[^.,\w]/),c=o?o[1].length:0;if(c&&!t){const d=yr(i.substring(c).trimStart(),80);e.push({text:d,scoreBonus:d.length<=30?2:1})}}{const o=i.match(/[^.,\w]([\d.,]+)$/),c=o?o[1].length:0;if(c&&!s){const d=yr(i.substring(0,i.length-c).trimEnd(),80);e.push({text:d,scoreBonus:d.length<=30?2:1})}}let a=!1;{const o=/[\s,]*\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?\s*$/,c=i.replace(o,"").trim();if(c&&c.length<i.length){const d=yr(c,80);e.push({text:d,scoreBonus:d.length<=30?2:1}),a=!0}}{const o=/^\s*\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?[\s,]+/,c=i.replace(o,"").trim();if(c&&c.length<i.length){const d=yr(c,80);e.push({text:d,scoreBonus:d.length<=30?2:1}),a=!0}}return a||(i.length<=30?e.push({text:i,scoreBonus:0}):(e.push({text:yr(i,80),scoreBonus:0}),e.push({text:yr(i,30),scoreBonus:1}))),e=e.filter(o=>o.text),e.length||e.push({text:i.substring(0,80),scoreBonus:0}),e}function Sn(i){return i.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function yv(i){let e="";for(let t=0;t<i.length;t++)e+=l2(i,t);return e}function l2(i,e){const t=i.charCodeAt(e);return t===0?"�":t>=1&&t<=31||t>=48&&t<=57&&(e===0||e===1&&i.charCodeAt(0)===45)?"\\"+t.toString(16)+" ":e===0&&t===45&&i.length===1?"\\"+i.charAt(e):t>=128||t===45||t===95||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?i.charAt(e):"\\"+i.charAt(e)}function _v(i,e){const t=i.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let s=t.substring(t.lastIndexOf("/")+1);return s.endsWith(e)&&(s=s.substring(0,s.length-e.length)),s}function c2(i,e){return e?e.toUpperCase():""}const u2=/(?:^|[-_/])(\w)/g,bv=i=>i&&i.replace(u2,c2);function d2(i){function e(y){const m=y.name||y._componentTag||y.__playwright_guessedName;if(m)return m;const _=y.__file;if(_)return bv(_v(_,".vue"))}function t(y,m){return y.type.__playwright_guessedName=m,m}function s(y){var _,b,x,v;const m=e(y.type||{});if(m)return m;if(y.root===y)return"Root";for(const T in(b=(_=y.parent)==null?void 0:_.type)==null?void 0:b.components)if(((x=y.parent)==null?void 0:x.type.components[T])===y.type)return t(y,T);for(const T in(v=y.appContext)==null?void 0:v.components)if(y.appContext.components[T]===y.type)return t(y,T);return"Anonymous Component"}function a(y){return y._isBeingDestroyed||y.isUnmounted}function o(y){return y.subTree.type.toString()==="Symbol(Fragment)"}function c(y){const m=[];return y.component&&m.push(y.component),y.suspense&&m.push(...c(y.suspense.activeBranch)),Array.isArray(y.children)&&y.children.forEach(_=>{_.component?m.push(_.component):m.push(...c(_))}),m.filter(_=>{var b;return!a(_)&&!((b=_.type.devtools)!=null&&b.hide)})}function d(y){return o(y)?h(y.subTree):[y.subTree.el]}function h(y){if(!y.children)return[];const m=[];for(let _=0,b=y.children.length;_<b;_++){const x=y.children[_];x.component?m.push(...d(x.component)):x.el&&m.push(x.el)}return m}function f(y){return{name:s(y),children:c(y.subTree).map(f),rootElements:d(y),props:y.props}}return f(i)}function h2(i){function e(o){const c=o.displayName||o.name||o._componentTag;if(c)return c;const d=o.__file;if(d)return bv(_v(d,".vue"))}function t(o){const c=e(o.$options||o.fnOptions||{});return c||(o.$root===o?"Root":"Anonymous Component")}function s(o){return o.$children?o.$children:Array.isArray(o.subTree.children)?o.subTree.children.filter(c=>!!c.component).map(c=>c.component):[]}function a(o){return{name:t(o),children:s(o).map(a),rootElements:[o.$el],props:o._props}}return a(i)}function vv(i,e,t=[]){e(i)&&t.push(i);for(const s of i.children)vv(s,e,t);return t}function Sv(i,e=[]){const s=(i.ownerDocument||i).createTreeWalker(i,NodeFilter.SHOW_ELEMENT),a=new Set;do{const o=s.currentNode;o.__vue__&&a.add(o.__vue__.$root),o.__vue_app__&&o._vnode&&o._vnode.component&&e.push({root:o._vnode.component,version:3});const c=o instanceof Element?o.shadowRoot:null;c&&Sv(c,e)}while(s.nextNode());for(const o of a)e.push({version:2,root:o});return e}const f2=()=>({queryAll(i,e){const t=i.ownerDocument||i,{name:s,attributes:a}=xs(e,!1),d=Sv(t).map(f=>f.version===3?d2(f.root):h2(f.root)).map(f=>vv(f,y=>{if(s&&y.name!==s||y.rootElements.some(m=>!yo(i,m)))return!1;for(const m of a)if(!Q0(y.props,m))return!1;return!0})).flat(),h=new Set;for(const f of d)for(const y of f.rootElements)h.add(y);return[...h]}}),ob={queryAll(i,e){e.startsWith("/")&&i.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const t=[],s=i.ownerDocument||i;if(!s)return t;const a=s.evaluate(e,i,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let o=a.iterateNext();o;o=a.iterateNext())o.nodeType===Node.ELEMENT_NODE&&t.push(o);return t}};function eg(i,e,t){return`internal:attr=[${i}=${It(e,(t==null?void 0:t.exact)||!1)}]`}function g2(i,e){return`internal:testid=[${i}=${It(e,!0)}]`}function p2(i,e){return"internal:label="+Bt(i,!!(e!=null&&e.exact))}function m2(i,e){return eg("alt",i,e)}function y2(i,e){return eg("title",i,e)}function _2(i,e){return eg("placeholder",i,e)}function b2(i,e){return"internal:text="+Bt(i,!!(e!=null&&e.exact))}function v2(i,e={}){const t=[];return e.checked!==void 0&&t.push(["checked",String(e.checked)]),e.disabled!==void 0&&t.push(["disabled",String(e.disabled)]),e.selected!==void 0&&t.push(["selected",String(e.selected)]),e.expanded!==void 0&&t.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&t.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&t.push(["level",String(e.level)]),e.name!==void 0&&t.push(["name",It(e.name,!!e.exact)]),e.pressed!==void 0&&t.push(["pressed",String(e.pressed)]),`internal:role=${i}${t.map(([s,a])=>`[${s}=${a}]`).join("")}`}const Ya=Symbol("selector"),S2=class io{constructor(e,t,s){if(s!=null&&s.hasText&&(t+=` >> internal:has-text=${Bt(s.hasText,!1)}`),s!=null&&s.hasNotText&&(t+=` >> internal:has-not-text=${Bt(s.hasNotText,!1)}`),s!=null&&s.has&&(t+=" >> internal:has="+JSON.stringify(s.has[Ya])),s!=null&&s.hasNot&&(t+=" >> internal:has-not="+JSON.stringify(s.hasNot[Ya])),(s==null?void 0:s.visible)!==void 0&&(t+=` >> visible=${s.visible?"true":"false"}`),this[Ya]=t,t){const c=e.parseSelector(t);this.element=e.querySelector(c,e.document,!1),this.elements=e.querySelectorAll(c,e.document)}const a=t,o=this;o.locator=(c,d)=>new io(e,a?a+" >> "+c:c,d),o.getByTestId=c=>o.locator(g2(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),c)),o.getByAltText=(c,d)=>o.locator(m2(c,d)),o.getByLabel=(c,d)=>o.locator(p2(c,d)),o.getByPlaceholder=(c,d)=>o.locator(_2(c,d)),o.getByText=(c,d)=>o.locator(b2(c,d)),o.getByTitle=(c,d)=>o.locator(y2(c,d)),o.getByRole=(c,d={})=>o.locator(v2(c,d)),o.filter=c=>new io(e,t,c),o.first=()=>o.locator("nth=0"),o.last=()=>o.locator("nth=-1"),o.nth=c=>o.locator(`nth=${c}`),o.and=c=>new io(e,a+" >> internal:and="+JSON.stringify(c[Ya])),o.or=c=>new io(e,a+" >> internal:or="+JSON.stringify(c[Ya]))}};let w2=S2;class x2{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,t)=>this._querySelector(e,!!t),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,t)=>this._generateLocator(e,t),ariaSnapshot:(e,t)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,t||{mode:"expect"}),resume:()=>this._resume(),...new w2(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,t){if(typeof e!="string")throw new Error("Usage: playwright.query('Playwright >> selector').");const s=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(s,this._injectedScript.document,t)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const t=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(t,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,t){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const s=this._injectedScript.generateSelectorSimple(e);return qi(t||"javascript",s)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function T2(i){try{return i instanceof RegExp||Object.prototype.toString.call(i)==="[object RegExp]"}catch{return!1}}function E2(i){try{return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}catch{return!1}}function A2(i){try{return i instanceof URL||Object.prototype.toString.call(i)==="[object URL]"}catch{return!1}}function C2(i){var e;try{return i instanceof Error||i&&((e=Object.getPrototypeOf(i))==null?void 0:e.name)==="Error"}catch{return!1}}function k2(i,e){try{return i instanceof e||Object.prototype.toString.call(i)===`[object ${e.name}]`}catch{return!1}}const wv={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function N2(i){if("toBase64"in i)return i.toBase64();const e=Array.from(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)).map(t=>String.fromCharCode(t)).join("");return btoa(e)}function M2(i,e){const t=atob(i),s=new Uint8Array(t.length);for(let a=0;a<t.length;a++)s[a]=t.charCodeAt(a);return new e(s.buffer)}function of(i,e=[],t=new Map){if(!Object.is(i,void 0)){if(typeof i=="object"&&i){if("ref"in i)return t.get(i.ref);if("v"in i)return i.v==="undefined"?void 0:i.v==="null"?null:i.v==="NaN"?NaN:i.v==="Infinity"?1/0:i.v==="-Infinity"?-1/0:i.v==="-0"?-0:void 0;if("d"in i)return new Date(i.d);if("u"in i)return new URL(i.u);if("bi"in i)return BigInt(i.bi);if("e"in i){const s=new Error(i.e.m);return s.name=i.e.n,s.stack=i.e.s,s}if("r"in i)return new RegExp(i.r.p,i.r.f);if("a"in i){const s=[];t.set(i.id,s);for(const a of i.a)s.push(of(a,e,t));return s}if("o"in i){const s={};t.set(i.id,s);for(const{k:a,v:o}of i.o)a!=="__proto__"&&(s[a]=of(o,e,t));return s}if("h"in i)return e[i.h];if("ta"in i)return M2(i.ta.b,wv[i.ta.k])}return i}}function D2(i,e){return lf(i,e,{visited:new Map,lastId:0})}function lf(i,e,t){if(i&&typeof i=="object"){if(typeof globalThis.Window=="function"&&i instanceof globalThis.Window)return"ref: <Window>";if(typeof globalThis.Document=="function"&&i instanceof globalThis.Document)return"ref: <Document>";if(typeof globalThis.Node=="function"&&i instanceof globalThis.Node)return"ref: <Node>"}return xv(i,e,t)}function xv(i,e,t){var o;const s=e(i);if("fallThrough"in s)i=s.fallThrough;else return s;if(typeof i=="symbol")return{v:"undefined"};if(Object.is(i,void 0))return{v:"undefined"};if(Object.is(i,null))return{v:"null"};if(Object.is(i,NaN))return{v:"NaN"};if(Object.is(i,1/0))return{v:"Infinity"};if(Object.is(i,-1/0))return{v:"-Infinity"};if(Object.is(i,-0))return{v:"-0"};if(typeof i=="boolean"||typeof i=="number"||typeof i=="string")return i;if(typeof i=="bigint")return{bi:i.toString()};if(C2(i)){let c;return(o=i.stack)!=null&&o.startsWith(i.name+": "+i.message)?c=i.stack:c=`${i.name}: ${i.message}
|
|
113
|
-
${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i))return{u:i.toJSON()};if(T2(i))return{r:{p:i.source,f:i.flags}};for(const[c,d]of Object.entries(wv))if(k2(i,d))return{ta:{b:N2(i),k:c}};const a=t.visited.get(i);if(a)return{ref:a};if(Array.isArray(i)){const c=[],d=++t.lastId;t.visited.set(i,d);for(let h=0;h<i.length;++h)c.push(lf(i[h],e,t));return{a:c,id:d}}if(typeof i=="object"){const c=[],d=++t.lastId;t.visited.set(i,d);for(const f of Object.keys(i)){let y;try{y=i[f]}catch{continue}f==="toJSON"&&typeof y=="function"?c.push({k:f,v:{o:[],id:0}}):c.push({k:f,v:lf(y,e,t)})}let h;try{c.length===0&&i.toJSON&&typeof i.toJSON=="function"&&(h={value:i.toJSON()})}catch{}return h?xv(h.value,e,t):{o:c,id:d}}}class L2{constructor(e,t){var s,a,o,c,d,h,f,y;this.global=e,this.isUnderTest=t,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(s=e.setTimeout)==null?void 0:s.bind(e),clearTimeout:(a=e.clearTimeout)==null?void 0:a.bind(e),setInterval:(o=e.setInterval)==null?void 0:o.bind(e),clearInterval:(c=e.clearInterval)==null?void 0:c.bind(e),requestAnimationFrame:(d=e.requestAnimationFrame)==null?void 0:d.bind(e),cancelAnimationFrame:(h=e.cancelAnimationFrame)==null?void 0:h.bind(e),requestIdleCallback:(f=e.requestIdleCallback)==null?void 0:f.bind(e),cancelIdleCallback:(y=e.cancelIdleCallback)==null?void 0:y.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,t,s,a,...o){const c=o.slice(0,a),d=o.slice(a),h=[];for(let y=0;y<c.length;y++)h[y]=of(c[y],d);let f=this.global.eval(s);return e===!0?f=f(...h):e===!1?f=f:typeof f=="function"&&(f=f(...h)),t?this._promiseAwareJsonValueNoThrow(f):f}jsonValue(e,t){if(t!==void 0)return D2(t,s=>({fallThrough:s}))}_promiseAwareJsonValueNoThrow(e){const t=s=>{try{return this.jsonValue(!0,s)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const s=await e;return t(s)})():t(e)}}class Tv{constructor(e,t){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this._lastAriaSnapshotForTrack=new Map,this.utils={asLocator:qi,cacheNormalizedWhitespaces:Yx,elementText:Ut,getAriaRole:lt,getElementAccessibleDescription:X_,getElementAccessibleName:_o,isElementVisible:xn,isInsideScope:yo,normalizeWhiteSpace:Nt,parseAriaSnapshot:Mf,generateAriaTree:co,findNewElement:mA,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=t.isUnderTest,this.utils.builtins=new L2(e,t.isUnderTest).builtins,this._sdkLanguage=t.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=t.testIdAttributeName,this._evaluator=new MA,this.consoleApi=new x2(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",ob),this._engines.set("xpath:light",ob),this._engines.set("_react",CA()),this._engines.set("_vue",f2()),this._engines.set("role",eb(!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",eb(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:s,source:a}of t.customEngines)this._engines.set(s,this.eval(a));this._stableRafCount=t.stableRafCount,this._browserName=t.browserName,this._isUtilityWorld=!!t.isUtilityWorld,$E({browserNameForWorkarounds:t.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 t=To(e);return Gx(t,s=>{if(!this._engines.has(s.name))throw this.createStacklessError(`Unknown engine "${s.name}" while parsing selector ${e}`)}),t}generateSelector(e,t){return ab(this,e,t)}generateSelectorSimple(e,t){return ab(this,e,{...t,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,t,s){const a=this.querySelectorAll(e,t);if(s&&a.length>1)throw this.strictModeViolationError(e,a);return this.checkDeprecatedSelectorUsage(e,a),a[0]}_queryNth(e,t){const s=[...e];let a=+t.body;return a===-1&&(a=s.length-1),new Set(s.slice(a,a+1))}_queryLayoutSelector(e,t,s){const a=t.name,o=t.body,c=[],d=this.querySelectorAll(o.parsed,s);for(const h of e){const f=Z0(a,h,d,o.distance);f!==void 0&&c.push({element:h,score:f})}return c.sort((h,f)=>h.score-f.score),new Set(c.map(h=>h.element))}ariaSnapshot(e,t){return this.incrementalAriaSnapshot(e,t).full}incrementalAriaSnapshot(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");const s=co(e,t),a=uo(s,t);let o;if(t.track){const c=this._lastAriaSnapshotForTrack.get(t.track);c&&(o=uo(s,t,c)),this._lastAriaSnapshotForTrack.set(t.track,s)}return this._lastAriaSnapshotForQuery=s,{full:a,incremental:o,iframeRefs:s.iframeRefs}}ariaSnapshotForRecorder(){const e=co(this.document.body,{mode:"ai"});return{ariaSnapshot:uo(e,{mode:"ai"}),refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,t){return dA(e.documentElement,t)}querySelectorAll(e,t){if(e.capture!==void 0){if(e.parts.some(a=>a.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const s={parts:e.parts.slice(0,e.capture+1)};if(e.capture<e.parts.length-1){const a={parts:e.parts.slice(e.capture+1)},o={name:"internal:has",body:{parsed:a},source:Rn(a)};s.parts.push(o)}return this.querySelectorAll(s,t)}if(!t.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(t.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[t];this._evaluator.begin();try{let s=new Set([t]);for(const a of e.parts)if(a.name==="nth")s=this._queryNth(s,a);else if(a.name==="internal:and"){const o=this.querySelectorAll(a.body.parsed,t);s=new Set(o.filter(c=>s.has(c)))}else if(a.name==="internal:or"){const o=this.querySelectorAll(a.body.parsed,t);s=new Set(av(new Set([...s,...o])))}else if(wA.includes(a.name))s=this._queryLayoutSelector(s,a,t);else{const o=new Set;for(const c of s){const d=this._queryEngineAll(a,c);for(const h of d)o.add(h)}s=o}return[...s]}finally{this._evaluator.end()}}_queryEngineAll(e,t){const s=this._engines.get(e.name).queryAll(t,e.body);for(const a of s)if(!("nodeName"in a))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(a)}`);return s}_createAttributeEngine(e,t){const s=a=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(a)}]`,functions:[]},combinator:""}]}];return{queryAll:(a,o)=>this._evaluator.query({scope:a,pierceShadow:t},s(o))}}_createCSSEngine(){return{queryAll:(e,t)=>this._evaluator.query({scope:e,pierceShadow:!0},t)}}_createTextEngine(e,t){return{queryAll:(a,o)=>{const{matcher:c,kind:d}=Yl(o,t),h=[];let f=null;const y=_=>{if(d==="lax"&&f&&f.contains(_))return!1;const b=$c(this._evaluator._cacheText,_,c);b==="none"&&(f=_),(b==="self"||b==="selfAndChildren"&&d==="strict"&&!t)&&h.push(_)};a.nodeType===Node.ELEMENT_NODE&&y(a);const m=this._evaluator._queryCSS({scope:a,pierceShadow:e},"*");for(const _ of m)y(_);return h}}}_createInternalHasTextEngine(){return{queryAll:(e,t)=>{if(e.nodeType!==1)return[];const s=e,a=Ut(this._evaluator._cacheText,s),{matcher:o}=Yl(t,!0);return o(a)?[s]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,t)=>{if(e.nodeType!==1)return[];const s=e,a=Ut(this._evaluator._cacheText,s),{matcher:o}=Yl(t,!0);return o(a)?[]:[s]}}}_createInternalLabelEngine(){return{queryAll:(e,t)=>{const{matcher:s}=Yl(t,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(o=>tv(this._evaluator._cacheText,o).some(c=>s(c)))}}}_createNamedAttributeEngine(){return{queryAll:(t,s)=>{const a=xs(s,!0);if(a.name||a.attributes.length!==1)throw new Error("Malformed attribute selector: "+s);const{name:o,value:c,caseSensitive:d}=a.attributes[0],h=d?null:c.toLowerCase();let f;return c instanceof RegExp?f=m=>!!m.match(c):d?f=m=>m===c:f=m=>m.toLowerCase().includes(h),this._evaluator._queryCSS({scope:t,pierceShadow:!0},`[${o}]`).filter(m=>f(m.getAttribute(o)))}}}_createDescribeEngine(){return{queryAll:t=>t.nodeType!==1?[]:[t]}}_createControlEngine(){return{queryAll(e,t){if(t==="enter-frame")return[];if(t==="return-empty")return[];if(t==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${t}`)}}}_createHasEngine(){return{queryAll:(t,s)=>t.nodeType!==1?[]:!!this.querySelector(s.parsed,t,!1)?[t]:[]}}_createHasNotEngine(){return{queryAll:(t,s)=>t.nodeType!==1?[]:!!this.querySelector(s.parsed,t,!1)?[]:[t]}}_createVisibleEngine(){return{queryAll:(t,s)=>{if(t.nodeType!==1)return[];const a=s==="true";return xn(t)===a?[t]:[]}}}_createInternalChainEngine(){return{queryAll:(t,s)=>this.querySelectorAll(s.parsed,t)}}extend(e,t){const s=this.window.eval(`
|
|
111
|
+
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function G_(i,e){const t=[...i.querySelectorAll(e)];for(const s of Br(i,i.getAttribute("aria-owns")))s.matches(e)&&t.push(s),t.push(...s.querySelectorAll(e));return t}function lo(i,e){const t=e==="::before"?Yf:e==="::after"?Kf:Xf;if(t!=null&&t.has(i))return t==null?void 0:t.get(i);const s=Gi(i,e);let a;if(s){const o=s.content;o&&o!=="none"&&o!=="normal"&&s.display!=="none"&&s.visibility!=="hidden"&&(a=VE(i,o,!!e))}return e&&a!==void 0&&((s==null?void 0:s.display)||"inline")!=="inline"&&(a=" "+a+" "),t&&t.set(i,a),a}function VE(i,e,t){if(!(!e||e==="none"||e==="normal"))try{let s=Ub(e).filter(d=>!(d instanceof bc));const a=s.findIndex(d=>d instanceof _t&&d.value==="/");if(a!==-1)s=s.slice(a+1);else if(!t)return;const o=[];let c=0;for(;c<s.length;)if(s[c]instanceof Af)o.push(s[c].value),c++;else if(c+2<s.length&&s[c]instanceof ro&&s[c].value==="attr"&&s[c+1]instanceof Ef&&s[c+2]instanceof Tf){const d=s[c+1].value;o.push(i.getAttribute(d)||""),c+=3}else return;return o.join("")}catch{}}function $0(i){const e=i.getAttribute("aria-labelledby");if(e===null)return null;const t=Br(i,e);return t.length?t:null}function FE(i,e){const t=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(i),s=e&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(i);return t||s}function _o(i,e){const t=e?Vf:qf;let s=t==null?void 0:t.get(i);return s===void 0&&(s="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(lt(i)||"")||(s=oo(wn(i,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),t==null||t.set(i,s)),s}function X_(i,e){const t=e?Gf:Ff;let s=t==null?void 0:t.get(i);if(s===void 0){if(s="",i.hasAttribute("aria-describedby")){const a=Br(i,i.getAttribute("aria-describedby"));s=oo(a.map(o=>wn(o,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:o,hidden:dn(o)}})).join(" "))}else i.hasAttribute("aria-description")?s=oo(i.getAttribute("aria-description")||""):s=oo(i.getAttribute("title")||"");t==null||t.set(i,s)}return s}function GE(i){const e=i.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function XE(i){if("validity"in i){const e=i.validity;return(e==null?void 0:e.valid)===!1}return!1}function YE(i){const e=Tr;let t=Tr==null?void 0:Tr.get(i);if(t===void 0){t="";const s=GE(i)!=="false",a=XE(i);if(s||a){const o=i.getAttribute("aria-errormessage");t=Br(i,o).map(h=>oo(wn(h,{visitedElements:new Set,embeddedInDescribedBy:{element:h,hidden:dn(h)}}))).join(" ").trim()}e==null||e.set(i,t)}return t}function wn(i,e){var h,f,y,m;if(e.visitedElements.has(i))return"";const t={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const _=!!((h=e.embeddedInLabelledBy)!=null&&h.hidden)||!!((f=e.embeddedInDescribedBy)!=null&&f.hidden)||!!((y=e.embeddedInNativeTextAlternative)!=null&&y.hidden)||!!((m=e.embeddedInLabel)!=null&&m.hidden);if(H0(i)||!_&&dn(i))return e.visitedElements.add(i),""}const s=$0(i);if(!e.embeddedInLabelledBy){const _=(s||[]).map(b=>wn(b,{...e,embeddedInLabelledBy:{element:b,hidden:dn(b)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(_)return _}const a=lt(i)||"",o=Je(i);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const _=[...i.labels||[]].includes(i),b=(s||[]).includes(i);if(!_&&!b){if(a==="textbox")return e.visitedElements.add(i),o==="INPUT"||o==="TEXTAREA"?i.value:i.textContent||"";if(["combobox","listbox"].includes(a)){e.visitedElements.add(i);let w;if(o==="SELECT")w=[...i.selectedOptions],!w.length&&i.options.length&&w.push(i.options[0]);else{const v=a==="combobox"?G_(i,"*").find(T=>lt(T)==="listbox"):i;w=v?G_(v,'[aria-selected="true"]').filter(T=>lt(T)==="option"):[]}return!w.length&&o==="INPUT"?i.value:w.map(v=>wn(v,t)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(a))return e.visitedElements.add(i),i.hasAttribute("aria-valuetext")?i.getAttribute("aria-valuetext")||"":i.hasAttribute("aria-valuenow")?i.getAttribute("aria-valuenow")||"":i.getAttribute("value")||"";if(["menu"].includes(a))return e.visitedElements.add(i),""}}const c=i.getAttribute("aria-label")||"";if(ri(c))return e.visitedElements.add(i),c;if(!["presentation","none"].includes(a)){if(o==="INPUT"&&["button","submit","reset"].includes(i.type)){e.visitedElements.add(i);const _=i.value||"";return ri(_)?_:i.type==="submit"?"Submit":i.type==="reset"?"Reset":i.getAttribute("title")||""}if(o==="INPUT"&&i.type==="file"){e.visitedElements.add(i);const _=i.labels||[];return _.length&&!e.embeddedInLabelledBy?Fa(_,e):"Choose File"}if(o==="INPUT"&&i.type==="image"){e.visitedElements.add(i);const _=i.labels||[];if(_.length&&!e.embeddedInLabelledBy)return Fa(_,e);const b=i.getAttribute("alt")||"";if(ri(b))return b;const w=i.getAttribute("title")||"";return ri(w)?w:"Submit"}if(!s&&o==="BUTTON"){e.visitedElements.add(i);const _=i.labels||[];if(_.length)return Fa(_,e)}if(!s&&o==="OUTPUT"){e.visitedElements.add(i);const _=i.labels||[];return _.length?Fa(_,e):i.getAttribute("title")||""}if(!s&&(o==="TEXTAREA"||o==="SELECT"||o==="INPUT")){e.visitedElements.add(i);const _=i.labels||[];if(_.length)return Fa(_,e);const b=o==="INPUT"&&["text","password","search","tel","email","url"].includes(i.type)||o==="TEXTAREA",w=i.getAttribute("placeholder")||"",v=i.getAttribute("title")||"";return!b||v?v:w}if(!s&&o==="FIELDSET"){e.visitedElements.add(i);for(let b=i.firstElementChild;b;b=b.nextElementSibling)if(Je(b)==="LEGEND")return wn(b,{...t,embeddedInNativeTextAlternative:{element:b,hidden:dn(b)}});return i.getAttribute("title")||""}if(!s&&o==="FIGURE"){e.visitedElements.add(i);for(let b=i.firstElementChild;b;b=b.nextElementSibling)if(Je(b)==="FIGCAPTION")return wn(b,{...t,embeddedInNativeTextAlternative:{element:b,hidden:dn(b)}});return i.getAttribute("title")||""}if(o==="IMG"){e.visitedElements.add(i);const _=i.getAttribute("alt")||"";return ri(_)?_:i.getAttribute("title")||""}if(o==="TABLE"){e.visitedElements.add(i);for(let b=i.firstElementChild;b;b=b.nextElementSibling)if(Je(b)==="CAPTION")return wn(b,{...t,embeddedInNativeTextAlternative:{element:b,hidden:dn(b)}});const _=i.getAttribute("summary")||"";if(_)return _}if(o==="AREA"){e.visitedElements.add(i);const _=i.getAttribute("alt")||"";return ri(_)?_:i.getAttribute("title")||""}if(o==="SVG"||i.ownerSVGElement){e.visitedElements.add(i);for(let _=i.firstElementChild;_;_=_.nextElementSibling)if(Je(_)==="TITLE"&&_.ownerSVGElement)return wn(_,{...t,embeddedInLabelledBy:{element:_,hidden:dn(_)}})}if(i.ownerSVGElement&&o==="A"){const _=i.getAttribute("xlink:title")||"";if(ri(_))return e.visitedElements.add(i),_}}const d=o==="SUMMARY"&&!["presentation","none"].includes(a);if(FE(a,e.embeddedInTargetElement==="descendant")||d||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(i);const _=KE(i,t);if(e.embeddedInTargetElement==="self"?ri(_):_)return _}if(!["presentation","none"].includes(a)||o==="IFRAME"){e.visitedElements.add(i);const _=i.getAttribute("title")||"";if(ri(_))return _}return e.visitedElements.add(i),""}function KE(i,e){const t=[],s=(o,c)=>{var d;if(!(c&&o.assignedSlot))if(o.nodeType===1){const h=((d=Gi(o))==null?void 0:d.display)||"inline";let f=wn(o,e);(h!=="inline"||o.nodeName==="BR")&&(f=" "+f+" "),t.push(f)}else o.nodeType===3&&t.push(o.textContent||"")};t.push(lo(i,"::before")||"");const a=lo(i);if(a!==void 0)t.push(a);else{const o=i.nodeName==="SLOT"?i.assignedNodes():[];if(o.length)for(const c of o)s(c,!1);else{for(let c=i.firstChild;c;c=c.nextSibling)s(c,!0);if(i.shadowRoot)for(let c=i.shadowRoot.firstChild;c;c=c.nextSibling)s(c,!0);for(const c of Br(i,i.getAttribute("aria-owns")))s(c,!0)}}return t.push(lo(i,"::after")||""),t.join("")}const zf=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function B0(i){return Je(i)==="OPTION"?i.selected:zf.includes(lt(i)||"")?j0(i.getAttribute("aria-selected"))===!0:!1}const $f=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function I0(i){const e=Bf(i,!0);return e==="error"?!1:e}function JE(i){return Bf(i,!0)}function WE(i){return Bf(i,!1)}function Bf(i,e){const t=Je(i);if(e&&t==="INPUT"&&i.indeterminate)return"mixed";if(t==="INPUT"&&["checkbox","radio"].includes(i.type))return i.checked;if($f.includes(lt(i)||"")){const s=i.getAttribute("aria-checked");return s==="true"?!0:e&&s==="mixed"?"mixed":!1}return"error"}const ZE=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function QE(i){const e=Je(i);return["INPUT","TEXTAREA","SELECT"].includes(e)?i.hasAttribute("readonly"):ZE.includes(lt(i)||"")?i.getAttribute("aria-readonly")==="true":i.isContentEditable?!1:"error"}const If=["button"];function P0(i){if(If.includes(lt(i)||"")){const e=i.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const Pf=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function U0(i){if(Je(i)==="DETAILS")return i.open;if(Pf.includes(lt(i)||"")){const e=i.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const Uf=["heading","listitem","row","treeitem"];function q0(i){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Je(i)];if(e)return e;if(Uf.includes(lt(i)||"")){const t=i.getAttribute("aria-level"),s=t===null?Number.NaN:Number(t);if(Number.isInteger(s)&&s>=1)return s}return 0}const V0=["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 Ac(i){return F0(i)||G0(i)}function F0(i){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(Je(i))&&(i.hasAttribute("disabled")||eA(i)||tA(i))}function eA(i){return Je(i)==="OPTION"&&!!i.closest("OPTGROUP[DISABLED]")}function tA(i){const e=i==null?void 0:i.closest("FIELDSET[DISABLED]");if(!e)return!1;const t=e.querySelector(":scope > LEGEND");return!t||!t.contains(i)}function G0(i,e=!1){if(!i)return!1;if(e||V0.includes(lt(i)||"")){const t=(i.getAttribute("aria-disabled")||"").toLowerCase();return t==="true"?!0:t==="false"?!1:G0(St(i),!0)}return!1}function Fa(i,e){return[...i].map(t=>wn(t,{...e,embeddedInLabel:{element:t,hidden:dn(t)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(t=>!!t).join(" ")}function nA(i){const e=Jf;let t=i,s;const a=[];for(;t;t=St(t)){const o=e.get(t);if(o!==void 0){s=o;break}a.push(t);const c=Gi(t);if(!c){s=!0;break}const d=c.pointerEvents;if(d){s=d!=="none";break}}s===void 0&&(s=!0);for(const o of a)e.set(o,s);return s}let qf,Vf,Ff,Gf,Tr,Ii,Xf,Yf,Kf,Jf,X0=0;function Hc(){Rf(),++X0,qf??(qf=new Map),Vf??(Vf=new Map),Ff??(Ff=new Map),Gf??(Gf=new Map),Tr??(Tr=new Map),Ii??(Ii=new Map),Xf??(Xf=new Map),Yf??(Yf=new Map),Kf??(Kf=new Map),Jf??(Jf=new Map)}function zc(){--X0||(qf=void 0,Vf=void 0,Ff=void 0,Gf=void 0,Tr=void 0,Ii=void 0,Xf=void 0,Yf=void 0,Kf=void 0,Jf=void 0),jf()}const iA={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};let sA=0;function Y0(i){return i.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:i.refPrefix,includeGenericRole:!0,renderActive:!i.doNotRenderActive,renderCursorPointer:!0}:i.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:i.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function co(i,e){const t=Y0(e),s=new Set,a={root:{role:"fragment",name:"",children:[],props:{},box:Ec(i),receivesPointerEvents:!0},elements:new Map,refs:new Map,iframeRefs:[]};sf(a.root,i);const o=(d,h,f)=>{if(s.has(h))return;if(s.add(h),h.nodeType===Node.TEXT_NODE&&h.nodeValue){if(!f)return;const v=h.nodeValue;d.role!=="textbox"&&v&&d.children.push(h.nodeValue||"");return}if(h.nodeType!==Node.ELEMENT_NODE)return;const y=h,m=!dn(y);let _=m;if(t.visibility==="ariaOrVisible"&&(_=m||xn(y)),t.visibility==="ariaAndVisible"&&(_=m&&xn(y)),t.visibility==="aria"&&!_)return;const b=[];if(y.hasAttribute("aria-owns")){const v=y.getAttribute("aria-owns").split(/\s+/);for(const T of v){const A=i.ownerDocument.getElementById(T);A&&b.push(A)}}const w=_?aA(y,t):null;w&&(w.ref&&(a.elements.set(w.ref,y),a.refs.set(y,w.ref),w.role==="iframe"&&a.iframeRefs.push(w.ref)),d.children.push(w)),c(w||d,y,b,_)};function c(d,h,f,y){var w;const _=(((w=Gi(h))==null?void 0:w.display)||"inline")!=="inline"||h.nodeName==="BR"?" ":"";_&&d.children.push(_),d.children.push(lo(h,"::before")||"");const b=h.nodeName==="SLOT"?h.assignedNodes():[];if(b.length)for(const v of b)o(d,v,y);else{for(let v=h.firstChild;v;v=v.nextSibling)v.assignedSlot||o(d,v,y);if(h.shadowRoot)for(let v=h.shadowRoot.firstChild;v;v=v.nextSibling)o(d,v,y)}for(const v of f)o(d,v,y);if(d.children.push(lo(h,"::after")||""),_&&d.children.push(_),d.children.length===1&&d.name===d.children[0]&&(d.children=[]),d.role==="link"&&h.hasAttribute("href")){const v=h.getAttribute("href");d.props.url=v}if(d.role==="textbox"&&h.hasAttribute("placeholder")&&h.getAttribute("placeholder")!==d.name){const v=h.getAttribute("placeholder");d.props.placeholder=v}}Hc();try{o(a.root,i,!0)}finally{zc()}return lA(a.root),oA(a.root),a}function Y_(i,e){if(e.refs==="none"||e.refs==="interactable"&&(!i.box.visible||!i.receivesPointerEvents))return;const t=Zf(i);let s=t._ariaRef;(!s||s.role!==i.role||s.name!==i.name)&&(s={role:i.role,name:i.name,ref:(e.refPrefix??"")+"e"+ ++sA},t._ariaRef=s),i.ref=s.ref}function rA(i,e){const t=i.nodeName;if(t==="A"||t==="BUTTON"||e.cursor==="pointer")return!0;const s=i.getAttribute("tabindex");return s!==null&&Number(s)>=0}function aA(i,e){const t=i.ownerDocument.activeElement===i;if(i.nodeName==="IFRAME"){const f={role:"iframe",name:"",children:[],props:{},box:Ec(i),receivesPointerEvents:!0,active:t};return sf(f,i),Y_(f,e),f}const s=e.includeGenericRole?"generic":null,a=lt(i)??s;if(!a||a==="presentation"||a==="none")return null;const o=Nt(_o(i,!1)||""),c=nA(i),d=Ec(i);if(a==="generic"&&d.inline&&i.childNodes.length===1&&i.childNodes[0].nodeType===Node.TEXT_NODE&&!rA(i,d))return null;const h={role:a,name:o,children:[],props:{},box:d,receivesPointerEvents:c,active:t};return sf(h,i),Y_(h,e),$f.includes(a)&&(h.checked=I0(i)),V0.includes(a)&&(h.disabled=Ac(i)),Pf.includes(a)&&(h.expanded=U0(i)),Uf.includes(a)&&(h.level=q0(i)),If.includes(a)&&(h.pressed=P0(i)),zf.includes(a)&&(h.selected=B0(i)),(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement)&&i.type!=="checkbox"&&i.type!=="radio"&&i.type!=="file"&&(h.children=[i.value]),h}function oA(i){const e=t=>{const s=[];for(const o of t.children||[]){if(typeof o=="string"){s.push(o);continue}const c=e(o);s.push(...c)}return t.role==="generic"&&!t.name&&s.length<=1&&s.every(o=>typeof o!="string"&&!!o.ref)?s:(t.children=s,[t])};e(i)}function lA(i){const e=(s,a)=>{if(!s.length)return;const o=Nt(s.join(""));o&&a.push(o),s.length=0},t=s=>{const a=[],o=[];for(const c of s.children||[])typeof c=="string"?o.push(c):(e(o,a),t(c),a.push(c));e(o,a),s.children=a.length?a:[],s.children.length===1&&s.children[0]===s.name&&(s.children=[])};t(i)}function cA(i,e){return e?i?typeof e=="string"?i===e:!!i.match(new RegExp(e.pattern)):!1:!0}function K_(i,e){if(!(e!=null&&e.normalized))return!0;if(!i)return!1;if(i===e.normalized||i===e.raw)return!0;const t=uA(e);return t?!!i.match(t):!1}const Nh=Symbol("cachedRegex");function uA(i){if(i[Nh]!==void 0)return i[Nh];const{raw:e}=i,t=e.startsWith("/")&&e.endsWith("/")&&e.length>1;let s;try{s=t?new RegExp(e.slice(1,-1)):null}catch{s=null}return i[Nh]=s,s}function dA(i,e){const t=co(i,{mode:"expect"});return{matches:K0(t.root,e,!1,!1),received:{raw:uo(t,{mode:"expect"}),regex:uo(t,{mode:"codegen"})}}}function hA(i,e){const t=co(i,{mode:"expect"}).root;return K0(t,e,!0,!1).map(a=>Zf(a))}function Wf(i,e,t){var s;return typeof i=="string"&&e.kind==="text"?K_(i,e.text):i===null||typeof i!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==i.role||e.checked!==void 0&&e.checked!==i.checked||e.disabled!==void 0&&e.disabled!==i.disabled||e.expanded!==void 0&&e.expanded!==i.expanded||e.level!==void 0&&e.level!==i.level||e.pressed!==void 0&&e.pressed!==i.pressed||e.selected!==void 0&&e.selected!==i.selected||!cA(i.name,e.name)||!K_(i.props.url,(s=e.props)==null?void 0:s.url)?!1:e.containerMode==="contain"?W_(i.children||[],e.children||[]):e.containerMode==="equal"?J_(i.children||[],e.children||[],!1):e.containerMode==="deep-equal"||t?J_(i.children||[],e.children||[],!0):W_(i.children||[],e.children||[])}function J_(i,e,t){if(e.length!==i.length)return!1;for(let s=0;s<e.length;++s)if(!Wf(i[s],e[s],t))return!1;return!0}function W_(i,e){if(e.length>i.length)return!1;const t=i.slice(),s=e.slice();for(const a of s){let o=t.shift();for(;o&&!Wf(o,a,!1);)o=t.shift();if(!o)return!1}return!0}function K0(i,e,t,s){const a=[],o=(c,d)=>{if(Wf(c,e,s)){const h=typeof c=="string"?d:c;return h&&a.push(h),!t}if(typeof c=="string")return!1;for(const h of c.children||[])if(o(h,c))return!0;return!1};return o(i,null),a}function J0(i,e=new Map){i!=null&&i.ref&&e.set(i.ref,i);for(const t of(i==null?void 0:i.children)||[])typeof t!="string"&&J0(t,e);return e}function fA(i,e){var o;const t=J0(e==null?void 0:e.root),s=new Map,a=(c,d)=>{let h=c.children.length===(d==null?void 0:d.children.length)&&OE(c,d),f=h;for(let y=0;y<c.children.length;y++){const m=c.children[y],_=d==null?void 0:d.children[y];if(typeof m=="string")h&&(h=m===_),f&&(f=m===_);else{let b=typeof _!="string"?_:void 0;m.ref&&(b=t.get(m.ref));const w=a(m,b);(!b||!w&&!m.ref||b!==_)&&(f=!1),h&&(h=w&&b===_)}}return s.set(c,h?"same":f?"skip":"changed"),h};return a(i.root,t.get((o=e==null?void 0:e.root)==null?void 0:o.ref)),s}function gA(i,e){const t=[],s=a=>{const o=e.get(a);if(o!=="same")if(o==="skip")for(const c of a.children)typeof c!="string"&&s(c);else t.push(a)};for(const a of i)typeof a=="string"?t.push(a):s(a);return t}function uo(i,e,t){const s=Y0(e),a=[],o=s.renderStringsAsRegex?mA:()=>!0,c=s.renderStringsAsRegex?pA:b=>b;let d=i.root.role==="fragment"?i.root.children:[i.root];const h=fA(i,t);t&&(d=gA(d,h));const f=(b,w)=>{const v=Ch(c(b));v&&a.push(w+"- text: "+v)},y=(b,w)=>{let v=b.role;if(b.name&&b.name.length<=900){const T=c(b.name);if(T){const A=T.startsWith("/")&&T.endsWith("/")?T:JSON.stringify(T);v+=" "+A}}return b.checked==="mixed"&&(v+=" [checked=mixed]"),b.checked===!0&&(v+=" [checked]"),b.disabled&&(v+=" [disabled]"),b.expanded&&(v+=" [expanded]"),b.active&&s.renderActive&&(v+=" [active]"),b.level&&(v+=` [level=${b.level}]`),b.pressed==="mixed"&&(v+=" [pressed=mixed]"),b.pressed===!0&&(v+=" [pressed]"),b.selected===!0&&(v+=" [selected]"),b.ref&&(v+=` [ref=${b.ref}]`,w&&xc(b)&&(v+=" [cursor=pointer]")),v},m=b=>(b==null?void 0:b.children.length)===1&&typeof b.children[0]=="string"&&!Object.keys(b.props).length?b.children[0]:void 0,_=(b,w,v)=>{if(h.get(b)==="same"&&b.ref){a.push(w+`- ref=${b.ref} [unchanged]`);return}const T=!!t&&!w,A=w+"- "+(T?"<changed> ":"")+zE(y(b,v)),C=m(b);if(!b.children.length&&!Object.keys(b.props).length)a.push(A);else if(C!==void 0)o(b,C)?a.push(A+": "+Ch(c(C))):a.push(A);else{a.push(A+":");for(const[D,F]of Object.entries(b.props))a.push(w+" - /"+D+": "+Ch(F));const L=w+" ",j=!!b.ref&&v&&xc(b);for(const D of b.children)typeof D=="string"?f(o(b,D)?D:"",L):_(D,L,v&&!j)}};for(const b of d)typeof b=="string"?f(b,""):_(b,"",!!s.renderCursorPointer);return a.join(`
|
|
112
|
+
`)}function pA(i){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 t="",s=0;const a=new RegExp(e.map(o=>"("+o.regex.source+")").join("|"),"g");return i.replace(a,(o,...c)=>{const d=c[c.length-2],h=c.slice(0,-2);t+=Sc(i.slice(s,d));for(let f=0;f<h.length;f++)if(h[f]){const{replacement:y}=e[f];t+=y;break}return s=d+o.length,o}),t?(t+=Sc(i.slice(s)),String(new RegExp(t))):i}function mA(i,e){if(!e.length)return!1;if(!i.name)return!0;if(i.name.length>e.length)return!1;const t=e.length<=200&&i.name.length<=200?Jx(e,i.name):"";let s=e;for(;t&&s.includes(t);)s=s.replace(t,"");return s.trim().length/e.length>.1}const W0=Symbol("element");function Zf(i){return i[W0]}function sf(i,e){i[W0]=e}function yA(i,e){const t=HE(i,e);return t?Zf(t):void 0}const Z_=":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;min-height:150px;max-height:80vh;max-width:80vw;resize:both;overflow:hidden}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.record.toggled>x-div{clip-path:url(#icon-stop-circle)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.visual-snapshot>x-div{clip-path:url(#icon-snapshot)}x-pw-tool-item.table>x-div{clip-path:url(#icon-table)}x-pw-tool-item.file-upload>x-div{clip-path:url(#icon-file-upload)}x-pw-tool-item.customjson>x-div{clip-path:url(#icon-brackets)}x-pw-tool-item.assert-api-payload>x-div{clip-path:url(#icon-braces-dashes)}x-pw-tool-item.assert-api-payload.toggled>x-div{background-color:#1a73e8}x-pw-tool-item.customjson.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.customjson.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.modular>x-div{clip-path:url(#icon-list-tree);background-color:#3a3a3a}x-pw-tool-item.modular.toggled{background-color:transparent}x-pw-tool-item.modular.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.modular.toggled>x-div{background-color:#1a73e8}x-pw-tool-item.modular.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.modular.disabled.toggled>x-div{opacity:.8}@keyframes modular-pulse{0%{box-shadow:0 0 #1a73e866}70%{box-shadow:0 0 0 4px #1a73e800}to{box-shadow:0 0 #1a73e800}}x-pw-tool-item.modular.toggled{animation:modular-pulse 2s infinite}x-pw-tool-item.drag-record>x-div{clip-path:url(#icon-move)}x-pw-tool-item.gojs-link>x-div{clip-path:url(#icon-gojs-link)}x-pw-tool-item.area-select>x-div{clip-path:url(#icon-selection)}x-pw-tool-item.mouse-path>x-div{clip-path:url(#icon-sketch-tool);transform:scale(.16);transform-origin:0 0;width:100px!important;height:100px!important}x-pw-tool-item.mouse-path.toggled>x-div{background-color:#dc3545}x-pw-tool-item.sketch-tool>x-div{clip-path:url(#icon-sketch-tool);transform:scale(.16);transform-origin:0 0;width:100px!important;height:100px!important}x-pw-tool-item.sketch-tool.toggled>x-div{background-color:#dc3545}x-pw-tool-item.pointer-events>x-div{clip-path:url(#icon-layers)}x-pw-tool-item.pointer-events>x-div{clip-path:url(#icon-layers)}.pw-sketch-tool-cursor{cursor:pointer!important}.pw-deletion-trail{position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:2147483646}.pw-deletion-path{stroke:#dc354580;stroke-width:20;stroke-linecap:round;stroke-linejoin:round;fill:none}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 Mh{constructor(e){this._renderedEntries=[],this._language="javascript",this._injectedScript=e;const t=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=t.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=t.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const s=new this._injectedScript.window.CSSStyleSheet;s.replaceSync(Z_),this._glassPaneShadow.adoptedStyleSheets.push(s)}else{const s=this._injectedScript.document.createElement("style");s.textContent=Z_,this._glassPaneShadow.appendChild(s)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&(!this._injectedScript.document.documentElement.contains(this._glassPaneElement)||this._glassPaneElement.nextElementSibling)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(e){this._language=e}runHighlightOnRaf(e){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest);const t=this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),s=qi(this._language,Rn(e)),a=t.length>1?"#f6b26b7f":"#6fa8dc7f";this.updateHighlight(t.map((o,c)=>{const d=t.length>1?` [${c+1} of ${t.length}]`:"";return{element:o,color:a,tooltipText:s+d}})),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,t){this._actionPointElement.style.top=t+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,t;for(const s of this._renderedEntries)(e=s.highlightElement)==null||e.remove(),(t=s.tooltipElement)==null||t.remove();this._renderedEntries=[]}maskElements(e,t){this.updateHighlight(e.map(s=>({element:s,color:t})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const t of e){const s=this._createHighlightElement();this._glassPaneShadow.appendChild(s);let a;if(t.tooltipText){a=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(a),a.style.top="0",a.style.left="0",a.style.display="flex";const o=this._injectedScript.document.createElement("x-pw-tooltip-line");o.textContent=t.tooltipText,a.appendChild(o)}this._renderedEntries.push({targetElement:t.element,color:t.color,tooltipElement:a,highlightElement:s})}for(const t of this._renderedEntries){if(t.box=t.targetElement.getBoundingClientRect(),!t.tooltipElement)continue;const{anchorLeft:s,anchorTop:a}=this.tooltipPosition(t.box,t.tooltipElement);t.tooltipTop=a,t.tooltipLeft=s}for(const t of this._renderedEntries){t.tooltipElement&&(t.tooltipElement.style.top=t.tooltipTop+"px",t.tooltipElement.style.left=t.tooltipLeft+"px");const s=t.box;t.highlightElement.style.backgroundColor=t.color,t.highlightElement.style.left=s.x+"px",t.highlightElement.style.top=s.y+"px",t.highlightElement.style.width=s.width+"px",t.highlightElement.style.height=s.height+"px",t.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:s.x,y:s.y,width:s.width,height:s.height}))}}}firstBox(){var e;return(e=this._renderedEntries[0])==null?void 0:e.box}firstTooltipBox(){const e=this._renderedEntries[0];if(!(!e||!e.tooltipElement||e.tooltipLeft===void 0||e.tooltipTop===void 0))return{x:e.tooltipLeft,y:e.tooltipTop,left:e.tooltipLeft,top:e.tooltipTop,width:e.tooltipElement.offsetWidth,height:e.tooltipElement.offsetHeight,bottom:e.tooltipTop+e.tooltipElement.offsetHeight,right:e.tooltipLeft+e.tooltipElement.offsetWidth,toJSON:()=>{}}}tooltipPosition(e,t){const s=t.offsetWidth,a=t.offsetHeight,o=this._glassPaneElement.offsetWidth,c=this._glassPaneElement.offsetHeight;let d=Math.max(5,e.left);d+s>o-5&&(d=o-s-5);let h=Math.max(0,e.bottom)+5;return h+a>c-5&&(Math.max(0,e.top)>a+5?h=Math.max(0,e.top)-a-5:h=c-5-a),{anchorLeft:d,anchorTop:h}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let t=0;t<this._renderedEntries.length;++t){if(e[t].element!==this._renderedEntries[t].targetElement||e[t].color!==this._renderedEntries[t].color)return!1;const s=this._renderedEntries[t].box;if(!s)return!1;const a=e[t].element.getBoundingClientRect();if(a.top!==s.top||a.right!==s.right||a.bottom!==s.bottom||a.left!==s.left)return!1}return!0}_createHighlightElement(){return this._injectedScript.document.createElement("x-pw-highlight")}appendChild(e){this._glassPaneShadow.appendChild(e)}onGlassPaneClick(e){this._glassPaneElement.style.pointerEvents="auto",this._glassPaneElement.style.backgroundColor="rgba(0, 0, 0, 0.3)",this._glassPaneElement.addEventListener("click",e)}offGlassPaneClick(e){this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.backgroundColor="transparent",this._glassPaneElement.removeEventListener("click",e)}}function _A(i,e,t){const s=i.left-e.right;if(!(s<0||t!==void 0&&s>t))return s+Math.max(e.bottom-i.bottom,0)+Math.max(i.top-e.top,0)}function bA(i,e,t){const s=e.left-i.right;if(!(s<0||t!==void 0&&s>t))return s+Math.max(e.bottom-i.bottom,0)+Math.max(i.top-e.top,0)}function vA(i,e,t){const s=e.top-i.bottom;if(!(s<0||t!==void 0&&s>t))return s+Math.max(i.left-e.left,0)+Math.max(e.right-i.right,0)}function SA(i,e,t){const s=i.top-e.bottom;if(!(s<0||t!==void 0&&s>t))return s+Math.max(i.left-e.left,0)+Math.max(e.right-i.right,0)}function wA(i,e,t){const s=t===void 0?50:t;let a=0;return i.left-e.right>=0&&(a+=i.left-e.right),e.left-i.right>=0&&(a+=e.left-i.right),e.top-i.bottom>=0&&(a+=e.top-i.bottom),i.top-e.bottom>=0&&(a+=i.top-e.bottom),a>s?void 0:a}const xA=["left-of","right-of","above","below","near"];function Z0(i,e,t,s){const a=e.getBoundingClientRect(),o={"left-of":bA,"right-of":_A,above:vA,below:SA,near:wA}[i];let c;for(const d of t){if(d===e)continue;const h=o(a,d.getBoundingClientRect(),s);h!==void 0&&(c===void 0||h<c)&&(c=h)}return c}function Q0(i,e){for(const t of e.jsonPath)i!=null&&(i=i[t]);return ev(i,e)}function ev(i,e){const t=typeof i=="string"&&!e.caseSensitive?i.toUpperCase():i,s=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!t:e.op==="="?s instanceof RegExp?typeof t=="string"&&!!t.match(s):t===s:typeof t!="string"||typeof s!="string"?!1:e.op==="*="?t.includes(s):e.op==="^="?t.startsWith(s):e.op==="$="?t.endsWith(s):e.op==="|="?t===s||t.startsWith(s+"-"):e.op==="~="?t.split(" ").includes(s):!1}function Qf(i){const e=i.ownerDocument;return i.nodeName==="SCRIPT"||i.nodeName==="NOSCRIPT"||i.nodeName==="STYLE"||e.head&&e.head.contains(i)}function Ut(i,e){let t=i.get(e);if(t===void 0){if(t={full:"",normalized:"",immediate:[]},!Qf(e)){let s="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))t={full:e.value,normalized:Nt(e.value),immediate:[e.value]};else{for(let a=e.firstChild;a;a=a.nextSibling)if(a.nodeType===Node.TEXT_NODE)t.full+=a.nodeValue||"",s+=a.nodeValue||"";else{if(a.nodeType===Node.COMMENT_NODE)continue;s&&t.immediate.push(s),s="",a.nodeType===Node.ELEMENT_NODE&&(t.full+=Ut(i,a).full)}s&&t.immediate.push(s),e.shadowRoot&&(t.full+=Ut(i,e.shadowRoot).full),t.full&&(t.normalized=Nt(t.full))}}i.set(e,t)}return t}function $c(i,e,t){if(Qf(e)||!t(Ut(i,e)))return"none";for(let s=e.firstChild;s;s=s.nextSibling)if(s.nodeType===Node.ELEMENT_NODE&&t(Ut(i,s)))return"selfAndChildren";return e.shadowRoot&&t(Ut(i,e.shadowRoot))?"selfAndChildren":"self"}function tv(i,e){const t=$0(e);if(t)return t.map(o=>Ut(i,o));const s=e.getAttribute("aria-label");if(s!==null&&s.trim())return[{full:s,normalized:Nt(s),immediate:[s]}];const a=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||a){const o=e.labels;if(o)return[...o].map(c=>Ut(i,c))}return[]}function Q_(i){return i.displayName||i.name||"Anonymous"}function TA(i){if(i.type)switch(typeof i.type){case"function":return Q_(i.type);case"string":return i.type;case"object":return i.type.displayName||(i.type.render?Q_(i.type.render):"")}if(i._currentElement){const e=i._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function EA(i){var e;return i.key??((e=i._currentElement)==null?void 0:e.key)}function AA(i){if(i.child){const t=[];for(let s=i.child;s;s=s.sibling)t.push(s);return t}if(!i._currentElement)return[];const e=t=>{var a;const s=(a=t._currentElement)==null?void 0:a.type;return typeof s=="function"||typeof s=="string"};if(i._renderedComponent){const t=i._renderedComponent;return e(t)?[t]:[]}return i._renderedChildren?[...Object.values(i._renderedChildren)].filter(e):[]}function CA(i){var s;const e=i.memoizedProps||((s=i._currentElement)==null?void 0:s.props);if(!e||typeof e=="string")return e;const t={...e};return delete t.children,t}function nv(i){var s;const e={key:EA(i),name:TA(i),children:AA(i).map(nv),rootElements:[],props:CA(i)},t=i.stateNode||i._hostNode||((s=i._renderedComponent)==null?void 0:s._hostNode);if(t instanceof Element)e.rootElements.push(t);else for(const a of e.children)e.rootElements.push(...a.rootElements);return e}function iv(i,e,t=[]){e(i)&&t.push(i);for(const s of i.children)iv(s,e,t);return t}function sv(i,e=[]){const s=(i.ownerDocument||i).createTreeWalker(i,NodeFilter.SHOW_ELEMENT);do{const a=s.currentNode,o=a,c=Object.keys(o).find(h=>h.startsWith("__reactContainer")&&o[h]!==null);if(c)e.push(o[c].stateNode.current);else{const h="_reactRootContainer";o.hasOwnProperty(h)&&o[h]!==null&&e.push(o[h]._internalRoot.current)}if(a instanceof Element&&a.hasAttribute("data-reactroot"))for(const h of Object.keys(a))(h.startsWith("__reactInternalInstance")||h.startsWith("__reactFiber"))&&e.push(a[h]);const d=a instanceof Element?a.shadowRoot:null;d&&sv(d,e)}while(s.nextNode());return e}const kA=()=>({queryAll(i,e){const{name:t,attributes:s}=xs(e,!1),c=sv(i.ownerDocument||i).map(h=>nv(h)).map(h=>iv(h,f=>{const y=f.props??{};if(f.key!==void 0&&(y.key=f.key),t&&f.name!==t||f.rootElements.some(m=>!yo(i,m)))return!1;for(const m of s)if(!Q0(y,m))return!1;return!0})).flat(),d=new Set;for(const h of c)for(const f of h.rootElements)d.add(f);return[...d]}}),rv=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];rv.sort();function Ga(i,e,t){if(!e.includes(t))throw new Error(`"${i}" attribute is only supported for roles: ${e.slice().sort().map(s=>`"${s}"`).join(", ")}`)}function pr(i,e){if(i.op!=="<truthy>"&&!e.includes(i.value))throw new Error(`"${i.name}" must be one of ${e.map(t=>JSON.stringify(t)).join(", ")}`)}function mr(i,e){if(!e.includes(i.op))throw new Error(`"${i.name}" does not support "${i.op}" matcher`)}function NA(i,e){const t={role:e};for(const s of i)switch(s.name){case"checked":{Ga(s.name,$f,e),pr(s,[!0,!1,"mixed"]),mr(s,["<truthy>","="]),t.checked=s.op==="<truthy>"?!0:s.value;break}case"pressed":{Ga(s.name,If,e),pr(s,[!0,!1,"mixed"]),mr(s,["<truthy>","="]),t.pressed=s.op==="<truthy>"?!0:s.value;break}case"selected":{Ga(s.name,zf,e),pr(s,[!0,!1]),mr(s,["<truthy>","="]),t.selected=s.op==="<truthy>"?!0:s.value;break}case"expanded":{Ga(s.name,Pf,e),pr(s,[!0,!1]),mr(s,["<truthy>","="]),t.expanded=s.op==="<truthy>"?!0:s.value;break}case"level":{if(Ga(s.name,Uf,e),typeof s.value=="string"&&(s.value=+s.value),s.op!=="="||typeof s.value!="number"||Number.isNaN(s.value))throw new Error('"level" attribute must be compared to a number');t.level=s.value;break}case"disabled":{pr(s,[!0,!1]),mr(s,["<truthy>","="]),t.disabled=s.op==="<truthy>"?!0:s.value;break}case"name":{if(s.op==="<truthy>")throw new Error('"name" attribute must have a value');if(typeof s.value!="string"&&!(s.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');t.name=s.value,t.nameOp=s.op,t.exact=s.caseSensitive;break}case"include-hidden":{pr(s,[!0,!1]),mr(s,["<truthy>","="]),t.includeHidden=s.op==="<truthy>"?!0:s.value;break}default:throw new Error(`Unknown attribute "${s.name}", must be one of ${rv.map(a=>`"${a}"`).join(", ")}.`)}return t}function MA(i,e,t){const s=[],a=c=>{if(lt(c)===e.role&&!(e.selected!==void 0&&B0(c)!==e.selected)&&!(e.checked!==void 0&&I0(c)!==e.checked)&&!(e.pressed!==void 0&&P0(c)!==e.pressed)&&!(e.expanded!==void 0&&U0(c)!==e.expanded)&&!(e.level!==void 0&&q0(c)!==e.level)&&!(e.disabled!==void 0&&Ac(c)!==e.disabled)&&!(!e.includeHidden&&dn(c))){if(e.name!==void 0){const d=Nt(_o(c,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=Nt(e.name)),t&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!ev(d,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}s.push(c)}},o=c=>{const d=[];c.shadowRoot&&d.push(c.shadowRoot);for(const h of c.querySelectorAll("*"))a(h),h.shadowRoot&&d.push(h.shadowRoot);d.forEach(o)};return o(i),s}function eb(i){return{queryAll:(e,t)=>{const s=xs(t,!0),a=s.name.toLowerCase();if(!a)throw new Error("Role must not be empty");const o=NA(s.attributes,a);Hc();try{return MA(e,o,i)}finally{zc()}}}}class DA{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",RA),this._engines.set("is",to),this._engines.set("where",to),this._engines.set("has",LA),this._engines.set("scope",OA),this._engines.set("light",jA),this._engines.set("visible",HA),this._engines.set("text",zA),this._engines.set("text-is",$A),this._engines.set("text-matches",BA),this._engines.set("has-text",IA),this._engines.set("right-of",Xa("right-of")),this._engines.set("left-of",Xa("left-of")),this._engines.set("above",Xa("above")),this._engines.set("below",Xa("below")),this._engines.set("near",Xa("near")),this._engines.set("nth-match",PA);const e=[...this._engines.keys()];e.sort();const t=[...a0];if(t.sort(),e.join("|")!==t.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join("|")} vs ${t.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,t,s,a){e.has(t)||e.set(t,[]);const o=e.get(t),c=o.find(h=>s.every((f,y)=>h.rest[y]===f));if(c)return c.result;const d=a();return o.push({rest:s,result:d}),d}_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,t,s){const a=this._checkSelector(t);this.begin();try{return this._cached(this._cacheMatches,e,[a,s.scope,s.pierceShadow,s.originalScope],()=>Array.isArray(a)?this._matchesEngine(to,e,a,s):(this._hasScopeClause(a)&&(s=this._expandContextForScopeMatching(s)),this._matchesSimple(e,a.simples[a.simples.length-1].selector,s)?this._matchesParents(e,a,a.simples.length-2,s):!1))}finally{this.end()}}query(e,t){const s=this._checkSelector(t);this.begin();try{return this._cached(this._cacheQuery,s,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(s))return this._queryEngine(to,e,s);this._hasScopeClause(s)&&(e=this._expandContextForScopeMatching(e));const a=this._scoreMap;this._scoreMap=new Map;let o=this._querySimple(e,s.simples[s.simples.length-1].selector);return o=o.filter(c=>this._matchesParents(c,s,s.simples.length-2,e)),this._scoreMap.size&&o.sort((c,d)=>{const h=this._scoreMap.get(c),f=this._scoreMap.get(d);return h===f?0:h===void 0?1:f===void 0?-1:h-f}),this._scoreMap=a,o})}finally{this.end()}}_markScore(e,t){this._scoreMap&&this._scoreMap.set(e,t)}_hasScopeClause(e){return e.simples.some(t=>t.selector.functions.some(s=>s.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const t=St(e.scope);return t?{...e,scope:t,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,t,s){return this._cached(this._cacheMatchesSimple,e,[t,s.scope,s.pierceShadow,s.originalScope],()=>{if(e===s.scope||t.css&&!this._matchesCSS(e,t.css))return!1;for(const a of t.functions)if(!this._matchesEngine(this._getEngine(a.name),e,a.args,s))return!1;return!0})}_querySimple(e,t){return t.functions.length?this._cached(this._cacheQuerySimple,t,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=t.css;const a=t.functions;s==="*"&&a.length&&(s=void 0);let o,c=-1;s!==void 0?o=this._queryCSS(e,s):(c=a.findIndex(d=>this._getEngine(d.name).query!==void 0),c===-1&&(c=0),o=this._queryEngine(this._getEngine(a[c].name),e,a[c].args));for(let d=0;d<a.length;d++){if(d===c)continue;const h=this._getEngine(a[d].name);h.matches!==void 0&&(o=o.filter(f=>this._matchesEngine(h,f,a[d].args,e)))}for(let d=0;d<a.length;d++){if(d===c)continue;const h=this._getEngine(a[d].name);h.matches===void 0&&(o=o.filter(f=>this._matchesEngine(h,f,a[d].args,e)))}return o}):this._queryCSS(e,t.css||"*")}_matchesParents(e,t,s,a){return s<0?!0:this._cached(this._cacheMatchesParents,e,[t,s,a.scope,a.pierceShadow,a.originalScope],()=>{const{selector:o,combinator:c}=t.simples[s];if(c===">"){const d=Gl(e,a);return!d||!this._matchesSimple(d,o,a)?!1:this._matchesParents(d,t,s-1,a)}if(c==="+"){const d=Dh(e,a);return!d||!this._matchesSimple(d,o,a)?!1:this._matchesParents(d,t,s-1,a)}if(c===""){let d=Gl(e,a);for(;d;){if(this._matchesSimple(d,o,a)){if(this._matchesParents(d,t,s-1,a))return!0;if(t.simples[s-1].combinator==="")break}d=Gl(d,a)}return!1}if(c==="~"){let d=Dh(e,a);for(;d;){if(this._matchesSimple(d,o,a)){if(this._matchesParents(d,t,s-1,a))return!0;if(t.simples[s-1].combinator==="~")break}d=Dh(d,a)}return!1}if(c===">="){let d=e;for(;d;){if(this._matchesSimple(d,o,a)){if(this._matchesParents(d,t,s-1,a))return!0;if(t.simples[s-1].combinator==="")break}d=Gl(d,a)}return!1}throw new Error(`Unsupported combinator "${c}"`)})}_matchesEngine(e,t,s,a){if(e.matches)return this._callMatches(e,t,s,a);if(e.query)return this._callQuery(e,s,a).includes(t);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,t,s){if(e.query)return this._callQuery(e,s,t);if(e.matches)return this._queryCSS(t,"*").filter(a=>this._callMatches(e,a,s,t));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,t,s,a){return this._cached(this._cacheCallMatches,t,[e,a.scope,a.pierceShadow,a.originalScope,...s],()=>e.matches(t,s,a,this))}_callQuery(e,t,s){return this._cached(this._cacheCallQuery,e,[s.scope,s.pierceShadow,s.originalScope,...t],()=>e.query(s,t,this))}_matchesCSS(e,t){return e.matches(t)}_queryCSS(e,t){return this._cached(this._cacheQueryCSS,t,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=[];function a(o){if(s=s.concat([...o.querySelectorAll(t)]),!!e.pierceShadow){o.shadowRoot&&a(o.shadowRoot);for(const c of o.querySelectorAll("*"))c.shadowRoot&&a(c.shadowRoot)}}return a(e.scope),s})}_getEngine(e){const t=this._engines.get(e);if(!t)throw new Error(`Unknown selector engine "${e}"`);return t}}const to={matches(i,e,t,s){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(a=>s.matches(i,a,t))},query(i,e,t){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let s=[];for(const a of e)s=s.concat(t.query(i,a));return e.length===1?s:av(s)}},LA={matches(i,e,t,s){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return s.query({...t,scope:i},e).length>0}},OA={matches(i,e,t,s){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const a=t.originalScope||t.scope;return a.nodeType===9?i===a.documentElement:i===a},query(i,e,t){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const s=i.originalScope||i.scope;if(s.nodeType===9){const a=s.documentElement;return a?[a]:[]}return s.nodeType===1?[s]:[]}},RA={matches(i,e,t,s){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!s.matches(i,e,t)}},jA={query(i,e,t){return t.query({...i,pierceShadow:!1},e)},matches(i,e,t,s){return s.matches(i,e,{...t,pierceShadow:!1})}},HA={matches(i,e,t,s){if(e.length)throw new Error('"visible" engine expects no arguments');return xn(i)}},zA={matches(i,e,t,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const a=Nt(e[0]).toLowerCase(),o=c=>c.normalized.toLowerCase().includes(a);return $c(s._cacheText,i,o)==="self"}},$A={matches(i,e,t,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const a=Nt(e[0]),o=c=>!a&&!c.immediate.length?!0:c.immediate.some(d=>Nt(d)===a);return $c(s._cacheText,i,o)!=="none"}},BA={matches(i,e,t,s){if(e.length===0||typeof e[0]!="string"||e.length>2||e.length===2&&typeof e[1]!="string")throw new Error('"text-matches" engine expects a regexp body and optional regexp flags');const a=new RegExp(e[0],e.length===2?e[1]:void 0),o=c=>a.test(c.full);return $c(s._cacheText,i,o)==="self"}},IA={matches(i,e,t,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(Qf(i))return!1;const a=Nt(e[0]).toLowerCase();return(c=>c.normalized.toLowerCase().includes(a))(Ut(s._cacheText,i))}};function Xa(i){return{matches(e,t,s,a){const o=t.length&&typeof t[t.length-1]=="number"?t[t.length-1]:void 0,c=o===void 0?t:t.slice(0,t.length-1);if(t.length<1+(o===void 0?0:1))throw new Error(`"${i}" engine expects a selector list and optional maximum distance in pixels`);const d=a.query(s,c),h=Z0(i,e,d,o);return h===void 0?!1:(a._markScore(e,h),!0)}}}const PA={query(i,e,t){let s=e[e.length-1];if(e.length<2)throw new Error('"nth-match" engine expects non-empty selector list and an index argument');if(typeof s!="number"||s<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const a=to.query(i,e.slice(0,e.length-1),t);return s--,s<a.length?[a[s]]:[]}};function Gl(i,e){if(i!==e.scope)return e.pierceShadow?St(i):i.parentElement||void 0}function Dh(i,e){if(i!==e.scope)return i.previousElementSibling||void 0}function av(i){const e=new Map,t=[],s=[];function a(c){let d=e.get(c);if(d)return d;const h=St(c);return h?a(h).children.push(c):t.push(c),d={children:[],taken:!1},e.set(c,d),d}for(const c of i)a(c).taken=!0;function o(c){const d=e.get(c);if(d.taken&&s.push(c),d.children.length>1){const h=new Set(d.children);d.children=[];let f=c.firstElementChild;for(;f&&d.children.length<h.size;)h.has(f)&&d.children.push(f),f=f.nextElementSibling;for(f=c.shadowRoot?c.shadowRoot.firstElementChild:null;f&&d.children.length<h.size;)h.has(f)&&d.children.push(f),f=f.nextElementSibling}d.children.forEach(o)}return t.forEach(o),s}const ov=10,Ir=ov/2,tb=1,UA=2,qA=10,VA=50,lv=100,cv=120,uv=140,dv=160,uc=180,hv=200,nb=250,FA=cv+Ir,GA=uv+Ir,ib=lv+Ir,XA=dv+Ir,YA=uc+Ir,KA=hv+Ir,JA=300,Lh=500,WA=505,fv=510,ZA=515,Oh=520,gv=530,QA=9e6,Cc=1e4,eC=1e7,sb=Cc+100,tC=1e3,nC=/\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?/;function rb(i){if(!nC.test(i))return!1;const e=i.replace(/[\s,]*\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?\s*$/,"").replace(/^\s*\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?[\s,]+/,"").trim();return e.length>0&&e.length<i.length}function iC(i,e,t,s,a){const o=xr(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link],[role=option],[role=menuitem],[role=tab],[role=treeitem]",a.root);if(o&&xn(o))return o;const c=20,d=[],y=(a.root??e.ownerDocument).querySelectorAll('button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link],[role=option],[role=menuitem],[role=tab],[role=treeitem],[id$="Button"],[id$="button"]');for(const m of y){if(!xn(m))continue;const _=m.getBoundingClientRect(),b=_.left+_.width/2,w=_.top+_.height/2,v=Math.sqrt(Math.pow(t-b,2)+Math.pow(s-w,2));v<=c&&d.push({element:m,distance:v})}return d.length===0?null:(d.sort((m,_)=>m.distance-_.distance),d[0].element)}function ab(i,e,t){i._evaluator.begin();const s={allowText:new Map,disallowText:new Map};Hc(),Rf();try{let a=[];if(t.forTextExpect){let d=no(i,e.ownerDocument.documentElement,t);for(let h=e;h;h=St(h)){const f=ms(s,i,h,{...t,noText:!0});if(!f)continue;if(ys(f)<=tC){d=f;break}}a=[dc(d)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const d=t.__clickX,h=t.__clickY;let f=!1;if(d!==void 0&&h!==void 0){const y=iC(i,e,d,h,t);y&&(e=y,f=!0)}else{const y=xr(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link],[role=option],[role=menuitem],[role=tab],[role=treeitem]",t.root);y&&xn(y)&&(e=y,f=!0)}if(!f){const y=e.closest("svg"),m=y==null?void 0:y.parentElement;m&&xn(m)&&(e=m)}}if(t.multiple){const d=ms(s,i,e,t),h=ms(s,i,e,{...t,noText:!0});let f=[d,h];if(s.allowText.clear(),s.disallowText.clear(),d&&Rh(d)&&f.push(ms(s,i,e,{...t,noCSSId:!0})),h&&Rh(h)&&f.push(ms(s,i,e,{...t,noText:!0,noCSSId:!0})),f=f.filter(Boolean),!f.length){const y=no(i,e,t);f.push(y),Rh(y)&&f.push(no(i,e,{...t,noCSSId:!0}))}a=[...new Set(f.map(y=>dc(y)))]}else{const d=ms(s,i,e,t)||no(i,e,t);a=[dc(d)]}}const o=a[0],c=i.parseSelector(o);return{selector:o,selectors:a,elements:i.querySelectorAll(c,t.root??e.ownerDocument)}}finally{jf(),zc(),i._evaluator.end()}}function ms(i,e,t,s){if(s.root&&!yo(s.root,t))throw new Error("Target element must belong to the root's subtree");if(t===s.root)return[{engine:"css",selector:":scope",score:1}];if(t.ownerDocument.documentElement===t)return[{engine:"css",selector:"html",score:1}];let a=null;const o=d=>{(!a||ys(d)<ys(a))&&(a=d)},c=[];if(!s.noText)for(const d of cC(e,t,!s.isRecursive))c.push({candidate:d,isTextCandidate:!0});for(const d of lC(e,t,s))s.omitInternalEngines&&d.engine.startsWith("internal:")||c.push({candidate:[d],isTextCandidate:!1});c.sort((d,h)=>ys(d.candidate)-ys(h.candidate));for(const{candidate:d,isTextCandidate:h}of c){const f=e.querySelectorAll(e.parseSelector(dc(d)),s.root??t.ownerDocument);if(!f.includes(t))continue;if(f.length===1){o(d);break}const y=new Set(["div","span","a","p","section","article","main","aside","header","footer","nav","ul","ol","li"]);if(d.length===1&&d[0].engine==="css"&&y.has(d[0].selector.toLowerCase())&&f.length>1)continue;const _=f.indexOf(t);if(!(_>5)&&(o([...d,{engine:"nth",selector:String(_),score:Cc}]),!s.isRecursive))for(let b=St(t);b&&b!==s.root;b=St(b)){const w=f.filter(D=>yo(b,D)&&D!==b),v=w.indexOf(t);if(w.length>5||v===-1||v===_&&w.length>1)continue;const T=w.length===1?d:[...d,{engine:"nth",selector:String(v),score:Cc}];if(a&&ys([{engine:"",selector:"",score:1},...T])>=ys(a))continue;const C=!!s.noText||h,L=C?i.disallowText:i.allowText;let j=L.get(b);j===void 0&&(j=ms(i,e,b,{...s,isRecursive:!0,noText:C})||no(e,b,s),L.set(b,j)),j&&o([...j,...T])}}return a}function sC(i){const e=lt(i);return e==="dialog"||e==="alertdialog"?!0:i.getAttribute("aria-modal")==="true"}function rC(i){return!!(/^react-aria\d+/.test(i)||/^mui-\d+/.test(i)||/^(mat|cdk)-[a-z]+-\d+$/.test(i)||i.includes(":"))}function pv(i,e){return!!(af(e)||rC(e)||sC(i)&&/[a-zA-Z]\d{3,}$/.test(e))}function aC(i,e){const t=e.match(/^([A-Za-z][A-Za-z_-]{3,})(\d+)$/);if(!t)return!1;const s=t[1],a=i.ownerDocument;if(!a)return!1;const o=new RegExp(`^${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\d+$`);let c;try{c=`[id^="${window.CSS&&window.CSS.escape?window.CSS.escape(s):s}"]`}catch{c=`[id^="${s}"]`}const d=a.querySelectorAll(c);for(const h of d){const f=h.id;if(f!==e&&o.test(f))return!0}return!1}function oC(i){return!!(/\d{2,}[_-][a-zA-Z]/.test(i)||/[-_]\d+$/.test(i)||/^react-aria\d+/.test(i)||/^(mui|mat|cdk)-\d+/.test(i)||/^\d+$/.test(i)||/\d{4,}/.test(i)||/[a-zA-Z]\d{3,}$/.test(i)||i.includes(":"))}function lC(i,e,t){const s=[];{for(const y of["data-testid","data-test-id","data-test"])y!==t.testIdAttributeName&&e.getAttribute(y)&&s.push({engine:"css",selector:`[${y}=${Bi(e.getAttribute(y))}]`,score:UA});if(!t.noCSSId){const y=e.getAttribute("id");y&&!pv(e,y)&&s.push({engine:"css",selector:mv(y),score:Lh})}const c=/--(?:highlight|hover|active|focus|focused|selected|disabled|open|closed|expanded|collapsed|checked|pressed|dragging|visible|hidden)\b/i;for(const y of e.classList)y.indexOf("__")>0&&!af(y)&&!c.test(y)&&s.push({engine:"css",selector:`${Sn(e)}.${yv(y)}`,score:WA});const d=new Set(["div","span","a","p","section","article","main","aside","header","footer","nav","ul","ol","li"]),h=e.nodeName.toLowerCase(),f=d.has(h);if(s.push({engine:"css",selector:Sn(e),score:f?QA:gv}),f){const y=e.querySelectorAll("input[name], input[id], textarea[name], textarea[id], select[name], select[id], button[name], button[id]");for(const m of y){let _="",b="";const w=m.getAttribute("name");if(w)_="name",b=w;else{const T=m.getAttribute("id");T&&!af(T)&&!aC(m,T)&&(_="id",b=T)}if(!_)continue;const v=m.nodeName.toLowerCase();s.push({engine:"css",selector:`${Sn(e)}:has(${v}[${_}=${Bi(b)}])`,score:ZA});break}}}if(e.nodeName==="IFRAME"){for(const d of["name","title"])e.getAttribute(d)&&s.push({engine:"css",selector:`${Sn(e)}[${d}=${Bi(e.getAttribute(d))}]`,score:qA});const c=e.id;if(c&&oC(c)){const d=s.findIndex(f=>f.score===Lh);d!==-1&&s.splice(d,1);const h=e.getAttribute("src");if(h){const f=h.trim();if(f&&!/^(data|blob|javascript|about):/i.test(f)){const m=f.split(/[?#]/,1)[0].split("/").filter(Boolean),_=m[m.length-1];_&&s.push({engine:"css",selector:`iframe[src*=${Bi(_)}]`,score:Lh})}}}return e.getAttribute(t.testIdAttributeName)&&s.push({engine:"css",selector:`[${t.testIdAttributeName}=${Bi(e.getAttribute(t.testIdAttributeName))}]`,score:tb}),rf([s]),s}if(e.getAttribute(t.testIdAttributeName)){const d=`"${e.getAttribute(t.testIdAttributeName).replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"`;s.push({engine:"internal:testid",selector:`[${t.testIdAttributeName}=${d}]`,score:tb})}if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e;if(c.placeholder){s.push({engine:"internal:attr",selector:`[placeholder=${It(c.placeholder,!0)}]`,score:FA});for(const d of Er(c.placeholder))s.push({engine:"internal:attr",selector:`[placeholder=${It(d.text,!1)}]`,score:cv-d.scoreBonus})}}const a=tv(i._evaluator._cacheText,e);for(const c of a){const d=c.normalized;s.push({engine:"internal:label",selector:Bt(d,!0),score:GA});for(const h of Er(d))s.push({engine:"internal:label",selector:Bt(h.text,!1),score:uv-h.scoreBonus})}const o=lt(e);return o&&!["none","presentation"].includes(o)&&s.push({engine:"internal:role",selector:o,score:fv}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&s.push({engine:"css",selector:`${Sn(e)}[name=${Bi(e.getAttribute("name"))}]`,score:Oh}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&s.push({engine:"css",selector:`${Sn(e)}[type=${Bi(e.getAttribute("type"))}]`,score:Oh}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&s.push({engine:"css",selector:Sn(e),score:Oh+1}),rf([s]),s}function cC(i,e,t){if(e.nodeName==="SELECT")return[];const s=[],a=e.getAttribute("title");if(a){s.push([{engine:"internal:attr",selector:`[title=${It(a,!0)}]`,score:KA}]);for(const f of Er(a))s.push([{engine:"internal:attr",selector:`[title=${It(f.text,!1)}]`,score:hv-f.scoreBonus}])}const o=e.getAttribute("alt");if(o&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){s.push([{engine:"internal:attr",selector:`[alt=${It(o,!0)}]`,score:XA}]);for(const f of Er(o))s.push([{engine:"internal:attr",selector:`[alt=${It(f.text,!1)}]`,score:dv-f.scoreBonus}])}const c=Ut(i._evaluator._cacheText,e).normalized,d=c?Er(c):[];if(c){const f=rb(c)?sb:0;if(t){c.length<=80&&s.push([{engine:"internal:text",selector:Bt(c,!0),score:YA+f}]);for(const m of d)s.push([{engine:"internal:text",selector:Bt(m.text,!1),score:uc-m.scoreBonus}])}const y={engine:"css",selector:Sn(e),score:gv};for(const m of d)s.push([y,{engine:"internal:has-text",selector:Bt(m.text,!1),score:uc-m.scoreBonus}]);if(t&&c.length<=80){const m=new RegExp("^"+Sc(c)+"$");s.push([y,{engine:"internal:has-text",selector:Bt(m,!1),score:nb+f}])}}const h=lt(e);if(h&&!["none","presentation"].includes(h)){const f=_o(e,!1);if(f&&!f.match(new RegExp("^\\p{Co}+$","u"))){const y=rb(f)?ib+sb:ib,m={engine:"internal:role",selector:`${h}[name=${It(f,!0)}]`,score:y};s.push([m]);for(const _ of Er(f))s.push([{engine:"internal:role",selector:`${h}[name=${It(_.text,!1)}]`,score:lv-_.scoreBonus}])}else{const y={engine:"internal:role",selector:`${h}`,score:fv};for(const m of d)s.push([y,{engine:"internal:has-text",selector:Bt(m.text,!1),score:uc-m.scoreBonus}]);if(t&&c.length<=80){const m=new RegExp("^"+Sc(c)+"$");s.push([y,{engine:"internal:has-text",selector:Bt(m,!1),score:nb}])}}}return rf(s),s}function mv(i){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(i)?"#"+i:`[id=${Bi(i)}]`}function Rh(i){return i.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function no(i,e,t){const s=t.root??e.ownerDocument,a=[];function o(d){const h=a.slice();d&&h.unshift(d);const f=h.join(" > "),y=i.parseSelector(f);return i.querySelector(y,s,!1)===e?f:void 0}function c(d){const h={engine:"css",selector:d,score:eC},f=i.parseSelector(d),y=i.querySelectorAll(f,s);if(y.length===1)return[h];const m={engine:"nth",selector:String(y.indexOf(e)),score:Cc};return[h,m]}for(let d=e;d&&d!==s;d=St(d)){let h="";if(d.id&&!t.noCSSId&&!pv(d,d.id)){const m=mv(d.id),_=o(m);if(_)return c(_);h=m}const f=d.parentNode,y=[...d.classList].map(yv);for(let m=0;m<y.length;++m){const _="."+y.slice(0,m+1).join("."),b=o(_);if(b)return c(b);!h&&f&&f.querySelectorAll(_).length===1&&(h=_)}if(f){const m=[...f.children],_=d.nodeName,w=m.filter(T=>T.nodeName===_).indexOf(d)===0?Sn(d):`${Sn(d)}:nth-child(${1+m.indexOf(d)})`,v=o(w);if(v)return c(v);h||(h=w)}else h||(h=Sn(d));a.unshift(h)}return c(o())}function rf(i){for(const e of i)for(const t of e)t.score>VA&&t.score<JA&&(t.score+=Math.min(ov,t.selector.length/10|0))}function dc(i){const e=[];let t="";for(const{engine:s,selector:a}of i)e.length&&(t!=="css"||s!=="css"||a.startsWith(":nth-match("))&&e.push(">>"),t=s,s==="css"?e.push(a):e.push(`${s}=${a}`);return e.join(" ")}function ys(i){let e=0;for(let t=0;t<i.length;t++)e+=i[t].score*(i.length-t);return e}function af(i){if(/^\d+$/.test(i)||/^.+__search_[a-zA-Z0-9]{4,}$/.test(i))return!0;let e,t=0;for(let s=0;s<i.length;++s){const a=i[s];let o;if(!(a==="-"||a==="_")){if(a>="a"&&a<="z"?o="lower":a>="A"&&a<="Z"?o="upper":a>="0"&&a<="9"?o="digit":o="other",o==="lower"&&e==="upper"){e=o;continue}e&&e!==o&&++t,e=o}}return t>=i.length/4}function yr(i,e){if(i.length<=e)return i;i=i.substring(0,e);const t=i.match(/^(.*)\b(.+?)$/);return t?t[1].trimEnd():""}function Er(i){let e=[];const t=/^\s*\d{4}[-/]\d{1,2}[-/]\d{1,2}/.test(i),s=/\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?\s*$/.test(i);{const o=i.match(/^([\d.,]+)[^.,\w]/),c=o?o[1].length:0;if(c&&!t){const d=yr(i.substring(c).trimStart(),80);e.push({text:d,scoreBonus:d.length<=30?2:1})}}{const o=i.match(/[^.,\w]([\d.,]+)$/),c=o?o[1].length:0;if(c&&!s){const d=yr(i.substring(0,i.length-c).trimEnd(),80);e.push({text:d,scoreBonus:d.length<=30?2:1})}}let a=!1;{const o=/[\s,]*\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?\s*$/,c=i.replace(o,"").trim();if(c&&c.length<i.length){const d=yr(c,80);e.push({text:d,scoreBonus:d.length<=30?2:1}),a=!0}}{const o=/^\s*\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[\sT,]\d{1,2}:\d{1,2}(?::\d{1,2})?)?[\s,]+/,c=i.replace(o,"").trim();if(c&&c.length<i.length){const d=yr(c,80);e.push({text:d,scoreBonus:d.length<=30?2:1}),a=!0}}return a||(i.length<=30?e.push({text:i,scoreBonus:0}):(e.push({text:yr(i,80),scoreBonus:0}),e.push({text:yr(i,30),scoreBonus:1}))),e=e.filter(o=>o.text),e.length||e.push({text:i.substring(0,80),scoreBonus:0}),e}function Sn(i){return i.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function yv(i){let e="";for(let t=0;t<i.length;t++)e+=uC(i,t);return e}function uC(i,e){const t=i.charCodeAt(e);return t===0?"�":t>=1&&t<=31||t>=48&&t<=57&&(e===0||e===1&&i.charCodeAt(0)===45)?"\\"+t.toString(16)+" ":e===0&&t===45&&i.length===1?"\\"+i.charAt(e):t>=128||t===45||t===95||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?i.charAt(e):"\\"+i.charAt(e)}function _v(i,e){const t=i.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let s=t.substring(t.lastIndexOf("/")+1);return s.endsWith(e)&&(s=s.substring(0,s.length-e.length)),s}function dC(i,e){return e?e.toUpperCase():""}const hC=/(?:^|[-_/])(\w)/g,bv=i=>i&&i.replace(hC,dC);function fC(i){function e(y){const m=y.name||y._componentTag||y.__playwright_guessedName;if(m)return m;const _=y.__file;if(_)return bv(_v(_,".vue"))}function t(y,m){return y.type.__playwright_guessedName=m,m}function s(y){var _,b,w,v;const m=e(y.type||{});if(m)return m;if(y.root===y)return"Root";for(const T in(b=(_=y.parent)==null?void 0:_.type)==null?void 0:b.components)if(((w=y.parent)==null?void 0:w.type.components[T])===y.type)return t(y,T);for(const T in(v=y.appContext)==null?void 0:v.components)if(y.appContext.components[T]===y.type)return t(y,T);return"Anonymous Component"}function a(y){return y._isBeingDestroyed||y.isUnmounted}function o(y){return y.subTree.type.toString()==="Symbol(Fragment)"}function c(y){const m=[];return y.component&&m.push(y.component),y.suspense&&m.push(...c(y.suspense.activeBranch)),Array.isArray(y.children)&&y.children.forEach(_=>{_.component?m.push(_.component):m.push(...c(_))}),m.filter(_=>{var b;return!a(_)&&!((b=_.type.devtools)!=null&&b.hide)})}function d(y){return o(y)?h(y.subTree):[y.subTree.el]}function h(y){if(!y.children)return[];const m=[];for(let _=0,b=y.children.length;_<b;_++){const w=y.children[_];w.component?m.push(...d(w.component)):w.el&&m.push(w.el)}return m}function f(y){return{name:s(y),children:c(y.subTree).map(f),rootElements:d(y),props:y.props}}return f(i)}function gC(i){function e(o){const c=o.displayName||o.name||o._componentTag;if(c)return c;const d=o.__file;if(d)return bv(_v(d,".vue"))}function t(o){const c=e(o.$options||o.fnOptions||{});return c||(o.$root===o?"Root":"Anonymous Component")}function s(o){return o.$children?o.$children:Array.isArray(o.subTree.children)?o.subTree.children.filter(c=>!!c.component).map(c=>c.component):[]}function a(o){return{name:t(o),children:s(o).map(a),rootElements:[o.$el],props:o._props}}return a(i)}function vv(i,e,t=[]){e(i)&&t.push(i);for(const s of i.children)vv(s,e,t);return t}function Sv(i,e=[]){const s=(i.ownerDocument||i).createTreeWalker(i,NodeFilter.SHOW_ELEMENT),a=new Set;do{const o=s.currentNode;o.__vue__&&a.add(o.__vue__.$root),o.__vue_app__&&o._vnode&&o._vnode.component&&e.push({root:o._vnode.component,version:3});const c=o instanceof Element?o.shadowRoot:null;c&&Sv(c,e)}while(s.nextNode());for(const o of a)e.push({version:2,root:o});return e}const pC=()=>({queryAll(i,e){const t=i.ownerDocument||i,{name:s,attributes:a}=xs(e,!1),d=Sv(t).map(f=>f.version===3?fC(f.root):gC(f.root)).map(f=>vv(f,y=>{if(s&&y.name!==s||y.rootElements.some(m=>!yo(i,m)))return!1;for(const m of a)if(!Q0(y.props,m))return!1;return!0})).flat(),h=new Set;for(const f of d)for(const y of f.rootElements)h.add(y);return[...h]}}),ob={queryAll(i,e){e.startsWith("/")&&i.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const t=[],s=i.ownerDocument||i;if(!s)return t;const a=s.evaluate(e,i,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let o=a.iterateNext();o;o=a.iterateNext())o.nodeType===Node.ELEMENT_NODE&&t.push(o);return t}};function eg(i,e,t){return`internal:attr=[${i}=${It(e,(t==null?void 0:t.exact)||!1)}]`}function mC(i,e){return`internal:testid=[${i}=${It(e,!0)}]`}function yC(i,e){return"internal:label="+Bt(i,!!(e!=null&&e.exact))}function _C(i,e){return eg("alt",i,e)}function bC(i,e){return eg("title",i,e)}function vC(i,e){return eg("placeholder",i,e)}function SC(i,e){return"internal:text="+Bt(i,!!(e!=null&&e.exact))}function wC(i,e={}){const t=[];return e.checked!==void 0&&t.push(["checked",String(e.checked)]),e.disabled!==void 0&&t.push(["disabled",String(e.disabled)]),e.selected!==void 0&&t.push(["selected",String(e.selected)]),e.expanded!==void 0&&t.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&t.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&t.push(["level",String(e.level)]),e.name!==void 0&&t.push(["name",It(e.name,!!e.exact)]),e.pressed!==void 0&&t.push(["pressed",String(e.pressed)]),`internal:role=${i}${t.map(([s,a])=>`[${s}=${a}]`).join("")}`}const Ya=Symbol("selector"),xC=class io{constructor(e,t,s){if(s!=null&&s.hasText&&(t+=` >> internal:has-text=${Bt(s.hasText,!1)}`),s!=null&&s.hasNotText&&(t+=` >> internal:has-not-text=${Bt(s.hasNotText,!1)}`),s!=null&&s.has&&(t+=" >> internal:has="+JSON.stringify(s.has[Ya])),s!=null&&s.hasNot&&(t+=" >> internal:has-not="+JSON.stringify(s.hasNot[Ya])),(s==null?void 0:s.visible)!==void 0&&(t+=` >> visible=${s.visible?"true":"false"}`),this[Ya]=t,t){const c=e.parseSelector(t);this.element=e.querySelector(c,e.document,!1),this.elements=e.querySelectorAll(c,e.document)}const a=t,o=this;o.locator=(c,d)=>new io(e,a?a+" >> "+c:c,d),o.getByTestId=c=>o.locator(mC(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),c)),o.getByAltText=(c,d)=>o.locator(_C(c,d)),o.getByLabel=(c,d)=>o.locator(yC(c,d)),o.getByPlaceholder=(c,d)=>o.locator(vC(c,d)),o.getByText=(c,d)=>o.locator(SC(c,d)),o.getByTitle=(c,d)=>o.locator(bC(c,d)),o.getByRole=(c,d={})=>o.locator(wC(c,d)),o.filter=c=>new io(e,t,c),o.first=()=>o.locator("nth=0"),o.last=()=>o.locator("nth=-1"),o.nth=c=>o.locator(`nth=${c}`),o.and=c=>new io(e,a+" >> internal:and="+JSON.stringify(c[Ya])),o.or=c=>new io(e,a+" >> internal:or="+JSON.stringify(c[Ya]))}};let TC=xC;class EC{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,t)=>this._querySelector(e,!!t),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,t)=>this._generateLocator(e,t),ariaSnapshot:(e,t)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,t||{mode:"expect"}),resume:()=>this._resume(),...new TC(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,t){if(typeof e!="string")throw new Error("Usage: playwright.query('Playwright >> selector').");const s=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(s,this._injectedScript.document,t)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const t=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(t,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,t){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const s=this._injectedScript.generateSelectorSimple(e);return qi(t||"javascript",s)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function AC(i){try{return i instanceof RegExp||Object.prototype.toString.call(i)==="[object RegExp]"}catch{return!1}}function CC(i){try{return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}catch{return!1}}function kC(i){try{return i instanceof URL||Object.prototype.toString.call(i)==="[object URL]"}catch{return!1}}function NC(i){var e;try{return i instanceof Error||i&&((e=Object.getPrototypeOf(i))==null?void 0:e.name)==="Error"}catch{return!1}}function MC(i,e){try{return i instanceof e||Object.prototype.toString.call(i)===`[object ${e.name}]`}catch{return!1}}const wv={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function DC(i){if("toBase64"in i)return i.toBase64();const e=Array.from(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)).map(t=>String.fromCharCode(t)).join("");return btoa(e)}function LC(i,e){const t=atob(i),s=new Uint8Array(t.length);for(let a=0;a<t.length;a++)s[a]=t.charCodeAt(a);return new e(s.buffer)}function of(i,e=[],t=new Map){if(!Object.is(i,void 0)){if(typeof i=="object"&&i){if("ref"in i)return t.get(i.ref);if("v"in i)return i.v==="undefined"?void 0:i.v==="null"?null:i.v==="NaN"?NaN:i.v==="Infinity"?1/0:i.v==="-Infinity"?-1/0:i.v==="-0"?-0:void 0;if("d"in i)return new Date(i.d);if("u"in i)return new URL(i.u);if("bi"in i)return BigInt(i.bi);if("e"in i){const s=new Error(i.e.m);return s.name=i.e.n,s.stack=i.e.s,s}if("r"in i)return new RegExp(i.r.p,i.r.f);if("a"in i){const s=[];t.set(i.id,s);for(const a of i.a)s.push(of(a,e,t));return s}if("o"in i){const s={};t.set(i.id,s);for(const{k:a,v:o}of i.o)a!=="__proto__"&&(s[a]=of(o,e,t));return s}if("h"in i)return e[i.h];if("ta"in i)return LC(i.ta.b,wv[i.ta.k])}return i}}function OC(i,e){return lf(i,e,{visited:new Map,lastId:0})}function lf(i,e,t){if(i&&typeof i=="object"){if(typeof globalThis.Window=="function"&&i instanceof globalThis.Window)return"ref: <Window>";if(typeof globalThis.Document=="function"&&i instanceof globalThis.Document)return"ref: <Document>";if(typeof globalThis.Node=="function"&&i instanceof globalThis.Node)return"ref: <Node>"}return xv(i,e,t)}function xv(i,e,t){var o;const s=e(i);if("fallThrough"in s)i=s.fallThrough;else return s;if(typeof i=="symbol")return{v:"undefined"};if(Object.is(i,void 0))return{v:"undefined"};if(Object.is(i,null))return{v:"null"};if(Object.is(i,NaN))return{v:"NaN"};if(Object.is(i,1/0))return{v:"Infinity"};if(Object.is(i,-1/0))return{v:"-Infinity"};if(Object.is(i,-0))return{v:"-0"};if(typeof i=="boolean"||typeof i=="number"||typeof i=="string")return i;if(typeof i=="bigint")return{bi:i.toString()};if(NC(i)){let c;return(o=i.stack)!=null&&o.startsWith(i.name+": "+i.message)?c=i.stack:c=`${i.name}: ${i.message}
|
|
113
|
+
${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(CC(i))return{d:i.toJSON()};if(kC(i))return{u:i.toJSON()};if(AC(i))return{r:{p:i.source,f:i.flags}};for(const[c,d]of Object.entries(wv))if(MC(i,d))return{ta:{b:DC(i),k:c}};const a=t.visited.get(i);if(a)return{ref:a};if(Array.isArray(i)){const c=[],d=++t.lastId;t.visited.set(i,d);for(let h=0;h<i.length;++h)c.push(lf(i[h],e,t));return{a:c,id:d}}if(typeof i=="object"){const c=[],d=++t.lastId;t.visited.set(i,d);for(const f of Object.keys(i)){let y;try{y=i[f]}catch{continue}f==="toJSON"&&typeof y=="function"?c.push({k:f,v:{o:[],id:0}}):c.push({k:f,v:lf(y,e,t)})}let h;try{c.length===0&&i.toJSON&&typeof i.toJSON=="function"&&(h={value:i.toJSON()})}catch{}return h?xv(h.value,e,t):{o:c,id:d}}}class RC{constructor(e,t){var s,a,o,c,d,h,f,y;this.global=e,this.isUnderTest=t,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(s=e.setTimeout)==null?void 0:s.bind(e),clearTimeout:(a=e.clearTimeout)==null?void 0:a.bind(e),setInterval:(o=e.setInterval)==null?void 0:o.bind(e),clearInterval:(c=e.clearInterval)==null?void 0:c.bind(e),requestAnimationFrame:(d=e.requestAnimationFrame)==null?void 0:d.bind(e),cancelAnimationFrame:(h=e.cancelAnimationFrame)==null?void 0:h.bind(e),requestIdleCallback:(f=e.requestIdleCallback)==null?void 0:f.bind(e),cancelIdleCallback:(y=e.cancelIdleCallback)==null?void 0:y.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,t,s,a,...o){const c=o.slice(0,a),d=o.slice(a),h=[];for(let y=0;y<c.length;y++)h[y]=of(c[y],d);let f=this.global.eval(s);return e===!0?f=f(...h):e===!1?f=f:typeof f=="function"&&(f=f(...h)),t?this._promiseAwareJsonValueNoThrow(f):f}jsonValue(e,t){if(t!==void 0)return OC(t,s=>({fallThrough:s}))}_promiseAwareJsonValueNoThrow(e){const t=s=>{try{return this.jsonValue(!0,s)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const s=await e;return t(s)})():t(e)}}class Tv{constructor(e,t){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this._lastAriaSnapshotForTrack=new Map,this.utils={asLocator:qi,cacheNormalizedWhitespaces:Yx,elementText:Ut,getAriaRole:lt,getElementAccessibleDescription:X_,getElementAccessibleName:_o,isElementVisible:xn,isInsideScope:yo,normalizeWhiteSpace:Nt,parseAriaSnapshot:Mf,generateAriaTree:co,findNewElement:yA,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=t.isUnderTest,this.utils.builtins=new RC(e,t.isUnderTest).builtins,this._sdkLanguage=t.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=t.testIdAttributeName,this._evaluator=new DA,this.consoleApi=new EC(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",ob),this._engines.set("xpath:light",ob),this._engines.set("_react",kA()),this._engines.set("_vue",pC()),this._engines.set("role",eb(!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",eb(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:s,source:a}of t.customEngines)this._engines.set(s,this.eval(a));this._stableRafCount=t.stableRafCount,this._browserName=t.browserName,this._isUtilityWorld=!!t.isUtilityWorld,$E({browserNameForWorkarounds:t.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 t=To(e);return Gx(t,s=>{if(!this._engines.has(s.name))throw this.createStacklessError(`Unknown engine "${s.name}" while parsing selector ${e}`)}),t}generateSelector(e,t){return ab(this,e,t)}generateSelectorSimple(e,t){return ab(this,e,{...t,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,t,s){const a=this.querySelectorAll(e,t);if(s&&a.length>1)throw this.strictModeViolationError(e,a);return this.checkDeprecatedSelectorUsage(e,a),a[0]}_queryNth(e,t){const s=[...e];let a=+t.body;return a===-1&&(a=s.length-1),new Set(s.slice(a,a+1))}_queryLayoutSelector(e,t,s){const a=t.name,o=t.body,c=[],d=this.querySelectorAll(o.parsed,s);for(const h of e){const f=Z0(a,h,d,o.distance);f!==void 0&&c.push({element:h,score:f})}return c.sort((h,f)=>h.score-f.score),new Set(c.map(h=>h.element))}ariaSnapshot(e,t){return this.incrementalAriaSnapshot(e,t).full}incrementalAriaSnapshot(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");const s=co(e,t),a=uo(s,t);let o;if(t.track){const c=this._lastAriaSnapshotForTrack.get(t.track);c&&(o=uo(s,t,c)),this._lastAriaSnapshotForTrack.set(t.track,s)}return this._lastAriaSnapshotForQuery=s,{full:a,incremental:o,iframeRefs:s.iframeRefs}}ariaSnapshotForRecorder(){const e=co(this.document.body,{mode:"ai"});return{ariaSnapshot:uo(e,{mode:"ai"}),refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,t){return hA(e.documentElement,t)}querySelectorAll(e,t){if(e.capture!==void 0){if(e.parts.some(a=>a.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const s={parts:e.parts.slice(0,e.capture+1)};if(e.capture<e.parts.length-1){const a={parts:e.parts.slice(e.capture+1)},o={name:"internal:has",body:{parsed:a},source:Rn(a)};s.parts.push(o)}return this.querySelectorAll(s,t)}if(!t.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(t.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[t];this._evaluator.begin();try{let s=new Set([t]);for(const a of e.parts)if(a.name==="nth")s=this._queryNth(s,a);else if(a.name==="internal:and"){const o=this.querySelectorAll(a.body.parsed,t);s=new Set(o.filter(c=>s.has(c)))}else if(a.name==="internal:or"){const o=this.querySelectorAll(a.body.parsed,t);s=new Set(av(new Set([...s,...o])))}else if(xA.includes(a.name))s=this._queryLayoutSelector(s,a,t);else{const o=new Set;for(const c of s){const d=this._queryEngineAll(a,c);for(const h of d)o.add(h)}s=o}return[...s]}finally{this._evaluator.end()}}_queryEngineAll(e,t){const s=this._engines.get(e.name).queryAll(t,e.body);for(const a of s)if(!("nodeName"in a))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(a)}`);return s}_createAttributeEngine(e,t){const s=a=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(a)}]`,functions:[]},combinator:""}]}];return{queryAll:(a,o)=>this._evaluator.query({scope:a,pierceShadow:t},s(o))}}_createCSSEngine(){return{queryAll:(e,t)=>this._evaluator.query({scope:e,pierceShadow:!0},t)}}_createTextEngine(e,t){return{queryAll:(a,o)=>{const{matcher:c,kind:d}=Yl(o,t),h=[];let f=null;const y=_=>{if(d==="lax"&&f&&f.contains(_))return!1;const b=$c(this._evaluator._cacheText,_,c);b==="none"&&(f=_),(b==="self"||b==="selfAndChildren"&&d==="strict"&&!t)&&h.push(_)};a.nodeType===Node.ELEMENT_NODE&&y(a);const m=this._evaluator._queryCSS({scope:a,pierceShadow:e},"*");for(const _ of m)y(_);return h}}}_createInternalHasTextEngine(){return{queryAll:(e,t)=>{if(e.nodeType!==1)return[];const s=e,a=Ut(this._evaluator._cacheText,s),{matcher:o}=Yl(t,!0);return o(a)?[s]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,t)=>{if(e.nodeType!==1)return[];const s=e,a=Ut(this._evaluator._cacheText,s),{matcher:o}=Yl(t,!0);return o(a)?[]:[s]}}}_createInternalLabelEngine(){return{queryAll:(e,t)=>{const{matcher:s}=Yl(t,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(o=>tv(this._evaluator._cacheText,o).some(c=>s(c)))}}}_createNamedAttributeEngine(){return{queryAll:(t,s)=>{const a=xs(s,!0);if(a.name||a.attributes.length!==1)throw new Error("Malformed attribute selector: "+s);const{name:o,value:c,caseSensitive:d}=a.attributes[0],h=d?null:c.toLowerCase();let f;return c instanceof RegExp?f=m=>!!m.match(c):d?f=m=>m===c:f=m=>m.toLowerCase().includes(h),this._evaluator._queryCSS({scope:t,pierceShadow:!0},`[${o}]`).filter(m=>f(m.getAttribute(o)))}}}_createDescribeEngine(){return{queryAll:t=>t.nodeType!==1?[]:[t]}}_createControlEngine(){return{queryAll(e,t){if(t==="enter-frame")return[];if(t==="return-empty")return[];if(t==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${t}`)}}}_createHasEngine(){return{queryAll:(t,s)=>t.nodeType!==1?[]:!!this.querySelector(s.parsed,t,!1)?[t]:[]}}_createHasNotEngine(){return{queryAll:(t,s)=>t.nodeType!==1?[]:!!this.querySelector(s.parsed,t,!1)?[]:[t]}}_createVisibleEngine(){return{queryAll:(t,s)=>{if(t.nodeType!==1)return[];const a=s==="true";return xn(t)===a?[t]:[]}}}_createInternalChainEngine(){return{queryAll:(t,s)=>this.querySelectorAll(s.parsed,t)}}extend(e,t){const s=this.window.eval(`
|
|
114
114
|
(() => {
|
|
115
115
|
const module = {};
|
|
116
116
|
${e}
|
|
117
117
|
return module.exports.default();
|
|
118
|
-
})()`);return new s(this,t)}async viewportRatio(e){return await new Promise(t=>{const s=new IntersectionObserver(a=>{t(a[0].intersectionRatio),s.disconnect()});s.observe(e),this.utils.builtins.requestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const t=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(t.borderLeftWidth||"",10),top:parseInt(t.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const t=e.ownerDocument.defaultView;for(let a=e;a;a=St(a))if(t.getComputedStyle(a).transform!=="none")return"transformed";const s=t.getComputedStyle(e);return{left:parseInt(s.borderLeftWidth||"",10)+parseInt(s.paddingLeft||"",10),top:parseInt(s.borderTopWidth||"",10)+parseInt(s.paddingTop||"",10)}}retarget(e,t){let s=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!s)return null;if(t==="none")return s;if(!s.matches("input, textarea, select")&&!s.isContentEditable&&(t==="button-link"?s=s.closest("button, [role=button], a, [role=link]")||s:s=s.closest("button, [role=button], [role=checkbox], [role=radio]")||s),t==="follow-label"&&!s.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!s.isContentEditable){const a=s.closest("label");a&&a.control&&(s=a.control)}return s}async checkElementStates(e,t){if(t.includes("stable")){const s=await this._checkElementIsStable(e);if(s===!1)return{missingState:"stable"};if(s==="error:notconnected")return"error:notconnected"}for(const s of t)if(s!=="stable"){const a=this.elementState(e,s);if(a.received==="error:notconnected")return"error:notconnected";if(!a.matches)return{missingState:s}}}async _checkElementIsStable(e){const t=Symbol("continuePolling");let s,a=0,o=0;const c=()=>{const m=this.retarget(e,"no-follow-label");if(!m)return"error:notconnected";const _=this.utils.builtins.performance.now();if(this._stableRafCount>1&&_-o<15)return t;o=_;const b=m.getBoundingClientRect(),x={x:b.top,y:b.left,width:b.width,height:b.height};if(s){if(!(x.x===s.x&&x.y===s.y&&x.width===s.width&&x.height===s.height))return!1;if(++a>=this._stableRafCount)return!0}return s=x,t};let d,h;const f=new Promise((m,_)=>{d=m,h=_}),y=()=>{try{const m=c();m!==t?d(m):this.utils.builtins.requestAnimationFrame(y)}catch(m){h(m)}};return this.utils.builtins.requestAnimationFrame(y),f}_createAriaRefEngine(){return{queryAll:(t,s)=>{var o,c;const a=(c=(o=this._lastAriaSnapshotForQuery)==null?void 0:o.elements)==null?void 0:c.get(s);return a&&a.isConnected?[a]:[]}}}elementState(e,t){const s=this.retarget(e,["visible","hidden"].includes(t)?"none":"follow-label");if(!s||!s.isConnected)return t==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(t==="visible"||t==="hidden"){const a=xn(s);return{matches:t==="visible"?a:!a,received:a?"visible":"hidden"}}if(t==="disabled"||t==="enabled"){const a=Ac(s);return{matches:t==="disabled"?a:!a,received:a?"disabled":"enabled"}}if(t==="editable"){const a=Ac(s),o=QE(s);if(o==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!a&&!o,received:a?"disabled":o?"readOnly":"editable"}}if(t==="checked"||t==="unchecked"){const a=t==="checked",o=WE(s);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");const c=s.nodeName==="INPUT"&&s.type==="radio";return{matches:a===o,received:o?"checked":"unchecked",isRadio:c}}if(t==="indeterminate"){const a=JE(s);if(a==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:a==="mixed",received:a===!0?"checked":a===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${t}"`)}selectOptions(e,t){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element");const a=s,o=[...a.options],c=[];let d=t.slice();for(let h=0;h<o.length;h++){const f=o[h],y=m=>{if(m instanceof Node)return f===m;let _=!0;return m.valueOrLabel!==void 0&&(_=_&&(m.valueOrLabel===f.value||m.valueOrLabel===f.label)),m.value!==void 0&&(_=_&&m.value===f.value),m.label!==void 0&&(_=_&&m.label===f.label),m.index!==void 0&&(_=_&&m.index===h),_};if(d.some(y)){if(!this.elementState(f,"enabled").matches)return"error:optionnotenabled";if(c.push(f),a.multiple)d=d.filter(m=>!y(m));else{d=[];break}}}return d.length?"error:optionsnotfound":(a.value=void 0,c.forEach(h=>h.selected=!0),a.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),a.dispatchEvent(new Event("change",{bubbles:!0})),c.map(h=>h.value))}fill(e,t){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()==="input"){const a=s,o=a.type.toLowerCase(),c=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(o)&&!c.has(o))throw this.createStacklessError(`Input of type "${o}" cannot be filled`);if(o==="number"&&(t=t.trim(),isNaN(Number(t))))throw this.createStacklessError("Cannot type text into input[type=number]");if(o==="color"&&(t=t.toLowerCase()),c.has(o)){if(t=t.trim(),a.focus(),a.value=t,a.value!==t)throw this.createStacklessError("Malformed value");return s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})),"done"}}else if(s.nodeName.toLowerCase()!=="textarea"){if(!s.isContentEditable)throw this.createStacklessError("Element is not an <input>, <textarea> or [contenteditable] element")}return this.selectText(s),"needsinput"}selectText(e){const t=this.retarget(e,"follow-label");if(!t)return"error:notconnected";if(t.nodeName.toLowerCase()==="input"){const o=t;return o.select(),o.focus(),"done"}if(t.nodeName.toLowerCase()==="textarea"){const o=t;return o.selectionStart=0,o.selectionEnd=o.value.length,o.focus(),"done"}const s=t.ownerDocument.createRange();s.selectNodeContents(t);const a=t.ownerDocument.defaultView.getSelection();return a&&(a.removeAllRanges(),a.addRange(s)),t.focus(),"done"}_activelyFocused(e){const t=e.getRootNode().activeElement,s=t===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:t,isFocused:s}}focusNode(e,t){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:s,isFocused:a}=this._activelyFocused(e);if(e.isContentEditable&&!a&&s&&s.blur&&s.blur(),e.focus(),e.focus(),t&&!a&&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,t){if(e.nodeType!==Node.ELEMENT_NODE)return"Node is not of type HTMLElement";const s=e;if(s.nodeName!=="INPUT")return"Not an <input> element";const a=s;if((a.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const c=t.map(h=>{const f=Uint8Array.from(atob(h.buffer),y=>y.charCodeAt(0));return new File([f],h.name,{type:h.mimeType,lastModified:h.lastModifiedMs})}),d=new DataTransfer;for(const h of c)d.items.add(h);a.files=d.files,a.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),a.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,t){const s=[];let a=t;for(;a;){const y=C0(a);if(!y||(s.push(y),y.nodeType===9))break;a=y.host}let o;for(let y=s.length-1;y>=0;y--){const m=s[y],_=m.elementsFromPoint(e.x,e.y),b=m.elementFromPoint(e.x,e.y);if(b&&_[0]&&St(b)===_[0]){const v=this.window.getComputedStyle(b);(v==null?void 0:v.display)==="contents"&&_.unshift(b)}_[0]&&_[0].shadowRoot===m&&_[1]===b&&_.shift();const x=_[0];if(!x||(o=x,y&&x!==s[y-1].host))break}const c=[];for(;o&&o!==t;)c.push(o),o=o.assignedSlot??St(o);if(o===t)return"done";const d=this.previewNode(c[0]||this.document.documentElement);let h,f=t;for(;f;){const y=c.indexOf(f);if(y!==-1){y>1&&(h=this.previewNode(c[y-1]));break}f=St(f)}return h?{hitTargetDescription:`${d} from ${h} subtree`}:{hitTargetDescription:d}}setupHitTargetInterceptor(e,t,s,a){const o=this.retarget(e,"button-link");if(!o||!o.isConnected)return"error:notconnected";if(s){const y=this.expectHitTarget(s,o);if(y!=="done")return y.hitTargetDescription}if(t==="drag")return{stop:()=>"done"};const c={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[t];let d;const h=y=>{if(!c.has(y.type)||!y.isTrusted)return;const m=this.window.TouchEvent&&y instanceof this.window.TouchEvent?y.touches[0]:y;d===void 0&&m&&(d=this.expectHitTarget({x:m.clientX,y:m.clientY},o)),(a||d!=="done"&&d!==void 0)&&(y.preventDefault(),y.stopPropagation(),y.stopImmediatePropagation())},f=()=>(this._hitTargetInterceptor===h&&(this._hitTargetInterceptor=void 0),d||"done");return this._hitTargetInterceptor=h,{stop:f}}dispatchEvent(e,t,s){var c,d,h;let a;const o={bubbles:!0,cancelable:!0,composed:!0,...s};switch(this._eventTypes.get(t)){case"mouse":a=new MouseEvent(t,o);break;case"keyboard":a=new KeyboardEvent(t,o);break;case"touch":{if(this._browserName==="webkit"){const f=m=>{var x,v;if(m instanceof Touch)return m;let _=m.pageX;_===void 0&&m.clientX!==void 0&&(_=m.clientX+(((x=this.document.scrollingElement)==null?void 0:x.scrollLeft)||0));let b=m.pageY;return b===void 0&&m.clientY!==void 0&&(b=m.clientY+(((v=this.document.scrollingElement)==null?void 0:v.scrollTop)||0)),this.document.createTouch(this.window,m.target??e,m.identifier,_,b,m.screenX,m.screenY,m.radiusX,m.radiusY,m.rotationAngle,m.force)},y=m=>m instanceof TouchList||!m?m:this.document.createTouchList(...m.map(f));o.target??(o.target=e),o.touches=y(o.touches),o.targetTouches=y(o.targetTouches),o.changedTouches=y(o.changedTouches),a=new TouchEvent(t,o)}else o.target??(o.target=e),o.touches=(c=o.touches)==null?void 0:c.map(f=>f instanceof Touch?f:new Touch({...f,target:f.target??e})),o.targetTouches=(d=o.targetTouches)==null?void 0:d.map(f=>f instanceof Touch?f:new Touch({...f,target:f.target??e})),o.changedTouches=(h=o.changedTouches)==null?void 0:h.map(f=>f instanceof Touch?f:new Touch({...f,target:f.target??e})),a=new TouchEvent(t,o);break}case"pointer":a=new PointerEvent(t,o);break;case"focus":a=new FocusEvent(t,o);break;case"drag":a=new DragEvent(t,o);break;case"wheel":a=new WheelEvent(t,o);break;case"deviceorientation":try{a=new DeviceOrientationEvent(t,o)}catch{const{bubbles:f,cancelable:y,alpha:m,beta:_,gamma:b,absolute:x}=o;a=this.document.createEvent("DeviceOrientationEvent"),a.initDeviceOrientationEvent(t,f,y,m,_,b,x)}break;case"devicemotion":try{a=new DeviceMotionEvent(t,o)}catch{const{bubbles:f,cancelable:y,acceleration:m,accelerationIncludingGravity:_,rotationRate:b,interval:x}=o;a=this.document.createEvent("DeviceMotionEvent"),a.initDeviceMotionEvent(t,f,y,m,_,b,x)}break;default:a=new Event(t,o);break}e.dispatchEvent(a)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return Xl(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return Xl(`<${e.nodeName.toLowerCase()} />`);const t=e,s=[];for(let h=0;h<t.attributes.length;h++){const{name:f,value:y}=t.attributes[h];f!=="style"&&(!y&&this._booleanAttributes.has(f)?s.push(` ${f}`):s.push(` ${f}="${y}"`))}s.sort((h,f)=>h.length-f.length);const a=M_(s.join(""),500);if(this._autoClosingTags.has(t.nodeName))return Xl(`<${t.nodeName.toLowerCase()}${a}/>`);const o=t.childNodes;let c=!1;if(o.length<=5){c=!0;for(let h=0;h<o.length;h++)c=c&&o[h].nodeType===Node.TEXT_NODE}const d=c?t.textContent||"":o.length?"…":"";return Xl(`<${t.nodeName.toLowerCase()}${a}>${M_(d,50)}</${t.nodeName.toLowerCase()}>`)}_generateSelectors(e){this._evaluator.begin(),Hc(),Rf();try{const t=this._isUtilityWorld&&this._browserName==="firefox"?2:10;return e.slice(0,t).map(a=>({preview:this.previewNode(a),selector:this.generateSelectorSimple(a)})).map((a,o)=>`${o+1}) ${a.preview} aka ${qi(this._sdkLanguage,a.selector)}`)}finally{jf(),zc(),this._evaluator.end()}}strictModeViolationError(e,t){const s=this._generateSelectors(t).map(a=>`
|
|
118
|
+
})()`);return new s(this,t)}async viewportRatio(e){return await new Promise(t=>{const s=new IntersectionObserver(a=>{t(a[0].intersectionRatio),s.disconnect()});s.observe(e),this.utils.builtins.requestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const t=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(t.borderLeftWidth||"",10),top:parseInt(t.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const t=e.ownerDocument.defaultView;for(let a=e;a;a=St(a))if(t.getComputedStyle(a).transform!=="none")return"transformed";const s=t.getComputedStyle(e);return{left:parseInt(s.borderLeftWidth||"",10)+parseInt(s.paddingLeft||"",10),top:parseInt(s.borderTopWidth||"",10)+parseInt(s.paddingTop||"",10)}}retarget(e,t){let s=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!s)return null;if(t==="none")return s;if(!s.matches("input, textarea, select")&&!s.isContentEditable&&(t==="button-link"?s=s.closest("button, [role=button], a, [role=link]")||s:s=s.closest("button, [role=button], [role=checkbox], [role=radio]")||s),t==="follow-label"&&!s.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!s.isContentEditable){const a=s.closest("label");a&&a.control&&(s=a.control)}return s}async checkElementStates(e,t){if(t.includes("stable")){const s=await this._checkElementIsStable(e);if(s===!1)return{missingState:"stable"};if(s==="error:notconnected")return"error:notconnected"}for(const s of t)if(s!=="stable"){const a=this.elementState(e,s);if(a.received==="error:notconnected")return"error:notconnected";if(!a.matches)return{missingState:s}}}async _checkElementIsStable(e){const t=Symbol("continuePolling");let s,a=0,o=0;const c=()=>{const m=this.retarget(e,"no-follow-label");if(!m)return"error:notconnected";const _=this.utils.builtins.performance.now();if(this._stableRafCount>1&&_-o<15)return t;o=_;const b=m.getBoundingClientRect(),w={x:b.top,y:b.left,width:b.width,height:b.height};if(s){if(!(w.x===s.x&&w.y===s.y&&w.width===s.width&&w.height===s.height))return!1;if(++a>=this._stableRafCount)return!0}return s=w,t};let d,h;const f=new Promise((m,_)=>{d=m,h=_}),y=()=>{try{const m=c();m!==t?d(m):this.utils.builtins.requestAnimationFrame(y)}catch(m){h(m)}};return this.utils.builtins.requestAnimationFrame(y),f}_createAriaRefEngine(){return{queryAll:(t,s)=>{var o,c;const a=(c=(o=this._lastAriaSnapshotForQuery)==null?void 0:o.elements)==null?void 0:c.get(s);return a&&a.isConnected?[a]:[]}}}elementState(e,t){const s=this.retarget(e,["visible","hidden"].includes(t)?"none":"follow-label");if(!s||!s.isConnected)return t==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(t==="visible"||t==="hidden"){const a=xn(s);return{matches:t==="visible"?a:!a,received:a?"visible":"hidden"}}if(t==="disabled"||t==="enabled"){const a=Ac(s);return{matches:t==="disabled"?a:!a,received:a?"disabled":"enabled"}}if(t==="editable"){const a=Ac(s),o=QE(s);if(o==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!a&&!o,received:a?"disabled":o?"readOnly":"editable"}}if(t==="checked"||t==="unchecked"){const a=t==="checked",o=WE(s);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");const c=s.nodeName==="INPUT"&&s.type==="radio";return{matches:a===o,received:o?"checked":"unchecked",isRadio:c}}if(t==="indeterminate"){const a=JE(s);if(a==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:a==="mixed",received:a===!0?"checked":a===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${t}"`)}selectOptions(e,t){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element");const a=s,o=[...a.options],c=[];let d=t.slice();for(let h=0;h<o.length;h++){const f=o[h],y=m=>{if(m instanceof Node)return f===m;let _=!0;return m.valueOrLabel!==void 0&&(_=_&&(m.valueOrLabel===f.value||m.valueOrLabel===f.label)),m.value!==void 0&&(_=_&&m.value===f.value),m.label!==void 0&&(_=_&&m.label===f.label),m.index!==void 0&&(_=_&&m.index===h),_};if(d.some(y)){if(!this.elementState(f,"enabled").matches)return"error:optionnotenabled";if(c.push(f),a.multiple)d=d.filter(m=>!y(m));else{d=[];break}}}return d.length?"error:optionsnotfound":(a.value=void 0,c.forEach(h=>h.selected=!0),a.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),a.dispatchEvent(new Event("change",{bubbles:!0})),c.map(h=>h.value))}fill(e,t){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()==="input"){const a=s,o=a.type.toLowerCase(),c=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(o)&&!c.has(o))throw this.createStacklessError(`Input of type "${o}" cannot be filled`);if(o==="number"&&(t=t.trim(),isNaN(Number(t))))throw this.createStacklessError("Cannot type text into input[type=number]");if(o==="color"&&(t=t.toLowerCase()),c.has(o)){if(t=t.trim(),a.focus(),a.value=t,a.value!==t)throw this.createStacklessError("Malformed value");return s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})),"done"}}else if(s.nodeName.toLowerCase()!=="textarea"){if(!s.isContentEditable)throw this.createStacklessError("Element is not an <input>, <textarea> or [contenteditable] element")}return this.selectText(s),"needsinput"}selectText(e){const t=this.retarget(e,"follow-label");if(!t)return"error:notconnected";if(t.nodeName.toLowerCase()==="input"){const o=t;return o.select(),o.focus(),"done"}if(t.nodeName.toLowerCase()==="textarea"){const o=t;return o.selectionStart=0,o.selectionEnd=o.value.length,o.focus(),"done"}const s=t.ownerDocument.createRange();s.selectNodeContents(t);const a=t.ownerDocument.defaultView.getSelection();return a&&(a.removeAllRanges(),a.addRange(s)),t.focus(),"done"}_activelyFocused(e){const t=e.getRootNode().activeElement,s=t===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:t,isFocused:s}}focusNode(e,t){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:s,isFocused:a}=this._activelyFocused(e);if(e.isContentEditable&&!a&&s&&s.blur&&s.blur(),e.focus(),e.focus(),t&&!a&&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,t){if(e.nodeType!==Node.ELEMENT_NODE)return"Node is not of type HTMLElement";const s=e;if(s.nodeName!=="INPUT")return"Not an <input> element";const a=s;if((a.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const c=t.map(h=>{const f=Uint8Array.from(atob(h.buffer),y=>y.charCodeAt(0));return new File([f],h.name,{type:h.mimeType,lastModified:h.lastModifiedMs})}),d=new DataTransfer;for(const h of c)d.items.add(h);a.files=d.files,a.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),a.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,t){const s=[];let a=t;for(;a;){const y=C0(a);if(!y||(s.push(y),y.nodeType===9))break;a=y.host}let o;for(let y=s.length-1;y>=0;y--){const m=s[y],_=m.elementsFromPoint(e.x,e.y),b=m.elementFromPoint(e.x,e.y);if(b&&_[0]&&St(b)===_[0]){const v=this.window.getComputedStyle(b);(v==null?void 0:v.display)==="contents"&&_.unshift(b)}_[0]&&_[0].shadowRoot===m&&_[1]===b&&_.shift();const w=_[0];if(!w||(o=w,y&&w!==s[y-1].host))break}const c=[];for(;o&&o!==t;)c.push(o),o=o.assignedSlot??St(o);if(o===t)return"done";const d=this.previewNode(c[0]||this.document.documentElement);let h,f=t;for(;f;){const y=c.indexOf(f);if(y!==-1){y>1&&(h=this.previewNode(c[y-1]));break}f=St(f)}return h?{hitTargetDescription:`${d} from ${h} subtree`}:{hitTargetDescription:d}}setupHitTargetInterceptor(e,t,s,a){const o=this.retarget(e,"button-link");if(!o||!o.isConnected)return"error:notconnected";if(s){const y=this.expectHitTarget(s,o);if(y!=="done")return y.hitTargetDescription}if(t==="drag")return{stop:()=>"done"};const c={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[t];let d;const h=y=>{if(!c.has(y.type)||!y.isTrusted)return;const m=this.window.TouchEvent&&y instanceof this.window.TouchEvent?y.touches[0]:y;d===void 0&&m&&(d=this.expectHitTarget({x:m.clientX,y:m.clientY},o)),(a||d!=="done"&&d!==void 0)&&(y.preventDefault(),y.stopPropagation(),y.stopImmediatePropagation())},f=()=>(this._hitTargetInterceptor===h&&(this._hitTargetInterceptor=void 0),d||"done");return this._hitTargetInterceptor=h,{stop:f}}dispatchEvent(e,t,s){var c,d,h;let a;const o={bubbles:!0,cancelable:!0,composed:!0,...s};switch(this._eventTypes.get(t)){case"mouse":a=new MouseEvent(t,o);break;case"keyboard":a=new KeyboardEvent(t,o);break;case"touch":{if(this._browserName==="webkit"){const f=m=>{var w,v;if(m instanceof Touch)return m;let _=m.pageX;_===void 0&&m.clientX!==void 0&&(_=m.clientX+(((w=this.document.scrollingElement)==null?void 0:w.scrollLeft)||0));let b=m.pageY;return b===void 0&&m.clientY!==void 0&&(b=m.clientY+(((v=this.document.scrollingElement)==null?void 0:v.scrollTop)||0)),this.document.createTouch(this.window,m.target??e,m.identifier,_,b,m.screenX,m.screenY,m.radiusX,m.radiusY,m.rotationAngle,m.force)},y=m=>m instanceof TouchList||!m?m:this.document.createTouchList(...m.map(f));o.target??(o.target=e),o.touches=y(o.touches),o.targetTouches=y(o.targetTouches),o.changedTouches=y(o.changedTouches),a=new TouchEvent(t,o)}else o.target??(o.target=e),o.touches=(c=o.touches)==null?void 0:c.map(f=>f instanceof Touch?f:new Touch({...f,target:f.target??e})),o.targetTouches=(d=o.targetTouches)==null?void 0:d.map(f=>f instanceof Touch?f:new Touch({...f,target:f.target??e})),o.changedTouches=(h=o.changedTouches)==null?void 0:h.map(f=>f instanceof Touch?f:new Touch({...f,target:f.target??e})),a=new TouchEvent(t,o);break}case"pointer":a=new PointerEvent(t,o);break;case"focus":a=new FocusEvent(t,o);break;case"drag":a=new DragEvent(t,o);break;case"wheel":a=new WheelEvent(t,o);break;case"deviceorientation":try{a=new DeviceOrientationEvent(t,o)}catch{const{bubbles:f,cancelable:y,alpha:m,beta:_,gamma:b,absolute:w}=o;a=this.document.createEvent("DeviceOrientationEvent"),a.initDeviceOrientationEvent(t,f,y,m,_,b,w)}break;case"devicemotion":try{a=new DeviceMotionEvent(t,o)}catch{const{bubbles:f,cancelable:y,acceleration:m,accelerationIncludingGravity:_,rotationRate:b,interval:w}=o;a=this.document.createEvent("DeviceMotionEvent"),a.initDeviceMotionEvent(t,f,y,m,_,b,w)}break;default:a=new Event(t,o);break}e.dispatchEvent(a)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return Xl(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return Xl(`<${e.nodeName.toLowerCase()} />`);const t=e,s=[];for(let h=0;h<t.attributes.length;h++){const{name:f,value:y}=t.attributes[h];f!=="style"&&(!y&&this._booleanAttributes.has(f)?s.push(` ${f}`):s.push(` ${f}="${y}"`))}s.sort((h,f)=>h.length-f.length);const a=M_(s.join(""),500);if(this._autoClosingTags.has(t.nodeName))return Xl(`<${t.nodeName.toLowerCase()}${a}/>`);const o=t.childNodes;let c=!1;if(o.length<=5){c=!0;for(let h=0;h<o.length;h++)c=c&&o[h].nodeType===Node.TEXT_NODE}const d=c?t.textContent||"":o.length?"…":"";return Xl(`<${t.nodeName.toLowerCase()}${a}>${M_(d,50)}</${t.nodeName.toLowerCase()}>`)}_generateSelectors(e){this._evaluator.begin(),Hc(),Rf();try{const t=this._isUtilityWorld&&this._browserName==="firefox"?2:10;return e.slice(0,t).map(a=>({preview:this.previewNode(a),selector:this.generateSelectorSimple(a)})).map((a,o)=>`${o+1}) ${a.preview} aka ${qi(this._sdkLanguage,a.selector)}`)}finally{jf(),zc(),this._evaluator.end()}}strictModeViolationError(e,t){const s=this._generateSelectors(t).map(a=>`
|
|
119
119
|
`+a);return s.length<t.length&&s.push(`
|
|
120
120
|
...`),this.createStacklessError(`strict mode violation: ${qi(this._sdkLanguage,Rn(e))} resolved to ${t.length} elements:${s.join("")}
|
|
121
121
|
`)}checkDeprecatedSelectorUsage(e,t){const s=new Set(["_react","_vue","xpath:light","text:light","id:light","data-testid:light","data-test-id:light","data-test:light"]);if(!t.length)return;const a=e.parts.find(c=>s.has(c.name));if(!a)return;const o=this._generateSelectors(t).map(c=>`
|
|
122
122
|
`+c);throw o.length<t.length&&o.push(`
|
|
123
123
|
...`),this.createStacklessError(`"${a.name}" selector is not supported: ${qi(this._sdkLanguage,Rn(e))} resolved to ${t.length} element${t.length===1?"":"s"}:${o.join("")}
|
|
124
|
-
`)}createStacklessError(e){if(this._browserName==="firefox"){const s=new Error("Error: "+e);return s.stack="",s}const t=new Error(e);return delete t.stack,t}createHighlight(){return new Mh(this)}maskSelectors(e,t){this._highlight&&this.hideHighlight(),this._highlight=new Mh(this),this._highlight.install();const s=[];for(const a of e)s.push(this.querySelectorAll(a,this.document.documentElement));this._highlight.maskElements(s.flat(),t)}highlight(e){this._highlight||(this._highlight=new Mh(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,t){var c,d;((c=this._markedElements)==null?void 0:c.callId)!==t&&(this._markedElements=void 0);const s=((d=this._markedElements)==null?void 0:d.elements)||new Set,a=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:t,composed:!0});for(const h of s)e.has(h)||h.dispatchEvent(a);const o=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:t,composed:!0});for(const h of e)s.has(h)||h.dispatchEvent(o);this._markedElements={callId:t,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let t=!1;const s=()=>t=!0;this.window.addEventListener(e,s),new MutationObserver(a=>{if(a.some(c=>Array.from(c.addedNodes).includes(this.document.documentElement))&&(t=!1,this.window.dispatchEvent(new CustomEvent(e)),!t)){this.window.addEventListener(e,s);for(const c of this.onGlobalListenersRemoved)c()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=s=>{var a;return(a=this._hitTargetInterceptor)==null?void 0:a.call(this,s)},t=()=>{for(const s of this._allHitTargetInterceptorEvents)this.window.addEventListener(s,e,{capture:!0,passive:!1})};t(),this.onGlobalListenersRemoved.add(t)}async expect(e,t,s){var o,c;if(t.expression==="to.have.count"||t.expression.endsWith(".array"))return this.expectArray(s,t);if(!e){if(!t.isNot&&t.expression==="to.be.hidden")return{matches:!0};if(t.isNot&&t.expression==="to.be.visible")return{matches:!1};if(!t.isNot&&t.expression==="to.be.detached")return{matches:!0};if(t.isNot&&t.expression==="to.be.attached")return{matches:!1};if(t.isNot&&t.expression==="to.be.in.viewport")return{matches:!1};if(t.expression==="to.have.title"&&((o=t==null?void 0:t.expectedText)!=null&&o[0])){const d=new _r(t.expectedText[0]),h=this.document.title;return{received:h,matches:d.matches(h)}}if(t.expression==="to.have.url"&&((c=t==null?void 0:t.expectedText)!=null&&c[0])){const d=new _r(t.expectedText[0]),h=this.document.location.href;return{received:h,matches:d.matches(h)}}return{matches:t.isNot,missingReceived:!0}}return await this.expectSingleElement(e,t)}async expectSingleElement(e,t){var a;const s=t.expression;{let o;if(s==="to.have.attribute"){const c=e.hasAttribute(t.expressionArg);o={matches:c,received:c?"attribute present":"attribute not present"}}else if(s==="to.be.checked"){const{checked:c,indeterminate:d}=t.expectedValue;if(d){if(c!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");o=this.elementState(e,"indeterminate")}else o=this.elementState(e,c===!1?"unchecked":"checked")}else if(s==="to.be.disabled")o=this.elementState(e,"disabled");else if(s==="to.be.editable")o=this.elementState(e,"editable");else if(s==="to.be.readonly")o=this.elementState(e,"editable"),o.matches=!o.matches;else if(s==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e.value;o={matches:!c,received:c?"notEmpty":"empty"}}else{const c=(a=e.textContent)==null?void 0:a.trim();o={matches:!c,received:c?"notEmpty":"empty"}}else if(s==="to.be.enabled")o=this.elementState(e,"enabled");else if(s==="to.be.focused"){const c=this._activelyFocused(e).isFocused;o={matches:c,received:c?"focused":"inactive"}}else s==="to.be.hidden"?o=this.elementState(e,"hidden"):s==="to.be.visible"?o=this.elementState(e,"visible"):s==="to.be.attached"?o={matches:!0,received:"attached"}:s==="to.be.detached"&&(o={matches:!1,received:"attached"});if(o){if(o.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return o}}if(s==="to.have.property"){let o=e;const c=t.expressionArg.split(".");for(let f=0;f<c.length-1;f++){if(typeof o!="object"||!(c[f]in o))return{received:void 0,matches:!1};o=o[c[f]]}const d=o[c[c.length-1]],h=cf(d,t.expectedValue);return{received:d,matches:h}}if(s==="to.be.in.viewport"){const o=await this.viewportRatio(e);return{received:`viewport ratio ${o}`,matches:o>0&&o>(t.expectedNumber??0)-1e-9}}if(s==="to.have.values"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="SELECT"||!e.multiple)throw this.createStacklessError("Not a select element with a multiple attribute");const o=[...e.selectedOptions].map(c=>c.value);return o.length!==t.expectedText.length?{received:o,matches:!1}:{received:o,matches:o.map((c,d)=>new _r(t.expectedText[d]).matches(c)).every(Boolean)}}if(s==="to.match.aria"){const o=uA(e,t.expectedValue);return{received:o.received,matches:!!o.matches.length}}{let o;if(s==="to.have.attribute.value"){const c=e.getAttribute(t.expressionArg);if(c===null)return{received:null,matches:!1};o=c}else if(["to.have.class","to.contain.class"].includes(s)){if(!t.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);return{received:e.classList.toString(),matches:new _r(t.expectedText[0]).matchesClassList(this,e.classList,s==="to.contain.class")}}else if(s==="to.have.css")o=this.window.getComputedStyle(e).getPropertyValue(t.expressionArg);else if(s==="to.have.id")o=e.id;else if(s==="to.have.text")o=t.useInnerText?e.innerText:Ut(new Map,e).full;else if(s==="to.have.accessible.name")o=_o(e,!1);else if(s==="to.have.accessible.description")o=X_(e,!1);else if(s==="to.have.accessible.error.message")o=YE(e);else if(s==="to.have.role")o=lt(e)||"";else if(s==="to.have.value"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"&&e.nodeName!=="SELECT")throw this.createStacklessError("Not an input element");o=e.value}if(o!==void 0&&t.expectedText){const c=new _r(t.expectedText[0]);return{received:o,matches:c.matches(o)}}}throw this.createStacklessError("Unknown expect matcher: "+s)}expectArray(e,t){const s=t.expression;if(s==="to.have.count"){const h=e.length,f=h===t.expectedNumber;return{received:h,matches:f}}if(!t.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);if(["to.have.class.array","to.contain.class.array"].includes(s)){const h=e.map(m=>m.classList),f=h.map(String);if(h.length!==t.expectedText.length)return{received:f,matches:!1};const y=this._matchSequentially(t.expectedText,h,(m,_)=>m.matchesClassList(this,_,s==="to.contain.class.array"));return{received:f,matches:y}}if(!["to.contain.text.array","to.have.text.array"].includes(s))throw this.createStacklessError("Unknown expect matcher: "+s);const a=e.map(h=>t.useInnerText?h.innerText:Ut(new Map,h).full),o=s!=="to.contain.text.array";if(!(a.length===t.expectedText.length||!o))return{received:a,matches:!1};const d=this._matchSequentially(t.expectedText,a,(h,f)=>h.matches(f));return{received:a,matches:d}}_matchSequentially(e,t,s){const a=e.map(d=>new _r(d));let o=0,c=0;for(;o<a.length&&c<t.length;)s(a[o],t[c])&&++o,++c;return o===a.length}}function Xl(i){return i.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function O2(i){if(i=i.substring(1,i.length-1),!i.includes("\\"))return i;const e=[];let t=0;for(;t<i.length;)i[t]==="\\"&&t+1<i.length&&t++,e.push(i[t++]);return e.join("")}function Yl(i,e){if(i[0]==="/"&&i.lastIndexOf("/")>0){const a=i.lastIndexOf("/"),o=new RegExp(i.substring(1,a),i.substring(a+1));return{matcher:c=>o.test(c.full),kind:"regex"}}const t=e?JSON.parse.bind(JSON):O2;let s=!1;return i.length>1&&i[0]==='"'&&i[i.length-1]==='"'?(i=t(i),s=!0):e&&i.length>1&&i[0]==='"'&&i[i.length-2]==='"'&&i[i.length-1]==="i"?(i=t(i.substring(0,i.length-1)),s=!1):e&&i.length>1&&i[0]==='"'&&i[i.length-2]==='"'&&i[i.length-1]==="s"?(i=t(i.substring(0,i.length-1)),s=!0):i.length>1&&i[0]==="'"&&i[i.length-1]==="'"&&(i=t(i),s=!0),i=Nt(i),s?e?{kind:"strict",matcher:o=>o.normalized===i}:{matcher:o=>!i&&!o.immediate.length?!0:o.immediate.some(c=>Nt(c)===i),kind:"strict"}:(i=i.toLowerCase(),{kind:"lax",matcher:a=>a.normalized.toLowerCase().includes(i)})}class _r{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 t=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&t.delete("i"),e.ignoreCase===!0&&t.add("i"),this._regex=new RegExp(e.regexSource,[...t].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,t,s){if(s){if(this._regex)throw e.createStacklessError("Partial matching does not support regular expressions. Please provide a string value.");return this._string.split(/\s+/g).filter(Boolean).every(a=>t.contains(a))}return this.matches(t.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=Nt(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function cf(i,e){if(i===e)return!0;if(i&&e&&typeof i=="object"&&typeof e=="object"){if(i.constructor!==e.constructor)return!1;if(Array.isArray(i)){if(i.length!==e.length)return!1;for(let s=0;s<i.length;++s)if(!cf(i[s],e[s]))return!1;return!0}if(i instanceof RegExp)return i.source===e.source&&i.flags===e.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===e.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===e.toString();const t=Object.keys(i);if(t.length!==Object.keys(e).length)return!1;for(let s=0;s<t.length;++s)if(!e.hasOwnProperty(t[s]))return!1;for(const s of t)if(!cf(i[s],e[s]))return!1;return!0}return typeof i=="number"&&typeof e=="number"?isNaN(i)&&isNaN(e):!1}const R2={tagName:"svg",children:[{tagName:"defs",children:[{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gripper"},children:[{tagName:"path",attrs:{d:"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-circle-large-filled"},children:[{tagName:"path",attrs:{d:"M8 1a6.8 6.8 0 0 1 1.86.253 6.899 6.899 0 0 1 3.083 1.805 6.903 6.903 0 0 1 1.804 3.083C14.916 6.738 15 7.357 15 8s-.084 1.262-.253 1.86a6.9 6.9 0 0 1-.704 1.674 7.157 7.157 0 0 1-2.516 2.509 6.966 6.966 0 0 1-1.668.71A6.984 6.984 0 0 1 8 15a6.984 6.984 0 0 1-1.86-.246 7.098 7.098 0 0 1-1.674-.711 7.3 7.3 0 0 1-1.415-1.094 7.295 7.295 0 0 1-1.094-1.415 7.098 7.098 0 0 1-.71-1.675A6.985 6.985 0 0 1 1 8c0-.643.082-1.262.246-1.86a6.968 6.968 0 0 1 .711-1.667 7.156 7.156 0 0 1 2.509-2.516 6.895 6.895 0 0 1 1.675-.704A6.808 6.808 0 0 1 8 1z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-stop-circle"},children:[{tagName:"path",attrs:{d:"M6 6h4v4H6z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-inspect"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 3l1-1h12l1 1v6h-1V3H2v8h5v1H2l-1-1V3zm14.707 9.707L9 6v9.414l2.707-2.707h4zM10 13V8.414l3.293 3.293h-2L10 13z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-whole-word"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 11H1V13H15V11H16V14H15H1H0V11Z"}},{tagName:"path",attrs:{d:"M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z"}},{tagName:"path",attrs:{d:"M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-eye"},children:[{tagName:"path",attrs:{d:"M7.99993 6.00316C9.47266 6.00316 10.6666 7.19708 10.6666 8.66981C10.6666 10.1426 9.47266 11.3365 7.99993 11.3365C6.52715 11.3365 5.33324 10.1426 5.33324 8.66981C5.33324 7.19708 6.52715 6.00316 7.99993 6.00316ZM7.99993 7.00315C7.07946 7.00315 6.33324 7.74935 6.33324 8.66981C6.33324 9.59028 7.07946 10.3365 7.99993 10.3365C8.9204 10.3365 9.6666 9.59028 9.6666 8.66981C9.6666 7.74935 8.9204 7.00315 7.99993 7.00315ZM7.99993 3.66675C11.0756 3.66675 13.7307 5.76675 14.4673 8.70968C14.5344 8.97755 14.3716 9.24908 14.1037 9.31615C13.8358 9.38315 13.5643 9.22041 13.4973 8.95248C12.8713 6.45205 10.6141 4.66675 7.99993 4.66675C5.38454 4.66675 3.12664 6.45359 2.50182 8.95555C2.43491 9.22341 2.16348 9.38635 1.89557 9.31948C1.62766 9.25255 1.46471 8.98115 1.53162 8.71321C2.26701 5.76856 4.9229 3.66675 7.99993 3.66675Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-symbol-constant"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 6h8v1H4V6zm8 3H4v1h8V9z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 4l1-1h12l1 1v8l-1 1H2l-1-1V4zm1 0v8h12V4H2z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-check"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1",id:"icon-location-pin"},children:[{tagName:"path",attrs:{d:`
|
|
124
|
+
`)}createStacklessError(e){if(this._browserName==="firefox"){const s=new Error("Error: "+e);return s.stack="",s}const t=new Error(e);return delete t.stack,t}createHighlight(){return new Mh(this)}maskSelectors(e,t){this._highlight&&this.hideHighlight(),this._highlight=new Mh(this),this._highlight.install();const s=[];for(const a of e)s.push(this.querySelectorAll(a,this.document.documentElement));this._highlight.maskElements(s.flat(),t)}highlight(e){this._highlight||(this._highlight=new Mh(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,t){var c,d;((c=this._markedElements)==null?void 0:c.callId)!==t&&(this._markedElements=void 0);const s=((d=this._markedElements)==null?void 0:d.elements)||new Set,a=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:t,composed:!0});for(const h of s)e.has(h)||h.dispatchEvent(a);const o=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:t,composed:!0});for(const h of e)s.has(h)||h.dispatchEvent(o);this._markedElements={callId:t,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let t=!1;const s=()=>t=!0;this.window.addEventListener(e,s),new MutationObserver(a=>{if(a.some(c=>Array.from(c.addedNodes).includes(this.document.documentElement))&&(t=!1,this.window.dispatchEvent(new CustomEvent(e)),!t)){this.window.addEventListener(e,s);for(const c of this.onGlobalListenersRemoved)c()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=s=>{var a;return(a=this._hitTargetInterceptor)==null?void 0:a.call(this,s)},t=()=>{for(const s of this._allHitTargetInterceptorEvents)this.window.addEventListener(s,e,{capture:!0,passive:!1})};t(),this.onGlobalListenersRemoved.add(t)}async expect(e,t,s){var o,c;if(t.expression==="to.have.count"||t.expression.endsWith(".array"))return this.expectArray(s,t);if(!e){if(!t.isNot&&t.expression==="to.be.hidden")return{matches:!0};if(t.isNot&&t.expression==="to.be.visible")return{matches:!1};if(!t.isNot&&t.expression==="to.be.detached")return{matches:!0};if(t.isNot&&t.expression==="to.be.attached")return{matches:!1};if(t.isNot&&t.expression==="to.be.in.viewport")return{matches:!1};if(t.expression==="to.have.title"&&((o=t==null?void 0:t.expectedText)!=null&&o[0])){const d=new _r(t.expectedText[0]),h=this.document.title;return{received:h,matches:d.matches(h)}}if(t.expression==="to.have.url"&&((c=t==null?void 0:t.expectedText)!=null&&c[0])){const d=new _r(t.expectedText[0]),h=this.document.location.href;return{received:h,matches:d.matches(h)}}return{matches:t.isNot,missingReceived:!0}}return await this.expectSingleElement(e,t)}async expectSingleElement(e,t){var a;const s=t.expression;{let o;if(s==="to.have.attribute"){const c=e.hasAttribute(t.expressionArg);o={matches:c,received:c?"attribute present":"attribute not present"}}else if(s==="to.be.checked"){const{checked:c,indeterminate:d}=t.expectedValue;if(d){if(c!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");o=this.elementState(e,"indeterminate")}else o=this.elementState(e,c===!1?"unchecked":"checked")}else if(s==="to.be.disabled")o=this.elementState(e,"disabled");else if(s==="to.be.editable")o=this.elementState(e,"editable");else if(s==="to.be.readonly")o=this.elementState(e,"editable"),o.matches=!o.matches;else if(s==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e.value;o={matches:!c,received:c?"notEmpty":"empty"}}else{const c=(a=e.textContent)==null?void 0:a.trim();o={matches:!c,received:c?"notEmpty":"empty"}}else if(s==="to.be.enabled")o=this.elementState(e,"enabled");else if(s==="to.be.focused"){const c=this._activelyFocused(e).isFocused;o={matches:c,received:c?"focused":"inactive"}}else s==="to.be.hidden"?o=this.elementState(e,"hidden"):s==="to.be.visible"?o=this.elementState(e,"visible"):s==="to.be.attached"?o={matches:!0,received:"attached"}:s==="to.be.detached"&&(o={matches:!1,received:"attached"});if(o){if(o.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return o}}if(s==="to.have.property"){let o=e;const c=t.expressionArg.split(".");for(let f=0;f<c.length-1;f++){if(typeof o!="object"||!(c[f]in o))return{received:void 0,matches:!1};o=o[c[f]]}const d=o[c[c.length-1]],h=cf(d,t.expectedValue);return{received:d,matches:h}}if(s==="to.be.in.viewport"){const o=await this.viewportRatio(e);return{received:`viewport ratio ${o}`,matches:o>0&&o>(t.expectedNumber??0)-1e-9}}if(s==="to.have.values"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="SELECT"||!e.multiple)throw this.createStacklessError("Not a select element with a multiple attribute");const o=[...e.selectedOptions].map(c=>c.value);return o.length!==t.expectedText.length?{received:o,matches:!1}:{received:o,matches:o.map((c,d)=>new _r(t.expectedText[d]).matches(c)).every(Boolean)}}if(s==="to.match.aria"){const o=dA(e,t.expectedValue);return{received:o.received,matches:!!o.matches.length}}{let o;if(s==="to.have.attribute.value"){const c=e.getAttribute(t.expressionArg);if(c===null)return{received:null,matches:!1};o=c}else if(["to.have.class","to.contain.class"].includes(s)){if(!t.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);return{received:e.classList.toString(),matches:new _r(t.expectedText[0]).matchesClassList(this,e.classList,s==="to.contain.class")}}else if(s==="to.have.css")o=this.window.getComputedStyle(e).getPropertyValue(t.expressionArg);else if(s==="to.have.id")o=e.id;else if(s==="to.have.text")o=t.useInnerText?e.innerText:Ut(new Map,e).full;else if(s==="to.have.accessible.name")o=_o(e,!1);else if(s==="to.have.accessible.description")o=X_(e,!1);else if(s==="to.have.accessible.error.message")o=YE(e);else if(s==="to.have.role")o=lt(e)||"";else if(s==="to.have.value"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"&&e.nodeName!=="SELECT")throw this.createStacklessError("Not an input element");o=e.value}if(o!==void 0&&t.expectedText){const c=new _r(t.expectedText[0]);return{received:o,matches:c.matches(o)}}}throw this.createStacklessError("Unknown expect matcher: "+s)}expectArray(e,t){const s=t.expression;if(s==="to.have.count"){const h=e.length,f=h===t.expectedNumber;return{received:h,matches:f}}if(!t.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);if(["to.have.class.array","to.contain.class.array"].includes(s)){const h=e.map(m=>m.classList),f=h.map(String);if(h.length!==t.expectedText.length)return{received:f,matches:!1};const y=this._matchSequentially(t.expectedText,h,(m,_)=>m.matchesClassList(this,_,s==="to.contain.class.array"));return{received:f,matches:y}}if(!["to.contain.text.array","to.have.text.array"].includes(s))throw this.createStacklessError("Unknown expect matcher: "+s);const a=e.map(h=>t.useInnerText?h.innerText:Ut(new Map,h).full),o=s!=="to.contain.text.array";if(!(a.length===t.expectedText.length||!o))return{received:a,matches:!1};const d=this._matchSequentially(t.expectedText,a,(h,f)=>h.matches(f));return{received:a,matches:d}}_matchSequentially(e,t,s){const a=e.map(d=>new _r(d));let o=0,c=0;for(;o<a.length&&c<t.length;)s(a[o],t[c])&&++o,++c;return o===a.length}}function Xl(i){return i.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function jC(i){if(i=i.substring(1,i.length-1),!i.includes("\\"))return i;const e=[];let t=0;for(;t<i.length;)i[t]==="\\"&&t+1<i.length&&t++,e.push(i[t++]);return e.join("")}function Yl(i,e){if(i[0]==="/"&&i.lastIndexOf("/")>0){const a=i.lastIndexOf("/"),o=new RegExp(i.substring(1,a),i.substring(a+1));return{matcher:c=>o.test(c.full),kind:"regex"}}const t=e?JSON.parse.bind(JSON):jC;let s=!1;return i.length>1&&i[0]==='"'&&i[i.length-1]==='"'?(i=t(i),s=!0):e&&i.length>1&&i[0]==='"'&&i[i.length-2]==='"'&&i[i.length-1]==="i"?(i=t(i.substring(0,i.length-1)),s=!1):e&&i.length>1&&i[0]==='"'&&i[i.length-2]==='"'&&i[i.length-1]==="s"?(i=t(i.substring(0,i.length-1)),s=!0):i.length>1&&i[0]==="'"&&i[i.length-1]==="'"&&(i=t(i),s=!0),i=Nt(i),s?e?{kind:"strict",matcher:o=>o.normalized===i}:{matcher:o=>!i&&!o.immediate.length?!0:o.immediate.some(c=>Nt(c)===i),kind:"strict"}:(i=i.toLowerCase(),{kind:"lax",matcher:a=>a.normalized.toLowerCase().includes(i)})}class _r{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 t=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&t.delete("i"),e.ignoreCase===!0&&t.add("i"),this._regex=new RegExp(e.regexSource,[...t].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,t,s){if(s){if(this._regex)throw e.createStacklessError("Partial matching does not support regular expressions. Please provide a string value.");return this._string.split(/\s+/g).filter(Boolean).every(a=>t.contains(a))}return this.matches(t.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=Nt(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function cf(i,e){if(i===e)return!0;if(i&&e&&typeof i=="object"&&typeof e=="object"){if(i.constructor!==e.constructor)return!1;if(Array.isArray(i)){if(i.length!==e.length)return!1;for(let s=0;s<i.length;++s)if(!cf(i[s],e[s]))return!1;return!0}if(i instanceof RegExp)return i.source===e.source&&i.flags===e.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===e.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===e.toString();const t=Object.keys(i);if(t.length!==Object.keys(e).length)return!1;for(let s=0;s<t.length;++s)if(!e.hasOwnProperty(t[s]))return!1;for(const s of t)if(!cf(i[s],e[s]))return!1;return!0}return typeof i=="number"&&typeof e=="number"?isNaN(i)&&isNaN(e):!1}const HC={tagName:"svg",children:[{tagName:"defs",children:[{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gripper"},children:[{tagName:"path",attrs:{d:"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-circle-large-filled"},children:[{tagName:"path",attrs:{d:"M8 1a6.8 6.8 0 0 1 1.86.253 6.899 6.899 0 0 1 3.083 1.805 6.903 6.903 0 0 1 1.804 3.083C14.916 6.738 15 7.357 15 8s-.084 1.262-.253 1.86a6.9 6.9 0 0 1-.704 1.674 7.157 7.157 0 0 1-2.516 2.509 6.966 6.966 0 0 1-1.668.71A6.984 6.984 0 0 1 8 15a6.984 6.984 0 0 1-1.86-.246 7.098 7.098 0 0 1-1.674-.711 7.3 7.3 0 0 1-1.415-1.094 7.295 7.295 0 0 1-1.094-1.415 7.098 7.098 0 0 1-.71-1.675A6.985 6.985 0 0 1 1 8c0-.643.082-1.262.246-1.86a6.968 6.968 0 0 1 .711-1.667 7.156 7.156 0 0 1 2.509-2.516 6.895 6.895 0 0 1 1.675-.704A6.808 6.808 0 0 1 8 1z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-stop-circle"},children:[{tagName:"path",attrs:{d:"M6 6h4v4H6z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-inspect"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 3l1-1h12l1 1v6h-1V3H2v8h5v1H2l-1-1V3zm14.707 9.707L9 6v9.414l2.707-2.707h4zM10 13V8.414l3.293 3.293h-2L10 13z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-whole-word"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 11H1V13H15V11H16V14H15H1H0V11Z"}},{tagName:"path",attrs:{d:"M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z"}},{tagName:"path",attrs:{d:"M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-eye"},children:[{tagName:"path",attrs:{d:"M7.99993 6.00316C9.47266 6.00316 10.6666 7.19708 10.6666 8.66981C10.6666 10.1426 9.47266 11.3365 7.99993 11.3365C6.52715 11.3365 5.33324 10.1426 5.33324 8.66981C5.33324 7.19708 6.52715 6.00316 7.99993 6.00316ZM7.99993 7.00315C7.07946 7.00315 6.33324 7.74935 6.33324 8.66981C6.33324 9.59028 7.07946 10.3365 7.99993 10.3365C8.9204 10.3365 9.6666 9.59028 9.6666 8.66981C9.6666 7.74935 8.9204 7.00315 7.99993 7.00315ZM7.99993 3.66675C11.0756 3.66675 13.7307 5.76675 14.4673 8.70968C14.5344 8.97755 14.3716 9.24908 14.1037 9.31615C13.8358 9.38315 13.5643 9.22041 13.4973 8.95248C12.8713 6.45205 10.6141 4.66675 7.99993 4.66675C5.38454 4.66675 3.12664 6.45359 2.50182 8.95555C2.43491 9.22341 2.16348 9.38635 1.89557 9.31948C1.62766 9.25255 1.46471 8.98115 1.53162 8.71321C2.26701 5.76856 4.9229 3.66675 7.99993 3.66675Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-symbol-constant"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 6h8v1H4V6zm8 3H4v1h8V9z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 4l1-1h12l1 1v8l-1 1H2l-1-1V4zm1 0v8h12V4H2z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-check"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1",id:"icon-location-pin"},children:[{tagName:"path",attrs:{d:`
|
|
125
125
|
M8 1
|
|
126
126
|
C5.243 1 3 3.243 3 6
|
|
127
127
|
C3 9 8 14 8 14
|
|
@@ -132,7 +132,7 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i
|
|
|
132
132
|
A2 2 0 1 1 10 6
|
|
133
133
|
A2 2 0 1 1 6 6
|
|
134
134
|
Z
|
|
135
|
-
`}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-layers"},children:[{tagName:"path",attrs:{d:"M8 2L2 5v1l6 3 6-3V5L8 2zm0 1.18L11.82 5 8 6.82 4.18 5 8 3.18zM2 7.13V8l6 3 6-3v-.87L8 10.2 2 7.13zM2 10.13V11l6 3 6-3v-.87L8 13.2 2 10.13z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-list-tree"},children:[{tagName:"path",attrs:{d:"M2 3.5C2 3.22386 2.22386 3 2.5 3H13.5C13.7761 3 14 3.22386 14 3.5C14 3.77614 13.7761 4 13.5 4H6V6H13.5C13.7761 6 14 6.22386 14 6.5C14 6.77614 13.7761 7 13.5 7H6V9H13.5C13.7761 9 14 9.22386 14 9.5C14 9.77614 13.7761 10 13.5 10H6V12H13.5C13.7761 12 14 12.2239 14 12.5C14 12.7761 13.7761 13 13.5 13H5.5C5.22386 13 5 12.7761 5 12.5V4H2.5C2.22386 4 2 3.77614 2 3.5Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-brackets"},children:[{tagName:"path",attrs:{d:"M4.5 2H2v12h2.5v-1H3V3h1.5V2zm7 0H14v12h-2.5v-1H13V3h-1.5V2zM6 5h4v1H6V5zm0 3h4v1H6V8zm0 3h4v1H6v-1z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-braces"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 3.5C3 2.67 3.67 2 4.5 2H5v1h-.5c-.28 0-.5.22-.5.5v3c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5v3c0 .28.22.5.5.5H5v1h-.5C3.67 14 3 13.33 3 12.5v-3c0-.28-.22-.5-.5-.5H2V8h.5c.28 0 .5-.22.5-.5v-3zm10 0C13 2.67 12.33 2 11.5 2H11v1h.5c.28 0 .5.22.5.5v3c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5v3c0 .28-.22.5-.5.5H11v1h.5c.83 0 1.5-.67 1.5-1.5v-3c0-.28.22-.5.5-.5H14V8h-.5c-.28 0-.5-.22-.5-.5v-3z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-braces-dashes"},children:[{tagName:"path",attrs:{d:"M3 3.5C3 2.67 3.67 2 4.5 2H5v1h-.5c-.28 0-.5.22-.5.5v3c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5v3c0 .28.22.5.5.5H5v1h-.5C3.67 14 3 13.33 3 12.5v-3c0-.28-.22-.5-.5-.5H2V8h.5c.28 0 .5-.22.5-.5v-3zm10 0C13 2.67 12.33 2 11.5 2H11v1h.5c.28 0 .5.22.5.5v3c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5v3c0 .28-.22.5-.5.5H11v1h.5c.83 0 1.5-.67 1.5-1.5v-3c0-.28.22-.5.5-.5H14V8h-.5c-.28 0-.5-.22-.5-.5v-3zM6 5h4v1H6V5zm0 3h4v1H6V8zm0 3h4v1H6v-1z"}}]},{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"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-snapshot"},children:[{tagName:"path",attrs:{d:"M2 1.5l.5-.5h7.72l.35.14 3.28 3.3.15.36v9.7l-.5.5h-11l-.5-.5v-13zm1 .5v12h10V6H9.5L9 5.5V2H3zm7 0v3h3l-3-3z"}},{tagName:"path",attrs:{fill:"none",stroke:"currentColor","stroke-width":"0.8",transform:"rotate(7 8 8.7)",d:"M 10 5.2 C 8 5.2, 6 5.7, 6 7.2 C 6 8.7, 7.5 8.7, 8 8.7 C 8.5 8.7, 10 8.7, 10 10.2 C 10 11.7, 8 12.2, 6 12.2"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-move"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.5 2.5V5.5H7.5V2.5L6.20711 3.79289L5.5 3.08579L8 0.585786L10.5 3.08579L9.79289 3.79289L8.5 2.5ZM7.5 10.5V13.5L6.20711 12.2071L5.5 12.9142L8 15.4142L10.5 12.9142L9.79289 12.2071L8.5 13.5V10.5H7.5ZM10.5 8.5H13.5L12.2071 9.79289L12.9142 10.5L15.4142 8L12.9142 5.5L12.2071 6.20711L13.5 7.5H10.5V8.5ZM5.5 7.5H2.5L3.79289 6.20711L3.08579 5.5L0.585786 8L3.08579 10.5L3.79289 9.79289L2.5 8.5H5.5V7.5Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-selection"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 1H3V2H2V3H1V1ZM4 1H6V2H4V1ZM7 1H9V2H7V1ZM10 1H12V2H10V1ZM13 1H15V3H14V2H13V1ZM14 4H15V6H14V4ZM14 7H15V9H14V7ZM14 10H15V12H14V10ZM13 13V14H14V15H13H12V14H13V13H14V12H15V13V15H13ZM10 14H12V15H10V14ZM7 14H9V15H7V14ZM4 14H6V15H4V14ZM1 13H2V14H3V15H1V13ZM1 10H2V12H1V10ZM1 7H2V9H1V7ZM1 4H2V6H1V4Z"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-table"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd",d:"M2 3h12v10H2V3zm1 1v8h10V4H3z"}},{tagName:"rect",attrs:{x:"2",y:"6.33",width:"12",height:"1"}},{tagName:"rect",attrs:{x:"2",y:"9.67",width:"12",height:"1"}},{tagName:"rect",attrs:{x:"5.67",y:"3",width:"1",height:"10"}},{tagName:"rect",attrs:{x:"9.33",y:"3",width:"1",height:"10"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-file-upload"},children:[{tagName:"path",attrs:{d:"M14.5 3H7.71l-.85-.85L6.51 2h-5l-.5.5v11l.5.5h13l.5-.5v-10L14.5 3zm-.51 8.49V13h-12V7h4.49l.35-.15.86-.86H14v1.5l.001 4zm0-6.49h-6.5l-.35.15-.86.86H2v-3h4.29l.85.85.36.15H14l-.01.99z"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-eraser"},children:[{tagName:"path",attrs:{d:"M 13.54 2.70 L 11.30 0.46 C 10.68 -0.15 9.68 -0.15 9.06 0.46 L 3.34 6.18 L 1.46 8.07 C 0.85 8.68 0.85 9.68 1.46 10.30 L 3.70 12.54 C 4.01 12.84 4.41 13 4.82 13 C 5.22 13 5.63 12.84 5.93 12.54 L 7.82 10.66 L 8.26 10.21 L 13.54 4.93 C 13.84 4.64 14 4.24 14 3.82 C 14 3.39 13.84 3.00 13.54 2.70 Z M 7.37 10.21 L 5.49 12.09 C 5.12 12.46 4.51 12.46 4.15 12.09 L 1.91 9.85 C 1.54 9.48 1.54 8.88 1.91 8.51 L 3.79 6.63 L 7.37 10.21 Z M 13.09 4.49 L 7.82 9.76 L 6.03 7.97 L 4.24 6.18 L 9.51 0.91 C 9.88 0.54 10.48 0.54 10.85 0.91 L 13.09 3.15 C 13.27 3.33 13.37 3.56 13.37 3.82 C 13.37 4.07 13.27 4.31 13.09 4.49 Z"}},{tagName:"rect",attrs:{x:"1",y:"13.2",width:"12",height:"1.6"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 100 100",fill:"currentColor",id:"icon-sketch-tool"},children:[{tagName:"path",attrs:{d:"m37.68 70.594c-0.36328 0.75781-0.66406 1.5508-0.89063 2.3594-0.41406 1.4727-0.58984 3.0195-0.51562 4.5742 0.042968 0.95312-0.58984 1.7852-1.4766 2.0195l-21.281 5.707c-1.0664 0.28516-2.1602-0.34766-2.4453-1.4141-0.09375-0.35156-0.085937-0.70703 0-1.0312l5.7031-21.285c0.25781-0.96094 1.1719-1.5703 2.1289-1.4727 1.5195 0.0625 3.0273-0.11719 4.4688-0.51953 0.80859-0.22656 1.5977-0.52734 2.3594-0.89453-0.64453-0.78516-0.60156-1.9453 0.13281-2.6797l3.7227-3.7227c0.70703-0.70703 1.8086-0.77344 2.5898-0.20312l35.953-35.953c-0.57031-0.78125-0.50391-1.8828 0.20312-2.5898l3.7227-3.7227c0.70703-0.70703 1.8086-0.77344 2.5898-0.20312l6.5039-6.5039c0.78125-0.78125 2.0469-0.78125 2.8281 0l9.2891 9.2891c0.78125 0.78125 0.78125 2.0469 0 2.8281l-6.5039 6.5039c0.57031 0.78125 0.5 1.8828-0.20312 2.5859l-0.49219 0.49219 2.875 2.875c0.78125 0.78125 0.78125 2.0469 0 2.8281l-16.711 16.711c-0.78125 0.78125-2.0469 0.78125-2.8281 0s-0.78125-2.0469 0-2.8281l15.297-15.297-1.4609-1.4609-0.40234 0.40234c-0.70703 0.70703-1.8047 0.77344-2.5859 0.20312l-35.953 35.953c0.56641 0.78125 0.5 1.8828-0.20312 2.5859l-3.7227 3.7227c-0.73438 0.73438-1.8945 0.77734-2.6797 0.13281zm-9.0078-8.9961c-1.3281 0.76562-2.75 1.3594-4.2266 1.7734-1.3711 0.37891-2.7812 0.60547-4.2109 0.66406l-3.375 12.598 5.2109-5.2109c-0.18359-0.51562-0.27734-1.0547-0.27734-1.5938 0-1.1992 0.46094-2.4023 1.3789-3.3203 0.91406-0.91406 2.1211-1.375 3.3203-1.375 1.1953 0 2.3945 0.46094 3.3125 1.375 0.92187 0.92578 1.3828 2.1289 1.3828 3.3203 0 1.1406-0.41797 2.2852-1.25 3.1836-0.88672 0.96875-2.1328 1.5117-3.4453 1.5117-0.53906 0-1.0742-0.09375-1.5898-0.28125l-5.2148 5.2148 12.598-3.375c0.058594-1.4336 0.28516-2.8477 0.66406-4.2109 0.41406-1.4766 1.0078-2.8984 1.7734-4.2266l-6.0508-6.0508zm11.168 3.7227-8.8438-8.8438-0.89453 0.89453 8.8438 8.8438zm37.645-52.945 6.4609 6.4609 5.0742-5.0742-6.4609-6.4609zm-0.089844 13.012-6.4609-6.4609-35.871 35.871 6.4609 6.4609zm4.6367-2.8086-8.293-8.293c-0.12109-0.054687-0.23828-0.125-0.34766-0.20312l-0.82422 0.82422 8.8438 8.8438 0.82031-0.82031c-0.082031-0.10938-0.14844-0.23047-0.20312-0.35156zm-75.164 68.324c-0.83984-0.71094-0.94531-1.9727-0.23438-2.8125 0.71094-0.83984 1.9727-0.94531 2.8125-0.23438 11.77 10.004 24.934 4.5469 38.125-0.91797 14.867-6.1602 29.77-12.34 43.941 0.98828 0.80078 0.75391 0.83984 2.0195 0.085937 2.8203-0.75391 0.80078-2.0195 0.83984-2.8203 0.085937-12.289-11.559-26-5.875-39.676-0.20703-14.32 5.9336-28.609 11.855-42.234 0.27734zm19.625-20.375c0.23437 0 0.37891-0.09375 0.53906-0.24609 0.10156-0.125 0.15625-0.28516 0.15625-0.44922 0-0.18359-0.066406-0.36328-0.19922-0.49609-0.13281-0.13281-0.3125-0.19922-0.49609-0.19922-0.17969 0-0.35938 0.070312-0.49219 0.20312-0.13281 0.13281-0.20312 0.31641-0.20312 0.49219 0 0.17969 0.070313 0.35938 0.20312 0.49219 0.13281 0.13672 0.30078 0.20312 0.49219 0.20312z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gojs-link"},children:[{tagName:"path",attrs:{d:"M 0.75 3.5 A 1.75 1.75 0 1 0 4.25 3.5 A 1.75 1.75 0 1 0 0.75 3.5 Z"}},{tagName:"path",attrs:{d:"M 4.25 2.75 L 9.5 2.75 L 9.5 11.75 L 13 11.75 L 13 13.25 L 8 13.25 L 8 4.25 L 4.25 4.25 Z"}},{tagName:"path",attrs:{d:"M 13 11 L 15.5 12.5 L 13 14 Z"}}]}]}]},Ev="[Scoping]";function Bc(){try{if(typeof window<"u"&&window.__SKYRAMP_DEBUG__||typeof localStorage<"u"&&localStorage.getItem("SKYRAMP_DEBUG")==="true")return!0}catch{}return!1}function W(...i){Bc()&&console.log(Ev,...i)}function j2(i){Bc()&&console.group(`${Ev} ${i}`)}function Dn(){Bc()&&console.groupEnd()}function jh(i){Bc()&&console.table(i)}const H2=[/card/i,/item/i,/tile/i,/cell/i,/row(?!s)/i,/entry/i,/result/i,/post/i,/product/i,/option/i],z2=[/^col-/i,/^row$/i,/^container/i,/^px-/i,/^py-/i,/^mx-/i,/^my-/i,/^m-/i,/^p-/i,/^d-/i,/^flex/i,/^grid$/i,/^text-/i,/^bg-/i,/^border/i,/^rounded/i,/^shadow/i,/^w-/i,/^h-/i,/^css-/i,/^styled-/i,/^sc-/i,/^emotion-/i,/^MuiGrid/i,/^MuiBox/i,/--[a-f0-9]{16,}$/i,/__[a-f0-9]{16,}$/i,/_[a-f0-9]{16,}$/i,/^app-[a-z0-9]+$/i,/^e[a-z0-9]{6,}\d+$/i];class $2{constructor(e){this._injectedScript=e,W("ScopingHandler initialized (with CSS class pattern support)")}applyScopingHook(e,t,s){j2(`Analyzing: ${t}`);const a=this._needsScoping(e,t,s);if(W("Needs scoping:",a.needed,"| Reason:",a.reason),!a.needed){const v=this._tryStableIdSelector(e,t);return v?(W("Preferring stable ID selector:",v.selector),Dn(),v):(Dn(),null)}const o=this._tryStableIdSelector(e,t);if(o)return W("Using stable ID selector:",o.selector),Dn(),o;const c=this._tryLinkSelector(e,t);if(c)return W("Using link selector:",c.selector),Dn(),c;const d=this._findContainer(e);if(!d){if(W("No container found"),this._hasDynamicSelector(t)){const v=this._generateAlternativeSelector(e,t);if(v)return W("Using alternative selector:",v.selector),Dn(),v}return Dn(),null}W("Container:",d.selector);const h=this._getContainerIndex(d.element,d.selector);if(h===null)return W("Cannot determine container index"),Dn(),null;W("Container index:",h);const f=this._generateRelativeSelector(d.element,e);if(!f)return W("No relative selector found"),Dn(),null;W("Relative selector:",f);const y=this._isFormContainer(d.selector);let m,_=!1;if(y)m=`${d.selector} >> ${f}`,W("Using form container selector (no nth):",m);else{const v=this._getRowHasFilter(d.element,d.selector);if(v)m=`${d.selector} >> internal:has=${v} >> ${f}`,_=!0,W("Using has-filter selector:",m);else{const T=this._getTextFilterForContainer(d.element,d.selector);T?(m=`${d.selector} >> internal:has-text="${this._escapeTextFilter(T)}"i >> ${f}`,_=!0,W("Using text-filtered selector:",m)):(m=`${d.selector} >> nth=${h} >> ${f}`,W("Using nth-based selector:",m))}}const b=this._verifySelector(m);if(W("Verification:",b.valid?"PASS":"FAIL","| Matches:",b.count),!b.valid)if(y&&b.count>=1)W("Form container verification relaxed - using selector despite multiple matches");else return W("Verification failed, using original"),Dn(),null;const x={selector:m,container:d.element,elements:b.elements,strategy:"nth",description:y?`${d.selector} >> ${f}`:`${d.selector}.nth(${h}) >> ${f}`,containerSelector:d.selector,containerIndex:h,relativeSelector:f,isFormContainer:y,usesTextFilter:_};return jh({Original:t,Scoped:m,Container:d.selector,Index:h,Relative:f}),Dn(),x}_needsScoping(e,t,s){if(W("Input match set:",{selector:t,count:s.length}),s.length>1)return{needed:!0,reason:`Non-unique: ${s.length} elements`};if(this._hasDynamicSelector(t))return{needed:!0,reason:"Dynamic selector needs replacement"};const a=this._hasStateDependentName(e,t);if(a.isStateDependent)return{needed:!0,reason:a.reason};const o=["gridcell","row","listitem","option","treeitem","menuitem","cell"],c=e.getAttribute("role");if(c&&o.includes(c)){const h=this._findRepeatingContainer(e);if(h)return{needed:!0,reason:`Repeating role "${c}" inside container: ${h.selector}`}}const d=e.tagName==="TD"?e:e.closest("td");if(d){const h=d.closest("tr");if(h){const f=h.parentElement;if(f&&(f.tagName==="TBODY"||f.tagName==="TABLE")){const y=f.querySelectorAll(":scope > tr");if(y.length>1)return{needed:!0,reason:`Element inside <td> in <tr> with ${y.length} sibling rows`}}}}return{needed:!1,reason:"Selector is unique and not in repeating context"}}_isDynamicId(e){if(/^react-aria\d+/.test(e)||/^mui-\d+/.test(e)||/^(mat|cdk)-[a-z]+-\d+$/.test(e)||/[-_]\d+$/.test(e)||/\d{2,}[_-][a-zA-Z]/.test(e)||/^\d+$/.test(e)||/\d{4,}$/.test(e)||/[-_][0-9a-f]{6,}$/i.test(e))return!0;const t=e.match(/[-_]([0-9a-f]{3,5})$/i);return!!(t&&/[0-9]/.test(t[1])||/[a-zA-Z][0-9]{3,}$/.test(e)||e.includes(":")||/^.+__search_[a-zA-Z0-9]{4,}$/.test(e))}_tryStableIdSelector(e,t){const s=e.id;if(!s||!t.startsWith("internal:role="))return null;if(this._isDynamicId(s))return W("Skipping dynamic ID:",s),null;const a=`#${CSS.escape(s)}`,o=this._verifySelector(a);return!o.valid||o.count!==1?(W("ID selector not unique:",a,"matches:",o.count),null):{selector:a,container:null,elements:o.elements,strategy:"alternative",description:"Stable ID preferred over role selector",containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0}}_hasDynamicSelector(e){if(W("_hasDynamicSelector checking:",e),/react-aria\d+/.test(e))return W("MATCHED: React-Aria dynamic ID"),!0;if(/__search_[a-zA-Z0-9]{4,}/.test(e))return W("MATCHED: Vue Tables dynamic search ID"),!0;if(/#[a-zA-Z_-]*\d+/.test(e))return W("MATCHED: Dynamic ID with numeric suffix (CSS)"),!0;if(/internal:attr=\[id="[a-zA-Z_-]*\d+"\]/.test(e))return W("MATCHED: Dynamic ID with numeric suffix (internal:attr)"),!0;if(/\[id="[a-zA-Z_-]*\d+"\]/.test(e))return W("MATCHED: Dynamic ID with numeric suffix (attribute selector)"),!0;if(/\[id="[^"]*\d{2,}[_-][a-zA-Z][^"]*"\]/.test(e))return W("MATCHED: Dynamic ID with mid-string counter (attribute selector)"),!0;if(/internal:attr=\[id="[^"]*\d{2,}[_-][a-zA-Z][^"]*"\]/.test(e))return W("MATCHED: Dynamic ID with mid-string counter (internal:attr)"),!0;if(/\.(app-[a-z0-9]+|e[a-z0-9]{6,}[0-9]+)/.test(e))return W("MATCHED: CSS-in-JS generated class (Emotion)"),!0;const t=(e.match(/>/g)||[]).length;return t>=4?(W("MATCHED: Long CSS path with",t,"child combinators"),!0):/:nth-child\(\d+\)/.test(e)?(W("MATCHED: Contains :nth-child() pattern"),!0):/\[data-testid="[^"]*[-_]\d+"\]/.test(e)||/\[data-test-id="[^"]*[-_]\d+"\]/.test(e)?(W("MATCHED: TestId with numeric suffix (attribute selector)"),!0):/getByTestId\(['"][^'"]*[-_]\d+['"]\)/.test(e)?(W("MATCHED: TestId with numeric suffix (getByTestId)"),!0):/internal:testid=.*[-_]\d+/.test(e)?(W("MATCHED: TestId with numeric suffix (internal:testid)"),!0):/\[name="\d+"[is]?\]/.test(e)||/internal:text="\d+"[is]?/.test(e)?(W("MATCHED: All-numeric text content in selector"),!0):/\[name="[^"]*\d{8,}[^"]*"/.test(e)||/internal:text="[^"]*\d{8,}[^"]*"/.test(e)?(W("MATCHED: Long digit sequence in text content (timestamp/generated)"),!0):/(?:\[name|internal:text)="\/?\d{1,2}\/\d{1,2}"/.test(e)?(W("MATCHED: Partial date pattern in text content"),!0):(W("No dynamic patterns found"),!1)}_hasStateDependentName(e,t){const s=t.match(/internal:role=(\w+)\[name=["'](.+?)["'][is]?\]/);if(!s)return{isStateDependent:!1,reason:"Not a role selector with name"};const a=s[1],o=s[2];if(!o||o.length<3)return{isStateDependent:!1,reason:"Name too short"};W("Checking state-dependent name:",{role:a,name:o});const c=this._getSiblingAccessibleNames(e,a);if(c.length===0)return W("No siblings found for state check"),{isStateDependent:!1,reason:"No siblings with same role"};W("Sibling names:",c);for(const d of c)if(d.length>=3&&o.length>d.length&&o.toLowerCase().includes(d.toLowerCase()))return W("State-dependent name detected:",o,"contains",d),{isStateDependent:!0,reason:`Name "${o}" contains sibling name "${d}" - likely hover-dependent`};return{isStateDependent:!1,reason:"Name is unique among siblings"}}_getSiblingAccessibleNames(e,t){const s=[],a=new Set;try{const o=["ul","ol","nav",'[role="list"]','[role="navigation"]','[role="menu"]','[role="tablist"]','[role="grid"]','[role="row"]'];let c=e.parentElement,d=e.ownerDocument.body,h=0;for(;c&&h<5;){const m=c.tagName.toLowerCase(),_=c.getAttribute("role");if(o.some(b=>{var x;if(b.startsWith("[role=")){const v=(x=b.match(/\[role="(.+)"\]/))==null?void 0:x[1];return _===v}return m===b})){d=c;break}c=c.parentElement,h++}W("Sibling search scope:",d.tagName,d.className);const f=`[role="${t}"]`,y=d.querySelectorAll(f);for(const m of y){if(m===e)continue;const _=this._getAccessibleName(m);_&&_.length>=2&&!a.has(_.toLowerCase())&&(a.add(_.toLowerCase()),s.push(_))}}catch(o){W("Error getting sibling names:",o)}return s}_findRepeatingContainer(e){const t=[/^grid[-_]?view[-_]?item$/i,/^gridcell$/i,/^list[-_]?item$/i,/^row[-_]?item$/i,/^item$/i,/^card$/i,/^tile$/i],s=[/^gridview$/i,/^grid[-_]?view$/i,/^listview$/i,/^list[-_]?view$/i,/^container$/i,/^wrapper$/i,/^content$/i,/^main$/i];let a=e.parentElement;for(;a&&a!==e.ownerDocument.body;){const o=this._getTestId(a);if(o&&!s.some(f=>f.test(o))&&t.some(f=>f.test(o))){const f=this._buildTestIdSelector(a,o);if(a.ownerDocument.querySelectorAll(f).length>1)return{element:a,selector:f}}const c=a.getAttribute("role");if(c&&["row","gridcell","listitem","option","treeitem","menuitem"].includes(c)){const f=`[role=${this._quoteCSSAttributeValue(c)}]`;if(a.ownerDocument.querySelectorAll(f).length>1)return{element:a,selector:f}}const d=this._getComponentName(a);if(d&&this._isRepeatingComponentName(d.name)){const f=`[${d.attr}=${this._quoteCSSAttributeValue(d.name)}]`;try{const y=a.ownerDocument.querySelectorAll(f);if(y.length>1&&y.length<100)return W("Found component container:",d.name,"via",d.attr,"with",y.length,"siblings"),{element:a,selector:f}}catch{}}const h=this._findRepeatingContainerByClass(a);if(h)return h;a=a.parentElement}return null}_findRepeatingContainerByClass(e){const t=Array.from(e.classList);for(const s of t)if(!z2.some(a=>a.test(s))&&H2.some(a=>a.test(s))){const a=`.${this._escapeCSS(s)}`;try{const o=e.ownerDocument.querySelectorAll(a);if(o.length>1&&o.length<100){const c=e.tagName.toLowerCase();return W("Found CSS class container:",s,"with",o.length,"siblings, using tag:",c),{element:e,selector:c}}}catch{continue}}return null}_escapeCSS(e){return uf(e)}_quoteCSSAttributeValue(e){return Av(e)}_getTestId(e){return e.getAttribute("data-testid")||e.getAttribute("data-test-id")}_buildTestIdSelector(e,t){return e.getAttribute("data-testid")===t?`[data-testid=${this._quoteCSSAttributeValue(t)}]`:`[data-test-id=${this._quoteCSSAttributeValue(t)}]`}_getComponentName(e){const t=["data-component","data-sentry-component","data-react-component"];for(const s of t){const a=e.getAttribute(s);if(a)return{name:a,attr:s}}return null}_isRepeatingComponentName(e){return[/Card$/i,/Item$/i,/Link$/i,/Row$/i,/Tile$/i,/Option$/i,/Entry$/i].some(s=>s.test(e))}_findContainer(e){const t=[/^grid[-_]?view[-_]?item$/i,/^gridcell$/i,/^list[-_]?item$/i,/^row[-_]?item$/i,/^item$/i,/^card$/i,/^tile$/i],s=[/[-_]input$/i,/[-_]field$/i,/[-_]btn$/i,/[-_]button$/i,/[-_]control$/i,/^input[-_]/i,/^field[-_]/i],a=[/^gridview$/i,/^grid[-_]?view$/i,/^listview$/i,/^list[-_]?view$/i,/^container$/i,/^wrapper$/i,/^content$/i,/^main$/i];let o=e.parentElement,c=null,d=null;for(;o&&o!==e.ownerDocument.body;){const h=this._getTestId(o);if(h){if(a.some(_=>_.test(h))){o=o.parentElement;continue}const m=this._isDynamic(h);if(!m&&t.some(_=>_.test(h)))return{element:o,selector:this._buildTestIdSelector(o,h)};if(!m&&s.some(_=>_.test(h)))return W("Found form container by testid pattern:",h),{element:o,selector:this._buildTestIdSelector(o,h)};!c&&!m&&(c={element:o,selector:this._buildTestIdSelector(o,h)})}const f=o.getAttribute("role");if(f&&["row","gridcell","listitem","option","treeitem","menuitem"].includes(f)&&(c||(c={element:o,selector:`[role=${this._quoteCSSAttributeValue(f)}]`})),o.tagName==="TR"){const m=o.parentElement;m&&(m.tagName==="TBODY"||m.tagName==="TABLE")&&m.querySelectorAll(":scope > tr").length>1&&!c&&(c={element:o,selector:"tr"})}const y=this._getComponentName(o);if(y&&this._isRepeatingComponentName(y.name)){const m=`[${y.attr}=${this._quoteCSSAttributeValue(y.name)}]`;try{const _=o.ownerDocument.querySelectorAll(m);if(_.length>1&&_.length<100)return W("Found component container:",y.name,"via",y.attr,"with",_.length,"siblings"),{element:o,selector:m}}catch{}}if(!d){const m=this._findRepeatingContainerByClass(o);m&&(d=m)}o=o.parentElement}return c||d}_isFormContainer(e){const s=[/-input"\]$/i,/-field"\]$/i,/-btn"\]$/i,/-button"\]$/i,/-control"\]$/i,/\[data-test-?id="input-/i,/\[data-test-?id="field-/i].some(a=>a.test(e));return W("_isFormContainer:",e,"=",s),s}_getContainerIndex(e,t){try{const s=e.ownerDocument.querySelectorAll(t),a=Array.from(s).indexOf(e);return a!==-1?a:null}catch{return null}}_getTextFilterForContainer(e,t){var d;const s=e.getAttribute("role");let a=null;if(s==="row"||e.tagName==="TR"||e.classList.contains("a-data-table__row")?a=this._getRowIdentifyingText(e):a=this._getContainerIdentifyingText(e),!a)return W("Text filter: No identifying text found"),null;const o=e.ownerDocument.querySelectorAll(t);let c=0;for(const h of o)(d=h.textContent)!=null&&d.includes(a)&&c++;return c===1?(W("Text filter: Found unique text:",a),a):(W("Text filter: Text not unique, found in",c,"containers"),null)}_getContainerIdentifyingText(e){var d;const t=this._getDirectTextContent(e);if(t&&t.length>=2&&t.length<=100&&!this._isGenericText(t))return t;const s=e.getAttribute("aria-label");if(s&&s.length>=2&&s.length<=100&&!this._isGenericText(s))return s;const a=e.querySelectorAll("span, div, p, h1, h2, h3, h4, h5, h6");for(const h of a){const f=this._getDirectTextContent(h);if(f&&f.length>=2&&f.length<=100&&!this._isGenericText(f))return f}const o=e.querySelector("[aria-label]");if(o){const h=o.getAttribute("aria-label");if(h&&h.length>=2&&h.length<=100&&!this._isGenericText(h))return h}const c=(d=e.textContent)==null?void 0:d.trim();return c&&c.length>=2&&c.length<=100&&!this._isGenericText(c)?c:null}_getRowIdentifyingText(e){var o;const t=(c,d)=>!(!c||c.length<2||c.length>100||this._isGenericText(c)||!d&&this._isDynamic(c));for(const c of[!1,!0]){for(const d of e.querySelectorAll("a")){const h=(o=d.textContent)==null?void 0:o.trim();if(t(h,c))return h}for(const d of e.querySelectorAll('[role="cell"], [role="gridcell"], td')){const h=this._getDirectTextContent(d);if(t(h,c))return h}}const s=e.querySelector("[data-testid], [data-test-id]");if(s){const c=this._getTestId(s);if(c&&!this._isDynamic(c)&&!/^(item|row|cell|grid)/i.test(c))return c}const a=e.querySelector('[aria-label*="menu for"], [aria-label*="actions for"]');if(a){const c=a.getAttribute("aria-label"),d=c==null?void 0:c.match(/(?:menu|actions)\s+for\s+(.+)$/i);if(d&&d[1])return d[1].trim()}return null}_getRowHasFilter(e,t){var o;if(e.getAttribute("role")!=="row"&&e.tagName!=="TR"&&!e.classList.contains("a-data-table__row"))return null;const a=e.querySelectorAll("a");for(const c of a){const d=(o=c.textContent)==null?void 0:o.trim();if(!d||d.length<2||d.length>100||this._isGenericText(d))continue;const f=`internal:role=link[name="${d.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"s]`,y=`${t} >> internal:has=${JSON.stringify(f)}`,m=this._verifySelector(y);if(m.count===1)return W("Has-filter: Found unique link text:",d),JSON.stringify(f);W("Has-filter: Link text not unique:",d,"matches:",m.count)}return null}_getDirectTextContent(e){let t="";for(const s of e.childNodes)s.nodeType===Node.TEXT_NODE&&(t+=s.textContent||"");return t.trim()}_isGenericText(e){return[/^(edit|delete|view|open|close|save|cancel|submit|ok|yes|no)$/i,/^(item|row|cell|column|header|footer)$/i,/^(loading|please wait|...)$/i,/^\d{1,5}$/,/^[\s\-_]+$/].some(s=>s.test(e))}_escapeTextFilter(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}_generateRelativeSelector(e,t){var y;if(e===t||!e.contains(t))return"";if(W("_generateRelativeSelector for:",t.tagName,t.className),["svg","path","circle","rect","line","polygon","polyline","ellipse","g","use"].includes(t.tagName.toLowerCase())){W("Target is SVG or SVG child, walking up to find clickable ancestor");const m=this._findClickableAncestor(e,t);m&&(W("Found clickable ancestor:",m.tagName,m.className),t=m)}const a=this._getTestId(t);if(a&&!this._isDynamic(a))return this._buildTestIdSelector(t,a);const o=this._getRole(t),c=t.getAttribute("aria-label");if(o&&c){const _=t.getAttribute("role")?`[role=${this._quoteCSSAttributeValue(o)}][aria-label=${this._quoteCSSAttributeValue(c)}]`:`internal:role=${o}[name=${this._quoteCSSAttributeValue(c)}i]`;try{const b=this._injectedScript.parseSelector(_),x=this._injectedScript.querySelectorAll(b,e);if(x.length===1)return W("Strategy 2: role+aria-label ->",_),_;W("Strategy 2: not unique in container, matches:",x.length)}catch{W("Strategy 2: selector parse failed for",_)}}if(o){const m=`[role=${this._quoteCSSAttributeValue(o)}]`;if(e.querySelectorAll(m).length===1)return m}if(c){const m=`[aria-label=${this._quoteCSSAttributeValue(c)}]`;if(e.querySelectorAll(m).length===1)return m}if(o==="button"||o==="link"||o==="cell"||o==="gridcell"||o==="columnheader"||o==="rowheader"){const m=this._getAccessibleName(t);if(m&&m.length>=2&&m.length<=50&&!this._isGenericText(m)&&!this._isDynamic(m)){const _=`internal:role=${o}[name=${this._quoteCSSAttributeValue(m)}i]`;try{const b=this._injectedScript.parseSelector(_),x=this._injectedScript.querySelectorAll(b,e);if(x.length===1)return W("Strategy 4b: role with accessible name ->",_),_;W("Strategy 4b: not unique in container, matches:",x.length)}catch{W("Strategy 4b: selector parse failed")}}}if(t.tagName==="INPUT"){const m=e.querySelectorAll("input");if(W("Input strategy: found",m.length,"inputs in container"),m.length===1)return W("Using input selector (single input in container)"),"input";const _=t.type||"text",b=`input[type=${this._quoteCSSAttributeValue(_)}]`;return e.querySelectorAll(b).length===1?(W("Using input[type] selector"),b):(W("Multiple inputs found, using input anyway for form container"),"input")}if(e.tagName==="TR"){const m=t.tagName==="TD"?t:t.closest("td");if(m&&e.contains(m)){const _=t!==m?t.closest("a, button, input, select, textarea"):null;if(_&&m.contains(_))W("Strategy 5b: skipping, target is inside interactive element:",_.tagName);else{const x=e.querySelectorAll(":scope > td"),v=Array.from(x).indexOf(m);if(v>=0)return W("Strategy 5b: table cell column index ->",`td >> nth=${v}`),`td >> nth=${v}`}}}const d=t.tagName.toLowerCase();if(e.querySelectorAll(d).length===1)return d;const h=Array.from(t.classList);for(const m of h){if(/^(css|styled|sc|emotion|mui)-/.test(m)||/^Mui[A-Z]/.test(m)||m.length<3)continue;const _=`.${this._escapeCSS(m)}`;if(e.querySelectorAll(_).length===1)return _}const f=(y=t.textContent)==null?void 0:y.trim();if(f&&f.length>=2&&f.length<=100){const m=f.replace(/\s+/g," ");if(!this._isGenericText(m)){const _=`internal:text="${this._escapeTextFilter(m)}"i`;try{const b=this._injectedScript.parseSelector(_),x=this._injectedScript.querySelectorAll(b,e);if(x.length===1)return W("Strategy 8: text content filter ->",_),_;W("Strategy 8: text not unique in container, matches:",x.length)}catch{W("Strategy 8: selector parse failed")}}}return""}_findClickableAncestor(e,t){let s=t.parentElement;const a=["img","presentation","none","graphics-symbol"];for(;s&&s!==e&&e.contains(s);){const o=s.getAttribute("data-testid")||s.getAttribute("data-test-id"),c=s.getAttribute("role"),d=c&&!a.includes(c),h=s.getAttribute("aria-label"),f=["BUTTON","A","INPUT","SELECT"].includes(s.tagName),y=s.hasAttribute("onclick")||s.hasAttribute("data-click");if(o||d||h&&f||f||y)return W("_findClickableAncestor found:",s.tagName,"testid:",o,"role:",c,"isClickable:",f),s;s=s.parentElement}return null}_isDynamic(e){if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/[-_][0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e))return!0;const t=e.match(/[-_]([0-9a-f]{8,})$/i);return!!(t&&/[0-9]/.test(t[1])||/^\d{6,}$/.test(e)||/^\d{10,13}$/.test(e))}_getRole(e){var o;const t=e.getAttribute("role");if(t)return t;const s=e.tagName.toLowerCase(),a={button:"button",a:"link",select:"combobox",textarea:"textbox",img:"img",tr:"row"};if(s==="input"){const c=((o=e.type)==null?void 0:o.toLowerCase())||"text";return{checkbox:"checkbox",radio:"radio",button:"button",submit:"button"}[c]||"textbox"}if(s==="td"){const c=e.closest("table"),d=c==null?void 0:c.getAttribute("role");return d==="grid"||d==="treegrid"?"gridcell":"cell"}return s==="th"?lt(e):a[s]||null}_verifySelector(e){try{const t=this._injectedScript.parseSelector(e),s=this._injectedScript.querySelectorAll(t,this._injectedScript.document);return{valid:s.length===1,count:s.length,elements:Array.from(s)}}catch{return{valid:!1,count:0,elements:[]}}}_generateAlternativeSelector(e,t){var d;W("_generateAlternativeSelector for:",e.tagName,"original:",t);const s=e.tagName.toUpperCase();let a=null;if(s==="INPUT"||s==="TEXTAREA"||s==="SELECT"){const h=e.getAttribute("name");h&&!this._isDynamic(h)&&(a=`${s.toLowerCase()}[name=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 1: name attribute ->",a))}if(!a){const h=e.getAttribute("aria-label");h&&h.length>=2&&h.length<=100&&(a=`[aria-label=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 2: aria-label ->",a))}if(!a&&(s==="INPUT"||s==="TEXTAREA")){const h=e.placeholder;h&&h.length>=2&&h.length<=100&&(a=`${s.toLowerCase()}[placeholder=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 3: placeholder ->",a))}if(!a&&s==="INPUT"){const h=e.type||"text";if(["email","password","tel","url","search","number","date","time","datetime-local","month","week","color","file"].includes(h)){const y=`input[type=${this._quoteCSSAttributeValue(h)}]`;this._verifySelector(y).valid&&(a=y,W("Alternative strategy 4: unique input type ->",a))}}if(!a&&(s==="BUTTON"||s==="INPUT"&&e.type==="submit")){const h=(d=e.textContent)==null?void 0:d.trim();h&&h.length>=2&&h.length<=50&&!this._isGenericText(h)&&(a=`internal:role=button[name=${this._quoteCSSAttributeValue(h)}i]`,W("Alternative strategy 5: button text ->",a))}if(!a){const h=e.getAttribute("title");h&&h.length>=2&&h.length<=100&&(a=`[title=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 6: title ->",a))}if(!a)return W("No alternative selector found"),null;const o=this._verifySelector(a);if(W("Alternative verification:",o.valid?"PASS":"FAIL","| Matches:",o.count),!o.valid)if(o.count>1&&s){const h=`${s.toLowerCase()}${a.startsWith("[")?a:" "+a}`;if(this._verifySelector(h).valid)a=h,W("Made unique by adding tag:",a);else return W("Alternative selector not unique, rejecting"),null}else return W("Alternative selector not unique, rejecting"),null;const c={selector:a,container:null,elements:o.elements,strategy:"alternative",description:`Alternative selector for dynamic ID: ${t} -> ${a}`,containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0};return jh({"Original (unstable)":t,"Alternative (stable)":a,Strategy:"alternative",Reason:"Dynamic ID without container"}),c}_tryLinkSelector(e,t){W("_tryLinkSelector checking:",e.tagName);const s=this._findLinkElement(e);if(!s)return W("No link element found"),null;W("Found link element:",s.tagName,"href:",s.getAttribute("href"));let a=null;const o=s.getAttribute("href");if(o&&this._isStableHref(o)){const h=`a[href=${this._quoteCSSAttributeValue(o)}]`,f=this._verifySelector(h);f.valid?(a=h,W("Strategy 7: href selector ->",a)):W("Strategy 7: href not unique, matches:",f.count)}if(!a){const h=this._getAccessibleName(s);if(h&&h.length>=2&&h.length<=50){const f=`internal:role=link[name=${this._quoteCSSAttributeValue(h)}i]`,y=this._verifySelector(f);if(y.valid)a=f,W("Strategy 8: role=link with name ->",a);else if(W("Strategy 8: role=link not unique, matches:",y.count),y.count>1){const m=`internal:role=link[name=${this._quoteCSSAttributeValue(h)}]`;this._verifySelector(m).valid&&(a=m,W("Strategy 8b: role=link with exact name ->",a))}}}if(!a)return W("No suitable link selector found"),null;const c=this._verifySelector(a),d={selector:a,container:null,elements:c.elements,strategy:"alternative",description:`Link selector: ${t} -> ${a}`,containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0};return jh({Original:t,"Link selector":a,Strategy:"link-based (7/8)",Element:s.tagName}),d}_findLinkElement(e){let t=e,s=0;const a=3;for(;t&&s<=a;){if(t.tagName==="A")return t;t.getAttribute("role"),t=t.parentElement,s++}return null}_isStableHref(e){return!(!e||e==="#"||e.startsWith("javascript:")||this._isDynamic(e)||/[a-f0-9]{32,}/i.test(e)||/\/\d{6,}(\/|$)/.test(e))}_getAccessibleName(e){var o,c;const t=e.getAttribute("aria-label");if(t&&t.trim())return t.trim();const s=e.getAttribute("aria-labelledby");if(s){const d=e.ownerDocument.getElementById(s);if(d){const h=(o=d.textContent)==null?void 0:o.trim();if(h)return h}}const a=(c=e.textContent)==null?void 0:c.trim();return a&&a.length<=100?a.replace(/\s+/g," "):null}}function uf(i){return typeof CSS<"u"&&CSS.escape?CSS.escape(i):i.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Av(i){return`"${i.replace(/["\\]/g,e=>"\\"+e)}"`}function bo(i,e,t,s){return new $2(i).applyScopingHook(e,t,s)}class B2{constructor(e){this._enabled=!1,this._savedButtonRoles=new Map,this._hiddenDuplicateButtons=[],this._document=e}get enabled(){return this._enabled}toggle(){this._enabled=!this._enabled,this._enabled?this._enableNestedElementAccess():this._disableNestedElementAccess()}_enableNestedElementAccess(){this._document.querySelectorAll('[role="button"]').forEach(t=>{const s=t.getAttribute("role");t.children.length>0&&s&&(this._savedButtonRoles.set(t,s),t.removeAttribute("role"),t.querySelectorAll("button").forEach(o=>{this._createDuplicateButton(o,t)}))})}_disableNestedElementAccess(){this._savedButtonRoles.forEach((e,t)=>{t.setAttribute("role",e)}),this._savedButtonRoles.clear(),this._hiddenDuplicateButtons.forEach(e=>{e.remove()}),this._hiddenDuplicateButtons=[]}_createDuplicateButton(e,t){var d;const s=e.getAttribute("aria-label"),a=(d=e.textContent)==null?void 0:d.trim();if(!(s||a))return;const c=this._document.createElement("button");c.textContent=(a||"")+" dup",s&&c.setAttribute("aria-label",s+" dup"),c.style.cssText="position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; pointer-events: none !important;",c.setAttribute("tabindex","-1"),c.setAttribute("data-pw-nested-button-duplicate","true"),c.disabled=!0,t.appendChild(c),this._hiddenDuplicateButtons.push(c)}handleNestedClick(e,t,s,a){let o=null;if(t.elements&&t.elements.length>0&&(o=t.elements[0]),!(o&&e!==o&&o.contains(e)))return this._isInsideButtonWrapperWithNativeInput(e)?{targetSelector:t.selector,shouldAutoDisable:!0}:null;const d=o.getAttribute("role");if(d!=="checkbox"&&d!=="radio"&&!this._isInsideButtonWrapperWithNativeInput(o))return null;const h=s.generateSelector(e,{testIdAttributeName:a});let f;if(h.selector===t.selector){const y=this._buildChildSelector(e,o,a);if(!y)return null;f=`${t.selector} >> ${y}`}else{const y=t.selector,m=h.selector;y&&m&&!m.startsWith(y)&&!m.includes(">>")?f=`${y} >> ${m}`:f=m}return{targetSelector:f,shouldAutoDisable:!0}}_buildChildSelector(e,t,s){const a=d=>d.tagName.toLowerCase()==="svg",o=d=>{const h=d.tagName.toLowerCase();return h==="path"||h==="g"||h==="circle"||h==="rect"||h==="polygon"||h==="line"||h==="polyline"||h==="ellipse"};let c=e;if(o(e)){let d=e.parentElement;for(;d&&d!==t;){if(a(d)&&d.classList.length>0&&Array.from(d.classList).some(f=>f.includes("chevron")||f.includes("icon")||f.includes("expandable"))){c=d;break}if(!a(d)&&!o(d)&&d.classList.length>0){c=d;break}d=d.parentElement}}else if(a(e)&&e.classList.length===0){let d=e.parentElement;for(;d&&d!==t;){if(d.classList.length>0){c=d;break}d=d.parentElement}}if(c.hasAttribute(s)){const d=c.getAttribute(s)||"";return`[${s}=${Av(d)}]`}if(c.classList.length>0){const d=Array.from(c.classList),h=d.filter(f=>f.includes("expand")||f.includes("chevron")||f.includes("badge")||f.includes("checkmark")||f.includes("heading")||f.includes("status")||f.includes("icon")||f.includes("button")||f.includes("title"));if(h.length>0){const f=h.find(y=>y.includes("chevron")||y.includes("checkmark")||y.includes("badge"))||h[0];return"."+uf(f)}else if(d.length>0)return"."+uf(d[0])}return c.tagName.toLowerCase()}_isInsideButtonWrapperWithNativeInput(e){let t=e;for(;t;){if(this._savedButtonRoles.has(t))return!!t.querySelector('input[type="checkbox"], input[type="radio"]');t=t.parentElement}return!1}cleanup(){this._enabled&&(this._disableNestedElementAccess(),this._enabled=!1)}}class Rr{constructor(e){this._pdfDoc=null,this._canvasElements=[],this._thumbnailElements=[],this._isRendering=!1,this._toolbar=null,this._sidebar=null,this._mainContent=null,this._currentPage=1,this._pageDisplay=null,this._zoomDisplay=null,this._currentZoom=1,this._rotation=0,this._pdfDataUrl="",this._filename="Document.pdf",this._moreMenuElement=null,this._moreMenuCleanup=null,this._twoPageView=!1,this._annotationsVisible=!0,this._container=e}static async loadPdfJs(){if(window.pdfjsLib)return;console.log("[PDF.js] Loading PDF.js library from CDN...");const e=document.createElement("script");return e.src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js",new Promise((t,s)=>{e.onload=()=>{if(!window.pdfjsLib){s(new Error("PDF.js loaded but pdfjsLib not available"));return}window.pdfjsLib.GlobalWorkerOptions.workerSrc="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js",console.log("[PDF.js] ✅ PDF.js library loaded successfully"),t()},e.onerror=()=>s(new Error("Failed to load PDF.js from CDN")),document.head.appendChild(e)})}async renderPdf(e){const{pdfDataUrl:t,filename:s,onReady:a,onError:o}=e;try{this._pdfDataUrl=t,this._filename=s||"Document.pdf",await Rr.loadPdfJs(),console.log("[PDF.js] Rendering PDF..."),this._isRendering=!0;const c=window.pdfjsLib.getDocument(t);this._pdfDoc=await c.promise,console.log(`[PDF.js] PDF loaded: ${this._pdfDoc.numPages} pages`),document.documentElement&&(document.documentElement.style.height="auto"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.width="100%",document.body.style.height="auto",document.body.style.overflow="auto"),this._container.innerHTML="",this._canvasElements=[],this._thumbnailElements=[],this._container.style.cssText=`
|
|
135
|
+
`}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-layers"},children:[{tagName:"path",attrs:{d:"M8 2L2 5v1l6 3 6-3V5L8 2zm0 1.18L11.82 5 8 6.82 4.18 5 8 3.18zM2 7.13V8l6 3 6-3v-.87L8 10.2 2 7.13zM2 10.13V11l6 3 6-3v-.87L8 13.2 2 10.13z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-list-tree"},children:[{tagName:"path",attrs:{d:"M2 3.5C2 3.22386 2.22386 3 2.5 3H13.5C13.7761 3 14 3.22386 14 3.5C14 3.77614 13.7761 4 13.5 4H6V6H13.5C13.7761 6 14 6.22386 14 6.5C14 6.77614 13.7761 7 13.5 7H6V9H13.5C13.7761 9 14 9.22386 14 9.5C14 9.77614 13.7761 10 13.5 10H6V12H13.5C13.7761 12 14 12.2239 14 12.5C14 12.7761 13.7761 13 13.5 13H5.5C5.22386 13 5 12.7761 5 12.5V4H2.5C2.22386 4 2 3.77614 2 3.5Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-brackets"},children:[{tagName:"path",attrs:{d:"M4.5 2H2v12h2.5v-1H3V3h1.5V2zm7 0H14v12h-2.5v-1H13V3h-1.5V2zM6 5h4v1H6V5zm0 3h4v1H6V8zm0 3h4v1H6v-1z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-braces"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3 3.5C3 2.67 3.67 2 4.5 2H5v1h-.5c-.28 0-.5.22-.5.5v3c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5v3c0 .28.22.5.5.5H5v1h-.5C3.67 14 3 13.33 3 12.5v-3c0-.28-.22-.5-.5-.5H2V8h.5c.28 0 .5-.22.5-.5v-3zm10 0C13 2.67 12.33 2 11.5 2H11v1h.5c.28 0 .5.22.5.5v3c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5v3c0 .28-.22.5-.5.5H11v1h.5c.83 0 1.5-.67 1.5-1.5v-3c0-.28.22-.5.5-.5H14V8h-.5c-.28 0-.5-.22-.5-.5v-3z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-braces-dashes"},children:[{tagName:"path",attrs:{d:"M3 3.5C3 2.67 3.67 2 4.5 2H5v1h-.5c-.28 0-.5.22-.5.5v3c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5v3c0 .28.22.5.5.5H5v1h-.5C3.67 14 3 13.33 3 12.5v-3c0-.28-.22-.5-.5-.5H2V8h.5c.28 0 .5-.22.5-.5v-3zm10 0C13 2.67 12.33 2 11.5 2H11v1h.5c.28 0 .5.22.5.5v3c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5v3c0 .28-.22.5-.5.5H11v1h.5c.83 0 1.5-.67 1.5-1.5v-3c0-.28.22-.5.5-.5H14V8h-.5c-.28 0-.5-.22-.5-.5v-3zM6 5h4v1H6V5zm0 3h4v1H6V8zm0 3h4v1H6v-1z"}}]},{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"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-snapshot"},children:[{tagName:"path",attrs:{d:"M2 1.5l.5-.5h7.72l.35.14 3.28 3.3.15.36v9.7l-.5.5h-11l-.5-.5v-13zm1 .5v12h10V6H9.5L9 5.5V2H3zm7 0v3h3l-3-3z"}},{tagName:"path",attrs:{fill:"none",stroke:"currentColor","stroke-width":"0.8",transform:"rotate(7 8 8.7)",d:"M 10 5.2 C 8 5.2, 6 5.7, 6 7.2 C 6 8.7, 7.5 8.7, 8 8.7 C 8.5 8.7, 10 8.7, 10 10.2 C 10 11.7, 8 12.2, 6 12.2"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-move"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.5 2.5V5.5H7.5V2.5L6.20711 3.79289L5.5 3.08579L8 0.585786L10.5 3.08579L9.79289 3.79289L8.5 2.5ZM7.5 10.5V13.5L6.20711 12.2071L5.5 12.9142L8 15.4142L10.5 12.9142L9.79289 12.2071L8.5 13.5V10.5H7.5ZM10.5 8.5H13.5L12.2071 9.79289L12.9142 10.5L15.4142 8L12.9142 5.5L12.2071 6.20711L13.5 7.5H10.5V8.5ZM5.5 7.5H2.5L3.79289 6.20711L3.08579 5.5L0.585786 8L3.08579 10.5L3.79289 9.79289L2.5 8.5H5.5V7.5Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-selection"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 1H3V2H2V3H1V1ZM4 1H6V2H4V1ZM7 1H9V2H7V1ZM10 1H12V2H10V1ZM13 1H15V3H14V2H13V1ZM14 4H15V6H14V4ZM14 7H15V9H14V7ZM14 10H15V12H14V10ZM13 13V14H14V15H13H12V14H13V13H14V12H15V13V15H13ZM10 14H12V15H10V14ZM7 14H9V15H7V14ZM4 14H6V15H4V14ZM1 13H2V14H3V15H1V13ZM1 10H2V12H1V10ZM1 7H2V9H1V7ZM1 4H2V6H1V4Z"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-table"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd",d:"M2 3h12v10H2V3zm1 1v8h10V4H3z"}},{tagName:"rect",attrs:{x:"2",y:"6.33",width:"12",height:"1"}},{tagName:"rect",attrs:{x:"2",y:"9.67",width:"12",height:"1"}},{tagName:"rect",attrs:{x:"5.67",y:"3",width:"1",height:"10"}},{tagName:"rect",attrs:{x:"9.33",y:"3",width:"1",height:"10"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-file-upload"},children:[{tagName:"path",attrs:{d:"M14.5 3H7.71l-.85-.85L6.51 2h-5l-.5.5v11l.5.5h13l.5-.5v-10L14.5 3zm-.51 8.49V13h-12V7h4.49l.35-.15.86-.86H14v1.5l.001 4zm0-6.49h-6.5l-.35.15-.86.86H2v-3h4.29l.85.85.36.15H14l-.01.99z"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 16 16",fill:"currentColor",id:"icon-eraser"},children:[{tagName:"path",attrs:{d:"M 13.54 2.70 L 11.30 0.46 C 10.68 -0.15 9.68 -0.15 9.06 0.46 L 3.34 6.18 L 1.46 8.07 C 0.85 8.68 0.85 9.68 1.46 10.30 L 3.70 12.54 C 4.01 12.84 4.41 13 4.82 13 C 5.22 13 5.63 12.84 5.93 12.54 L 7.82 10.66 L 8.26 10.21 L 13.54 4.93 C 13.84 4.64 14 4.24 14 3.82 C 14 3.39 13.84 3.00 13.54 2.70 Z M 7.37 10.21 L 5.49 12.09 C 5.12 12.46 4.51 12.46 4.15 12.09 L 1.91 9.85 C 1.54 9.48 1.54 8.88 1.91 8.51 L 3.79 6.63 L 7.37 10.21 Z M 13.09 4.49 L 7.82 9.76 L 6.03 7.97 L 4.24 6.18 L 9.51 0.91 C 9.88 0.54 10.48 0.54 10.85 0.91 L 13.09 3.15 C 13.27 3.33 13.37 3.56 13.37 3.82 C 13.37 4.07 13.27 4.31 13.09 4.49 Z"}},{tagName:"rect",attrs:{x:"1",y:"13.2",width:"12",height:"1.6"}}]},{tagName:"clipPath",attrs:{viewBox:"0 0 100 100",fill:"currentColor",id:"icon-sketch-tool"},children:[{tagName:"path",attrs:{d:"m37.68 70.594c-0.36328 0.75781-0.66406 1.5508-0.89063 2.3594-0.41406 1.4727-0.58984 3.0195-0.51562 4.5742 0.042968 0.95312-0.58984 1.7852-1.4766 2.0195l-21.281 5.707c-1.0664 0.28516-2.1602-0.34766-2.4453-1.4141-0.09375-0.35156-0.085937-0.70703 0-1.0312l5.7031-21.285c0.25781-0.96094 1.1719-1.5703 2.1289-1.4727 1.5195 0.0625 3.0273-0.11719 4.4688-0.51953 0.80859-0.22656 1.5977-0.52734 2.3594-0.89453-0.64453-0.78516-0.60156-1.9453 0.13281-2.6797l3.7227-3.7227c0.70703-0.70703 1.8086-0.77344 2.5898-0.20312l35.953-35.953c-0.57031-0.78125-0.50391-1.8828 0.20312-2.5898l3.7227-3.7227c0.70703-0.70703 1.8086-0.77344 2.5898-0.20312l6.5039-6.5039c0.78125-0.78125 2.0469-0.78125 2.8281 0l9.2891 9.2891c0.78125 0.78125 0.78125 2.0469 0 2.8281l-6.5039 6.5039c0.57031 0.78125 0.5 1.8828-0.20312 2.5859l-0.49219 0.49219 2.875 2.875c0.78125 0.78125 0.78125 2.0469 0 2.8281l-16.711 16.711c-0.78125 0.78125-2.0469 0.78125-2.8281 0s-0.78125-2.0469 0-2.8281l15.297-15.297-1.4609-1.4609-0.40234 0.40234c-0.70703 0.70703-1.8047 0.77344-2.5859 0.20312l-35.953 35.953c0.56641 0.78125 0.5 1.8828-0.20312 2.5859l-3.7227 3.7227c-0.73438 0.73438-1.8945 0.77734-2.6797 0.13281zm-9.0078-8.9961c-1.3281 0.76562-2.75 1.3594-4.2266 1.7734-1.3711 0.37891-2.7812 0.60547-4.2109 0.66406l-3.375 12.598 5.2109-5.2109c-0.18359-0.51562-0.27734-1.0547-0.27734-1.5938 0-1.1992 0.46094-2.4023 1.3789-3.3203 0.91406-0.91406 2.1211-1.375 3.3203-1.375 1.1953 0 2.3945 0.46094 3.3125 1.375 0.92187 0.92578 1.3828 2.1289 1.3828 3.3203 0 1.1406-0.41797 2.2852-1.25 3.1836-0.88672 0.96875-2.1328 1.5117-3.4453 1.5117-0.53906 0-1.0742-0.09375-1.5898-0.28125l-5.2148 5.2148 12.598-3.375c0.058594-1.4336 0.28516-2.8477 0.66406-4.2109 0.41406-1.4766 1.0078-2.8984 1.7734-4.2266l-6.0508-6.0508zm11.168 3.7227-8.8438-8.8438-0.89453 0.89453 8.8438 8.8438zm37.645-52.945 6.4609 6.4609 5.0742-5.0742-6.4609-6.4609zm-0.089844 13.012-6.4609-6.4609-35.871 35.871 6.4609 6.4609zm4.6367-2.8086-8.293-8.293c-0.12109-0.054687-0.23828-0.125-0.34766-0.20312l-0.82422 0.82422 8.8438 8.8438 0.82031-0.82031c-0.082031-0.10938-0.14844-0.23047-0.20312-0.35156zm-75.164 68.324c-0.83984-0.71094-0.94531-1.9727-0.23438-2.8125 0.71094-0.83984 1.9727-0.94531 2.8125-0.23438 11.77 10.004 24.934 4.5469 38.125-0.91797 14.867-6.1602 29.77-12.34 43.941 0.98828 0.80078 0.75391 0.83984 2.0195 0.085937 2.8203-0.75391 0.80078-2.0195 0.83984-2.8203 0.085937-12.289-11.559-26-5.875-39.676-0.20703-14.32 5.9336-28.609 11.855-42.234 0.27734zm19.625-20.375c0.23437 0 0.37891-0.09375 0.53906-0.24609 0.10156-0.125 0.15625-0.28516 0.15625-0.44922 0-0.18359-0.066406-0.36328-0.19922-0.49609-0.13281-0.13281-0.3125-0.19922-0.49609-0.19922-0.17969 0-0.35938 0.070312-0.49219 0.20312-0.13281 0.13281-0.20312 0.31641-0.20312 0.49219 0 0.17969 0.070313 0.35938 0.20312 0.49219 0.13281 0.13672 0.30078 0.20312 0.49219 0.20312z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gojs-link"},children:[{tagName:"path",attrs:{d:"M 0.75 3.5 A 1.75 1.75 0 1 0 4.25 3.5 A 1.75 1.75 0 1 0 0.75 3.5 Z"}},{tagName:"path",attrs:{d:"M 4.25 2.75 L 9.5 2.75 L 9.5 11.75 L 13 11.75 L 13 13.25 L 8 13.25 L 8 4.25 L 4.25 4.25 Z"}},{tagName:"path",attrs:{d:"M 13 11 L 15.5 12.5 L 13 14 Z"}}]}]}]},Ev="[Scoping]";function Bc(){try{if(typeof window<"u"&&window.__SKYRAMP_DEBUG__||typeof localStorage<"u"&&localStorage.getItem("SKYRAMP_DEBUG")==="true")return!0}catch{}return!1}function W(...i){Bc()&&console.log(Ev,...i)}function zC(i){Bc()&&console.group(`${Ev} ${i}`)}function Dn(){Bc()&&console.groupEnd()}function jh(i){Bc()&&console.table(i)}const $C=[/card/i,/item/i,/tile/i,/cell/i,/row(?!s)/i,/entry/i,/result/i,/post/i,/product/i,/option/i],BC=[/^col-/i,/^row$/i,/^container/i,/^px-/i,/^py-/i,/^mx-/i,/^my-/i,/^m-/i,/^p-/i,/^d-/i,/^flex/i,/^grid$/i,/^text-/i,/^bg-/i,/^border/i,/^rounded/i,/^shadow/i,/^w-/i,/^h-/i,/^css-/i,/^styled-/i,/^sc-/i,/^emotion-/i,/^MuiGrid/i,/^MuiBox/i,/--[a-f0-9]{16,}$/i,/__[a-f0-9]{16,}$/i,/_[a-f0-9]{16,}$/i,/^app-[a-z0-9]+$/i,/^e[a-z0-9]{6,}\d+$/i];class IC{constructor(e){this._injectedScript=e,W("ScopingHandler initialized (with CSS class pattern support)")}applyScopingHook(e,t,s){zC(`Analyzing: ${t}`);const a=this._needsScoping(e,t,s);if(W("Needs scoping:",a.needed,"| Reason:",a.reason),!a.needed){const v=this._tryStableIdSelector(e,t);return v?(W("Preferring stable ID selector:",v.selector),Dn(),v):(Dn(),null)}const o=this._tryStableIdSelector(e,t);if(o)return W("Using stable ID selector:",o.selector),Dn(),o;const c=this._tryLinkSelector(e,t);if(c)return W("Using link selector:",c.selector),Dn(),c;const d=this._findContainer(e);if(!d){if(W("No container found"),this._hasDynamicSelector(t)){const v=this._generateAlternativeSelector(e,t);if(v)return W("Using alternative selector:",v.selector),Dn(),v}return Dn(),null}W("Container:",d.selector);const h=this._getContainerIndex(d.element,d.selector);if(h===null)return W("Cannot determine container index"),Dn(),null;W("Container index:",h);const f=this._generateRelativeSelector(d.element,e);if(!f)return W("No relative selector found"),Dn(),null;W("Relative selector:",f);const y=this._isFormContainer(d.selector);let m,_=!1;if(y)m=`${d.selector} >> ${f}`,W("Using form container selector (no nth):",m);else{const v=this._getRowHasFilter(d.element,d.selector);if(v)m=`${d.selector} >> internal:has=${v} >> ${f}`,_=!0,W("Using has-filter selector:",m);else{const T=this._getTextFilterForContainer(d.element,d.selector);T?(m=`${d.selector} >> internal:has-text="${this._escapeTextFilter(T)}"i >> ${f}`,_=!0,W("Using text-filtered selector:",m)):(m=`${d.selector} >> nth=${h} >> ${f}`,W("Using nth-based selector:",m))}}const b=this._verifySelector(m);if(W("Verification:",b.valid?"PASS":"FAIL","| Matches:",b.count),!b.valid)if(y&&b.count>=1)W("Form container verification relaxed - using selector despite multiple matches");else return W("Verification failed, using original"),Dn(),null;const w={selector:m,container:d.element,elements:b.elements,strategy:"nth",description:y?`${d.selector} >> ${f}`:`${d.selector}.nth(${h}) >> ${f}`,containerSelector:d.selector,containerIndex:h,relativeSelector:f,isFormContainer:y,usesTextFilter:_};return jh({Original:t,Scoped:m,Container:d.selector,Index:h,Relative:f}),Dn(),w}_needsScoping(e,t,s){if(W("Input match set:",{selector:t,count:s.length}),s.length>1)return{needed:!0,reason:`Non-unique: ${s.length} elements`};if(this._hasDynamicSelector(t))return{needed:!0,reason:"Dynamic selector needs replacement"};const a=this._hasStateDependentName(e,t);if(a.isStateDependent)return{needed:!0,reason:a.reason};const o=["gridcell","row","listitem","option","treeitem","menuitem","cell"],c=e.getAttribute("role");if(c&&o.includes(c)){const h=this._findRepeatingContainer(e);if(h)return{needed:!0,reason:`Repeating role "${c}" inside container: ${h.selector}`}}const d=e.tagName==="TD"?e:e.closest("td");if(d){const h=d.closest("tr");if(h){const f=h.parentElement;if(f&&(f.tagName==="TBODY"||f.tagName==="TABLE")){const y=f.querySelectorAll(":scope > tr");if(y.length>1)return{needed:!0,reason:`Element inside <td> in <tr> with ${y.length} sibling rows`}}}}return{needed:!1,reason:"Selector is unique and not in repeating context"}}_isDynamicId(e){if(/^react-aria\d+/.test(e)||/^mui-\d+/.test(e)||/^(mat|cdk)-[a-z]+-\d+$/.test(e)||/[-_]\d+$/.test(e)||/\d{2,}[_-][a-zA-Z]/.test(e)||/^\d+$/.test(e)||/\d{4,}$/.test(e)||/[-_][0-9a-f]{6,}$/i.test(e))return!0;const t=e.match(/[-_]([0-9a-f]{3,5})$/i);return!!(t&&/[0-9]/.test(t[1])||/[a-zA-Z][0-9]{3,}$/.test(e)||e.includes(":")||/^.+__search_[a-zA-Z0-9]{4,}$/.test(e))}_tryStableIdSelector(e,t){const s=e.id;if(!s||!t.startsWith("internal:role="))return null;if(this._isDynamicId(s))return W("Skipping dynamic ID:",s),null;const a=`#${CSS.escape(s)}`,o=this._verifySelector(a);return!o.valid||o.count!==1?(W("ID selector not unique:",a,"matches:",o.count),null):{selector:a,container:null,elements:o.elements,strategy:"alternative",description:"Stable ID preferred over role selector",containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0}}_hasDynamicSelector(e){if(W("_hasDynamicSelector checking:",e),/react-aria\d+/.test(e))return W("MATCHED: React-Aria dynamic ID"),!0;if(/__search_[a-zA-Z0-9]{4,}/.test(e))return W("MATCHED: Vue Tables dynamic search ID"),!0;if(/#[a-zA-Z_-]*\d+/.test(e))return W("MATCHED: Dynamic ID with numeric suffix (CSS)"),!0;if(/internal:attr=\[id="[a-zA-Z_-]*\d+"\]/.test(e))return W("MATCHED: Dynamic ID with numeric suffix (internal:attr)"),!0;if(/\[id="[a-zA-Z_-]*\d+"\]/.test(e))return W("MATCHED: Dynamic ID with numeric suffix (attribute selector)"),!0;if(/\[id="[^"]*\d{2,}[_-][a-zA-Z][^"]*"\]/.test(e))return W("MATCHED: Dynamic ID with mid-string counter (attribute selector)"),!0;if(/internal:attr=\[id="[^"]*\d{2,}[_-][a-zA-Z][^"]*"\]/.test(e))return W("MATCHED: Dynamic ID with mid-string counter (internal:attr)"),!0;if(/\.(app-[a-z0-9]+|e[a-z0-9]{6,}[0-9]+)/.test(e))return W("MATCHED: CSS-in-JS generated class (Emotion)"),!0;const t=(e.match(/>/g)||[]).length;return t>=4?(W("MATCHED: Long CSS path with",t,"child combinators"),!0):/:nth-child\(\d+\)/.test(e)?(W("MATCHED: Contains :nth-child() pattern"),!0):/\[data-testid="[^"]*[-_]\d+"\]/.test(e)||/\[data-test-id="[^"]*[-_]\d+"\]/.test(e)?(W("MATCHED: TestId with numeric suffix (attribute selector)"),!0):/getByTestId\(['"][^'"]*[-_]\d+['"]\)/.test(e)?(W("MATCHED: TestId with numeric suffix (getByTestId)"),!0):/internal:testid=.*[-_]\d+/.test(e)?(W("MATCHED: TestId with numeric suffix (internal:testid)"),!0):/\[name="\d+"[is]?\]/.test(e)||/internal:text="\d+"[is]?/.test(e)?(W("MATCHED: All-numeric text content in selector"),!0):/\[name="[^"]*\d{8,}[^"]*"/.test(e)||/internal:text="[^"]*\d{8,}[^"]*"/.test(e)?(W("MATCHED: Long digit sequence in text content (timestamp/generated)"),!0):/(?:\[name|internal:text)="\/?\d{1,2}\/\d{1,2}"/.test(e)?(W("MATCHED: Partial date pattern in text content"),!0):(W("No dynamic patterns found"),!1)}_hasStateDependentName(e,t){const s=t.match(/internal:role=(\w+)\[name=["'](.+?)["'][is]?\]/);if(!s)return{isStateDependent:!1,reason:"Not a role selector with name"};const a=s[1],o=s[2];if(!o||o.length<3)return{isStateDependent:!1,reason:"Name too short"};W("Checking state-dependent name:",{role:a,name:o});const c=this._getSiblingAccessibleNames(e,a);if(c.length===0)return W("No siblings found for state check"),{isStateDependent:!1,reason:"No siblings with same role"};W("Sibling names:",c);for(const d of c)if(d.length>=3&&o.length>d.length&&o.toLowerCase().includes(d.toLowerCase()))return W("State-dependent name detected:",o,"contains",d),{isStateDependent:!0,reason:`Name "${o}" contains sibling name "${d}" - likely hover-dependent`};return{isStateDependent:!1,reason:"Name is unique among siblings"}}_getSiblingAccessibleNames(e,t){const s=[],a=new Set;try{const o=["ul","ol","nav",'[role="list"]','[role="navigation"]','[role="menu"]','[role="tablist"]','[role="grid"]','[role="row"]'];let c=e.parentElement,d=e.ownerDocument.body,h=0;for(;c&&h<5;){const m=c.tagName.toLowerCase(),_=c.getAttribute("role");if(o.some(b=>{var w;if(b.startsWith("[role=")){const v=(w=b.match(/\[role="(.+)"\]/))==null?void 0:w[1];return _===v}return m===b})){d=c;break}c=c.parentElement,h++}W("Sibling search scope:",d.tagName,d.className);const f=`[role="${t}"]`,y=d.querySelectorAll(f);for(const m of y){if(m===e)continue;const _=this._getAccessibleName(m);_&&_.length>=2&&!a.has(_.toLowerCase())&&(a.add(_.toLowerCase()),s.push(_))}}catch(o){W("Error getting sibling names:",o)}return s}_findRepeatingContainer(e){const t=[/^grid[-_]?view[-_]?item$/i,/^gridcell$/i,/^list[-_]?item$/i,/^row[-_]?item$/i,/^item$/i,/^card$/i,/^tile$/i],s=[/^gridview$/i,/^grid[-_]?view$/i,/^listview$/i,/^list[-_]?view$/i,/^container$/i,/^wrapper$/i,/^content$/i,/^main$/i];let a=e.parentElement;for(;a&&a!==e.ownerDocument.body;){const o=this._getTestId(a);if(o&&!s.some(f=>f.test(o))&&t.some(f=>f.test(o))){const f=this._buildTestIdSelector(a,o);if(a.ownerDocument.querySelectorAll(f).length>1)return{element:a,selector:f}}const c=a.getAttribute("role");if(c&&["row","gridcell","listitem","option","treeitem","menuitem"].includes(c)){const f=`[role=${this._quoteCSSAttributeValue(c)}]`;if(a.ownerDocument.querySelectorAll(f).length>1)return{element:a,selector:f}}const d=this._getComponentName(a);if(d&&this._isRepeatingComponentName(d.name)){const f=`[${d.attr}=${this._quoteCSSAttributeValue(d.name)}]`;try{const y=a.ownerDocument.querySelectorAll(f);if(y.length>1&&y.length<100)return W("Found component container:",d.name,"via",d.attr,"with",y.length,"siblings"),{element:a,selector:f}}catch{}}const h=this._findRepeatingContainerByClass(a);if(h)return h;a=a.parentElement}return null}_findRepeatingContainerByClass(e){const t=Array.from(e.classList);for(const s of t)if(!BC.some(a=>a.test(s))&&$C.some(a=>a.test(s))){const a=`.${this._escapeCSS(s)}`;try{const o=e.ownerDocument.querySelectorAll(a);if(o.length>1&&o.length<100){const c=e.tagName.toLowerCase();return W("Found CSS class container:",s,"with",o.length,"siblings, using tag:",c),{element:e,selector:c}}}catch{continue}}return null}_escapeCSS(e){return uf(e)}_quoteCSSAttributeValue(e){return Av(e)}_getTestId(e){return e.getAttribute("data-testid")||e.getAttribute("data-test-id")}_buildTestIdSelector(e,t){return e.getAttribute("data-testid")===t?`[data-testid=${this._quoteCSSAttributeValue(t)}]`:`[data-test-id=${this._quoteCSSAttributeValue(t)}]`}_getComponentName(e){const t=["data-component","data-sentry-component","data-react-component"];for(const s of t){const a=e.getAttribute(s);if(a)return{name:a,attr:s}}return null}_isRepeatingComponentName(e){return[/Card$/i,/Item$/i,/Link$/i,/Row$/i,/Tile$/i,/Option$/i,/Entry$/i].some(s=>s.test(e))}_findContainer(e){const t=[/^grid[-_]?view[-_]?item$/i,/^gridcell$/i,/^list[-_]?item$/i,/^row[-_]?item$/i,/^item$/i,/^card$/i,/^tile$/i],s=[/[-_]input$/i,/[-_]field$/i,/[-_]btn$/i,/[-_]button$/i,/[-_]control$/i,/^input[-_]/i,/^field[-_]/i],a=[/^gridview$/i,/^grid[-_]?view$/i,/^listview$/i,/^list[-_]?view$/i,/^container$/i,/^wrapper$/i,/^content$/i,/^main$/i];let o=e.parentElement,c=null,d=null;for(;o&&o!==e.ownerDocument.body;){const h=this._getTestId(o);if(h){if(a.some(_=>_.test(h))){o=o.parentElement;continue}const m=this._isDynamic(h);if(!m&&t.some(_=>_.test(h)))return{element:o,selector:this._buildTestIdSelector(o,h)};if(!m&&s.some(_=>_.test(h)))return W("Found form container by testid pattern:",h),{element:o,selector:this._buildTestIdSelector(o,h)};!c&&!m&&(c={element:o,selector:this._buildTestIdSelector(o,h)})}const f=o.getAttribute("role");if(f&&["row","gridcell","listitem","option","treeitem","menuitem"].includes(f)&&(c||(c={element:o,selector:`[role=${this._quoteCSSAttributeValue(f)}]`})),o.tagName==="TR"){const m=o.parentElement;m&&(m.tagName==="TBODY"||m.tagName==="TABLE")&&m.querySelectorAll(":scope > tr").length>1&&!c&&(c={element:o,selector:"tr"})}const y=this._getComponentName(o);if(y&&this._isRepeatingComponentName(y.name)){const m=`[${y.attr}=${this._quoteCSSAttributeValue(y.name)}]`;try{const _=o.ownerDocument.querySelectorAll(m);if(_.length>1&&_.length<100)return W("Found component container:",y.name,"via",y.attr,"with",_.length,"siblings"),{element:o,selector:m}}catch{}}if(!d){const m=this._findRepeatingContainerByClass(o);m&&(d=m)}o=o.parentElement}return c||d}_isFormContainer(e){const s=[/-input"\]$/i,/-field"\]$/i,/-btn"\]$/i,/-button"\]$/i,/-control"\]$/i,/\[data-test-?id="input-/i,/\[data-test-?id="field-/i].some(a=>a.test(e));return W("_isFormContainer:",e,"=",s),s}_getContainerIndex(e,t){try{const s=e.ownerDocument.querySelectorAll(t),a=Array.from(s).indexOf(e);return a!==-1?a:null}catch{return null}}_getTextFilterForContainer(e,t){var d;const s=e.getAttribute("role");let a=null;if(s==="row"||e.tagName==="TR"||e.classList.contains("a-data-table__row")?a=this._getRowIdentifyingText(e):a=this._getContainerIdentifyingText(e),!a)return W("Text filter: No identifying text found"),null;const o=e.ownerDocument.querySelectorAll(t);let c=0;for(const h of o)(d=h.textContent)!=null&&d.includes(a)&&c++;return c===1?(W("Text filter: Found unique text:",a),a):(W("Text filter: Text not unique, found in",c,"containers"),null)}_getContainerIdentifyingText(e){var d;const t=this._getDirectTextContent(e);if(t&&t.length>=2&&t.length<=100&&!this._isGenericText(t))return t;const s=e.getAttribute("aria-label");if(s&&s.length>=2&&s.length<=100&&!this._isGenericText(s))return s;const a=e.querySelectorAll("span, div, p, h1, h2, h3, h4, h5, h6");for(const h of a){const f=this._getDirectTextContent(h);if(f&&f.length>=2&&f.length<=100&&!this._isGenericText(f))return f}const o=e.querySelector("[aria-label]");if(o){const h=o.getAttribute("aria-label");if(h&&h.length>=2&&h.length<=100&&!this._isGenericText(h))return h}const c=(d=e.textContent)==null?void 0:d.trim();return c&&c.length>=2&&c.length<=100&&!this._isGenericText(c)?c:null}_getRowIdentifyingText(e){var o;const t=(c,d)=>!(!c||c.length<2||c.length>100||this._isGenericText(c)||!d&&this._isDynamic(c));for(const c of[!1,!0]){for(const d of e.querySelectorAll("a")){const h=(o=d.textContent)==null?void 0:o.trim();if(t(h,c))return h}for(const d of e.querySelectorAll('[role="cell"], [role="gridcell"], td')){const h=this._getDirectTextContent(d);if(t(h,c))return h}}const s=e.querySelector("[data-testid], [data-test-id]");if(s){const c=this._getTestId(s);if(c&&!this._isDynamic(c)&&!/^(item|row|cell|grid)/i.test(c))return c}const a=e.querySelector('[aria-label*="menu for"], [aria-label*="actions for"]');if(a){const c=a.getAttribute("aria-label"),d=c==null?void 0:c.match(/(?:menu|actions)\s+for\s+(.+)$/i);if(d&&d[1])return d[1].trim()}return null}_getRowHasFilter(e,t){var o;if(e.getAttribute("role")!=="row"&&e.tagName!=="TR"&&!e.classList.contains("a-data-table__row"))return null;const a=e.querySelectorAll("a");for(const c of a){const d=(o=c.textContent)==null?void 0:o.trim();if(!d||d.length<2||d.length>100||this._isGenericText(d))continue;const f=`internal:role=link[name="${d.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"s]`,y=`${t} >> internal:has=${JSON.stringify(f)}`,m=this._verifySelector(y);if(m.count===1)return W("Has-filter: Found unique link text:",d),JSON.stringify(f);W("Has-filter: Link text not unique:",d,"matches:",m.count)}return null}_getDirectTextContent(e){let t="";for(const s of e.childNodes)s.nodeType===Node.TEXT_NODE&&(t+=s.textContent||"");return t.trim()}_isGenericText(e){return[/^(edit|delete|view|open|close|save|cancel|submit|ok|yes|no)$/i,/^(item|row|cell|column|header|footer)$/i,/^(loading|please wait|...)$/i,/^\d{1,5}$/,/^[\s\-_]+$/].some(s=>s.test(e))}_escapeTextFilter(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}_generateRelativeSelector(e,t){var y;if(e===t||!e.contains(t))return"";if(W("_generateRelativeSelector for:",t.tagName,t.className),["svg","path","circle","rect","line","polygon","polyline","ellipse","g","use"].includes(t.tagName.toLowerCase())){W("Target is SVG or SVG child, walking up to find clickable ancestor");const m=this._findClickableAncestor(e,t);m&&(W("Found clickable ancestor:",m.tagName,m.className),t=m)}const a=this._getTestId(t);if(a&&!this._isDynamic(a))return this._buildTestIdSelector(t,a);const o=this._getRole(t),c=t.getAttribute("aria-label");if(o&&c){const _=t.getAttribute("role")?`[role=${this._quoteCSSAttributeValue(o)}][aria-label=${this._quoteCSSAttributeValue(c)}]`:`internal:role=${o}[name=${this._quoteCSSAttributeValue(c)}i]`;try{const b=this._injectedScript.parseSelector(_),w=this._injectedScript.querySelectorAll(b,e);if(w.length===1)return W("Strategy 2: role+aria-label ->",_),_;W("Strategy 2: not unique in container, matches:",w.length)}catch{W("Strategy 2: selector parse failed for",_)}}if(o){const m=`[role=${this._quoteCSSAttributeValue(o)}]`;if(e.querySelectorAll(m).length===1)return m}if(c){const m=`[aria-label=${this._quoteCSSAttributeValue(c)}]`;if(e.querySelectorAll(m).length===1)return m}if(o==="button"||o==="link"||o==="cell"||o==="gridcell"||o==="columnheader"||o==="rowheader"){const m=this._getAccessibleName(t);if(m&&m.length>=2&&m.length<=50&&!this._isGenericText(m)&&!this._isDynamic(m)){const _=`internal:role=${o}[name=${this._quoteCSSAttributeValue(m)}i]`;try{const b=this._injectedScript.parseSelector(_),w=this._injectedScript.querySelectorAll(b,e);if(w.length===1)return W("Strategy 4b: role with accessible name ->",_),_;W("Strategy 4b: not unique in container, matches:",w.length)}catch{W("Strategy 4b: selector parse failed")}}}if(t.tagName==="INPUT"){const m=e.querySelectorAll("input");if(W("Input strategy: found",m.length,"inputs in container"),m.length===1)return W("Using input selector (single input in container)"),"input";const _=t.type||"text",b=`input[type=${this._quoteCSSAttributeValue(_)}]`;return e.querySelectorAll(b).length===1?(W("Using input[type] selector"),b):(W("Multiple inputs found, using input anyway for form container"),"input")}if(e.tagName==="TR"){const m=t.tagName==="TD"?t:t.closest("td");if(m&&e.contains(m)){const _=t!==m?t.closest("a, button, input, select, textarea"):null;if(_&&m.contains(_))W("Strategy 5b: skipping, target is inside interactive element:",_.tagName);else{const w=e.querySelectorAll(":scope > td"),v=Array.from(w).indexOf(m);if(v>=0)return W("Strategy 5b: table cell column index ->",`td >> nth=${v}`),`td >> nth=${v}`}}}const d=t.tagName.toLowerCase();if(e.querySelectorAll(d).length===1)return d;const h=Array.from(t.classList);for(const m of h){if(/^(css|styled|sc|emotion|mui)-/.test(m)||/^Mui[A-Z]/.test(m)||m.length<3)continue;const _=`.${this._escapeCSS(m)}`;if(e.querySelectorAll(_).length===1)return _}const f=(y=t.textContent)==null?void 0:y.trim();if(f&&f.length>=2&&f.length<=100){const m=f.replace(/\s+/g," ");if(!this._isGenericText(m)){const _=`internal:text="${this._escapeTextFilter(m)}"i`;try{const b=this._injectedScript.parseSelector(_),w=this._injectedScript.querySelectorAll(b,e);if(w.length===1)return W("Strategy 8: text content filter ->",_),_;W("Strategy 8: text not unique in container, matches:",w.length)}catch{W("Strategy 8: selector parse failed")}}}return""}_findClickableAncestor(e,t){let s=t.parentElement;const a=["img","presentation","none","graphics-symbol"];for(;s&&s!==e&&e.contains(s);){const o=s.getAttribute("data-testid")||s.getAttribute("data-test-id"),c=s.getAttribute("role"),d=c&&!a.includes(c),h=s.getAttribute("aria-label"),f=["BUTTON","A","INPUT","SELECT"].includes(s.tagName),y=s.hasAttribute("onclick")||s.hasAttribute("data-click");if(o||d||h&&f||f||y)return W("_findClickableAncestor found:",s.tagName,"testid:",o,"role:",c,"isClickable:",f),s;s=s.parentElement}return null}_isDynamic(e){if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/[-_][0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e))return!0;const t=e.match(/[-_]([0-9a-f]{8,})$/i);return!!(t&&/[0-9]/.test(t[1])||/^\d{6,}$/.test(e)||/^\d{10,13}$/.test(e))}_getRole(e){var o;const t=e.getAttribute("role");if(t)return t;const s=e.tagName.toLowerCase(),a={button:"button",a:"link",select:"combobox",textarea:"textbox",img:"img",tr:"row"};if(s==="input"){const c=((o=e.type)==null?void 0:o.toLowerCase())||"text";return{checkbox:"checkbox",radio:"radio",button:"button",submit:"button"}[c]||"textbox"}if(s==="td"){const c=e.closest("table"),d=c==null?void 0:c.getAttribute("role");return d==="grid"||d==="treegrid"?"gridcell":"cell"}return s==="th"?lt(e):a[s]||null}_verifySelector(e){try{const t=this._injectedScript.parseSelector(e),s=this._injectedScript.querySelectorAll(t,this._injectedScript.document);return{valid:s.length===1,count:s.length,elements:Array.from(s)}}catch{return{valid:!1,count:0,elements:[]}}}_generateAlternativeSelector(e,t){var d;W("_generateAlternativeSelector for:",e.tagName,"original:",t);const s=e.tagName.toUpperCase();let a=null;if(s==="INPUT"||s==="TEXTAREA"||s==="SELECT"){const h=e.getAttribute("name");h&&!this._isDynamic(h)&&(a=`${s.toLowerCase()}[name=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 1: name attribute ->",a))}if(!a){const h=e.getAttribute("aria-label");h&&h.length>=2&&h.length<=100&&(a=`[aria-label=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 2: aria-label ->",a))}if(!a&&(s==="INPUT"||s==="TEXTAREA")){const h=e.placeholder;h&&h.length>=2&&h.length<=100&&(a=`${s.toLowerCase()}[placeholder=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 3: placeholder ->",a))}if(!a&&s==="INPUT"){const h=e.type||"text";if(["email","password","tel","url","search","number","date","time","datetime-local","month","week","color","file"].includes(h)){const y=`input[type=${this._quoteCSSAttributeValue(h)}]`;this._verifySelector(y).valid&&(a=y,W("Alternative strategy 4: unique input type ->",a))}}if(!a&&(s==="BUTTON"||s==="INPUT"&&e.type==="submit")){const h=(d=e.textContent)==null?void 0:d.trim();h&&h.length>=2&&h.length<=50&&!this._isGenericText(h)&&(a=`internal:role=button[name=${this._quoteCSSAttributeValue(h)}i]`,W("Alternative strategy 5: button text ->",a))}if(!a){const h=e.getAttribute("title");h&&h.length>=2&&h.length<=100&&(a=`[title=${this._quoteCSSAttributeValue(h)}]`,W("Alternative strategy 6: title ->",a))}if(!a)return W("No alternative selector found"),null;const o=this._verifySelector(a);if(W("Alternative verification:",o.valid?"PASS":"FAIL","| Matches:",o.count),!o.valid)if(o.count>1&&s){const h=`${s.toLowerCase()}${a.startsWith("[")?a:" "+a}`;if(this._verifySelector(h).valid)a=h,W("Made unique by adding tag:",a);else return W("Alternative selector not unique, rejecting"),null}else return W("Alternative selector not unique, rejecting"),null;const c={selector:a,container:null,elements:o.elements,strategy:"alternative",description:`Alternative selector for dynamic ID: ${t} -> ${a}`,containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0};return jh({"Original (unstable)":t,"Alternative (stable)":a,Strategy:"alternative",Reason:"Dynamic ID without container"}),c}_tryLinkSelector(e,t){W("_tryLinkSelector checking:",e.tagName);const s=this._findLinkElement(e);if(!s)return W("No link element found"),null;W("Found link element:",s.tagName,"href:",s.getAttribute("href"));let a=null;const o=s.getAttribute("href");if(o&&this._isStableHref(o)){const h=`a[href=${this._quoteCSSAttributeValue(o)}]`,f=this._verifySelector(h);f.valid?(a=h,W("Strategy 7: href selector ->",a)):W("Strategy 7: href not unique, matches:",f.count)}if(!a){const h=this._getAccessibleName(s);if(h&&h.length>=2&&h.length<=50){const f=`internal:role=link[name=${this._quoteCSSAttributeValue(h)}i]`,y=this._verifySelector(f);if(y.valid)a=f,W("Strategy 8: role=link with name ->",a);else if(W("Strategy 8: role=link not unique, matches:",y.count),y.count>1){const m=`internal:role=link[name=${this._quoteCSSAttributeValue(h)}]`;this._verifySelector(m).valid&&(a=m,W("Strategy 8b: role=link with exact name ->",a))}}}if(!a)return W("No suitable link selector found"),null;const c=this._verifySelector(a),d={selector:a,container:null,elements:c.elements,strategy:"alternative",description:`Link selector: ${t} -> ${a}`,containerSelector:"",containerIndex:-1,relativeSelector:"",isAlternativeSelector:!0};return jh({Original:t,"Link selector":a,Strategy:"link-based (7/8)",Element:s.tagName}),d}_findLinkElement(e){let t=e,s=0;const a=3;for(;t&&s<=a;){if(t.tagName==="A")return t;t.getAttribute("role"),t=t.parentElement,s++}return null}_isStableHref(e){return!(!e||e==="#"||e.startsWith("javascript:")||this._isDynamic(e)||/[a-f0-9]{32,}/i.test(e)||/\/\d{6,}(\/|$)/.test(e))}_getAccessibleName(e){var o,c;const t=e.getAttribute("aria-label");if(t&&t.trim())return t.trim();const s=e.getAttribute("aria-labelledby");if(s){const d=e.ownerDocument.getElementById(s);if(d){const h=(o=d.textContent)==null?void 0:o.trim();if(h)return h}}const a=(c=e.textContent)==null?void 0:c.trim();return a&&a.length<=100?a.replace(/\s+/g," "):null}}function uf(i){return typeof CSS<"u"&&CSS.escape?CSS.escape(i):i.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Av(i){return`"${i.replace(/["\\]/g,e=>"\\"+e)}"`}function bo(i,e,t,s){return new IC(i).applyScopingHook(e,t,s)}class PC{constructor(e){this._enabled=!1,this._savedButtonRoles=new Map,this._hiddenDuplicateButtons=[],this._document=e}get enabled(){return this._enabled}toggle(){this._enabled=!this._enabled,this._enabled?this._enableNestedElementAccess():this._disableNestedElementAccess()}_enableNestedElementAccess(){this._document.querySelectorAll('[role="button"]').forEach(t=>{const s=t.getAttribute("role");t.children.length>0&&s&&(this._savedButtonRoles.set(t,s),t.removeAttribute("role"),t.querySelectorAll("button").forEach(o=>{this._createDuplicateButton(o,t)}))})}_disableNestedElementAccess(){this._savedButtonRoles.forEach((e,t)=>{t.setAttribute("role",e)}),this._savedButtonRoles.clear(),this._hiddenDuplicateButtons.forEach(e=>{e.remove()}),this._hiddenDuplicateButtons=[]}_createDuplicateButton(e,t){var d;const s=e.getAttribute("aria-label"),a=(d=e.textContent)==null?void 0:d.trim();if(!(s||a))return;const c=this._document.createElement("button");c.textContent=(a||"")+" dup",s&&c.setAttribute("aria-label",s+" dup"),c.style.cssText="position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; pointer-events: none !important;",c.setAttribute("tabindex","-1"),c.setAttribute("data-pw-nested-button-duplicate","true"),c.disabled=!0,t.appendChild(c),this._hiddenDuplicateButtons.push(c)}handleNestedClick(e,t,s,a){let o=null;if(t.elements&&t.elements.length>0&&(o=t.elements[0]),!(o&&e!==o&&o.contains(e)))return this._isInsideButtonWrapperWithNativeInput(e)?{targetSelector:t.selector,shouldAutoDisable:!0}:null;const d=o.getAttribute("role");if(d!=="checkbox"&&d!=="radio"&&!this._isInsideButtonWrapperWithNativeInput(o))return null;const h=s.generateSelector(e,{testIdAttributeName:a});let f;if(h.selector===t.selector){const y=this._buildChildSelector(e,o,a);if(!y)return null;f=`${t.selector} >> ${y}`}else{const y=t.selector,m=h.selector;y&&m&&!m.startsWith(y)&&!m.includes(">>")?f=`${y} >> ${m}`:f=m}return{targetSelector:f,shouldAutoDisable:!0}}_buildChildSelector(e,t,s){const a=d=>d.tagName.toLowerCase()==="svg",o=d=>{const h=d.tagName.toLowerCase();return h==="path"||h==="g"||h==="circle"||h==="rect"||h==="polygon"||h==="line"||h==="polyline"||h==="ellipse"};let c=e;if(o(e)){let d=e.parentElement;for(;d&&d!==t;){if(a(d)&&d.classList.length>0&&Array.from(d.classList).some(f=>f.includes("chevron")||f.includes("icon")||f.includes("expandable"))){c=d;break}if(!a(d)&&!o(d)&&d.classList.length>0){c=d;break}d=d.parentElement}}else if(a(e)&&e.classList.length===0){let d=e.parentElement;for(;d&&d!==t;){if(d.classList.length>0){c=d;break}d=d.parentElement}}if(c.hasAttribute(s)){const d=c.getAttribute(s)||"";return`[${s}=${Av(d)}]`}if(c.classList.length>0){const d=Array.from(c.classList),h=d.filter(f=>f.includes("expand")||f.includes("chevron")||f.includes("badge")||f.includes("checkmark")||f.includes("heading")||f.includes("status")||f.includes("icon")||f.includes("button")||f.includes("title"));if(h.length>0){const f=h.find(y=>y.includes("chevron")||y.includes("checkmark")||y.includes("badge"))||h[0];return"."+uf(f)}else if(d.length>0)return"."+uf(d[0])}return c.tagName.toLowerCase()}_isInsideButtonWrapperWithNativeInput(e){let t=e;for(;t;){if(this._savedButtonRoles.has(t))return!!t.querySelector('input[type="checkbox"], input[type="radio"]');t=t.parentElement}return!1}cleanup(){this._enabled&&(this._disableNestedElementAccess(),this._enabled=!1)}}class Rr{constructor(e){this._pdfDoc=null,this._canvasElements=[],this._thumbnailElements=[],this._isRendering=!1,this._toolbar=null,this._sidebar=null,this._mainContent=null,this._currentPage=1,this._pageDisplay=null,this._zoomDisplay=null,this._currentZoom=1,this._rotation=0,this._pdfDataUrl="",this._filename="Document.pdf",this._moreMenuElement=null,this._moreMenuCleanup=null,this._twoPageView=!1,this._annotationsVisible=!0,this._container=e}static async loadPdfJs(){if(window.pdfjsLib)return;console.log("[PDF.js] Loading PDF.js library from CDN...");const e=document.createElement("script");return e.src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js",new Promise((t,s)=>{e.onload=()=>{if(!window.pdfjsLib){s(new Error("PDF.js loaded but pdfjsLib not available"));return}window.pdfjsLib.GlobalWorkerOptions.workerSrc="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js",console.log("[PDF.js] ✅ PDF.js library loaded successfully"),t()},e.onerror=()=>s(new Error("Failed to load PDF.js from CDN")),document.head.appendChild(e)})}async renderPdf(e){const{pdfDataUrl:t,filename:s,onReady:a,onError:o}=e;try{this._pdfDataUrl=t,this._filename=s||"Document.pdf",await Rr.loadPdfJs(),console.log("[PDF.js] Rendering PDF..."),this._isRendering=!0;const c=window.pdfjsLib.getDocument(t);this._pdfDoc=await c.promise,console.log(`[PDF.js] PDF loaded: ${this._pdfDoc.numPages} pages`),document.documentElement&&(document.documentElement.style.height="auto"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.width="100%",document.body.style.height="auto",document.body.style.overflow="auto"),this._container.innerHTML="",this._canvasElements=[],this._thumbnailElements=[],this._container.style.cssText=`
|
|
136
136
|
width: 100%;
|
|
137
137
|
min-height: 100vh;
|
|
138
138
|
display: flex;
|
|
@@ -162,7 +162,7 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i
|
|
|
162
162
|
font-size: 14px;
|
|
163
163
|
font-weight: 400;
|
|
164
164
|
margin-left: 4px;
|
|
165
|
-
`,d.appendChild(f);const y=document.createElement("div");y.style.cssText="display: flex; align-items: center; gap: 12px;";const m=document.createElement("div");m.style.cssText="display: flex; align-items: center; gap: 8px;";const _=document.createElement("span");_.textContent=`1 / ${this._pdfDoc.numPages}`,_.style.cssText="color: #e8eaed; font-size: 13px; min-width: 50px; text-align: center;",m.appendChild(_),y.appendChild(m);const b=document.createElement("div");b.style.cssText="width: 1px; height: 24px; background-color: #5f5f5f;",y.appendChild(b);const
|
|
165
|
+
`,d.appendChild(f);const y=document.createElement("div");y.style.cssText="display: flex; align-items: center; gap: 12px;";const m=document.createElement("div");m.style.cssText="display: flex; align-items: center; gap: 8px;";const _=document.createElement("span");_.textContent=`1 / ${this._pdfDoc.numPages}`,_.style.cssText="color: #e8eaed; font-size: 13px; min-width: 50px; text-align: center;",m.appendChild(_),y.appendChild(m);const b=document.createElement("div");b.style.cssText="width: 1px; height: 24px; background-color: #5f5f5f;",y.appendChild(b);const w=document.createElement("div");w.style.cssText="display: flex; align-items: center; gap: 8px;";const v=this._createToolbarButton("−","Zoom out",()=>{this._zoom(this._currentZoom-.1)});w.appendChild(v);const T=document.createElement("span");T.textContent="100%",T.style.cssText="color: #e8eaed; font-size: 13px; min-width: 45px; text-align: center; cursor: pointer;",T.title="Reset zoom to 100%",T.addEventListener("click",()=>{this._zoom(1)}),w.appendChild(T);const A=this._createToolbarButton("+","Zoom in",()=>{this._zoom(this._currentZoom+.1)});w.appendChild(A),y.appendChild(w);const C=document.createElement("div");C.style.cssText="width: 1px; height: 24px; background-color: #5f5f5f;",y.appendChild(C);const L=this._createToolbarButton("⊡","Fit to page",()=>{this._fitToPage()});L.style.fontSize="18px",y.appendChild(L);const j=this._createToolbarButton("↻","Rotate clockwise",()=>{this._rotate()});j.style.fontSize="18px",y.appendChild(j);const D=document.createElement("div");D.style.cssText="display: flex; align-items: center; gap: 8px;";const F=this._createToolbarButton("⬇","Download",()=>{this._download()});F.style.fontSize="18px",D.appendChild(F);const B=this._createToolbarButton("🖨","Print",()=>{this._print()});B.style.fontSize="16px",D.appendChild(B);let q;q=this._createToolbarButton("⋮","More options",()=>{this._toggleMoreMenu(q)}),q.style.fontSize="20px",D.appendChild(q),this._toolbar.appendChild(d),this._toolbar.appendChild(y),this._toolbar.appendChild(D),this._pageDisplay=_,this._zoomDisplay=T;const O=document.createElement("div");O.style.cssText=`
|
|
166
166
|
width: 100%;
|
|
167
167
|
flex: 1;
|
|
168
168
|
display: flex;
|
|
@@ -305,7 +305,7 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i
|
|
|
305
305
|
top: 50%;
|
|
306
306
|
transform: translateY(-50%);
|
|
307
307
|
font-size: 14px;
|
|
308
|
-
`,y.appendChild(_)}const m=document.createElement("span");return m.textContent=d,y.appendChild(m),y.addEventListener("mouseenter",()=>{y.style.backgroundColor="rgba(255,255,255,0.1)"}),y.addEventListener("mouseleave",()=>{y.style.backgroundColor="transparent"}),y.addEventListener("click",()=>{this._closeMoreMenu(),f()}),t.appendChild(y),y},o=()=>{const d=document.createElement("div");d.style.cssText="height: 1px; background: rgba(255,255,255,0.15); margin: 4px 0;",t.appendChild(d)};a("Two page view",this._twoPageView,()=>{this._twoPageView=!this._twoPageView,this._rerenderPages()}),a("Annotations",this._annotationsVisible,()=>{this._annotationsVisible=!this._annotationsVisible,console.log(`[PDF.js] Annotations ${this._annotationsVisible?"shown":"hidden"}`)}),o(),a("Present",null,()=>{this._present()}),a("Document properties",null,()=>{this._showDocumentProperties()});const c=d=>{!t.contains(d.target)&&d.target!==e&&this._closeMoreMenu()};setTimeout(()=>{document.addEventListener("mousedown",c,!0),this._moreMenuCleanup=()=>document.removeEventListener("mousedown",c,!0)},0),document.body.appendChild(t)}_closeMoreMenu(){this._moreMenuElement&&(this._moreMenuElement.remove(),this._moreMenuElement=null),this._moreMenuCleanup&&(this._moreMenuCleanup(),this._moreMenuCleanup=null)}_present(){console.log("[PDF.js] Present: not yet implemented")}async _showDocumentProperties(){if(!this._pdfDoc)return;let e={};try{e=(await this._pdfDoc.getMetadata()).info||{}}catch{}let t="-";if(this._pdfDataUrl)try{const _=this._pdfDataUrl.split(",")[1];if(_){const b=Math.ceil(_.length*3/4);t=b>=1024*1024?`${(b/(1024*1024)).toFixed(1)} MB`:`${(b/1024).toFixed(1)} KB`}}catch{}const s=_=>{if(!_)return"-";const b=_.match(/^D:(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/);if(!b)return _;const
|
|
308
|
+
`,y.appendChild(_)}const m=document.createElement("span");return m.textContent=d,y.appendChild(m),y.addEventListener("mouseenter",()=>{y.style.backgroundColor="rgba(255,255,255,0.1)"}),y.addEventListener("mouseleave",()=>{y.style.backgroundColor="transparent"}),y.addEventListener("click",()=>{this._closeMoreMenu(),f()}),t.appendChild(y),y},o=()=>{const d=document.createElement("div");d.style.cssText="height: 1px; background: rgba(255,255,255,0.15); margin: 4px 0;",t.appendChild(d)};a("Two page view",this._twoPageView,()=>{this._twoPageView=!this._twoPageView,this._rerenderPages()}),a("Annotations",this._annotationsVisible,()=>{this._annotationsVisible=!this._annotationsVisible,console.log(`[PDF.js] Annotations ${this._annotationsVisible?"shown":"hidden"}`)}),o(),a("Present",null,()=>{this._present()}),a("Document properties",null,()=>{this._showDocumentProperties()});const c=d=>{!t.contains(d.target)&&d.target!==e&&this._closeMoreMenu()};setTimeout(()=>{document.addEventListener("mousedown",c,!0),this._moreMenuCleanup=()=>document.removeEventListener("mousedown",c,!0)},0),document.body.appendChild(t)}_closeMoreMenu(){this._moreMenuElement&&(this._moreMenuElement.remove(),this._moreMenuElement=null),this._moreMenuCleanup&&(this._moreMenuCleanup(),this._moreMenuCleanup=null)}_present(){console.log("[PDF.js] Present: not yet implemented")}async _showDocumentProperties(){if(!this._pdfDoc)return;let e={};try{e=(await this._pdfDoc.getMetadata()).info||{}}catch{}let t="-";if(this._pdfDataUrl)try{const _=this._pdfDataUrl.split(",")[1];if(_){const b=Math.ceil(_.length*3/4);t=b>=1024*1024?`${(b/(1024*1024)).toFixed(1)} MB`:`${(b/1024).toFixed(1)} KB`}}catch{}const s=_=>{if(!_)return"-";const b=_.match(/^D:(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/);if(!b)return _;const w=new Date(`${b[1]}-${b[2]}-${b[3]}T${b[4]}:${b[5]}:${b[6]}`);return isNaN(w.getTime())?_:w.toLocaleString()};let a="-";try{const b=(await this._pdfDoc.getPage(1)).getViewport({scale:1}),w=(b.width/72).toFixed(2),v=(b.height/72).toFixed(2),T=b.width>b.height?"landscape":"portrait";a=`${w} × ${v} in (${T})`}catch{}const o=[[["File name:",this._filename],["File size:",t]],[["Title:",e.Title||"-"],["Author:",e.Author||"-"],["Subject:",e.Subject||"-"],["Keywords:",e.Keywords||"-"],["Created:",s(e.CreationDate||"")],["Modified:",s(e.ModDate||"")],["Application:",e.Creator||"-"]],[["PDF producer:",e.Producer||"-"],["PDF version:",e.PDFFormatVersion||"-"],["Page count:",`${this._pdfDoc.numPages}`],["Page size:",a]],[["Fast web view:","No"]]],c=document.createElement("div");c.style.cssText=`
|
|
309
309
|
position: fixed;
|
|
310
310
|
top: 0; left: 0; right: 0; bottom: 0;
|
|
311
311
|
background: rgba(0,0,0,0.5);
|
|
@@ -322,7 +322,7 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i
|
|
|
322
322
|
color: #e8eaed;
|
|
323
323
|
font-family: 'Roboto', Arial, sans-serif;
|
|
324
324
|
box-shadow: 0 4px 20px rgba(0,0,0,0.5);
|
|
325
|
-
`;const h=document.createElement("h3");h.textContent="Document properties",h.style.cssText="margin: 0 0 16px; font-size: 18px; font-weight: 500;",d.appendChild(h);const f=(_,b)=>{const
|
|
325
|
+
`;const h=document.createElement("h3");h.textContent="Document properties",h.style.cssText="margin: 0 0 16px; font-size: 18px; font-weight: 500;",d.appendChild(h);const f=(_,b)=>{const w=document.createElement("div");w.style.cssText="display: flex; padding: 7px 0; font-size: 13px;";const v=document.createElement("span");v.textContent=_,v.style.cssText="min-width: 140px; flex-shrink: 0;";const T=document.createElement("span");T.textContent=b,T.style.wordBreak="break-all",w.appendChild(v),w.appendChild(T),d.appendChild(w)},y=()=>{const _=document.createElement("div");_.style.cssText="height: 1px; background: rgba(255,255,255,0.15); margin: 6px 0;",d.appendChild(_)};for(let _=0;_<o.length;_++){for(const[b,w]of o[_])f(b,w);_<o.length-1&&y()}const m=document.createElement("button");m.textContent="Close",m.style.cssText=`
|
|
326
326
|
display: block;
|
|
327
327
|
margin: 20px 0 0 auto;
|
|
328
328
|
padding: 10px 28px;
|
|
@@ -334,7 +334,7 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i
|
|
|
334
334
|
font-weight: 500;
|
|
335
335
|
cursor: pointer;
|
|
336
336
|
font-family: 'Roboto', Arial, sans-serif;
|
|
337
|
-
`,m.addEventListener("click",()=>c.remove()),d.appendChild(m),c.appendChild(d),c.addEventListener("click",_=>{_.target===c&&c.remove()}),document.body.appendChild(c),console.log("[PDF.js] Document properties dialog opened")}_setupScrollSync(){this._mainContent&&window.addEventListener("scroll",()=>{if(!this._mainContent)return;const e=this._mainContent.querySelectorAll("[data-page-number]"),t=56;for(let s=0;s<e.length;s++){const a=e[s],o=a.getBoundingClientRect();if(o.top<=t+100&&o.bottom>t){const c=parseInt(a.getAttribute("data-page-number")||"1");this._updateCurrentPage(c);break}}},{passive:!0})}cleanup(){this._pdfDoc&&(this._pdfDoc.destroy(),this._pdfDoc=null),this._closeMoreMenu(),this._canvasElements=[],this._thumbnailElements=[],this._toolbar=null,this._sidebar=null,this._mainContent=null,this._currentPage=1,this._container.innerHTML=""}}class lb{static async fetchPdfViaBackend(e){try{if(console.log("[PW-PDF-VIEWER] Fetching PDF via Playwright backend:",e.substring(0,100)),!window.__pw_recorderFetchPdf)throw new Error("__pw_recorderFetchPdf binding not available");const t=await window.__pw_recorderFetchPdf(e);if(!t)throw new Error("Backend returned null (fetch failed)");return console.log("[PW-PDF-VIEWER] ✅ Successfully fetched PDF via backend:",t.substring(0,100)),t}catch(t){return console.error("[PW-PDF-VIEWER] ❌ Failed to fetch PDF via backend:",t),null}}static async renderPdfWithPdfJs(e){const{pdfUrl:t,containerElement:s,onSuccess:a,onError:o}=e;try{console.log("[PW-PDF-VIEWER] Starting PDF render process...");const c=await this.fetchPdfViaBackend(t);if(!c)throw new Error("Failed to fetch PDF from backend");console.log("[PW-PDF-VIEWER] ✅ PDF fetched, initializing PDF.js viewer...");let d="Document.pdf";try{const y=new URL(t).pathname,m=y.lastIndexOf("/");m!==-1&&(d=y.substring(m+1),d=decodeURIComponent(d))}catch(f){console.warn("[PW-PDF-VIEWER] Failed to extract filename from URL:",f)}return await new Rr(s).renderPdf({pdfDataUrl:c,filename:d,onReady:()=>{console.log("[PW-PDF-VIEWER] ✅ PDF rendered successfully!"),a&&a()},onError:f=>{console.error("[PW-PDF-VIEWER] ❌ PDF.js render error:",f),o&&o(f)}}),!0}catch(c){return console.error("[PW-PDF-VIEWER] ❌ Failed to render PDF:",c),o&&o(c),!1}}}class
|
|
337
|
+
`,m.addEventListener("click",()=>c.remove()),d.appendChild(m),c.appendChild(d),c.addEventListener("click",_=>{_.target===c&&c.remove()}),document.body.appendChild(c),console.log("[PDF.js] Document properties dialog opened")}_setupScrollSync(){this._mainContent&&window.addEventListener("scroll",()=>{if(!this._mainContent)return;const e=this._mainContent.querySelectorAll("[data-page-number]"),t=56;for(let s=0;s<e.length;s++){const a=e[s],o=a.getBoundingClientRect();if(o.top<=t+100&&o.bottom>t){const c=parseInt(a.getAttribute("data-page-number")||"1");this._updateCurrentPage(c);break}}},{passive:!0})}cleanup(){this._pdfDoc&&(this._pdfDoc.destroy(),this._pdfDoc=null),this._closeMoreMenu(),this._canvasElements=[],this._thumbnailElements=[],this._toolbar=null,this._sidebar=null,this._mainContent=null,this._currentPage=1,this._container.innerHTML=""}}class lb{static async fetchPdfViaBackend(e){try{if(console.log("[PW-PDF-VIEWER] Fetching PDF via Playwright backend:",e.substring(0,100)),!window.__pw_recorderFetchPdf)throw new Error("__pw_recorderFetchPdf binding not available");const t=await window.__pw_recorderFetchPdf(e);if(!t)throw new Error("Backend returned null (fetch failed)");return console.log("[PW-PDF-VIEWER] ✅ Successfully fetched PDF via backend:",t.substring(0,100)),t}catch(t){return console.error("[PW-PDF-VIEWER] ❌ Failed to fetch PDF via backend:",t),null}}static async renderPdfWithPdfJs(e){const{pdfUrl:t,containerElement:s,onSuccess:a,onError:o}=e;try{console.log("[PW-PDF-VIEWER] Starting PDF render process...");const c=await this.fetchPdfViaBackend(t);if(!c)throw new Error("Failed to fetch PDF from backend");console.log("[PW-PDF-VIEWER] ✅ PDF fetched, initializing PDF.js viewer...");let d="Document.pdf";try{const y=new URL(t).pathname,m=y.lastIndexOf("/");m!==-1&&(d=y.substring(m+1),d=decodeURIComponent(d))}catch(f){console.warn("[PW-PDF-VIEWER] Failed to extract filename from URL:",f)}return await new Rr(s).renderPdf({pdfDataUrl:c,filename:d,onReady:()=>{console.log("[PW-PDF-VIEWER] ✅ PDF rendered successfully!"),a&&a()},onError:f=>{console.error("[PW-PDF-VIEWER] ❌ PDF.js render error:",f),o&&o(f)}}),!0}catch(c){return console.error("[PW-PDF-VIEWER] ❌ Failed to render PDF:",c),o&&o(c),!1}}}class UC{constructor(e){this._pdfEmbeds=new Map,this._pdfPageReplaced=!1,this._mutationObserver=null,this._recorder=e}install(){console.log("[PDF-Tool] Installing PDF viewer tool..."),this._detectAndReplacePdfEmbeds(),this._setupAutomaticPdfDetection()}uninstall(){console.log("[PDF-Tool] Uninstalling PDF viewer tool..."),this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null)}cleanup(){console.log("[PDF-Tool] Cleaning up PDF viewer tool...");for(const[,e]of this._pdfEmbeds.entries())e.viewer.cleanup();this._pdfEmbeds.clear(),this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null)}isWithinPdfViewer(e){if(!e)return!1;let t=e;for(;t;){if(this._pdfEmbeds.has(t)||t.hasAttribute&&t.hasAttribute("data-pw-pdf-viewer")||t.id==="pw-pdf-viewer-container")return!0;t=t.parentNode}return!1}_setupAutomaticPdfDetection(){console.log("[PDF-Tool] Setting up automatic PDF detection..."),this._mutationObserver=new MutationObserver(e=>{for(const t of e)if(t.type==="childList"&&t.addedNodes.length>0){setTimeout(()=>{this._detectAndReplacePdfEmbeds()},100);break}}),this._mutationObserver.observe(this._recorder.document.body,{childList:!0,subtree:!0}),console.log("[PDF-Tool] ✅ Automatic PDF detection active")}async _detectAndReplacePdfEmbeds(){if(console.log("[PDF-Tool] Scanning for PDF embeds..."),this._pdfPageReplaced){console.log("[PDF-Tool] PDF page already replaced, skipping detection");return}if(this._isCurrentPagePdf()){console.log("[PDF-Tool] Current page is a PDF document, replacing with PDF.js viewer..."),await this._replacePdfPage();return}const t=this._recorder.document.querySelectorAll('embed[type="application/pdf"], iframe[src*=".pdf"]');if(t.length===0){console.log("[PDF-Tool] No PDF embeds found");return}console.log(`[PDF-Tool] Found ${t.length} PDF embed(s)`);for(const s of t)await this._replacePdfEmbed(s)}_isCurrentPagePdf(){const e=window.location.href,t=this._recorder.document;return e.toLowerCase().endsWith(".pdf")?(console.log("[PDF-Tool] URL ends with .pdf:",e),!0):t.querySelector('embed[type="application/pdf"]')&&t.body.children.length===1?(console.log("[PDF-Tool] Found full-page PDF embed"),!0):e.includes("s3.amazonaws.com")||e.includes(".s3.")?(console.log("[PDF-Tool] S3 URL detected, likely a PDF:",e),!0):!1}async _replacePdfPage(){try{this._pdfPageReplaced=!0;const e=window.location.href;console.log("[PDF-Tool] Replacing full-page PDF with PDF.js viewer:",e.substring(0,100));const t=this._recorder.document;t.body.innerHTML="";const s=t.createElement("div");s.setAttribute("data-pw-pdf-viewer","true"),s.id="pw-pdf-viewer-container",s.style.cssText=`
|
|
338
338
|
position: fixed;
|
|
339
339
|
top: 0;
|
|
340
340
|
left: 0;
|
|
@@ -350,7 +350,7 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i
|
|
|
350
350
|
height: ${e.offsetHeight||600}px;
|
|
351
351
|
z-index: 2147483647;
|
|
352
352
|
background: #525252;
|
|
353
|
-
`;const a=e.parentNode;if(!a)return;a.insertBefore(s,e),e.style.display="none";const o=new Rr(s);this._pdfEmbeds.set(e,{originalParent:a,viewer:o,container:s}),await lb.renderPdfWithPdfJs({pdfUrl:t,containerElement:s,onSuccess:()=>{console.log("[PDF-Tool] ✅ PDF embed replaced successfully")},onError:c=>{console.error("[PDF-Tool] ❌ Failed to render PDF:",c),e.style.display="",s.parentNode&&s.parentNode.removeChild(s),this._pdfEmbeds.delete(e)}})}catch(t){console.error("[PDF-Tool] Error replacing PDF embed:",t)}}}function ai(i,e,t,s){return i.addEventListener(e,t,s),()=>{i.removeEventListener(e,t,s)}}function P2(i){for(const e of i)e();i.splice(0,i.length)}function ht(i){return i.injectedScript.utils.builtins.Date.now().toString()}const At=class At{constructor(e){this._dragState=null,this._listeners=[],this._lastClickTime=0,this._lastClickTimeout=null,this._lastMousePosition=null,this._wheelToggleTimeout=null,this._isWheelSequence=!1,this._wheelAccumulator=null,this._wheelDebounceTimeout=null,this._pdfViewerTool=null,this._goJSAlwaysOnRemovers=[],this._recorder=e}cursor(){return"grab"}install(){this._arm(),this._checkAndActivatePdfViewer(),this._hookGoJSDiagramsAlwaysOn()}uninstall(){this._lastClickTimeout&&(clearTimeout(this._lastClickTimeout),this._lastClickTimeout=null),this._wheelToggleTimeout&&(clearTimeout(this._wheelToggleTimeout),this._wheelToggleTimeout=null),this._flushWheelAction(),this._wheelDebounceTimeout&&(clearTimeout(this._wheelDebounceTimeout),this._wheelDebounceTimeout=null),this._dragState&&this._dragState.source&&this._dragState.target&&this._capture();for(const e of this._goJSAlwaysOnRemovers)e();this._goJSAlwaysOnRemovers=[],delete this._recorder.document.__skyrampGoJSHooked,this._disarm()}cleanup(){this._lastClickTimeout&&(clearTimeout(this._lastClickTimeout),this._lastClickTimeout=null),this._wheelToggleTimeout&&(clearTimeout(this._wheelToggleTimeout),this._wheelToggleTimeout=null),this._flushWheelAction(),this._wheelDebounceTimeout&&(clearTimeout(this._wheelDebounceTimeout),this._wheelDebounceTimeout=null),this._dragState&&this._dragState.source&&this._dragState.target&&this._capture(),this._listeners.length>0&&(this._disarm(),this._arm())}onDblClick(e){this._lastClickTimeout&&(clearTimeout(this._lastClickTimeout),this._lastClickTimeout=null);const t=e.target;if(!(!t||this._isPlaywrightElement(t))){e.preventDefault();try{const s={name:"click",selector:"body",button:"left",modifiers:0,clickCount:2,position:{x:Math.round(e.clientX),y:Math.round(e.clientY)},signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(s),this._deactivate()}catch(s){console.error("[PW-RECORDER] Error recording position-based double-click:",s),this._deactivate()}}}_flushWheelAction(){if(!this._wheelAccumulator)return;const e=Math.abs(this._wheelAccumulator.deltaX),t=Math.abs(this._wheelAccumulator.deltaY);if(e<At.WHEEL_NOISE_AXIS_THRESHOLD&&t<At.WHEEL_NOISE_AXIS_THRESHOLD){console.log("[PW-RECORDER] Suppressing Magic Mouse noise wheel:",{deltaX:this._wheelAccumulator.deltaX,deltaY:this._wheelAccumulator.deltaY,accumulatedFor:Date.now()-this._wheelAccumulator.startTime+"ms"}),this._wheelAccumulator=null;return}try{const s={name:"mouse.wheel",position:this._wheelAccumulator.position,deltaX:this._wheelAccumulator.deltaX,deltaY:this._wheelAccumulator.deltaY,deltaZ:this._wheelAccumulator.deltaZ,modifiers:this._wheelAccumulator.modifiers,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(s),console.log("[PW-RECORDER] Flushed accumulated wheel action:",{deltaX:s.deltaX,deltaY:s.deltaY,deltaZ:s.deltaZ,accumulatedFor:Date.now()-this._wheelAccumulator.startTime+"ms"})}catch(s){console.error("[PW-RECORDER] Error flushing wheel action:",s)}this._wheelAccumulator=null}_arm(){var y;this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1},(y=this._recorder.injectedScript.document.body)==null||y.setAttribute("data-pw-cursor","grab");const e=m=>{const _=m;if(this._dragState){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);b&&!this._isPlaywrightElement(b)&&(this._dragState.source=this._selectDraggableAncestor(b),this._dragState.sourcePoint={x:_.clientX,y:_.clientY})}},t=m=>{const _=m;if(this._dragState&&this._dragState.source){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);if(b&&!this._isPlaywrightElement(b)){const x=this._selectDroppableAncestor(b);x!==this._dragState.source&&(this._dragState.target=x,this._dragState.targetPoint={x:_.clientX,y:_.clientY})}}},s=m=>{const _=m;if(this._dragState&&(this._dragState.source=null,this._dragState.target=null,this._dragState.sourcePoint=null,this._dragState.targetPoint=null,this._dragState.isCanvas=!1,this._dragState.isGoJS=!1,this._dragState.isReactFlow=!1,this._dragState.isSlider=!1,this._dragState.dropDetected=!1,this._dragState.startTime=Date.now()),this._dragState){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);if(b&&!this._isPlaywrightElement(b))if(this._isReactFlowElement(b)){this._dragState.isReactFlow=!0;let x=b;for(;x&&!x.classList.contains("react-flow");)x=x.parentElement;this._dragState.source=x||b,this._dragState.sourcePoint={x:_.clientX,y:_.clientY}}else if(this._isGoJSElement(b))this._dragState.isGoJS=!0,this._dragState.source=b,this._dragState.sourcePoint={x:_.clientX,y:_.clientY};else if(this._isCanvasElement(b))this._dragState.isCanvas=!0,this._dragState.source=b,this._dragState.sourcePoint={x:_.clientX,y:_.clientY};else{const x=this._selectDraggableAncestor(b);if(x!==b)this._dragState.source=x,this._dragState.sourcePoint={x:_.clientX,y:_.clientY};else{const v=this._findSliderThumb(b);v?(this._dragState.isSlider=!0,this._dragState.source=v,this._dragState.sourcePoint={x:_.clientX,y:_.clientY}):(this._dragState.source=b,this._dragState.sourcePoint={x:_.clientX,y:_.clientY})}}}},a=m=>{const _=m;if(this._dragState&&this._dragState.source&&_.buttons===1){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);if(b&&!this._isPlaywrightElement(b)){if(this._dragState.isReactFlow&&this._isReactFlowElement(b))this._dragState.target=this._dragState.source,this._dragState.targetPoint={x:_.clientX,y:_.clientY};else if(this._dragState.isGoJS&&this._isCanvasElement(b))this._dragState.target=b,this._dragState.targetPoint={x:_.clientX,y:_.clientY};else if(this._dragState.isCanvas&&this._isCanvasElement(b))this._dragState.target=b,this._dragState.targetPoint={x:_.clientX,y:_.clientY};else if(this._dragState.isSlider)this._dragState.target=this._dragState.source,this._dragState.targetPoint={x:_.clientX,y:_.clientY};else if(!this._dragState.isCanvas&&!this._dragState.isReactFlow&&!this._dragState.isSlider){const x=this._selectDroppableAncestor(b);x!==this._dragState.source?(this._dragState.target=x,this._dragState.targetPoint={x:_.clientX,y:_.clientY}):b!==this._dragState.source&&(this._dragState.target=b,this._dragState.targetPoint={x:_.clientX,y:_.clientY})}}}},o=m=>{const _=m;if(this._dragState&&this._dragState.source&&this._dragState.sourcePoint)if(this._dragState.target)this._getSourceColumn(this._dragState.source),this._dragState.target,this._capture();else{const b=Math.sqrt(Math.pow(_.clientX-this._dragState.sourcePoint.x,2)+Math.pow(_.clientY-this._dragState.sourcePoint.y,2));if(b>=5){this._deactivate();return}if(b<5){if(_.button===2)return;this._lastClickTimeout&&clearTimeout(this._lastClickTimeout),this._lastClickTimeout=setTimeout(()=>{try{const x={name:"click",selector:"body",button:"left",modifiers:0,clickCount:1,position:{x:Math.round(_.clientX),y:Math.round(_.clientY)},signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(x),this._deactivate()}catch(x){console.error("[PW-RECORDER] Error recording position-based click:",x),this._deactivate()}this._lastClickTimeout=null},300)}}else console.log("[PW-RECORDER] PointerUp - no valid drag state")},c=m=>{const _=m;if(this._dragState&&this._dragState.source){if(this._dragState.dropDetected=!0,!this._dragState.target){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);b&&!this._isPlaywrightElement(b)&&(this._dragState.target=this._selectDroppableAncestor(b),this._dragState.targetPoint={x:_.clientX,y:_.clientY})}this._dragState.target?(this._getSourceColumn(this._dragState.source),this._dragState.target,this._capture()):this._deactivate()}else this._deactivate()},d=m=>{var b;const _=m;if(this._dragState&&this._dragState.source){if(this._dragState.dropDetected){if(!this._dragState.target){const x=this._recorder.document.elementFromPoint(_.clientX,_.clientY);x&&!this._isPlaywrightElement(x)&&(this._dragState.target=this._selectDroppableAncestor(x),this._dragState.targetPoint={x:_.clientX,y:_.clientY})}this._dragState.target&&(this._getSourceColumn(this._dragState.source),this._dragState.target,this._capture())}else{const x=(b=_.dataTransfer)==null?void 0:b.dropEffect;if(x&&x!=="none"){this._deactivate();return}console.log("[PW-RECORDER] Drag cancelled (no drop event), not recording")}this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}},h=m=>{var T;const _=m,b=_.target;if(!b||this._isPlaywrightElement(b)||this._isGoJSElement(b))return;const x=((T=this._pdfViewerTool)==null?void 0:T.isWithinPdfViewer(b))||!1;_.ctrlKey&&!x&&m.preventDefault();let v=0;_.altKey&&(v|=1),_.ctrlKey&&(v|=2),_.metaKey&&(v|=4),_.shiftKey&&(v|=8);try{const A={x:Math.round(_.clientX),y:Math.round(_.clientY)};if(!this._isWheelSequence){this._isWheelSequence=!0;const L={name:"comment",text:"Mouse scrolling block",signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(L);const j={name:"waitForTimeout",duration:At.WHEEL_SCROLL_TIMEOUT_MS,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(j)}if(!this._lastMousePosition||this._lastMousePosition.x!==A.x||this._lastMousePosition.y!==A.y){const L={name:"mouse.move",position:A,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(L),this._lastMousePosition=A}const C=Date.now();this._wheelAccumulator?(this._wheelAccumulator.deltaX+=_.deltaX,this._wheelAccumulator.deltaY+=_.deltaY,this._wheelAccumulator.deltaZ+=_.deltaZ,this._wheelAccumulator.position=A,this._wheelAccumulator.modifiers=v,C-this._wheelAccumulator.startTime>At.WHEEL_MAX_ACCUMULATION_MS&&(this._flushWheelAction(),this._wheelAccumulator={deltaX:_.deltaX,deltaY:_.deltaY,deltaZ:_.deltaZ,position:A,modifiers:v,startTime:C})):this._wheelAccumulator={deltaX:_.deltaX,deltaY:_.deltaY,deltaZ:_.deltaZ,position:A,modifiers:v,startTime:C},this._wheelDebounceTimeout&&clearTimeout(this._wheelDebounceTimeout),this._wheelDebounceTimeout=setTimeout(()=>{this._flushWheelAction(),this._wheelDebounceTimeout=null},At.WHEEL_DEBOUNCE_MS),this._wheelToggleTimeout&&clearTimeout(this._wheelToggleTimeout),this._wheelToggleTimeout=setTimeout(()=>{this._deactivate()},At.WHEEL_TOOL_DISABLE_MS)}catch(A){console.error("[PW-RECORDER] Error recording wheel event:",A)}},f=m=>{const _=m,b=_.target;if(!(!b||this._isPlaywrightElement(b))){m.preventDefault();try{this._lastMousePosition={x:Math.round(_.clientX),y:Math.round(_.clientY)};const x={name:"click",selector:"body",button:"right",modifiers:0,clickCount:1,position:{x:Math.round(_.clientX),y:Math.round(_.clientY)},signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(x),this._deactivate()}catch(x){console.error("[PW-RECORDER] Error recording right-click:",x),this._deactivate()}}};this._listeners=[ai(this._recorder.document,"dragstart",e,!0),ai(this._recorder.document,"dragover",t,!0),ai(this._recorder.document,"drop",c,!0),ai(this._recorder.document,"dragend",d,!0),ai(this._recorder.document,"pointerdown",s,!0),ai(this._recorder.document,"pointermove",a,!0),ai(this._recorder.document,"pointerup",o,!0),ai(this._recorder.document,"wheel",h,{passive:!1,capture:!0}),ai(this._recorder.document,"contextmenu",f,!0)]}_disarm(){P2(this._listeners),this._listeners=[],this._dragState=null}_deactivate(){this._lastClickTimeout&&(clearTimeout(this._lastClickTimeout),this._lastClickTimeout=null),this._wheelToggleTimeout&&(clearTimeout(this._wheelToggleTimeout),this._wheelToggleTimeout=null),this._wheelDebounceTimeout&&(clearTimeout(this._wheelDebounceTimeout),this._wheelDebounceTimeout=null),this._isWheelSequence=!1,this._wheelAccumulator=null,this._disarm(),this._recorder.state.mode==="recordingDrag"&&this._recorder.setMode("recording")}_checkAndActivatePdfViewer(){const e=this._recorder.document;if(window.__pwPdfViewerInstalled){console.log("[DD-Tool] PDF viewer already installed, skipping");return}const t=e.querySelector('embed[type="application/pdf"], iframe[src*=".pdf"]'),s=window.location.href.toLowerCase().endsWith(".pdf")||window.location.href.includes("s3.amazonaws.com")||window.location.href.includes(".s3.");(t||s)&&(console.log("[DD-Tool] PDF detected, activating PDF viewer tool..."),this._pdfViewerTool=new I2(this._recorder),this._pdfViewerTool.install(),window.__pwPdfViewerInstalled=!0,console.log("[DD-Tool] ✅ PDF viewer tool activated (permanent)"))}_getActualPageElement(e){for(const t of e){const s=t;if(s&&s.nodeType===Node.ELEMENT_NODE&&!this._isPlaywrightElement(s))return s}return null}_isPlaywrightElement(e){var o;const t=((o=e.nodeName)==null?void 0:o.toLowerCase())||"",s=e.id||"";return t.startsWith("x-pw-")||s==="x-pw-glass"||e.classList.contains("playwright-overlay")||e.hasAttribute("data-playwright")}_isCanvasElement(e){var t;return((t=e.tagName)==null?void 0:t.toLowerCase())==="canvas"}_isGoJSElement(e){var s,a;if(((s=e.tagName)==null?void 0:s.toLowerCase())!=="canvas")return!1;const t=(a=e.ownerDocument)==null?void 0:a.defaultView;return!!(t!=null&&t.myDiagram||t!=null&&t.myPalette)}_findGoJSContainer(e){var a,o,c;const t=(a=e.ownerDocument)==null?void 0:a.defaultView;if(!((c=(o=t==null?void 0:t.go)==null?void 0:o.Diagram)!=null&&c.fromDiv))return null;let s=e.parentElement;for(;s&&s!==e.ownerDocument.body;){const d=t.go.Diagram.fromDiv(s);if(d){const h=!!(t.go.Palette&&d instanceof t.go.Palette);let f;if(s.id)f=`#${s.id}`;else if(s.getAttribute("data-testid"))f=`[data-testid="${s.getAttribute("data-testid")}"]`;else{const y=s.parentElement;if(y){const m=Array.from(y.children).indexOf(s)+1;f=`${s.tagName.toLowerCase()}:nth-child(${m})`}else f=s.tagName.toLowerCase()}return{diagram:d,isPalette:h,containerSelector:f}}s=s.parentElement}return null}_buildSelectorFromEl(e){if(e.id)return`#${e.id}`;if(e.getAttribute("data-testid"))return`[data-testid="${e.getAttribute("data-testid")}"]`;const t=e.parentElement;if(t){const s=Array.from(t.children).indexOf(e)+1;return`${e.tagName.toLowerCase()}:nth-child(${s})`}return e.tagName.toLowerCase()}_emitGoJSNodeAdd(e,t,s,a,o,c,d){let h,f,y,m,_,b=1/0;e.nodes.each(v=>{if(!(v!=null&&v.data))return;const T=String(v.data.key??"");if(!T||T===o)return;const A=v.location.x-c,C=v.location.y-d,L=Math.sqrt(A*A+C*C);L<b&&(b=L,h=T,f=Math.round(c-v.location.x),y=Math.round(d-v.location.y),m=Math.round(v.location.x),_=Math.round(v.location.y))});const x={name:"diagramNodeAdd",diagramType:"gojs",sourcePanelSelector:t,targetPanelSelector:s,sourceIsPalette:!0,targetIsPalette:!1,sourceCategory:a,sourceKey:o,targetDocX:Math.round(c),targetDocY:Math.round(d),anchorKey:h,anchorOffsetX:f,anchorOffsetY:y,anchorDocX:m,anchorDocY:_,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(x),this._deactivate()}_emitGoJSLinkAdd(e,t,s,a,o){const c={name:"diagramLinkAdd",diagramType:"gojs",panelSelector:o,fromKey:e,toKey:t,fromPort:s,toPort:a,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(c),this._deactivate()}_hookGoJSDiagramsAlwaysOn(){var o,c;const e=this._recorder.document;if(e.__skyrampGoJSHooked)return;const t=e.defaultView;if(!((c=(o=t==null?void 0:t.go)==null?void 0:o.Diagram)!=null&&c.fromDiv))return;const s=Array.from(e.querySelectorAll("canvas"));if(!s.length)return;const a=new Set;for(const d of s){let h=d.parentElement;for(;h&&h!==e.body;){const f=t.go.Diagram.fromDiv(h);if(f){if(!!!(t.go.Palette&&f instanceof t.go.Palette)&&!a.has(f)){a.add(f);const m=this._buildSelectorFromEl(h),_=x=>{e.__skyrampGojsLinkToolActive||x.subject.each(v=>{if(!(v!=null&&v.data)||v.data.from!==void 0)return;const T=String(v.data.category??""),A=String(v.data.key??""),C=v.location;let L="";try{const j=Array.from(e.querySelectorAll("canvas"));for(const D of j){let F=D.parentElement;for(;F&&F!==e.body;){const B=t.go.Diagram.fromDiv(F);if(B&&t.go.Palette&&B instanceof t.go.Palette){L=this._buildSelectorFromEl(F);break}F=F.parentElement}if(L)break}}catch{}setTimeout(()=>{const j=v.location??C;this._emitGoJSNodeAdd(f,L,m,T,A,(j==null?void 0:j.x)??0,(j==null?void 0:j.y)??0)},0)})},b=x=>{if(e.__skyrampGojsLinkToolActive)return;const v=x.subject;if(!(v!=null&&v.data))return;const T=String(v.data.from??""),A=String(v.data.to??"");!T||!A||this._emitGoJSLinkAdd(T,A,String(v.data.fromPort??""),String(v.data.toPort??""),m)};f.addDiagramListener("ExternalObjectsDropped",_),f.addDiagramListener("LinkDrawn",b),this._goJSAlwaysOnRemovers.push(()=>{try{f.removeDiagramListener("ExternalObjectsDropped",_),f.removeDiagramListener("LinkDrawn",b)}catch{}})}break}h=h.parentElement}}a.size>0&&(e.__skyrampGoJSHooked=!0,console.log("[DragDropTool] always-on GoJS listeners registered on",a.size,"diagram(s)"))}_captureGoJSDrag(){var e,t,s,a,o;if(!(!((e=this._dragState)!=null&&e.source)||!((t=this._dragState)!=null&&t.target)||!((s=this._dragState)!=null&&s.sourcePoint)||!((a=this._dragState)!=null&&a.targetPoint))){try{const c=this._dragState.source,d=this._dragState.target,h=(o=c.ownerDocument)==null?void 0:o.defaultView,f=this._findGoJSContainer(c),y=this._findGoJSContainer(d),m=(f==null?void 0:f.containerSelector)??"",_=(y==null?void 0:y.containerSelector)??"",b=(f==null?void 0:f.isPalette)??!1,x=(y==null?void 0:y.isPalette)??!1;let v="",T="";const A=f==null?void 0:f.diagram;if(A&&(h!=null&&h.go)){const B=c.getBoundingClientRect(),q=this._dragState.sourcePoint.x-B.left,O=this._dragState.sourcePoint.y-B.top;try{const Q=A.transformViewToDoc(new h.go.Point(q,O)),se=A.findPartAt(Q,!1);se!=null&&se.data&&(v=se.data.category??"",T=String(se.data.key??""))}catch{}}let C=0,L=0;const j=y==null?void 0:y.diagram;if(j&&(h!=null&&h.go)){const B=d.getBoundingClientRect(),q=this._dragState.targetPoint.x-B.left,O=this._dragState.targetPoint.y-B.top;try{const Q=j.transformViewToDoc(new h.go.Point(q,O));C=Math.round(Q.x),L=Math.round(Q.y)}catch{}}if(!b&&T===""){this._deactivate();return}const D=c.ownerDocument;if(b&&D.__skyrampGoJSHooked){this._deactivate();return}const F={name:"diagramNodeAdd",diagramType:"gojs",sourcePanelSelector:m,targetPanelSelector:_,sourceIsPalette:b,targetIsPalette:x,sourceCategory:v,sourceKey:T,targetDocX:C,targetDocY:L,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(F),this._deactivate()}catch(c){console.error("[PW-RECORDER] Error capturing GoJS drag:",c),this._captureCanvasDrag();return}this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}}_isReactFlowElement(e){let t=e;for(;t;){const s=Array.from(t.classList||[]);if(s.includes("react-flow")||s.includes("react-flow__pane")||s.includes("react-flow__viewport"))return!0;t=t.parentElement}return!1}_getSelectorSafeElement(e){var s;let t=e;for(;t;){if((s=t.tagName)==null||s.toLowerCase(),t.namespaceURI==="http://www.w3.org/1999/xhtml")return t;if(t.namespaceURI==="http://www.w3.org/2000/svg"){t=t.parentElement;continue}if(t.hasAttribute("data-testid")||t.hasAttribute("data-item-id")||t.hasAttribute("data-column-id")||t.hasAttribute("draggable"))return t;t=t.parentElement}return e}_isSliderThumb(e){var s,a;const t=typeof e.className=="string"?e.className:((s=e.className)==null?void 0:s.baseVal)||"";return t.includes("MuiSlider-mark")||t.includes("MuiSlider-markLabel")||t.includes("slider-label")||t.includes("slider-mark")?!1:!!(t.includes("MuiSlider-thumb")||e.querySelector('input[type="range"]')||((a=e.tagName)==null?void 0:a.toLowerCase())==="input"&&e.type==="range"||t.includes("slider-thumb")||t.includes("rc-slider-handle")||t.includes("noUi-handle")||e.hasAttribute("role")&&e.getAttribute("role")==="slider")}_findSliderThumb(e){return this._isSliderThumb(e)?e:e.parentElement&&this._isSliderThumb(e.parentElement)?e.parentElement:null}_findSliderRoot(e){var s,a;let t=e;for(let o=0;o<5&&t;o++){const c=typeof t.className=="string"?t.className:((s=t.className)==null?void 0:s.baseVal)||"";if((((a=t.tagName)==null?void 0:a.toLowerCase())||"")==="input"&&t.type==="range"||c.includes("MuiSlider-root")||c.includes("rc-slider")||c.includes("noUi-target")||c.includes("slider-container")||t.hasAttribute("role")&&t.getAttribute("role")==="slider")return t;t=t.parentElement}return null}_shouldIgnoreForSlider(e){var a,o;const t=typeof e.className=="string"?e.className:((a=e.className)==null?void 0:a.baseVal)||"",s=((o=e.tagName)==null?void 0:o.toLowerCase())||"";return!!(t.includes("MuiSlider-markLabel")||t.includes("MuiSlider-mark")||t.includes("MuiSlider-valueLabel")||t.includes("slider-label")||(s==="span"||s==="div")&&!t.includes("MuiSlider-thumb")&&!t.includes("slider-thumb"))}_selectDraggableAncestor(e){var o;const t=["[data-item-id]",'[draggable="true"]',"[data-draggable]",'[role="listitem"]',".draggable",'[data-testid*="drag"]'];let s=e;const a=(o=s.tagName)==null?void 0:o.toLowerCase();(a==="button"||a==="input"||a==="select"||a==="textarea"||a==="a")&&(s=s.parentElement);for(let c=0;c<5&&s;c++){if(s.hasAttribute("data-item-id")||t.some(d=>{var h;return(h=s==null?void 0:s.matches)==null?void 0:h.call(s,d)}))return s;s=s.parentElement}return e}_getSourceColumn(e){const t=e.getAttribute("data-source-column");if(t){const a=this._recorder.document.querySelector(`[data-column-id="${t}"]`);if(a)return a}let s=e;for(let a=0;a<10&&s;a++){if(s.hasAttribute("data-column-id"))return s;s=s.parentElement}return null}_selectDroppableAncestor(e){let t=e;(t.hasAttribute("data-item-id")||t.hasAttribute("draggable"))&&(t=t.parentElement);for(let a=0;a<8&&t;a++){if(t.hasAttribute("data-column-id"))return t;if(t.hasAttribute("data-droppable")&&t.hasAttribute("data-testid")){const o=t.getAttribute("data-testid");if(o&&o.startsWith("column-"))return t}if(t.hasAttribute("data-drop-target-for-element")&&t.hasAttribute("data-testid")){const o=t.getAttribute("data-testid");if(o&&o.startsWith("calendar-cell-"))return t}t=t.parentElement}t=e,(t.hasAttribute("data-item-id")||t.hasAttribute("draggable"))&&(t=t.parentElement);const s=["[data-droppable]","[data-drop-target-for-element]",'[role="list"]','[role="listbox"]','[role="grid"]',".droppable",".drop-zone","[data-drop-zone]",".vue-grid-layout",".react-grid-layout","[data-rbd-droppable-id]","[data-sortable]"];for(let a=0;a<8&&t;a++){if(s.some(o=>{var c;return(c=t==null?void 0:t.matches)==null?void 0:c.call(t,o)}))return t;t=t.parentElement}t=e,(t.hasAttribute("data-item-id")||t.hasAttribute("draggable"))&&(t=t.parentElement);for(let a=0;a<8&&t;a++){if(t.querySelectorAll(':scope > [draggable="true"]').length>=2)return t;t=t.parentElement}return e}_relativePoint(e,t,s){const a=e.getBoundingClientRect();return{x:Math.max(0,Math.min(t-a.left,a.width)),y:Math.max(0,Math.min(s-a.top,a.height))}}_stableIdSelector(e){const t=e.getAttribute("id");return!t||!/^[a-zA-Z]/.test(t)||/\s/.test(t)||!t.split(/[-_]/).every(s=>s.length>0&&/^[a-zA-Z]+$/.test(s))?null:{selector:`#${t}`}}_stableContainerClassSelector(e){const t=["vue-grid-layout","react-grid-layout"];for(const s of t)if(e.classList.contains(s))return{selector:`.${s}`};return null}_extractSourceLabel(e){const t=e.getAttribute("aria-label");if(t&&t.trim())return t.trim().slice(0,80);const a=(e.innerText||e.textContent||"").trim().replace(/\s+/g," ");if(a)return a.slice(0,80);const o=e.getAttribute("title");return o&&o.trim()?o.trim().slice(0,80):""}_isCenter(e,t){const s=t.getBoundingClientRect(),a=s.width/2,o=s.height/2,c=5;return Math.abs(e.x-a)<c&&Math.abs(e.y-o)<c}_capture(){if(!this._dragState||!this._dragState.source||!this._dragState.target||this._dragState.captured)return;if(this._dragState.captured=!0,this._dragState.isReactFlow){this._captureReactFlowDrag();return}if(this._dragState.isGoJS){this._captureGoJSDrag();return}if(this._dragState.isCanvas){this._captureCanvasDrag();return}if(this._dragState.isSlider){this._captureSliderDrag();return}const e=this._getSourceColumn(this._dragState.source),t=this._dragState.target.hasAttribute("data-column-id")?this._dragState.target:this._getSourceColumn(this._dragState.target);e&&t&&(e.getAttribute("data-column-id"),t.getAttribute("data-column-id"));try{const s=this._dragState.source.getAttribute("data-testid")||this._dragState.source.getAttribute("data-item-id"),a=this._dragState.target.getAttribute("data-testid")||this._dragState.target.getAttribute("data-column-id");let o,c;if(s&&a)o={selector:`[data-testid="${s}"]`},c={selector:`[data-testid="${a}"]`};else{const _=this._getSelectorSafeElement(this._dragState.source),b=this._getSelectorSafeElement(this._dragState.target);o=this._stableIdSelector(_)??this._stableContainerClassSelector(_)??this._recorder.injectedScript.generateSelector(_,{testIdAttributeName:this._recorder.state.testIdAttributeName||"data-testid"}),c=this._stableIdSelector(b)??this._stableContainerClassSelector(b)??this._recorder.injectedScript.generateSelector(b,{testIdAttributeName:this._recorder.state.testIdAttributeName||"data-testid"})}const d=this._dragState.sourcePoint?this._relativePoint(this._dragState.source,this._dragState.sourcePoint.x,this._dragState.sourcePoint.y):{x:this._dragState.source.getBoundingClientRect().width/2,y:this._dragState.source.getBoundingClientRect().height/2},h=this._dragState.targetPoint?this._relativePoint(this._dragState.target,this._dragState.targetPoint.x,this._dragState.targetPoint.y):{x:this._dragState.target.getBoundingClientRect().width/2,y:this._dragState.target.getBoundingClientRect().height/2},f=Date.now()-this._dragState.startTime,y={name:"dragTo",selector:o.selector,target:c.selector,signals:[],timestamp:ht(this._recorder)};this._isCenter(d,this._dragState.source)||(y.sourcePosition={x:Math.round(d.x),y:Math.round(d.y)}),this._isCenter(h,this._dragState.target)||(y.targetPosition={x:Math.round(h.x),y:Math.round(h.y)}),f>500&&(y.duration=f);const m=this._extractSourceLabel(this._dragState.source);m&&(y.sourceLabel=m),this._recorder.recordAction(y),this._deactivate()}catch(s){console.error("[PW-RECORDER] Error generating selectors:",s);try{const a=this._dragState.source.getAttribute("data-testid")||this._dragState.source.getAttribute("data-item-id"),o=this._dragState.target.getAttribute("data-testid")||this._dragState.target.getAttribute("data-column-id");if(a&&o){const c={name:"dragTo",selector:`[data-testid="${a}"]`,target:`[data-testid="${o}"]`,signals:[],timestamp:ht(this._recorder)},d=this._extractSourceLabel(this._dragState.source);d&&(c.sourceLabel=d),this._recorder.recordAction(c)}}catch(a){console.error("[PW-RECORDER] Fallback also failed:",a)}this._deactivate()}this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}_roundPosition(e){return{x:Math.round(e.x),y:Math.round(e.y)}}_recordMouseDragActions(e,t,s=10){const a={name:"mouse.move",position:this._roundPosition(e),signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(a);const o={name:"mouse.down",signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(o);const c={name:"mouse.move",position:this._roundPosition(t),steps:s,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(c);const d={name:"mouse.up",signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(d)}_captureReactFlowDrag(){if(!(!this._dragState||!this._dragState.source||!this._dragState.target)){try{const t=this._dragState.source.getBoundingClientRect(),s=this._dragState.sourcePoint?{x:this._dragState.sourcePoint.x,y:this._dragState.sourcePoint.y}:{x:t.left+t.width/2,y:t.top+t.height/2},a=this._dragState.targetPoint?{x:this._dragState.targetPoint.x,y:this._dragState.targetPoint.y}:{x:t.left+t.width/2,y:t.top+t.height/2};this._recordMouseDragActions(s,a,10)}catch(e){console.error("[PW-RECORDER] Error capturing React Flow drag:",e)}this._deactivate(),this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}}_captureCanvasDrag(){if(!(!this._dragState||!this._dragState.source||!this._dragState.target)){try{const e=this._dragState.source,t=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName||"data-testid"}),s=this._dragState.sourcePoint?this._relativePoint(e,this._dragState.sourcePoint.x,this._dragState.sourcePoint.y):{x:e.getBoundingClientRect().width/2,y:e.getBoundingClientRect().height/2},a=this._dragState.targetPoint?this._relativePoint(e,this._dragState.targetPoint.x,this._dragState.targetPoint.y):{x:e.getBoundingClientRect().width/2,y:e.getBoundingClientRect().height/2},o=Date.now()-this._dragState.startTime,c={name:"dragTo",selector:t.selector,target:t.selector,sourcePosition:{x:Math.round(s.x),y:Math.round(s.y)},targetPosition:{x:Math.round(a.x),y:Math.round(a.y)},signals:[],timestamp:ht(this._recorder)};o>500&&(c.duration=o),this._recorder.recordAction(c)}catch(e){console.error("[PW-RECORDER] Error capturing canvas drag:",e)}this._deactivate(),this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}}_captureSliderDrag(){if(!(!this._dragState||!this._dragState.source||!this._dragState.sourcePoint||!this._dragState.targetPoint)){try{const e={x:Math.round(this._dragState.sourcePoint.x),y:Math.round(this._dragState.sourcePoint.y)},t={x:Math.round(this._dragState.targetPoint.x),y:Math.round(this._dragState.targetPoint.y)},s=t.x-e.x,a=t.y-e.y,o=Math.sqrt(s*s+a*a),c=Math.max(1,Math.floor(o/At.PIXELS_PER_STEP)),d=this._dragState.source;let h="",f="";Math.abs(s)>Math.abs(a)?f=s>0?"right":"left":f=a>0?"down":"up";const y=(b,x=new Set)=>{if(x.has(b))return null;x.add(b);const v=b.getAttribute("aria-valuenow"),T=b.getAttribute("aria-valuemin"),A=b.getAttribute("aria-valuemax");if(v)return{value:v,min:T||void 0,max:A||void 0};if(b instanceof HTMLInputElement&&b.type==="range")return{value:b.value,min:b.min||void 0,max:b.max||void 0};const C=Array.from(b.children);for(const L of C)if(!x.has(L)&&(L instanceof HTMLInputElement&&L.type==="range"||L.hasAttribute("aria-valuenow"))){const j=y(L,x);if(j)return j}if(b.parentElement){const L=Array.from(b.parentElement.children);for(const j of L)if(j!==b&&!x.has(j)&&(j instanceof HTMLInputElement&&j.type==="range"||j.hasAttribute("aria-valuenow"))){const D=y(j,x);if(D)return D}if(!x.has(b.parentElement)){const j=b.parentElement.getAttribute("aria-valuenow");if(j)return{value:j,min:b.parentElement.getAttribute("aria-valuemin")||void 0,max:b.parentElement.getAttribute("aria-valuemax")||void 0}}}return null},m=y(d);if(m&&m.value){const b=m.min&&m.max?` (range: ${m.min} to ${m.max})`:"";h=` to value ${m.value}${b}`}const _={name:"comment",text:`Moving slider ${f}${h}`,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(_),this._recordMouseDragActions(e,t,c)}catch(e){console.error("[PW-RECORDER] Error capturing slider drag:",e)}this._deactivate(),this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}}};At.PIXELS_PER_STEP=5,At.WHEEL_DEBOUNCE_MS=500,At.WHEEL_MAX_ACCUMULATION_MS=1e3,At.WHEEL_TOOL_DISABLE_MS=1e3,At.WHEEL_SCROLL_TIMEOUT_MS=3e3,At.WHEEL_NOISE_AXIS_THRESHOLD=30;let df=At;function cb(i){return i.injectedScript.utils.builtins.Date.now().toString()}class U2{constructor(e){this._diagramEntries=[],this._keydownRemover=null,this._recorder=e}cursor(){return"crosshair"}install(){console.log("[GoJSLinkTool] install() — document:",this._recorder.document.URL),this._recorder.document.__skyrampGojsLinkToolActive=!0,this._diagramEntries=[];const e=Array.from(this._recorder.document.querySelectorAll("canvas"));console.log("[GoJSLinkTool] found canvases:",e.length);for(const s of e){const a=this._hookDiagram(s);a&&(this._diagramEntries.push(a),console.log("[GoJSLinkTool] hooked diagram, panelSelector:",a.panelSelector))}console.log("[GoJSLinkTool] hooked",this._diagramEntries.length,"diagram(s)");const t=s=>{s.key==="Escape"&&(this._recorder.setMode("recording"),s.preventDefault(),s.stopPropagation())};this._recorder.document.addEventListener("keydown",t,!0),this._keydownRemover=()=>this._recorder.document.removeEventListener("keydown",t,!0)}uninstall(){var e;console.log("[GoJSLinkTool] uninstall() — document:",this._recorder.document.URL),delete this._recorder.document.__skyrampGojsLinkToolActive;for(const t of this._diagramEntries)try{t.diagram.allowMove=t.prevAllowMove;const s=(e=t.diagram.toolManager)==null?void 0:e.linkingTool;s&&(s.isEnabled=t.prevLinkingEnabled),t.diagram.removeDiagramListener("LinkDrawn",t.linkDrawnHandler),t.diagram.removeDiagramListener("ExternalObjectsDropped",t.externalDropHandler),console.log("[GoJSLinkTool] restored diagram, panelSelector:",t.panelSelector)}catch(s){console.log("[GoJSLinkTool] error restoring diagram:",s)}this._diagramEntries=[],this._keydownRemover&&(this._keydownRemover(),this._keydownRemover=null)}_hookDiagram(e){var a,o,c,d;const t=(a=e.ownerDocument)==null?void 0:a.defaultView;if(!((c=(o=t==null?void 0:t.go)==null?void 0:o.Diagram)!=null&&c.fromDiv))return null;let s=e.parentElement;for(;s&&s!==e.ownerDocument.body;){const h=t.go.Diagram.fromDiv(s);if(h){const f=this._buildSelector(s),y=h.allowMove;h.allowMove=!1;const m=(d=h.toolManager)==null?void 0:d.linkingTool,_=(m==null?void 0:m.isEnabled)??!0;m&&(m.isEnabled=!0,(m.portGravity??0)<10&&(m.portGravity=10));const b=v=>{const T=v.subject;if(!(T!=null&&T.data))return;const A=String(T.data.from??""),C=String(T.data.to??"");!A||!C||(console.log("[GoJSLinkTool] LinkDrawn from:",A,"to:",C),this._emitDiagramLinkAdd(A,C,String(T.data.fromPort??""),String(T.data.toPort??""),f))};h.addDiagramListener("LinkDrawn",b);const x=v=>{v.subject.each(T=>{if(!(T!=null&&T.data)||T.data.from!==void 0)return;const A=String(T.data.category??""),C=String(T.data.key??""),L=T.location;console.log("[GoJSLinkTool] ExternalObjectsDropped category:",A,"key:",C,"loc:",L==null?void 0:L.x,L==null?void 0:L.y),setTimeout(()=>{var j,D;this._emitDiagramNodeAdd(h,f,A,C,((j=T.location)==null?void 0:j.x)??(L==null?void 0:L.x)??0,((D=T.location)==null?void 0:D.y)??(L==null?void 0:L.y)??0)},0)})};return h.addDiagramListener("ExternalObjectsDropped",x),{diagram:h,panelSelector:f,prevAllowMove:y,prevLinkingEnabled:_,linkDrawnHandler:b,externalDropHandler:x}}s=s.parentElement}return null}_emitDiagramLinkAdd(e,t,s,a,o){var d;const c={name:"diagramLinkAdd",diagramType:"gojs",panelSelector:o,fromKey:e,toKey:t,fromPort:s,toPort:a,signals:[],timestamp:cb(this._recorder)};this._recorder.recordAction(c),(d=this._recorder.overlay)==null||d.flashToolSucceeded("recordingGoJSLink")}_emitDiagramNodeAdd(e,t,s,a,o,c){var T;const d=this._diagramEntries.find(A=>{var C,L,j;try{const D=(L=(C=A.diagram.div)==null?void 0:C.ownerDocument)==null?void 0:L.defaultView;return((j=D==null?void 0:D.go)==null?void 0:j.Palette)&&A.diagram instanceof D.go.Palette}catch{return!1}}),h=(d==null?void 0:d.panelSelector)??"";let f,y,m,_,b,x=1/0;e.nodes.each(A=>{if(!(A!=null&&A.data))return;const C=String(A.data.key??"");if(!C||C===a)return;const L=A.location.x-o,j=A.location.y-c,D=Math.sqrt(L*L+j*j);D<x&&(x=D,f=C,y=Math.round(o-A.location.x),m=Math.round(c-A.location.y),_=Math.round(A.location.x),b=Math.round(A.location.y))});const v={name:"diagramNodeAdd",diagramType:"gojs",sourcePanelSelector:h,targetPanelSelector:t,sourceIsPalette:!0,targetIsPalette:!1,sourceCategory:s,sourceKey:a,targetDocX:Math.round(o),targetDocY:Math.round(c),anchorKey:f,anchorOffsetX:y,anchorOffsetY:m,anchorDocX:_,anchorDocY:b,signals:[],timestamp:cb(this._recorder)};this._recorder.recordAction(v),(T=this._recorder.overlay)==null||T.flashToolSucceeded("recordingGoJSLink")}_buildSelector(e){if(e.id)return`#${e.id}`;if(e.getAttribute("data-testid"))return`[data-testid="${e.getAttribute("data-testid")}"]`;const t=e.parentElement;if(t){const s=Array.from(t.children).indexOf(e)+1;return`${e.tagName.toLowerCase()}:nth-child(${s})`}return e.tagName.toLowerCase()}}function q2(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function ub(i){return i.injectedScript.utils.builtins.Date.now().toString()}class V2{constructor(e){this._triggerElement=null,this._triggerSelector=null,this._input=null,this._pendingFiles=[],this._helperOverlay=null,this._recorder=e}cursor(){return"pointer"}install(){const e=this._recorder.injectedScript.window;e.__pwRecorderFileChooserArmed=t=>{if(!(t.input&&t.triggerElement===t.input)){if(this._triggerElement=t.triggerElement,this._input=t.input,this._triggerSelector=t.triggerSelector||null,!this._triggerSelector&&t.triggerElement)try{this._triggerSelector=this._recorder.injectedScript.generateSelector(t.triggerElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1}).selector}catch(s){console.warn("[FileUploadTool] arm-time selector fallback failed:",s)}this._showHelperOverlay("File chooser opening... Please select a file")}},e.__pwRecorderFileChooserResolved=t=>{var s;if(!(t.input&&!this._triggerElement))if(this._pendingFiles=t.files,this._hideHelperOverlay(),this._triggerElement&&t.files.length>0){const a=t.files.map(c=>c.name);let o=this._triggerSelector;if(!o)try{o=this._recorder.injectedScript.generateSelector(this._triggerElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1}).selector}catch(c){console.warn("[FileUploadTool] resolved-time selector generation failed:",c)}if(o){const c={name:"fileChooser",selector:o,files:a,signals:[],timestamp:ub(this._recorder)};this._recorder.recordAction(c),this._recorder.setMode("recording"),(s=this._recorder.overlay)==null||s.flashToolSucceeded("fileUpload")}else console.warn("[FileUploadTool] no selector available for trigger element; action not recorded")}else console.warn("[FileUploadTool] Missing trigger element or no files selected")},this._showHelperOverlay("Click a button to upload a file")}uninstall(){const e=this._recorder.injectedScript.window;e.__pwRecorderFileChooserArmed=void 0,e.__pwRecorderFileChooserResolved=void 0,this._hideHelperOverlay(),this._triggerElement=null,this._triggerSelector=null,this._input=null,this._pendingFiles=[]}onClick(e){const t=this._getRecordActionTool();!t||!t.onClick||t.onClick(e)}onInput(e){var s;const t=this._recorder.deepEventTarget(e);if(t.nodeName==="INPUT"&&t.type.toLowerCase()==="file"){if(this._triggerElement)return;const a=t,o=this._recorder.injectedScript.generateSelector(a,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});this._recorder.recordAction({name:"setInputFiles",selector:o.selector,signals:[],files:[...a.files||[]].map(c=>c.name),timestamp:ub(this._recorder)}),this._recorder.setMode("recording"),(s=this._recorder.overlay)==null||s.flashToolSucceeded("fileUpload")}else{const a=this._getRecordActionTool();a&&a.onInput&&a.onInput(e)}}onKeyDown(e){if(e.key==="Escape"){q2(e),this._recorder.setMode("recording");return}const t=this._getRecordActionTool();t&&t.onKeyDown&&t.onKeyDown(e)}onKeyUp(e){const t=this._getRecordActionTool();t&&t.onKeyUp&&t.onKeyUp(e)}onPointerDown(e){const t=this._getRecordActionTool();t&&t.onPointerDown&&t.onPointerDown(e)}onPointerUp(e){const t=this._getRecordActionTool();t&&t.onPointerUp&&t.onPointerUp(e)}onPointerMove(e){const t=this._getRecordActionTool();t&&t.onPointerMove&&t.onPointerMove(e)}onMouseMove(e){const t=this._getRecordActionTool();t&&t.onMouseMove&&t.onMouseMove(e)}onMouseDown(e){const t=this._getRecordActionTool();t&&t.onMouseDown&&t.onMouseDown(e)}onMouseUp(e){const t=this._getRecordActionTool();t&&t.onMouseUp&&t.onMouseUp(e)}onMouseLeave(e){const t=this._getRecordActionTool();t&&t.onMouseLeave&&t.onMouseLeave(e)}onFocus(e){const t=this._getRecordActionTool();t&&t.onFocus&&t.onFocus(e)}_getRecordActionTool(){var e;return((e=this._recorder._tools)==null?void 0:e.recording)||null}_showHelperOverlay(e){this._hideHelperOverlay();const t=this._recorder.document.createElement("div");t.style.cssText=`
|
|
353
|
+
`;const a=e.parentNode;if(!a)return;a.insertBefore(s,e),e.style.display="none";const o=new Rr(s);this._pdfEmbeds.set(e,{originalParent:a,viewer:o,container:s}),await lb.renderPdfWithPdfJs({pdfUrl:t,containerElement:s,onSuccess:()=>{console.log("[PDF-Tool] ✅ PDF embed replaced successfully")},onError:c=>{console.error("[PDF-Tool] ❌ Failed to render PDF:",c),e.style.display="",s.parentNode&&s.parentNode.removeChild(s),this._pdfEmbeds.delete(e)}})}catch(t){console.error("[PDF-Tool] Error replacing PDF embed:",t)}}}function ai(i,e,t,s){return i.addEventListener(e,t,s),()=>{i.removeEventListener(e,t,s)}}function qC(i){for(const e of i)e();i.splice(0,i.length)}function ht(i){return i.injectedScript.utils.builtins.Date.now().toString()}const At=class At{constructor(e){this._dragState=null,this._listeners=[],this._lastClickTime=0,this._lastClickTimeout=null,this._lastMousePosition=null,this._wheelToggleTimeout=null,this._isWheelSequence=!1,this._wheelAccumulator=null,this._wheelDebounceTimeout=null,this._pdfViewerTool=null,this._goJSAlwaysOnRemovers=[],this._recorder=e}cursor(){return"grab"}install(){this._arm(),this._checkAndActivatePdfViewer(),this._hookGoJSDiagramsAlwaysOn()}uninstall(){this._lastClickTimeout&&(clearTimeout(this._lastClickTimeout),this._lastClickTimeout=null),this._wheelToggleTimeout&&(clearTimeout(this._wheelToggleTimeout),this._wheelToggleTimeout=null),this._flushWheelAction(),this._wheelDebounceTimeout&&(clearTimeout(this._wheelDebounceTimeout),this._wheelDebounceTimeout=null),this._dragState&&this._dragState.source&&this._dragState.target&&this._capture();for(const e of this._goJSAlwaysOnRemovers)e();this._goJSAlwaysOnRemovers=[],delete this._recorder.document.__skyrampGoJSHooked,this._disarm()}cleanup(){this._lastClickTimeout&&(clearTimeout(this._lastClickTimeout),this._lastClickTimeout=null),this._wheelToggleTimeout&&(clearTimeout(this._wheelToggleTimeout),this._wheelToggleTimeout=null),this._flushWheelAction(),this._wheelDebounceTimeout&&(clearTimeout(this._wheelDebounceTimeout),this._wheelDebounceTimeout=null),this._dragState&&this._dragState.source&&this._dragState.target&&this._capture(),this._listeners.length>0&&(this._disarm(),this._arm())}onDblClick(e){this._lastClickTimeout&&(clearTimeout(this._lastClickTimeout),this._lastClickTimeout=null);const t=e.target;if(!(!t||this._isPlaywrightElement(t))){e.preventDefault();try{const s={name:"click",selector:"body",button:"left",modifiers:0,clickCount:2,position:{x:Math.round(e.clientX),y:Math.round(e.clientY)},signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(s),this._deactivate()}catch(s){console.error("[PW-RECORDER] Error recording position-based double-click:",s),this._deactivate()}}}_flushWheelAction(){if(!this._wheelAccumulator)return;const e=Math.abs(this._wheelAccumulator.deltaX),t=Math.abs(this._wheelAccumulator.deltaY);if(e<At.WHEEL_NOISE_AXIS_THRESHOLD&&t<At.WHEEL_NOISE_AXIS_THRESHOLD){console.log("[PW-RECORDER] Suppressing Magic Mouse noise wheel:",{deltaX:this._wheelAccumulator.deltaX,deltaY:this._wheelAccumulator.deltaY,accumulatedFor:Date.now()-this._wheelAccumulator.startTime+"ms"}),this._wheelAccumulator=null;return}try{const s={name:"mouse.wheel",position:this._wheelAccumulator.position,deltaX:this._wheelAccumulator.deltaX,deltaY:this._wheelAccumulator.deltaY,deltaZ:this._wheelAccumulator.deltaZ,modifiers:this._wheelAccumulator.modifiers,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(s),console.log("[PW-RECORDER] Flushed accumulated wheel action:",{deltaX:s.deltaX,deltaY:s.deltaY,deltaZ:s.deltaZ,accumulatedFor:Date.now()-this._wheelAccumulator.startTime+"ms"})}catch(s){console.error("[PW-RECORDER] Error flushing wheel action:",s)}this._wheelAccumulator=null}_arm(){var y;this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1},(y=this._recorder.injectedScript.document.body)==null||y.setAttribute("data-pw-cursor","grab");const e=m=>{const _=m;if(this._dragState){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);b&&!this._isPlaywrightElement(b)&&(this._dragState.source=this._selectDraggableAncestor(b),this._dragState.sourcePoint={x:_.clientX,y:_.clientY})}},t=m=>{const _=m;if(this._dragState&&this._dragState.source){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);if(b&&!this._isPlaywrightElement(b)){const w=this._selectDroppableAncestor(b);w!==this._dragState.source&&(this._dragState.target=w,this._dragState.targetPoint={x:_.clientX,y:_.clientY})}}},s=m=>{const _=m;if(this._dragState&&(this._dragState.source=null,this._dragState.target=null,this._dragState.sourcePoint=null,this._dragState.targetPoint=null,this._dragState.isCanvas=!1,this._dragState.isGoJS=!1,this._dragState.isReactFlow=!1,this._dragState.isSlider=!1,this._dragState.dropDetected=!1,this._dragState.startTime=Date.now()),this._dragState){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);if(b&&!this._isPlaywrightElement(b))if(this._isReactFlowElement(b)){this._dragState.isReactFlow=!0;let w=b;for(;w&&!w.classList.contains("react-flow");)w=w.parentElement;this._dragState.source=w||b,this._dragState.sourcePoint={x:_.clientX,y:_.clientY}}else if(this._isGoJSElement(b))this._dragState.isGoJS=!0,this._dragState.source=b,this._dragState.sourcePoint={x:_.clientX,y:_.clientY};else if(this._isCanvasElement(b))this._dragState.isCanvas=!0,this._dragState.source=b,this._dragState.sourcePoint={x:_.clientX,y:_.clientY};else{const w=this._selectDraggableAncestor(b);if(w!==b)this._dragState.source=w,this._dragState.sourcePoint={x:_.clientX,y:_.clientY};else{const v=this._findSliderThumb(b);v?(this._dragState.isSlider=!0,this._dragState.source=v,this._dragState.sourcePoint={x:_.clientX,y:_.clientY}):(this._dragState.source=b,this._dragState.sourcePoint={x:_.clientX,y:_.clientY})}}}},a=m=>{const _=m;if(this._dragState&&this._dragState.source&&_.buttons===1){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);if(b&&!this._isPlaywrightElement(b)){if(this._dragState.isReactFlow&&this._isReactFlowElement(b))this._dragState.target=this._dragState.source,this._dragState.targetPoint={x:_.clientX,y:_.clientY};else if(this._dragState.isGoJS&&this._isCanvasElement(b))this._dragState.target=b,this._dragState.targetPoint={x:_.clientX,y:_.clientY};else if(this._dragState.isCanvas&&this._isCanvasElement(b))this._dragState.target=b,this._dragState.targetPoint={x:_.clientX,y:_.clientY};else if(this._dragState.isSlider)this._dragState.target=this._dragState.source,this._dragState.targetPoint={x:_.clientX,y:_.clientY};else if(!this._dragState.isCanvas&&!this._dragState.isReactFlow&&!this._dragState.isSlider){const w=this._selectDroppableAncestor(b);w!==this._dragState.source?(this._dragState.target=w,this._dragState.targetPoint={x:_.clientX,y:_.clientY}):b!==this._dragState.source&&(this._dragState.target=b,this._dragState.targetPoint={x:_.clientX,y:_.clientY})}}}},o=m=>{const _=m;if(this._dragState&&this._dragState.source&&this._dragState.sourcePoint)if(this._dragState.target)this._getSourceColumn(this._dragState.source),this._dragState.target,this._capture();else{const b=Math.sqrt(Math.pow(_.clientX-this._dragState.sourcePoint.x,2)+Math.pow(_.clientY-this._dragState.sourcePoint.y,2));if(b>=5){this._deactivate();return}if(b<5){if(_.button===2)return;this._lastClickTimeout&&clearTimeout(this._lastClickTimeout),this._lastClickTimeout=setTimeout(()=>{try{const w={name:"click",selector:"body",button:"left",modifiers:0,clickCount:1,position:{x:Math.round(_.clientX),y:Math.round(_.clientY)},signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(w),this._deactivate()}catch(w){console.error("[PW-RECORDER] Error recording position-based click:",w),this._deactivate()}this._lastClickTimeout=null},300)}}else console.log("[PW-RECORDER] PointerUp - no valid drag state")},c=m=>{const _=m;if(this._dragState&&this._dragState.source){if(this._dragState.dropDetected=!0,!this._dragState.target){const b=this._recorder.document.elementFromPoint(_.clientX,_.clientY);b&&!this._isPlaywrightElement(b)&&(this._dragState.target=this._selectDroppableAncestor(b),this._dragState.targetPoint={x:_.clientX,y:_.clientY})}this._dragState.target?(this._getSourceColumn(this._dragState.source),this._dragState.target,this._capture()):this._deactivate()}else this._deactivate()},d=m=>{var b;const _=m;if(this._dragState&&this._dragState.source){if(this._dragState.dropDetected){if(!this._dragState.target){const w=this._recorder.document.elementFromPoint(_.clientX,_.clientY);w&&!this._isPlaywrightElement(w)&&(this._dragState.target=this._selectDroppableAncestor(w),this._dragState.targetPoint={x:_.clientX,y:_.clientY})}this._dragState.target&&(this._getSourceColumn(this._dragState.source),this._dragState.target,this._capture())}else{const w=(b=_.dataTransfer)==null?void 0:b.dropEffect;if(w&&w!=="none"){this._deactivate();return}console.log("[PW-RECORDER] Drag cancelled (no drop event), not recording")}this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}},h=m=>{var T;const _=m,b=_.target;if(!b||this._isPlaywrightElement(b)||this._isGoJSElement(b))return;const w=((T=this._pdfViewerTool)==null?void 0:T.isWithinPdfViewer(b))||!1;_.ctrlKey&&!w&&m.preventDefault();let v=0;_.altKey&&(v|=1),_.ctrlKey&&(v|=2),_.metaKey&&(v|=4),_.shiftKey&&(v|=8);try{const A={x:Math.round(_.clientX),y:Math.round(_.clientY)};if(!this._isWheelSequence){this._isWheelSequence=!0;const L={name:"comment",text:"Mouse scrolling block",signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(L);const j={name:"waitForTimeout",duration:At.WHEEL_SCROLL_TIMEOUT_MS,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(j)}if(!this._lastMousePosition||this._lastMousePosition.x!==A.x||this._lastMousePosition.y!==A.y){const L={name:"mouse.move",position:A,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(L),this._lastMousePosition=A}const C=Date.now();this._wheelAccumulator?(this._wheelAccumulator.deltaX+=_.deltaX,this._wheelAccumulator.deltaY+=_.deltaY,this._wheelAccumulator.deltaZ+=_.deltaZ,this._wheelAccumulator.position=A,this._wheelAccumulator.modifiers=v,C-this._wheelAccumulator.startTime>At.WHEEL_MAX_ACCUMULATION_MS&&(this._flushWheelAction(),this._wheelAccumulator={deltaX:_.deltaX,deltaY:_.deltaY,deltaZ:_.deltaZ,position:A,modifiers:v,startTime:C})):this._wheelAccumulator={deltaX:_.deltaX,deltaY:_.deltaY,deltaZ:_.deltaZ,position:A,modifiers:v,startTime:C},this._wheelDebounceTimeout&&clearTimeout(this._wheelDebounceTimeout),this._wheelDebounceTimeout=setTimeout(()=>{this._flushWheelAction(),this._wheelDebounceTimeout=null},At.WHEEL_DEBOUNCE_MS),this._wheelToggleTimeout&&clearTimeout(this._wheelToggleTimeout),this._wheelToggleTimeout=setTimeout(()=>{this._deactivate()},At.WHEEL_TOOL_DISABLE_MS)}catch(A){console.error("[PW-RECORDER] Error recording wheel event:",A)}},f=m=>{const _=m,b=_.target;if(!(!b||this._isPlaywrightElement(b))){m.preventDefault();try{this._lastMousePosition={x:Math.round(_.clientX),y:Math.round(_.clientY)};const w={name:"click",selector:"body",button:"right",modifiers:0,clickCount:1,position:{x:Math.round(_.clientX),y:Math.round(_.clientY)},signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(w),this._deactivate()}catch(w){console.error("[PW-RECORDER] Error recording right-click:",w),this._deactivate()}}};this._listeners=[ai(this._recorder.document,"dragstart",e,!0),ai(this._recorder.document,"dragover",t,!0),ai(this._recorder.document,"drop",c,!0),ai(this._recorder.document,"dragend",d,!0),ai(this._recorder.document,"pointerdown",s,!0),ai(this._recorder.document,"pointermove",a,!0),ai(this._recorder.document,"pointerup",o,!0),ai(this._recorder.document,"wheel",h,{passive:!1,capture:!0}),ai(this._recorder.document,"contextmenu",f,!0)]}_disarm(){qC(this._listeners),this._listeners=[],this._dragState=null}_deactivate(){this._lastClickTimeout&&(clearTimeout(this._lastClickTimeout),this._lastClickTimeout=null),this._wheelToggleTimeout&&(clearTimeout(this._wheelToggleTimeout),this._wheelToggleTimeout=null),this._wheelDebounceTimeout&&(clearTimeout(this._wheelDebounceTimeout),this._wheelDebounceTimeout=null),this._isWheelSequence=!1,this._wheelAccumulator=null,this._disarm(),this._recorder.state.mode==="recordingDrag"&&this._recorder.setMode("recording")}_checkAndActivatePdfViewer(){const e=this._recorder.document;if(window.__pwPdfViewerInstalled){console.log("[DD-Tool] PDF viewer already installed, skipping");return}const t=e.querySelector('embed[type="application/pdf"], iframe[src*=".pdf"]'),s=window.location.href.toLowerCase().endsWith(".pdf")||window.location.href.includes("s3.amazonaws.com")||window.location.href.includes(".s3.");(t||s)&&(console.log("[DD-Tool] PDF detected, activating PDF viewer tool..."),this._pdfViewerTool=new UC(this._recorder),this._pdfViewerTool.install(),window.__pwPdfViewerInstalled=!0,console.log("[DD-Tool] ✅ PDF viewer tool activated (permanent)"))}_getActualPageElement(e){for(const t of e){const s=t;if(s&&s.nodeType===Node.ELEMENT_NODE&&!this._isPlaywrightElement(s))return s}return null}_isPlaywrightElement(e){var o;const t=((o=e.nodeName)==null?void 0:o.toLowerCase())||"",s=e.id||"";return t.startsWith("x-pw-")||s==="x-pw-glass"||e.classList.contains("playwright-overlay")||e.hasAttribute("data-playwright")}_isCanvasElement(e){var t;return((t=e.tagName)==null?void 0:t.toLowerCase())==="canvas"}_isGoJSElement(e){var s,a;if(((s=e.tagName)==null?void 0:s.toLowerCase())!=="canvas")return!1;const t=(a=e.ownerDocument)==null?void 0:a.defaultView;return!!(t!=null&&t.myDiagram||t!=null&&t.myPalette)}_findGoJSContainer(e){var a,o,c;const t=(a=e.ownerDocument)==null?void 0:a.defaultView;if(!((c=(o=t==null?void 0:t.go)==null?void 0:o.Diagram)!=null&&c.fromDiv))return null;let s=e.parentElement;for(;s&&s!==e.ownerDocument.body;){const d=t.go.Diagram.fromDiv(s);if(d){const h=!!(t.go.Palette&&d instanceof t.go.Palette);let f;if(s.id)f=`#${s.id}`;else if(s.getAttribute("data-testid"))f=`[data-testid="${s.getAttribute("data-testid")}"]`;else{const y=s.parentElement;if(y){const m=Array.from(y.children).indexOf(s)+1;f=`${s.tagName.toLowerCase()}:nth-child(${m})`}else f=s.tagName.toLowerCase()}return{diagram:d,isPalette:h,containerSelector:f}}s=s.parentElement}return null}_buildSelectorFromEl(e){if(e.id)return`#${e.id}`;if(e.getAttribute("data-testid"))return`[data-testid="${e.getAttribute("data-testid")}"]`;const t=e.parentElement;if(t){const s=Array.from(t.children).indexOf(e)+1;return`${e.tagName.toLowerCase()}:nth-child(${s})`}return e.tagName.toLowerCase()}_emitGoJSNodeAdd(e,t,s,a,o,c,d){let h,f,y,m,_,b=1/0;e.nodes.each(v=>{if(!(v!=null&&v.data))return;const T=String(v.data.key??"");if(!T||T===o)return;const A=v.location.x-c,C=v.location.y-d,L=Math.sqrt(A*A+C*C);L<b&&(b=L,h=T,f=Math.round(c-v.location.x),y=Math.round(d-v.location.y),m=Math.round(v.location.x),_=Math.round(v.location.y))});const w={name:"diagramNodeAdd",diagramType:"gojs",sourcePanelSelector:t,targetPanelSelector:s,sourceIsPalette:!0,targetIsPalette:!1,sourceCategory:a,sourceKey:o,targetDocX:Math.round(c),targetDocY:Math.round(d),anchorKey:h,anchorOffsetX:f,anchorOffsetY:y,anchorDocX:m,anchorDocY:_,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(w),this._deactivate()}_emitGoJSLinkAdd(e,t,s,a,o){const c={name:"diagramLinkAdd",diagramType:"gojs",panelSelector:o,fromKey:e,toKey:t,fromPort:s,toPort:a,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(c),this._deactivate()}_hookGoJSDiagramsAlwaysOn(){var o,c;const e=this._recorder.document;if(e.__skyrampGoJSHooked)return;const t=e.defaultView;if(!((c=(o=t==null?void 0:t.go)==null?void 0:o.Diagram)!=null&&c.fromDiv))return;const s=Array.from(e.querySelectorAll("canvas"));if(!s.length)return;const a=new Set;for(const d of s){let h=d.parentElement;for(;h&&h!==e.body;){const f=t.go.Diagram.fromDiv(h);if(f){if(!!!(t.go.Palette&&f instanceof t.go.Palette)&&!a.has(f)){a.add(f);const m=this._buildSelectorFromEl(h),_=w=>{e.__skyrampGojsLinkToolActive||w.subject.each(v=>{if(!(v!=null&&v.data)||v.data.from!==void 0)return;const T=String(v.data.category??""),A=String(v.data.key??""),C=v.location;let L="";try{const j=Array.from(e.querySelectorAll("canvas"));for(const D of j){let F=D.parentElement;for(;F&&F!==e.body;){const B=t.go.Diagram.fromDiv(F);if(B&&t.go.Palette&&B instanceof t.go.Palette){L=this._buildSelectorFromEl(F);break}F=F.parentElement}if(L)break}}catch{}setTimeout(()=>{const j=v.location??C;this._emitGoJSNodeAdd(f,L,m,T,A,(j==null?void 0:j.x)??0,(j==null?void 0:j.y)??0)},0)})},b=w=>{if(e.__skyrampGojsLinkToolActive)return;const v=w.subject;if(!(v!=null&&v.data))return;const T=String(v.data.from??""),A=String(v.data.to??"");!T||!A||this._emitGoJSLinkAdd(T,A,String(v.data.fromPort??""),String(v.data.toPort??""),m)};f.addDiagramListener("ExternalObjectsDropped",_),f.addDiagramListener("LinkDrawn",b),this._goJSAlwaysOnRemovers.push(()=>{try{f.removeDiagramListener("ExternalObjectsDropped",_),f.removeDiagramListener("LinkDrawn",b)}catch{}})}break}h=h.parentElement}}a.size>0&&(e.__skyrampGoJSHooked=!0,console.log("[DragDropTool] always-on GoJS listeners registered on",a.size,"diagram(s)"))}_captureGoJSDrag(){var e,t,s,a,o;if(!(!((e=this._dragState)!=null&&e.source)||!((t=this._dragState)!=null&&t.target)||!((s=this._dragState)!=null&&s.sourcePoint)||!((a=this._dragState)!=null&&a.targetPoint))){try{const c=this._dragState.source,d=this._dragState.target,h=(o=c.ownerDocument)==null?void 0:o.defaultView,f=this._findGoJSContainer(c),y=this._findGoJSContainer(d),m=(f==null?void 0:f.containerSelector)??"",_=(y==null?void 0:y.containerSelector)??"",b=(f==null?void 0:f.isPalette)??!1,w=(y==null?void 0:y.isPalette)??!1;let v="",T="";const A=f==null?void 0:f.diagram;if(A&&(h!=null&&h.go)){const B=c.getBoundingClientRect(),q=this._dragState.sourcePoint.x-B.left,O=this._dragState.sourcePoint.y-B.top;try{const Q=A.transformViewToDoc(new h.go.Point(q,O)),se=A.findPartAt(Q,!1);se!=null&&se.data&&(v=se.data.category??"",T=String(se.data.key??""))}catch{}}let C=0,L=0;const j=y==null?void 0:y.diagram;if(j&&(h!=null&&h.go)){const B=d.getBoundingClientRect(),q=this._dragState.targetPoint.x-B.left,O=this._dragState.targetPoint.y-B.top;try{const Q=j.transformViewToDoc(new h.go.Point(q,O));C=Math.round(Q.x),L=Math.round(Q.y)}catch{}}if(!b&&T===""){this._deactivate();return}const D=c.ownerDocument;if(b&&D.__skyrampGoJSHooked){this._deactivate();return}const F={name:"diagramNodeAdd",diagramType:"gojs",sourcePanelSelector:m,targetPanelSelector:_,sourceIsPalette:b,targetIsPalette:w,sourceCategory:v,sourceKey:T,targetDocX:C,targetDocY:L,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(F),this._deactivate()}catch(c){console.error("[PW-RECORDER] Error capturing GoJS drag:",c),this._captureCanvasDrag();return}this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}}_isReactFlowElement(e){let t=e;for(;t;){const s=Array.from(t.classList||[]);if(s.includes("react-flow")||s.includes("react-flow__pane")||s.includes("react-flow__viewport"))return!0;t=t.parentElement}return!1}_getSelectorSafeElement(e){var s;let t=e;for(;t;){if((s=t.tagName)==null||s.toLowerCase(),t.namespaceURI==="http://www.w3.org/1999/xhtml")return t;if(t.namespaceURI==="http://www.w3.org/2000/svg"){t=t.parentElement;continue}if(t.hasAttribute("data-testid")||t.hasAttribute("data-item-id")||t.hasAttribute("data-column-id")||t.hasAttribute("draggable"))return t;t=t.parentElement}return e}_isSliderThumb(e){var s,a;const t=typeof e.className=="string"?e.className:((s=e.className)==null?void 0:s.baseVal)||"";return t.includes("MuiSlider-mark")||t.includes("MuiSlider-markLabel")||t.includes("slider-label")||t.includes("slider-mark")?!1:!!(t.includes("MuiSlider-thumb")||e.querySelector('input[type="range"]')||((a=e.tagName)==null?void 0:a.toLowerCase())==="input"&&e.type==="range"||t.includes("slider-thumb")||t.includes("rc-slider-handle")||t.includes("noUi-handle")||e.hasAttribute("role")&&e.getAttribute("role")==="slider")}_findSliderThumb(e){return this._isSliderThumb(e)?e:e.parentElement&&this._isSliderThumb(e.parentElement)?e.parentElement:null}_findSliderRoot(e){var s,a;let t=e;for(let o=0;o<5&&t;o++){const c=typeof t.className=="string"?t.className:((s=t.className)==null?void 0:s.baseVal)||"";if((((a=t.tagName)==null?void 0:a.toLowerCase())||"")==="input"&&t.type==="range"||c.includes("MuiSlider-root")||c.includes("rc-slider")||c.includes("noUi-target")||c.includes("slider-container")||t.hasAttribute("role")&&t.getAttribute("role")==="slider")return t;t=t.parentElement}return null}_shouldIgnoreForSlider(e){var a,o;const t=typeof e.className=="string"?e.className:((a=e.className)==null?void 0:a.baseVal)||"",s=((o=e.tagName)==null?void 0:o.toLowerCase())||"";return!!(t.includes("MuiSlider-markLabel")||t.includes("MuiSlider-mark")||t.includes("MuiSlider-valueLabel")||t.includes("slider-label")||(s==="span"||s==="div")&&!t.includes("MuiSlider-thumb")&&!t.includes("slider-thumb"))}_selectDraggableAncestor(e){var o;const t=["[data-item-id]",'[draggable="true"]',"[data-draggable]",'[role="listitem"]',".draggable",'[data-testid*="drag"]'];let s=e;const a=(o=s.tagName)==null?void 0:o.toLowerCase();(a==="button"||a==="input"||a==="select"||a==="textarea"||a==="a")&&(s=s.parentElement);for(let c=0;c<5&&s;c++){if(s.hasAttribute("data-item-id")||t.some(d=>{var h;return(h=s==null?void 0:s.matches)==null?void 0:h.call(s,d)}))return s;s=s.parentElement}return e}_getSourceColumn(e){const t=e.getAttribute("data-source-column");if(t){const a=this._recorder.document.querySelector(`[data-column-id="${t}"]`);if(a)return a}let s=e;for(let a=0;a<10&&s;a++){if(s.hasAttribute("data-column-id"))return s;s=s.parentElement}return null}_selectDroppableAncestor(e){let t=e;(t.hasAttribute("data-item-id")||t.hasAttribute("draggable"))&&(t=t.parentElement);for(let a=0;a<8&&t;a++){if(t.hasAttribute("data-column-id"))return t;if(t.hasAttribute("data-droppable")&&t.hasAttribute("data-testid")){const o=t.getAttribute("data-testid");if(o&&o.startsWith("column-"))return t}if(t.hasAttribute("data-drop-target-for-element")&&t.hasAttribute("data-testid")){const o=t.getAttribute("data-testid");if(o&&o.startsWith("calendar-cell-"))return t}t=t.parentElement}t=e,(t.hasAttribute("data-item-id")||t.hasAttribute("draggable"))&&(t=t.parentElement);const s=["[data-droppable]","[data-drop-target-for-element]",'[role="list"]','[role="listbox"]','[role="grid"]',".droppable",".drop-zone","[data-drop-zone]",".vue-grid-layout",".react-grid-layout","[data-rbd-droppable-id]","[data-sortable]"];for(let a=0;a<8&&t;a++){if(s.some(o=>{var c;return(c=t==null?void 0:t.matches)==null?void 0:c.call(t,o)}))return t;t=t.parentElement}t=e,(t.hasAttribute("data-item-id")||t.hasAttribute("draggable"))&&(t=t.parentElement);for(let a=0;a<8&&t;a++){if(t.querySelectorAll(':scope > [draggable="true"]').length>=2)return t;t=t.parentElement}return e}_relativePoint(e,t,s){const a=e.getBoundingClientRect();return{x:Math.max(0,Math.min(t-a.left,a.width)),y:Math.max(0,Math.min(s-a.top,a.height))}}_stableIdSelector(e){const t=e.getAttribute("id");return!t||!/^[a-zA-Z]/.test(t)||/\s/.test(t)||!t.split(/[-_]/).every(s=>s.length>0&&/^[a-zA-Z]+$/.test(s))?null:{selector:`#${t}`}}_stableContainerClassSelector(e){const t=["vue-grid-layout","react-grid-layout"];for(const s of t)if(e.classList.contains(s))return{selector:`.${s}`};return null}_extractSourceLabel(e){const t=e.getAttribute("aria-label");if(t&&t.trim())return t.trim().slice(0,80);const a=(e.innerText||e.textContent||"").trim().replace(/\s+/g," ");if(a)return a.slice(0,80);const o=e.getAttribute("title");return o&&o.trim()?o.trim().slice(0,80):""}_isCenter(e,t){const s=t.getBoundingClientRect(),a=s.width/2,o=s.height/2,c=5;return Math.abs(e.x-a)<c&&Math.abs(e.y-o)<c}_capture(){if(!this._dragState||!this._dragState.source||!this._dragState.target||this._dragState.captured)return;if(this._dragState.captured=!0,this._dragState.isReactFlow){this._captureReactFlowDrag();return}if(this._dragState.isGoJS){this._captureGoJSDrag();return}if(this._dragState.isCanvas){this._captureCanvasDrag();return}if(this._dragState.isSlider){this._captureSliderDrag();return}const e=this._getSourceColumn(this._dragState.source),t=this._dragState.target.hasAttribute("data-column-id")?this._dragState.target:this._getSourceColumn(this._dragState.target);e&&t&&(e.getAttribute("data-column-id"),t.getAttribute("data-column-id"));try{const s=this._dragState.source.getAttribute("data-testid")||this._dragState.source.getAttribute("data-item-id"),a=this._dragState.target.getAttribute("data-testid")||this._dragState.target.getAttribute("data-column-id");let o,c;if(s&&a)o={selector:`[data-testid="${s}"]`},c={selector:`[data-testid="${a}"]`};else{const _=this._getSelectorSafeElement(this._dragState.source),b=this._getSelectorSafeElement(this._dragState.target);o=this._stableIdSelector(_)??this._stableContainerClassSelector(_)??this._recorder.injectedScript.generateSelector(_,{testIdAttributeName:this._recorder.state.testIdAttributeName||"data-testid"}),c=this._stableIdSelector(b)??this._stableContainerClassSelector(b)??this._recorder.injectedScript.generateSelector(b,{testIdAttributeName:this._recorder.state.testIdAttributeName||"data-testid"})}const d=this._dragState.sourcePoint?this._relativePoint(this._dragState.source,this._dragState.sourcePoint.x,this._dragState.sourcePoint.y):{x:this._dragState.source.getBoundingClientRect().width/2,y:this._dragState.source.getBoundingClientRect().height/2},h=this._dragState.targetPoint?this._relativePoint(this._dragState.target,this._dragState.targetPoint.x,this._dragState.targetPoint.y):{x:this._dragState.target.getBoundingClientRect().width/2,y:this._dragState.target.getBoundingClientRect().height/2},f=Date.now()-this._dragState.startTime,y={name:"dragTo",selector:o.selector,target:c.selector,signals:[],timestamp:ht(this._recorder)};this._isCenter(d,this._dragState.source)||(y.sourcePosition={x:Math.round(d.x),y:Math.round(d.y)}),this._isCenter(h,this._dragState.target)||(y.targetPosition={x:Math.round(h.x),y:Math.round(h.y)}),f>500&&(y.duration=f);const m=this._extractSourceLabel(this._dragState.source);m&&(y.sourceLabel=m),this._recorder.recordAction(y),this._deactivate()}catch(s){console.error("[PW-RECORDER] Error generating selectors:",s);try{const a=this._dragState.source.getAttribute("data-testid")||this._dragState.source.getAttribute("data-item-id"),o=this._dragState.target.getAttribute("data-testid")||this._dragState.target.getAttribute("data-column-id");if(a&&o){const c={name:"dragTo",selector:`[data-testid="${a}"]`,target:`[data-testid="${o}"]`,signals:[],timestamp:ht(this._recorder)},d=this._extractSourceLabel(this._dragState.source);d&&(c.sourceLabel=d),this._recorder.recordAction(c)}}catch(a){console.error("[PW-RECORDER] Fallback also failed:",a)}this._deactivate()}this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}_roundPosition(e){return{x:Math.round(e.x),y:Math.round(e.y)}}_recordMouseDragActions(e,t,s=10){const a={name:"mouse.move",position:this._roundPosition(e),signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(a);const o={name:"mouse.down",signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(o);const c={name:"mouse.move",position:this._roundPosition(t),steps:s,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(c);const d={name:"mouse.up",signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(d)}_captureReactFlowDrag(){if(!(!this._dragState||!this._dragState.source||!this._dragState.target)){try{const t=this._dragState.source.getBoundingClientRect(),s=this._dragState.sourcePoint?{x:this._dragState.sourcePoint.x,y:this._dragState.sourcePoint.y}:{x:t.left+t.width/2,y:t.top+t.height/2},a=this._dragState.targetPoint?{x:this._dragState.targetPoint.x,y:this._dragState.targetPoint.y}:{x:t.left+t.width/2,y:t.top+t.height/2};this._recordMouseDragActions(s,a,10)}catch(e){console.error("[PW-RECORDER] Error capturing React Flow drag:",e)}this._deactivate(),this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}}_captureCanvasDrag(){if(!(!this._dragState||!this._dragState.source||!this._dragState.target)){try{const e=this._dragState.source,t=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName||"data-testid"}),s=this._dragState.sourcePoint?this._relativePoint(e,this._dragState.sourcePoint.x,this._dragState.sourcePoint.y):{x:e.getBoundingClientRect().width/2,y:e.getBoundingClientRect().height/2},a=this._dragState.targetPoint?this._relativePoint(e,this._dragState.targetPoint.x,this._dragState.targetPoint.y):{x:e.getBoundingClientRect().width/2,y:e.getBoundingClientRect().height/2},o=Date.now()-this._dragState.startTime,c={name:"dragTo",selector:t.selector,target:t.selector,sourcePosition:{x:Math.round(s.x),y:Math.round(s.y)},targetPosition:{x:Math.round(a.x),y:Math.round(a.y)},signals:[],timestamp:ht(this._recorder)};o>500&&(c.duration=o),this._recorder.recordAction(c)}catch(e){console.error("[PW-RECORDER] Error capturing canvas drag:",e)}this._deactivate(),this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}}_captureSliderDrag(){if(!(!this._dragState||!this._dragState.source||!this._dragState.sourcePoint||!this._dragState.targetPoint)){try{const e={x:Math.round(this._dragState.sourcePoint.x),y:Math.round(this._dragState.sourcePoint.y)},t={x:Math.round(this._dragState.targetPoint.x),y:Math.round(this._dragState.targetPoint.y)},s=t.x-e.x,a=t.y-e.y,o=Math.sqrt(s*s+a*a),c=Math.max(1,Math.floor(o/At.PIXELS_PER_STEP)),d=this._dragState.source;let h="",f="";Math.abs(s)>Math.abs(a)?f=s>0?"right":"left":f=a>0?"down":"up";const y=(b,w=new Set)=>{if(w.has(b))return null;w.add(b);const v=b.getAttribute("aria-valuenow"),T=b.getAttribute("aria-valuemin"),A=b.getAttribute("aria-valuemax");if(v)return{value:v,min:T||void 0,max:A||void 0};if(b instanceof HTMLInputElement&&b.type==="range")return{value:b.value,min:b.min||void 0,max:b.max||void 0};const C=Array.from(b.children);for(const L of C)if(!w.has(L)&&(L instanceof HTMLInputElement&&L.type==="range"||L.hasAttribute("aria-valuenow"))){const j=y(L,w);if(j)return j}if(b.parentElement){const L=Array.from(b.parentElement.children);for(const j of L)if(j!==b&&!w.has(j)&&(j instanceof HTMLInputElement&&j.type==="range"||j.hasAttribute("aria-valuenow"))){const D=y(j,w);if(D)return D}if(!w.has(b.parentElement)){const j=b.parentElement.getAttribute("aria-valuenow");if(j)return{value:j,min:b.parentElement.getAttribute("aria-valuemin")||void 0,max:b.parentElement.getAttribute("aria-valuemax")||void 0}}}return null},m=y(d);if(m&&m.value){const b=m.min&&m.max?` (range: ${m.min} to ${m.max})`:"";h=` to value ${m.value}${b}`}const _={name:"comment",text:`Moving slider ${f}${h}`,signals:[],timestamp:ht(this._recorder)};this._recorder.recordAction(_),this._recordMouseDragActions(e,t,c)}catch(e){console.error("[PW-RECORDER] Error capturing slider drag:",e)}this._deactivate(),this._dragState={source:null,target:null,sourcePoint:null,targetPoint:null,startTime:Date.now(),isCanvas:!1,isGoJS:!1,isReactFlow:!1,isSlider:!1,dropDetected:!1,captured:!1}}}};At.PIXELS_PER_STEP=5,At.WHEEL_DEBOUNCE_MS=500,At.WHEEL_MAX_ACCUMULATION_MS=1e3,At.WHEEL_TOOL_DISABLE_MS=1e3,At.WHEEL_SCROLL_TIMEOUT_MS=3e3,At.WHEEL_NOISE_AXIS_THRESHOLD=30;let df=At;function cb(i){return i.injectedScript.utils.builtins.Date.now().toString()}class VC{constructor(e){this._diagramEntries=[],this._keydownRemover=null,this._recorder=e}cursor(){return"crosshair"}install(){console.log("[GoJSLinkTool] install() — document:",this._recorder.document.URL),this._recorder.document.__skyrampGojsLinkToolActive=!0,this._diagramEntries=[];const e=Array.from(this._recorder.document.querySelectorAll("canvas"));console.log("[GoJSLinkTool] found canvases:",e.length);for(const s of e){const a=this._hookDiagram(s);a&&(this._diagramEntries.push(a),console.log("[GoJSLinkTool] hooked diagram, panelSelector:",a.panelSelector))}console.log("[GoJSLinkTool] hooked",this._diagramEntries.length,"diagram(s)");const t=s=>{s.key==="Escape"&&(this._recorder.setMode("recording"),s.preventDefault(),s.stopPropagation())};this._recorder.document.addEventListener("keydown",t,!0),this._keydownRemover=()=>this._recorder.document.removeEventListener("keydown",t,!0)}uninstall(){var e;console.log("[GoJSLinkTool] uninstall() — document:",this._recorder.document.URL),delete this._recorder.document.__skyrampGojsLinkToolActive;for(const t of this._diagramEntries)try{t.diagram.allowMove=t.prevAllowMove;const s=(e=t.diagram.toolManager)==null?void 0:e.linkingTool;s&&(s.isEnabled=t.prevLinkingEnabled),t.diagram.removeDiagramListener("LinkDrawn",t.linkDrawnHandler),t.diagram.removeDiagramListener("ExternalObjectsDropped",t.externalDropHandler),console.log("[GoJSLinkTool] restored diagram, panelSelector:",t.panelSelector)}catch(s){console.log("[GoJSLinkTool] error restoring diagram:",s)}this._diagramEntries=[],this._keydownRemover&&(this._keydownRemover(),this._keydownRemover=null)}_hookDiagram(e){var a,o,c,d;const t=(a=e.ownerDocument)==null?void 0:a.defaultView;if(!((c=(o=t==null?void 0:t.go)==null?void 0:o.Diagram)!=null&&c.fromDiv))return null;let s=e.parentElement;for(;s&&s!==e.ownerDocument.body;){const h=t.go.Diagram.fromDiv(s);if(h){const f=this._buildSelector(s),y=h.allowMove;h.allowMove=!1;const m=(d=h.toolManager)==null?void 0:d.linkingTool,_=(m==null?void 0:m.isEnabled)??!0;m&&(m.isEnabled=!0,(m.portGravity??0)<10&&(m.portGravity=10));const b=v=>{const T=v.subject;if(!(T!=null&&T.data))return;const A=String(T.data.from??""),C=String(T.data.to??"");!A||!C||(console.log("[GoJSLinkTool] LinkDrawn from:",A,"to:",C),this._emitDiagramLinkAdd(A,C,String(T.data.fromPort??""),String(T.data.toPort??""),f))};h.addDiagramListener("LinkDrawn",b);const w=v=>{v.subject.each(T=>{if(!(T!=null&&T.data)||T.data.from!==void 0)return;const A=String(T.data.category??""),C=String(T.data.key??""),L=T.location;console.log("[GoJSLinkTool] ExternalObjectsDropped category:",A,"key:",C,"loc:",L==null?void 0:L.x,L==null?void 0:L.y),setTimeout(()=>{var j,D;this._emitDiagramNodeAdd(h,f,A,C,((j=T.location)==null?void 0:j.x)??(L==null?void 0:L.x)??0,((D=T.location)==null?void 0:D.y)??(L==null?void 0:L.y)??0)},0)})};return h.addDiagramListener("ExternalObjectsDropped",w),{diagram:h,panelSelector:f,prevAllowMove:y,prevLinkingEnabled:_,linkDrawnHandler:b,externalDropHandler:w}}s=s.parentElement}return null}_emitDiagramLinkAdd(e,t,s,a,o){var d;const c={name:"diagramLinkAdd",diagramType:"gojs",panelSelector:o,fromKey:e,toKey:t,fromPort:s,toPort:a,signals:[],timestamp:cb(this._recorder)};this._recorder.recordAction(c),(d=this._recorder.overlay)==null||d.flashToolSucceeded("recordingGoJSLink")}_emitDiagramNodeAdd(e,t,s,a,o,c){var T;const d=this._diagramEntries.find(A=>{var C,L,j;try{const D=(L=(C=A.diagram.div)==null?void 0:C.ownerDocument)==null?void 0:L.defaultView;return((j=D==null?void 0:D.go)==null?void 0:j.Palette)&&A.diagram instanceof D.go.Palette}catch{return!1}}),h=(d==null?void 0:d.panelSelector)??"";let f,y,m,_,b,w=1/0;e.nodes.each(A=>{if(!(A!=null&&A.data))return;const C=String(A.data.key??"");if(!C||C===a)return;const L=A.location.x-o,j=A.location.y-c,D=Math.sqrt(L*L+j*j);D<w&&(w=D,f=C,y=Math.round(o-A.location.x),m=Math.round(c-A.location.y),_=Math.round(A.location.x),b=Math.round(A.location.y))});const v={name:"diagramNodeAdd",diagramType:"gojs",sourcePanelSelector:h,targetPanelSelector:t,sourceIsPalette:!0,targetIsPalette:!1,sourceCategory:s,sourceKey:a,targetDocX:Math.round(o),targetDocY:Math.round(c),anchorKey:f,anchorOffsetX:y,anchorOffsetY:m,anchorDocX:_,anchorDocY:b,signals:[],timestamp:cb(this._recorder)};this._recorder.recordAction(v),(T=this._recorder.overlay)==null||T.flashToolSucceeded("recordingGoJSLink")}_buildSelector(e){if(e.id)return`#${e.id}`;if(e.getAttribute("data-testid"))return`[data-testid="${e.getAttribute("data-testid")}"]`;const t=e.parentElement;if(t){const s=Array.from(t.children).indexOf(e)+1;return`${e.tagName.toLowerCase()}:nth-child(${s})`}return e.tagName.toLowerCase()}}function FC(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function ub(i){return i.injectedScript.utils.builtins.Date.now().toString()}class GC{constructor(e){this._triggerElement=null,this._triggerSelector=null,this._input=null,this._pendingFiles=[],this._helperOverlay=null,this._recorder=e}cursor(){return"pointer"}install(){const e=this._recorder.injectedScript.window;e.__pwRecorderFileChooserArmed=t=>{if(!(t.input&&t.triggerElement===t.input)){if(this._triggerElement=t.triggerElement,this._input=t.input,this._triggerSelector=t.triggerSelector||null,!this._triggerSelector&&t.triggerElement)try{this._triggerSelector=this._recorder.injectedScript.generateSelector(t.triggerElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1}).selector}catch(s){console.warn("[FileUploadTool] arm-time selector fallback failed:",s)}this._showHelperOverlay("File chooser opening... Please select a file")}},e.__pwRecorderFileChooserResolved=t=>{var s;if(!(t.input&&!this._triggerElement))if(this._pendingFiles=t.files,this._hideHelperOverlay(),this._triggerElement&&t.files.length>0){const a=t.files.map(c=>c.name);let o=this._triggerSelector;if(!o)try{o=this._recorder.injectedScript.generateSelector(this._triggerElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1}).selector}catch(c){console.warn("[FileUploadTool] resolved-time selector generation failed:",c)}if(o){const c={name:"fileChooser",selector:o,files:a,signals:[],timestamp:ub(this._recorder)};this._recorder.recordAction(c),this._recorder.setMode("recording"),(s=this._recorder.overlay)==null||s.flashToolSucceeded("fileUpload")}else console.warn("[FileUploadTool] no selector available for trigger element; action not recorded")}else console.warn("[FileUploadTool] Missing trigger element or no files selected")},this._showHelperOverlay("Click a button to upload a file")}uninstall(){const e=this._recorder.injectedScript.window;e.__pwRecorderFileChooserArmed=void 0,e.__pwRecorderFileChooserResolved=void 0,this._hideHelperOverlay(),this._triggerElement=null,this._triggerSelector=null,this._input=null,this._pendingFiles=[]}onClick(e){const t=this._getRecordActionTool();!t||!t.onClick||t.onClick(e)}onInput(e){var s;const t=this._recorder.deepEventTarget(e);if(t.nodeName==="INPUT"&&t.type.toLowerCase()==="file"){if(this._triggerElement)return;const a=t,o=this._recorder.injectedScript.generateSelector(a,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});this._recorder.recordAction({name:"setInputFiles",selector:o.selector,signals:[],files:[...a.files||[]].map(c=>c.name),timestamp:ub(this._recorder)}),this._recorder.setMode("recording"),(s=this._recorder.overlay)==null||s.flashToolSucceeded("fileUpload")}else{const a=this._getRecordActionTool();a&&a.onInput&&a.onInput(e)}}onKeyDown(e){if(e.key==="Escape"){FC(e),this._recorder.setMode("recording");return}const t=this._getRecordActionTool();t&&t.onKeyDown&&t.onKeyDown(e)}onKeyUp(e){const t=this._getRecordActionTool();t&&t.onKeyUp&&t.onKeyUp(e)}onPointerDown(e){const t=this._getRecordActionTool();t&&t.onPointerDown&&t.onPointerDown(e)}onPointerUp(e){const t=this._getRecordActionTool();t&&t.onPointerUp&&t.onPointerUp(e)}onPointerMove(e){const t=this._getRecordActionTool();t&&t.onPointerMove&&t.onPointerMove(e)}onMouseMove(e){const t=this._getRecordActionTool();t&&t.onMouseMove&&t.onMouseMove(e)}onMouseDown(e){const t=this._getRecordActionTool();t&&t.onMouseDown&&t.onMouseDown(e)}onMouseUp(e){const t=this._getRecordActionTool();t&&t.onMouseUp&&t.onMouseUp(e)}onMouseLeave(e){const t=this._getRecordActionTool();t&&t.onMouseLeave&&t.onMouseLeave(e)}onFocus(e){const t=this._getRecordActionTool();t&&t.onFocus&&t.onFocus(e)}_getRecordActionTool(){var e;return((e=this._recorder._tools)==null?void 0:e.recording)||null}_showHelperOverlay(e){this._hideHelperOverlay();const t=this._recorder.document.createElement("div");t.style.cssText=`
|
|
354
354
|
position: fixed;
|
|
355
355
|
top: 20px;
|
|
356
356
|
left: 50%;
|
|
@@ -377,7 +377,7 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i
|
|
|
377
377
|
transform: translateX(-50%) translateY(0);
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
|
-
`,this._recorder.document.head.appendChild(s),this._recorder.document.body.appendChild(t),this._helperOverlay=t}_hideHelperOverlay(){this._helperOverlay&&(this._helperOverlay.remove(),this._helperOverlay=null)}}function db(i,e,t,s){return i.addEventListener(e,t,s),()=>{i.removeEventListener(e,t,s)}}function F2(i,e){const t=i.injectedScript.window,s=i.document;let a=null,o=null,c=0;const d=new WeakSet;e.push(db(s,"click",x=>{var A;const v=x,T=i.deepEventTarget(v);if(v.isTrusted&&!(T.nodeName==="INPUT"&&T.type.toLowerCase()==="file")){a=T,c=Date.now();try{o=i.injectedScript.generateSelector(T,{testIdAttributeName:(A=i.state)==null?void 0:A.testIdAttributeName,multiple:!1}).selector}catch(C){console.warn("[PW-FileUpload] click-capture selector generation failed:",C),o=null}}},!0));const h=x=>{if(d.has(x)||x.type!=="file")return;d.add(x);const v=x.click;x.click=function(){return t.__pwRecorderFileChooserArmed&&t.__pwRecorderFileChooserArmed({triggerElement:a,triggerSelector:o,input:this,timestamp:c}),v.apply(this,arguments)},db(x,"change",()=>{const T=Array.from(x.files||[]).map(A=>({name:A.name,size:A.size,type:A.type,lastModified:A.lastModified}));t.__pwRecorderFileChooserResolved&&T.length>0&&t.__pwRecorderFileChooserResolved({files:T,input:x})},!0)},f=HTMLInputElement.prototype.click;HTMLInputElement.prototype.click=function(){return this.type==="file"&&(h(this),t.__pwRecorderFileChooserArmed&&t.__pwRecorderFileChooserArmed({triggerElement:a,triggerSelector:o,input:this,timestamp:c})),f.apply(this,arguments)};const y=Document.prototype.createElement;Document.prototype.createElement=function(x,v){const T=y.call(this,x,v);return T instanceof HTMLInputElement&&T.type==="file"&&h(T),T};const m=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"type");if(m&&m.set){const x=m.set;Object.defineProperty(HTMLInputElement.prototype,"type",{...m,set(v){const T=x.call(this,v);return String(v).toLowerCase()==="file"&&h(this),T}})}if("showOpenFilePicker"in t){const x=t.showOpenFilePicker;t.showOpenFilePicker=async function(...v){t.__pwRecorderFileChooserArmed&&t.__pwRecorderFileChooserArmed({triggerElement:a,triggerSelector:o,input:null,timestamp:c});const T=await x.apply(this,v),A=[];try{for(const C of T){const L=await C.getFile();A.push({name:L.name,size:L.size,type:L.type,lastModified:L.lastModified})}}catch(C){console.warn("[PW-FileUpload] Failed to extract file metadata from handles:",C);for(const L of T)A.push({name:L.name||"unknown"})}return t.__pwRecorderFileChooserResolved&&A.length>0&&t.__pwRecorderFileChooserResolved({files:A,input:null}),T}}s.querySelectorAll('input[type="file"]').forEach(x=>{h(x)});const b=new MutationObserver(x=>{for(const v of x)for(const T of v.addedNodes)T instanceof HTMLInputElement&&T.type==="file"&&h(T),T instanceof Element&&T.querySelectorAll('input[type="file"]').forEach(C=>{h(C)})});b.observe(s.documentElement,{childList:!0,subtree:!0}),e.push(()=>{b.disconnect()})}function Ka(i){return i.injectedScript.utils.builtins.Date.now().toString()}class G2{constructor(e){this._isDeleting=!1,this._viewportPath=[],this._lastPointTime=0,this.POINT_THROTTLE_MS=33,this.MIN_DISTANCE=5,this._recorder=e}cursor(){return"pointer"}install(){this._recorder.injectedScript.document.body.classList.add("pw-sketch-tool-cursor"),this._createOverlayCanvas()}uninstall(){this._recorder.injectedScript.document.body.classList.remove("pw-sketch-tool-cursor"),this._removeOverlayCanvas(),this._isDeleting=!1,this._viewportPath=[]}onPointerDown(e){if(e.button!==0)return;const t=this._recorder.deepEventTarget(e);return this._isDeleting=!0,this._viewportPath=[],this._addPoint(e),this._clearOverlayPath(),this._dispatchRealMouseEvent("mousedown",e,t),!0}onPointerMove(e){if(!this._isDeleting)return;const t=this._recorder.deepEventTarget(e);this._dispatchRealMouseEvent("mousemove",e,t);const s=this._recorder.injectedScript.utils.builtins.Date.now();if(!(s-this._lastPointTime<this.POINT_THROTTLE_MS)&&this._viewportPath.length>0){const a=this._viewportPath[this._viewportPath.length-1];Math.hypot(e.clientX-a.x,e.clientY-a.y)>=this.MIN_DISTANCE&&(this._addPoint(e),this._lastPointTime=s,this._updateOverlayPath())}}onPointerUp(e){var s;if(!this._isDeleting)return;const t=this._recorder.deepEventTarget(e);this._dispatchRealMouseEvent("mouseup",e,t),this._isDeleting=!1,this._viewportPath.length>1&&(this._addPoint(e),this._recordSketchToolAsMouseActions(),(s=this._recorder.overlay)==null||s.flashToolSucceeded("recordingSketchTool")),this._clearOverlayPath(),this._viewportPath=[]}onMouseDown(e){}onMouseUp(e){}onClick(e){}_addPoint(e){this._viewportPath.push({x:Math.round(e.clientX),y:Math.round(e.clientY)})}_recordSketchToolAsMouseActions(){const e=this._optimizePath(this._viewportPath);if(e.length===0)return;const t={name:"comment",text:`Sketch tool with ${e.length} path points`,signals:[],timestamp:Ka(this._recorder)};this._recorder.recordAction(t);const a={name:"mouse.move",position:e[0],signals:[],timestamp:Ka(this._recorder)};this._recorder.recordAction(a);const o={name:"mouse.down",signals:[],timestamp:Ka(this._recorder)};this._recorder.recordAction(o);for(let d=1;d<e.length;d++){const h=e[d],f=e[d-1],y=h.x-f.x,m=h.y-f.y,_=Math.sqrt(y*y+m*m),b=Math.max(1,Math.floor(_/5)),x={name:"mouse.move",position:h,steps:b,signals:[],timestamp:Ka(this._recorder)};this._recorder.recordAction(x)}const c={name:"mouse.up",signals:[],timestamp:Ka(this._recorder)};this._recorder.recordAction(c)}_optimizePath(e){if(e.length<5)return e;const t=this._douglasPeucker(e,2);return t.length<5?this._douglasPeuckerWithMinPoints(e,5):t}_douglasPeucker(e,t){if(e.length<=2)return e;let s=0,a=0;for(let o=1;o<e.length-1;o++){const c=this._perpendicularDistance(e[o],e[0],e[e.length-1]);c>s&&(s=c,a=o)}if(s>t){const o=this._douglasPeucker(e.slice(0,a+1),t),c=this._douglasPeucker(e.slice(a),t);return[...o.slice(0,-1),...c]}else return[e[0],e[e.length-1]]}_douglasPeuckerWithMinPoints(e,t){if(e.length<=t)return e;let s=10,a=this._douglasPeucker(e,s),o=10,c=0;for(;o-c>.1&&a.length!==t;)s=(o+c)/2,a=this._douglasPeucker(e,s),a.length<t?o=s:a.length>t&&(c=s);return a.length<t&&(a=this._sampleEvenly(e,t)),a}_sampleEvenly(e,t){if(e.length<=t)return e;const s=[e[0]],a=(e.length-1)/(t-1);for(let o=1;o<t-1;o++){const c=Math.round(o*a);s.push(e[c])}return s.push(e[e.length-1]),s}_perpendicularDistance(e,t,s){const a=s.x-t.x,o=s.y-t.y;if(a===0&&o===0)return Math.hypot(e.x-t.x,e.y-t.y);const c=Math.hypot(a,o);return Math.abs(o*e.x-a*e.y+s.x*t.y-s.y*t.x)/c}_createOverlayCanvas(){const e=this._recorder.injectedScript.document;this._overlayCanvas=e.createElementNS("http://www.w3.org/2000/svg","svg"),this._overlayCanvas.classList.add("pw-deletion-trail"),this._overlayCanvas.style.position="fixed",this._overlayCanvas.style.top="0",this._overlayCanvas.style.left="0",this._overlayCanvas.style.width="100%",this._overlayCanvas.style.height="100%",this._overlayCanvas.style.pointerEvents="none",this._overlayCanvas.style.zIndex="2147483646",this._overlayPath=e.createElementNS("http://www.w3.org/2000/svg","path"),this._overlayPath.classList.add("pw-deletion-path"),this._overlayPath.setAttribute("stroke","rgba(220, 53, 69, 0.5)"),this._overlayPath.setAttribute("stroke-width","20"),this._overlayPath.setAttribute("stroke-linecap","round"),this._overlayPath.setAttribute("stroke-linejoin","round"),this._overlayPath.setAttribute("fill","none"),this._overlayCanvas.appendChild(this._overlayPath),e.body.appendChild(this._overlayCanvas)}_removeOverlayCanvas(){this._overlayCanvas&&(this._overlayCanvas.remove(),this._overlayCanvas=void 0,this._overlayPath=void 0)}_updateOverlayPath(){if(!this._overlayPath||this._viewportPath.length<2)return;const e=this._viewportPath.reduce((t,s,a)=>`${t} ${a===0?"M":"L"}${s.x},${s.y}`,"");this._overlayPath.setAttribute("d",e)}_clearOverlayPath(){this._overlayPath&&this._overlayPath.setAttribute("d","")}_dispatchRealMouseEvent(e,t,s){const a=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:this._recorder.injectedScript.window,detail:t.detail,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons,relatedTarget:t.relatedTarget});s.dispatchEvent(a)}}function Ln(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function X2(i){return i.injectedScript.utils.builtins.Date.now().toString()}class Y2{constructor(e){this._hoveredTable=null,this._highlightModel=null,this._captured=!1,this._recorder=e}cursor(){return"crosshair"}install(){var e;(e=this._recorder.injectedScript.document.body)==null||e.setAttribute("data-pw-cursor","crosshair"),this._captured=!1}uninstall(){this._hoveredTable=null,this._highlightModel=null,this._captured=!1,this._recorder.clearHighlight()}onKeyDown(e){this._captured||e.key==="Escape"&&(Ln(e),this._hoveredTable=null,this._highlightModel=null,this._recorder.clearHighlight(),this._recorder.setMode("recording"))}onMouseMove(e){if(this._captured)return;Ln(e);const t=this._findTableFromEvent(e);t!==this._hoveredTable&&(this._hoveredTable=t,this._updateHighlight(t))}onMouseEnter(e){this._captured||Ln(e)}onMouseLeave(e){if(this._captured)return;Ln(e);const t=this._recorder.injectedScript.window;t.top!==t&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredTable=null,this._highlightModel=null,this._recorder.clearHighlight())}onClick(e){if(!this._captured){if(e.button!==0){Ln(e);return}this._hoveredTable&&(Ln(e),this._captureTableSnapshot(this._hoveredTable))}}onPointerDown(e){this._captured||Ln(e)}onPointerUp(e){this._captured||Ln(e)}onMouseDown(e){this._captured||Ln(e)}onMouseUp(e){this._captured||Ln(e)}_findTableFromEvent(e){let t=this._recorder.deepEventTarget(e);for(;t;){if(t.tagName==="TABLE")return t;t=t.parentElement}return null}_updateHighlight(e){if(!e){this._recorder.clearHighlight();return}const t=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});this._highlightModel={selector:t.selector,elements:t.elements,tooltipText:"Click to assert table cell",color:"#4CAF5080"},this._recorder.updateHighlight(this._highlightModel,!0)}_captureTableSnapshot(e){var o;const t=this._extractTableData(e),a={name:"tableSnapshot",selector:this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}).selector,tableData:t,signals:[],timestamp:X2(this._recorder)};this._recorder.recordAction(a),this._captured=!0,this._recorder.clearHighlight(),this._recorder.setMode("recording"),(o=this._recorder.overlay)==null||o.flashToolSucceeded("recordingTableSnapshot")}_extractTableData(e){const t={headers:[],rows:[],metadata:{rowCount:0,columnCount:0,hasHeaders:!1,captureTime:new Date().toISOString()}},s=e.querySelector("thead");if(s){const c=s.querySelector("tr");c&&(t.headers=Array.from(c.querySelectorAll("th, td")).map(d=>this._getCellText(d)),t.metadata.hasHeaders=!0)}const o=(e.querySelector("tbody")||e).querySelectorAll("tr");return t.rows=Array.from(o).map(c=>Array.from(c.querySelectorAll("th, td")).map(d=>({text:this._getCellText(d),isHeader:d.tagName==="TH"}))),t.metadata.rowCount=t.rows.length,t.metadata.columnCount=Math.max(t.headers.length,...t.rows.map(c=>c.length)),t}_getCellText(e){var t;return((t=e.innerText)==null?void 0:t.trim())||""}}function K2(i){return i.injectedScript.utils.builtins.Date.now().toString()}class J2{constructor(e){this._highlightedCell=null,this._cellHighlight=null,this._assertModal=null,this._recorder=e}cursor(){return"pointer"}install(){var e;(e=this._recorder.injectedScript.document.body)==null||e.setAttribute("data-pw-cursor","pointer")}uninstall(){this._removeHighlight(),this._removeModal()}cleanup(){this.uninstall()}onPointerMove(e){const t=this._getCellUnderPointer(e);t&&t!==this._highlightedCell?(this._highlightedCell=t,this._showCellHighlight(t,!0)):!t&&this._highlightedCell&&(this._removeHighlight(),this._highlightedCell=null)}onPointerDown(e){const t=this._getCellUnderPointer(e);t&&(e.preventDefault(),e.stopPropagation(),this._showCellHighlight(t,!1),this._showAssertModal(t))}_getCellUnderPointer(e){const t=e.target;return this._isTableCell(t)?t:t.closest("td, th")}_isTableCell(e){if(!e)return!1;const t=e.tagName.toLowerCase();return t==="td"||t==="th"}_findTable(e){return e.closest("table")}_getCellPosition(e){const t=e.closest("tr"),s=this._findTable(e);if(!t||!s)return{row:0,col:0};const a=s.querySelector("tbody"),c=(a?Array.from(a.querySelectorAll("tr")):Array.from(s.querySelectorAll("tr"))).indexOf(t),h=Array.from(t.querySelectorAll("td, th")).indexOf(e);return{row:c,col:h}}_showCellHighlight(e,t){this._removeHighlight();const s=this._recorder.injectedScript.document,a=e.getBoundingClientRect();if(this._cellHighlight=s.createElement("div"),this._cellHighlight.style.cssText=`
|
|
380
|
+
`,this._recorder.document.head.appendChild(s),this._recorder.document.body.appendChild(t),this._helperOverlay=t}_hideHelperOverlay(){this._helperOverlay&&(this._helperOverlay.remove(),this._helperOverlay=null)}}function db(i,e,t,s){return i.addEventListener(e,t,s),()=>{i.removeEventListener(e,t,s)}}function XC(i,e){const t=i.injectedScript.window,s=i.document;let a=null,o=null,c=0;const d=new WeakSet;e.push(db(s,"click",w=>{var A;const v=w,T=i.deepEventTarget(v);if(v.isTrusted&&!(T.nodeName==="INPUT"&&T.type.toLowerCase()==="file")){a=T,c=Date.now();try{o=i.injectedScript.generateSelector(T,{testIdAttributeName:(A=i.state)==null?void 0:A.testIdAttributeName,multiple:!1}).selector}catch(C){console.warn("[PW-FileUpload] click-capture selector generation failed:",C),o=null}}},!0));const h=w=>{if(d.has(w)||w.type!=="file")return;d.add(w);const v=w.click;w.click=function(){return t.__pwRecorderFileChooserArmed&&t.__pwRecorderFileChooserArmed({triggerElement:a,triggerSelector:o,input:this,timestamp:c}),v.apply(this,arguments)},db(w,"change",()=>{const T=Array.from(w.files||[]).map(A=>({name:A.name,size:A.size,type:A.type,lastModified:A.lastModified}));t.__pwRecorderFileChooserResolved&&T.length>0&&t.__pwRecorderFileChooserResolved({files:T,input:w})},!0)},f=HTMLInputElement.prototype.click;HTMLInputElement.prototype.click=function(){return this.type==="file"&&(h(this),t.__pwRecorderFileChooserArmed&&t.__pwRecorderFileChooserArmed({triggerElement:a,triggerSelector:o,input:this,timestamp:c})),f.apply(this,arguments)};const y=Document.prototype.createElement;Document.prototype.createElement=function(w,v){const T=y.call(this,w,v);return T instanceof HTMLInputElement&&T.type==="file"&&h(T),T};const m=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"type");if(m&&m.set){const w=m.set;Object.defineProperty(HTMLInputElement.prototype,"type",{...m,set(v){const T=w.call(this,v);return String(v).toLowerCase()==="file"&&h(this),T}})}if("showOpenFilePicker"in t){const w=t.showOpenFilePicker;t.showOpenFilePicker=async function(...v){t.__pwRecorderFileChooserArmed&&t.__pwRecorderFileChooserArmed({triggerElement:a,triggerSelector:o,input:null,timestamp:c});const T=await w.apply(this,v),A=[];try{for(const C of T){const L=await C.getFile();A.push({name:L.name,size:L.size,type:L.type,lastModified:L.lastModified})}}catch(C){console.warn("[PW-FileUpload] Failed to extract file metadata from handles:",C);for(const L of T)A.push({name:L.name||"unknown"})}return t.__pwRecorderFileChooserResolved&&A.length>0&&t.__pwRecorderFileChooserResolved({files:A,input:null}),T}}s.querySelectorAll('input[type="file"]').forEach(w=>{h(w)});const b=new MutationObserver(w=>{for(const v of w)for(const T of v.addedNodes)T instanceof HTMLInputElement&&T.type==="file"&&h(T),T instanceof Element&&T.querySelectorAll('input[type="file"]').forEach(C=>{h(C)})});b.observe(s.documentElement,{childList:!0,subtree:!0}),e.push(()=>{b.disconnect()})}function Ka(i){return i.injectedScript.utils.builtins.Date.now().toString()}class YC{constructor(e){this._isDeleting=!1,this._viewportPath=[],this._lastPointTime=0,this.POINT_THROTTLE_MS=33,this.MIN_DISTANCE=5,this._recorder=e}cursor(){return"pointer"}install(){this._recorder.injectedScript.document.body.classList.add("pw-sketch-tool-cursor"),this._createOverlayCanvas()}uninstall(){this._recorder.injectedScript.document.body.classList.remove("pw-sketch-tool-cursor"),this._removeOverlayCanvas(),this._isDeleting=!1,this._viewportPath=[]}onPointerDown(e){if(e.button!==0)return;const t=this._recorder.deepEventTarget(e);return this._isDeleting=!0,this._viewportPath=[],this._addPoint(e),this._clearOverlayPath(),this._dispatchRealMouseEvent("mousedown",e,t),!0}onPointerMove(e){if(!this._isDeleting)return;const t=this._recorder.deepEventTarget(e);this._dispatchRealMouseEvent("mousemove",e,t);const s=this._recorder.injectedScript.utils.builtins.Date.now();if(!(s-this._lastPointTime<this.POINT_THROTTLE_MS)&&this._viewportPath.length>0){const a=this._viewportPath[this._viewportPath.length-1];Math.hypot(e.clientX-a.x,e.clientY-a.y)>=this.MIN_DISTANCE&&(this._addPoint(e),this._lastPointTime=s,this._updateOverlayPath())}}onPointerUp(e){var s;if(!this._isDeleting)return;const t=this._recorder.deepEventTarget(e);this._dispatchRealMouseEvent("mouseup",e,t),this._isDeleting=!1,this._viewportPath.length>1&&(this._addPoint(e),this._recordSketchToolAsMouseActions(),(s=this._recorder.overlay)==null||s.flashToolSucceeded("recordingSketchTool")),this._clearOverlayPath(),this._viewportPath=[]}onMouseDown(e){}onMouseUp(e){}onClick(e){}_addPoint(e){this._viewportPath.push({x:Math.round(e.clientX),y:Math.round(e.clientY)})}_recordSketchToolAsMouseActions(){const e=this._optimizePath(this._viewportPath);if(e.length===0)return;const t={name:"comment",text:`Sketch tool with ${e.length} path points`,signals:[],timestamp:Ka(this._recorder)};this._recorder.recordAction(t);const a={name:"mouse.move",position:e[0],signals:[],timestamp:Ka(this._recorder)};this._recorder.recordAction(a);const o={name:"mouse.down",signals:[],timestamp:Ka(this._recorder)};this._recorder.recordAction(o);for(let d=1;d<e.length;d++){const h=e[d],f=e[d-1],y=h.x-f.x,m=h.y-f.y,_=Math.sqrt(y*y+m*m),b=Math.max(1,Math.floor(_/5)),w={name:"mouse.move",position:h,steps:b,signals:[],timestamp:Ka(this._recorder)};this._recorder.recordAction(w)}const c={name:"mouse.up",signals:[],timestamp:Ka(this._recorder)};this._recorder.recordAction(c)}_optimizePath(e){if(e.length<5)return e;const t=this._douglasPeucker(e,2);return t.length<5?this._douglasPeuckerWithMinPoints(e,5):t}_douglasPeucker(e,t){if(e.length<=2)return e;let s=0,a=0;for(let o=1;o<e.length-1;o++){const c=this._perpendicularDistance(e[o],e[0],e[e.length-1]);c>s&&(s=c,a=o)}if(s>t){const o=this._douglasPeucker(e.slice(0,a+1),t),c=this._douglasPeucker(e.slice(a),t);return[...o.slice(0,-1),...c]}else return[e[0],e[e.length-1]]}_douglasPeuckerWithMinPoints(e,t){if(e.length<=t)return e;let s=10,a=this._douglasPeucker(e,s),o=10,c=0;for(;o-c>.1&&a.length!==t;)s=(o+c)/2,a=this._douglasPeucker(e,s),a.length<t?o=s:a.length>t&&(c=s);return a.length<t&&(a=this._sampleEvenly(e,t)),a}_sampleEvenly(e,t){if(e.length<=t)return e;const s=[e[0]],a=(e.length-1)/(t-1);for(let o=1;o<t-1;o++){const c=Math.round(o*a);s.push(e[c])}return s.push(e[e.length-1]),s}_perpendicularDistance(e,t,s){const a=s.x-t.x,o=s.y-t.y;if(a===0&&o===0)return Math.hypot(e.x-t.x,e.y-t.y);const c=Math.hypot(a,o);return Math.abs(o*e.x-a*e.y+s.x*t.y-s.y*t.x)/c}_createOverlayCanvas(){const e=this._recorder.injectedScript.document;this._overlayCanvas=e.createElementNS("http://www.w3.org/2000/svg","svg"),this._overlayCanvas.classList.add("pw-deletion-trail"),this._overlayCanvas.style.position="fixed",this._overlayCanvas.style.top="0",this._overlayCanvas.style.left="0",this._overlayCanvas.style.width="100%",this._overlayCanvas.style.height="100%",this._overlayCanvas.style.pointerEvents="none",this._overlayCanvas.style.zIndex="2147483646",this._overlayPath=e.createElementNS("http://www.w3.org/2000/svg","path"),this._overlayPath.classList.add("pw-deletion-path"),this._overlayPath.setAttribute("stroke","rgba(220, 53, 69, 0.5)"),this._overlayPath.setAttribute("stroke-width","20"),this._overlayPath.setAttribute("stroke-linecap","round"),this._overlayPath.setAttribute("stroke-linejoin","round"),this._overlayPath.setAttribute("fill","none"),this._overlayCanvas.appendChild(this._overlayPath),e.body.appendChild(this._overlayCanvas)}_removeOverlayCanvas(){this._overlayCanvas&&(this._overlayCanvas.remove(),this._overlayCanvas=void 0,this._overlayPath=void 0)}_updateOverlayPath(){if(!this._overlayPath||this._viewportPath.length<2)return;const e=this._viewportPath.reduce((t,s,a)=>`${t} ${a===0?"M":"L"}${s.x},${s.y}`,"");this._overlayPath.setAttribute("d",e)}_clearOverlayPath(){this._overlayPath&&this._overlayPath.setAttribute("d","")}_dispatchRealMouseEvent(e,t,s){const a=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:this._recorder.injectedScript.window,detail:t.detail,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons,relatedTarget:t.relatedTarget});s.dispatchEvent(a)}}function Ln(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function KC(i){return i.injectedScript.utils.builtins.Date.now().toString()}class JC{constructor(e){this._hoveredTable=null,this._highlightModel=null,this._captured=!1,this._recorder=e}cursor(){return"crosshair"}install(){var e;(e=this._recorder.injectedScript.document.body)==null||e.setAttribute("data-pw-cursor","crosshair"),this._captured=!1}uninstall(){this._hoveredTable=null,this._highlightModel=null,this._captured=!1,this._recorder.clearHighlight()}onKeyDown(e){this._captured||e.key==="Escape"&&(Ln(e),this._hoveredTable=null,this._highlightModel=null,this._recorder.clearHighlight(),this._recorder.setMode("recording"))}onMouseMove(e){if(this._captured)return;Ln(e);const t=this._findTableFromEvent(e);t!==this._hoveredTable&&(this._hoveredTable=t,this._updateHighlight(t))}onMouseEnter(e){this._captured||Ln(e)}onMouseLeave(e){if(this._captured)return;Ln(e);const t=this._recorder.injectedScript.window;t.top!==t&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredTable=null,this._highlightModel=null,this._recorder.clearHighlight())}onClick(e){if(!this._captured){if(e.button!==0){Ln(e);return}this._hoveredTable&&(Ln(e),this._captureTableSnapshot(this._hoveredTable))}}onPointerDown(e){this._captured||Ln(e)}onPointerUp(e){this._captured||Ln(e)}onMouseDown(e){this._captured||Ln(e)}onMouseUp(e){this._captured||Ln(e)}_findTableFromEvent(e){let t=this._recorder.deepEventTarget(e);for(;t;){if(t.tagName==="TABLE")return t;t=t.parentElement}return null}_updateHighlight(e){if(!e){this._recorder.clearHighlight();return}const t=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});this._highlightModel={selector:t.selector,elements:t.elements,tooltipText:"Click to assert table cell",color:"#4CAF5080"},this._recorder.updateHighlight(this._highlightModel,!0)}_captureTableSnapshot(e){var o;const t=this._extractTableData(e),a={name:"tableSnapshot",selector:this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}).selector,tableData:t,signals:[],timestamp:KC(this._recorder)};this._recorder.recordAction(a),this._captured=!0,this._recorder.clearHighlight(),this._recorder.setMode("recording"),(o=this._recorder.overlay)==null||o.flashToolSucceeded("recordingTableSnapshot")}_extractTableData(e){const t={headers:[],rows:[],metadata:{rowCount:0,columnCount:0,hasHeaders:!1,captureTime:new Date().toISOString()}},s=e.querySelector("thead");if(s){const c=s.querySelector("tr");c&&(t.headers=Array.from(c.querySelectorAll("th, td")).map(d=>this._getCellText(d)),t.metadata.hasHeaders=!0)}const o=(e.querySelector("tbody")||e).querySelectorAll("tr");return t.rows=Array.from(o).map(c=>Array.from(c.querySelectorAll("th, td")).map(d=>({text:this._getCellText(d),isHeader:d.tagName==="TH"}))),t.metadata.rowCount=t.rows.length,t.metadata.columnCount=Math.max(t.headers.length,...t.rows.map(c=>c.length)),t}_getCellText(e){var t;return((t=e.innerText)==null?void 0:t.trim())||""}}function WC(i){return i.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function ZC(i){const e=i.rowKey;return e&&e.value?`tr:has(${`${e.tag}:nth-child(${e.colIndex+1}):text-is("${WC(e.value)}")`})`:`tr:nth-child(${i.rowIndex+1})`}function QC(i){const e=ZC(i),t=`${i.cellTag}:nth-child(${i.colIndex+1})`,s=`tbody ${e} ${t}`;let a=i.tablePrefix?`${i.tablePrefix} ${s}`:s;return i.isInput&&(a+=" input"),a}function e2(i){return i.injectedScript.utils.builtins.Date.now().toString()}class t2{constructor(e){this._highlightedCell=null,this._cellHighlight=null,this._assertModal=null,this._recorder=e}cursor(){return"pointer"}install(){var e;(e=this._recorder.injectedScript.document.body)==null||e.setAttribute("data-pw-cursor","pointer")}uninstall(){this._removeHighlight(),this._removeModal()}cleanup(){this.uninstall()}onPointerMove(e){const t=this._getCellUnderPointer(e);t&&t!==this._highlightedCell?(this._highlightedCell=t,this._showCellHighlight(t,!0)):!t&&this._highlightedCell&&(this._removeHighlight(),this._highlightedCell=null)}onPointerDown(e){const t=this._getCellUnderPointer(e);t&&(e.preventDefault(),e.stopPropagation(),this._showCellHighlight(t,!1),this._showAssertModal(t))}_getCellUnderPointer(e){const t=e.target;return this._isTableCell(t)?t:t.closest("td, th")}_isTableCell(e){if(!e)return!1;const t=e.tagName.toLowerCase();return t==="td"||t==="th"}_findTable(e){return e.closest("table")}_getCellPosition(e){const t=e.closest("tr"),s=this._findTable(e);if(!t||!s)return{row:0,col:0};const a=s.querySelector("tbody"),c=(a?Array.from(a.querySelectorAll("tr")):Array.from(s.querySelectorAll("tr"))).indexOf(t),h=Array.from(t.querySelectorAll("td, th")).indexOf(e);return{row:c,col:h}}_getRowKey(e,t){const s=Array.from(t.querySelectorAll("td, th")),a=_=>{var b;return((b=_.innerText)==null?void 0:b.trim())||""},o=_=>/^\d+$/.test(_);let c=s.findIndex(_=>a(_)!==""&&!o(a(_)));if(c===-1&&(c=s.findIndex(_=>a(_)!=="")),c===-1)return null;const d=s[c],h=a(d),f=e.querySelector("tbody");return(f?Array.from(f.querySelectorAll("tr")):Array.from(e.querySelectorAll("tr"))).filter(_=>{const b=Array.from(_.querySelectorAll("td, th"))[c];return b&&a(b)===h}).length!==1?null:{tag:d.tagName.toLowerCase(),colIndex:c,value:h}}_showCellHighlight(e,t){this._removeHighlight();const s=this._recorder.injectedScript.document,a=e.getBoundingClientRect();if(this._cellHighlight=s.createElement("div"),this._cellHighlight.style.cssText=`
|
|
381
381
|
position: fixed;
|
|
382
382
|
left: ${a.left}px;
|
|
383
383
|
top: ${a.top}px;
|
|
@@ -396,7 +396,7 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i
|
|
|
396
396
|
font-size: 14px;
|
|
397
397
|
color: #4285f4;
|
|
398
398
|
font-weight: bold;
|
|
399
|
-
`,this._cellHighlight.appendChild(o)}s.body.appendChild(this._cellHighlight)}_removeHighlight(){this._cellHighlight&&(this._cellHighlight.remove(),this._cellHighlight=null)}_showAssertModal(e){var
|
|
399
|
+
`,this._cellHighlight.appendChild(o)}s.body.appendChild(this._cellHighlight)}_removeHighlight(){this._cellHighlight&&(this._cellHighlight.remove(),this._cellHighlight=null)}_showAssertModal(e){var w;this._removeModal();const t=this._recorder.injectedScript.document;let s="";const a=e.querySelector("input");a?s=a.value||"":s=((w=e.innerText)==null?void 0:w.trim())||"";const o=this._getCellPosition(e),c=t.createElement("div");c.style.cssText=`
|
|
400
400
|
position: fixed;
|
|
401
401
|
top: 0;
|
|
402
402
|
left: 0;
|
|
@@ -438,7 +438,7 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i
|
|
|
438
438
|
<button id="pw-modal-cancel" style="padding: 8px 16px; border: 1px solid #dadce0; background: white; color: #1a73e8; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 500;">Cancel</button>
|
|
439
439
|
<button id="pw-modal-confirm" style="padding: 8px 16px; border: none; background: #1a73e8; color: white; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 500;">Add Assertion</button>
|
|
440
440
|
</div>
|
|
441
|
-
`,c.appendChild(d),t.body.appendChild(c),this._assertModal=c;const h=d.querySelector("#pw-expected-value");h==null||h.focus(),h==null||h.select();const f=d.querySelector("#pw-modal-close"),y=d.querySelector("#pw-modal-cancel"),m=d.querySelector("#pw-modal-confirm"),_=()=>{this._removeModal(),this._removeHighlight(),this._recorder.setMode("recording")},b=()=>{const v=(h==null?void 0:h.value)||s;this._generateAssertion(e,v),_()};f==null||f.addEventListener("click",_),y==null||y.addEventListener("click",_),m==null||m.addEventListener("click",b),h==null||h.addEventListener("keydown",v=>{v.key==="Enter"?(v.preventDefault(),b()):v.key==="Escape"&&(v.preventDefault(),_())}),c.addEventListener("click",v=>{v.target===c&&_()})}_removeModal(){this._assertModal&&(this._assertModal.remove(),this._assertModal=null)}_generateAssertion(e,t){var
|
|
441
|
+
`,c.appendChild(d),t.body.appendChild(c),this._assertModal=c;const h=d.querySelector("#pw-expected-value");h==null||h.focus(),h==null||h.select();const f=d.querySelector("#pw-modal-close"),y=d.querySelector("#pw-modal-cancel"),m=d.querySelector("#pw-modal-confirm"),_=()=>{this._removeModal(),this._removeHighlight(),this._recorder.setMode("recording")},b=()=>{const v=(h==null?void 0:h.value)||s;this._generateAssertion(e,v),_()};f==null||f.addEventListener("click",_),y==null||y.addEventListener("click",_),m==null||m.addEventListener("click",b),h==null||h.addEventListener("keydown",v=>{v.key==="Enter"?(v.preventDefault(),b()):v.key==="Escape"&&(v.preventDefault(),_())}),c.addEventListener("click",v=>{v.target===c&&_()})}_removeModal(){this._assertModal&&(this._assertModal.remove(),this._assertModal=null)}_generateAssertion(e,t){var w;const s=this._findTable(e);if(!s){console.log("[TableAssertTool] No table found for cell");return}const a=this._getCellPosition(e);console.log("[TableAssertTool] Cell position:",a);const c=!!e.querySelector("input"),d=s.getAttribute(`data-${this._recorder.state.testIdAttributeName}`)||s.getAttribute("data-testid"),h=s.id;let f="";d?f=`[data-testid="${d}"]`:h&&(f=`#${h}`);const y=e.closest("tr"),m=y?this._getRowKey(s,y):null,_=QC({tablePrefix:f,cellTag:e.tagName.toLowerCase(),colIndex:a.col,rowIndex:a.row,rowKey:m,isInput:c});console.log("[TableAssertTool] Generated selector:",_,"isInput:",c,"rowKey:",m==null?void 0:m.value);const b={name:"assertTableCell",selector:_,text:t,position:a,isInput:c,signals:[],timestamp:e2(this._recorder)};console.log("[TableAssertTool] Recording action:",b),this._recorder.recordAction(b),(w=this._recorder.overlay)==null||w.flashToolSucceeded("assertingTableCell")}}const Hh={snapshot:"#9c7fe480"};function Ja(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function Wa(i){return i.injectedScript.utils.builtins.Date.now().toString()}function Kl(i,e,t,s){return i.addEventListener(e,t,s),()=>i.removeEventListener(e,t,s)}class Ui{constructor(e){this._glassOverlay=null,this._marquee=null,this._dragStart=null,this._dragCurrent=null,this._isDragging=!1,this._hoverHighlight=null,this._listeners=[],this._syntheticHighlightEl=null,this.DOUBLE_TOGGLE_TIMEOUT=1500,this.DRAG_THRESHOLD=8,this.VIEWPORT_THRESHOLD=.8,this._recorder=e}static async getNextCounter(e,t){try{if(typeof e.injectedScript.window.__pw_recorderIncrementCounter=="function")return await e.injectedScript.window.__pw_recorderIncrementCounter(t)}catch(s){console.error("Failed to get counter from server:",s)}return Date.now()%1e3}cursor(){return this._isDragging?"crosshair":"pointer"}install(){var e;this._createGlassOverlay(),(e=this._recorder.injectedScript.document.body)==null||e.setAttribute("data-pw-cursor","pointer")}uninstall(){var e;this._removeGlassOverlay(),this._removeMarquee(),this._cleanup(),(e=this._recorder.injectedScript.document.body)==null||e.removeAttribute("data-pw-cursor")}cleanup(){this._cleanup()}_cleanup(){this._listeners.forEach(e=>e()),this._listeners=[],this._hoverHighlight&&this._recorder&&(this._recorder.updateHighlight(null,!1),this._hoverHighlight=null),this._cleanupSyntheticHighlight(),this._dragStart=null,this._dragCurrent=null,this._isDragging=!1}_cleanupSyntheticHighlight(){this._syntheticHighlightEl&&(this._syntheticHighlightEl.remove(),this._syntheticHighlightEl=null)}onKeyDown(e){e.key==="Escape"&&(Ja(e),this._cancelSnapshot())}_createGlassOverlay(){const e=this._recorder.injectedScript.document;this._glassOverlay=e.createElement("x-pw-glass"),this._glassOverlay.style.cssText=`
|
|
442
442
|
position: fixed !important;
|
|
443
443
|
top: 0 !important;
|
|
444
444
|
left: 0 !important;
|
|
@@ -454,7 +454,7 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i
|
|
|
454
454
|
background: rgba(0, 120, 215, 0.1) !important;
|
|
455
455
|
z-index: 2147483647 !important;
|
|
456
456
|
pointer-events: none !important;
|
|
457
|
-
`,e.body.appendChild(this._marquee)}_updateMarquee(){if(!this._marquee||!this._dragStart||!this._dragCurrent)return;const e=Math.min(this._dragStart.x,this._dragCurrent.x),t=Math.min(this._dragStart.y,this._dragCurrent.y),s=Math.max(this._dragStart.x,this._dragCurrent.x),a=Math.max(this._dragStart.y,this._dragCurrent.y);this._marquee.style.left=e+"px",this._marquee.style.top=t+"px",this._marquee.style.width=s-e+"px",this._marquee.style.height=a-t+"px"}_removeMarquee(){this._marquee&&(this._marquee.remove(),this._marquee=null)}_onGlassPointerDown(e){Ja(e),this._dragStart={x:e.clientX,y:e.clientY},this._dragCurrent=this._dragStart}_onGlassPointerMove(e){if(Ja(e),!this._dragStart){this._updateHoverHighlight(e);return}this._dragCurrent={x:e.clientX,y:e.clientY},Math.hypot(this._dragCurrent.x-this._dragStart.x,this._dragCurrent.y-this._dragStart.y)>=this.DRAG_THRESHOLD&&!this._isDragging&&(this._isDragging=!0,this._createMarquee(),this._glassOverlay&&(this._glassOverlay.style.cursor="crosshair")),this._isDragging?this._updateMarquee():this._updateHoverHighlight(e)}async _onGlassPointerUp(e){Ja(e),this._isDragging?await this._captureRegionSnapshot():this._dragStart&&await this._captureClickSnapshot(e),this._recorder.setMode("recording")}_updateHoverHighlight(e){var o,c,d,h;if(!this._recorder)return;this._glassOverlay&&(this._glassOverlay.style.display="none");const t=this._recorder.document.elementFromPoint(e.clientX,e.clientY);if(this._glassOverlay&&(this._glassOverlay.style.display=""),!t)return;if(((o=t.tagName)==null?void 0:o.toLowerCase())==="iframe"){const f=t;try{const y=f.getBoundingClientRect(),m=f.contentDocument;if(m){const _=[{iframe:f,selector:this._generateStableSelector(f)}],b=e.clientX-y.left,x=e.clientY-y.top,v=this._findGoJSDiagramRecursive(_,m,b,x,y.left,y.top);if(v){const A=v.containerEl.getBoundingClientRect(),C=v.accOffsetX+A.left,L=v.accOffsetY+A.top;if(this._syntheticHighlightEl){const B=this._syntheticHighlightEl.style;if(B.left===`${C}px`&&B.top===`${L}px`)return}this._cleanupSyntheticHighlight();const j=this._recorder.document,D=j.createElement("x-pw-gojs-highlight");D.style.cssText=["position: fixed","pointer-events: none","z-index: -1",`left: ${C}px`,`top: ${L}px`,`width: ${A.width}px`,`height: ${A.height}px`].join(" !important; ")+" !important;",(c=j.body)==null||c.appendChild(D),this._syntheticHighlightEl=D;const F=this._recorder.injectedScript.generateSelector(f,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:F.selector,elements:[D],color:Hh.snapshot,tooltipText:"GoJS diagram (iframe)"},this._recorder.updateHighlight(this._hoverHighlight,!0);return}const T=this._findElementInIframeRecursive(_,m,b,x,y.left,y.top);if(T){const A=T.element.getBoundingClientRect(),C=T.accOffsetX+A.left,L=T.accOffsetY+A.top;if(this._syntheticHighlightEl){const B=this._syntheticHighlightEl.style;if(B.left===`${C}px`&&B.top===`${L}px`)return}this._cleanupSyntheticHighlight();const j=this._recorder.document,D=j.createElement("x-pw-gojs-highlight");D.style.cssText=["position: fixed","pointer-events: none","z-index: -1",`left: ${C}px`,`top: ${L}px`,`width: ${A.width}px`,`height: ${A.height}px`].join(" !important; ")+" !important;",(d=j.body)==null||d.appendChild(D),this._syntheticHighlightEl=D;const F=this._generateStableSelector(T.element);this._hoverHighlight={selector:F,elements:[D],color:Hh.snapshot,tooltipText:"Element (iframe)"},this._recorder.updateHighlight(this._hoverHighlight,!0);return}}}catch{}this._cleanupSyntheticHighlight()}else this._cleanupSyntheticHighlight();const s=this._resolvePdfTarget(t)||t;if(((h=this._hoverHighlight)==null?void 0:h.elements[0])===s)return;const a=this._recorder.injectedScript.generateSelector(s,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:a.selector,elements:a.elements,color:Hh.snapshot},this._recorder.updateHighlight(this._hoverHighlight,!0)}async _captureClickSnapshot(e){var y;const t=this._glassOverlay&&this._glassOverlay.style.display!=="none";this._glassOverlay&&(this._glassOverlay.style.display="none");const s=this._recorder.document.elementFromPoint(e.clientX,e.clientY);if(this._glassOverlay&&t&&(this._glassOverlay.style.display=""),!s)return;if(((y=s.tagName)==null?void 0:y.toLowerCase())==="iframe"){const m=s;try{const _=m.getBoundingClientRect(),b=m.contentDocument;if(b){const x=[{iframe:m,selector:this._generateStableSelector(m)}],v=e.clientX-_.left,T=e.clientY-_.top,A=this._findGoJSDiagramRecursive(x,b,v,T,_.left,_.top);if(A){await this._captureGoJsDiagramSnapshot(A.iframeChain,A.diagramSelector);return}const C=this._findElementInIframeRecursive(x,b,v,T,_.left,_.top);if(C){await this._captureIframeElementSnapshot(C.iframeChain,C.element);return}}}catch{}await this._captureElementSnapshot(m);return}const a=e.altKey,c=e.shiftKey&&s.parentElement?s.parentElement:s,d=this._resolvePdfTarget(c),h=d||c;a||!d&&this._shouldCapturePageSnapshot(h)?await this._capturePageSnapshot():await this._captureElementSnapshot(h)}_resolvePdfTarget(e){const t=e.closest("[data-page-number]");return t||null}_shouldCapturePageSnapshot(e,t){var h;const s=(h=e.tagName)==null?void 0:h.toLowerCase();if(s==="html"||s==="body")return!0;const a=t??this._recorder.injectedScript.window,o=e.getBoundingClientRect(),c=a.innerWidth*a.innerHeight;return o.width*o.height>=c*this.VIEWPORT_THRESHOLD}_buildSelectorFromEl(e){if(e.id)return`#${e.id}`;const t=e.getAttribute("data-testid");if(t)return`[data-testid="${t}"]`;const s=e.parentElement;if(s){const a=Array.from(s.children).indexOf(e)+1;return`${e.tagName.toLowerCase()}:nth-child(${a})`}return e.tagName.toLowerCase()}_findGoJSDiagramRecursive(e,t,s,a,o,c){var _,b,x;const d=t.querySelector("x-pw-glass");d&&(d.style.display="none");let h=null;try{h=t.elementFromPoint(s,a)}catch{return d&&(d.style.display=""),null}if(d&&(d.style.display=""),!h)return null;if(((_=h.tagName)==null?void 0:_.toLowerCase())==="iframe"){const v=h;try{const T=v.contentDocument;if(!T)return null;const A=v.getBoundingClientRect();return this._findGoJSDiagramRecursive([...e,{iframe:v,selector:this._generateStableSelector(v)}],T,s-A.left,a-A.top,o+A.left,c+A.top)}catch{return null}}const f=t.defaultView;if(!((x=(b=f==null?void 0:f.go)==null?void 0:b.Diagram)!=null&&x.fromDiv))return null;const y=t.body;let m=h;for(;m&&m!==y;){if(f.go.Diagram.fromDiv(m))return{containerEl:m,diagramSelector:this._buildSelectorFromEl(m),iframeChain:e,accOffsetX:o,accOffsetY:c};m=m.parentElement}return null}_findElementInIframeRecursive(e,t,s,a,o,c){var f;const d=t.querySelector("x-pw-glass");d&&(d.style.display="none");let h=null;try{h=t.elementFromPoint(s,a)}catch{return d&&(d.style.display=""),null}if(d&&(d.style.display=""),!h)return null;if(((f=h.tagName)==null?void 0:f.toLowerCase())==="iframe"){const y=h;try{const m=y.contentDocument;if(!m)return null;const _=y.getBoundingClientRect();return this._findElementInIframeRecursive([...e,{iframe:y,selector:this._generateStableSelector(y)}],m,s-_.left,a-_.top,o+_.left,c+_.top)}catch{return null}}return{element:h,iframeChain:e,document:t,accOffsetX:o,accOffsetY:c}}_generateStableSelector(e){var t;try{const s=(t=e.ownerDocument)==null?void 0:t.defaultView;if(s!=null&&s.__pw_recorderGenerateSelector){const a=s.__pw_recorderGenerateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});if(a!=null&&a.selector)return a.selector}}catch{}return this._buildSelectorFromEl(e)}async _captureIframeElementSnapshot(e,t){var d;const s=this._generateStableSelector(t),a=await Ui.getNextCounter(this._recorder,"element"),o=`el-${String(a).padStart(3,"0")}.png`,c={name:"visualSnapshot",snapshotType:"element",iframeSelectors:e.map(h=>h.selector),selector:s,filename:o,signals:[],timestamp:Wa(this._recorder)};this._recorder.recordAction(c),(d=this._recorder.overlay)==null||d.flashToolSucceeded("assertingVSnapshot")}async _captureGoJsDiagramSnapshot(e,t){var c;const s=await Ui.getNextCounter(this._recorder,"element"),a=`gojs-${String(s).padStart(3,"0")}.png`,o={name:"visualSnapshot",snapshotType:"gojsDiagram",iframeSelectors:e.map(d=>d.selector),diagramSelector:t,filename:a,signals:[],timestamp:Wa(this._recorder)};this._recorder.recordAction(o),(c=this._recorder.overlay)==null||c.flashToolSucceeded("assertingVSnapshot")}async _capturePageSnapshot(){var a;const e=await Ui.getNextCounter(this._recorder,"page"),s={name:"visualSnapshot",snapshotType:"page",filename:`page-${String(e).padStart(3,"0")}.png`,fullPage:!0,signals:[],timestamp:Wa(this._recorder)};this._recorder.recordAction(s),(a=this._recorder.overlay)==null||a.flashToolSucceeded("assertingVSnapshot")}async _captureElementSnapshot(e){var c;const t=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}),s=await Ui.getNextCounter(this._recorder,"element"),a=`el-${String(s).padStart(3,"0")}.png`,o={name:"visualSnapshot",snapshotType:"element",selector:t.selector,filename:a,signals:[],timestamp:Wa(this._recorder)};this._recorder.recordAction(o),(c=this._recorder.overlay)==null||c.flashToolSucceeded("assertingVSnapshot")}async _captureRegionSnapshot(){var m;if(!this._dragStart||!this._dragCurrent)return;const e=Math.min(this._dragStart.x,this._dragCurrent.x),t=Math.min(this._dragStart.y,this._dragCurrent.y),s=Math.max(this._dragStart.x,this._dragCurrent.x),a=Math.max(this._dragStart.y,this._dragCurrent.y),o=this._recorder.injectedScript.window.scrollX||this._recorder.injectedScript.window.pageXOffset,c=this._recorder.injectedScript.window.scrollY||this._recorder.injectedScript.window.pageYOffset,d={x:Math.round(e+o),y:Math.round(t+c),width:Math.round(s-e),height:Math.round(a-t)},h=await Ui.getNextCounter(this._recorder,"region"),f=`region-${String(h).padStart(3,"0")}.png`,y={name:"visualSnapshot",snapshotType:"region",clip:d,filename:f,signals:[],timestamp:Wa(this._recorder)};this._recorder.recordAction(y),(m=this._recorder.overlay)==null||m.flashToolSucceeded("assertingVSnapshot")}_cancelSnapshot(){this._recorder.setMode("recording")}}function W2(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function hb(i){return i.injectedScript.utils.builtins.Date.now().toString()}function zh(i,e,t,s){return i.addEventListener(e,t,s),()=>i.removeEventListener(e,t,s)}function Z2(i){for(const e of i)e();i.splice(0,i.length)}class Q2{constructor(e){this._selectionState=null,this._overlay=null,this._feedbackTooltip=null,this._listeners=[],this._recorder=e,this._initializeConfig()}_initializeConfig(){const e=this._recorder.injectedScript.window;e.__playwrightAreaSelectionConfig||(e.__playwrightAreaSelectionConfig={minDragDistance:3,showFeedback:!0,feedbackDuration:2e3,overlayColor:"#0ea5e9",overlayOpacity:.1,overlayBorderStyle:"dashed",overlayBorderWidth:2},console.log("[AreaSelectionTool] Configuration available at window.__playwrightAreaSelectionConfig"),console.log("[AreaSelectionTool] Adjust minDragDistance (default: 3px) in DevTools to fine-tune sensitivity"))}_getConfig(){return this._recorder.injectedScript.window.__playwrightAreaSelectionConfig}cursor(){return"crosshair"}install(){this._arm()}uninstall(){this._disarm(),this._removeOverlay(),this._removeFeedbackTooltip()}cleanup(){this._selectionState&&(this._disarm(),this._removeOverlay(),this._removeFeedbackTooltip())}onKeyDown(e){e.key==="Escape"&&(W2(e),this._removeOverlay(),this._recorder.setMode("recording"))}_arm(){var a;this._selectionState={startPoint:null,endPoint:null,targetCanvas:null,isSelecting:!1},(a=this._recorder.injectedScript.document.body)==null||a.setAttribute("data-pw-cursor","crosshair"),this._createOverlay();const e=o=>{var f;const c=o;if(!this._selectionState)return;const d=c.target;if(this._isInteractiveElement(d)){console.log("[AreaSelectionTool] Ignoring click on interactive element:",d.tagName,(f=d.textContent)==null?void 0:f.substring(0,30));return}this._selectionState.startPoint={x:c.clientX,y:c.clientY};const h=this._detectCanvasAtPoint({x:c.clientX,y:c.clientY});h?this._selectionState.targetCanvas=h:this._selectionState.targetCanvas=null,this._selectionState.isSelecting=!0},t=o=>{const c=o;this._selectionState&&this._selectionState.isSelecting&&this._selectionState.startPoint&&(this._selectionState.endPoint={x:c.clientX,y:c.clientY},this._updateOverlay(this._selectionState.startPoint,this._selectionState.endPoint))},s=o=>{const c=o;if(this._selectionState&&this._selectionState.isSelecting&&(this._selectionState.endPoint={x:c.clientX,y:c.clientY},this._selectionState.isSelecting=!1,this._selectionState.startPoint&&this._selectionState.endPoint)){const d=this._calculateDistance(this._selectionState.startPoint,this._selectionState.endPoint),f=this._getConfig().minDragDistance;d>=f?(console.log("[AreaSelectionTool] ✓ Capturing area selection, drag distance:",d.toFixed(1),"px (threshold:",f,"px)"),this._showSuccessFeedback(d),this._capture(),this._selectionState.startPoint=null,this._selectionState.endPoint=null,this._selectionState.targetCanvas=null,this._removeOverlay()):(console.warn("[AreaSelectionTool] ✗ Drag too small:",d.toFixed(1),"px (need ≥",f,"px) - staying active for retry"),this._showFailureFeedback(d,f),this._selectionState.startPoint=null,this._selectionState.endPoint=null,this._selectionState.targetCanvas=null,this._removeOverlay())}};this._listeners.push(zh(this._recorder.document,"pointerdown",e,!1),zh(this._recorder.document,"pointermove",t,!1),zh(this._recorder.document,"pointerup",s,!1))}_disarm(){Z2(this._listeners),this._listeners=[],this._selectionState=null}_createOverlay(){const e=this._getConfig();this._overlay=this._recorder.document.createElement("div");const t=(s,a)=>{const o=parseInt(s.slice(1,3),16),c=parseInt(s.slice(3,5),16),d=parseInt(s.slice(5,7),16);return`rgba(${o}, ${c}, ${d}, ${a})`};this._overlay.style.cssText=`
|
|
457
|
+
`,e.body.appendChild(this._marquee)}_updateMarquee(){if(!this._marquee||!this._dragStart||!this._dragCurrent)return;const e=Math.min(this._dragStart.x,this._dragCurrent.x),t=Math.min(this._dragStart.y,this._dragCurrent.y),s=Math.max(this._dragStart.x,this._dragCurrent.x),a=Math.max(this._dragStart.y,this._dragCurrent.y);this._marquee.style.left=e+"px",this._marquee.style.top=t+"px",this._marquee.style.width=s-e+"px",this._marquee.style.height=a-t+"px"}_removeMarquee(){this._marquee&&(this._marquee.remove(),this._marquee=null)}_onGlassPointerDown(e){Ja(e),this._dragStart={x:e.clientX,y:e.clientY},this._dragCurrent=this._dragStart}_onGlassPointerMove(e){if(Ja(e),!this._dragStart){this._updateHoverHighlight(e);return}this._dragCurrent={x:e.clientX,y:e.clientY},Math.hypot(this._dragCurrent.x-this._dragStart.x,this._dragCurrent.y-this._dragStart.y)>=this.DRAG_THRESHOLD&&!this._isDragging&&(this._isDragging=!0,this._createMarquee(),this._glassOverlay&&(this._glassOverlay.style.cursor="crosshair")),this._isDragging?this._updateMarquee():this._updateHoverHighlight(e)}async _onGlassPointerUp(e){Ja(e),this._isDragging?await this._captureRegionSnapshot():this._dragStart&&await this._captureClickSnapshot(e),this._recorder.setMode("recording")}_updateHoverHighlight(e){var o,c,d,h;if(!this._recorder)return;this._glassOverlay&&(this._glassOverlay.style.display="none");const t=this._recorder.document.elementFromPoint(e.clientX,e.clientY);if(this._glassOverlay&&(this._glassOverlay.style.display=""),!t)return;if(((o=t.tagName)==null?void 0:o.toLowerCase())==="iframe"){const f=t;try{const y=f.getBoundingClientRect(),m=f.contentDocument;if(m){const _=[{iframe:f,selector:this._generateStableSelector(f)}],b=e.clientX-y.left,w=e.clientY-y.top,v=this._findGoJSDiagramRecursive(_,m,b,w,y.left,y.top);if(v){const A=v.containerEl.getBoundingClientRect(),C=v.accOffsetX+A.left,L=v.accOffsetY+A.top;if(this._syntheticHighlightEl){const B=this._syntheticHighlightEl.style;if(B.left===`${C}px`&&B.top===`${L}px`)return}this._cleanupSyntheticHighlight();const j=this._recorder.document,D=j.createElement("x-pw-gojs-highlight");D.style.cssText=["position: fixed","pointer-events: none","z-index: -1",`left: ${C}px`,`top: ${L}px`,`width: ${A.width}px`,`height: ${A.height}px`].join(" !important; ")+" !important;",(c=j.body)==null||c.appendChild(D),this._syntheticHighlightEl=D;const F=this._recorder.injectedScript.generateSelector(f,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:F.selector,elements:[D],color:Hh.snapshot,tooltipText:"GoJS diagram (iframe)"},this._recorder.updateHighlight(this._hoverHighlight,!0);return}const T=this._findElementInIframeRecursive(_,m,b,w,y.left,y.top);if(T){const A=T.element.getBoundingClientRect(),C=T.accOffsetX+A.left,L=T.accOffsetY+A.top;if(this._syntheticHighlightEl){const B=this._syntheticHighlightEl.style;if(B.left===`${C}px`&&B.top===`${L}px`)return}this._cleanupSyntheticHighlight();const j=this._recorder.document,D=j.createElement("x-pw-gojs-highlight");D.style.cssText=["position: fixed","pointer-events: none","z-index: -1",`left: ${C}px`,`top: ${L}px`,`width: ${A.width}px`,`height: ${A.height}px`].join(" !important; ")+" !important;",(d=j.body)==null||d.appendChild(D),this._syntheticHighlightEl=D;const F=this._generateStableSelector(T.element);this._hoverHighlight={selector:F,elements:[D],color:Hh.snapshot,tooltipText:"Element (iframe)"},this._recorder.updateHighlight(this._hoverHighlight,!0);return}}}catch{}this._cleanupSyntheticHighlight()}else this._cleanupSyntheticHighlight();const s=this._resolvePdfTarget(t)||t;if(((h=this._hoverHighlight)==null?void 0:h.elements[0])===s)return;const a=this._recorder.injectedScript.generateSelector(s,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:a.selector,elements:a.elements,color:Hh.snapshot},this._recorder.updateHighlight(this._hoverHighlight,!0)}async _captureClickSnapshot(e){var y;const t=this._glassOverlay&&this._glassOverlay.style.display!=="none";this._glassOverlay&&(this._glassOverlay.style.display="none");const s=this._recorder.document.elementFromPoint(e.clientX,e.clientY);if(this._glassOverlay&&t&&(this._glassOverlay.style.display=""),!s)return;if(((y=s.tagName)==null?void 0:y.toLowerCase())==="iframe"){const m=s;try{const _=m.getBoundingClientRect(),b=m.contentDocument;if(b){const w=[{iframe:m,selector:this._generateStableSelector(m)}],v=e.clientX-_.left,T=e.clientY-_.top,A=this._findGoJSDiagramRecursive(w,b,v,T,_.left,_.top);if(A){await this._captureGoJsDiagramSnapshot(A.iframeChain,A.diagramSelector);return}const C=this._findElementInIframeRecursive(w,b,v,T,_.left,_.top);if(C){await this._captureIframeElementSnapshot(C.iframeChain,C.element);return}}}catch{}await this._captureElementSnapshot(m);return}const a=e.altKey,c=e.shiftKey&&s.parentElement?s.parentElement:s,d=this._resolvePdfTarget(c),h=d||c;a||!d&&this._shouldCapturePageSnapshot(h)?await this._capturePageSnapshot():await this._captureElementSnapshot(h)}_resolvePdfTarget(e){const t=e.closest("[data-page-number]");return t||null}_shouldCapturePageSnapshot(e,t){var h;const s=(h=e.tagName)==null?void 0:h.toLowerCase();if(s==="html"||s==="body")return!0;const a=t??this._recorder.injectedScript.window,o=e.getBoundingClientRect(),c=a.innerWidth*a.innerHeight;return o.width*o.height>=c*this.VIEWPORT_THRESHOLD}_buildSelectorFromEl(e){if(e.id)return`#${e.id}`;const t=e.getAttribute("data-testid");if(t)return`[data-testid="${t}"]`;const s=e.parentElement;if(s){const a=Array.from(s.children).indexOf(e)+1;return`${e.tagName.toLowerCase()}:nth-child(${a})`}return e.tagName.toLowerCase()}_findGoJSDiagramRecursive(e,t,s,a,o,c){var _,b,w;const d=t.querySelector("x-pw-glass");d&&(d.style.display="none");let h=null;try{h=t.elementFromPoint(s,a)}catch{return d&&(d.style.display=""),null}if(d&&(d.style.display=""),!h)return null;if(((_=h.tagName)==null?void 0:_.toLowerCase())==="iframe"){const v=h;try{const T=v.contentDocument;if(!T)return null;const A=v.getBoundingClientRect();return this._findGoJSDiagramRecursive([...e,{iframe:v,selector:this._generateStableSelector(v)}],T,s-A.left,a-A.top,o+A.left,c+A.top)}catch{return null}}const f=t.defaultView;if(!((w=(b=f==null?void 0:f.go)==null?void 0:b.Diagram)!=null&&w.fromDiv))return null;const y=t.body;let m=h;for(;m&&m!==y;){if(f.go.Diagram.fromDiv(m))return{containerEl:m,diagramSelector:this._buildSelectorFromEl(m),iframeChain:e,accOffsetX:o,accOffsetY:c};m=m.parentElement}return null}_findElementInIframeRecursive(e,t,s,a,o,c){var f;const d=t.querySelector("x-pw-glass");d&&(d.style.display="none");let h=null;try{h=t.elementFromPoint(s,a)}catch{return d&&(d.style.display=""),null}if(d&&(d.style.display=""),!h)return null;if(((f=h.tagName)==null?void 0:f.toLowerCase())==="iframe"){const y=h;try{const m=y.contentDocument;if(!m)return null;const _=y.getBoundingClientRect();return this._findElementInIframeRecursive([...e,{iframe:y,selector:this._generateStableSelector(y)}],m,s-_.left,a-_.top,o+_.left,c+_.top)}catch{return null}}return{element:h,iframeChain:e,document:t,accOffsetX:o,accOffsetY:c}}_generateStableSelector(e){var t;try{const s=(t=e.ownerDocument)==null?void 0:t.defaultView;if(s!=null&&s.__pw_recorderGenerateSelector){const a=s.__pw_recorderGenerateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});if(a!=null&&a.selector)return a.selector}}catch{}return this._buildSelectorFromEl(e)}async _captureIframeElementSnapshot(e,t){var d;const s=this._generateStableSelector(t),a=await Ui.getNextCounter(this._recorder,"element"),o=`el-${String(a).padStart(3,"0")}.png`,c={name:"visualSnapshot",snapshotType:"element",iframeSelectors:e.map(h=>h.selector),selector:s,filename:o,signals:[],timestamp:Wa(this._recorder)};this._recorder.recordAction(c),(d=this._recorder.overlay)==null||d.flashToolSucceeded("assertingVSnapshot")}async _captureGoJsDiagramSnapshot(e,t){var c;const s=await Ui.getNextCounter(this._recorder,"element"),a=`gojs-${String(s).padStart(3,"0")}.png`,o={name:"visualSnapshot",snapshotType:"gojsDiagram",iframeSelectors:e.map(d=>d.selector),diagramSelector:t,filename:a,signals:[],timestamp:Wa(this._recorder)};this._recorder.recordAction(o),(c=this._recorder.overlay)==null||c.flashToolSucceeded("assertingVSnapshot")}async _capturePageSnapshot(){var a;const e=await Ui.getNextCounter(this._recorder,"page"),s={name:"visualSnapshot",snapshotType:"page",filename:`page-${String(e).padStart(3,"0")}.png`,fullPage:!0,signals:[],timestamp:Wa(this._recorder)};this._recorder.recordAction(s),(a=this._recorder.overlay)==null||a.flashToolSucceeded("assertingVSnapshot")}async _captureElementSnapshot(e){var c;const t=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}),s=await Ui.getNextCounter(this._recorder,"element"),a=`el-${String(s).padStart(3,"0")}.png`,o={name:"visualSnapshot",snapshotType:"element",selector:t.selector,filename:a,signals:[],timestamp:Wa(this._recorder)};this._recorder.recordAction(o),(c=this._recorder.overlay)==null||c.flashToolSucceeded("assertingVSnapshot")}async _captureRegionSnapshot(){var m;if(!this._dragStart||!this._dragCurrent)return;const e=Math.min(this._dragStart.x,this._dragCurrent.x),t=Math.min(this._dragStart.y,this._dragCurrent.y),s=Math.max(this._dragStart.x,this._dragCurrent.x),a=Math.max(this._dragStart.y,this._dragCurrent.y),o=this._recorder.injectedScript.window.scrollX||this._recorder.injectedScript.window.pageXOffset,c=this._recorder.injectedScript.window.scrollY||this._recorder.injectedScript.window.pageYOffset,d={x:Math.round(e+o),y:Math.round(t+c),width:Math.round(s-e),height:Math.round(a-t)},h=await Ui.getNextCounter(this._recorder,"region"),f=`region-${String(h).padStart(3,"0")}.png`,y={name:"visualSnapshot",snapshotType:"region",clip:d,filename:f,signals:[],timestamp:Wa(this._recorder)};this._recorder.recordAction(y),(m=this._recorder.overlay)==null||m.flashToolSucceeded("assertingVSnapshot")}_cancelSnapshot(){this._recorder.setMode("recording")}}function n2(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function hb(i){return i.injectedScript.utils.builtins.Date.now().toString()}function zh(i,e,t,s){return i.addEventListener(e,t,s),()=>i.removeEventListener(e,t,s)}function i2(i){for(const e of i)e();i.splice(0,i.length)}class s2{constructor(e){this._selectionState=null,this._overlay=null,this._feedbackTooltip=null,this._listeners=[],this._recorder=e,this._initializeConfig()}_initializeConfig(){const e=this._recorder.injectedScript.window;e.__playwrightAreaSelectionConfig||(e.__playwrightAreaSelectionConfig={minDragDistance:3,showFeedback:!0,feedbackDuration:2e3,overlayColor:"#0ea5e9",overlayOpacity:.1,overlayBorderStyle:"dashed",overlayBorderWidth:2},console.log("[AreaSelectionTool] Configuration available at window.__playwrightAreaSelectionConfig"),console.log("[AreaSelectionTool] Adjust minDragDistance (default: 3px) in DevTools to fine-tune sensitivity"))}_getConfig(){return this._recorder.injectedScript.window.__playwrightAreaSelectionConfig}cursor(){return"crosshair"}install(){this._arm()}uninstall(){this._disarm(),this._removeOverlay(),this._removeFeedbackTooltip()}cleanup(){this._selectionState&&(this._disarm(),this._removeOverlay(),this._removeFeedbackTooltip())}onKeyDown(e){e.key==="Escape"&&(n2(e),this._removeOverlay(),this._recorder.setMode("recording"))}_arm(){var a;this._selectionState={startPoint:null,endPoint:null,targetCanvas:null,isSelecting:!1},(a=this._recorder.injectedScript.document.body)==null||a.setAttribute("data-pw-cursor","crosshair"),this._createOverlay();const e=o=>{var f;const c=o;if(!this._selectionState)return;const d=c.target;if(this._isInteractiveElement(d)){console.log("[AreaSelectionTool] Ignoring click on interactive element:",d.tagName,(f=d.textContent)==null?void 0:f.substring(0,30));return}this._selectionState.startPoint={x:c.clientX,y:c.clientY};const h=this._detectCanvasAtPoint({x:c.clientX,y:c.clientY});h?this._selectionState.targetCanvas=h:this._selectionState.targetCanvas=null,this._selectionState.isSelecting=!0},t=o=>{const c=o;this._selectionState&&this._selectionState.isSelecting&&this._selectionState.startPoint&&(this._selectionState.endPoint={x:c.clientX,y:c.clientY},this._updateOverlay(this._selectionState.startPoint,this._selectionState.endPoint))},s=o=>{const c=o;if(this._selectionState&&this._selectionState.isSelecting&&(this._selectionState.endPoint={x:c.clientX,y:c.clientY},this._selectionState.isSelecting=!1,this._selectionState.startPoint&&this._selectionState.endPoint)){const d=this._calculateDistance(this._selectionState.startPoint,this._selectionState.endPoint),f=this._getConfig().minDragDistance;d>=f?(console.log("[AreaSelectionTool] ✓ Capturing area selection, drag distance:",d.toFixed(1),"px (threshold:",f,"px)"),this._showSuccessFeedback(d),this._capture(),this._selectionState.startPoint=null,this._selectionState.endPoint=null,this._selectionState.targetCanvas=null,this._removeOverlay()):(console.warn("[AreaSelectionTool] ✗ Drag too small:",d.toFixed(1),"px (need ≥",f,"px) - staying active for retry"),this._showFailureFeedback(d,f),this._selectionState.startPoint=null,this._selectionState.endPoint=null,this._selectionState.targetCanvas=null,this._removeOverlay())}};this._listeners.push(zh(this._recorder.document,"pointerdown",e,!1),zh(this._recorder.document,"pointermove",t,!1),zh(this._recorder.document,"pointerup",s,!1))}_disarm(){i2(this._listeners),this._listeners=[],this._selectionState=null}_createOverlay(){const e=this._getConfig();this._overlay=this._recorder.document.createElement("div");const t=(s,a)=>{const o=parseInt(s.slice(1,3),16),c=parseInt(s.slice(3,5),16),d=parseInt(s.slice(5,7),16);return`rgba(${o}, ${c}, ${d}, ${a})`};this._overlay.style.cssText=`
|
|
458
458
|
position: fixed;
|
|
459
459
|
border: ${e.overlayBorderWidth}px ${e.overlayBorderStyle} ${e.overlayColor};
|
|
460
460
|
background: ${t(e.overlayColor,e.overlayOpacity)};
|
|
@@ -500,11 +500,11 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i
|
|
|
500
500
|
transform: translateX(-50%) translateY(-10px);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
`,this._recorder.document.head.appendChild(a),this._recorder.document.body.appendChild(this._feedbackTooltip),setTimeout(()=>{this._feedbackTooltip&&(this._feedbackTooltip.style.animation="pwSlideOut 0.3s ease-in",setTimeout(()=>this._removeFeedbackTooltip(),300))},s)}_removeFeedbackTooltip(){this._feedbackTooltip&&this._feedbackTooltip.parentElement&&(this._feedbackTooltip.parentElement.removeChild(this._feedbackTooltip),this._feedbackTooltip=null)}_getElementsInRect(e){const t=[],s=this._recorder.document.querySelectorAll("*");for(const a of s){const o=a.getBoundingClientRect();if(!(o.right<e.left||o.left>e.right||o.bottom<e.top||o.top>e.bottom)){const c=a.tagName.toLowerCase();(["button","a","input","select","textarea"].includes(c)||a.hasAttribute("role")||a.hasAttribute("data-testid"))&&t.push(a)}}return t}_capture(){var y,m;const e=this._selectionState.startPoint,t=this._selectionState.endPoint,s=Math.min(e.x,t.x),a=Math.min(e.y,t.y),o=Math.abs(t.x-e.x),c=Math.abs(t.y-e.y),d=new DOMRect(s,a,o,c);let h;const f=this._selectionState.targetCanvas||((y=this._detectCanvasContext({x:s+o/2,y:a+c/2}))==null?void 0:y.canvas);if(f){const _=this._recorder.injectedScript.generateSelector(f,{testIdAttributeName:this._recorder.state.testIdAttributeName});h={name:"selectArea",type:"canvas",startPoint:e,endPoint:t,canvasSelector:_.selector,signals:[],timestamp:hb(this._recorder)}}else{const _=this._getElementsInRect(d),b=_.map(
|
|
503
|
+
`,this._recorder.document.head.appendChild(a),this._recorder.document.body.appendChild(this._feedbackTooltip),setTimeout(()=>{this._feedbackTooltip&&(this._feedbackTooltip.style.animation="pwSlideOut 0.3s ease-in",setTimeout(()=>this._removeFeedbackTooltip(),300))},s)}_removeFeedbackTooltip(){this._feedbackTooltip&&this._feedbackTooltip.parentElement&&(this._feedbackTooltip.parentElement.removeChild(this._feedbackTooltip),this._feedbackTooltip=null)}_getElementsInRect(e){const t=[],s=this._recorder.document.querySelectorAll("*");for(const a of s){const o=a.getBoundingClientRect();if(!(o.right<e.left||o.left>e.right||o.bottom<e.top||o.top>e.bottom)){const c=a.tagName.toLowerCase();(["button","a","input","select","textarea"].includes(c)||a.hasAttribute("role")||a.hasAttribute("data-testid"))&&t.push(a)}}return t}_capture(){var y,m;const e=this._selectionState.startPoint,t=this._selectionState.endPoint,s=Math.min(e.x,t.x),a=Math.min(e.y,t.y),o=Math.abs(t.x-e.x),c=Math.abs(t.y-e.y),d=new DOMRect(s,a,o,c);let h;const f=this._selectionState.targetCanvas||((y=this._detectCanvasContext({x:s+o/2,y:a+c/2}))==null?void 0:y.canvas);if(f){const _=this._recorder.injectedScript.generateSelector(f,{testIdAttributeName:this._recorder.state.testIdAttributeName});h={name:"selectArea",type:"canvas",startPoint:e,endPoint:t,canvasSelector:_.selector,signals:[],timestamp:hb(this._recorder)}}else{const _=this._getElementsInRect(d),b=_.map(w=>this._recorder.injectedScript.generateSelector(w,{testIdAttributeName:this._recorder.state.testIdAttributeName}).selector);h={name:"selectArea",type:_.length>0?"dom":"hybrid",startPoint:e,endPoint:t,selectors:b.length>0?b:void 0,signals:[],timestamp:hb(this._recorder)}}this._recorder.recordAction(h),this._recorder.setMode("recording"),(m=this._recorder.overlay)==null||m.flashToolSucceeded("recordingArea")}}function r2(i){return i.injectedScript.utils.builtins.Date.now().toString()}class a2{constructor(e){this._actionSequenceCounter=0,this._recorder=e}cursor(){return"default"}install(){this._captureDomSnapshot()}uninstall(){}cleanup(){}_captureDomSnapshot(){const t={name:"domSnapshot",snapshotData:this._serializeDom(),signals:[],timestamp:r2(this._recorder)};this._recorder.recordAction(t),this._recorder.setMode("recording")}_serializeDom(){const e=this._recorder.document,t=this._recorder.injectedScript.window;return{url:e.location.href,timestamp:Date.now(),viewport:{width:t.innerWidth,height:t.innerHeight},dom:this._buildDomTree(e.documentElement),metadata:{actionSequence:this._actionSequenceCounter++,sessionId:`rec-${Date.now()}`}}}_buildDomTree(e,t=0){var c,d;if(t>50)return null;const s=e.tagName.toLowerCase();if(s.startsWith("x-pw-"))return null;const a={tag:s,attributes:this._getAttributes(e)};if(e.childNodes.length===0||e.childNodes.length===1&&((c=e.firstChild)==null?void 0:c.nodeType)===3){const h=(d=e.textContent)==null?void 0:d.trim();h&&(a.text=h)}if(e instanceof HTMLInputElement?(a.value=e.value,a.checked=e.checked,a.type=e.type):e instanceof HTMLTextAreaElement?a.value=e.value:e instanceof HTMLSelectElement&&(a.value=e.value,a.selectedOptions=Array.from(e.selectedOptions).map(h=>h.value)),e.shadowRoot){const h=Array.from(e.shadowRoot.children).map(f=>this._buildDomTree(f,t+1)).filter(Boolean);h.length>0&&(a.shadowRoot=h)}const o=Array.from(e.children).map(h=>this._buildDomTree(h,t+1)).filter(Boolean);return o.length>0&&(a.children=o),a}_getAttributes(e){const t={},s=["id","class","name","type","role","aria-label","aria-describedby","aria-labelledby","data-testid","data-test-id","data-test","placeholder","title","alt","href","src","value","for","action","method"];for(const a of s){const o=e.getAttribute(a);o&&(t[a]=o)}return t}}const o2=1e3,l2=9999;function c2(){try{if(document.querySelector("#modal-root dialog, #modal-root .modal_root")){const e=`
|
|
504
504
|
(() => {
|
|
505
505
|
const S = (window.__pwHideModal__ ||= {});
|
|
506
|
-
const MIN_BLOCKING_Z_INDEX = ${
|
|
507
|
-
const MIN_HIGH_PRIORITY_Z_INDEX = ${
|
|
506
|
+
const MIN_BLOCKING_Z_INDEX = ${o2};
|
|
507
|
+
const MIN_HIGH_PRIORITY_Z_INDEX = ${l2};
|
|
508
508
|
|
|
509
509
|
// Find ALL dialogs in the modal (main modal + any dropdowns)
|
|
510
510
|
const dialogs = Array.from(document.querySelectorAll('#modal-root dialog, #modal-root .modal_root'));
|
|
@@ -620,7 +620,7 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i
|
|
|
620
620
|
S.hidden = true;
|
|
621
621
|
console.log('✅ Modal hidden automatically for text assertion.');
|
|
622
622
|
})();
|
|
623
|
-
`;new Function(e)()}}catch(i){console.warn("Failed to auto-hide modal for assertion:",i)}}function
|
|
623
|
+
`;new Function(e)()}}catch(i){console.warn("Failed to auto-hide modal for assertion:",i)}}function u2(){try{const i=`
|
|
624
624
|
(() => {
|
|
625
625
|
const S = window.__pwHideModal__;
|
|
626
626
|
if (!S?.hidden) return console.warn('Nothing to restore.');
|
|
@@ -662,23 +662,23 @@ ${i.stack}`,{e:{n:i.name,m:i.message,s:c}}}if(E2(i))return{d:i.toJSON()};if(A2(i
|
|
|
662
662
|
S.hidden = false;
|
|
663
663
|
console.log('✅ Modal restored automatically after text assertion.');
|
|
664
664
|
})();
|
|
665
|
-
`;new Function(i)()}catch(i){console.warn("Failed to auto-show modal after assertion:",i)}}function Jl(...i){typeof window<"u"&&window.__SKYRAMP_DEBUG__&&console.log("[ModalHandler]",...i)}function fb(i){const e=i.getAttribute("data-testid");if(e)return`dialog[data-testid="${e}"]`;if(i.id)return`#${i.id}`;const t=i.getAttribute("aria-label");if(t)return`dialog[aria-label="${t}"]`;const s=i.tagName.toLowerCase(),a=i.className;return typeof a=="string"&&a.trim()?`${s}.${a.trim().split(/\s+/).join(".")}`:s}class aC{constructor(e){this._observer=null,this._enabled=!1,this._activeModal=null,this._document=e}setOnModalOpen(e){this._onModalOpen=e}setOnModalClose(e){this._onModalClose=e}isModalOpen(){return this._activeModal!==null}enable(){this._enabled||(this._enabled=!0,this._document.body&&(this._observer=new MutationObserver(e=>this._handleMutations(e)),this._observer.observe(this._document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["open","aria-modal","class"]}),this._checkExistingModals(),Jl("Enabled — watching for modal lifecycle events")))}disable(){this._enabled&&(this._enabled=!1,this._observer&&(this._observer.disconnect(),this._observer=null),this._activeModal=null,Jl("Disabled"))}_checkExistingModals(){const e=this._document.querySelector("dialog[open]");if(e){this._emitOpen(e);return}const t=this._document.querySelector('[aria-modal="true"]');if(t){this._emitOpen(t);return}const s=this._document.querySelector(".cds--modal.is-visible");if(s){this._emitOpen(s);return}}_handleMutations(e){var t,s,a;if(this._enabled)for(const o of e){if(o.type==="attributes"){const c=o.target;if(o.attributeName==="open"&&c.tagName==="DIALOG"){c.hasAttribute("open")?this._emitOpen(c):this._emitClose(c);continue}if(o.attributeName==="aria-modal"){c.getAttribute("aria-modal")==="true"?this._emitOpen(c):this._activeModal===c&&this._emitClose(c);continue}if(o.attributeName==="class"&&((t=c.classList)!=null&&t.contains("cds--modal"))){c.classList.contains("is-visible")?this._emitOpen(c):this._activeModal===c&&this._emitClose(c);continue}}if(o.type==="childList"){for(const c of o.addedNodes)c instanceof Element&&(c.tagName==="DIALOG"&&c.hasAttribute("open")?this._emitOpen(c):((s=c.getAttribute)==null?void 0:s.call(c,"aria-modal"))==="true"?this._emitOpen(c):(a=c.classList)!=null&&a.contains("cds--modal")&&c.classList.contains("is-visible")&&this._emitOpen(c));if(this._activeModal)for(const c of o.removedNodes)(c===this._activeModal||c instanceof Element&&c.contains(this._activeModal))&&this._emitClose(this._activeModal)}}}_emitOpen(e){var s;if(this._activeModal===e)return;this._activeModal=e;const t=fb(e);Jl("Modal opened:",t),(s=this._onModalOpen)==null||s.call(this,{selector:t})}_emitClose(e){var s;if(this._activeModal!==e)return;const t=fb(e);this._activeModal=null,Jl("Modal closed:",t),(s=this._onModalClose)==null||s.call(this,{selector:t})}}function oC(...i){typeof window<"u"&&window.__SKYRAMP_DEBUG__&&console.log("[IframeHandler]",...i)}function lC(i){return!!(/\d{2,}[_-][a-zA-Z]/.test(i)||/[-_]\d+$/.test(i)||/^react-aria\d+/.test(i)||/^(mui|mat|cdk)-\d+/.test(i)||/^\d+$/.test(i)||/\d{4,}/.test(i)||i.includes(":"))}function gb(i){if(i.title)return`iframe[title="${i.title}"]`;if(i.name)return`iframe[name="${i.name}"]`;if(i.id&&!lC(i.id))return`#${i.id}`;if(i.src){try{const e=new URL(i.src);if((e.protocol==="http:"||e.protocol==="https:")&&e.pathname&&e.pathname!=="/")return`iframe[src*="${e.pathname}"]`}catch{}return`iframe[src="${i.src}"]`}return i.id?`#${i.id}`:"iframe"}class cC{constructor(e){this._observer=null,this._enabled=!1,this._trackedIframes=new WeakSet,this._document=e}setOnIframeLoad(e){this._onIframeLoad=e}enable(){this._enabled||(this._enabled=!0,this._document.body&&(this._observer=new MutationObserver(e=>this._handleMutations(e)),this._observer.observe(this._document.body,{childList:!0,subtree:!0}),this._trackExistingIframes(),console.log("[IframeHandler] Enabled — watching for iframe load events")))}disable(){this._enabled&&(this._enabled=!1,this._observer&&(this._observer.disconnect(),this._observer=null),oC("Disabled"))}_trackExistingIframes(){for(const e of this._document.querySelectorAll("iframe"))this._trackIframe(e)}_handleMutations(e){if(this._enabled){for(const t of e)if(t.type==="childList"){for(const s of t.addedNodes)if(s instanceof HTMLIFrameElement&&this._trackIframe(s),s instanceof Element)for(const a of s.querySelectorAll("iframe"))this._trackIframe(a)}}}_trackIframe(e){var t,s;if(!this._trackedIframes.has(e)){this._trackedIframes.add(e),e.addEventListener("load",()=>{var o;if(!this._enabled)return;const a=gb(e);console.log("[IframeHandler] Iframe loaded:",a),(o=this._onIframeLoad)==null||o.call(this,{selector:a})},{once:!0});try{if(((t=e.contentDocument)==null?void 0:t.readyState)==="complete"){const a=gb(e);console.log("[IframeHandler] Iframe already loaded:",a),(s=this._onIframeLoad)==null||s.call(this,{selector:a})}}catch{}}}}const fn={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f",snapshot:"#9c7fe480"};class $h{}class Bh{constructor(e,t){this._hoveredModel=null,this._hoveredElement=null,this._recorder=e,this._assertVisibility=t}cursor(){return"pointer"}uninstall(){this._hoveredModel=null,this._hoveredElement=null}onClick(e){var t;Ie(e),e.button===0&&(t=this._hoveredModel)!=null&&t.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){Ie(e)}onPointerUp(e){Ie(e)}onMouseDown(e){Ie(e)}onMouseUp(e){Ie(e)}onMouseMove(e){var a;Ie(e);let t=this._recorder.deepEventTarget(e);if(t.isConnected||(t=null),this._hoveredElement===t)return;this._hoveredElement=t;let s=null;if(this._hoveredElement){const o=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1}),c=bo(this._recorder.injectedScript,this._hoveredElement,o.selector,o.elements),d=c?c.selector:o.selector,h=c?c.elements:o.elements;s={selector:d,elements:h,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,d),color:this._assertVisibility?fn.assert:fn.single}}((a=this._hoveredModel)==null?void 0:a.selector)!==(s==null?void 0:s.selector)&&(this._hoveredModel=s,this._recorder.updateHighlight(s,!0))}onMouseEnter(e){Ie(e)}onMouseLeave(e){Ie(e);const t=this._recorder.injectedScript.window;t.top!==t&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){Ie(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){Ie(e)}onScroll(e){this._reset(!1)}_commit(e,t){var s;this._assertVisibility?(this._recorder.recordAction({name:"assertVisible",selector:e,signals:[],timestamp:Te(this._recorder)}),this._recorder.setMode("recording"),(s=this._recorder.overlay)==null||s.flashToolSucceeded("assertingVisibility")):this._recorder.elementPicked(e,t)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class uC{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 Cv(e)}cursor(){return"pointer"}_installObserverIfNeeded(){var e;this._observer||(e=this._recorder.injectedScript.document)!=null&&e.body&&(this._observer=new MutationObserver(t=>{if(this._hoveredElement)for(const s of t)for(const a of s.removedNodes)(a===this._hoveredElement||a.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){var h;if(this._lastClickX=e.clientX,this._lastClickY=e.clientY,this._dialog.isShowing()){e.button===2&&e.type==="auxclick"&&Ie(e);return}if(go(this._hoveredElement)||this._shouldIgnoreMouseEvent(e))return;const t=this._recorder.deepEventTarget(e),s=this._findFileInput(t);if(s){if(!this._activeModel){const f=((h=this._hoveredModel)==null?void 0:h.selector)??this._recorder.injectedScript.generateSelector(s,{testIdAttributeName:this._recorder.state.testIdAttributeName}).selector;this._activeModel=this._hoveredModel??{selector:f,elements:[s],color:"#dc6f6f7f"}}return}if(this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel))return;if(e.button===2&&e.type==="auxclick"){this._showActionListDialog(this._hoveredModel,e);return}const a=fo(this._recorder.deepEventTarget(e));if(a&&e.detail===1){this._performAction({name:a.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[],timestamp:Te(this._recorder)});return}this._cancelPendingClickAction();let o=this._hoveredModel.selector,c=!1;if(this._recorder.pointerEventsOverrideEnabled){const f=this._recorder.deepEventTarget(e),y=this._recorder._nestedElementHandler.handleNestedClick(f,this._hoveredModel,this._recorder.injectedScript,this._recorder.state.testIdAttributeName);y&&(o=y.targetSelector,c=y.shouldAutoDisable)}let d;try{d=window!==window.top}catch{d=!0}if(e.detail===1){const f={name:"click",selector:o,position:ho(e),signals:[],button:ff(e),modifiers:Mr(e),clickCount:e.detail,timestamp:Te(this._recorder)};this._pendingClickAction={action:f,autoDisableNestedTool:c,timeout:d?0:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)},d&&this._commitPendingClickAction()}}onDblClick(e){this._dialog.isShowing()||go(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:ho(e),signals:[],button:ff(e),modifiers:Mr(e),clickCount:e.detail,timestamp:Te(this._recorder)}),this._recorder.pointerEventsOverrideEnabled&&this._recorder.togglePointerEventsOverride())}_commitPendingClickAction(){this._pendingClickAction&&(this._performAction(this._pendingClickAction.action),this._pendingClickAction.autoDisableNestedTool&&this._recorder.pointerEventsOverrideEnabled&&this._recorder.togglePointerEventsOverride()),this._cancelPendingClickAction()}_cancelPendingClickAction(){this._pendingClickAction&&this._recorder.injectedScript.utils.builtins.clearTimeout(this._pendingClickAction.timeout),this._pendingClickAction=void 0}onContextMenu(e){if(this._dialog.isShowing()){Ie(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 t=this._recorder.deepEventTarget(e);this._hoveredElement!==t&&(this._hoveredElement=t,this._updateModelForHoveredElement())}onMouseLeave(e){if(this._dialog.isShowing())return;const t=this._recorder.injectedScript.window;t.top!==t&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredElement=null,this._updateModelForHoveredElement())}onFocus(e){this._dialog.isShowing()||this._onFocus(e.isTrusted)}onInput(e){var s,a,o;if(this._dialog.isShowing())return;const t=this._recorder.deepEventTarget(e);if(t.nodeName==="INPUT"&&t.type.toLowerCase()==="file"){const c=((s=this._activeModel)==null?void 0:s.selector)??this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName}).selector,d=[...t.files||[]],h=d.map(b=>b.name),f=t.webkitdirectory===!0,y=d.map(b=>b.webkitRelativePath||""),m=(o=(a=this._activeModel)==null?void 0:a.elements)==null?void 0:o[0];if(!(!m||m===t)){this._recordAction({name:"fileChooser",selector:c,signals:[],files:h,webkitdirectory:f,relativePaths:y,timestamp:Te(this._recorder)});return}this._recordAction({name:"setInputFiles",selector:c,signals:[],files:h,webkitdirectory:f,relativePaths:y,timestamp:Te(this._recorder)});return}if(go(t)){this._recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:t.value,timestamp:Te(this._recorder)});return}if(["INPUT","TEXTAREA"].includes(t.nodeName)||t.isContentEditable){if(t.nodeName==="INPUT"&&["checkbox","radio"].includes(t.type.toLowerCase())||this._consumedDueWrongTarget(e))return;this._recordAction({name:"fill",selector:this._activeModel.selector,signals:[],text:t.isContentEditable?t.innerText:t.value,timestamp:Te(this._recorder)})}if(t.nodeName==="SELECT"){const c=t;this._recordAction({name:"select",selector:this._activeModel.selector,options:[...c.selectedOptions].map(d=>d.value),signals:[],timestamp:Te(this._recorder)})}}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 t=fo(this._recorder.deepEventTarget(e));if(t&&e.detail===0){this._performAction({name:t.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[],timestamp:Te(this._recorder)});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:Mr(e),timestamp:Te(this._recorder)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){Ie(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,t){Ie(t);const s=ho(t),a=[{title:"Click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:1,timestamp:Te(this._recorder)})},{title:"Right click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"right",modifiers:0,clickCount:1,timestamp:Te(this._recorder)})},{title:"Double click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:2,timestamp:Te(this._recorder)})},{title:"Hover",cb:()=>this._performAction({name:"hover",selector:e.selector,position:s,signals:[],timestamp:Te(this._recorder)})},{title:"Pick locator",cb:()=>this._recorder.elementPicked(e.selector,e)}],o=this._recorder.document.createElement("x-pw-action-list");o.setAttribute("role","list"),o.setAttribute("aria-label","Choose action");for(const f of a){const y=this._recorder.document.createElement("x-pw-action-item");y.setAttribute("role","listitem"),y.textContent=f.title,y.setAttribute("aria-label",f.title),y.addEventListener("click",()=>{this._dialog.close(),f.cb()}),o.appendChild(y)}const c=this._dialog.show({label:"Choose action",body:o,autosize:!0}),d=this._recorder.highlight.firstTooltipBox()||e.elements[0].getBoundingClientRect(),h=this._recorder.highlight.tooltipPosition(d,c);this._dialog.moveTo(h.anchorTop,h.anchorLeft)}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){const t=kv(this._recorder.document);if(t===this._recorder.document.body)return;const s=t?this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;let a=s==null?void 0:s.selector,o=s==null?void 0:s.elements;if(t&&s){const c=bo(this._recorder.injectedScript,t,s.selector,s.elements);c&&(a=c.selector,o=c.elements)}this._activeModel=s&&a?{...s,selector:a,elements:o,color:fn.action}:null,e&&(this._hoveredElement=t,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const t=this._recorder.deepEventTarget(e),s=t.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(t.type))}_actionInProgress(e){const t=e instanceof KeyboardEvent,s=e instanceof MouseEvent||e instanceof PointerEvent;for(const a of this._performingActions)if(t&&a.name==="press"&&e.key===a.key||s&&(a.name==="click"||a.name==="hover"||a.name==="check"||a.name==="uncheck"))return!0;return Ie(e),!1}_consumedDueToNoModel(e,t){return t?!1:(Ie(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(Ie(e),!0)}_findFileInput(e){if(e.nodeName==="INPUT"&&e.type.toLowerCase()==="file")return e;if(e.nodeName==="LABEL"){const s=e.htmlFor;if(s){const a=e.ownerDocument.getElementById(s);if(a&&a.nodeName==="INPUT"&&a.type.toLowerCase()==="file")return a}}const t=e.querySelector('input[type="file"]');return t||null}_consumeWhenAboutToPerform(e){this._performingActions.size||Ie(e)}_recordAction(e){this._recorder.recordAction(e)}_performAction(e){this._recorder.updateHighlight(null,!1),this._performingActions.add(e);const t=this._recorder.performAction(e).then(()=>{this._performingActions.delete(e),this._onFocus(!1)});this._recorder.injectedScript.isUnderTest&&t.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 t=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!t?!!fo(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}let{selector:e,elements:t}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});const s=bo(this._recorder.injectedScript,this._hoveredElement,e,t);s&&(e=s.selector,t=s.elements),!(this._hoveredModel&&this._hoveredModel.selector===e)&&(this._hoveredModel=e?{selector:e,elements:t,color:fn.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class dC{constructor(e){this._recorder=e}install(){this._recorder.clearHighlight()}uninstall(){}onClick(e){const t=this._recorder.deepEventTarget(e);if(go(t)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const s=fo(t),{ariaSnapshot:a,selector:o,ref:c,scoped:d}=this._ariaSnapshot(t);if(s&&e.detail===1){this._recorder.recordAction({name:s.checked?"check":"uncheck",selector:o,ref:c,scoped:d,signals:[],ariaSnapshot:a,timestamp:Te(this._recorder)});return}this._recorder.recordAction({name:"click",selector:o,ref:c,scoped:d,ariaSnapshot:a,position:ho(e),signals:[],button:ff(e),modifiers:Mr(e),clickCount:e.detail,timestamp:Te(this._recorder)})}onContextMenu(e){const t=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o,scoped:c}=this._ariaSnapshot(t);this._recorder.recordAction({name:"click",selector:a,ref:o,scoped:c,ariaSnapshot:s,position:ho(e),signals:[],button:"right",modifiers:Mr(e),clickCount:1,timestamp:Te(this._recorder)})}onInput(e){const t=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o,scoped:c}=this._ariaSnapshot(t);if(go(t)){this._recorder.recordAction({name:"fill",selector:a,ref:o,scoped:c,ariaSnapshot:s,signals:[],text:t.value,timestamp:Te(this._recorder)});return}if(["INPUT","TEXTAREA"].includes(t.nodeName)||t.isContentEditable){if(t.nodeName==="INPUT"&&["checkbox","radio"].includes(t.type.toLowerCase()))return;this._recorder.recordAction({name:"fill",ref:o,selector:a,scoped:c,ariaSnapshot:s,signals:[],text:t.isContentEditable?t.innerText:t.value,timestamp:Te(this._recorder)});return}if(t.nodeName==="SELECT"){const d=t;this._recorder.recordAction({name:"select",selector:a,ref:o,scoped:c,ariaSnapshot:s,options:[...d.selectedOptions].map(h=>h.value),signals:[],timestamp:Te(this._recorder)});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const t=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o,scoped:c}=this._ariaSnapshot(t);if(e.key===" "){const d=fo(t);if(d&&e.detail===0){this._recorder.recordAction({name:d.checked?"uncheck":"check",selector:a,ref:o,scoped:c,ariaSnapshot:s,signals:[],timestamp:Te(this._recorder)});return}}this._recorder.recordAction({name:"press",selector:a,ref:o,scoped:c,ariaSnapshot:s,signals:[],key:e.key,modifiers:Mr(e),timestamp:Te(this._recorder)})}_shouldIgnoreMouseEvent(e){const t=this._recorder.deepEventTarget(e),s=t.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(t.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 t=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!t?!this._isEditable(this._recorder.deepEventTarget(e)):!0}_isEditable(e){return!!(e.nodeName==="TEXTAREA"||e.nodeName==="INPUT"||e.isContentEditable)}_ariaSnapshot(e){const{ariaSnapshot:t,refs:s}=this._recorder.injectedScript.ariaSnapshotForRecorder(),a=e?s.get(e):void 0,o=e?this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}):void 0;let c=o==null?void 0:o.selector,d;if(e&&o){const h=bo(this._recorder.injectedScript,e,o.selector,o.elements);h&&(c=h.selector,!h.isFormContainer&&!h.usesTextFilter&&(d={container:h.containerSelector,index:h.containerIndex,relative:h.relativeSelector}))}return{ariaSnapshot:t,selector:c,ref:a,scoped:d}}}class Ih{constructor(e,t){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=t,this._dialog=new Cv(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){Ie(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const t=this._recorder.deepEventTarget(e);this._elementHasValue(t)?e.preventDefault():Ie(e)}onPointerDown(e){Ie(e)}onPointerUp(e){var s;const t=(s=this._hoverHighlight)==null?void 0:s.elements[0];this._kind==="value"&&t&&(t.nodeName==="INPUT"||t.nodeName==="SELECT")&&t.disabled&&this._commitAssertValue()}onMouseMove(e){var s;if(this._dialog.isShowing())return;const t=this._recorder.deepEventTarget(e);if(((s=this._hoverHighlight)==null?void 0:s.elements[0])!==t){if(this._kind==="text"||this._kind==="snapshot")this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,t).full?{elements:[t],selector:"",color:fn.assert}:null;else if(this._elementHasValue(t)){const a=this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:a.selector,elements:a.elements,color:fn.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),Ie(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 t;this._textCache.clear();const e=(t=this._hoverHighlight)==null?void 0:t.elements[0];if(!e)return null;if(this._kind==="value"){if(!this._elementHasValue(e))return null;const{selector:s}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return e.nodeName==="INPUT"&&["checkbox","radio"].includes(e.type.toLowerCase())?{name:"assertChecked",selector:s,signals:[],checked:!e.checked,timestamp:Te(this._recorder)}:{name:"assertValue",selector:s,signals:[],value:e.value,timestamp:Te(this._recorder)}}else if(this._kind==="snapshot"){const s=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:s.selector,elements:s.elements,color:fn.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],ariaSnapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"codegen"}),timestamp:Te(this._recorder)}}else{const s=e.closest("td"),a=s&&s.closest("tr");let o=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!a});const c=bo(this._recorder.injectedScript,e,o.selector,o.elements);return c&&(o={selector:c.selector,selectors:[c.selector],elements:c.elements}),this._hoverHighlight={selector:o.selector,elements:o.elements,color:fn.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,timestamp:Te(this._recorder)}}}_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"),rC())}_showDialog(){var e,t,s,a;(e=this._hoverHighlight)!=null&&e.elements[0]&&(sC(),this._action=this._generateAction(),((t=this._action)==null?void 0:t.name)==="assertText"?this._showTextDialog(this._action):((s=this._action)==null?void 0:s.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(a=this._recorder.overlay)==null||a.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const t=this._recorder.document.createElement("textarea");t.setAttribute("spellcheck","false"),t.value=this._renderValue(e),t.classList.add("text-editor");const s=()=>{var m;const d=this._recorder.injectedScript.utils.normalizeWhiteSpace(t.value),h=(m=this._hoverHighlight)==null?void 0:m.elements[0];if(!h)return;e.text=d;const f=this._recorder.injectedScript.utils.elementText(this._textCache,h).normalized,y=d&&f.includes(d);t.classList.toggle("does-not-match",!y)};t.addEventListener("input",s);const o=this._dialog.show({label:"Assert that element contains text",body:t,onCommit:()=>this._commit()}),c=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),o);this._dialog.moveTo(c.anchorTop,c.anchorLeft),t.focus()}_commitAssertValue(){var t;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(t=this._recorder.overlay)==null||t.flashToolSucceeded("assertingValue"))}}class hC{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._snapshotToggleTime=null,this._recorder=e;const t=this._recorder.document;this._overlayElement=t.createElement("x-pw-overlay");const s=t.createElement("x-pw-tools-list");this._overlayElement.appendChild(s),this._dragHandle=t.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(t.createElement("x-div")),s.appendChild(this._dragHandle),this._recordToggle=this._recorder.document.createElement("x-pw-tool-item"),this._recordToggle.title="Record",this._recordToggle.classList.add("record"),this._recordToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._recordToggle),this._pickLocatorToggle=this._recorder.document.createElement("x-pw-tool-item"),this._pickLocatorToggle.title="Pick locator",this._pickLocatorToggle.classList.add("pick-locator"),this._pickLocatorToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._pickLocatorToggle),this._modularityToggle=this._recorder.document.createElement("x-pw-tool-item"),this._modularityToggle.title="Mark block",this._modularityToggle.classList.add("modular"),this._modularityToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._modularityToggle),this._assertApiPayloadToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertApiPayloadToggle.title="Assert API Request",this._assertApiPayloadToggle.classList.add("assert-api-payload"),this._assertApiPayloadToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertApiPayloadToggle),this._fileUploadToggle=this._recorder.document.createElement("x-pw-tool-item"),this._fileUploadToggle.title="Upload file",this._fileUploadToggle.classList.add("file-upload"),this._fileUploadToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._fileUploadToggle),this._dragRecordToggle=this._recorder.document.createElement("x-pw-tool-item"),this._dragRecordToggle.title="Drag and drop",this._dragRecordToggle.classList.add("drag-record"),this._dragRecordToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._dragRecordToggle),this._areaSelectToggle=this._recorder.document.createElement("x-pw-tool-item"),this._areaSelectToggle.title="Select area",this._areaSelectToggle.classList.add("area-select"),this._areaSelectToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._areaSelectToggle),this._sketchToolToggle=this._recorder.document.createElement("x-pw-tool-item"),this._sketchToolToggle.title="Sketch Tool",this._sketchToolToggle.classList.add("sketch-tool"),this._sketchToolToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._sketchToolToggle),this._gojsLinkToggle=this._recorder.document.createElement("x-pw-tool-item"),this._gojsLinkToggle.title="GoJS Link (click source node, then target node)",this._gojsLinkToggle.classList.add("gojs-link"),this._gojsLinkToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._gojsLinkToggle),this._pointerEventsToggle=this._recorder.document.createElement("x-pw-tool-item"),this._pointerEventsToggle.title="Nested element selection",this._pointerEventsToggle.classList.add("pointer-events"),this._pointerEventsToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._pointerEventsToggle),this._assertVisibilityToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertVisibilityToggle.title="Assert visibility",this._assertVisibilityToggle.classList.add("visibility"),this._assertVisibilityToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertVisibilityToggle),this._assertTextToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertTextToggle.title="Assert text",this._assertTextToggle.classList.add("text"),this._assertTextToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertTextToggle),this._assertValuesToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertValuesToggle.title="Assert value",this._assertValuesToggle.classList.add("value"),this._assertValuesToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertValuesToggle),this._tableSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._tableSnapshotToggle.title="Assert table cell",this._tableSnapshotToggle.classList.add("table"),this._tableSnapshotToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._tableSnapshotToggle),this._assertVSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertVSnapshotToggle.title="Snapshot: Double-toggle for page, Click for element, Drag for region",this._assertVSnapshotToggle.classList.add("visual-snapshot"),this._assertVSnapshotToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertVSnapshotToggle),this._assertSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._jsonMarkerButton=this._recorder.document.createElement("x-pw-tool-item"),this._updateVisualPosition(),this._refreshListeners()}_refreshListeners(){Nv(this._listeners),this._listeners=[he(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),he(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")}),he(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",assertingVSnapshot:"recording-inspecting",assertingTableCell:"recording-inspecting",recordingDrag:"recording",recordingGoJSLink:"recording",recordingArea:"recording",recordingFileUpload:"recording",recordingTableSnapshot:"recording",recordingDomSnapshot:"recording",recordingSketchTool:"recording"};this._recorder.setMode(e[this._recorder.state.mode])}),he(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),he(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),he(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),he(this._assertSnapshotToggle,"click",()=>{this._assertSnapshotToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingSnapshot"?"recording":"assertingSnapshot")}),he(this._assertVSnapshotToggle,"click",()=>{if(this._assertVSnapshotToggle.classList.contains("disabled"))return;if(this._recorder.state.mode==="assertingVSnapshot"){const s=Date.now();this._snapshotToggleTime&&s-this._snapshotToggleTime<1500&&Ui.getNextCounter(this._recorder,"page").then(a=>{const o={name:"visualSnapshot",snapshotType:"page",filename:`page-${String(a).padStart(3,"0")}.png`,fullPage:!0,signals:[],timestamp:Te(this._recorder)};this._recorder.recordAction(o),this.flashToolSucceeded("assertingVSnapshot")}),this._snapshotToggleTime=null,this._recorder.setMode("recording")}else this._snapshotToggleTime=Date.now(),this._recorder.setMode("assertingVSnapshot")}),he(this._tableSnapshotToggle,"click",()=>{this._tableSnapshotToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingTableCell"?"recording":"assertingTableCell")}),he(this._fileUploadToggle,"click",()=>{this._fileUploadToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="recordingFileUpload"?"recording":"recordingFileUpload")}),he(this._pointerEventsToggle,"click",()=>{this._recorder.togglePointerEventsOverride()}),he(this._modularityToggle,"click",()=>{if(this._modularityToggle.classList.contains("disabled"))return;this._recorder.modularityToggled=!this._recorder.modularityToggled;let e="endBlock";this._recorder.modularityToggled&&(e="beginBlock");const t={name:e,timestamp:Te(this._recorder),sequence:Math.floor(Math.random()*1e6),signals:[]};this._recorder.recordAction(t)}),he(this._assertApiPayloadToggle,"click",()=>{if(this._assertApiPayloadToggle.classList.contains("disabled"))return;const e={name:"assertApiRequest",timestamp:Te(this._recorder),signals:[]};this._recorder.recordAction(e),this._assertApiPayloadToggle.classList.add("toggled"),setTimeout(()=>this._assertApiPayloadToggle.classList.remove("toggled"),1500)}),he(this._dragRecordToggle,"click",()=>{this._dragRecordToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="recordingDrag"?"recording":"recordingDrag")}),he(this._areaSelectToggle,"click",()=>{this._recorder.state.mode==="recordingArea"?this._recorder.setMode("recording"):this._recorder.setMode("recordingArea")}),he(this._sketchToolToggle,"click",()=>{this._sketchToolToggle.classList.contains("disabled")||(this._recorder.state.mode==="recordingSketchTool"?this._recorder.setMode("recording"):this._recorder.setMode("recordingSketchTool"))}),he(this._gojsLinkToggle,"click",()=>{if(!this._gojsLinkToggle.classList.contains("disabled")){const e=this._recorder.state.mode;this._recorder.setMode(e==="recordingGoJSLink"?"recording":"recordingGoJSLink")}})]}install(){this._recorder.highlight.appendChild(this._overlayElement),this._refreshListeners(),this._updateVisualPosition();const e=t=>{const s=t.target;s&&(s===this._dragHandle||this._dragHandle.contains(s))&&(t.type==="mousedown"||t.type==="mousemove"||t.type==="mouseup"||t.type==="pointerdown"||t.type==="pointermove"||t.type==="pointerup")||(t.stopPropagation(),t.preventDefault())};this._listeners.push(he(this._overlayElement,"mousedown",e,!1),he(this._overlayElement,"mouseup",e,!1),he(this._overlayElement,"mousemove",e,!1),he(this._overlayElement,"pointerdown",e,!1),he(this._overlayElement,"pointerup",e,!1),he(this._overlayElement,"pointermove",e,!1),he(this._overlayElement,"click",e,!1),he(this._overlayElement,"dblclick",e,!1),he(this._overlayElement,"contextmenu",e,!1),he(this._overlayElement,"focus",e,!1),he(this._overlayElement,"blur",e,!1))}contains(e){return this._recorder.injectedScript.utils.isInsideScope(this._overlayElement,e)}setUIState(e){const t=e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="assertingVSnapshot"||e.mode==="assertingTableCell"||e.mode==="recording-inspecting"||e.mode==="recordingDrag"||e.mode==="recordingGoJSLink"||e.mode==="recordingArea"||e.mode==="recordingFileUpload"||e.mode==="recordingSketchTool";this._recordToggle.classList.toggle("toggled",t),this._recordToggle.title=t?"Stop Recording":"Start Recording",this._pickLocatorToggle.classList.toggle("toggled",e.mode==="inspecting"||e.mode==="recording-inspecting"),this._pickLocatorToggle.classList.toggle("disabled",e.mode==="recordingArea"),this._assertVisibilityToggle.classList.toggle("toggled",e.mode==="assertingVisibility"),this._assertVisibilityToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertTextToggle.classList.toggle("toggled",e.mode==="assertingText"),this._assertTextToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertValuesToggle.classList.toggle("toggled",e.mode==="assertingValue"),this._assertValuesToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertSnapshotToggle.classList.toggle("toggled",e.mode==="assertingSnapshot"),this._assertSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertVSnapshotToggle.classList.toggle("toggled",e.mode==="assertingVSnapshot"),this._assertVSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._tableSnapshotToggle.classList.toggle("toggled",e.mode==="assertingTableCell"),this._tableSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._fileUploadToggle.classList.toggle("toggled",e.mode==="recordingFileUpload"),this._fileUploadToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._modularityToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertApiPayloadToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._dragRecordToggle.classList.toggle("toggled",e.mode==="recordingDrag"),this._dragRecordToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._areaSelectToggle.classList.toggle("toggled",e.mode==="recordingArea"),this._areaSelectToggle.classList.toggle("disabled",e.mode==="none"),this._sketchToolToggle.classList.toggle("toggled",e.mode==="recordingSketchTool"),this._sketchToolToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._gojsLinkToggle.classList.toggle("toggled",e.mode==="recordingGoJSLink"),this._gojsLinkToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this.updateToolbar(),this._offsetX!==e.overlay.offsetX&&(this._offsetX=e.overlay.offsetX,this._updateVisualPosition()),e.mode==="none"?this._hideOverlay():this._showOverlay()}updateToolbar(){this._pointerEventsToggle.classList.toggle("toggled",this._recorder.pointerEventsOverrideEnabled)}flashToolSucceeded(e){let t;e==="assertingVisibility"?t=this._assertVisibilityToggle:e==="assertingSnapshot"?t=this._assertSnapshotToggle:e==="assertingVSnapshot"?t=this._assertVSnapshotToggle:e==="assertingTableCell"?t=this._tableSnapshotToggle:e==="fileUpload"?t=this._fileUploadToggle:e==="recordingArea"?t=this._areaSelectToggle:e==="recordingTableSnapshot"?t=this._tableSnapshotToggle:e==="recordingSketchTool"?t=this._sketchToolToggle:t=this._assertValuesToggle,t.classList.add("succeeded"),this._recorder.injectedScript.utils.builtins.setTimeout(()=>t.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 t=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-t,Math.min(t,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),Ie(e),!0}return!1}onMouseUp(e){return this._dragState?(Ie(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,Ie(e),!0):!1}onDblClick(e){return!1}updateModularityToggleState(e){this._modularityToggle.classList.toggle("toggled",e)}}const oi=class oi{constructor(e,t){var s,a;this._listeners=[],this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.state={mode:"none",testIdAttributeName:"data-testid",language:"javascript",overlay:{offsetX:0},modularityToggled:!1},this._delegate={},this._modularityToggled=!1,this._recentHoverTrail=[],this._previousUserActionName=void 0,this.document=e.document,this.injectedScript=e,this.highlight=e.createHighlight(),this._nestedElementHandler=new B2(this.document),this._modalHandler=new aC(this.document),this._modalHandler.setOnModalOpen(({selector:o})=>{this.recordAction({name:"modalOpen",selector:o,signals:[],timestamp:Te(this)})}),this._modalHandler.setOnModalClose(({selector:o})=>{this.recordAction({name:"modalClose",selector:o,signals:[],timestamp:Te(this)})}),this._iframeHandler=new cC(this.document),this._iframeHandler.setOnIframeLoad(({selector:o})=>{this.recordAction({name:"iframeLoad",selector:o,signals:[],timestamp:Te(this)})}),this._tools={none:new $h,standby:new $h,inspecting:new Bh(this,!1),recording:(t==null?void 0:t.recorderMode)==="api"?new dC(this):new uC(this),"recording-inspecting":new Bh(this,!1),assertingText:new Ih(this,"text"),assertingVisibility:new Bh(this,!0),assertingValue:new Ih(this,"value"),assertingSnapshot:new Ih(this,"snapshot"),assertingVSnapshot:new Ui(this),assertingTableCell:new J2(this),recordingDrag:new df(this),recordingGoJSLink:new U2(this),recordingArea:new Q2(this),recordingFileUpload:new V2(this),recordingTableSnapshot:new Y2(this),recordingDomSnapshot:new tC(this),recordingSketchTool:new G2(this),replaying:new $h},this._currentTool=this._tools.none,(a=(s=this._currentTool).install)==null||a.call(s),e.window.top===e.window&&(this.overlay=new hC(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
|
|
665
|
+
`;new Function(i)()}catch(i){console.warn("Failed to auto-show modal after assertion:",i)}}function Jl(...i){typeof window<"u"&&window.__SKYRAMP_DEBUG__&&console.log("[ModalHandler]",...i)}function fb(i){const e=i.getAttribute("data-testid");if(e)return`dialog[data-testid="${e}"]`;if(i.id)return`#${i.id}`;const t=i.getAttribute("aria-label");if(t)return`dialog[aria-label="${t}"]`;const s=i.tagName.toLowerCase(),a=i.className;return typeof a=="string"&&a.trim()?`${s}.${a.trim().split(/\s+/).join(".")}`:s}class d2{constructor(e){this._observer=null,this._enabled=!1,this._activeModal=null,this._document=e}setOnModalOpen(e){this._onModalOpen=e}setOnModalClose(e){this._onModalClose=e}isModalOpen(){return this._activeModal!==null}enable(){this._enabled||(this._enabled=!0,this._document.body&&(this._observer=new MutationObserver(e=>this._handleMutations(e)),this._observer.observe(this._document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["open","aria-modal","class"]}),this._checkExistingModals(),Jl("Enabled — watching for modal lifecycle events")))}disable(){this._enabled&&(this._enabled=!1,this._observer&&(this._observer.disconnect(),this._observer=null),this._activeModal=null,Jl("Disabled"))}_checkExistingModals(){const e=this._document.querySelector("dialog[open]");if(e){this._emitOpen(e);return}const t=this._document.querySelector('[aria-modal="true"]');if(t){this._emitOpen(t);return}const s=this._document.querySelector(".cds--modal.is-visible");if(s){this._emitOpen(s);return}}_handleMutations(e){var t,s,a;if(this._enabled)for(const o of e){if(o.type==="attributes"){const c=o.target;if(o.attributeName==="open"&&c.tagName==="DIALOG"){c.hasAttribute("open")?this._emitOpen(c):this._emitClose(c);continue}if(o.attributeName==="aria-modal"){c.getAttribute("aria-modal")==="true"?this._emitOpen(c):this._activeModal===c&&this._emitClose(c);continue}if(o.attributeName==="class"&&((t=c.classList)!=null&&t.contains("cds--modal"))){c.classList.contains("is-visible")?this._emitOpen(c):this._activeModal===c&&this._emitClose(c);continue}}if(o.type==="childList"){for(const c of o.addedNodes)c instanceof Element&&(c.tagName==="DIALOG"&&c.hasAttribute("open")?this._emitOpen(c):((s=c.getAttribute)==null?void 0:s.call(c,"aria-modal"))==="true"?this._emitOpen(c):(a=c.classList)!=null&&a.contains("cds--modal")&&c.classList.contains("is-visible")&&this._emitOpen(c));if(this._activeModal)for(const c of o.removedNodes)(c===this._activeModal||c instanceof Element&&c.contains(this._activeModal))&&this._emitClose(this._activeModal)}}}_emitOpen(e){var s;if(this._activeModal===e)return;this._activeModal=e;const t=fb(e);Jl("Modal opened:",t),(s=this._onModalOpen)==null||s.call(this,{selector:t})}_emitClose(e){var s;if(this._activeModal!==e)return;const t=fb(e);this._activeModal=null,Jl("Modal closed:",t),(s=this._onModalClose)==null||s.call(this,{selector:t})}}function h2(...i){typeof window<"u"&&window.__SKYRAMP_DEBUG__&&console.log("[IframeHandler]",...i)}function f2(i){return!!(/\d{2,}[_-][a-zA-Z]/.test(i)||/[-_]\d+$/.test(i)||/^react-aria\d+/.test(i)||/^(mui|mat|cdk)-\d+/.test(i)||/^\d+$/.test(i)||/\d{4,}/.test(i)||i.includes(":"))}function gb(i){if(i.title)return`iframe[title="${i.title}"]`;if(i.name)return`iframe[name="${i.name}"]`;if(i.id&&!f2(i.id))return`#${i.id}`;if(i.src){try{const e=new URL(i.src);if((e.protocol==="http:"||e.protocol==="https:")&&e.pathname&&e.pathname!=="/")return`iframe[src*="${e.pathname}"]`}catch{}return`iframe[src="${i.src}"]`}return i.id?`#${i.id}`:"iframe"}class g2{constructor(e){this._observer=null,this._enabled=!1,this._trackedIframes=new WeakSet,this._document=e}setOnIframeLoad(e){this._onIframeLoad=e}enable(){this._enabled||(this._enabled=!0,this._document.body&&(this._observer=new MutationObserver(e=>this._handleMutations(e)),this._observer.observe(this._document.body,{childList:!0,subtree:!0}),this._trackExistingIframes(),console.log("[IframeHandler] Enabled — watching for iframe load events")))}disable(){this._enabled&&(this._enabled=!1,this._observer&&(this._observer.disconnect(),this._observer=null),h2("Disabled"))}_trackExistingIframes(){for(const e of this._document.querySelectorAll("iframe"))this._trackIframe(e)}_handleMutations(e){if(this._enabled){for(const t of e)if(t.type==="childList"){for(const s of t.addedNodes)if(s instanceof HTMLIFrameElement&&this._trackIframe(s),s instanceof Element)for(const a of s.querySelectorAll("iframe"))this._trackIframe(a)}}}_trackIframe(e){var t,s;if(!this._trackedIframes.has(e)){this._trackedIframes.add(e),e.addEventListener("load",()=>{var o;if(!this._enabled)return;const a=gb(e);console.log("[IframeHandler] Iframe loaded:",a),(o=this._onIframeLoad)==null||o.call(this,{selector:a})},{once:!0});try{if(((t=e.contentDocument)==null?void 0:t.readyState)==="complete"){const a=gb(e);console.log("[IframeHandler] Iframe already loaded:",a),(s=this._onIframeLoad)==null||s.call(this,{selector:a})}}catch{}}}}const fn={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f",snapshot:"#9c7fe480"};function p2(i,e,t){const s=i.generateSelector(e,{testIdAttributeName:t});let a=s.selector,o;const c=bo(i,e,s.selector,s.elements);return c&&(a=c.selector,!c.isFormContainer&&!c.usesTextFilter&&(o={container:c.containerSelector,index:c.containerIndex,relative:c.relativeSelector})),{selector:a,scoped:o}}class $h{}class Bh{constructor(e,t){this._hoveredModel=null,this._hoveredElement=null,this._recorder=e,this._assertVisibility=t}cursor(){return"pointer"}uninstall(){this._hoveredModel=null,this._hoveredElement=null}onClick(e){var t;Ie(e),e.button===0&&(t=this._hoveredModel)!=null&&t.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){Ie(e)}onPointerUp(e){Ie(e)}onMouseDown(e){Ie(e)}onMouseUp(e){Ie(e)}onMouseMove(e){var a;Ie(e);let t=this._recorder.deepEventTarget(e);if(t.isConnected||(t=null),this._hoveredElement===t)return;this._hoveredElement=t;let s=null;if(this._hoveredElement){const o=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1}),c=bo(this._recorder.injectedScript,this._hoveredElement,o.selector,o.elements),d=c?c.selector:o.selector,h=c?c.elements:o.elements;s={selector:d,elements:h,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,d),color:this._assertVisibility?fn.assert:fn.single}}((a=this._hoveredModel)==null?void 0:a.selector)!==(s==null?void 0:s.selector)&&(this._hoveredModel=s,this._recorder.updateHighlight(s,!0))}onMouseEnter(e){Ie(e)}onMouseLeave(e){Ie(e);const t=this._recorder.injectedScript.window;t.top!==t&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){Ie(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){Ie(e)}onScroll(e){this._reset(!1)}_commit(e,t){var s;this._assertVisibility?(this._recorder.recordAction({name:"assertVisible",selector:e,signals:[],timestamp:Te(this._recorder)}),this._recorder.setMode("recording"),(s=this._recorder.overlay)==null||s.flashToolSucceeded("assertingVisibility")):this._recorder.elementPicked(e,t)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class m2{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 Cv(e)}cursor(){return"pointer"}_installObserverIfNeeded(){var e;this._observer||(e=this._recorder.injectedScript.document)!=null&&e.body&&(this._observer=new MutationObserver(t=>{if(this._hoveredElement)for(const s of t)for(const a of s.removedNodes)(a===this._hoveredElement||a.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){var h;if(this._lastClickX=e.clientX,this._lastClickY=e.clientY,this._dialog.isShowing()){e.button===2&&e.type==="auxclick"&&Ie(e);return}if(go(this._hoveredElement)||this._shouldIgnoreMouseEvent(e))return;const t=this._recorder.deepEventTarget(e),s=this._findFileInput(t);if(s){if(!this._activeModel){const f=((h=this._hoveredModel)==null?void 0:h.selector)??this._recorder.injectedScript.generateSelector(s,{testIdAttributeName:this._recorder.state.testIdAttributeName}).selector;this._activeModel=this._hoveredModel??{selector:f,elements:[s],color:"#dc6f6f7f"}}return}if(this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel))return;if(e.button===2&&e.type==="auxclick"){this._showActionListDialog(this._hoveredModel,e);return}const a=fo(this._recorder.deepEventTarget(e));if(a&&e.detail===1){this._performAction({name:a.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[],timestamp:Te(this._recorder)});return}this._cancelPendingClickAction();let o=this._hoveredModel.selector,c=!1;if(this._recorder.pointerEventsOverrideEnabled){const f=this._recorder.deepEventTarget(e),y=this._recorder._nestedElementHandler.handleNestedClick(f,this._hoveredModel,this._recorder.injectedScript,this._recorder.state.testIdAttributeName);y&&(o=y.targetSelector,c=y.shouldAutoDisable)}let d;try{d=window!==window.top}catch{d=!0}if(e.detail===1){const f={name:"click",selector:o,position:ho(e),signals:[],button:ff(e),modifiers:Mr(e),clickCount:e.detail,timestamp:Te(this._recorder)};this._pendingClickAction={action:f,autoDisableNestedTool:c,timeout:d?0:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)},d&&this._commitPendingClickAction()}}onDblClick(e){this._dialog.isShowing()||go(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:ho(e),signals:[],button:ff(e),modifiers:Mr(e),clickCount:e.detail,timestamp:Te(this._recorder)}),this._recorder.pointerEventsOverrideEnabled&&this._recorder.togglePointerEventsOverride())}_commitPendingClickAction(){this._pendingClickAction&&(this._performAction(this._pendingClickAction.action),this._pendingClickAction.autoDisableNestedTool&&this._recorder.pointerEventsOverrideEnabled&&this._recorder.togglePointerEventsOverride()),this._cancelPendingClickAction()}_cancelPendingClickAction(){this._pendingClickAction&&this._recorder.injectedScript.utils.builtins.clearTimeout(this._pendingClickAction.timeout),this._pendingClickAction=void 0}onContextMenu(e){if(this._dialog.isShowing()){Ie(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 t=this._recorder.deepEventTarget(e);this._hoveredElement!==t&&(this._hoveredElement=t,this._updateModelForHoveredElement())}onMouseLeave(e){if(this._dialog.isShowing())return;const t=this._recorder.injectedScript.window;t.top!==t&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredElement=null,this._updateModelForHoveredElement())}onFocus(e){this._dialog.isShowing()||this._onFocus(e.isTrusted)}onInput(e){var s,a,o;if(this._dialog.isShowing())return;const t=this._recorder.deepEventTarget(e);if(t.nodeName==="INPUT"&&t.type.toLowerCase()==="file"){const c=((s=this._activeModel)==null?void 0:s.selector)??this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName}).selector,d=[...t.files||[]],h=d.map(b=>b.name),f=t.webkitdirectory===!0,y=d.map(b=>b.webkitRelativePath||""),m=(o=(a=this._activeModel)==null?void 0:a.elements)==null?void 0:o[0];if(!(!m||m===t)){this._recordAction({name:"fileChooser",selector:c,signals:[],files:h,webkitdirectory:f,relativePaths:y,timestamp:Te(this._recorder)});return}this._recordAction({name:"setInputFiles",selector:c,signals:[],files:h,webkitdirectory:f,relativePaths:y,timestamp:Te(this._recorder)});return}if(go(t)){this._recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:t.value,timestamp:Te(this._recorder)});return}if(["INPUT","TEXTAREA"].includes(t.nodeName)||t.isContentEditable){if(t.nodeName==="INPUT"&&["checkbox","radio"].includes(t.type.toLowerCase())||this._consumedDueWrongTarget(e))return;this._recordAction({name:"fill",selector:this._activeModel.selector,signals:[],text:t.isContentEditable?t.innerText:t.value,timestamp:Te(this._recorder)})}if(t.nodeName==="SELECT"){const c=t;this._recordAction({name:"select",selector:this._activeModel.selector,options:[...c.selectedOptions].map(d=>d.value),signals:[],timestamp:Te(this._recorder)})}}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 t=fo(this._recorder.deepEventTarget(e));if(t&&e.detail===0){this._performAction({name:t.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[],timestamp:Te(this._recorder)});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:Mr(e),timestamp:Te(this._recorder)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){Ie(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,t){Ie(t);const s=ho(t),a=[{title:"Click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:1,timestamp:Te(this._recorder)})},{title:"Right click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"right",modifiers:0,clickCount:1,timestamp:Te(this._recorder)})},{title:"Double click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:2,timestamp:Te(this._recorder)})},{title:"Hover",cb:()=>this._performAction({name:"hover",selector:e.selector,position:s,signals:[],timestamp:Te(this._recorder)})},{title:"Pick locator",cb:()=>this._recorder.elementPicked(e.selector,e)}],o=this._recorder.document.createElement("x-pw-action-list");o.setAttribute("role","list"),o.setAttribute("aria-label","Choose action");for(const f of a){const y=this._recorder.document.createElement("x-pw-action-item");y.setAttribute("role","listitem"),y.textContent=f.title,y.setAttribute("aria-label",f.title),y.addEventListener("click",()=>{this._dialog.close(),f.cb()}),o.appendChild(y)}const c=this._dialog.show({label:"Choose action",body:o,autosize:!0}),d=this._recorder.highlight.firstTooltipBox()||e.elements[0].getBoundingClientRect(),h=this._recorder.highlight.tooltipPosition(d,c);this._dialog.moveTo(h.anchorTop,h.anchorLeft)}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){const t=kv(this._recorder.document);if(t===this._recorder.document.body)return;const s=t?this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;let a=s==null?void 0:s.selector,o=s==null?void 0:s.elements;if(t&&s){const c=bo(this._recorder.injectedScript,t,s.selector,s.elements);c&&(a=c.selector,o=c.elements)}this._activeModel=s&&a?{...s,selector:a,elements:o,color:fn.action}:null,e&&(this._hoveredElement=t,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const t=this._recorder.deepEventTarget(e),s=t.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(t.type))}_actionInProgress(e){const t=e instanceof KeyboardEvent,s=e instanceof MouseEvent||e instanceof PointerEvent;for(const a of this._performingActions)if(t&&a.name==="press"&&e.key===a.key||s&&(a.name==="click"||a.name==="hover"||a.name==="check"||a.name==="uncheck"))return!0;return Ie(e),!1}_consumedDueToNoModel(e,t){return t?!1:(Ie(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(Ie(e),!0)}_findFileInput(e){if(e.nodeName==="INPUT"&&e.type.toLowerCase()==="file")return e;if(e.nodeName==="LABEL"){const s=e.htmlFor;if(s){const a=e.ownerDocument.getElementById(s);if(a&&a.nodeName==="INPUT"&&a.type.toLowerCase()==="file")return a}}const t=e.querySelector('input[type="file"]');return t||null}_consumeWhenAboutToPerform(e){this._performingActions.size||Ie(e)}_recordAction(e){this._recorder.recordAction(e)}_performAction(e){this._recorder.updateHighlight(null,!1),this._performingActions.add(e);const t=this._recorder.performAction(e).then(()=>{this._performingActions.delete(e),this._onFocus(!1)});this._recorder.injectedScript.isUnderTest&&t.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 t=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!t?!!fo(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}let{selector:e,elements:t}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});const s=bo(this._recorder.injectedScript,this._hoveredElement,e,t);s&&(e=s.selector,t=s.elements),!(this._hoveredModel&&this._hoveredModel.selector===e)&&(this._hoveredModel=e?{selector:e,elements:t,color:fn.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class y2{constructor(e){this._recorder=e}install(){this._recorder.clearHighlight()}uninstall(){}onClick(e){const t=this._recorder.deepEventTarget(e);if(go(t)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const s=fo(t),{ariaSnapshot:a,selector:o,ref:c,scoped:d}=this._ariaSnapshot(t);if(s&&e.detail===1){this._recorder.recordAction({name:s.checked?"check":"uncheck",selector:o,ref:c,scoped:d,signals:[],ariaSnapshot:a,timestamp:Te(this._recorder)});return}this._recorder.recordAction({name:"click",selector:o,ref:c,scoped:d,ariaSnapshot:a,position:ho(e),signals:[],button:ff(e),modifiers:Mr(e),clickCount:e.detail,timestamp:Te(this._recorder)})}onContextMenu(e){const t=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o,scoped:c}=this._ariaSnapshot(t);this._recorder.recordAction({name:"click",selector:a,ref:o,scoped:c,ariaSnapshot:s,position:ho(e),signals:[],button:"right",modifiers:Mr(e),clickCount:1,timestamp:Te(this._recorder)})}onInput(e){const t=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o,scoped:c}=this._ariaSnapshot(t);if(go(t)){this._recorder.recordAction({name:"fill",selector:a,ref:o,scoped:c,ariaSnapshot:s,signals:[],text:t.value,timestamp:Te(this._recorder)});return}if(["INPUT","TEXTAREA"].includes(t.nodeName)||t.isContentEditable){if(t.nodeName==="INPUT"&&["checkbox","radio"].includes(t.type.toLowerCase()))return;this._recorder.recordAction({name:"fill",ref:o,selector:a,scoped:c,ariaSnapshot:s,signals:[],text:t.isContentEditable?t.innerText:t.value,timestamp:Te(this._recorder)});return}if(t.nodeName==="SELECT"){const d=t;this._recorder.recordAction({name:"select",selector:a,ref:o,scoped:c,ariaSnapshot:s,options:[...d.selectedOptions].map(h=>h.value),signals:[],timestamp:Te(this._recorder)});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const t=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:a,ref:o,scoped:c}=this._ariaSnapshot(t);if(e.key===" "){const d=fo(t);if(d&&e.detail===0){this._recorder.recordAction({name:d.checked?"uncheck":"check",selector:a,ref:o,scoped:c,ariaSnapshot:s,signals:[],timestamp:Te(this._recorder)});return}}this._recorder.recordAction({name:"press",selector:a,ref:o,scoped:c,ariaSnapshot:s,signals:[],key:e.key,modifiers:Mr(e),timestamp:Te(this._recorder)})}_shouldIgnoreMouseEvent(e){const t=this._recorder.deepEventTarget(e),s=t.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(t.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 t=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!t?!this._isEditable(this._recorder.deepEventTarget(e)):!0}_isEditable(e){return!!(e.nodeName==="TEXTAREA"||e.nodeName==="INPUT"||e.isContentEditable)}_ariaSnapshot(e){const{ariaSnapshot:t,refs:s}=this._recorder.injectedScript.ariaSnapshotForRecorder(),a=e?s.get(e):void 0;let o,c;if(e){const d=p2(this._recorder.injectedScript,e,this._recorder.state.testIdAttributeName);o=d.selector,c=d.scoped}return{ariaSnapshot:t,selector:o,ref:a,scoped:c}}}class Ih{constructor(e,t){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=t,this._dialog=new Cv(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){Ie(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const t=this._recorder.deepEventTarget(e);this._elementHasValue(t)?e.preventDefault():Ie(e)}onPointerDown(e){Ie(e)}onPointerUp(e){var s;const t=(s=this._hoverHighlight)==null?void 0:s.elements[0];this._kind==="value"&&t&&(t.nodeName==="INPUT"||t.nodeName==="SELECT")&&t.disabled&&this._commitAssertValue()}onMouseMove(e){var s;if(this._dialog.isShowing())return;const t=this._recorder.deepEventTarget(e);if(((s=this._hoverHighlight)==null?void 0:s.elements[0])!==t){if(this._kind==="text"||this._kind==="snapshot")this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,t).full?{elements:[t],selector:"",color:fn.assert}:null;else if(this._elementHasValue(t)){const a=this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:a.selector,elements:a.elements,color:fn.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),Ie(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 t;this._textCache.clear();const e=(t=this._hoverHighlight)==null?void 0:t.elements[0];if(!e)return null;if(this._kind==="value"){if(!this._elementHasValue(e))return null;const{selector:s}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return e.nodeName==="INPUT"&&["checkbox","radio"].includes(e.type.toLowerCase())?{name:"assertChecked",selector:s,signals:[],checked:!e.checked,timestamp:Te(this._recorder)}:{name:"assertValue",selector:s,signals:[],value:e.value,timestamp:Te(this._recorder)}}else if(this._kind==="snapshot"){const s=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:s.selector,elements:s.elements,color:fn.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],ariaSnapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"codegen"}),timestamp:Te(this._recorder)}}else{const s=e.closest("td"),a=s&&s.closest("tr");let o=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!a});const c=bo(this._recorder.injectedScript,e,o.selector,o.elements);return c&&(o={selector:c.selector,selectors:[c.selector],elements:c.elements}),this._hoverHighlight={selector:o.selector,elements:o.elements,color:fn.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,timestamp:Te(this._recorder)}}}_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"),u2())}_showDialog(){var e,t,s,a;(e=this._hoverHighlight)!=null&&e.elements[0]&&(c2(),this._action=this._generateAction(),((t=this._action)==null?void 0:t.name)==="assertText"?this._showTextDialog(this._action):((s=this._action)==null?void 0:s.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(a=this._recorder.overlay)==null||a.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const t=this._recorder.document.createElement("textarea");t.setAttribute("spellcheck","false"),t.value=this._renderValue(e),t.classList.add("text-editor");const s=()=>{var m;const d=this._recorder.injectedScript.utils.normalizeWhiteSpace(t.value),h=(m=this._hoverHighlight)==null?void 0:m.elements[0];if(!h)return;e.text=d;const f=this._recorder.injectedScript.utils.elementText(this._textCache,h).normalized,y=d&&f.includes(d);t.classList.toggle("does-not-match",!y)};t.addEventListener("input",s);const o=this._dialog.show({label:"Assert that element contains text",body:t,onCommit:()=>this._commit()}),c=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),o);this._dialog.moveTo(c.anchorTop,c.anchorLeft),t.focus()}_commitAssertValue(){var t;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(t=this._recorder.overlay)==null||t.flashToolSucceeded("assertingValue"))}}class _2{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._snapshotToggleTime=null,this._recorder=e;const t=this._recorder.document;this._overlayElement=t.createElement("x-pw-overlay");const s=t.createElement("x-pw-tools-list");this._overlayElement.appendChild(s),this._dragHandle=t.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(t.createElement("x-div")),s.appendChild(this._dragHandle),this._recordToggle=this._recorder.document.createElement("x-pw-tool-item"),this._recordToggle.title="Record",this._recordToggle.classList.add("record"),this._recordToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._recordToggle),this._pickLocatorToggle=this._recorder.document.createElement("x-pw-tool-item"),this._pickLocatorToggle.title="Pick locator",this._pickLocatorToggle.classList.add("pick-locator"),this._pickLocatorToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._pickLocatorToggle),this._modularityToggle=this._recorder.document.createElement("x-pw-tool-item"),this._modularityToggle.title="Mark block",this._modularityToggle.classList.add("modular"),this._modularityToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._modularityToggle),this._assertApiPayloadToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertApiPayloadToggle.title="Assert API Request",this._assertApiPayloadToggle.classList.add("assert-api-payload"),this._assertApiPayloadToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertApiPayloadToggle),this._fileUploadToggle=this._recorder.document.createElement("x-pw-tool-item"),this._fileUploadToggle.title="Upload file",this._fileUploadToggle.classList.add("file-upload"),this._fileUploadToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._fileUploadToggle),this._dragRecordToggle=this._recorder.document.createElement("x-pw-tool-item"),this._dragRecordToggle.title="Drag and drop",this._dragRecordToggle.classList.add("drag-record"),this._dragRecordToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._dragRecordToggle),this._areaSelectToggle=this._recorder.document.createElement("x-pw-tool-item"),this._areaSelectToggle.title="Select area",this._areaSelectToggle.classList.add("area-select"),this._areaSelectToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._areaSelectToggle),this._sketchToolToggle=this._recorder.document.createElement("x-pw-tool-item"),this._sketchToolToggle.title="Sketch Tool",this._sketchToolToggle.classList.add("sketch-tool"),this._sketchToolToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._sketchToolToggle),this._gojsLinkToggle=this._recorder.document.createElement("x-pw-tool-item"),this._gojsLinkToggle.title="GoJS Link (click source node, then target node)",this._gojsLinkToggle.classList.add("gojs-link"),this._gojsLinkToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._gojsLinkToggle),this._pointerEventsToggle=this._recorder.document.createElement("x-pw-tool-item"),this._pointerEventsToggle.title="Nested element selection",this._pointerEventsToggle.classList.add("pointer-events"),this._pointerEventsToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._pointerEventsToggle),this._assertVisibilityToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertVisibilityToggle.title="Assert visibility",this._assertVisibilityToggle.classList.add("visibility"),this._assertVisibilityToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertVisibilityToggle),this._assertTextToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertTextToggle.title="Assert text",this._assertTextToggle.classList.add("text"),this._assertTextToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertTextToggle),this._assertValuesToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertValuesToggle.title="Assert value",this._assertValuesToggle.classList.add("value"),this._assertValuesToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertValuesToggle),this._tableSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._tableSnapshotToggle.title="Assert table cell",this._tableSnapshotToggle.classList.add("table"),this._tableSnapshotToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._tableSnapshotToggle),this._assertVSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertVSnapshotToggle.title="Snapshot: Double-toggle for page, Click for element, Drag for region",this._assertVSnapshotToggle.classList.add("visual-snapshot"),this._assertVSnapshotToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertVSnapshotToggle),this._assertSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._jsonMarkerButton=this._recorder.document.createElement("x-pw-tool-item"),this._updateVisualPosition(),this._refreshListeners()}_refreshListeners(){Nv(this._listeners),this._listeners=[he(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),he(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")}),he(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",assertingVSnapshot:"recording-inspecting",assertingTableCell:"recording-inspecting",recordingDrag:"recording",recordingGoJSLink:"recording",recordingArea:"recording",recordingFileUpload:"recording",recordingTableSnapshot:"recording",recordingDomSnapshot:"recording",recordingSketchTool:"recording"};this._recorder.setMode(e[this._recorder.state.mode])}),he(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),he(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),he(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),he(this._assertSnapshotToggle,"click",()=>{this._assertSnapshotToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingSnapshot"?"recording":"assertingSnapshot")}),he(this._assertVSnapshotToggle,"click",()=>{if(this._assertVSnapshotToggle.classList.contains("disabled"))return;if(this._recorder.state.mode==="assertingVSnapshot"){const s=Date.now();this._snapshotToggleTime&&s-this._snapshotToggleTime<1500&&Ui.getNextCounter(this._recorder,"page").then(a=>{const o={name:"visualSnapshot",snapshotType:"page",filename:`page-${String(a).padStart(3,"0")}.png`,fullPage:!0,signals:[],timestamp:Te(this._recorder)};this._recorder.recordAction(o),this.flashToolSucceeded("assertingVSnapshot")}),this._snapshotToggleTime=null,this._recorder.setMode("recording")}else this._snapshotToggleTime=Date.now(),this._recorder.setMode("assertingVSnapshot")}),he(this._tableSnapshotToggle,"click",()=>{this._tableSnapshotToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingTableCell"?"recording":"assertingTableCell")}),he(this._fileUploadToggle,"click",()=>{this._fileUploadToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="recordingFileUpload"?"recording":"recordingFileUpload")}),he(this._pointerEventsToggle,"click",()=>{this._recorder.togglePointerEventsOverride()}),he(this._modularityToggle,"click",()=>{if(this._modularityToggle.classList.contains("disabled"))return;this._recorder.modularityToggled=!this._recorder.modularityToggled;let e="endBlock";this._recorder.modularityToggled&&(e="beginBlock");const t={name:e,timestamp:Te(this._recorder),sequence:Math.floor(Math.random()*1e6),signals:[]};this._recorder.recordAction(t)}),he(this._assertApiPayloadToggle,"click",()=>{if(this._assertApiPayloadToggle.classList.contains("disabled"))return;const e={name:"assertApiRequest",timestamp:Te(this._recorder),signals:[]};this._recorder.recordAction(e),this._assertApiPayloadToggle.classList.add("toggled"),setTimeout(()=>this._assertApiPayloadToggle.classList.remove("toggled"),1500)}),he(this._dragRecordToggle,"click",()=>{this._dragRecordToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="recordingDrag"?"recording":"recordingDrag")}),he(this._areaSelectToggle,"click",()=>{this._recorder.state.mode==="recordingArea"?this._recorder.setMode("recording"):this._recorder.setMode("recordingArea")}),he(this._sketchToolToggle,"click",()=>{this._sketchToolToggle.classList.contains("disabled")||(this._recorder.state.mode==="recordingSketchTool"?this._recorder.setMode("recording"):this._recorder.setMode("recordingSketchTool"))}),he(this._gojsLinkToggle,"click",()=>{if(!this._gojsLinkToggle.classList.contains("disabled")){const e=this._recorder.state.mode;this._recorder.setMode(e==="recordingGoJSLink"?"recording":"recordingGoJSLink")}})]}install(){this._recorder.highlight.appendChild(this._overlayElement),this._refreshListeners(),this._updateVisualPosition();const e=t=>{const s=t.target;s&&(s===this._dragHandle||this._dragHandle.contains(s))&&(t.type==="mousedown"||t.type==="mousemove"||t.type==="mouseup"||t.type==="pointerdown"||t.type==="pointermove"||t.type==="pointerup")||(t.stopPropagation(),t.preventDefault())};this._listeners.push(he(this._overlayElement,"mousedown",e,!1),he(this._overlayElement,"mouseup",e,!1),he(this._overlayElement,"mousemove",e,!1),he(this._overlayElement,"pointerdown",e,!1),he(this._overlayElement,"pointerup",e,!1),he(this._overlayElement,"pointermove",e,!1),he(this._overlayElement,"click",e,!1),he(this._overlayElement,"dblclick",e,!1),he(this._overlayElement,"contextmenu",e,!1),he(this._overlayElement,"focus",e,!1),he(this._overlayElement,"blur",e,!1))}contains(e){return this._recorder.injectedScript.utils.isInsideScope(this._overlayElement,e)}setUIState(e){const t=e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="assertingVSnapshot"||e.mode==="assertingTableCell"||e.mode==="recording-inspecting"||e.mode==="recordingDrag"||e.mode==="recordingGoJSLink"||e.mode==="recordingArea"||e.mode==="recordingFileUpload"||e.mode==="recordingSketchTool";this._recordToggle.classList.toggle("toggled",t),this._recordToggle.title=t?"Stop Recording":"Start Recording",this._pickLocatorToggle.classList.toggle("toggled",e.mode==="inspecting"||e.mode==="recording-inspecting"),this._pickLocatorToggle.classList.toggle("disabled",e.mode==="recordingArea"),this._assertVisibilityToggle.classList.toggle("toggled",e.mode==="assertingVisibility"),this._assertVisibilityToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertTextToggle.classList.toggle("toggled",e.mode==="assertingText"),this._assertTextToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertValuesToggle.classList.toggle("toggled",e.mode==="assertingValue"),this._assertValuesToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertSnapshotToggle.classList.toggle("toggled",e.mode==="assertingSnapshot"),this._assertSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertVSnapshotToggle.classList.toggle("toggled",e.mode==="assertingVSnapshot"),this._assertVSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._tableSnapshotToggle.classList.toggle("toggled",e.mode==="assertingTableCell"),this._tableSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._fileUploadToggle.classList.toggle("toggled",e.mode==="recordingFileUpload"),this._fileUploadToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._modularityToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._assertApiPayloadToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._dragRecordToggle.classList.toggle("toggled",e.mode==="recordingDrag"),this._dragRecordToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._areaSelectToggle.classList.toggle("toggled",e.mode==="recordingArea"),this._areaSelectToggle.classList.toggle("disabled",e.mode==="none"),this._sketchToolToggle.classList.toggle("toggled",e.mode==="recordingSketchTool"),this._sketchToolToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this._gojsLinkToggle.classList.toggle("toggled",e.mode==="recordingGoJSLink"),this._gojsLinkToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"||e.mode==="recordingArea"),this.updateToolbar(),this._offsetX!==e.overlay.offsetX&&(this._offsetX=e.overlay.offsetX,this._updateVisualPosition()),e.mode==="none"?this._hideOverlay():this._showOverlay()}updateToolbar(){this._pointerEventsToggle.classList.toggle("toggled",this._recorder.pointerEventsOverrideEnabled)}flashToolSucceeded(e){let t;e==="assertingVisibility"?t=this._assertVisibilityToggle:e==="assertingSnapshot"?t=this._assertSnapshotToggle:e==="assertingVSnapshot"?t=this._assertVSnapshotToggle:e==="assertingTableCell"?t=this._tableSnapshotToggle:e==="fileUpload"?t=this._fileUploadToggle:e==="recordingArea"?t=this._areaSelectToggle:e==="recordingTableSnapshot"?t=this._tableSnapshotToggle:e==="recordingSketchTool"?t=this._sketchToolToggle:t=this._assertValuesToggle,t.classList.add("succeeded"),this._recorder.injectedScript.utils.builtins.setTimeout(()=>t.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 t=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-t,Math.min(t,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),Ie(e),!0}return!1}onMouseUp(e){return this._dragState?(Ie(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,Ie(e),!0):!1}onDblClick(e){return!1}updateModularityToggleState(e){this._modularityToggle.classList.toggle("toggled",e)}}const oi=class oi{constructor(e,t){var s,a;this._listeners=[],this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.state={mode:"none",testIdAttributeName:"data-testid",language:"javascript",overlay:{offsetX:0},modularityToggled:!1},this._delegate={},this._modularityToggled=!1,this._recentHoverTrail=[],this._previousUserActionName=void 0,this.document=e.document,this.injectedScript=e,this.highlight=e.createHighlight(),this._nestedElementHandler=new PC(this.document),this._modalHandler=new d2(this.document),this._modalHandler.setOnModalOpen(({selector:o})=>{this.recordAction({name:"modalOpen",selector:o,signals:[],timestamp:Te(this)})}),this._modalHandler.setOnModalClose(({selector:o})=>{this.recordAction({name:"modalClose",selector:o,signals:[],timestamp:Te(this)})}),this._iframeHandler=new g2(this.document),this._iframeHandler.setOnIframeLoad(({selector:o})=>{this.recordAction({name:"iframeLoad",selector:o,signals:[],timestamp:Te(this)})}),this._tools={none:new $h,standby:new $h,inspecting:new Bh(this,!1),recording:(t==null?void 0:t.recorderMode)==="api"?new y2(this):new m2(this),"recording-inspecting":new Bh(this,!1),assertingText:new Ih(this,"text"),assertingVisibility:new Bh(this,!0),assertingValue:new Ih(this,"value"),assertingSnapshot:new Ih(this,"snapshot"),assertingVSnapshot:new Ui(this),assertingTableCell:new t2(this),recordingDrag:new df(this),recordingGoJSLink:new VC(this),recordingArea:new s2(this),recordingFileUpload:new GC(this),recordingTableSnapshot:new JC(this),recordingDomSnapshot:new a2(this),recordingSketchTool:new YC(this),replaying:new $h},this._currentTool=this._tools.none,(a=(s=this._currentTool).install)==null||a.call(s),e.window.top===e.window&&(t==null?void 0:t.recorderMode)!=="api"&&(this.overlay=new _2(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
|
|
666
666
|
body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
|
|
667
667
|
body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
|
|
668
668
|
body[data-pw-cursor=crosshair] *, body[data-pw-cursor=crosshair] *::after { cursor: crosshair !important; }
|
|
669
669
|
body[data-pw-cursor=grab] *, body[data-pw-cursor=grab] *::after { cursor: grab !important; }
|
|
670
|
-
`),this.installListeners(),this._installFileUploadHooks(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&(console.error("Recorder script ready for test"),e.window.__pw_recorderToggleNestedElements=()=>{this.togglePointerEventsOverride()}),e.consoleApi.install()}get modularityToggled(){return this._modularityToggled}set modularityToggled(e){this._modularityToggled=e;try{typeof window.__pw_recorderSetModularityToggled=="function"?window.__pw_recorderSetModularityToggled(e):console.warn("Modularity toggle binding not available yet, state may be out of sync")}catch(t){console.error("Failed to set modularity toggle on server:",t)}}get pointerEventsOverrideEnabled(){return this._nestedElementHandler.enabled}togglePointerEventsOverride(){var e;this._nestedElementHandler.toggle(),(e=this.overlay)==null||e.updateToolbar()}installListeners(){var s,a;Nv(this._listeners),this._listeners=[he(this.document,"click",o=>this._onClick(o),!0),he(this.document,"auxclick",o=>this._onClick(o),!0),he(this.document,"dblclick",o=>this._onDblClick(o),!0),he(this.document,"contextmenu",o=>this._onContextMenu(o),!0),he(this.document,"dragstart",o=>this._onDragStart(o),!0),he(this.document,"input",o=>this._onInput(o),!0),he(this.document,"keydown",o=>this._onKeyDown(o),!0),he(this.document,"keyup",o=>this._onKeyUp(o),!0),he(this.document,"pointerdown",o=>this._onPointerDown(o),!0),he(this.document,"pointermove",o=>this._onPointerMove(o),!0),he(this.document,"pointerup",o=>this._onPointerUp(o),!0),he(this.document,"mousedown",o=>this._onMouseDown(o),!0),he(this.document,"mouseup",o=>this._onMouseUp(o),!0),he(this.document,"mousemove",o=>this._onMouseMove(o),!0),he(this.document,"mouseleave",o=>this._onMouseLeave(o),!0),he(this.document,"mouseenter",o=>this._onMouseEnter(o),!0),he(this.document,"focus",o=>this._onFocus(o),!0),he(this.document,"scroll",o=>this._onScroll(o),!0)],this.highlight.install();let e;const t=()=>{if(this.highlight.install(),this.overlay){const o=this.overlay._overlayElement,c=this.highlight._glassPaneElement,d=c&&c.isConnected,h=o&&!o.isConnected;d&&h&&this.overlay.install()}e=this.injectedScript.utils.builtins.setTimeout(t,500)};if(e=this.injectedScript.utils.builtins.setTimeout(t,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(Mv(this.document,R2)),this.overlay){const o=this.highlight._glassPaneElement;o&&o.isConnected&&this.overlay.install()}(a=(s=this._currentTool)==null?void 0:s.install)==null||a.call(s),this.document.adoptedStyleSheets.push(this._stylesheet)}_installFileUploadHooks(){F2(this,this._listeners)}_switchCurrentTool(){var s,a,o,c,d,h,f,y;const e=this._tools[this.state.mode];if(e===this._currentTool)return;if((a=(s=this._currentTool).uninstall)==null||a.call(s),this.clearHighlight(),this._currentTool=e,(c=(o=this._currentTool).install)==null||c.call(o),this.state.mode==="recording"){const m=kv(this.document);m&&m!==this.document.body&&m!==this.document.documentElement&&((h=(d=this._currentTool).onFocus)==null||h.call(d,new FocusEvent("focus")))}const t=(f=e.cursor)==null?void 0:f.call(e);t&&((y=this.injectedScript.document.body)==null||y.setAttribute("data-pw-cursor",t))}setUIState(e,t){var o,c;this._delegate=t,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()),e.modularityToggled!==this._modularityToggled&&(this._modularityToggled=e.modularityToggled,(o=this.overlay)==null||o.updateModularityToggleState(this._modularityToggled)),this.state=e,this.highlight.setLanguage(e.language),this._switchCurrentTool(),(c=this.overlay)==null||c.setUIState(e),e.mode==="recording"?(this._modalHandler.enable(),this._iframeHandler.enable()):(this._modalHandler.disable(),this._iframeHandler.disable());let s="noop";if(e.actionSelector!==this._lastHighlightedSelector){const d=e.actionSelector?fC(this.injectedScript,e.language,e.actionSelector,this.document):null;s=d!=null&&d.length?d:"clear",this._lastHighlightedSelector=d!=null&&d.length?e.actionSelector:void 0}const a=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==a){const d=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(d.length){const h=d.length>1?fn.multiple:fn.single;s=d.map(f=>({element:f,color:h})),this._lastHighlightedAriaTemplateJSON=a}else this._lastHighlightedSelector||(s="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}s==="clear"?this.highlight.clearHighlight():s!=="noop"&&this.highlight.updateHighlight(s)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var t,s,a;e.isTrusted&&((t=this.overlay)!=null&&t.onClick(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onClick)==null||a.call(s,e))}_onDblClick(e){var t,s,a;e.isTrusted&&((t=this.overlay)!=null&&t.onDblClick(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onDblClick)==null||a.call(s,e))}_onContextMenu(e){var t,s;e.isTrusted&&((s=(t=this._currentTool).onContextMenu)==null||s.call(t,e))}_onDragStart(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onDragStart)==null||s.call(t,e))}_onPointerDown(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onPointerDown)==null||s.call(t,e))}_onPointerUp(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onPointerUp)==null||s.call(t,e))}_onPointerMove(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onPointerMove)==null||s.call(t,e))}_onMouseDown(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onMouseDown)==null||s.call(t,e))}_onMouseUp(e){var t,s,a;e.isTrusted&&((t=this.overlay)!=null&&t.onMouseUp(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onMouseUp)==null||a.call(s,e))}_onMouseMove(e){var t,s,a;e.isTrusted&&((t=this.overlay)!=null&&t.onMouseMove(e)||this._ignoreOverlayEvent(e)||(this._trackHoverTrail(e),(a=(s=this._currentTool).onMouseMove)==null||a.call(s,e)))}_onMouseEnter(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onMouseEnter)==null||s.call(t,e))}_trackHoverTrail(e){if(this.state.mode!=="recording")return;const t=this.deepEventTarget(e);if(!t)return;const s=mC(t,this.document);if(!s)return;const a=performance.now(),o=this._recentHoverTrail[this._recentHoverTrail.length-1];if(o&&o.element===s)return;this._recentHoverTrail.push({element:s,timestamp:a});const c=a-oi._HOVER_TRAIL_LOOKBACK_MS;for(;this._recentHoverTrail.length>0&&this._recentHoverTrail[0].timestamp<c;)this._recentHoverTrail.shift();this._recentHoverTrail.length>oi._HOVER_TRAIL_MAX&&this._recentHoverTrail.splice(0,this._recentHoverTrail.length-oi._HOVER_TRAIL_MAX)}_onMouseLeave(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onMouseLeave)==null||s.call(t,e))}_onFocus(e){var t,s;this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onFocus)==null||s.call(t,e)}_onScroll(e){var t,s;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(s=(t=this._currentTool).onScroll)==null||s.call(t,e))}_onInput(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onInput)==null||s.call(t,e))}_onKeyDown(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onKeyDown)==null||s.call(t,e))}_onKeyUp(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onKeyUp)==null||s.call(t,e))}updateHighlight(e,t){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,t)}_updateHighlight(e,t){var a,o;let s=e==null?void 0:e.tooltipText;s===void 0&&(e!=null&&e.selector)&&(s=this.injectedScript.utils.asLocator(this.state.language,e.selector)),e?this.highlight.updateHighlight(e.elements.map(c=>({element:c,color:e.color,tooltipText:s}))):this.highlight.clearHighlight(),t&&((o=(a=this._delegate).highlightUpdated)==null||o.call(a))}_ignoreOverlayEvent(e){return e.composedPath().some(t=>(t.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var t;for(const s of e.composedPath())if(!((t=this.overlay)!=null&&t.contains(s)))return s;return e.composedPath()[0]}setMode(e){var t,s;(s=(t=this._delegate).setMode)==null||s.call(t,e)}_captureAutoExpectSnapshot(){const e=this.injectedScript.document.documentElement;return e?this.injectedScript.utils.generateAriaTree(e,{mode:"autoexpect"}):void 0}async performAction(e){var t,s;this._decorateUserAction(e),await((s=(t=this._delegate).performAction)==null?void 0:s.call(t,e).catch(()=>{}))}_decorateUserAction(e){var a;const t=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),gC(e)||!this._lastActionAutoexpectSnapshot)return;const s=this.injectedScript.utils.findNewElement(t==null?void 0:t.root,(a=this._lastActionAutoexpectSnapshot)==null?void 0:a.root);if(!("preconditionSelector"in e)||e.preconditionSelector===void 0){const o=e;o.preconditionSelector=s?this.injectedScript.generateSelector(s,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0,"selector"in e&&o.preconditionSelector===o.selector&&(o.preconditionSelector=void 0)}e.name==="click"&&e.preconditionSelector&&s&&this._maybeEmitFlyoutHoverBeforeClick(e,s),e.name==="click"&&this._maybeEmitRowRevealHoverBeforeClick(e),this._previousUserActionName=e.name}_maybeEmitRowRevealHoverBeforeClick(e){let t=null;try{const f=this.injectedScript.parseSelector(e.selector);t=this.injectedScript.querySelectorAll(f,this.document)[0]??null}catch{return}if(!t)return;const s=t.closest(oi._REVEAL_CONTAINER_SELECTOR);if(!s)return;const a=t.closest('button, [role="button"], [role="menuitem"]');if(!a||!s.contains(a))return;const o=this._findRevealHoverTarget(s)??s;let c;try{c=this.injectedScript.generateSelector(o,{testIdAttributeName:this.state.testIdAttributeName}).selector}catch{return}if(!c)return;const d=parseInt(e.timestamp,10),h={name:"hover",selector:c,signals:[],timestamp:Number.isFinite(d)?(d-1).toString():e.timestamp};this._delegate.recordAction&&this._delegate.recordAction(h).catch(()=>{})}_findRevealHoverTarget(e){const t=e.querySelectorAll('a[href], [role="link"], h1, h2, h3, h4, h5, h6');for(const s of Array.from(t)){const a=(s.innerText||s.textContent||"").trim();if(!(!a||a.length>80))return s}return null}_maybeEmitFlyoutHoverBeforeClick(e,t){if(this._recentHoverTrail.length===0||this._previousUserActionName==="click")return;let s=null;try{const a=this.injectedScript.parseSelector(e.selector);s=this.injectedScript.querySelectorAll(a,this.document)[0]??null}catch{return}if(!(!s||!t.contains(s)))for(let a=this._recentHoverTrail.length-1;a>=0;a--){const o=this._recentHoverTrail[a].element;if(!o.isConnected||o===s||s.contains(o)||o.contains(s)||t.contains(o)||o.contains(t))continue;const c=this.injectedScript.generateSelector(o,{testIdAttributeName:this.state.testIdAttributeName});if(!c.selector)continue;const d=parseInt(e.timestamp,10),h={name:"hover",selector:c.selector,signals:[],timestamp:Number.isFinite(d)?(d-1).toString():e.timestamp};this._delegate.recordAction&&this._delegate.recordAction(h).catch(()=>{}),this._recentHoverTrail=[];return}}recordAction(e){this._decorateUserAction(e),this._delegate.recordAction?this._delegate.recordAction(e):console.warn("[Recorder] No delegate.recordAction available!")}setOverlayState(e){var t,s;(s=(t=this._delegate).setOverlayState)==null||s.call(t,e)}elementPicked(e,t){var a,o;const s=this.injectedScript.ariaSnapshot(t.elements[0],{mode:"expect"});(o=(a=this._delegate).elementPicked)==null||o.call(a,{selector:e,ariaSnapshot:s})}};oi._HOVER_TRAIL_MAX=20,oi._HOVER_TRAIL_LOOKBACK_MS=1e4,oi._REVEAL_CONTAINER_SELECTOR='[role="row"], [data-testid="grid-view-item"], [data-testid$="-item"], [data-testid$="-row"], [draggable="true"], tr';let hf=oi,Cv=class{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){const t=this._recorder.document.createElement("x-pw-tool-item");t.title="Accept",t.classList.add("accept"),t.appendChild(this._recorder.document.createElement("x-div")),t.addEventListener("click",()=>{var x;return(x=e.onCommit)==null?void 0:x.call(e)});const s=this._recorder.document.createElement("x-pw-tool-item");s.title="Close",s.classList.add("cancel"),s.appendChild(this._recorder.document.createElement("x-div")),s.addEventListener("click",()=>{var x;this.close(),(x=e.onCancel)==null||x.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),e.autosize&&this._dialogElement.classList.add("autosize"),this._keyboardListener=x=>{var v;if(x.key==="Escape"){this.close(),(v=e.onCancel)==null||v.call(e);return}if(e.onCommit&&x.key==="Enter"&&(x.ctrlKey||x.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=x=>{var v;this._dialogElement&&x.target instanceof Node&&this._dialogElement.contains(x.target)||(this.close(),(v=e.onCancel)==null||v.call(e))},this._dialogElement.addEventListener("click",x=>x.stopPropagation());const a=this._recorder.document.createElement("x-pw-tools-list"),o=this._recorder.document.createElement("label");o.textContent=e.label,a.appendChild(o),a.appendChild(this._recorder.document.createElement("x-spacer")),e.onCommit&&a.appendChild(t),a.appendChild(s),this._dialogElement.appendChild(a);const c=this._recorder.document.createElement("x-pw-dialog-body");c.appendChild(e.body),this._dialogElement.appendChild(c),a.style.cursor="move";let d=0,h=0,f=0,y=0;const m=x=>{this._dialogElement&&(this._dialogElement.style.top=f+x.clientY-h+"px",this._dialogElement.style.left=y+x.clientX-d+"px")},_=()=>{this._recorder.document.removeEventListener("mousemove",m,!0),this._recorder.document.removeEventListener("mouseup",_,!0)};a.addEventListener("mousedown",x=>{x.target.closest("x-pw-tool-item")||(d=x.clientX,h=x.clientY,f=parseInt(this._dialogElement.style.top)||0,y=parseInt(this._dialogElement.style.left)||0,this._recorder.document.addEventListener("mousemove",m,!0),this._recorder.document.addEventListener("mouseup",_,!0),x.stopPropagation(),x.preventDefault())},!1);const b=x=>{x.stopPropagation()};return this._dialogElement.addEventListener("mousedown",b,!1),this._dialogElement.addEventListener("mouseup",b,!1),this._dialogElement.addEventListener("pointerdown",b,!1),this._dialogElement.addEventListener("pointerup",b,!1),this._dialogElement.addEventListener("click",b,!1),this._dialogElement.addEventListener("dblclick",b,!1),c.addEventListener("click",b,!1),this._recorder.highlight.appendChild(this._dialogElement),this._recorder.highlight.onGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.addEventListener("keydown",this._keyboardListener,!0),this._dialogElement}moveTo(e,t){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=t+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.highlight.offGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}};function kv(i){let e=i.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function Mr(i){return(i.altKey?1:0)|(i.ctrlKey?2:0)|(i.metaKey?4:0)|(i.shiftKey?8:0)}function ff(i){switch(i.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function ho(i){if(i.target.nodeName==="CANVAS")return{x:i.offsetX,y:i.offsetY}}function Ie(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function fo(i){if(!i||i.nodeName!=="INPUT")return null;const e=i;return["checkbox","radio"].includes(e.type)?e:null}function go(i){return!i||i.nodeName!=="INPUT"?!1:i.type.toLowerCase()==="range"}function he(i,e,t,s){return i.addEventListener(e,t,s),()=>{i.removeEventListener(e,t,s)}}function Nv(i){for(const e of i)e();i.splice(0,i.length)}function fC(i,e,t,s){try{const a=i.parseSelector(t),o=i.querySelectorAll(a,s),c=o.length>1?fn.multiple:fn.single,d=i.utils.asLocator(e,t);return o.map((h,f)=>{const y=o.length>1?` [${f+1} of ${o.length}]`:"";return{element:h,color:c,tooltipText:d+y}})}catch{return[]}}function Mv(i,{tagName:e,attrs:t,children:s}){const a=i.createElementNS("http://www.w3.org/2000/svg",e);if(t)for(const[o,c]of Object.entries(t))a.setAttribute(o,c);if(s)for(const o of s)a.appendChild(Mv(i,o));return a}function gC(i){return i.name.startsWith("assert")}function pC(i){const e=i.tagName;if(e==="BUTTON"||e==="A"||i.hasAttribute("aria-haspopup")||i.hasAttribute("aria-expanded"))return!0;const t=i.getAttribute("role");return!!(t&&(t==="button"||t==="link"||t==="menuitem"||t==="tab"))}function mC(i,e){let t=i;for(;t&&t!==e.body&&t!==e.documentElement;){if(pC(t))return t;t=t.parentElement}return null}function Te(i){return i.injectedScript.utils.builtins.Date.now().toString()}function yC(i,e){i=i.replace(/AriaRole\s*\.\s*([\w]+)/g,(o,c)=>c.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(o,c,d)=>`${c}(${d.toLowerCase()}`);const t=[];let s="";for(let o=0;o<i.length;++o){const c=i[o];if(c!=='"'&&c!=="'"&&c!=="`"&&c!=="/"){s+=c;continue}const d=i[o-1]==="r"||i[o]==="/";++o;let h="";for(;o<i.length;){if(i[o]==="\\"){d?(i[o+1]!==c&&(h+=i[o]),++o,h+=i[o]):(++o,i[o]==="n"?h+=`
|
|
671
|
-
`:i[o]==="r"?h+="\r":i[o]==="t"?h+=" ":h+=i[o]),++o;continue}if(i[o]!==c){h+=i[o++];continue}break}t.push({quote:c,text:h}),s+=(c==="/"?"r":"")+"$"+t.length}s=s.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/\bpage\./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 a=t.map(o=>o.quote).filter(o=>"'\"`".includes(o))[0];return{selector:Dv(s,t,e),preferredQuote:a}}function pb(i){return[...i.matchAll(/\$\d+/g)].length}function mb(i,e){return i.replace(/\$(\d+)/g,(t,s)=>`$${s-e}`)}function Dv(i,e,t){for(;;){const a=i.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!a)break;const o=a.index+a[0].length;let c=0,d=o;for(;d<i.length&&(i[d]==="("?c++:i[d]===")"&&c--,!(c<0));d++);let h=i.substring(0,o),f=0;["sethas(","sethasnot("].includes(a[1])&&(f=1,h=h.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const y=pb(i.substring(0,o)),m=mb(i.substring(o,d),y),_=pb(m),b=e.slice(y,y+_),x=JSON.stringify(Dv(m,b,t));i=h.replace(/=$/,"2=")+`$${y+1}`+mb(i.substring(d+f),_-1);const v=e.slice(0,y),T=e.slice(y+_);e=v.concat([{quote:'"',text:x}]).concat(T)}i=i.replace(/\,set([\w]+)\(([^)]+)\)/g,(a,o,c)=>","+o.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=[${t}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?visible=true\)/g,"visible=true").replace(/filter\(,?visible=false\)/g,"visible=false").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const s=i.split(".");for(let a=0;a<s.length-1;a++)if(s[a]==="internal:control=enter-frame"&&s[a+1].startsWith("nth=")){const[o]=s.splice(a,1);s.splice(a+1,0,o)}return s.map(a=>!a.startsWith("internal:")||a==="internal:control"?a.replace(/\$(\d+)/g,(o,c)=>e[+c-1].text):(a=a.includes("[")?a.replace(/\]/,"")+"]":a,a=a.replace(/(?:r)\$(\d+)(i)?/g,(o,c,d)=>{const h=e[+c-1];return a.startsWith("internal:attr")||a.startsWith("internal:testid")||a.startsWith("internal:role")?It(new RegExp(h.text),!1)+(d||""):Bt(new RegExp(h.text,d),!1)}).replace(/\$(\d+)(i|s)?/g,(o,c,d)=>{const h=e[+c-1];return a.startsWith("internal:has=")||a.startsWith("internal:has-not=")?h.text:a.startsWith("internal:testid")?It(h.text,!0):a.startsWith("internal:attr")||a.startsWith("internal:role")?It(h.text,d==="s"):Bt(h.text,d==="s")}),a)).join(" >> ")}function _C(i,e,t){try{return bC(i,e,t)}catch{return""}}function bC(i,e,t){try{return To(e),e}catch{}const{selector:s,preferredQuote:a}=yC(e,t),o=c0(i,s,void 0,void 0,a),c=yb(i,e);return o.some(d=>yb(i,d)===c)?s:""}function yb(i,e){return e=e.replace(/\s/g,""),i==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const vC=({url:i})=>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:i||"about:blank",children:[w.jsx("span",{className:"browser-frame-address",children:i||"about:blank"}),i&&w.jsx(kf,{value:i})]}),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"})]})})]}),tg=Symbol.for("yaml.alias"),gf=Symbol.for("yaml.document"),Vi=Symbol.for("yaml.map"),Lv=Symbol.for("yaml.pair"),Hn=Symbol.for("yaml.scalar"),Pr=Symbol.for("yaml.seq"),pn=Symbol.for("yaml.node.type"),Xi=i=>!!i&&typeof i=="object"&&i[pn]===tg,Cs=i=>!!i&&typeof i=="object"&&i[pn]===gf,Ur=i=>!!i&&typeof i=="object"&&i[pn]===Vi,Ue=i=>!!i&&typeof i=="object"&&i[pn]===Lv,He=i=>!!i&&typeof i=="object"&&i[pn]===Hn,qr=i=>!!i&&typeof i=="object"&&i[pn]===Pr;function qe(i){if(i&&typeof i=="object")switch(i[pn]){case Vi:case Pr:return!0}return!1}function Ve(i){if(i&&typeof i=="object")switch(i[pn]){case tg:case Vi:case Hn:case Pr:return!0}return!1}const Ov=i=>(He(i)||qe(i))&&!!i.anchor,Pt=Symbol("break visit"),Rv=Symbol("skip children"),jn=Symbol("remove node");function ks(i,e){const t=jv(e);Cs(i)?Ar(null,i.contents,t,Object.freeze([i]))===jn&&(i.contents=null):Ar(null,i,t,Object.freeze([]))}ks.BREAK=Pt;ks.SKIP=Rv;ks.REMOVE=jn;function Ar(i,e,t,s){const a=Hv(i,e,t,s);if(Ve(a)||Ue(a))return zv(i,s,a),Ar(i,a,t,s);if(typeof a!="symbol"){if(qe(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const c=Ar(o,e.items[o],t,s);if(typeof c=="number")o=c-1;else{if(c===Pt)return Pt;c===jn&&(e.items.splice(o,1),o-=1)}}}else if(Ue(e)){s=Object.freeze(s.concat(e));const o=Ar("key",e.key,t,s);if(o===Pt)return Pt;o===jn&&(e.key=null);const c=Ar("value",e.value,t,s);if(c===Pt)return Pt;c===jn&&(e.value=null)}}return a}async function Ic(i,e){const t=jv(e);Cs(i)?await Cr(null,i.contents,t,Object.freeze([i]))===jn&&(i.contents=null):await Cr(null,i,t,Object.freeze([]))}Ic.BREAK=Pt;Ic.SKIP=Rv;Ic.REMOVE=jn;async function Cr(i,e,t,s){const a=await Hv(i,e,t,s);if(Ve(a)||Ue(a))return zv(i,s,a),Cr(i,a,t,s);if(typeof a!="symbol"){if(qe(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const c=await Cr(o,e.items[o],t,s);if(typeof c=="number")o=c-1;else{if(c===Pt)return Pt;c===jn&&(e.items.splice(o,1),o-=1)}}}else if(Ue(e)){s=Object.freeze(s.concat(e));const o=await Cr("key",e.key,t,s);if(o===Pt)return Pt;o===jn&&(e.key=null);const c=await Cr("value",e.value,t,s);if(c===Pt)return Pt;c===jn&&(e.value=null)}}return a}function jv(i){return typeof i=="object"&&(i.Collection||i.Node||i.Value)?Object.assign({Alias:i.Node,Map:i.Node,Scalar:i.Node,Seq:i.Node},i.Value&&{Map:i.Value,Scalar:i.Value,Seq:i.Value},i.Collection&&{Map:i.Collection,Seq:i.Collection},i):i}function Hv(i,e,t,s){var a,o,c,d,h;if(typeof t=="function")return t(i,e,s);if(Ur(e))return(a=t.Map)==null?void 0:a.call(t,i,e,s);if(qr(e))return(o=t.Seq)==null?void 0:o.call(t,i,e,s);if(Ue(e))return(c=t.Pair)==null?void 0:c.call(t,i,e,s);if(He(e))return(d=t.Scalar)==null?void 0:d.call(t,i,e,s);if(Xi(e))return(h=t.Alias)==null?void 0:h.call(t,i,e,s)}function zv(i,e,t){const s=e[e.length-1];if(qe(s))s.items[i]=t;else if(Ue(s))i==="key"?s.key=t:s.value=t;else if(Cs(s))s.contents=t;else{const a=Xi(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}const SC={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},wC=i=>i.replace(/[!,[\]{}]/g,e=>SC[e]);class Ct{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ct.defaultYaml,e),this.tags=Object.assign({},Ct.defaultTags,t)}clone(){const e=new Ct(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Ct(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Ct.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Ct.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:Ct.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Ct.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),a=s.shift();switch(a){case"%TAG":{if(s.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[o,c]=s;return this.tags[o]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[o]=s;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const c=/^\d+\.\d+$/.test(o);return t(6,`Unsupported YAML version ${o}`,c),!1}}default:return t(0,`Unknown directive ${a}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const c=e.slice(2,-1);return c==="!"||c==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),c)}const[,s,a]=e.match(/^(.*!)([^!]*)$/s);a||t(`The ${e} tag has no suffix`);const o=this.tags[s];if(o)try{return o+decodeURIComponent(a)}catch(c){return t(String(c)),null}return s==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+wC(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let a;if(e&&s.length>0&&Ve(e.contents)){const o={};ks(e.contents,(c,d)=>{Ve(d)&&d.tag&&(o[d.tag]=!0)}),a=Object.keys(o)}else a=[];for(const[o,c]of s)o==="!!"&&c==="tag:yaml.org,2002:"||(!e||a.some(d=>d.startsWith(c)))&&t.push(`%TAG ${o} ${c}`);return t.join(`
|
|
672
|
-
`)}}Ct.defaultYaml={explicit:!1,version:"1.2"};Ct.defaultTags={"!!":"tag:yaml.org,2002:"};function $v(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(t)}return!0}function Bv(i){const e=new Set;return ks(i,{Value(t,s){s.anchor&&e.add(s.anchor)}}),e}function Iv(i,e){for(let t=1;;++t){const s=`${i}${t}`;if(!e.has(s))return s}}function
|
|
670
|
+
`),this.installListeners(),this._installFileUploadHooks(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&(console.error("Recorder script ready for test"),e.window.__pw_recorderToggleNestedElements=()=>{this.togglePointerEventsOverride()}),e.consoleApi.install()}get modularityToggled(){return this._modularityToggled}set modularityToggled(e){this._modularityToggled=e;try{typeof window.__pw_recorderSetModularityToggled=="function"?window.__pw_recorderSetModularityToggled(e):console.warn("Modularity toggle binding not available yet, state may be out of sync")}catch(t){console.error("Failed to set modularity toggle on server:",t)}}get pointerEventsOverrideEnabled(){return this._nestedElementHandler.enabled}togglePointerEventsOverride(){var e;this._nestedElementHandler.toggle(),(e=this.overlay)==null||e.updateToolbar()}installListeners(){var s,a;Nv(this._listeners),this._listeners=[he(this.document,"click",o=>this._onClick(o),!0),he(this.document,"auxclick",o=>this._onClick(o),!0),he(this.document,"dblclick",o=>this._onDblClick(o),!0),he(this.document,"contextmenu",o=>this._onContextMenu(o),!0),he(this.document,"dragstart",o=>this._onDragStart(o),!0),he(this.document,"input",o=>this._onInput(o),!0),he(this.document,"keydown",o=>this._onKeyDown(o),!0),he(this.document,"keyup",o=>this._onKeyUp(o),!0),he(this.document,"pointerdown",o=>this._onPointerDown(o),!0),he(this.document,"pointermove",o=>this._onPointerMove(o),!0),he(this.document,"pointerup",o=>this._onPointerUp(o),!0),he(this.document,"mousedown",o=>this._onMouseDown(o),!0),he(this.document,"mouseup",o=>this._onMouseUp(o),!0),he(this.document,"mousemove",o=>this._onMouseMove(o),!0),he(this.document,"mouseleave",o=>this._onMouseLeave(o),!0),he(this.document,"mouseenter",o=>this._onMouseEnter(o),!0),he(this.document,"focus",o=>this._onFocus(o),!0),he(this.document,"scroll",o=>this._onScroll(o),!0)],this.highlight.install();let e;const t=()=>{if(this.highlight.install(),this.overlay){const o=this.overlay._overlayElement,c=this.highlight._glassPaneElement,d=c&&c.isConnected,h=o&&!o.isConnected;d&&h&&this.overlay.install()}e=this.injectedScript.utils.builtins.setTimeout(t,500)};if(e=this.injectedScript.utils.builtins.setTimeout(t,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(Mv(this.document,HC)),this.overlay){const o=this.highlight._glassPaneElement;o&&o.isConnected&&this.overlay.install()}(a=(s=this._currentTool)==null?void 0:s.install)==null||a.call(s),this.document.adoptedStyleSheets.push(this._stylesheet)}_installFileUploadHooks(){XC(this,this._listeners)}_switchCurrentTool(){var s,a,o,c,d,h,f,y;const e=this._tools[this.state.mode];if(e===this._currentTool)return;if((a=(s=this._currentTool).uninstall)==null||a.call(s),this.clearHighlight(),this._currentTool=e,(c=(o=this._currentTool).install)==null||c.call(o),this.state.mode==="recording"){const m=kv(this.document);m&&m!==this.document.body&&m!==this.document.documentElement&&((h=(d=this._currentTool).onFocus)==null||h.call(d,new FocusEvent("focus")))}const t=(f=e.cursor)==null?void 0:f.call(e);t&&((y=this.injectedScript.document.body)==null||y.setAttribute("data-pw-cursor",t))}setUIState(e,t){var o,c;this._delegate=t,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()),e.modularityToggled!==this._modularityToggled&&(this._modularityToggled=e.modularityToggled,(o=this.overlay)==null||o.updateModularityToggleState(this._modularityToggled)),this.state=e,this.highlight.setLanguage(e.language),this._switchCurrentTool(),(c=this.overlay)==null||c.setUIState(e),e.mode==="recording"?(this._modalHandler.enable(),this._iframeHandler.enable()):(this._modalHandler.disable(),this._iframeHandler.disable());let s="noop";if(e.actionSelector!==this._lastHighlightedSelector){const d=e.actionSelector?b2(this.injectedScript,e.language,e.actionSelector,this.document):null;s=d!=null&&d.length?d:"clear",this._lastHighlightedSelector=d!=null&&d.length?e.actionSelector:void 0}const a=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==a){const d=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(d.length){const h=d.length>1?fn.multiple:fn.single;s=d.map(f=>({element:f,color:h})),this._lastHighlightedAriaTemplateJSON=a}else this._lastHighlightedSelector||(s="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}s==="clear"?this.highlight.clearHighlight():s!=="noop"&&this.highlight.updateHighlight(s)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var t,s,a;e.isTrusted&&((t=this.overlay)!=null&&t.onClick(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onClick)==null||a.call(s,e))}_onDblClick(e){var t,s,a;e.isTrusted&&((t=this.overlay)!=null&&t.onDblClick(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onDblClick)==null||a.call(s,e))}_onContextMenu(e){var t,s;e.isTrusted&&((s=(t=this._currentTool).onContextMenu)==null||s.call(t,e))}_onDragStart(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onDragStart)==null||s.call(t,e))}_onPointerDown(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onPointerDown)==null||s.call(t,e))}_onPointerUp(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onPointerUp)==null||s.call(t,e))}_onPointerMove(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onPointerMove)==null||s.call(t,e))}_onMouseDown(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onMouseDown)==null||s.call(t,e))}_onMouseUp(e){var t,s,a;e.isTrusted&&((t=this.overlay)!=null&&t.onMouseUp(e)||this._ignoreOverlayEvent(e)||(a=(s=this._currentTool).onMouseUp)==null||a.call(s,e))}_onMouseMove(e){var t,s,a;e.isTrusted&&((t=this.overlay)!=null&&t.onMouseMove(e)||this._ignoreOverlayEvent(e)||(this._trackHoverTrail(e),(a=(s=this._currentTool).onMouseMove)==null||a.call(s,e)))}_onMouseEnter(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onMouseEnter)==null||s.call(t,e))}_trackHoverTrail(e){if(this.state.mode!=="recording")return;const t=this.deepEventTarget(e);if(!t)return;const s=w2(t,this.document);if(!s)return;const a=performance.now(),o=this._recentHoverTrail[this._recentHoverTrail.length-1];if(o&&o.element===s)return;this._recentHoverTrail.push({element:s,timestamp:a});const c=a-oi._HOVER_TRAIL_LOOKBACK_MS;for(;this._recentHoverTrail.length>0&&this._recentHoverTrail[0].timestamp<c;)this._recentHoverTrail.shift();this._recentHoverTrail.length>oi._HOVER_TRAIL_MAX&&this._recentHoverTrail.splice(0,this._recentHoverTrail.length-oi._HOVER_TRAIL_MAX)}_onMouseLeave(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onMouseLeave)==null||s.call(t,e))}_onFocus(e){var t,s;this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onFocus)==null||s.call(t,e)}_onScroll(e){var t,s;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(s=(t=this._currentTool).onScroll)==null||s.call(t,e))}_onInput(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onInput)==null||s.call(t,e))}_onKeyDown(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onKeyDown)==null||s.call(t,e))}_onKeyUp(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onKeyUp)==null||s.call(t,e))}updateHighlight(e,t){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,t)}_updateHighlight(e,t){var a,o;let s=e==null?void 0:e.tooltipText;s===void 0&&(e!=null&&e.selector)&&(s=this.injectedScript.utils.asLocator(this.state.language,e.selector)),e?this.highlight.updateHighlight(e.elements.map(c=>({element:c,color:e.color,tooltipText:s}))):this.highlight.clearHighlight(),t&&((o=(a=this._delegate).highlightUpdated)==null||o.call(a))}_ignoreOverlayEvent(e){return e.composedPath().some(t=>(t.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var t;for(const s of e.composedPath())if(!((t=this.overlay)!=null&&t.contains(s)))return s;return e.composedPath()[0]}setMode(e){var t,s;(s=(t=this._delegate).setMode)==null||s.call(t,e)}_captureAutoExpectSnapshot(){const e=this.injectedScript.document.documentElement;return e?this.injectedScript.utils.generateAriaTree(e,{mode:"autoexpect"}):void 0}async performAction(e){var t,s;this._decorateUserAction(e),await((s=(t=this._delegate).performAction)==null?void 0:s.call(t,e).catch(()=>{}))}_decorateUserAction(e){var a;const t=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),v2(e)||!this._lastActionAutoexpectSnapshot)return;const s=this.injectedScript.utils.findNewElement(t==null?void 0:t.root,(a=this._lastActionAutoexpectSnapshot)==null?void 0:a.root);if(!("preconditionSelector"in e)||e.preconditionSelector===void 0){const o=e;o.preconditionSelector=s?this.injectedScript.generateSelector(s,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0,"selector"in e&&o.preconditionSelector===o.selector&&(o.preconditionSelector=void 0)}e.name==="click"&&e.preconditionSelector&&s&&this._maybeEmitFlyoutHoverBeforeClick(e,s),e.name==="click"&&this._maybeEmitRowRevealHoverBeforeClick(e),this._previousUserActionName=e.name}_maybeEmitRowRevealHoverBeforeClick(e){let t=null;try{const f=this.injectedScript.parseSelector(e.selector);t=this.injectedScript.querySelectorAll(f,this.document)[0]??null}catch{return}if(!t)return;const s=t.closest(oi._REVEAL_CONTAINER_SELECTOR);if(!s)return;const a=t.closest('button, [role="button"], [role="menuitem"]');if(!a||!s.contains(a))return;const o=this._findRevealHoverTarget(s)??s;let c;try{c=this.injectedScript.generateSelector(o,{testIdAttributeName:this.state.testIdAttributeName}).selector}catch{return}if(!c)return;const d=parseInt(e.timestamp,10),h={name:"hover",selector:c,signals:[],timestamp:Number.isFinite(d)?(d-1).toString():e.timestamp};this._delegate.recordAction&&this._delegate.recordAction(h).catch(()=>{})}_findRevealHoverTarget(e){const t=e.querySelectorAll('a[href], [role="link"], h1, h2, h3, h4, h5, h6');for(const s of Array.from(t)){const a=(s.innerText||s.textContent||"").trim();if(!(!a||a.length>80))return s}return null}_maybeEmitFlyoutHoverBeforeClick(e,t){if(this._recentHoverTrail.length===0||this._previousUserActionName==="click")return;let s=null;try{const a=this.injectedScript.parseSelector(e.selector);s=this.injectedScript.querySelectorAll(a,this.document)[0]??null}catch{return}if(!(!s||!t.contains(s)))for(let a=this._recentHoverTrail.length-1;a>=0;a--){const o=this._recentHoverTrail[a].element;if(!o.isConnected||o===s||s.contains(o)||o.contains(s)||t.contains(o)||o.contains(t))continue;const c=this.injectedScript.generateSelector(o,{testIdAttributeName:this.state.testIdAttributeName});if(!c.selector)continue;const d=parseInt(e.timestamp,10),h={name:"hover",selector:c.selector,signals:[],timestamp:Number.isFinite(d)?(d-1).toString():e.timestamp};this._delegate.recordAction&&this._delegate.recordAction(h).catch(()=>{}),this._recentHoverTrail=[];return}}recordAction(e){this._decorateUserAction(e),this._delegate.recordAction?this._delegate.recordAction(e):console.warn("[Recorder] No delegate.recordAction available!")}setOverlayState(e){var t,s;(s=(t=this._delegate).setOverlayState)==null||s.call(t,e)}elementPicked(e,t){var a,o;const s=this.injectedScript.ariaSnapshot(t.elements[0],{mode:"expect"});(o=(a=this._delegate).elementPicked)==null||o.call(a,{selector:e,ariaSnapshot:s})}};oi._HOVER_TRAIL_MAX=20,oi._HOVER_TRAIL_LOOKBACK_MS=1e4,oi._REVEAL_CONTAINER_SELECTOR='[role="row"], [data-testid="grid-view-item"], [data-testid$="-item"], [data-testid$="-row"], [draggable="true"], tr';let hf=oi,Cv=class{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){const t=this._recorder.document.createElement("x-pw-tool-item");t.title="Accept",t.classList.add("accept"),t.appendChild(this._recorder.document.createElement("x-div")),t.addEventListener("click",()=>{var w;return(w=e.onCommit)==null?void 0:w.call(e)});const s=this._recorder.document.createElement("x-pw-tool-item");s.title="Close",s.classList.add("cancel"),s.appendChild(this._recorder.document.createElement("x-div")),s.addEventListener("click",()=>{var w;this.close(),(w=e.onCancel)==null||w.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),e.autosize&&this._dialogElement.classList.add("autosize"),this._keyboardListener=w=>{var v;if(w.key==="Escape"){this.close(),(v=e.onCancel)==null||v.call(e);return}if(e.onCommit&&w.key==="Enter"&&(w.ctrlKey||w.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=w=>{var v;this._dialogElement&&w.target instanceof Node&&this._dialogElement.contains(w.target)||(this.close(),(v=e.onCancel)==null||v.call(e))},this._dialogElement.addEventListener("click",w=>w.stopPropagation());const a=this._recorder.document.createElement("x-pw-tools-list"),o=this._recorder.document.createElement("label");o.textContent=e.label,a.appendChild(o),a.appendChild(this._recorder.document.createElement("x-spacer")),e.onCommit&&a.appendChild(t),a.appendChild(s),this._dialogElement.appendChild(a);const c=this._recorder.document.createElement("x-pw-dialog-body");c.appendChild(e.body),this._dialogElement.appendChild(c),a.style.cursor="move";let d=0,h=0,f=0,y=0;const m=w=>{this._dialogElement&&(this._dialogElement.style.top=f+w.clientY-h+"px",this._dialogElement.style.left=y+w.clientX-d+"px")},_=()=>{this._recorder.document.removeEventListener("mousemove",m,!0),this._recorder.document.removeEventListener("mouseup",_,!0)};a.addEventListener("mousedown",w=>{w.target.closest("x-pw-tool-item")||(d=w.clientX,h=w.clientY,f=parseInt(this._dialogElement.style.top)||0,y=parseInt(this._dialogElement.style.left)||0,this._recorder.document.addEventListener("mousemove",m,!0),this._recorder.document.addEventListener("mouseup",_,!0),w.stopPropagation(),w.preventDefault())},!1);const b=w=>{w.stopPropagation()};return this._dialogElement.addEventListener("mousedown",b,!1),this._dialogElement.addEventListener("mouseup",b,!1),this._dialogElement.addEventListener("pointerdown",b,!1),this._dialogElement.addEventListener("pointerup",b,!1),this._dialogElement.addEventListener("click",b,!1),this._dialogElement.addEventListener("dblclick",b,!1),c.addEventListener("click",b,!1),this._recorder.highlight.appendChild(this._dialogElement),this._recorder.highlight.onGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.addEventListener("keydown",this._keyboardListener,!0),this._dialogElement}moveTo(e,t){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=t+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.highlight.offGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}};function kv(i){let e=i.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function Mr(i){return(i.altKey?1:0)|(i.ctrlKey?2:0)|(i.metaKey?4:0)|(i.shiftKey?8:0)}function ff(i){switch(i.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function ho(i){if(i.target.nodeName==="CANVAS")return{x:i.offsetX,y:i.offsetY}}function Ie(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()}function fo(i){if(!i||i.nodeName!=="INPUT")return null;const e=i;return["checkbox","radio"].includes(e.type)?e:null}function go(i){return!i||i.nodeName!=="INPUT"?!1:i.type.toLowerCase()==="range"}function he(i,e,t,s){return i.addEventListener(e,t,s),()=>{i.removeEventListener(e,t,s)}}function Nv(i){for(const e of i)e();i.splice(0,i.length)}function b2(i,e,t,s){try{const a=i.parseSelector(t),o=i.querySelectorAll(a,s),c=o.length>1?fn.multiple:fn.single,d=i.utils.asLocator(e,t);return o.map((h,f)=>{const y=o.length>1?` [${f+1} of ${o.length}]`:"";return{element:h,color:c,tooltipText:d+y}})}catch{return[]}}function Mv(i,{tagName:e,attrs:t,children:s}){const a=i.createElementNS("http://www.w3.org/2000/svg",e);if(t)for(const[o,c]of Object.entries(t))a.setAttribute(o,c);if(s)for(const o of s)a.appendChild(Mv(i,o));return a}function v2(i){return i.name.startsWith("assert")}function S2(i){const e=i.tagName;if(e==="BUTTON"||e==="A"||i.hasAttribute("aria-haspopup")||i.hasAttribute("aria-expanded"))return!0;const t=i.getAttribute("role");return!!(t&&(t==="button"||t==="link"||t==="menuitem"||t==="tab"))}function w2(i,e){let t=i;for(;t&&t!==e.body&&t!==e.documentElement;){if(S2(t))return t;t=t.parentElement}return null}function Te(i){return i.injectedScript.utils.builtins.Date.now().toString()}function x2(i,e){i=i.replace(/AriaRole\s*\.\s*([\w]+)/g,(o,c)=>c.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(o,c,d)=>`${c}(${d.toLowerCase()}`);const t=[];let s="";for(let o=0;o<i.length;++o){const c=i[o];if(c!=='"'&&c!=="'"&&c!=="`"&&c!=="/"){s+=c;continue}const d=i[o-1]==="r"||i[o]==="/";++o;let h="";for(;o<i.length;){if(i[o]==="\\"){d?(i[o+1]!==c&&(h+=i[o]),++o,h+=i[o]):(++o,i[o]==="n"?h+=`
|
|
671
|
+
`:i[o]==="r"?h+="\r":i[o]==="t"?h+=" ":h+=i[o]),++o;continue}if(i[o]!==c){h+=i[o++];continue}break}t.push({quote:c,text:h}),s+=(c==="/"?"r":"")+"$"+t.length}s=s.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/\bpage\./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 a=t.map(o=>o.quote).filter(o=>"'\"`".includes(o))[0];return{selector:Dv(s,t,e),preferredQuote:a}}function pb(i){return[...i.matchAll(/\$\d+/g)].length}function mb(i,e){return i.replace(/\$(\d+)/g,(t,s)=>`$${s-e}`)}function Dv(i,e,t){for(;;){const a=i.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!a)break;const o=a.index+a[0].length;let c=0,d=o;for(;d<i.length&&(i[d]==="("?c++:i[d]===")"&&c--,!(c<0));d++);let h=i.substring(0,o),f=0;["sethas(","sethasnot("].includes(a[1])&&(f=1,h=h.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const y=pb(i.substring(0,o)),m=mb(i.substring(o,d),y),_=pb(m),b=e.slice(y,y+_),w=JSON.stringify(Dv(m,b,t));i=h.replace(/=$/,"2=")+`$${y+1}`+mb(i.substring(d+f),_-1);const v=e.slice(0,y),T=e.slice(y+_);e=v.concat([{quote:'"',text:w}]).concat(T)}i=i.replace(/\,set([\w]+)\(([^)]+)\)/g,(a,o,c)=>","+o.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=[${t}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?visible=true\)/g,"visible=true").replace(/filter\(,?visible=false\)/g,"visible=false").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const s=i.split(".");for(let a=0;a<s.length-1;a++)if(s[a]==="internal:control=enter-frame"&&s[a+1].startsWith("nth=")){const[o]=s.splice(a,1);s.splice(a+1,0,o)}return s.map(a=>!a.startsWith("internal:")||a==="internal:control"?a.replace(/\$(\d+)/g,(o,c)=>e[+c-1].text):(a=a.includes("[")?a.replace(/\]/,"")+"]":a,a=a.replace(/(?:r)\$(\d+)(i)?/g,(o,c,d)=>{const h=e[+c-1];return a.startsWith("internal:attr")||a.startsWith("internal:testid")||a.startsWith("internal:role")?It(new RegExp(h.text),!1)+(d||""):Bt(new RegExp(h.text,d),!1)}).replace(/\$(\d+)(i|s)?/g,(o,c,d)=>{const h=e[+c-1];return a.startsWith("internal:has=")||a.startsWith("internal:has-not=")?h.text:a.startsWith("internal:testid")?It(h.text,!0):a.startsWith("internal:attr")||a.startsWith("internal:role")?It(h.text,d==="s"):Bt(h.text,d==="s")}),a)).join(" >> ")}function T2(i,e,t){try{return E2(i,e,t)}catch{return""}}function E2(i,e,t){try{return To(e),e}catch{}const{selector:s,preferredQuote:a}=x2(e,t),o=c0(i,s,void 0,void 0,a),c=yb(i,e);return o.some(d=>yb(i,d)===c)?s:""}function yb(i,e){return e=e.replace(/\s/g,""),i==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const A2=({url:i})=>x.jsxs("div",{className:"browser-frame-header",children:[x.jsxs("div",{className:"browser-traffic-lights",children:[x.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),x.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),x.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),x.jsxs("div",{className:"browser-frame-address-bar",title:i||"about:blank",children:[x.jsx("span",{className:"browser-frame-address",children:i||"about:blank"}),i&&x.jsx(kf,{value:i})]}),x.jsx("div",{style:{marginLeft:"auto"},children:x.jsxs("div",{children:[x.jsx("span",{className:"browser-frame-menu-bar"}),x.jsx("span",{className:"browser-frame-menu-bar"}),x.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),tg=Symbol.for("yaml.alias"),gf=Symbol.for("yaml.document"),Vi=Symbol.for("yaml.map"),Lv=Symbol.for("yaml.pair"),Hn=Symbol.for("yaml.scalar"),Pr=Symbol.for("yaml.seq"),pn=Symbol.for("yaml.node.type"),Xi=i=>!!i&&typeof i=="object"&&i[pn]===tg,Cs=i=>!!i&&typeof i=="object"&&i[pn]===gf,Ur=i=>!!i&&typeof i=="object"&&i[pn]===Vi,Ue=i=>!!i&&typeof i=="object"&&i[pn]===Lv,He=i=>!!i&&typeof i=="object"&&i[pn]===Hn,qr=i=>!!i&&typeof i=="object"&&i[pn]===Pr;function qe(i){if(i&&typeof i=="object")switch(i[pn]){case Vi:case Pr:return!0}return!1}function Ve(i){if(i&&typeof i=="object")switch(i[pn]){case tg:case Vi:case Hn:case Pr:return!0}return!1}const Ov=i=>(He(i)||qe(i))&&!!i.anchor,Pt=Symbol("break visit"),Rv=Symbol("skip children"),jn=Symbol("remove node");function ks(i,e){const t=jv(e);Cs(i)?Ar(null,i.contents,t,Object.freeze([i]))===jn&&(i.contents=null):Ar(null,i,t,Object.freeze([]))}ks.BREAK=Pt;ks.SKIP=Rv;ks.REMOVE=jn;function Ar(i,e,t,s){const a=Hv(i,e,t,s);if(Ve(a)||Ue(a))return zv(i,s,a),Ar(i,a,t,s);if(typeof a!="symbol"){if(qe(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const c=Ar(o,e.items[o],t,s);if(typeof c=="number")o=c-1;else{if(c===Pt)return Pt;c===jn&&(e.items.splice(o,1),o-=1)}}}else if(Ue(e)){s=Object.freeze(s.concat(e));const o=Ar("key",e.key,t,s);if(o===Pt)return Pt;o===jn&&(e.key=null);const c=Ar("value",e.value,t,s);if(c===Pt)return Pt;c===jn&&(e.value=null)}}return a}async function Ic(i,e){const t=jv(e);Cs(i)?await Cr(null,i.contents,t,Object.freeze([i]))===jn&&(i.contents=null):await Cr(null,i,t,Object.freeze([]))}Ic.BREAK=Pt;Ic.SKIP=Rv;Ic.REMOVE=jn;async function Cr(i,e,t,s){const a=await Hv(i,e,t,s);if(Ve(a)||Ue(a))return zv(i,s,a),Cr(i,a,t,s);if(typeof a!="symbol"){if(qe(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const c=await Cr(o,e.items[o],t,s);if(typeof c=="number")o=c-1;else{if(c===Pt)return Pt;c===jn&&(e.items.splice(o,1),o-=1)}}}else if(Ue(e)){s=Object.freeze(s.concat(e));const o=await Cr("key",e.key,t,s);if(o===Pt)return Pt;o===jn&&(e.key=null);const c=await Cr("value",e.value,t,s);if(c===Pt)return Pt;c===jn&&(e.value=null)}}return a}function jv(i){return typeof i=="object"&&(i.Collection||i.Node||i.Value)?Object.assign({Alias:i.Node,Map:i.Node,Scalar:i.Node,Seq:i.Node},i.Value&&{Map:i.Value,Scalar:i.Value,Seq:i.Value},i.Collection&&{Map:i.Collection,Seq:i.Collection},i):i}function Hv(i,e,t,s){var a,o,c,d,h;if(typeof t=="function")return t(i,e,s);if(Ur(e))return(a=t.Map)==null?void 0:a.call(t,i,e,s);if(qr(e))return(o=t.Seq)==null?void 0:o.call(t,i,e,s);if(Ue(e))return(c=t.Pair)==null?void 0:c.call(t,i,e,s);if(He(e))return(d=t.Scalar)==null?void 0:d.call(t,i,e,s);if(Xi(e))return(h=t.Alias)==null?void 0:h.call(t,i,e,s)}function zv(i,e,t){const s=e[e.length-1];if(qe(s))s.items[i]=t;else if(Ue(s))i==="key"?s.key=t:s.value=t;else if(Cs(s))s.contents=t;else{const a=Xi(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}const C2={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},k2=i=>i.replace(/[!,[\]{}]/g,e=>C2[e]);class Ct{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ct.defaultYaml,e),this.tags=Object.assign({},Ct.defaultTags,t)}clone(){const e=new Ct(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Ct(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Ct.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Ct.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:Ct.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Ct.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),a=s.shift();switch(a){case"%TAG":{if(s.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[o,c]=s;return this.tags[o]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[o]=s;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const c=/^\d+\.\d+$/.test(o);return t(6,`Unsupported YAML version ${o}`,c),!1}}default:return t(0,`Unknown directive ${a}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const c=e.slice(2,-1);return c==="!"||c==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),c)}const[,s,a]=e.match(/^(.*!)([^!]*)$/s);a||t(`The ${e} tag has no suffix`);const o=this.tags[s];if(o)try{return o+decodeURIComponent(a)}catch(c){return t(String(c)),null}return s==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+k2(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let a;if(e&&s.length>0&&Ve(e.contents)){const o={};ks(e.contents,(c,d)=>{Ve(d)&&d.tag&&(o[d.tag]=!0)}),a=Object.keys(o)}else a=[];for(const[o,c]of s)o==="!!"&&c==="tag:yaml.org,2002:"||(!e||a.some(d=>d.startsWith(c)))&&t.push(`%TAG ${o} ${c}`);return t.join(`
|
|
672
|
+
`)}}Ct.defaultYaml={explicit:!1,version:"1.2"};Ct.defaultTags={"!!":"tag:yaml.org,2002:"};function $v(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(t)}return!0}function Bv(i){const e=new Set;return ks(i,{Value(t,s){s.anchor&&e.add(s.anchor)}}),e}function Iv(i,e){for(let t=1;;++t){const s=`${i}${t}`;if(!e.has(s))return s}}function N2(i,e){const t=[],s=new Map;let a=null;return{onAnchor:o=>{t.push(o),a??(a=Bv(i));const c=Iv(e,a);return a.add(c),c},setAnchors:()=>{for(const o of t){const c=s.get(o);if(typeof c=="object"&&c.anchor&&(He(c.node)||qe(c.node)))c.node.anchor=c.anchor;else{const d=new Error("Failed to resolve repeated object (this should not happen)");throw d.source=o,d}}},sourceObjects:s}}function kr(i,e,t,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let a=0,o=s.length;a<o;++a){const c=s[a],d=kr(i,s,String(a),c);d===void 0?delete s[a]:d!==c&&(s[a]=d)}else if(s instanceof Map)for(const a of Array.from(s.keys())){const o=s.get(a),c=kr(i,s,a,o);c===void 0?s.delete(a):c!==o&&s.set(a,c)}else if(s instanceof Set)for(const a of Array.from(s)){const o=kr(i,s,a,a);o===void 0?s.delete(a):o!==a&&(s.delete(a),s.add(o))}else for(const[a,o]of Object.entries(s)){const c=kr(i,s,a,o);c===void 0?delete s[a]:c!==o&&(s[a]=c)}return i.call(e,t,s)}function gn(i,e,t){if(Array.isArray(i))return i.map((s,a)=>gn(s,String(a),t));if(i&&typeof i.toJSON=="function"){if(!t||!Ov(i))return i.toJSON(e,t);const s={aliasCount:0,count:1,res:void 0};t.anchors.set(i,s),t.onCreate=o=>{s.res=o,delete t.onCreate};const a=i.toJSON(e,t);return t.onCreate&&t.onCreate(a),a}return typeof i=="bigint"&&!(t!=null&&t.keep)?Number(i):i}class ng{constructor(e){Object.defineProperty(this,pn,{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:t,maxAliasCount:s,onAnchor:a,reviver:o}={}){if(!Cs(e))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},d=gn(this,"",c);if(typeof a=="function")for(const{count:h,res:f}of c.anchors.values())a(f,h);return typeof o=="function"?kr(o,{"":d},"",d):d}}class Pc extends ng{constructor(e){super(tg),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let s;t!=null&&t.aliasResolveCache?s=t.aliasResolveCache:(s=[],ks(e,{Node:(o,c)=>{(Xi(c)||Ov(c))&&s.push(c)}}),t&&(t.aliasResolveCache=s));let a;for(const o of s){if(o===this)break;o.anchor===this.source&&(a=o)}return a}toJSON(e,t){if(!t)return{source:this.source};const{anchors:s,doc:a,maxAliasCount:o}=t,c=this.resolve(a,t);if(!c){const h=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(h)}let d=s.get(c);if(d||(gn(c,null,t),d=s.get(c)),(d==null?void 0:d.res)===void 0){const h="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(h)}if(o>=0&&(d.count+=1,d.aliasCount===0&&(d.aliasCount=hc(a,c,s)),d.count*d.aliasCount>o)){const h="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(h)}return d.res}toString(e,t,s){const a=`*${this.source}`;if(e){if($v(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${a} `}return a}}function hc(i,e,t){if(Xi(e)){const s=e.resolve(i),a=t&&s&&t.get(s);return a?a.count*a.aliasCount:0}else if(qe(e)){let s=0;for(const a of e.items){const o=hc(i,a,t);o>s&&(s=o)}return s}else if(Ue(e)){const s=hc(i,e.key,t),a=hc(i,e.value,t);return Math.max(s,a)}return 1}const Pv=i=>!i||typeof i!="function"&&typeof i!="object";class ge extends ng{constructor(e){super(Hn),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:gn(this.value,e,t)}toString(){return String(this.value)}}ge.BLOCK_FOLDED="BLOCK_FOLDED";ge.BLOCK_LITERAL="BLOCK_LITERAL";ge.PLAIN="PLAIN";ge.QUOTE_DOUBLE="QUOTE_DOUBLE";ge.QUOTE_SINGLE="QUOTE_SINGLE";const M2="tag:yaml.org,2002:";function D2(i,e,t){if(e){const s=t.filter(o=>o.tag===e),a=s.find(o=>!o.format)??s[0];if(!a)throw new Error(`Tag ${e} not found`);return a}return t.find(s=>{var a;return((a=s.identify)==null?void 0:a.call(s,i))&&!s.format})}function vo(i,e,t){var m,_,b;if(Cs(i)&&(i=i.contents),Ve(i))return i;if(Ue(i)){const w=(_=(m=t.schema[Vi]).createNode)==null?void 0:_.call(m,t.schema,null,t);return w.items.push(i),w}(i instanceof String||i instanceof Number||i instanceof Boolean||typeof BigInt<"u"&&i instanceof BigInt)&&(i=i.valueOf());const{aliasDuplicateObjects:s,onAnchor:a,onTagObj:o,schema:c,sourceObjects:d}=t;let h;if(s&&i&&typeof i=="object"){if(h=d.get(i),h)return h.anchor??(h.anchor=a(i)),new Pc(h.anchor);h={anchor:null,node:null},d.set(i,h)}e!=null&&e.startsWith("!!")&&(e=M2+e.slice(2));let f=D2(i,e,c.tags);if(!f){if(i&&typeof i.toJSON=="function"&&(i=i.toJSON()),!i||typeof i!="object"){const w=new ge(i);return h&&(h.node=w),w}f=i instanceof Map?c[Vi]:Symbol.iterator in Object(i)?c[Pr]:c[Vi]}o&&(o(f),delete t.onTagObj);const y=f!=null&&f.createNode?f.createNode(t.schema,i,t):typeof((b=f==null?void 0:f.nodeClass)==null?void 0:b.from)=="function"?f.nodeClass.from(t.schema,i,t):new ge(i);return e?y.tag=e:f.default||(y.tag=f.tag),h&&(h.node=y),y}function kc(i,e,t){let s=t;for(let a=e.length-1;a>=0;--a){const o=e[a];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const c=[];c[o]=s,s=c}else s=new Map([[o,s]])}return vo(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:i,sourceObjects:new Map})}const so=i=>i==null||typeof i=="object"&&!!i[Symbol.iterator]().next().done;class Uv extends ng{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(s=>Ve(s)||Ue(s)?s.clone(e):s),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(so(e))this.add(t);else{const[s,...a]=e,o=this.get(s,!0);if(qe(o))o.addIn(a,t);else if(o===void 0&&this.schema)this.set(s,kc(this.schema,a,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${a}`)}}deleteIn(e){const[t,...s]=e;if(s.length===0)return this.delete(t);const a=this.get(t,!0);if(qe(a))return a.deleteIn(s);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){const[s,...a]=e,o=this.get(s,!0);return a.length===0?!t&&He(o)?o.value:o:qe(o)?o.getIn(a,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Ue(t))return!1;const s=t.value;return s==null||e&&He(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){const[t,...s]=e;if(s.length===0)return this.has(t);const a=this.get(t,!0);return qe(a)?a.hasIn(s):!1}setIn(e,t){const[s,...a]=e;if(a.length===0)this.set(s,t);else{const o=this.get(s,!0);if(qe(o))o.setIn(a,t);else if(o===void 0&&this.schema)this.set(s,kc(this.schema,a,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${a}`)}}}const L2=i=>i.replace(/^(?!$)(?: $)?/gm,"#");function li(i,e){return/^\n+$/.test(i)?i.substring(1):e?i.replace(/^(?! *$)/gm,e):i}const vs=(i,e,t)=>i.endsWith(`
|
|
673
673
|
`)?li(t,e):t.includes(`
|
|
674
674
|
`)?`
|
|
675
|
-
`+li(t,e):(i.endsWith(" ")?"":" ")+t,qv="flow",pf="block",fc="quoted";function Uc(i,e,t="flow",{indentAtStart:s,lineWidth:a=80,minContentWidth:o=20,onFold:c,onOverflow:d}={}){if(!a||a<0)return i;a<o&&(o=0);const h=Math.max(1+o,1+a-e.length);if(i.length<=h)return i;const f=[],y={};let m=a-e.length;typeof s=="number"&&(s>a-Math.max(2,o)?f.push(0):m=a-s);let _,b,
|
|
675
|
+
`+li(t,e):(i.endsWith(" ")?"":" ")+t,qv="flow",pf="block",fc="quoted";function Uc(i,e,t="flow",{indentAtStart:s,lineWidth:a=80,minContentWidth:o=20,onFold:c,onOverflow:d}={}){if(!a||a<0)return i;a<o&&(o=0);const h=Math.max(1+o,1+a-e.length);if(i.length<=h)return i;const f=[],y={};let m=a-e.length;typeof s=="number"&&(s>a-Math.max(2,o)?f.push(0):m=a-s);let _,b,w=!1,v=-1,T=-1,A=-1;t===pf&&(v=_b(i,v,e.length),v!==-1&&(m=v+h));for(let L;L=i[v+=1];){if(t===fc&&L==="\\"){switch(T=v,i[v+1]){case"x":v+=3;break;case"u":v+=5;break;case"U":v+=9;break;default:v+=1}A=v}if(L===`
|
|
676
676
|
`)t===pf&&(v=_b(i,v,e.length)),m=v+e.length+h,_=void 0;else{if(L===" "&&b&&b!==" "&&b!==`
|
|
677
677
|
`&&b!==" "){const j=i[v+1];j&&j!==" "&&j!==`
|
|
678
|
-
`&&j!==" "&&(_=v)}if(v>=m)if(_)f.push(_),m=_+h,_=void 0;else if(t===fc){for(;b===" "||b===" ";)b=L,L=i[v+=1],
|
|
678
|
+
`&&j!==" "&&(_=v)}if(v>=m)if(_)f.push(_),m=_+h,_=void 0;else if(t===fc){for(;b===" "||b===" ";)b=L,L=i[v+=1],w=!0;const j=v>A+1?v-2:T-1;if(y[j])return i;f.push(j),y[j]=!0,m=j+h,_=void 0}else w=!0}b=L}if(w&&d&&d(),f.length===0)return i;c&&c();let C=i.slice(0,f[0]);for(let L=0;L<f.length;++L){const j=f[L],D=f[L+1]||i.length;j===0?C=`
|
|
679
679
|
${e}${i.slice(0,D)}`:(t===fc&&y[j]&&(C+=`${i[j]}\\`),C+=`
|
|
680
680
|
${e}${i.slice(j+1,D)}`)}return C}function _b(i,e,t){let s=e,a=e+1,o=i[a];for(;o===" "||o===" ";)if(e<a+t)o=i[++e];else{do o=i[++e];while(o&&o!==`
|
|
681
|
-
`);s=e,a=e+1,o=i[a]}return s}const qc=(i,e)=>({indentAtStart:e?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),Vc=i=>/^(%|---|\.\.\.)/m.test(i);function
|
|
681
|
+
`);s=e,a=e+1,o=i[a]}return s}const qc=(i,e)=>({indentAtStart:e?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),Vc=i=>/^(%|---|\.\.\.)/m.test(i);function O2(i,e,t){if(!e||e<0)return!1;const s=e-t,a=i.length;if(a<=s)return!1;for(let o=0,c=0;o<a;++o)if(i[o]===`
|
|
682
682
|
`){if(o-c>s)return!0;if(c=o+1,a-c<=s)return!1}return!0}function po(i,e){const t=JSON.stringify(i);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:s}=e,a=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Vc(i)?" ":"");let c="",d=0;for(let h=0,f=t[h];f;f=t[++h])if(f===" "&&t[h+1]==="\\"&&t[h+2]==="n"&&(c+=t.slice(d,h)+"\\ ",h+=1,d=h,f="\\"),f==="\\")switch(t[h+1]){case"u":{c+=t.slice(d,h);const y=t.substr(h+2,4);switch(y){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:y.substr(0,2)==="00"?c+="\\x"+y.substr(2):c+=t.substr(h,6)}h+=5,d=h+1}break;case"n":if(s||t[h+2]==='"'||t.length<a)h+=1;else{for(c+=t.slice(d,h)+`
|
|
683
683
|
|
|
684
684
|
`;t[h+2]==="\\"&&t[h+3]==="n"&&t[h+4]!=='"';)c+=`
|
|
@@ -687,21 +687,21 @@ ${e}${i.slice(j+1,D)}`)}return C}function _b(i,e,t){let s=e,a=e+1,o=i[a];for(;o=
|
|
|
687
687
|
${t}`)+"'";return e.implicitKey?s:Uc(s,t,qv,qc(e,!1))}function Nr(i,e){const{singleQuote:t}=e.options;let s;if(t===!1)s=po;else{const a=i.includes('"'),o=i.includes("'");a&&!o?s=mf:o&&!a?s=po:s=t?mf:po}return s(i,e)}let yf;try{yf=new RegExp(`(^|(?<!
|
|
688
688
|
))
|
|
689
689
|
+(?!
|
|
690
|
-
|$)`,"g")}catch{yf=/\n+(?!\n|$)/g}function gc({comment:i,type:e,value:t},s,a,o){const{blockQuote:c,commentString:d,lineWidth:h}=s.options;if(!c||/\n[\t ]+$/.test(t))return Nr(t,s);const f=s.indent||(s.forceBlockIndent||Vc(t)?" ":""),y=c==="literal"?!0:c==="folded"||e===ge.BLOCK_FOLDED?!1:e===ge.BLOCK_LITERAL?!0:!
|
|
690
|
+
|$)`,"g")}catch{yf=/\n+(?!\n|$)/g}function gc({comment:i,type:e,value:t},s,a,o){const{blockQuote:c,commentString:d,lineWidth:h}=s.options;if(!c||/\n[\t ]+$/.test(t))return Nr(t,s);const f=s.indent||(s.forceBlockIndent||Vc(t)?" ":""),y=c==="literal"?!0:c==="folded"||e===ge.BLOCK_FOLDED?!1:e===ge.BLOCK_LITERAL?!0:!O2(t,h,f.length);if(!t)return y?`|
|
|
691
691
|
`:`>
|
|
692
692
|
`;let m,_;for(_=t.length;_>0;--_){const D=t[_-1];if(D!==`
|
|
693
|
-
`&&D!==" "&&D!==" ")break}let b=t.substring(_);const
|
|
694
|
-
`);
|
|
693
|
+
`&&D!==" "&&D!==" ")break}let b=t.substring(_);const w=b.indexOf(`
|
|
694
|
+
`);w===-1?m="-":t===b||w!==b.length-1?(m="+",o&&o()):m="",b&&(t=t.slice(0,-b.length),b[b.length-1]===`
|
|
695
695
|
`&&(b=b.slice(0,-1)),b=b.replace(yf,`$&${f}`));let v=!1,T,A=-1;for(T=0;T<t.length;++T){const D=t[T];if(D===" ")v=!0;else if(D===`
|
|
696
696
|
`)A=T;else break}let C=t.substring(0,A<T?A+1:T);C&&(t=t.substring(C.length),C=C.replace(/\n+/g,`$&${f}`));let j=(v?f?"2":"1":"")+m;if(i&&(j+=" "+d(i.replace(/ ?[\r\n]+/g," ")),a&&a()),!y){const D=t.replace(/\n+/g,`
|
|
697
697
|
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${f}`);let F=!1;const B=qc(s,!0);c!=="folded"&&e!==ge.BLOCK_FOLDED&&(B.onOverflow=()=>{F=!0});const q=Uc(`${C}${D}${b}`,f,pf,B);if(!F)return`>${j}
|
|
698
698
|
${f}${q}`}return t=t.replace(/\n+/g,`$&${f}`),`|${j}
|
|
699
|
-
${f}${C}${t}${b}`}function
|
|
699
|
+
${f}${C}${t}${b}`}function R2(i,e,t,s){const{type:a,value:o}=i,{actualString:c,implicitKey:d,indent:h,indentStep:f,inFlow:y}=e;if(d&&o.includes(`
|
|
700
700
|
`)||y&&/[[\]{},]/.test(o))return Nr(o,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return d||y||!o.includes(`
|
|
701
701
|
`)?Nr(o,e):gc(i,e,t,s);if(!d&&!y&&a!==ge.PLAIN&&o.includes(`
|
|
702
702
|
`))return gc(i,e,t,s);if(Vc(o)){if(h==="")return e.forceBlockIndent=!0,gc(i,e,t,s);if(d&&h===f)return Nr(o,e)}const m=o.replace(/\n+/g,`$&
|
|
703
|
-
${h}`);if(c){const _=v=>{var T;return v.default&&v.tag!=="tag:yaml.org,2002:str"&&((T=v.test)==null?void 0:T.test(m))},{compat:b,tags:
|
|
704
|
-
${e.indent}${d}`:d}function
|
|
703
|
+
${h}`);if(c){const _=v=>{var T;return v.default&&v.tag!=="tag:yaml.org,2002:str"&&((T=v.test)==null?void 0:T.test(m))},{compat:b,tags:w}=e.doc.schema;if(w.some(_)||b!=null&&b.some(_))return Nr(o,e)}return d?m:Uc(m,h,qv,qc(e,!1))}function Eo(i,e,t,s){const{implicitKey:a,inFlow:o}=e,c=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)});let{type:d}=i;d!==ge.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(d=ge.QUOTE_DOUBLE);const h=y=>{switch(y){case ge.BLOCK_FOLDED:case ge.BLOCK_LITERAL:return a||o?Nr(c.value,e):gc(c,e,t,s);case ge.QUOTE_DOUBLE:return po(c.value,e);case ge.QUOTE_SINGLE:return mf(c.value,e);case ge.PLAIN:return R2(c,e,t,s);default:return null}};let f=h(d);if(f===null){const{defaultKeyType:y,defaultStringType:m}=e.options,_=a&&y||m;if(f=h(_),f===null)throw new Error(`Unsupported default string type ${_}`)}return f}function Vv(i,e){const t=Object.assign({blockQuote:!0,commentString:L2,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,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},i.schema.toStringOptions,e);let s;switch(t.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:i,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:s,options:t}}function j2(i,e){var a;if(e.tag){const o=i.filter(c=>c.tag===e.tag);if(o.length>0)return o.find(c=>c.format===e.format)??o[0]}let t,s;if(He(e)){s=e.value;let o=i.filter(c=>{var d;return(d=c.identify)==null?void 0:d.call(c,s)});if(o.length>1){const c=o.filter(d=>d.test);c.length>0&&(o=c)}t=o.find(c=>c.format===e.format)??o.find(c=>!c.format)}else s=e,t=i.find(o=>o.nodeClass&&s instanceof o.nodeClass);if(!t){const o=((a=s==null?void 0:s.constructor)==null?void 0:a.name)??(s===null?"null":typeof s);throw new Error(`Tag not resolved for ${o} value`)}return t}function H2(i,e,{anchors:t,doc:s}){if(!s.directives)return"";const a=[],o=(He(i)||qe(i))&&i.anchor;o&&$v(o)&&(t.add(o),a.push(`&${o}`));const c=i.tag??(e.default?null:e.tag);return c&&a.push(s.directives.tagString(c)),a.join(" ")}function jr(i,e,t,s){var h;if(Ue(i))return i.toString(e,t,s);if(Xi(i)){if(e.doc.directives)return i.toString(e);if((h=e.resolvedAliases)!=null&&h.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(i):e.resolvedAliases=new Set([i]),i=i.resolve(e.doc)}let a;const o=Ve(i)?i:e.doc.createNode(i,{onTagObj:f=>a=f});a??(a=j2(e.doc.schema.tags,o));const c=H2(o,a,e);c.length>0&&(e.indentAtStart=(e.indentAtStart??0)+c.length+1);const d=typeof a.stringify=="function"?a.stringify(o,e,t,s):He(o)?Eo(o,e,t,s):o.toString(e,t,s);return c?He(o)||d[0]==="{"||d[0]==="["?`${c} ${d}`:`${c}
|
|
704
|
+
${e.indent}${d}`:d}function z2({key:i,value:e},t,s,a){const{allNullValues:o,doc:c,indent:d,indentStep:h,options:{commentString:f,indentSeq:y,simpleKeys:m}}=t;let _=Ve(i)&&i.comment||null;if(m){if(_)throw new Error("With simple keys, key nodes cannot have comments");if(qe(i)||!Ve(i)&&typeof i=="object"){const B="With simple keys, collection cannot be used as a key value";throw new Error(B)}}let b=!m&&(!i||_&&e==null&&!t.inFlow||qe(i)||(He(i)?i.type===ge.BLOCK_FOLDED||i.type===ge.BLOCK_LITERAL:typeof i=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!b&&(m||!o),indent:d+h});let w=!1,v=!1,T=jr(i,t,()=>w=!0,()=>v=!0);if(!b&&!t.inFlow&&T.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");b=!0}if(t.inFlow){if(o||e==null)return w&&s&&s(),T===""?"?":b?`? ${T}`:T}else if(o&&!m||e==null&&b)return T=`? ${T}`,_&&!w?T+=vs(T,t.indent,f(_)):v&&a&&a(),T;w&&(_=null),b?(_&&(T+=vs(T,t.indent,f(_))),T=`? ${T}
|
|
705
705
|
${d}:`):(T=`${T}:`,_&&(T+=vs(T,t.indent,f(_))));let A,C,L;Ve(e)?(A=!!e.spaceBefore,C=e.commentBefore,L=e.comment):(A=!1,C=null,L=null,e&&typeof e=="object"&&(e=c.createNode(e))),t.implicitKey=!1,!b&&!_&&He(e)&&(t.indentAtStart=T.length+1),v=!1,!y&&h.length>=2&&!t.inFlow&&!b&&qr(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let j=!1;const D=jr(e,t,()=>j=!0,()=>v=!0);let F=" ";if(_||A||C){if(F=A?`
|
|
706
706
|
`:"",C){const B=f(C);F+=`
|
|
707
707
|
${li(B,t.indent)}`}D===""&&!t.inFlow?F===`
|
|
@@ -711,32 +711,32 @@ ${li(B,t.indent)}`}D===""&&!t.inFlow?F===`
|
|
|
711
711
|
${t.indent}`}else if(!b&&qe(e)){const B=D[0],q=D.indexOf(`
|
|
712
712
|
`),O=q!==-1,Q=t.inFlow??e.flow??e.items.length===0;if(O||!Q){let se=!1;if(O&&(B==="&"||B==="!")){let Y=D.indexOf(" ");B==="&"&&Y!==-1&&Y<q&&D[Y+1]==="!"&&(Y=D.indexOf(" ",Y+1)),(Y===-1||q<Y)&&(se=!0)}se||(F=`
|
|
713
713
|
${t.indent}`)}}else(D===""||D[0]===`
|
|
714
|
-
`)&&(F="");return T+=F+D,t.inFlow?j&&s&&s():L&&!j?T+=vs(T,t.indent,f(L)):v&&a&&a(),T}function Fv(i,e){(i==="debug"||i==="warn")&&console.warn(e)}const Wl="<<",ci={identify:i=>i===Wl||typeof i=="symbol"&&i.description===Wl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ge(Symbol(Wl)),{addToJSMap:Gv}),stringify:()=>Wl}
|
|
714
|
+
`)&&(F="");return T+=F+D,t.inFlow?j&&s&&s():L&&!j?T+=vs(T,t.indent,f(L)):v&&a&&a(),T}function Fv(i,e){(i==="debug"||i==="warn")&&console.warn(e)}const Wl="<<",ci={identify:i=>i===Wl||typeof i=="symbol"&&i.description===Wl,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ge(Symbol(Wl)),{addToJSMap:Gv}),stringify:()=>Wl},$2=(i,e)=>(ci.identify(e)||He(e)&&(!e.type||e.type===ge.PLAIN)&&ci.identify(e.value))&&(i==null?void 0:i.doc.schema.tags.some(t=>t.tag===ci.tag&&t.default));function Gv(i,e,t){if(t=i&&Xi(t)?t.resolve(i.doc):t,qr(t))for(const s of t.items)Ph(i,e,s);else if(Array.isArray(t))for(const s of t)Ph(i,e,s);else Ph(i,e,t)}function Ph(i,e,t){const s=i&&Xi(t)?t.resolve(i.doc):t;if(!Ur(s))throw new Error("Merge sources must be maps or map aliases");const a=s.toJSON(null,i,Map);for(const[o,c]of a)e instanceof Map?e.has(o)||e.set(o,c):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:c,writable:!0,enumerable:!0,configurable:!0});return e}function Xv(i,e,{key:t,value:s}){if(Ve(t)&&t.addToJSMap)t.addToJSMap(i,e,s);else if($2(i,t))Gv(i,e,s);else{const a=gn(t,"",i);if(e instanceof Map)e.set(a,gn(s,a,i));else if(e instanceof Set)e.add(a);else{const o=B2(t,a,i),c=gn(s,o,i);o in e?Object.defineProperty(e,o,{value:c,writable:!0,enumerable:!0,configurable:!0}):e[o]=c}}return e}function B2(i,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(Ve(i)&&(t!=null&&t.doc)){const s=Vv(t.doc,{});s.anchors=new Set;for(const o of t.anchors.keys())s.anchors.add(o.anchor);s.inFlow=!0,s.inStringifyKey=!0;const a=i.toString(s);if(!t.mapKeyWarned){let o=JSON.stringify(a);o.length>40&&(o=o.substring(0,36)+'..."'),Fv(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return a}return JSON.stringify(e)}function ig(i,e,t){const s=vo(i,void 0,t),a=vo(e,void 0,t);return new wt(s,a)}class wt{constructor(e,t=null){Object.defineProperty(this,pn,{value:Lv}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;return Ve(t)&&(t=t.clone(e)),Ve(s)&&(s=s.clone(e)),new wt(t,s)}toJSON(e,t){const s=t!=null&&t.mapAsMap?new Map:{};return Xv(t,s,this)}toString(e,t,s){return e!=null&&e.doc?z2(this,e,t,s):JSON.stringify(this)}}function Yv(i,e,t){return(e.inFlow??i.flow?P2:I2)(i,e,t)}function I2({comment:i,items:e},t,{blockItemPrefix:s,flowChars:a,itemIndent:o,onChompKeep:c,onComment:d}){const{indent:h,options:{commentString:f}}=t,y=Object.assign({},t,{indent:o,type:null});let m=!1;const _=[];for(let w=0;w<e.length;++w){const v=e[w];let T=null;if(Ve(v))!m&&v.spaceBefore&&_.push(""),Nc(t,_,v.commentBefore,m),v.comment&&(T=v.comment);else if(Ue(v)){const C=Ve(v.key)?v.key:null;C&&(!m&&C.spaceBefore&&_.push(""),Nc(t,_,C.commentBefore,m))}m=!1;let A=jr(v,y,()=>T=null,()=>m=!0);T&&(A+=vs(A,o,f(T))),m&&T&&(m=!1),_.push(s+A)}let b;if(_.length===0)b=a.start+a.end;else{b=_[0];for(let w=1;w<_.length;++w){const v=_[w];b+=v?`
|
|
715
715
|
${h}${v}`:`
|
|
716
716
|
`}}return i?(b+=`
|
|
717
|
-
`+li(f(i),h),d&&d()):m&&c&&c(),b}function
|
|
718
|
-
`)),
|
|
717
|
+
`+li(f(i),h),d&&d()):m&&c&&c(),b}function P2({items:i},e,{flowChars:t,itemIndent:s}){const{indent:a,indentStep:o,flowCollectionPadding:c,options:{commentString:d}}=e;s+=o;const h=Object.assign({},e,{indent:s,inFlow:!0,type:null});let f=!1,y=0;const m=[];for(let w=0;w<i.length;++w){const v=i[w];let T=null;if(Ve(v))v.spaceBefore&&m.push(""),Nc(e,m,v.commentBefore,!1),v.comment&&(T=v.comment);else if(Ue(v)){const C=Ve(v.key)?v.key:null;C&&(C.spaceBefore&&m.push(""),Nc(e,m,C.commentBefore,!1),C.comment&&(f=!0));const L=Ve(v.value)?v.value:null;L?(L.comment&&(T=L.comment),L.commentBefore&&(f=!0)):v.value==null&&(C!=null&&C.comment)&&(T=C.comment)}T&&(f=!0);let A=jr(v,h,()=>T=null);f||(f=m.length>y||A.includes(`
|
|
718
|
+
`)),w<i.length-1?A+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(f||(f=m.reduce((C,L)=>C+L.length+2,2)+(A.length+2)>e.options.lineWidth)),f&&(A+=",")),T&&(A+=vs(A,s,d(T))),m.push(A),y=m.length}const{start:_,end:b}=t;if(m.length===0)return _+b;if(!f){const w=m.reduce((v,T)=>v+T.length+2,2);f=e.options.lineWidth>0&&w>e.options.lineWidth}if(f){let w=_;for(const v of m)w+=v?`
|
|
719
719
|
${o}${a}${v}`:`
|
|
720
|
-
`;return`${
|
|
721
|
-
${a}${b}`}else return`${_}${c}${m.join(" ")}${c}${b}`}function Nc({indent:i,options:{commentString:e}},t,s,a){if(s&&a&&(s=s.replace(/^\n+/,"")),s){const o=li(e(s),i);t.push(o.trimStart())}}function Ss(i,e){const t=He(e)?e.value:e;for(const s of i)if(Ue(s)&&(s.key===e||s.key===t||He(s.key)&&s.key.value===t))return s}class Wt extends Uv{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Vi,e),this.items=[]}static from(e,t,s){const{keepUndefined:a,replacer:o}=s,c=new this(e),d=(h,f)=>{if(typeof o=="function")f=o.call(t,h,f);else if(Array.isArray(o)&&!o.includes(h))return;(f!==void 0||a)&&c.items.push(ig(h,f,s))};if(t instanceof Map)for(const[h,f]of t)d(h,f);else if(t&&typeof t=="object")for(const h of Object.keys(t))d(h,t[h]);return typeof e.sortMapEntries=="function"&&c.items.sort(e.sortMapEntries),c}add(e,t){var c;let s;Ue(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new wt(e,e==null?void 0:e.value):s=new wt(e.key,e.value);const a=Ss(this.items,s.key),o=(c=this.schema)==null?void 0:c.sortMapEntries;if(a){if(!t)throw new Error(`Key ${s.key} already set`);He(a.value)&&Pv(s.value)?a.value.value=s.value:a.value=s.value}else if(o){const d=this.items.findIndex(h=>o(s,h)<0);d===-1?this.items.push(s):this.items.splice(d,0,s)}else this.items.push(s)}delete(e){const t=Ss(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const s=Ss(this.items,e),a=s==null?void 0:s.value;return(!t&&He(a)?a.value:a)??void 0}has(e){return!!Ss(this.items,e)}set(e,t){this.add(new wt(e,t),!0)}toJSON(e,t,s){const a=s?new s:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(a);for(const o of this.items)Xv(t,a,o);return a}toString(e,t,s){if(!e)return JSON.stringify(this);for(const a of this.items)if(!Ue(a))throw new Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Yv(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}const Vr={collection:"map",default:!0,nodeClass:Wt,tag:"tag:yaml.org,2002:map",resolve(i,e){return Ur(i)||e("Expected a mapping for this tag"),i},createNode:(i,e,t)=>Wt.from(i,e,t)};class Fi extends Uv{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Pr,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Zl(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const s=Zl(e);if(typeof s!="number")return;const a=this.items[s];return!t&&He(a)?a.value:a}has(e){const t=Zl(e);return typeof t=="number"&&t<this.items.length}set(e,t){const s=Zl(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);const a=this.items[s];He(a)&&Pv(t)?a.value=t:this.items[s]=t}toJSON(e,t){const s=[];t!=null&&t.onCreate&&t.onCreate(s);let a=0;for(const o of this.items)s.push(gn(o,String(a++),t));return s}toString(e,t,s){return e?Yv(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t}):JSON.stringify(this)}static from(e,t,s){const{replacer:a}=s,o=new this(e);if(t&&Symbol.iterator in Object(t)){let c=0;for(let d of t){if(typeof a=="function"){const h=t instanceof Set?d:String(c++);d=a.call(t,h,d)}o.items.push(vo(d,void 0,s))}}return o}}function Zl(i){let e=He(i)?i.value:i;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Fr={collection:"seq",default:!0,nodeClass:Fi,tag:"tag:yaml.org,2002:seq",resolve(i,e){return qr(i)||e("Expected a sequence for this tag"),i},createNode:(i,e,t)=>Fi.from(i,e,t)},Fc={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,e,t,s){return e=Object.assign({actualString:!0},e),Eo(i,e,t,s)}},Gc={identify:i=>i==null,createNode:()=>new ge(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ge(null),stringify:({source:i},e)=>typeof i=="string"&&Gc.test.test(i)?i:e.options.nullStr},sg={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new ge(i[0]==="t"||i[0]==="T"),stringify({source:i,value:e},t){if(i&&sg.test.test(i)){const s=i[0]==="t"||i[0]==="T";if(e===s)return i}return e?t.options.trueStr:t.options.falseStr}};function Tn({format:i,minFractionDigits:e,tag:t,value:s}){if(typeof s=="bigint")return String(s);const a=typeof s=="number"?s:Number(s);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let o=Object.is(s,-0)?"-0":JSON.stringify(s);if(!i&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let c=o.indexOf(".");c<0&&(c=o.length,o+=".");let d=e-(o.length-c-1);for(;d-- >0;)o+="0"}return o}const Kv={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Tn},Jv={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i),stringify(i){const e=Number(i.value);return isFinite(e)?e.toExponential():Tn(i)}},Wv={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(i){const e=new ge(parseFloat(i)),t=i.indexOf(".");return t!==-1&&i[i.length-1]==="0"&&(e.minFractionDigits=i.length-t-1),e},stringify:Tn},Xc=i=>typeof i=="bigint"||Number.isInteger(i),rg=(i,e,t,{intAsBigInt:s})=>s?BigInt(i):parseInt(i.substring(e),t);function Zv(i,e,t){const{value:s}=i;return Xc(s)&&s>=0?t+s.toString(e):Tn(i)}const Qv={identify:i=>Xc(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(i,e,t)=>rg(i,2,8,t),stringify:i=>Zv(i,8,"0o")},eS={identify:Xc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(i,e,t)=>rg(i,0,10,t),stringify:Tn},tS={identify:i=>Xc(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(i,e,t)=>rg(i,2,16,t),stringify:i=>Zv(i,16,"0x")},
|
|
720
|
+
`;return`${w}
|
|
721
|
+
${a}${b}`}else return`${_}${c}${m.join(" ")}${c}${b}`}function Nc({indent:i,options:{commentString:e}},t,s,a){if(s&&a&&(s=s.replace(/^\n+/,"")),s){const o=li(e(s),i);t.push(o.trimStart())}}function Ss(i,e){const t=He(e)?e.value:e;for(const s of i)if(Ue(s)&&(s.key===e||s.key===t||He(s.key)&&s.key.value===t))return s}class Wt extends Uv{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Vi,e),this.items=[]}static from(e,t,s){const{keepUndefined:a,replacer:o}=s,c=new this(e),d=(h,f)=>{if(typeof o=="function")f=o.call(t,h,f);else if(Array.isArray(o)&&!o.includes(h))return;(f!==void 0||a)&&c.items.push(ig(h,f,s))};if(t instanceof Map)for(const[h,f]of t)d(h,f);else if(t&&typeof t=="object")for(const h of Object.keys(t))d(h,t[h]);return typeof e.sortMapEntries=="function"&&c.items.sort(e.sortMapEntries),c}add(e,t){var c;let s;Ue(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new wt(e,e==null?void 0:e.value):s=new wt(e.key,e.value);const a=Ss(this.items,s.key),o=(c=this.schema)==null?void 0:c.sortMapEntries;if(a){if(!t)throw new Error(`Key ${s.key} already set`);He(a.value)&&Pv(s.value)?a.value.value=s.value:a.value=s.value}else if(o){const d=this.items.findIndex(h=>o(s,h)<0);d===-1?this.items.push(s):this.items.splice(d,0,s)}else this.items.push(s)}delete(e){const t=Ss(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const s=Ss(this.items,e),a=s==null?void 0:s.value;return(!t&&He(a)?a.value:a)??void 0}has(e){return!!Ss(this.items,e)}set(e,t){this.add(new wt(e,t),!0)}toJSON(e,t,s){const a=s?new s:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(a);for(const o of this.items)Xv(t,a,o);return a}toString(e,t,s){if(!e)return JSON.stringify(this);for(const a of this.items)if(!Ue(a))throw new Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Yv(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}const Vr={collection:"map",default:!0,nodeClass:Wt,tag:"tag:yaml.org,2002:map",resolve(i,e){return Ur(i)||e("Expected a mapping for this tag"),i},createNode:(i,e,t)=>Wt.from(i,e,t)};class Fi extends Uv{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Pr,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Zl(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const s=Zl(e);if(typeof s!="number")return;const a=this.items[s];return!t&&He(a)?a.value:a}has(e){const t=Zl(e);return typeof t=="number"&&t<this.items.length}set(e,t){const s=Zl(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);const a=this.items[s];He(a)&&Pv(t)?a.value=t:this.items[s]=t}toJSON(e,t){const s=[];t!=null&&t.onCreate&&t.onCreate(s);let a=0;for(const o of this.items)s.push(gn(o,String(a++),t));return s}toString(e,t,s){return e?Yv(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t}):JSON.stringify(this)}static from(e,t,s){const{replacer:a}=s,o=new this(e);if(t&&Symbol.iterator in Object(t)){let c=0;for(let d of t){if(typeof a=="function"){const h=t instanceof Set?d:String(c++);d=a.call(t,h,d)}o.items.push(vo(d,void 0,s))}}return o}}function Zl(i){let e=He(i)?i.value:i;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Fr={collection:"seq",default:!0,nodeClass:Fi,tag:"tag:yaml.org,2002:seq",resolve(i,e){return qr(i)||e("Expected a sequence for this tag"),i},createNode:(i,e,t)=>Fi.from(i,e,t)},Fc={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,e,t,s){return e=Object.assign({actualString:!0},e),Eo(i,e,t,s)}},Gc={identify:i=>i==null,createNode:()=>new ge(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ge(null),stringify:({source:i},e)=>typeof i=="string"&&Gc.test.test(i)?i:e.options.nullStr},sg={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new ge(i[0]==="t"||i[0]==="T"),stringify({source:i,value:e},t){if(i&&sg.test.test(i)){const s=i[0]==="t"||i[0]==="T";if(e===s)return i}return e?t.options.trueStr:t.options.falseStr}};function Tn({format:i,minFractionDigits:e,tag:t,value:s}){if(typeof s=="bigint")return String(s);const a=typeof s=="number"?s:Number(s);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let o=Object.is(s,-0)?"-0":JSON.stringify(s);if(!i&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let c=o.indexOf(".");c<0&&(c=o.length,o+=".");let d=e-(o.length-c-1);for(;d-- >0;)o+="0"}return o}const Kv={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Tn},Jv={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i),stringify(i){const e=Number(i.value);return isFinite(e)?e.toExponential():Tn(i)}},Wv={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(i){const e=new ge(parseFloat(i)),t=i.indexOf(".");return t!==-1&&i[i.length-1]==="0"&&(e.minFractionDigits=i.length-t-1),e},stringify:Tn},Xc=i=>typeof i=="bigint"||Number.isInteger(i),rg=(i,e,t,{intAsBigInt:s})=>s?BigInt(i):parseInt(i.substring(e),t);function Zv(i,e,t){const{value:s}=i;return Xc(s)&&s>=0?t+s.toString(e):Tn(i)}const Qv={identify:i=>Xc(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(i,e,t)=>rg(i,2,8,t),stringify:i=>Zv(i,8,"0o")},eS={identify:Xc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(i,e,t)=>rg(i,0,10,t),stringify:Tn},tS={identify:i=>Xc(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(i,e,t)=>rg(i,2,16,t),stringify:i=>Zv(i,16,"0x")},U2=[Vr,Fr,Fc,Gc,sg,Qv,eS,tS,Kv,Jv,Wv];function bb(i){return typeof i=="bigint"||Number.isInteger(i)}const Ql=({value:i})=>JSON.stringify(i),q2=[{identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify:Ql},{identify:i=>i==null,createNode:()=>new ge(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Ql},{identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:i=>i==="true",stringify:Ql},{identify:bb,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(i,e,{intAsBigInt:t})=>t?BigInt(i):parseInt(i,10),stringify:({value:i})=>bb(i)?i.toString():JSON.stringify(i)},{identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:i=>parseFloat(i),stringify:Ql}],V2={default:!0,tag:"",test:/^/,resolve(i,e){return e(`Unresolved plain scalar ${JSON.stringify(i)}`),i}},F2=[Vr,Fr].concat(q2,V2),ag={identify:i=>i instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(i,e){if(typeof atob=="function"){const t=atob(i.replace(/[\n\r]/g,"")),s=new Uint8Array(t.length);for(let a=0;a<t.length;++a)s[a]=t.charCodeAt(a);return s}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),i},stringify({comment:i,type:e,value:t},s,a,o){if(!t)return"";const c=t;let d;if(typeof btoa=="function"){let h="";for(let f=0;f<c.length;++f)h+=String.fromCharCode(c[f]);d=btoa(h)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=ge.BLOCK_LITERAL),e!==ge.QUOTE_DOUBLE){const h=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),f=Math.ceil(d.length/h),y=new Array(f);for(let m=0,_=0;m<f;++m,_+=h)y[m]=d.substr(_,h);d=y.join(e===ge.BLOCK_LITERAL?`
|
|
722
722
|
`:" ")}return Eo({comment:i,type:e,value:d},s,a,o)}};function nS(i,e){if(qr(i))for(let t=0;t<i.items.length;++t){let s=i.items[t];if(!Ue(s)){if(Ur(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");const a=s.items[0]||new wt(new ge(null));if(s.commentBefore&&(a.key.commentBefore=a.key.commentBefore?`${s.commentBefore}
|
|
723
723
|
${a.key.commentBefore}`:s.commentBefore),s.comment){const o=a.value??a.key;o.comment=o.comment?`${s.comment}
|
|
724
|
-
${o.comment}`:s.comment}s=a}i.items[t]=Ue(s)?s:new wt(s)}}else e("Expected a sequence for this tag");return i}function iS(i,e,t){const{replacer:s}=t,a=new Fi(i);a.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let c of e){typeof s=="function"&&(c=s.call(e,String(o++),c));let d,h;if(Array.isArray(c))if(c.length===2)d=c[0],h=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const f=Object.keys(c);if(f.length===1)d=f[0],h=c[d];else throw new TypeError(`Expected tuple with one key, not ${f.length} keys`)}else d=c;a.items.push(ig(d,h,t))}return a}const og={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:nS,createNode:iS};class Dr extends Fi{constructor(){super(),this.add=Wt.prototype.add.bind(this),this.delete=Wt.prototype.delete.bind(this),this.get=Wt.prototype.get.bind(this),this.has=Wt.prototype.has.bind(this),this.set=Wt.prototype.set.bind(this),this.tag=Dr.tag}toJSON(e,t){if(!t)return super.toJSON(e);const s=new Map;t!=null&&t.onCreate&&t.onCreate(s);for(const a of this.items){let o,c;if(Ue(a)?(o=gn(a.key,"",t),c=gn(a.value,o,t)):o=gn(a,"",t),s.has(o))throw new Error("Ordered maps must not include duplicate keys");s.set(o,c)}return s}static from(e,t,s){const a=iS(e,t,s),o=new this;return o.items=a.items,o}}Dr.tag="tag:yaml.org,2002:omap";const lg={collection:"seq",identify:i=>i instanceof Map,nodeClass:Dr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,e){const t=nS(i,e),s=[];for(const{key:a}of t.items)He(a)&&(s.includes(a.value)?e(`Ordered maps must not include duplicate keys: ${a.value}`):s.push(a.value));return Object.assign(new Dr,t)},createNode:(i,e,t)=>Dr.from(i,e,t)};function sS({value:i,source:e},t){return e&&(i?rS:aS).test.test(e)?e:i?t.options.trueStr:t.options.falseStr}const rS={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ge(!0),stringify:sS},aS={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ge(!1),stringify:sS},
|
|
724
|
+
${o.comment}`:s.comment}s=a}i.items[t]=Ue(s)?s:new wt(s)}}else e("Expected a sequence for this tag");return i}function iS(i,e,t){const{replacer:s}=t,a=new Fi(i);a.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let c of e){typeof s=="function"&&(c=s.call(e,String(o++),c));let d,h;if(Array.isArray(c))if(c.length===2)d=c[0],h=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const f=Object.keys(c);if(f.length===1)d=f[0],h=c[d];else throw new TypeError(`Expected tuple with one key, not ${f.length} keys`)}else d=c;a.items.push(ig(d,h,t))}return a}const og={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:nS,createNode:iS};class Dr extends Fi{constructor(){super(),this.add=Wt.prototype.add.bind(this),this.delete=Wt.prototype.delete.bind(this),this.get=Wt.prototype.get.bind(this),this.has=Wt.prototype.has.bind(this),this.set=Wt.prototype.set.bind(this),this.tag=Dr.tag}toJSON(e,t){if(!t)return super.toJSON(e);const s=new Map;t!=null&&t.onCreate&&t.onCreate(s);for(const a of this.items){let o,c;if(Ue(a)?(o=gn(a.key,"",t),c=gn(a.value,o,t)):o=gn(a,"",t),s.has(o))throw new Error("Ordered maps must not include duplicate keys");s.set(o,c)}return s}static from(e,t,s){const a=iS(e,t,s),o=new this;return o.items=a.items,o}}Dr.tag="tag:yaml.org,2002:omap";const lg={collection:"seq",identify:i=>i instanceof Map,nodeClass:Dr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,e){const t=nS(i,e),s=[];for(const{key:a}of t.items)He(a)&&(s.includes(a.value)?e(`Ordered maps must not include duplicate keys: ${a.value}`):s.push(a.value));return Object.assign(new Dr,t)},createNode:(i,e,t)=>Dr.from(i,e,t)};function sS({value:i,source:e},t){return e&&(i?rS:aS).test.test(e)?e:i?t.options.trueStr:t.options.falseStr}const rS={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ge(!0),stringify:sS},aS={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ge(!1),stringify:sS},G2={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Tn},X2={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){const e=Number(i.value);return isFinite(e)?e.toExponential():Tn(i)}},Y2={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){const e=new ge(parseFloat(i.replace(/_/g,""))),t=i.indexOf(".");if(t!==-1){const s=i.substring(t+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:Tn},Ao=i=>typeof i=="bigint"||Number.isInteger(i);function Yc(i,e,t,{intAsBigInt:s}){const a=i[0];if((a==="-"||a==="+")&&(e+=1),i=i.substring(e).replace(/_/g,""),s){switch(t){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}const c=BigInt(i);return a==="-"?BigInt(-1)*c:c}const o=parseInt(i,t);return a==="-"?-1*o:o}function cg(i,e,t){const{value:s}=i;if(Ao(s)){const a=s.toString(e);return s<0?"-"+t+a.substr(1):t+a}return Tn(i)}const K2={identify:Ao,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,e,t)=>Yc(i,2,2,t),stringify:i=>cg(i,2,"0b")},J2={identify:Ao,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,e,t)=>Yc(i,1,8,t),stringify:i=>cg(i,8,"0")},W2={identify:Ao,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,e,t)=>Yc(i,0,10,t),stringify:Tn},Z2={identify:Ao,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,e,t)=>Yc(i,2,16,t),stringify:i=>cg(i,16,"0x")};class Lr extends Wt{constructor(e){super(e),this.tag=Lr.tag}add(e){let t;Ue(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new wt(e.key,null):t=new wt(e,null),Ss(this.items,t.key)||this.items.push(t)}get(e,t){const s=Ss(this.items,e);return!t&&Ue(s)?He(s.key)?s.key.value:s.key:s}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const s=Ss(this.items,e);s&&!t?this.items.splice(this.items.indexOf(s),1):!s&&t&&this.items.push(new wt(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);throw new Error("Set items must all have null values")}static from(e,t,s){const{replacer:a}=s,o=new this(e);if(t&&Symbol.iterator in Object(t))for(let c of t)typeof a=="function"&&(c=a.call(t,c,c)),o.items.push(ig(c,null,s));return o}}Lr.tag="tag:yaml.org,2002:set";const ug={collection:"map",identify:i=>i instanceof Set,nodeClass:Lr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(i,e,t)=>Lr.from(i,e,t),resolve(i,e){if(Ur(i)){if(i.hasAllNullValues(!0))return Object.assign(new Lr,i);e("Set items must all have null values")}else e("Expected a mapping for this tag");return i}};function dg(i,e){const t=i[0],s=t==="-"||t==="+"?i.substring(1):i,a=c=>e?BigInt(c):Number(c),o=s.replace(/_/g,"").split(":").reduce((c,d)=>c*a(60)+a(d),a(0));return t==="-"?a(-1)*o:o}function oS(i){let{value:e}=i,t=c=>c;if(typeof e=="bigint")t=c=>BigInt(c);else if(isNaN(e)||!isFinite(e))return Tn(i);let s="";e<0&&(s="-",e*=t(-1));const a=t(60),o=[e%a];return e<60?o.unshift(0):(e=(e-o[0])/a,o.unshift(e%a),e>=60&&(e=(e-o[0])/a,o.unshift(e))),s+o.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const lS={identify:i=>typeof i=="bigint"||Number.isInteger(i),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(i,e,{intAsBigInt:t})=>dg(i,t),stringify:oS},cS={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:i=>dg(i,!1),stringify:oS},Kc={identify:i=>i 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(i){const e=i.match(Kc.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,s,a,o,c,d]=e.map(Number),h=e[7]?Number((e[7]+"00").substr(1,3)):0;let f=Date.UTC(t,s-1,a,o||0,c||0,d||0,h);const y=e[8];if(y&&y!=="Z"){let m=dg(y,!1);Math.abs(m)<30&&(m*=60),f-=6e4*m}return new Date(f)},stringify:({value:i})=>(i==null?void 0:i.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},vb=[Vr,Fr,Fc,Gc,rS,aS,K2,J2,W2,Z2,G2,X2,Y2,ag,ci,lg,og,ug,lS,cS,Kc],Sb=new Map([["core",U2],["failsafe",[Vr,Fr,Fc]],["json",F2],["yaml11",vb],["yaml-1.1",vb]]),wb={binary:ag,bool:sg,float:Wv,floatExp:Jv,floatNaN:Kv,floatTime:cS,int:eS,intHex:tS,intOct:Qv,intTime:lS,map:Vr,merge:ci,null:Gc,omap:lg,pairs:og,seq:Fr,set:ug,timestamp:Kc},Q2={"tag:yaml.org,2002:binary":ag,"tag:yaml.org,2002:merge":ci,"tag:yaml.org,2002:omap":lg,"tag:yaml.org,2002:pairs":og,"tag:yaml.org,2002:set":ug,"tag:yaml.org,2002:timestamp":Kc};function Uh(i,e,t){const s=Sb.get(e);if(s&&!i)return t&&!s.includes(ci)?s.concat(ci):s.slice();let a=s;if(!a)if(Array.isArray(i))a=[];else{const o=Array.from(Sb.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(i))for(const o of i)a=a.concat(o);else typeof i=="function"&&(a=i(a.slice()));return t&&(a=a.concat(ci)),a.reduce((o,c)=>{const d=typeof c=="string"?wb[c]:c;if(!d){const h=JSON.stringify(c),f=Object.keys(wb).map(y=>JSON.stringify(y)).join(", ");throw new Error(`Unknown custom tag ${h}; use one of ${f}`)}return o.includes(d)||o.push(d),o},[])}const ek=(i,e)=>i.key<e.key?-1:i.key>e.key?1:0;class Jc{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:a,schema:o,sortMapEntries:c,toStringDefaults:d}){this.compat=Array.isArray(e)?Uh(e,"compat"):e?Uh(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=a?Q2:{},this.tags=Uh(t,this.name,s),this.toStringOptions=d??null,Object.defineProperty(this,Vi,{value:Vr}),Object.defineProperty(this,Hn,{value:Fc}),Object.defineProperty(this,Pr,{value:Fr}),this.sortMapEntries=typeof c=="function"?c:c===!0?ek:null}clone(){const e=Object.create(Jc.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function tk(i,e){var h;const t=[];let s=e.directives===!0;if(e.directives!==!1&&i.directives){const f=i.directives.toString(i);f?(t.push(f),s=!0):i.directives.docStart&&(s=!0)}s&&t.push("---");const a=Vv(i,e),{commentString:o}=a.options;if(i.commentBefore){t.length!==1&&t.unshift("");const f=o(i.commentBefore);t.unshift(li(f,""))}let c=!1,d=null;if(i.contents){if(Ve(i.contents)){if(i.contents.spaceBefore&&s&&t.push(""),i.contents.commentBefore){const m=o(i.contents.commentBefore);t.push(li(m,""))}a.forceBlockIndent=!!i.comment,d=i.contents.comment}const f=d?void 0:()=>c=!0;let y=jr(i.contents,a,()=>d=null,f);d&&(y+=vs(y,"",o(d))),(y[0]==="|"||y[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${y}`:t.push(y)}else t.push(jr(i.contents,a));if((h=i.directives)!=null&&h.docEnd)if(i.comment){const f=o(i.comment);f.includes(`
|
|
725
725
|
`)?(t.push("..."),t.push(li(f,""))):t.push(`... ${f}`)}else t.push("...");else{let f=i.comment;f&&c&&(f=f.replace(/^\n+/,"")),f&&((!c||d)&&t[t.length-1]!==""&&t.push(""),t.push(li(o(f),"")))}return t.join(`
|
|
726
726
|
`)+`
|
|
727
|
-
`}let Wc=class uS{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,pn,{value:gf});let a=null;typeof t=="function"||Array.isArray(t)?a=t:s===void 0&&t&&(s=t,t=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=o;let{version:c}=o;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new Ct({version:c}),this.setSchema(c,s),this.contents=e===void 0?null:this.createNode(e,a,s)}clone(){const e=Object.create(uS.prototype,{[pn]:{value:gf}});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=Ve(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){br(this.contents)&&this.contents.add(e)}addIn(e,t){br(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const s=Bv(this);e.anchor=!t||s.has(t)?Iv(t||"a",s):t}return new Pc(e.anchor)}createNode(e,t,s){let a;if(typeof t=="function")e=t.call({"":e},"",e),a=t;else if(Array.isArray(t)){const T=C=>typeof C=="number"||C instanceof String||C instanceof Number,A=t.filter(T).map(String);A.length>0&&(t=t.concat(A)),a=t}else s===void 0&&t&&(s=t,t=void 0);const{aliasDuplicateObjects:o,anchorPrefix:c,flow:d,keepUndefined:h,onTagObj:f,tag:y}=s??{},{onAnchor:m,setAnchors:_,sourceObjects:b}=
|
|
727
|
+
`}let Wc=class uS{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,pn,{value:gf});let a=null;typeof t=="function"||Array.isArray(t)?a=t:s===void 0&&t&&(s=t,t=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=o;let{version:c}=o;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new Ct({version:c}),this.setSchema(c,s),this.contents=e===void 0?null:this.createNode(e,a,s)}clone(){const e=Object.create(uS.prototype,{[pn]:{value:gf}});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=Ve(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){br(this.contents)&&this.contents.add(e)}addIn(e,t){br(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const s=Bv(this);e.anchor=!t||s.has(t)?Iv(t||"a",s):t}return new Pc(e.anchor)}createNode(e,t,s){let a;if(typeof t=="function")e=t.call({"":e},"",e),a=t;else if(Array.isArray(t)){const T=C=>typeof C=="number"||C instanceof String||C instanceof Number,A=t.filter(T).map(String);A.length>0&&(t=t.concat(A)),a=t}else s===void 0&&t&&(s=t,t=void 0);const{aliasDuplicateObjects:o,anchorPrefix:c,flow:d,keepUndefined:h,onTagObj:f,tag:y}=s??{},{onAnchor:m,setAnchors:_,sourceObjects:b}=N2(this,c||"a"),w={aliasDuplicateObjects:o??!0,keepUndefined:h??!1,onAnchor:m,onTagObj:f,replacer:a,schema:this.schema,sourceObjects:b},v=vo(e,y,w);return d&&qe(v)&&(v.flow=!0),_(),v}createPair(e,t,s={}){const a=this.createNode(e,null,s),o=this.createNode(t,null,s);return new wt(a,o)}delete(e){return br(this.contents)?this.contents.delete(e):!1}deleteIn(e){return so(e)?this.contents==null?!1:(this.contents=null,!0):br(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return qe(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return so(e)?!t&&He(this.contents)?this.contents.value:this.contents:qe(this.contents)?this.contents.getIn(e,t):void 0}has(e){return qe(this.contents)?this.contents.has(e):!1}hasIn(e){return so(e)?this.contents!==void 0:qe(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=kc(this.schema,[e],t):br(this.contents)&&this.contents.set(e,t)}setIn(e,t){so(e)?this.contents=t:this.contents==null?this.contents=kc(this.schema,Array.from(e),t):br(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Ct({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Ct({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const a=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${a}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(s)this.schema=new Jc(Object.assign(s,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:a,onAnchor:o,reviver:c}={}){const d={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},h=gn(this.contents,t??"",d);if(typeof o=="function")for(const{count:f,res:y}of d.anchors.values())o(y,f);return typeof c=="function"?kr(c,{"":h},"",h):h}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}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 t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return tk(this,e)}};function br(i){if(qe(i))return!0;throw new Error("Expected a YAML collection as document contents")}class hg extends Error{constructor(e,t,s,a){super(),this.name=e,this.code=s,this.message=a,this.pos=t}}class ws extends hg{constructor(e,t,s){super("YAMLParseError",e,t,s)}}class dS extends hg{constructor(e,t,s){super("YAMLWarning",e,t,s)}}const Mc=(i,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(d=>e.linePos(d));const{line:s,col:a}=t.linePos[0];t.message+=` at line ${s}, column ${a}`;let o=a-1,c=i.substring(e.lineStarts[s-1],e.lineStarts[s]).replace(/[\n\r]+$/,"");if(o>=60&&c.length>80){const d=Math.min(o-39,c.length-79);c="…"+c.substring(d),o-=d-1}if(c.length>80&&(c=c.substring(0,79)+"…"),s>1&&/^ *$/.test(c.substring(0,o))){let d=i.substring(e.lineStarts[s-2],e.lineStarts[s-1]);d.length>80&&(d=d.substring(0,79)+`…
|
|
728
728
|
`),c=d+c}if(/[^ ]/.test(c)){let d=1;const h=t.linePos[1];(h==null?void 0:h.line)===s&&h.col>a&&(d=Math.max(1,Math.min(h.col-a,80-o)));const f=" ".repeat(o)+"^".repeat(d);t.message+=`:
|
|
729
729
|
|
|
730
730
|
${c}
|
|
731
731
|
${f}
|
|
732
|
-
`}};function Hr(i,{flow:e,indicator:t,next:s,offset:a,onError:o,parentIndent:c,startOnNewline:d}){let h=!1,f=d,y=d,m="",_="",b=!1,
|
|
733
|
-
`))return!0;if(i.end){for(const e of i.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of i.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(So(e.key)||So(e.value))return!0}return!1;default:return!0}}function _f(i,e,t){if((e==null?void 0:e.type)==="flow-collection"){const s=e.end[0];s.indent===i&&(s.source==="]"||s.source==="}")&&So(e)&&t(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function hS(i,e,t){const{uniqueKeys:s}=i.options;if(s===!1)return!1;const a=typeof s=="function"?s:(o,c)=>o===c||He(o)&&He(c)&&o.value===c.value;return e.some(o=>a(o.key,t))}const xb="All mapping items must start at the same column";function
|
|
734
|
-
`+T.comment:d.comment=T.comment);continue}(T.newlineAfterProp||So(b))&&a(b??_[_.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((y=T.found)==null?void 0:y.indent)!==s.indent&&a(h,"BAD_INDENT",xb);t.atKey=!0;const C=T.end,L=b?i(t,b,T,a):e(t,C,_,null,T,a);t.schema.compat&&_f(s.indent,b,a),t.atKey=!1,hS(t,d.items,L)&&a(C,"DUPLICATE_KEY","Map keys must be unique");const j=Hr(
|
|
735
|
-
`+j.comment:L.comment=j.comment);const D=new wt(L);t.options.keepSourceTokens&&(D.srcToken=m),d.items.push(D)}}return f&&f<h&&a(f,"IMPOSSIBLE","Map comment with trailing content"),d.range=[s.offset,h,f??h],d}function
|
|
732
|
+
`}};function Hr(i,{flow:e,indicator:t,next:s,offset:a,onError:o,parentIndent:c,startOnNewline:d}){let h=!1,f=d,y=d,m="",_="",b=!1,w=!1,v=null,T=null,A=null,C=null,L=null,j=null,D=null;for(const q of i)switch(w&&(q.type!=="space"&&q.type!=="newline"&&q.type!=="comma"&&o(q.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w=!1),v&&(f&&q.type!=="comment"&&q.type!=="newline"&&o(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),v=null),q.type){case"space":!e&&(t!=="doc-start"||(s==null?void 0:s.type)!=="flow-collection")&&q.source.includes(" ")&&(v=q),y=!0;break;case"comment":{y||o(q,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const O=q.source.substring(1)||" ";m?m+=_+O:m=O,_="",f=!1;break}case"newline":f?m?m+=q.source:(!j||t!=="seq-item-ind")&&(h=!0):_+=q.source,f=!0,b=!0,(T||A)&&(C=q),y=!0;break;case"anchor":T&&o(q,"MULTIPLE_ANCHORS","A node can have at most one anchor"),q.source.endsWith(":")&&o(q.offset+q.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),T=q,D??(D=q.offset),f=!1,y=!1,w=!0;break;case"tag":{A&&o(q,"MULTIPLE_TAGS","A node can have at most one tag"),A=q,D??(D=q.offset),f=!1,y=!1,w=!0;break}case t:(T||A)&&o(q,"BAD_PROP_ORDER",`Anchors and tags must be after the ${q.source} indicator`),j&&o(q,"UNEXPECTED_TOKEN",`Unexpected ${q.source} in ${e??"collection"}`),j=q,f=t==="seq-item-ind"||t==="explicit-key-ind",y=!1;break;case"comma":if(e){L&&o(q,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),L=q,f=!1,y=!1;break}default:o(q,"UNEXPECTED_TOKEN",`Unexpected ${q.type} token`),f=!1,y=!1}const F=i[i.length-1],B=F?F.offset+F.source.length:a;return w&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&o(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),v&&(f&&v.indent<=c||(s==null?void 0:s.type)==="block-map"||(s==null?void 0:s.type)==="block-seq")&&o(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:L,found:j,spaceBefore:h,comment:m,hasNewline:b,anchor:T,tag:A,newlineAfterProp:C,end:B,start:D??B}}function So(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(`
|
|
733
|
+
`))return!0;if(i.end){for(const e of i.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of i.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(So(e.key)||So(e.value))return!0}return!1;default:return!0}}function _f(i,e,t){if((e==null?void 0:e.type)==="flow-collection"){const s=e.end[0];s.indent===i&&(s.source==="]"||s.source==="}")&&So(e)&&t(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function hS(i,e,t){const{uniqueKeys:s}=i.options;if(s===!1)return!1;const a=typeof s=="function"?s:(o,c)=>o===c||He(o)&&He(c)&&o.value===c.value;return e.some(o=>a(o.key,t))}const xb="All mapping items must start at the same column";function nk({composeNode:i,composeEmptyNode:e},t,s,a,o){var y;const c=(o==null?void 0:o.nodeClass)??Wt,d=new c(t.schema);t.atRoot&&(t.atRoot=!1);let h=s.offset,f=null;for(const m of s.items){const{start:_,key:b,sep:w,value:v}=m,T=Hr(_,{indicator:"explicit-key-ind",next:b??(w==null?void 0:w[0]),offset:h,onError:a,parentIndent:s.indent,startOnNewline:!0}),A=!T.found;if(A){if(b&&(b.type==="block-seq"?a(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in b&&b.indent!==s.indent&&a(h,"BAD_INDENT",xb)),!T.anchor&&!T.tag&&!w){f=T.end,T.comment&&(d.comment?d.comment+=`
|
|
734
|
+
`+T.comment:d.comment=T.comment);continue}(T.newlineAfterProp||So(b))&&a(b??_[_.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((y=T.found)==null?void 0:y.indent)!==s.indent&&a(h,"BAD_INDENT",xb);t.atKey=!0;const C=T.end,L=b?i(t,b,T,a):e(t,C,_,null,T,a);t.schema.compat&&_f(s.indent,b,a),t.atKey=!1,hS(t,d.items,L)&&a(C,"DUPLICATE_KEY","Map keys must be unique");const j=Hr(w??[],{indicator:"map-value-ind",next:v,offset:L.range[2],onError:a,parentIndent:s.indent,startOnNewline:!b||b.type==="block-scalar"});if(h=j.end,j.found){A&&((v==null?void 0:v.type)==="block-map"&&!j.hasNewline&&a(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&T.start<j.found.offset-1024&&a(L.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const D=v?i(t,v,j,a):e(t,h,w,null,j,a);t.schema.compat&&_f(s.indent,v,a),h=D.range[2];const F=new wt(L,D);t.options.keepSourceTokens&&(F.srcToken=m),d.items.push(F)}else{A&&a(L.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),j.comment&&(L.comment?L.comment+=`
|
|
735
|
+
`+j.comment:L.comment=j.comment);const D=new wt(L);t.options.keepSourceTokens&&(D.srcToken=m),d.items.push(D)}}return f&&f<h&&a(f,"IMPOSSIBLE","Map comment with trailing content"),d.range=[s.offset,h,f??h],d}function ik({composeNode:i,composeEmptyNode:e},t,s,a,o){const c=(o==null?void 0:o.nodeClass)??Fi,d=new c(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let h=s.offset,f=null;for(const{start:y,value:m}of s.items){const _=Hr(y,{indicator:"seq-item-ind",next:m,offset:h,onError:a,parentIndent:s.indent,startOnNewline:!0});if(!_.found)if(_.anchor||_.tag||m)(m==null?void 0:m.type)==="block-seq"?a(_.end,"BAD_INDENT","All sequence items must start at the same column"):a(h,"MISSING_CHAR","Sequence item without - indicator");else{f=_.end,_.comment&&(d.comment=_.comment);continue}const b=m?i(t,m,_,a):e(t,_.end,y,null,_,a);t.schema.compat&&_f(s.indent,m,a),h=b.range[2],d.items.push(b)}return d.range=[s.offset,h,f??h],d}function Co(i,e,t,s){let a="";if(i){let o=!1,c="";for(const d of i){const{source:h,type:f}=d;switch(f){case"space":o=!0;break;case"comment":{t&&!o&&s(d,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const y=h.substring(1)||" ";a?a+=c+y:a=y,c="";break}case"newline":a&&(c+=h),o=!0;break;default:s(d,"UNEXPECTED_TOKEN",`Unexpected ${f} at node end`)}e+=h.length}}return{comment:a,offset:e}}const qh="Block collections are not allowed within flow collections",Vh=i=>i&&(i.type==="block-map"||i.type==="block-seq");function sk({composeNode:i,composeEmptyNode:e},t,s,a,o){var T;const c=s.start.source==="{",d=c?"flow map":"flow sequence",h=(o==null?void 0:o.nodeClass)??(c?Wt:Fi),f=new h(t.schema);f.flow=!0;const y=t.atRoot;y&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let m=s.offset+s.start.source.length;for(let A=0;A<s.items.length;++A){const C=s.items[A],{start:L,key:j,sep:D,value:F}=C,B=Hr(L,{flow:d,indicator:"explicit-key-ind",next:j??(D==null?void 0:D[0]),offset:m,onError:a,parentIndent:s.indent,startOnNewline:!1});if(!B.found){if(!B.anchor&&!B.tag&&!D&&!F){A===0&&B.comma?a(B.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${d}`):A<s.items.length-1&&a(B.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${d}`),B.comment&&(f.comment?f.comment+=`
|
|
736
736
|
`+B.comment:f.comment=B.comment),m=B.end;continue}!c&&t.options.strict&&So(j)&&a(j,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(A===0)B.comma&&a(B.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${d}`);else if(B.comma||a(B.start,"MISSING_CHAR",`Missing , between ${d} items`),B.comment){let q="";e:for(const O of L)switch(O.type){case"comma":case"space":break;case"comment":q=O.source.substring(1);break e;default:break e}if(q){let O=f.items[f.items.length-1];Ue(O)&&(O=O.value??O.key),O.comment?O.comment+=`
|
|
737
737
|
`+q:O.comment=q,B.comment=B.comment.substring(q.length+1)}}if(!c&&!D&&!B.found){const q=F?i(t,F,B,a):e(t,B.end,D,null,B,a);f.items.push(q),m=q.range[2],Vh(F)&&a(q.range,"BLOCK_IN_FLOW",qh)}else{t.atKey=!0;const q=B.end,O=j?i(t,j,B,a):e(t,q,L,null,B,a);Vh(j)&&a(O.range,"BLOCK_IN_FLOW",qh),t.atKey=!1;const Q=Hr(D??[],{flow:d,indicator:"map-value-ind",next:F,offset:O.range[2],onError:a,parentIndent:s.indent,startOnNewline:!1});if(Q.found){if(!c&&!B.found&&t.options.strict){if(D)for(const J of D){if(J===Q.found)break;if(J.type==="newline"){a(J,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}B.start<Q.found.offset-1024&&a(Q.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else F&&("source"in F&&((T=F.source)==null?void 0:T[0])===":"?a(F,"MISSING_CHAR",`Missing space after : in ${d}`):a(Q.start,"MISSING_CHAR",`Missing , or : between ${d} items`));const se=F?i(t,F,Q,a):Q.found?e(t,Q.end,D,null,Q,a):null;se?Vh(F)&&a(se.range,"BLOCK_IN_FLOW",qh):Q.comment&&(O.comment?O.comment+=`
|
|
738
|
-
`+Q.comment:O.comment=Q.comment);const Y=new wt(O,se);if(t.options.keepSourceTokens&&(Y.srcToken=C),c){const J=f;hS(t,J.items,O)&&a(q,"DUPLICATE_KEY","Map keys must be unique"),J.items.push(Y)}else{const J=new Wt(t.schema);J.flow=!0,J.items.push(Y);const te=(se??O).range;J.range=[O.range[0],te[1],te[2]],f.items.push(J)}m=se?se.range[2]:Q.end}}const _=c?"}":"]",[b,...
|
|
739
|
-
`+A.comment:f.comment=A.comment),f.range=[s.offset,v,A.offset]}else f.range=[s.offset,v,v];return f}function Fh(i,e,t,s,a,o){const c=t.type==="block-map"?
|
|
738
|
+
`+Q.comment:O.comment=Q.comment);const Y=new wt(O,se);if(t.options.keepSourceTokens&&(Y.srcToken=C),c){const J=f;hS(t,J.items,O)&&a(q,"DUPLICATE_KEY","Map keys must be unique"),J.items.push(Y)}else{const J=new Wt(t.schema);J.flow=!0,J.items.push(Y);const te=(se??O).range;J.range=[O.range[0],te[1],te[2]],f.items.push(J)}m=se?se.range[2]:Q.end}}const _=c?"}":"]",[b,...w]=s.end;let v=m;if((b==null?void 0:b.source)===_)v=b.offset+b.source.length;else{const A=d[0].toUpperCase()+d.substring(1),C=y?`${A} must end with a ${_}`:`${A} in block collection must be sufficiently indented and end with a ${_}`;a(m,y?"MISSING_CHAR":"BAD_INDENT",C),b&&b.source.length!==1&&w.unshift(b)}if(w.length>0){const A=Co(w,v,t.options.strict,a);A.comment&&(f.comment?f.comment+=`
|
|
739
|
+
`+A.comment:f.comment=A.comment),f.range=[s.offset,v,A.offset]}else f.range=[s.offset,v,v];return f}function Fh(i,e,t,s,a,o){const c=t.type==="block-map"?nk(i,e,t,s,o):t.type==="block-seq"?ik(i,e,t,s,o):sk(i,e,t,s,o),d=c.constructor;return a==="!"||a===d.tagName?(c.tag=d.tagName,c):(a&&(c.tag=a),c)}function rk(i,e,t,s,a){var _;const o=s.tag,c=o?e.directives.tagName(o.source,b=>a(o,"TAG_RESOLVE_FAILED",b)):null;if(t.type==="block-seq"){const{anchor:b,newlineAfterProp:w}=s,v=b&&o?b.offset>o.offset?b:o:b??o;v&&(!w||w.offset<v.offset)&&a(v,"MISSING_CHAR","Missing newline after block sequence props")}const d=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!o||!c||c==="!"||c===Wt.tagName&&d==="map"||c===Fi.tagName&&d==="seq")return Fh(i,e,t,a,c);let h=e.schema.tags.find(b=>b.tag===c&&b.collection===d);if(!h){const b=e.schema.knownTags[c];if((b==null?void 0:b.collection)===d)e.schema.tags.push(Object.assign({},b,{default:!1})),h=b;else return b?a(o,"BAD_COLLECTION_TYPE",`${b.tag} used for ${d} collection, but expects ${b.collection??"scalar"}`,!0):a(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),Fh(i,e,t,a,c)}const f=Fh(i,e,t,a,c,h),y=((_=h.resolve)==null?void 0:_.call(h,f,b=>a(o,"TAG_RESOLVE_FAILED",b),e.options))??f,m=Ve(y)?y:new ge(y);return m.range=f.range,m.tag=c,h!=null&&h.format&&(m.format=h.format),m}function fS(i,e,t){const s=e.offset,a=ak(e,i.options.strict,t);if(!a)return{value:"",type:null,comment:"",range:[s,s,s]};const o=a.mode===">"?ge.BLOCK_FOLDED:ge.BLOCK_LITERAL,c=e.source?ok(e.source):[];let d=c.length;for(let v=c.length-1;v>=0;--v){const T=c[v][1];if(T===""||T==="\r")d=v;else break}if(d===0){const v=a.chomp==="+"&&c.length>0?`
|
|
740
740
|
`.repeat(Math.max(1,c.length-1)):"";let T=s+a.length;return e.source&&(T+=e.source.length),{value:v,type:o,comment:a.comment,range:[s,T,T]}}let h=e.indent+a.indent,f=e.offset+a.length,y=0;for(let v=0;v<d;++v){const[T,A]=c[v];if(A===""||A==="\r")a.indent===0&&T.length>h&&(h=T.length);else{T.length<h&&t(f+T.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),a.indent===0&&(h=T.length),y=v,h===0&&!i.atRoot&&t(f,"BAD_INDENT","Block scalar values in collections must be indented");break}f+=T.length+A.length+1}for(let v=c.length-1;v>=d;--v)c[v][0].length>h&&(d=v+1);let m="",_="",b=!1;for(let v=0;v<y;++v)m+=c[v][0].slice(h)+`
|
|
741
741
|
`;for(let v=y;v<d;++v){let[T,A]=c[v];f+=T.length+A.length+1;const C=A[A.length-1]==="\r";if(C&&(A=A.slice(0,-1)),A&&T.length<h){const j=`Block scalar lines must not be less indented than their ${a.indent?"explicit indentation indicator":"first line"}`;t(f-A.length-(C?2:1),"BAD_INDENT",j),T=""}o===ge.BLOCK_LITERAL?(m+=_+T.slice(h)+A,_=`
|
|
742
742
|
`):T.length>h||A[0]===" "?(_===" "?_=`
|
|
@@ -751,41 +751,41 @@ ${f}
|
|
|
751
751
|
`+c[v][0].slice(h);m[m.length-1]!==`
|
|
752
752
|
`&&(m+=`
|
|
753
753
|
`);break;default:m+=`
|
|
754
|
-
`}const
|
|
754
|
+
`}const w=s+a.length+e.source.length;return{value:m,type:o,comment:a.comment,range:[s,w,w]}}function ak({offset:i,props:e},t,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=e[0],o=a[0];let c=0,d="",h=-1;for(let _=1;_<a.length;++_){const b=a[_];if(!d&&(b==="-"||b==="+"))d=b;else{const w=Number(b);!c&&w?c=w:h===-1&&(h=i+_)}}h!==-1&&s(h,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let f=!1,y="",m=a.length;for(let _=1;_<e.length;++_){const b=e[_];switch(b.type){case"space":f=!0;case"newline":m+=b.source.length;break;case"comment":t&&!f&&s(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),m+=b.source.length,y=b.source.substring(1);break;case"error":s(b,"UNEXPECTED_TOKEN",b.message),m+=b.source.length;break;default:{const w=`Unexpected token in block scalar header: ${b.type}`;s(b,"UNEXPECTED_TOKEN",w);const v=b.source;v&&typeof v=="string"&&(m+=v.length)}}}return{mode:o,indent:c,chomp:d,comment:y,length:m}}function ok(i){const e=i.split(/\n( *)/),t=e[0],s=t.match(/^( *)/),o=[s!=null&&s[1]?[s[1],t.slice(s[1].length)]:["",t]];for(let c=1;c<e.length;c+=2)o.push([e[c],e[c+1]]);return o}function gS(i,e,t){const{offset:s,type:a,source:o,end:c}=i;let d,h;const f=(_,b,w)=>t(s+_,b,w);switch(a){case"scalar":d=ge.PLAIN,h=lk(o,f);break;case"single-quoted-scalar":d=ge.QUOTE_SINGLE,h=ck(o,f);break;case"double-quoted-scalar":d=ge.QUOTE_DOUBLE,h=uk(o,f);break;default:return t(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[s,s+o.length,s+o.length]}}const y=s+o.length,m=Co(c,y,e,t);return{value:h,type:d,comment:m.comment,range:[s,y,m.offset]}}function lk(i,e){let t="";switch(i[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${i[0]}`;break}case"@":case"`":{t=`reserved character ${i[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),pS(i)}function ck(i,e){return(i[i.length-1]!=="'"||i.length===1)&&e(i.length,"MISSING_CHAR","Missing closing 'quote"),pS(i.slice(1,-1)).replace(/''/g,"'")}function pS(i){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
755
755
|
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
756
756
|
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=e.exec(i);if(!s)return i;let a=s[1],o=" ",c=e.lastIndex;for(t.lastIndex=c;s=t.exec(i);)s[1]===""?o===`
|
|
757
757
|
`?a+=o:o=`
|
|
758
|
-
`:(a+=o+s[1],o=" "),c=t.lastIndex;const d=/[ \t]*(.*)/sy;return d.lastIndex=c,s=d.exec(i),a+o+((s==null?void 0:s[1])??"")}function
|
|
758
|
+
`:(a+=o+s[1],o=" "),c=t.lastIndex;const d=/[ \t]*(.*)/sy;return d.lastIndex=c,s=d.exec(i),a+o+((s==null?void 0:s[1])??"")}function uk(i,e){let t="";for(let s=1;s<i.length-1;++s){const a=i[s];if(!(a==="\r"&&i[s+1]===`
|
|
759
759
|
`))if(a===`
|
|
760
|
-
`){const{fold:o,offset:c}=
|
|
760
|
+
`){const{fold:o,offset:c}=dk(i,s);t+=o,s=c}else if(a==="\\"){let o=i[++s];const c=hk[o];if(c)t+=c;else if(o===`
|
|
761
761
|
`)for(o=i[s+1];o===" "||o===" ";)o=i[++s+1];else if(o==="\r"&&i[s+1]===`
|
|
762
|
-
`)for(o=i[++s+1];o===" "||o===" ";)o=i[++s+1];else if(o==="x"||o==="u"||o==="U"){const d={x:2,u:4,U:8}[o];t+=
|
|
762
|
+
`)for(o=i[++s+1];o===" "||o===" ";)o=i[++s+1];else if(o==="x"||o==="u"||o==="U"){const d={x:2,u:4,U:8}[o];t+=fk(i,s+1,d,e),s+=d}else{const d=i.substr(s-1,2);e(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${d}`),t+=d}}else if(a===" "||a===" "){const o=s;let c=i[s+1];for(;c===" "||c===" ";)c=i[++s+1];c!==`
|
|
763
763
|
`&&!(c==="\r"&&i[s+2]===`
|
|
764
|
-
`)&&(t+=s>o?i.slice(o,s+1):a)}else t+=a}return(i[i.length-1]!=='"'||i.length===1)&&e(i.length,"MISSING_CHAR",'Missing closing "quote'),t}function
|
|
764
|
+
`)&&(t+=s>o?i.slice(o,s+1):a)}else t+=a}return(i[i.length-1]!=='"'||i.length===1)&&e(i.length,"MISSING_CHAR",'Missing closing "quote'),t}function dk(i,e){let t="",s=i[e+1];for(;(s===" "||s===" "||s===`
|
|
765
765
|
`||s==="\r")&&!(s==="\r"&&i[e+2]!==`
|
|
766
766
|
`);)s===`
|
|
767
767
|
`&&(t+=`
|
|
768
|
-
`),e+=1,s=i[e+1];return t||(t=" "),{fold:t,offset:e}}const
|
|
769
|
-
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function
|
|
768
|
+
`),e+=1,s=i[e+1];return t||(t=" "),{fold:t,offset:e}}const hk={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
769
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function fk(i,e,t,s){const a=i.substr(e,t),c=a.length===t&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;if(isNaN(c)){const d=i.substr(e-2,t+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${d}`),d}return String.fromCodePoint(c)}function mS(i,e,t,s){const{value:a,type:o,comment:c,range:d}=e.type==="block-scalar"?fS(i,e,s):gS(e,i.options.strict,s),h=t?i.directives.tagName(t.source,m=>s(t,"TAG_RESOLVE_FAILED",m)):null;let f;i.options.stringKeys&&i.atKey?f=i.schema[Hn]:h?f=gk(i.schema,a,h,t,s):e.type==="scalar"?f=pk(i,a,e,s):f=i.schema[Hn];let y;try{const m=f.resolve(a,_=>s(t??e,"TAG_RESOLVE_FAILED",_),i.options);y=He(m)?m:new ge(m)}catch(m){const _=m instanceof Error?m.message:String(m);s(t??e,"TAG_RESOLVE_FAILED",_),y=new ge(a)}return y.range=d,y.source=a,o&&(y.type=o),h&&(y.tag=h),f.format&&(y.format=f.format),c&&(y.comment=c),y}function gk(i,e,t,s,a){var d;if(t==="!")return i[Hn];const o=[];for(const h of i.tags)if(!h.collection&&h.tag===t)if(h.default&&h.test)o.push(h);else return h;for(const h of o)if((d=h.test)!=null&&d.test(e))return h;const c=i.knownTags[t];return c&&!c.collection?(i.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(a(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),i[Hn])}function pk({atKey:i,directives:e,schema:t},s,a,o){const c=t.tags.find(d=>{var h;return(d.default===!0||i&&d.default==="key")&&((h=d.test)==null?void 0:h.test(s))})||t[Hn];if(t.compat){const d=t.compat.find(h=>{var f;return h.default&&((f=h.test)==null?void 0:f.test(s))})??t[Hn];if(c.tag!==d.tag){const h=e.tagString(c.tag),f=e.tagString(d.tag),y=`Value may be parsed as either ${h} or ${f}`;o(a,"TAG_RESOLVE_FAILED",y,!0)}}return c}function mk(i,e,t){if(e){t??(t=e.length);for(let s=t-1;s>=0;--s){let a=e[s];switch(a.type){case"space":case"comment":case"newline":i-=a.source.length;continue}for(a=e[++s];(a==null?void 0:a.type)==="space";)i+=a.source.length,a=e[++s];break}}return i}const yk={composeNode:yS,composeEmptyNode:fg};function yS(i,e,t,s){const a=i.atKey,{spaceBefore:o,comment:c,anchor:d,tag:h}=t;let f,y=!0;switch(e.type){case"alias":f=_k(i,e,s),(d||h)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":f=mS(i,e,h,s),d&&(f.anchor=d.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{f=rk(yk,i,e,t,s),d&&(f.anchor=d.source.substring(1))}catch(m){const _=m instanceof Error?m.message:String(m);s(e,"RESOURCE_EXHAUSTION",_)}break;default:{const m=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",m),y=!1}}return f??(f=fg(i,e.offset,void 0,null,t,s)),d&&f.anchor===""&&s(d,"BAD_ALIAS","Anchor cannot be an empty string"),a&&i.options.stringKeys&&(!He(f)||typeof f.value!="string"||f.tag&&f.tag!=="tag:yaml.org,2002:str")&&s(h??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(f.spaceBefore=!0),c&&(e.type==="scalar"&&e.source===""?f.comment=c:f.commentBefore=c),i.options.keepSourceTokens&&y&&(f.srcToken=e),f}function fg(i,e,t,s,{spaceBefore:a,comment:o,anchor:c,tag:d,end:h},f){const y={type:"scalar",offset:mk(e,t,s),indent:-1,source:""},m=mS(i,y,d,f);return c&&(m.anchor=c.source.substring(1),m.anchor===""&&f(c,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(m.spaceBefore=!0),o&&(m.comment=o,m.range[2]=h),m}function _k({options:i},{offset:e,source:t,end:s},a){const o=new Pc(t.substring(1));o.source===""&&a(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&a(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=e+t.length,d=Co(s,c,i.strict,a);return o.range=[e,c,d.offset],d.comment&&(o.comment=d.comment),o}function bk(i,e,{offset:t,start:s,value:a,end:o},c){const d=Object.assign({_directives:e},i),h=new Wc(void 0,d),f={atKey:!1,atRoot:!0,directives:h.directives,options:h.options,schema:h.schema},y=Hr(s,{indicator:"doc-start",next:a??(o==null?void 0:o[0]),offset:t,onError:c,parentIndent:0,startOnNewline:!0});y.found&&(h.directives.docStart=!0,a&&(a.type==="block-map"||a.type==="block-seq")&&!y.hasNewline&&c(y.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),h.contents=a?yS(f,a,y,c):fg(f,y.end,s,null,y,c);const m=h.contents.range[2],_=Co(o,m,!1,c);return _.comment&&(h.comment=_.comment),h.range=[t,m,_.offset],h}function Za(i){if(typeof i=="number")return[i,i+1];if(Array.isArray(i))return i.length===2?i:[i[0],i[1]];const{offset:e,source:t}=i;return[e,e+(typeof t=="string"?t.length:1)]}function Tb(i){var a;let e="",t=!1,s=!1;for(let o=0;o<i.length;++o){const c=i[o];switch(c[0]){case"#":e+=(e===""?"":s?`
|
|
770
770
|
|
|
771
771
|
`:`
|
|
772
772
|
`)+(c.substring(1)||" "),t=!0,s=!1;break;case"%":((a=i[o+1])==null?void 0:a[0])!=="#"&&(o+=1),t=!1;break;default:t||(s=!0),t=!1}}return{comment:e,afterEmptyLine:s}}class gg{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,s,a,o)=>{const c=Za(t);o?this.warnings.push(new dS(c,s,a)):this.errors.push(new ws(c,s,a))},this.directives=new Ct({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:s,afterEmptyLine:a}=Tb(this.prelude);if(s){const o=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
773
773
|
${s}`:s;else if(a||e.directives.docStart||!o)e.commentBefore=s;else if(qe(o)&&!o.flow&&o.items.length>0){let c=o.items[0];Ue(c)&&(c=c.key);const d=c.commentBefore;c.commentBefore=d?`${s}
|
|
774
774
|
${d}`:s}else{const c=o.commentBefore;o.commentBefore=c?`${s}
|
|
775
|
-
${c}`:s}}t?(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:Tb(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(const a of e)yield*this.next(a);yield*this.end(t,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,s,a)=>{const o=Za(e);o[0]+=t,this.onError(o,"BAD_DIRECTIVE",s,a)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=
|
|
776
|
-
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new ws(Za(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const s=Object.assign({_directives:this.directives},this.options),a=new Wc(void 0,s);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),a.range=[0,t,t],this.decorate(a,!1),yield a}}}function
|
|
775
|
+
${c}`:s}}t?(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:Tb(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(const a of e)yield*this.next(a);yield*this.end(t,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,s,a)=>{const o=Za(e);o[0]+=t,this.onError(o,"BAD_DIRECTIVE",s,a)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=bk(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new ws(Za(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new ws(Za(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const t=Co(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const s=this.doc.comment;this.doc.comment=s?`${s}
|
|
776
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new ws(Za(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const s=Object.assign({_directives:this.directives},this.options),a=new Wc(void 0,s);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),a.range=[0,t,t],this.decorate(a,!1),yield a}}}function vk(i,e=!0,t){if(i){const s=(a,o,c)=>{const d=typeof a=="number"?a:Array.isArray(a)?a[0]:a.offset;if(t)t(d,o,c);else throw new ws([d,d+1],o,c)};switch(i.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return gS(i,e,s);case"block-scalar":return fS({options:{strict:e}},i,s)}}return null}function Sk(i,e){const{implicitKey:t=!1,indent:s,inFlow:a=!1,offset:o=-1,type:c="PLAIN"}=e,d=Eo({type:c,value:i},{implicitKey:t,indent:s>0?" ".repeat(s):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}}),h=e.end??[{type:"newline",offset:-1,indent:s,source:`
|
|
777
777
|
`}];switch(d[0]){case"|":case">":{const f=d.indexOf(`
|
|
778
778
|
`),y=d.substring(0,f),m=d.substring(f+1)+`
|
|
779
779
|
`,_=[{type:"block-scalar-header",offset:o,indent:s,source:y}];return _S(_,h)||_.push({type:"newline",offset:-1,indent:s,source:`
|
|
780
|
-
`}),{type:"block-scalar",offset:o,indent:s,props:_,source:m}}case'"':return{type:"double-quoted-scalar",offset:o,indent:s,source:d,end:h};case"'":return{type:"single-quoted-scalar",offset:o,indent:s,source:d,end:h};default:return{type:"scalar",offset:o,indent:s,source:d,end:h}}}function
|
|
780
|
+
`}),{type:"block-scalar",offset:o,indent:s,props:_,source:m}}case'"':return{type:"double-quoted-scalar",offset:o,indent:s,source:d,end:h};case"'":return{type:"single-quoted-scalar",offset:o,indent:s,source:d,end:h};default:return{type:"scalar",offset:o,indent:s,source:d,end:h}}}function wk(i,e,t={}){let{afterKey:s=!1,implicitKey:a=!1,inFlow:o=!1,type:c}=t,d="indent"in i?i.indent:null;if(s&&typeof d=="number"&&(d+=2),!c)switch(i.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const f=i.props[0];if(f.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=f.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const h=Eo({type:c,value:e},{implicitKey:a||d===null,indent:d!==null&&d>0?" ".repeat(d):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(h[0]){case"|":case">":xk(i,h);break;case'"':Gh(i,h,"double-quoted-scalar");break;case"'":Gh(i,h,"single-quoted-scalar");break;default:Gh(i,h,"scalar")}}function xk(i,e){const t=e.indexOf(`
|
|
781
781
|
`),s=e.substring(0,t),a=e.substring(t+1)+`
|
|
782
782
|
`;if(i.type==="block-scalar"){const o=i.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=s,i.source=a}else{const{offset:o}=i,c="indent"in i?i.indent:-1,d=[{type:"block-scalar-header",offset:o,indent:c,source:s}];_S(d,"end"in i?i.end:void 0)||d.push({type:"newline",offset:-1,indent:c,source:`
|
|
783
783
|
`});for(const h of Object.keys(i))h!=="type"&&h!=="offset"&&delete i[h];Object.assign(i,{type:"block-scalar",indent:c,props:d,source:a})}}function _S(i,e){if(e)for(const t of e)switch(t.type){case"space":case"comment":i.push(t);break;case"newline":return i.push(t),!0}return!1}function Gh(i,e,t){switch(i.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":i.type=t,i.source=e;break;case"block-scalar":{const s=i.props.slice(1);let a=e.length;i.props[0].type==="block-scalar-header"&&(a-=i.props[0].source.length);for(const o of s)o.offset+=a;delete i.props,Object.assign(i,{type:t,source:e,end:s});break}case"block-map":case"block-seq":{const a={type:"newline",offset:i.offset+e.length,indent:i.indent,source:`
|
|
784
|
-
`};delete i.items,Object.assign(i,{type:t,source:e,end:[a]});break}default:{const s="indent"in i?i.indent:-1,a="end"in i&&Array.isArray(i.end)?i.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(i))o!=="type"&&o!=="offset"&&delete i[o];Object.assign(i,{type:t,indent:s,source:e,end:a})}}}const
|
|
784
|
+
`};delete i.items,Object.assign(i,{type:t,source:e,end:[a]});break}default:{const s="indent"in i?i.indent:-1,a="end"in i&&Array.isArray(i.end)?i.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(i))o!=="type"&&o!=="offset"&&delete i[o];Object.assign(i,{type:t,indent:s,source:e,end:a})}}}const Tk=i=>"type"in i?Dc(i):pc(i);function Dc(i){switch(i.type){case"block-scalar":{let e="";for(const t of i.props)e+=Dc(t);return e+i.source}case"block-map":case"block-seq":{let e="";for(const t of i.items)e+=pc(t);return e}case"flow-collection":{let e=i.start.source;for(const t of i.items)e+=pc(t);for(const t of i.end)e+=t.source;return e}case"document":{let e=pc(i);if(i.end)for(const t of i.end)e+=t.source;return e}default:{let e=i.source;if("end"in i&&i.end)for(const t of i.end)e+=t.source;return e}}}function pc({start:i,key:e,sep:t,value:s}){let a="";for(const o of i)a+=o.source;if(e&&(a+=Dc(e)),t)for(const o of t)a+=o.source;return s&&(a+=Dc(s)),a}const bf=Symbol("break visit"),Ek=Symbol("skip children"),bS=Symbol("remove item");function Ts(i,e){"type"in i&&i.type==="document"&&(i={start:i.start,value:i.value}),vS(Object.freeze([]),i,e)}Ts.BREAK=bf;Ts.SKIP=Ek;Ts.REMOVE=bS;Ts.itemAtPath=(i,e)=>{let t=i;for(const[s,a]of e){const o=t==null?void 0:t[s];if(o&&"items"in o)t=o.items[a];else return}return t};Ts.parentCollection=(i,e)=>{const t=Ts.itemAtPath(i,e.slice(0,-1)),s=e[e.length-1][0],a=t==null?void 0:t[s];if(a&&"items"in a)return a;throw new Error("Parent collection not found")};function vS(i,e,t){let s=t(e,i);if(typeof s=="symbol")return s;for(const a of["key","value"]){const o=e[a];if(o&&"items"in o){for(let c=0;c<o.items.length;++c){const d=vS(Object.freeze(i.concat([[a,c]])),o.items[c],t);if(typeof d=="number")c=d-1;else{if(d===bf)return bf;d===bS&&(o.items.splice(c,1),c-=1)}}typeof s=="function"&&a==="key"&&(s=s(e,i))}}return typeof s=="function"?s(e,i):s}const Zc="\uFEFF",Qc="",eu="",wo="",Ak=i=>!!i&&"items"in i,Ck=i=>!!i&&(i.type==="scalar"||i.type==="single-quoted-scalar"||i.type==="double-quoted-scalar"||i.type==="block-scalar");function kk(i){switch(i){case Zc:return"<BOM>";case Qc:return"<DOC>";case eu:return"<FLOW_END>";case wo:return"<SCALAR>";default:return JSON.stringify(i)}}function SS(i){switch(i){case Zc:return"byte-order-mark";case Qc:return"doc-mode";case eu:return"flow-error-end";case wo:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
785
785
|
`:case`\r
|
|
786
|
-
`: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(i[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
|
|
787
|
-
`:case"\r":case" ":return!0;default:return!1}}const Eb=new Set("0123456789ABCDEFabcdef"),
|
|
788
|
-
\r `),Xh=i=>!i||
|
|
786
|
+
`: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(i[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 Nk=Object.freeze(Object.defineProperty({__proto__:null,BOM:Zc,DOCUMENT:Qc,FLOW_END:eu,SCALAR:wo,createScalarToken:Sk,isCollection:Ak,isScalar:Ck,prettyToken:kk,resolveAsScalar:vk,setScalarValue:wk,stringify:Tk,tokenType:SS,visit:Ts},Symbol.toStringTag,{value:"Module"}));function vn(i){switch(i){case void 0:case" ":case`
|
|
787
|
+
`:case"\r":case" ":return!0;default:return!1}}const Eb=new Set("0123456789ABCDEFabcdef"),Mk=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ec=new Set(",[]{}"),Dk=new Set(` ,[]{}
|
|
788
|
+
\r `),Xh=i=>!i||Dk.has(i);class wS{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,t=!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=!t;let s=this.next??"stream";for(;s&&(t||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
789
789
|
`?!0:t==="\r"?this.buffer[e+1]===`
|
|
790
790
|
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let s=0;for(;t===" ";)t=this.buffer[++s+e];if(t==="\r"){const a=this.buffer[s+e+1];if(a===`
|
|
791
791
|
`||!a&&!this.atEnd)return e+s+1}return t===`
|
|
@@ -800,10 +800,10 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
|
|
|
800
800
|
`&&o>=this.pos&&o+1+t>d)e=o;else break}while(!0);return yield wo,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,s=this.pos-1,a;for(;a=this.buffer[++s];)if(a===":"){const o=this.buffer[s+1];if(vn(o)||e&&ec.has(o))break;t=s}else if(vn(a)){let o=this.buffer[s+1];if(a==="\r"&&(o===`
|
|
801
801
|
`?(s+=1,a=`
|
|
802
802
|
`,o=this.buffer[s+1]):t=s),o==="#"||e&&ec.has(o))break;if(a===`
|
|
803
|
-
`){const c=this.continueScalar(s+1);if(c===-1)break;s=Math.max(s,c-2)}}else{if(e&&ec.has(a))break;t=s}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield wo,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Xh))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(vn(t)||e&&ec.has(t))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,t=this.buffer[e];for(;!vn(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(
|
|
803
|
+
`){const c=this.continueScalar(s+1);if(c===-1)break;s=Math.max(s,c-2)}}else{if(e&&ec.has(a))break;t=s}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield wo,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Xh))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(vn(t)||e&&ec.has(t))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,t=this.buffer[e];for(;!vn(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Mk.has(t))t=this.buffer[++e];else if(t==="%"&&Eb.has(this.buffer[e+1])&&Eb.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
|
|
804
804
|
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
805
805
|
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,s;do s=this.buffer[++t];while(s===" "||e&&s===" ");const a=t-this.pos;return a>0&&(yield this.buffer.substr(this.pos,a),this.pos=t),a}*pushUntil(e){let t=this.pos,s=this.buffer[t];for(;!e(s);)s=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class xS{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,s=this.lineStarts.length;for(;t<s;){const o=t+s>>1;this.lineStarts[o]<e?t=o+1:s=o}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};const a=this.lineStarts[t-1];return{line:t,col:e-a+1}}}}function Pi(i,e){for(let t=0;t<i.length;++t)if(i[t].type===e)return!0;return!1}function Ab(i){for(let e=0;e<i.length;++e)switch(i[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function TS(i){switch(i==null?void 0:i.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function tc(i){switch(i.type){case"document":return i.start;case"block-map":{const e=i.items[i.items.length-1];return e.sep??e.start}case"block-seq":return i.items[i.items.length-1].start;default:return[]}}function vr(i){var t;if(i.length===0)return[];let e=i.length;e:for(;--e>=0;)switch(i[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=i[++e])==null?void 0:t.type)==="space";);return i.splice(e,i.length)}function Cb(i){if(i.start.type==="flow-seq-start")for(const e of i.items)e.sep&&!e.value&&!Pi(e.start,"explicit-key-ind")&&!Pi(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,TS(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 pg{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 wS,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(e,t))yield*this.next(s);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=SS(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(e==null?void 0: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 t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{const s=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in s?s.indent:0:t.type==="flow-collection"&&s.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Cb(t),s.type){case"document":s.value=t;break;case"block-scalar":s.props.push(t);break;case"block-map":{const a=s.items[s.items.length-1];if(a.value){s.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(a.sep)a.value=t;else{Object.assign(a,{key:t,sep:[]}),this.onKeyLine=!a.explicitKey;return}break}case"block-seq":{const a=s.items[s.items.length-1];a.value?s.items.push({start:[],value:t}):a.value=t;break}case"flow-collection":{const a=s.items[s.items.length-1];!a||a.value?s.items.push({start:[],key:t,sep:[]}):a.sep?a.value=t:Object.assign(a,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const a=t.items[t.items.length-1];a&&!a.sep&&!a.value&&a.start.length>0&&Ab(a.start)===-1&&(t.indent===0||a.start.every(o=>o.type!=="comment"||o.indent<t.indent))&&(s.type==="document"?s.end=a.start:s.items.push({start:a.start}),t.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":{Ab(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 t=this.startBlockValue(e);t?this.stack.push(t):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 t=tc(this.peek(2)),s=vr(t);let a;e.end?(a=e.end,a.push(this.sourceToken),delete e.end):a=[this.sourceToken];const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
|
|
806
806
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
807
807
|
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var s;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const a="end"in t.value?t.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const a=e.items[e.items.length-2],o=(s=a==null?void 0:a.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,t.start),o.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const a=!this.onKeyLine&&this.indent===e.indent,o=a&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(o&&t.sep&&!t.value){const d=[];for(let h=0;h<t.sep.length;++h){const f=t.sep[h];switch(f.type){case"newline":d.push(h);break;case"space":break;case"comment":f.indent>e.indent&&(d.length=0);break;default:d.length=0}}d.length>=2&&(c=t.sep.splice(d[1]))}switch(this.type){case"anchor":case"tag":o||t.value?(c.push(this.sourceToken),e.items.push({start:c}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):o||t.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(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Pi(t.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(TS(t.key)&&!Pi(t.sep,"newline")){const d=vr(t.start),h=t.key,f=t.sep;f.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:h,sep:f}]})}else c.length>0?t.sep=t.sep.concat(c,this.sourceToken):t.sep.push(this.sourceToken);else if(Pi(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const d=vr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||o?e.items.push({start:c,key:null,sep:[this.sourceToken]}):Pi(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const d=this.flowScalar(this.type);o||t.value?(e.items.push({start:c,key:d,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(d):(Object.assign(t,{key:d,sep:[]}),this.onKeyLine=!0);return}default:{const d=this.startBlockValue(e);if(d){if(d.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Pi(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else a&&e.items.push({start:c});this.stack.push(d);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var s;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const a="end"in t.value?t.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const a=e.items[e.items.length-2],o=(s=a==null?void 0:a.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,t.start),o.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Pi(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const a=this.startBlockValue(e);if(a){this.stack.push(a);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while((s==null?void 0:s.type)==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:a,sep:[]}):t.sep?this.stack.push(a):Object.assign(t,{key:a,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){const a=tc(s),o=vr(a);Cb(e);const c=e.end.splice(1,e.end.length);c.push(this.sourceToken);const d={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=d}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
|
|
808
808
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
809
|
-
`,t)+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 t=tc(e),s=vr(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=tc(e),s=vr(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function ES(i){const e=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||e&&new xS||null,prettyErrors:e}}function Ak(i,e={}){const{lineCounter:t,prettyErrors:s}=ES(e),a=new pg(t==null?void 0:t.addNewLine),o=new gg(e),c=Array.from(o.compose(a.parse(i)));if(s&&t)for(const d of c)d.errors.forEach(Mc(i,t)),d.warnings.forEach(Mc(i,t));return c.length>0?c:Object.assign([],{empty:!0},o.streamInfo())}function AS(i,e={}){const{lineCounter:t,prettyErrors:s}=ES(e),a=new pg(t==null?void 0:t.addNewLine),o=new gg(e);let c=null;for(const d of o.compose(a.parse(i),!0,i.length))if(!c)c=d;else if(c.options.logLevel!=="silent"){c.errors.push(new ws(d.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&t&&(c.errors.forEach(Mc(i,t)),c.warnings.forEach(Mc(i,t))),c}function Ck(i,e,t){let s;typeof e=="function"?s=e:t===void 0&&e&&typeof e=="object"&&(t=e);const a=AS(i,t);if(!a)return null;if(a.warnings.forEach(o=>Fv(a.options.logLevel,o)),a.errors.length>0){if(a.options.logLevel!=="silent")throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:s},t))}function kk(i,e,t){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const a=Math.round(t);t=a<1?void 0:a>8?{indent:8}:{indent:a}}if(i===void 0){const{keepUndefined:a}=t??e??{};if(!a)return}return Cs(i)&&!s?i.toString(t):new Wc(i,s,t).toString(t)}const CS=Object.freeze(Object.defineProperty({__proto__:null,Alias:Pc,CST:xk,Composer:gg,Document:Wc,Lexer:wS,LineCounter:xS,Pair:wt,Parser:pg,Scalar:ge,Schema:Jc,YAMLError:hg,YAMLMap:Wt,YAMLParseError:ws,YAMLSeq:Fi,YAMLWarning:dS,isAlias:Xi,isCollection:qe,isDocument:Cs,isMap:Ur,isNode:Ve,isPair:Ue,isScalar:He,isSeq:qr,parse:Ck,parseAllDocuments:Ak,parseDocument:AS,stringify:kk,visit:ks,visitAsync:Ic},Symbol.toStringTag,{value:"Module"})),Nk=({action:i,model:e,sdkLanguage:t,testIdAttributeName:s,isInspecting:a,setIsInspecting:o,highlightedElement:c,setHighlightedElement:d})=>{const[h,f]=P.useState("action"),[y]=hn("shouldPopulateCanvasFromScreenshot",!1),m=P.useMemo(()=>Ok(i),[i]),{snapshotInfoUrl:_,snapshotUrl:b,popoutUrl:x}=P.useMemo(()=>{const T=m[h];return e&&T?Rk(e.traceUri,T,y):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[m,h,y,e]),v=P.useMemo(()=>_!==void 0?{snapshotInfoUrl:_,snapshotUrl:b,popoutUrl:x}:void 0,[_,b,x]);return w.jsxs("div",{className:"snapshot-tab vbox",children:[w.jsxs(Nf,{children:[w.jsx(qt,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:a,onClick:()=>o(!a)}),w.jsx("div",{className:"hbox",style:{height:"100%"},role:"tablist",children:["action","before","after"].map(T=>w.jsx(S0,{id:T,title:Lk(T),selected:h===T,onSelect:()=>f(T)},T))}),w.jsx("div",{style:{flex:"auto"}}),w.jsx(qt,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(v!=null&&v.popoutUrl),onClick:()=>{const T=window.open((v==null?void 0:v.popoutUrl)||"","_blank");T==null||T.addEventListener("DOMContentLoaded",()=>{new Tv(T,{isUnderTest:NS,sdkLanguage:t,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),w.jsx(Mk,{snapshotUrls:v,sdkLanguage:t,testIdAttributeName:s,isInspecting:a,setIsInspecting:o,highlightedElement:c,setHighlightedElement:d})]})},Mk=({snapshotUrls:i,sdkLanguage:e,testIdAttributeName:t,isInspecting:s,setIsInspecting:a,highlightedElement:o,setHighlightedElement:c})=>{const d=P.useRef(null),h=P.useRef(null),[f,y]=P.useState({viewport:MS,url:""}),m=P.useRef({iteration:0,visibleIframe:0});return P.useEffect(()=>{(async()=>{const _=m.current.iteration+1,b=1-m.current.visibleIframe;m.current.iteration=_;const x=await jk(i==null?void 0:i.snapshotInfoUrl);if(m.current.iteration!==_)return;const v=[d,h][b].current;if(v){let T=()=>{};const A=new Promise(C=>T=C);try{v.addEventListener("load",T),v.addEventListener("error",T);const C=(i==null?void 0:i.snapshotUrl)||Hk;v.contentWindow?v.contentWindow.location.replace(C):v.src=C,await A}catch{}finally{v.removeEventListener("load",T),v.removeEventListener("error",T)}}m.current.iteration===_&&(m.current.visibleIframe=b,y(x))})()},[i]),w.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:_=>{_.key==="Escape"&&s&&a(!1)},children:[w.jsx(kb,{isInspecting:s,sdkLanguage:e,testIdAttributeName:t,highlightedElement:o,setHighlightedElement:c,iframe:d.current,iteration:m.current.iteration}),w.jsx(kb,{isInspecting:s,sdkLanguage:e,testIdAttributeName:t,highlightedElement:o,setHighlightedElement:c,iframe:h.current,iteration:m.current.iteration}),w.jsx(Dk,{snapshotInfo:f,children:w.jsxs("div",{className:"snapshot-switcher",children:[w.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:We(m.current.visibleIframe===0&&"snapshot-visible")}),w.jsx("iframe",{ref:h,name:"snapshot",title:"DOM Snapshot",className:We(m.current.visibleIframe===1&&"snapshot-visible")})]})})]})},Dk=({snapshotInfo:i,children:e})=>{const[t,s]=Es(),a=40,o={width:i.viewport.width,height:i.viewport.height},c={width:Math.max(o.width,480),height:Math.max(o.height+a,320)},d=Math.min(t.width/c.width,t.height/c.height,1),h={x:(t.width-c.width)/2,y:(t.height-c.height)/2};return w.jsx("div",{ref:s,className:"snapshot-wrapper",children:w.jsxs("div",{className:"snapshot-container",style:{width:c.width+"px",height:c.height+"px",transform:`translate(${h.x}px, ${h.y}px) scale(${d})`},children:[w.jsx(vC,{url:i.url}),w.jsx("div",{className:"snapshot-browser-body",children:w.jsx("div",{style:{width:o.width+"px",height:o.height+"px"},children:e})})]})})};function Lk(i){return i==="before"?"Before":i==="after"?"After":i==="action"?"Action":i}const kb=({iframe:i,isInspecting:e,sdkLanguage:t,testIdAttributeName:s,highlightedElement:a,setHighlightedElement:o,iteration:c})=>(P.useEffect(()=>{const d=a.lastEdited==="ariaSnapshot"?a.ariaSnapshot:void 0,h=a.lastEdited==="locator"?a.locator:void 0,f=!!d||!!h||e,y=[],m=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{kS(y,f,t,s,m,"",i==null?void 0:i.contentWindow)}catch{}const _=d?Mf(CS,d):void 0,b=h?_C(t,h,s):void 0;for(const{recorder:x,frameSelector:v}of y){const T=b!=null&&b.startsWith(v)?b.substring(v.length).trim():void 0,A=(_==null?void 0:_.errors.length)===0?_.fragment:void 0;x.setUIState({mode:e?"inspecting":"none",actionSelector:T,ariaTemplate:A,language:t,testIdAttributeName:s,overlay:{offsetX:0}},{async elementPicked(C){o({locator:qi(t,v+C.selector),ariaSnapshot:C.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const C of y)C.recorder!==x&&C.recorder.clearHighlight()}})}},[i,e,a,o,t,s,c]),w.jsx(w.Fragment,{}));function kS(i,e,t,s,a,o,c){if(!c)return;const d=c;if(!d._recorder&&e){const h=new Tv(c,{isUnderTest:a,sdkLanguage:t,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}),f=new hf(h);d._injectedScript=h,d._recorder={recorder:f,frameSelector:o},a&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(f)))}d._recorder&&i.push(d._recorder);for(let h=0;h<c.frames.length;++h){const f=c.frames[h],y=f.frameElement?d._injectedScript.generateSelectorSimple(f.frameElement,{omitInternalEngines:!0,testIdAttributeName:s})+" >> internal:control=enter-frame >> ":"";kS(i,e,t,s,a,o+y,f)}}const Qa=(i,e,t=!1)=>{if(!i)return;const s=i[e];if(s){if(!i.pageId){console.error("snapshot action must have a pageId");return}return{action:i,snapshotName:s,pageId:i.pageId,point:i.point,hasInputTarget:t}}};function Ok(i){if(!i)return{};let e=Qa(i,"beforeSnapshot");if(!e){for(let a=A_(i);a;a=A_(a))if(a.endTime<=i.startTime&&a.afterSnapshot){e=Qa(a,"afterSnapshot");break}}let t=Qa(i,"afterSnapshot");if(!t){let a;for(let o=C_(i);o&&o.startTime<=i.endTime;o=C_(o))o.endTime>i.endTime||!o.afterSnapshot||a&&a.endTime>o.endTime||(a=o);a?t=Qa(a,"afterSnapshot"):t=e}const s=Qa(i,"inputSnapshot",!0)??t;return s&&(s.point=i.point),{action:s,before:e,after:t}}const NS=new URLSearchParams(window.location.search).has("isUnderTest");function Rk(i,e,t){const s=new URLSearchParams;s.set("trace",i),s.set("name",e.snapshotName),NS&&s.set("isUnderTest","true"),e.point&&(s.set("pointX",String(e.point.x)),s.set("pointY",String(e.point.y)),e.hasInputTarget&&s.set("hasInputTarget","1")),t&&s.set("shouldPopulateCanvasFromScreenshot","1");const a=new URL(`snapshot/${e.pageId}?${s.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${e.pageId}?${s.toString()}`,window.location.href).toString(),c=new URLSearchParams;c.set("r",a),c.set("trace",i);const d=new URL(`snapshot.html?${c.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:a,popoutUrl:d}}async function jk(i){const e={url:"",viewport:MS,timestamp:void 0,wallTime:void 0};if(i){const s=await(await fetch(i)).json();s.error||(e.url=s.url,e.viewport=s.viewport,e.timestamp=s.timestamp,e.wallTime=s.wallTime)}return e}const MS={width:1280,height:720},Hk='data:text/html,<body style="background: #ddd"></body>',DS={width:200,height:45},wr=2.5,zk=DS.height+wr*2,$k=({boundaries:i,previewPoint:e})=>{var y,m;const t=ui(),[s,a]=Es(),o=P.useRef(null);let c=0;if(o.current&&e){const _=o.current.getBoundingClientRect();c=(e.clientY-_.top+o.current.scrollTop)/zk|0}const d=(m=(y=t==null?void 0:t.pages)==null?void 0:y[c])==null?void 0:m.screencastFrames;let h,f;if(e!==void 0&&d&&d.length){const _=i.minimum+(i.maximum-i.minimum)*e.x/s.width;h=d[Mb(d,_,LS)-1];const b={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};f=h?OS({width:h.width,height:h.height},b):void 0}return w.jsxs("div",{className:"film-strip",ref:a,children:[w.jsx("div",{className:"film-strip-lanes",ref:o,children:t==null?void 0:t.pages.map((_,b)=>_.screencastFrames.length?w.jsx(Bk,{boundaries:i,page:_,width:s.width},b):null)}),t&&(e==null?void 0:e.x)!==void 0&&w.jsxs("div",{className:"film-strip-hover",style:{top:s.bottom+5,left:Math.min(e.x,s.width-(f?f.width:0)-10)},children:[e.action&&w.jsx("div",{className:"film-strip-hover-title",children:Cf(e.action,e)}),h&&f&&w.jsx("div",{style:{width:f.width,height:f.height},children:w.jsx("img",{src:t.createRelativeUrl(`sha1/${h.sha1}`),width:f.width,height:f.height})})]})]})},Bk=({boundaries:i,page:e,width:t})=>{const s=ui(),a={width:0,height:0},o=e.screencastFrames;for(const T of o)a.width=Math.max(a.width,T.width),a.height=Math.max(a.height,T.height);const c=OS(a,DS),d=o[0].timestamp,h=o[o.length-1].timestamp,f=i.maximum-i.minimum,y=(d-i.minimum)/f*t,m=(i.maximum-h)/f*t,b=(h-d)/f*t/(c.width+2*wr)|0,x=(h-d)/b,v=[];for(let T=0;d&&x&&T<b;++T){const A=d+x*T,C=Mb(o,A,LS)-1;v.push(w.jsx("div",{className:"film-strip-frame",style:{width:c.width,height:c.height,backgroundImage:`url(${s==null?void 0:s.createRelativeUrl("sha1/"+o[C].sha1)})`,backgroundSize:`${c.width}px ${c.height}px`,margin:wr,marginRight:wr}},T))}return v.push(w.jsx("div",{className:"film-strip-frame",style:{width:c.width,height:c.height,backgroundImage:`url(${s==null?void 0:s.createRelativeUrl("sha1/"+o[o.length-1].sha1)})`,backgroundSize:`${c.width}px ${c.height}px`,margin:wr,marginRight:wr}},v.length)),w.jsx("div",{className:"film-strip-lane",style:{marginLeft:y+"px",marginRight:m+"px"},children:v})};function LS(i,e){return i-e.timestamp}function OS(i,e){const t=Math.max(i.width/e.width,i.height/e.height);return{width:i.width/t|0,height:i.height/t|0}}const Ik=({model:i,boundaries:e,consoleEntries:t,networkResources:s,onSelected:a,highlightedAction:o,highlightedResourceOrdinal:c,highlightedConsoleEntryOrdinal:d,selectedTime:h,setSelectedTime:f,sdkLanguage:y})=>{const[m,_]=Es(),[b,x]=P.useState(),[v,T]=P.useState(),[A]=hn("actionsFilter",[]),{offsets:C,curtainLeft:L,curtainRight:j}=P.useMemo(()=>{let J=h||e;if(b&&b.startX!==b.endX){const Z=On(m.width,e,b.startX),ae=On(m.width,e,b.endX);J={minimum:Math.min(Z,ae),maximum:Math.max(Z,ae)}}const te=un(m.width,e,J.minimum),I=un(m.width,e,e.maximum)-un(m.width,e,J.maximum);return{offsets:Pk(m.width,e),curtainLeft:te,curtainRight:I}},[h,e,b,m]),D=P.useMemo(()=>i==null?void 0:i.filteredActions(A),[i,A]),F=P.useMemo(()=>{const J=[];for(const te of D||[])J.push({action:te,leftTime:te.startTime,rightTime:te.endTime||e.maximum,leftPosition:un(m.width,e,te.startTime),rightPosition:un(m.width,e,te.endTime||e.maximum),active:!1,error:!!te.error});for(const te of(i==null?void 0:i.resources)||[]){const Ne=te._monotonicTime,I=te._monotonicTime+te.time;J.push({resource:te,leftTime:Ne,rightTime:I,leftPosition:un(m.width,e,Ne),rightPosition:un(m.width,e,I),active:!1,error:!1})}for(const te of t||[])J.push({consoleMessage:te,leftTime:te.timestamp,rightTime:te.timestamp,leftPosition:un(m.width,e,te.timestamp),rightPosition:un(m.width,e,te.timestamp),active:!1,error:te.isError});return J},[i,D,t,e,m]);P.useMemo(()=>{for(const J of F)o?J.active=J.action===o:c!==void 0?J.active=J.resource===(s==null?void 0:s[c]):d!==void 0?J.active=J.consoleMessage===(t==null?void 0:t[d]):J.active=!1},[F,o,c,d,t,s]);const B=P.useCallback(J=>{if(T(void 0),!_.current)return;const te=J.clientX-_.current.getBoundingClientRect().left,Ne=On(m.width,e,te),I=h?un(m.width,e,h.minimum):0,Z=h?un(m.width,e,h.maximum):0;h&&Math.abs(te-I)<10?x({startX:Z,endX:te,type:"resize"}):h&&Math.abs(te-Z)<10?x({startX:I,endX:te,type:"resize"}):h&&Ne>h.minimum&&Ne<h.maximum&&J.clientY-_.current.getBoundingClientRect().top<20?x({startX:I,endX:Z,pivot:te,type:"move"}):x({startX:te,endX:te,type:"resize"})},[e,m,_,h]),q=P.useCallback(J=>{if(!_.current)return;const te=J.clientX-_.current.getBoundingClientRect().left,Ne=On(m.width,e,te),I=D==null?void 0:D.findLast(xe=>xe.startTime<=Ne);if(!J.buttons){x(void 0);return}if(I&&a(I),!b)return;let Z=b;if(b.type==="resize")Z={...b,endX:te};else{const xe=te-b.pivot;let N=b.startX+xe,G=b.endX+xe;N<0&&(N=0,G=N+(b.endX-b.startX)),G>m.width&&(G=m.width,N=G-(b.endX-b.startX)),Z={...b,startX:N,endX:G,pivot:te}}x(Z);const ae=On(m.width,e,Z.startX),we=On(m.width,e,Z.endX);ae!==we&&f({minimum:Math.min(ae,we),maximum:Math.max(ae,we)})},[e,b,m,D,a,_,f]),O=P.useCallback(()=>{if(T(void 0),!!b){if(b.startX!==b.endX){const J=On(m.width,e,b.startX),te=On(m.width,e,b.endX);f({minimum:Math.min(J,te),maximum:Math.max(J,te)})}else{const J=On(m.width,e,b.startX),te=D==null?void 0:D.findLast(Ne=>Ne.startTime<=J);te&&a(te),f(void 0)}x(void 0)}},[e,b,m,D,f,a]),Q=P.useCallback(J=>{if(!_.current)return;const te=J.clientX-_.current.getBoundingClientRect().left,Ne=On(m.width,e,te),I=D==null?void 0:D.findLast(Z=>Z.startTime<=Ne);T({x:te,clientY:J.clientY,action:I,sdkLanguage:y})},[e,m,D,_,y]),se=P.useCallback(()=>{T(void 0)},[]),Y=P.useCallback(()=>{f(void 0)},[f]);return w.jsxs("div",{className:"timeline-view-container",children:[!!b&&w.jsx(g0,{cursor:(b==null?void 0:b.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:O,onPaneMouseMove:q,onPaneDoubleClick:Y}),w.jsxs("div",{ref:_,className:"timeline-view",onMouseDown:B,onMouseMove:Q,onMouseLeave:se,children:[w.jsx("div",{className:"timeline-grid",children:C.map((J,te)=>w.jsx("div",{className:"timeline-divider",style:{left:J.position+"px"},children:w.jsx("div",{className:"timeline-time",children:kt(J.time-e.minimum)})},te))}),w.jsx("div",{style:{height:8}}),w.jsx($k,{boundaries:e,previewPoint:v}),w.jsx("div",{className:"timeline-bars",children:F.filter(J=>!J.action||J.action.class!=="Test").map((J,te)=>w.jsx("div",{className:We("timeline-bar",J.action&&"action",J.resource&&"network",J.consoleMessage&&"console-message",J.active&&"active",J.error&&"error"),style:{left:J.leftPosition,width:Math.max(5,J.rightPosition-J.leftPosition),top:Uk(J),bottom:0}},te))}),w.jsx("div",{className:"timeline-marker",style:{display:v!==void 0?"block":"none",left:((v==null?void 0:v.x)||0)+"px"}}),h&&w.jsxs("div",{className:"timeline-window",children:[w.jsx("div",{className:"timeline-window-curtain left",style:{width:L}}),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:j}})]})]})]})};function Pk(i,e){let s=i/64;const a=e.maximum-e.minimum,o=i/a;let c=a/s;const d=Math.ceil(Math.log(c)/Math.LN10);c=Math.pow(10,d),c*o>=320&&(c=c/5),c*o>=128&&(c=c/2);const h=e.minimum;let f=e.maximum;f+=64/o,s=Math.ceil((f-h)/c),c||(s=0);const y=[];for(let m=0;m<s;++m){const _=h+c*m;y.push({position:un(i,e,_),time:_})}return y}function un(i,e,t){return(t-e.minimum)/(e.maximum-e.minimum)*i}function On(i,e,t){return t/i*(e.maximum-e.minimum)+e.minimum}function Uk(i){return i.resource?25:20}const qk=({model:i})=>{var t,s;if(!i)return w.jsx(w.Fragment,{});const e=i.wallTime!==void 0?new Date(i.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return w.jsxs("div",{style:{flex:"auto",display:"block",overflow:"hidden auto"},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:kt(i.endTime-i.startTime),children:kt(i.endTime-i.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:i.browserName,children:i.browserName})]}),i.channel&&w.jsxs("div",{className:"call-line",children:["channel:",w.jsx("span",{className:"call-value string",title:i.channel,children:i.channel})]}),i.platform&&w.jsxs("div",{className:"call-line",children:["platform:",w.jsx("span",{className:"call-value string",title:i.platform,children:i.platform})]}),i.playwrightVersion&&w.jsxs("div",{className:"call-line",children:["playwright version:",w.jsx("span",{className:"call-value string",title:i.playwrightVersion,children:i.playwrightVersion})]}),i.options.userAgent&&w.jsxs("div",{className:"call-line",children:["user agent:",w.jsx("span",{className:"call-value datetime",title:i.options.userAgent,children:i.options.userAgent})]}),i.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:i.options.baseURL,title:i.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:i.options.baseURL})]})]}),w.jsx("div",{className:"call-section",children:"Viewport"}),i.options.viewport&&w.jsxs("div",{className:"call-line",children:["width:",w.jsx("span",{className:"call-value number",title:String(!!((t=i.options.viewport)!=null&&t.width)),children:i.options.viewport.width})]}),i.options.viewport&&w.jsxs("div",{className:"call-line",children:["height:",w.jsx("span",{className:"call-value number",title:String(!!((s=i.options.viewport)!=null&&s.height)),children:i.options.viewport.height})]}),w.jsxs("div",{className:"call-line",children:["is mobile:",w.jsx("span",{className:"call-value boolean",title:String(!!i.options.isMobile),children:String(!!i.options.isMobile)})]}),i.options.deviceScaleFactor&&w.jsxs("div",{className:"call-line",children:["device scale:",w.jsx("span",{className:"call-value number",title:String(i.options.deviceScaleFactor),children:String(i.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:i.pages.length})]}),w.jsxs("div",{className:"call-line",children:["actions:",w.jsx("span",{className:"call-value number",children:i.actions.length})]}),w.jsxs("div",{className:"call-line",children:["events:",w.jsx("span",{className:"call-value number",children:i.events.length})]})]})},Vk=({annotations:i})=>i.length?w.jsx("div",{className:"annotations-tab",children:i.map((e,t)=>w.jsxs("div",{className:"annotation-item",children:[w.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&w.jsxs("span",{children:[": ",y0(e.description)]})]},`annotation-${t}`))}):w.jsx(As,{text:"No annotations"}),Fk=({sdkLanguage:i,isInspecting:e,setIsInspecting:t,highlightedElement:s,setHighlightedElement:a})=>{const[o,c]=P.useState(),d=P.useCallback(h=>{const{errors:f}=Mf(CS,h,{prettyErrors:!1}),y=f.map(m=>({message:m.message,line:m.range[1].line,column:m.range[1].col,type:"subtle-error"}));c(y),a({...s,ariaSnapshot:h,lastEdited:"ariaSnapshot"}),t(!1)},[s,a,t]);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",{children:"Locator"}),w.jsx(qt,{style:{margin:"0 4px"},title:"Pick locator",icon:"target",toggled:e,onClick:()=>t(!e)}),w.jsx("div",{style:{flex:"auto"}}),w.jsx(qt,{icon:"files",title:"Copy locator",onClick:()=>{m_(s.locator||"")}})]}),w.jsx("div",{style:{height:50},children:w.jsx(Or,{text:s.locator||"",highlighter:i,isFocused:!0,wrapLines:!0,onChange:h=>{a({...s,locator:h,lastEdited:"locator"}),t(!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(qt,{icon:"files",title:"Copy snapshot",onClick:()=>{m_(s.ariaSnapshot||"")}})]}),w.jsx("div",{style:{height:150},children:w.jsx(Or,{text:s.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:o,onChange:d})})]})},Gk=({className:i,style:e,open:t,isModal:s,minWidth:a,verticalOffset:o,requestClose:c,anchor:d,dataTestId:h,children:f})=>{const y=P.useRef(null),[m,_]=P.useState(0),[b]=Yh(y),[x,v]=Yh(d),T=d?Xk(b,x,o):void 0;return P.useEffect(()=>{const A=L=>{!y.current||!(L.target instanceof Node)||y.current.contains(L.target)||c==null||c()},C=L=>{L.key==="Escape"&&(c==null||c())};return t?(document.addEventListener("mousedown",A),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",A),document.removeEventListener("keydown",C)}):()=>{}},[t,c]),P.useLayoutEffect(()=>v(),[t,v]),P.useEffect(()=>{const A=()=>_(C=>C+1);return window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}},[]),P.useLayoutEffect(()=>{y.current&&(t?s?y.current.showModal():y.current.show():y.current.close())},[t,s]),w.jsx("dialog",{ref:y,style:{position:"fixed",margin:T?0:void 0,zIndex:110,top:T==null?void 0:T.top,left:T==null?void 0:T.left,minWidth:a||0,...e},className:i,"data-testid":h,children:f})};function Xk(i,e,t=4,s=4){let a=Math.max(s,e.left);a+i.width>window.innerWidth-s&&(a=window.innerWidth-i.width-s);let o=Math.max(0,e.bottom)+t;return o+i.height>window.innerHeight-t&&(Math.max(0,e.top)>i.height+t?o=Math.max(0,e.top)-i.height-t:o=window.innerHeight-t-i.height),{left:a,top:o}}const Yk=({title:i,icon:e,buttonChildren:t,anchorRef:s,dialogDataTestId:a,children:o})=>{const c=P.useRef(null),d=s??c,[h,f]=P.useState(!1);return w.jsxs(w.Fragment,{children:[w.jsx(qt,{ref:c,icon:e,title:i,onClick:()=>f(y=>!y),children:t}),w.jsx(Gk,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:h,verticalOffset:8,requestClose:()=>f(!1),anchor:d,dataTestId:a,children:o})]})},RS=({settings:i})=>w.jsx("div",{className:"vbox settings-view",children:i.map(e=>{const t=`setting-${e.name.replaceAll(/\s+/g,"-")}`;return w.jsx("div",{className:`setting setting-${e.type}`,title:e.title,children:Kk(e,t)},e.name)})}),Kk=(i,e)=>{switch(i.type){case"check":return w.jsxs(w.Fragment,{children:[w.jsx("input",{type:"checkbox",id:e,checked:i.value,onChange:()=>i.set(!i.value)}),w.jsxs("label",{htmlFor:e,children:[i.name,!!i.count&&w.jsx("span",{className:"setting-counter",children:i.count})]})]});case"select":return w.jsxs(w.Fragment,{children:[w.jsxs("label",{htmlFor:e,children:[i.name,":",!!i.count&&w.jsx("span",{className:"setting-counter",children:i.count})]}),w.jsx("select",{id:e,value:i.value,onChange:t=>i.set(t.target.value),children:i.options.map(t=>w.jsx("option",{value:t.value,children:t.label},t.value))})]});default:return null}},oN=i=>{var t;const e=Zk((t=i.model)==null?void 0:t.traceUri);return w.jsx(_0.Provider,{value:i.model,children:w.jsx(Jk,{partition:e,...i})})},Jk=i=>{var Mo;const{partition:e,model:t,showSourcesFirst:s,rootDir:a,fallbackLocation:o,isLive:c,hideTimeline:d,status:h,annotations:f,inert:y,onOpenExternally:m,revealSource:_,testRunMetadata:b}=i,[x,v]=hn("navigatorTab","actions"),[T,A]=hn("propertiesTab",s?"source":"call"),[C,L]=hn("propertiesSidebarLocation","bottom"),[j]=hn("actionsFilter",[]),[D,F]=$i("selectedCallId"),[B,q]=$i("selectedTime"),[O,Q]=$i("highlightedCallId"),[se,Y]=$i("revealedErrorKey"),[J,te]=$i("highlightedConsoleMessageOrdinal"),[Ne,I]=$i("revealedAttachmentCallId"),[Z,ae]=$i("highlightedResourceOrdinal"),[we,xe]=$i("treeState",{expandedItems:new Map});tx(e);const[N,G]=P.useState({lastEdited:"none"}),[ee,ne]=P.useState(!1),de=P.useCallback(ue=>{F(ue==null?void 0:ue.callId),Y(void 0)},[F,Y]),oe=P.useMemo(()=>t==null?void 0:t.filteredActions(j),[t,j]),Ee=((t==null?void 0:t.actions.length)??0)-((oe==null?void 0:oe.length)??0),st=P.useMemo(()=>oe==null?void 0:oe.find(ue=>ue.callId===O),[oe,O]),ze=P.useCallback(ue=>{Q(ue==null?void 0:ue.callId)},[Q]),Yi=P.useMemo(()=>(t==null?void 0:t.sources)||new Map,[t]);P.useEffect(()=>{q(void 0),Y(void 0)},[t,q,Y]);const zn=P.useMemo(()=>{if(D){const An=oe==null?void 0:oe.find(Zt=>Zt.callId===D);if(An)return An}const ue=t==null?void 0:t.failedAction();if(ue)return ue;if(oe!=null&&oe.length){let An=oe.length-1;for(let Zt=0;Zt<oe.length;++Zt)if(oe[Zt].title==="After Hooks"&&Zt){An=Zt-1;break}return oe[An]}},[t,oe,D]),mn=P.useMemo(()=>st||zn,[zn,st]),Gr=P.useCallback(ue=>{de(ue),ze(void 0)},[de,ze]),rt=P.useCallback(ue=>{A(ue),ue!=="inspector"&&ne(!1)},[A]),Ns=P.useCallback(ue=>{!ee&&ue&&rt("inspector"),ne(ue)},[ne,rt,ee]),Xr=P.useCallback(ue=>{G(ue),rt("inspector")},[rt]),tu=P.useCallback(ue=>{rt("attachments"),I({callId:ue})},[rt,I]);P.useEffect(()=>{_&&rt("source")},[_,rt]);const Ms=KT(t,B),Ki=vE(t,B),di=VT(t),Yr=P.useMemo(()=>{var ue;return se!==void 0?(ue=di.errors.get(se))==null?void 0:ue.stack:mn==null?void 0:mn.stack},[mn,se,di]),hi=(t==null?void 0:t.sdkLanguage)||"javascript",nu={id:"inspector",title:"Locator",render:()=>w.jsx(Fk,{sdkLanguage:hi,isInspecting:ee,setIsInspecting:Ns,highlightedElement:N,setHighlightedElement:G})},xt={id:"call",title:"Call",render:()=>w.jsx(dT,{action:mn,startTimeOffset:(t==null?void 0:t.startTime)??0,sdkLanguage:hi})},iu={id:"log",title:"Log",render:()=>w.jsx(gT,{action:mn,isLive:c})},ko={id:"errors",title:"Errors",errorCount:di.errors.size,render:()=>w.jsx(GT,{errorsModel:di,testRunMetadata:b,sdkLanguage:hi,revealInSource:ue=>{ue.action?de(ue.action):Y(ue.message),rt("source")},wallTime:(t==null?void 0:t.wallTime)??0})};let Kr;!zn&&o&&(Kr=(Mo=o.source)==null?void 0:Mo.errors.length);const fi={id:"source",title:"Source",errorCount:Kr,render:()=>w.jsx(PT,{stack:Yr,sources:Yi,rootDir:a,stackFrameLocation:C==="bottom"?"right":"bottom",fallbackLocation:o,onOpenExternally:m})},su={id:"console",title:"Console",count:Ms.entries.length,render:()=>w.jsx(JT,{consoleModel:Ms,boundaries:$n,selectedTime:B,onAccepted:ue=>q({minimum:ue.timestamp,maximum:ue.timestamp}),onEntryHovered:te})},No={id:"network",title:"Network",count:Ki.resources.length,render:()=>w.jsx(SE,{boundaries:$n,networkModel:Ki,onResourceHovered:ae,sdkLanguage:(t==null?void 0:t.sdkLanguage)??"javascript"})},ru={id:"attachments",title:"Attachments",count:t==null?void 0:t.visibleAttachments.length,render:()=>w.jsx(OT,{revealedAttachmentCallId:Ne})},Ji=[nu,xt,iu,ko,su,No,fi,ru];if(f!==void 0){const ue={id:"annotations",title:"Annotations",count:f.length,render:()=>w.jsx(Vk,{annotations:f})};Ji.push(ue)}if(s){const ue=Ji.indexOf(fi);Ji.splice(ue,1),Ji.splice(1,0,fi)}const{boundaries:$n}=P.useMemo(()=>{const ue={minimum:(t==null?void 0:t.startTime)||0,maximum:(t==null?void 0:t.endTime)||3e4};return ue.minimum>ue.maximum&&(ue.minimum=0,ue.maximum=3e4),ue.maximum+=(ue.maximum-ue.minimum)/20,{boundaries:ue}},[t]);let ct=0;!c&&t&&t.endTime>=0?ct=t.endTime-t.startTime:t&&t.wallTime&&(ct=Date.now()-t.wallTime);const En={id:"actions",title:"Actions",component:w.jsxs("div",{className:"vbox",children:[h&&w.jsxs("div",{className:"workbench-run-status","data-testid":"workbench-run-status",children:[w.jsx("span",{className:We("codicon",h0(h))}),w.jsx("div",{children:lT(h)}),w.jsx("div",{className:"spacer"}),w.jsx("div",{className:"workbench-run-duration",children:ct?kt(ct):""})]}),w.jsx(uT,{sdkLanguage:hi,actions:oe||[],selectedAction:t?zn:void 0,selectedTime:B,setSelectedTime:q,treeState:we,setTreeState:xe,onSelected:Gr,onHighlighted:ze,revealActionAttachment:tu,revealConsole:()=>rt("console"),isLive:c})]})},Tt={id:"metadata",title:"Metadata",component:w.jsx(qk,{model:t})},au=x==="actions"&&w.jsx(Wk,{counters:t==null?void 0:t.actionCounters,hiddenActionsCount:Ee});return w.jsxs("div",{className:"vbox workbench",...y?{inert:!0}:{},children:[!d&&w.jsx(Ik,{model:t,consoleEntries:Ms.entries,networkResources:Ki.resources,boundaries:$n,highlightedAction:st,highlightedResourceOrdinal:Z,highlightedConsoleEntryOrdinal:J,onSelected:Gr,sdkLanguage:hi,selectedTime:B,setSelectedTime:q}),w.jsx(_c,{sidebarSize:250,orientation:C==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:w.jsx(_c,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:w.jsx(Nk,{action:mn,model:t,sdkLanguage:hi,testIdAttributeName:(t==null?void 0:t.testIdAttributeName)||"data-testid",isInspecting:ee,setIsInspecting:Ns,highlightedElement:N,setHighlightedElement:Xr}),sidebar:w.jsx(tf,{tabs:[En,Tt],rightToolbar:[au],selectedTab:x,setSelectedTab:v})}),sidebar:w.jsx(tf,{tabs:Ji,selectedTab:T,setSelectedTab:rt,rightToolbar:[C==="bottom"?w.jsx(qt,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{L("right")}}):w.jsx(qt,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{L("bottom")}})],mode:C==="bottom"?"default":"select"})})]})},Wk=({counters:i,hiddenActionsCount:e})=>{const[t,s]=hn("actionsFilter",[]),a=P.useRef(null),o=w.jsxs(w.Fragment,{children:[e>0&&w.jsxs("span",{className:"workbench-actions-hidden-count",title:e+" actions hidden by filters",children:[e," hidden"]}),w.jsx("span",{ref:a,className:"codicon codicon-filter"})]});return w.jsx(Yk,{title:"Filter actions",dialogDataTestId:"actions-filter-dialog",buttonChildren:o,anchorRef:a,children:w.jsx(RS,{settings:[{type:"check",value:t.includes("getter"),set:c=>s(c?[...t,"getter"]:t.filter(d=>d!=="getter")),name:"Getters",count:i==null?void 0:i.get("getter")},{type:"check",value:t.includes("route"),set:c=>s(c?[...t,"route"]:t.filter(d=>d!=="route")),name:"Network routes",count:i==null?void 0:i.get("route")},{type:"check",value:t.includes("configuration"),set:c=>s(c?[...t,"configuration"]:t.filter(d=>d!=="configuration")),name:"Configuration",count:i==null?void 0:i.get("configuration")}]})})};function Zk(i){if(!i)return"default";const e=new URL(i,"http://localhost");return e.searchParams.delete("timestamp"),e.toString()}var Nb;(i=>{function e(t){for(const s of t.splice(0))s.dispose()}i.disposeAll=e})(Nb||(Nb={}));class Sr{constructor(){this._listeners=new Set,this.event=(e,t)=>{this._listeners.add(e);let s=!1;const a=this,o={dispose(){s||(s=!0,a._listeners.delete(e))}};return t&&t.push(o),o}}fire(e){const t=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const s of this._listeners)this._deliveryQueue.push({listener:s,event:e});if(t){for(let s=0;s<this._deliveryQueue.length;s++){const{listener:a,event:o}=this._deliveryQueue[s];a.call(null,o)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class Qk extends Error{constructor(){super("Test server connection closed")}}class lN{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",t=>e(t.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 cN{constructor(e){this._onCloseEmitter=new Sr,this._onReportEmitter=new Sr,this._onStdioEmitter=new Sr,this._onTestFilesChangedEmitter=new Sr,this._onLoadTraceRequestedEmitter=new Sr,this._onTestPausedEmitter=new Sr,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this.onTestPaused=this._onTestPausedEmitter.event,this._transport=e,this._transport.onmessage(s=>{const a=JSON.parse(s),{id:o,result:c,error:d,method:h,params:f}=a;if(o){const y=this._callbacks.get(o);if(!y)return;this._callbacks.delete(o),d?y.reject(new Error(d)):y.resolve(c)}else this._dispatchEvent(h,f)});const t=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((s,a)=>{this._transport.onopen(s),this._transport.onerror(a)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(t);for(const s of this._callbacks.values())s.reject(new Qk);this._callbacks.clear()})}isClosed(){return this._isClosed}async _sendMessage(e,t){const s=globalThis.__logForTest;s==null||s({method:e,params:t}),await this._connectedPromise;const a=++this._lastId,o={id:a,method:e,params:t};return this._transport.send(JSON.stringify(o)),new Promise((c,d)=>{this._callbacks.set(a,{resolve:c,reject:d})})}_sendMessageNoReply(e,t){this._sendMessage(e,t).catch(()=>{})}_dispatchEvent(e,t){e==="report"?this._onReportEmitter.fire(t):e==="stdio"?this._onStdioEmitter.fire(t):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(t):e==="loadTraceRequested"?this._onLoadTraceRequestedEmitter.fire(t):e==="testPaused"&&this._onTestPausedEmitter.fire(t)}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 uN=({location:i})=>{const[e,t]=hn("shouldPopulateCanvasFromScreenshot",!1),[s,a]=ox(),[o,c]=hn("mergeFiles",!1);return w.jsx(RS,{settings:[{type:"select",value:s,set:a,name:"Theme",options:rx},...i==="ui-mode"?[{type:"check",value:o,set:c,name:"Merge files"}]:[],{type:"check",value:e,set:t,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{Yk as D,m0 as E,bt as R,_c as S,rN as T,lN as W,xT as _,cN as a,uN as b,oN as c,Gk as d,tN as e,sN as f,ax as g,nN as h,iN as i,w as j,We as k,aT as l,kt as m,Nf as n,qt as o,hn as p,RS as q,P as r,_s as s,h0 as t,Es as u,Jw as v};
|
|
809
|
+
`,t)+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 t=tc(e),s=vr(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=tc(e),s=vr(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function ES(i){const e=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||e&&new xS||null,prettyErrors:e}}function Lk(i,e={}){const{lineCounter:t,prettyErrors:s}=ES(e),a=new pg(t==null?void 0:t.addNewLine),o=new gg(e),c=Array.from(o.compose(a.parse(i)));if(s&&t)for(const d of c)d.errors.forEach(Mc(i,t)),d.warnings.forEach(Mc(i,t));return c.length>0?c:Object.assign([],{empty:!0},o.streamInfo())}function AS(i,e={}){const{lineCounter:t,prettyErrors:s}=ES(e),a=new pg(t==null?void 0:t.addNewLine),o=new gg(e);let c=null;for(const d of o.compose(a.parse(i),!0,i.length))if(!c)c=d;else if(c.options.logLevel!=="silent"){c.errors.push(new ws(d.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&t&&(c.errors.forEach(Mc(i,t)),c.warnings.forEach(Mc(i,t))),c}function Ok(i,e,t){let s;typeof e=="function"?s=e:t===void 0&&e&&typeof e=="object"&&(t=e);const a=AS(i,t);if(!a)return null;if(a.warnings.forEach(o=>Fv(a.options.logLevel,o)),a.errors.length>0){if(a.options.logLevel!=="silent")throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:s},t))}function Rk(i,e,t){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const a=Math.round(t);t=a<1?void 0:a>8?{indent:8}:{indent:a}}if(i===void 0){const{keepUndefined:a}=t??e??{};if(!a)return}return Cs(i)&&!s?i.toString(t):new Wc(i,s,t).toString(t)}const CS=Object.freeze(Object.defineProperty({__proto__:null,Alias:Pc,CST:Nk,Composer:gg,Document:Wc,Lexer:wS,LineCounter:xS,Pair:wt,Parser:pg,Scalar:ge,Schema:Jc,YAMLError:hg,YAMLMap:Wt,YAMLParseError:ws,YAMLSeq:Fi,YAMLWarning:dS,isAlias:Xi,isCollection:qe,isDocument:Cs,isMap:Ur,isNode:Ve,isPair:Ue,isScalar:He,isSeq:qr,parse:Ok,parseAllDocuments:Lk,parseDocument:AS,stringify:Rk,visit:ks,visitAsync:Ic},Symbol.toStringTag,{value:"Module"})),jk=({action:i,model:e,sdkLanguage:t,testIdAttributeName:s,isInspecting:a,setIsInspecting:o,highlightedElement:c,setHighlightedElement:d})=>{const[h,f]=P.useState("action"),[y]=hn("shouldPopulateCanvasFromScreenshot",!1),m=P.useMemo(()=>Bk(i),[i]),{snapshotInfoUrl:_,snapshotUrl:b,popoutUrl:w}=P.useMemo(()=>{const T=m[h];return e&&T?Ik(e.traceUri,T,y):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[m,h,y,e]),v=P.useMemo(()=>_!==void 0?{snapshotInfoUrl:_,snapshotUrl:b,popoutUrl:w}:void 0,[_,b,w]);return x.jsxs("div",{className:"snapshot-tab vbox",children:[x.jsxs(Nf,{children:[x.jsx(qt,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:a,onClick:()=>o(!a)}),x.jsx("div",{className:"hbox",style:{height:"100%"},role:"tablist",children:["action","before","after"].map(T=>x.jsx(S0,{id:T,title:$k(T),selected:h===T,onSelect:()=>f(T)},T))}),x.jsx("div",{style:{flex:"auto"}}),x.jsx(qt,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(v!=null&&v.popoutUrl),onClick:()=>{const T=window.open((v==null?void 0:v.popoutUrl)||"","_blank");T==null||T.addEventListener("DOMContentLoaded",()=>{new Tv(T,{isUnderTest:NS,sdkLanguage:t,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),x.jsx(Hk,{snapshotUrls:v,sdkLanguage:t,testIdAttributeName:s,isInspecting:a,setIsInspecting:o,highlightedElement:c,setHighlightedElement:d})]})},Hk=({snapshotUrls:i,sdkLanguage:e,testIdAttributeName:t,isInspecting:s,setIsInspecting:a,highlightedElement:o,setHighlightedElement:c})=>{const d=P.useRef(null),h=P.useRef(null),[f,y]=P.useState({viewport:MS,url:""}),m=P.useRef({iteration:0,visibleIframe:0});return P.useEffect(()=>{(async()=>{const _=m.current.iteration+1,b=1-m.current.visibleIframe;m.current.iteration=_;const w=await Pk(i==null?void 0:i.snapshotInfoUrl);if(m.current.iteration!==_)return;const v=[d,h][b].current;if(v){let T=()=>{};const A=new Promise(C=>T=C);try{v.addEventListener("load",T),v.addEventListener("error",T);const C=(i==null?void 0:i.snapshotUrl)||Uk;v.contentWindow?v.contentWindow.location.replace(C):v.src=C,await A}catch{}finally{v.removeEventListener("load",T),v.removeEventListener("error",T)}}m.current.iteration===_&&(m.current.visibleIframe=b,y(w))})()},[i]),x.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:_=>{_.key==="Escape"&&s&&a(!1)},children:[x.jsx(kb,{isInspecting:s,sdkLanguage:e,testIdAttributeName:t,highlightedElement:o,setHighlightedElement:c,iframe:d.current,iteration:m.current.iteration}),x.jsx(kb,{isInspecting:s,sdkLanguage:e,testIdAttributeName:t,highlightedElement:o,setHighlightedElement:c,iframe:h.current,iteration:m.current.iteration}),x.jsx(zk,{snapshotInfo:f,children:x.jsxs("div",{className:"snapshot-switcher",children:[x.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:We(m.current.visibleIframe===0&&"snapshot-visible")}),x.jsx("iframe",{ref:h,name:"snapshot",title:"DOM Snapshot",className:We(m.current.visibleIframe===1&&"snapshot-visible")})]})})]})},zk=({snapshotInfo:i,children:e})=>{const[t,s]=Es(),a=40,o={width:i.viewport.width,height:i.viewport.height},c={width:Math.max(o.width,480),height:Math.max(o.height+a,320)},d=Math.min(t.width/c.width,t.height/c.height,1),h={x:(t.width-c.width)/2,y:(t.height-c.height)/2};return x.jsx("div",{ref:s,className:"snapshot-wrapper",children:x.jsxs("div",{className:"snapshot-container",style:{width:c.width+"px",height:c.height+"px",transform:`translate(${h.x}px, ${h.y}px) scale(${d})`},children:[x.jsx(A2,{url:i.url}),x.jsx("div",{className:"snapshot-browser-body",children:x.jsx("div",{style:{width:o.width+"px",height:o.height+"px"},children:e})})]})})};function $k(i){return i==="before"?"Before":i==="after"?"After":i==="action"?"Action":i}const kb=({iframe:i,isInspecting:e,sdkLanguage:t,testIdAttributeName:s,highlightedElement:a,setHighlightedElement:o,iteration:c})=>(P.useEffect(()=>{const d=a.lastEdited==="ariaSnapshot"?a.ariaSnapshot:void 0,h=a.lastEdited==="locator"?a.locator:void 0,f=!!d||!!h||e,y=[],m=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{kS(y,f,t,s,m,"",i==null?void 0:i.contentWindow)}catch{}const _=d?Mf(CS,d):void 0,b=h?T2(t,h,s):void 0;for(const{recorder:w,frameSelector:v}of y){const T=b!=null&&b.startsWith(v)?b.substring(v.length).trim():void 0,A=(_==null?void 0:_.errors.length)===0?_.fragment:void 0;w.setUIState({mode:e?"inspecting":"none",actionSelector:T,ariaTemplate:A,language:t,testIdAttributeName:s,overlay:{offsetX:0}},{async elementPicked(C){o({locator:qi(t,v+C.selector),ariaSnapshot:C.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const C of y)C.recorder!==w&&C.recorder.clearHighlight()}})}},[i,e,a,o,t,s,c]),x.jsx(x.Fragment,{}));function kS(i,e,t,s,a,o,c){if(!c)return;const d=c;if(!d._recorder&&e){const h=new Tv(c,{isUnderTest:a,sdkLanguage:t,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}),f=new hf(h);d._injectedScript=h,d._recorder={recorder:f,frameSelector:o},a&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(f)))}d._recorder&&i.push(d._recorder);for(let h=0;h<c.frames.length;++h){const f=c.frames[h],y=f.frameElement?d._injectedScript.generateSelectorSimple(f.frameElement,{omitInternalEngines:!0,testIdAttributeName:s})+" >> internal:control=enter-frame >> ":"";kS(i,e,t,s,a,o+y,f)}}const Qa=(i,e,t=!1)=>{if(!i)return;const s=i[e];if(s){if(!i.pageId){console.error("snapshot action must have a pageId");return}return{action:i,snapshotName:s,pageId:i.pageId,point:i.point,hasInputTarget:t}}};function Bk(i){if(!i)return{};let e=Qa(i,"beforeSnapshot");if(!e){for(let a=A_(i);a;a=A_(a))if(a.endTime<=i.startTime&&a.afterSnapshot){e=Qa(a,"afterSnapshot");break}}let t=Qa(i,"afterSnapshot");if(!t){let a;for(let o=C_(i);o&&o.startTime<=i.endTime;o=C_(o))o.endTime>i.endTime||!o.afterSnapshot||a&&a.endTime>o.endTime||(a=o);a?t=Qa(a,"afterSnapshot"):t=e}const s=Qa(i,"inputSnapshot",!0)??t;return s&&(s.point=i.point),{action:s,before:e,after:t}}const NS=new URLSearchParams(window.location.search).has("isUnderTest");function Ik(i,e,t){const s=new URLSearchParams;s.set("trace",i),s.set("name",e.snapshotName),NS&&s.set("isUnderTest","true"),e.point&&(s.set("pointX",String(e.point.x)),s.set("pointY",String(e.point.y)),e.hasInputTarget&&s.set("hasInputTarget","1")),t&&s.set("shouldPopulateCanvasFromScreenshot","1");const a=new URL(`snapshot/${e.pageId}?${s.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${e.pageId}?${s.toString()}`,window.location.href).toString(),c=new URLSearchParams;c.set("r",a),c.set("trace",i);const d=new URL(`snapshot.html?${c.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:a,popoutUrl:d}}async function Pk(i){const e={url:"",viewport:MS,timestamp:void 0,wallTime:void 0};if(i){const s=await(await fetch(i)).json();s.error||(e.url=s.url,e.viewport=s.viewport,e.timestamp=s.timestamp,e.wallTime=s.wallTime)}return e}const MS={width:1280,height:720},Uk='data:text/html,<body style="background: #ddd"></body>',DS={width:200,height:45},wr=2.5,qk=DS.height+wr*2,Vk=({boundaries:i,previewPoint:e})=>{var y,m;const t=ui(),[s,a]=Es(),o=P.useRef(null);let c=0;if(o.current&&e){const _=o.current.getBoundingClientRect();c=(e.clientY-_.top+o.current.scrollTop)/qk|0}const d=(m=(y=t==null?void 0:t.pages)==null?void 0:y[c])==null?void 0:m.screencastFrames;let h,f;if(e!==void 0&&d&&d.length){const _=i.minimum+(i.maximum-i.minimum)*e.x/s.width;h=d[Mb(d,_,LS)-1];const b={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};f=h?OS({width:h.width,height:h.height},b):void 0}return x.jsxs("div",{className:"film-strip",ref:a,children:[x.jsx("div",{className:"film-strip-lanes",ref:o,children:t==null?void 0:t.pages.map((_,b)=>_.screencastFrames.length?x.jsx(Fk,{boundaries:i,page:_,width:s.width},b):null)}),t&&(e==null?void 0:e.x)!==void 0&&x.jsxs("div",{className:"film-strip-hover",style:{top:s.bottom+5,left:Math.min(e.x,s.width-(f?f.width:0)-10)},children:[e.action&&x.jsx("div",{className:"film-strip-hover-title",children:Cf(e.action,e)}),h&&f&&x.jsx("div",{style:{width:f.width,height:f.height},children:x.jsx("img",{src:t.createRelativeUrl(`sha1/${h.sha1}`),width:f.width,height:f.height})})]})]})},Fk=({boundaries:i,page:e,width:t})=>{const s=ui(),a={width:0,height:0},o=e.screencastFrames;for(const T of o)a.width=Math.max(a.width,T.width),a.height=Math.max(a.height,T.height);const c=OS(a,DS),d=o[0].timestamp,h=o[o.length-1].timestamp,f=i.maximum-i.minimum,y=(d-i.minimum)/f*t,m=(i.maximum-h)/f*t,b=(h-d)/f*t/(c.width+2*wr)|0,w=(h-d)/b,v=[];for(let T=0;d&&w&&T<b;++T){const A=d+w*T,C=Mb(o,A,LS)-1;v.push(x.jsx("div",{className:"film-strip-frame",style:{width:c.width,height:c.height,backgroundImage:`url(${s==null?void 0:s.createRelativeUrl("sha1/"+o[C].sha1)})`,backgroundSize:`${c.width}px ${c.height}px`,margin:wr,marginRight:wr}},T))}return v.push(x.jsx("div",{className:"film-strip-frame",style:{width:c.width,height:c.height,backgroundImage:`url(${s==null?void 0:s.createRelativeUrl("sha1/"+o[o.length-1].sha1)})`,backgroundSize:`${c.width}px ${c.height}px`,margin:wr,marginRight:wr}},v.length)),x.jsx("div",{className:"film-strip-lane",style:{marginLeft:y+"px",marginRight:m+"px"},children:v})};function LS(i,e){return i-e.timestamp}function OS(i,e){const t=Math.max(i.width/e.width,i.height/e.height);return{width:i.width/t|0,height:i.height/t|0}}const Gk=({model:i,boundaries:e,consoleEntries:t,networkResources:s,onSelected:a,highlightedAction:o,highlightedResourceOrdinal:c,highlightedConsoleEntryOrdinal:d,selectedTime:h,setSelectedTime:f,sdkLanguage:y})=>{const[m,_]=Es(),[b,w]=P.useState(),[v,T]=P.useState(),[A]=hn("actionsFilter",[]),{offsets:C,curtainLeft:L,curtainRight:j}=P.useMemo(()=>{let J=h||e;if(b&&b.startX!==b.endX){const Z=On(m.width,e,b.startX),ae=On(m.width,e,b.endX);J={minimum:Math.min(Z,ae),maximum:Math.max(Z,ae)}}const te=un(m.width,e,J.minimum),I=un(m.width,e,e.maximum)-un(m.width,e,J.maximum);return{offsets:Xk(m.width,e),curtainLeft:te,curtainRight:I}},[h,e,b,m]),D=P.useMemo(()=>i==null?void 0:i.filteredActions(A),[i,A]),F=P.useMemo(()=>{const J=[];for(const te of D||[])J.push({action:te,leftTime:te.startTime,rightTime:te.endTime||e.maximum,leftPosition:un(m.width,e,te.startTime),rightPosition:un(m.width,e,te.endTime||e.maximum),active:!1,error:!!te.error});for(const te of(i==null?void 0:i.resources)||[]){const Ne=te._monotonicTime,I=te._monotonicTime+te.time;J.push({resource:te,leftTime:Ne,rightTime:I,leftPosition:un(m.width,e,Ne),rightPosition:un(m.width,e,I),active:!1,error:!1})}for(const te of t||[])J.push({consoleMessage:te,leftTime:te.timestamp,rightTime:te.timestamp,leftPosition:un(m.width,e,te.timestamp),rightPosition:un(m.width,e,te.timestamp),active:!1,error:te.isError});return J},[i,D,t,e,m]);P.useMemo(()=>{for(const J of F)o?J.active=J.action===o:c!==void 0?J.active=J.resource===(s==null?void 0:s[c]):d!==void 0?J.active=J.consoleMessage===(t==null?void 0:t[d]):J.active=!1},[F,o,c,d,t,s]);const B=P.useCallback(J=>{if(T(void 0),!_.current)return;const te=J.clientX-_.current.getBoundingClientRect().left,Ne=On(m.width,e,te),I=h?un(m.width,e,h.minimum):0,Z=h?un(m.width,e,h.maximum):0;h&&Math.abs(te-I)<10?w({startX:Z,endX:te,type:"resize"}):h&&Math.abs(te-Z)<10?w({startX:I,endX:te,type:"resize"}):h&&Ne>h.minimum&&Ne<h.maximum&&J.clientY-_.current.getBoundingClientRect().top<20?w({startX:I,endX:Z,pivot:te,type:"move"}):w({startX:te,endX:te,type:"resize"})},[e,m,_,h]),q=P.useCallback(J=>{if(!_.current)return;const te=J.clientX-_.current.getBoundingClientRect().left,Ne=On(m.width,e,te),I=D==null?void 0:D.findLast(xe=>xe.startTime<=Ne);if(!J.buttons){w(void 0);return}if(I&&a(I),!b)return;let Z=b;if(b.type==="resize")Z={...b,endX:te};else{const xe=te-b.pivot;let N=b.startX+xe,G=b.endX+xe;N<0&&(N=0,G=N+(b.endX-b.startX)),G>m.width&&(G=m.width,N=G-(b.endX-b.startX)),Z={...b,startX:N,endX:G,pivot:te}}w(Z);const ae=On(m.width,e,Z.startX),we=On(m.width,e,Z.endX);ae!==we&&f({minimum:Math.min(ae,we),maximum:Math.max(ae,we)})},[e,b,m,D,a,_,f]),O=P.useCallback(()=>{if(T(void 0),!!b){if(b.startX!==b.endX){const J=On(m.width,e,b.startX),te=On(m.width,e,b.endX);f({minimum:Math.min(J,te),maximum:Math.max(J,te)})}else{const J=On(m.width,e,b.startX),te=D==null?void 0:D.findLast(Ne=>Ne.startTime<=J);te&&a(te),f(void 0)}w(void 0)}},[e,b,m,D,f,a]),Q=P.useCallback(J=>{if(!_.current)return;const te=J.clientX-_.current.getBoundingClientRect().left,Ne=On(m.width,e,te),I=D==null?void 0:D.findLast(Z=>Z.startTime<=Ne);T({x:te,clientY:J.clientY,action:I,sdkLanguage:y})},[e,m,D,_,y]),se=P.useCallback(()=>{T(void 0)},[]),Y=P.useCallback(()=>{f(void 0)},[f]);return x.jsxs("div",{className:"timeline-view-container",children:[!!b&&x.jsx(g0,{cursor:(b==null?void 0:b.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:O,onPaneMouseMove:q,onPaneDoubleClick:Y}),x.jsxs("div",{ref:_,className:"timeline-view",onMouseDown:B,onMouseMove:Q,onMouseLeave:se,children:[x.jsx("div",{className:"timeline-grid",children:C.map((J,te)=>x.jsx("div",{className:"timeline-divider",style:{left:J.position+"px"},children:x.jsx("div",{className:"timeline-time",children:kt(J.time-e.minimum)})},te))}),x.jsx("div",{style:{height:8}}),x.jsx(Vk,{boundaries:e,previewPoint:v}),x.jsx("div",{className:"timeline-bars",children:F.filter(J=>!J.action||J.action.class!=="Test").map((J,te)=>x.jsx("div",{className:We("timeline-bar",J.action&&"action",J.resource&&"network",J.consoleMessage&&"console-message",J.active&&"active",J.error&&"error"),style:{left:J.leftPosition,width:Math.max(5,J.rightPosition-J.leftPosition),top:Yk(J),bottom:0}},te))}),x.jsx("div",{className:"timeline-marker",style:{display:v!==void 0?"block":"none",left:((v==null?void 0:v.x)||0)+"px"}}),h&&x.jsxs("div",{className:"timeline-window",children:[x.jsx("div",{className:"timeline-window-curtain left",style:{width:L}}),x.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),x.jsx("div",{className:"timeline-window-center",children:x.jsx("div",{className:"timeline-window-drag"})}),x.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),x.jsx("div",{className:"timeline-window-curtain right",style:{width:j}})]})]})]})};function Xk(i,e){let s=i/64;const a=e.maximum-e.minimum,o=i/a;let c=a/s;const d=Math.ceil(Math.log(c)/Math.LN10);c=Math.pow(10,d),c*o>=320&&(c=c/5),c*o>=128&&(c=c/2);const h=e.minimum;let f=e.maximum;f+=64/o,s=Math.ceil((f-h)/c),c||(s=0);const y=[];for(let m=0;m<s;++m){const _=h+c*m;y.push({position:un(i,e,_),time:_})}return y}function un(i,e,t){return(t-e.minimum)/(e.maximum-e.minimum)*i}function On(i,e,t){return t/i*(e.maximum-e.minimum)+e.minimum}function Yk(i){return i.resource?25:20}const Kk=({model:i})=>{var t,s;if(!i)return x.jsx(x.Fragment,{});const e=i.wallTime!==void 0?new Date(i.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return x.jsxs("div",{style:{flex:"auto",display:"block",overflow:"hidden auto"},children:[x.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&x.jsxs("div",{className:"call-line",children:["start time:",x.jsx("span",{className:"call-value datetime",title:e,children:e})]}),x.jsxs("div",{className:"call-line",children:["duration:",x.jsx("span",{className:"call-value number",title:kt(i.endTime-i.startTime),children:kt(i.endTime-i.startTime)})]}),x.jsx("div",{className:"call-section",children:"Browser"}),x.jsxs("div",{className:"call-line",children:["engine:",x.jsx("span",{className:"call-value string",title:i.browserName,children:i.browserName})]}),i.channel&&x.jsxs("div",{className:"call-line",children:["channel:",x.jsx("span",{className:"call-value string",title:i.channel,children:i.channel})]}),i.platform&&x.jsxs("div",{className:"call-line",children:["platform:",x.jsx("span",{className:"call-value string",title:i.platform,children:i.platform})]}),i.playwrightVersion&&x.jsxs("div",{className:"call-line",children:["playwright version:",x.jsx("span",{className:"call-value string",title:i.playwrightVersion,children:i.playwrightVersion})]}),i.options.userAgent&&x.jsxs("div",{className:"call-line",children:["user agent:",x.jsx("span",{className:"call-value datetime",title:i.options.userAgent,children:i.options.userAgent})]}),i.options.baseURL&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),x.jsxs("div",{className:"call-line",children:["baseURL:",x.jsx("a",{className:"call-value string",href:i.options.baseURL,title:i.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:i.options.baseURL})]})]}),x.jsx("div",{className:"call-section",children:"Viewport"}),i.options.viewport&&x.jsxs("div",{className:"call-line",children:["width:",x.jsx("span",{className:"call-value number",title:String(!!((t=i.options.viewport)!=null&&t.width)),children:i.options.viewport.width})]}),i.options.viewport&&x.jsxs("div",{className:"call-line",children:["height:",x.jsx("span",{className:"call-value number",title:String(!!((s=i.options.viewport)!=null&&s.height)),children:i.options.viewport.height})]}),x.jsxs("div",{className:"call-line",children:["is mobile:",x.jsx("span",{className:"call-value boolean",title:String(!!i.options.isMobile),children:String(!!i.options.isMobile)})]}),i.options.deviceScaleFactor&&x.jsxs("div",{className:"call-line",children:["device scale:",x.jsx("span",{className:"call-value number",title:String(i.options.deviceScaleFactor),children:String(i.options.deviceScaleFactor)})]}),x.jsx("div",{className:"call-section",children:"Counts"}),x.jsxs("div",{className:"call-line",children:["pages:",x.jsx("span",{className:"call-value number",children:i.pages.length})]}),x.jsxs("div",{className:"call-line",children:["actions:",x.jsx("span",{className:"call-value number",children:i.actions.length})]}),x.jsxs("div",{className:"call-line",children:["events:",x.jsx("span",{className:"call-value number",children:i.events.length})]})]})},Jk=({annotations:i})=>i.length?x.jsx("div",{className:"annotations-tab",children:i.map((e,t)=>x.jsxs("div",{className:"annotation-item",children:[x.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&x.jsxs("span",{children:[": ",y0(e.description)]})]},`annotation-${t}`))}):x.jsx(As,{text:"No annotations"}),Wk=({sdkLanguage:i,isInspecting:e,setIsInspecting:t,highlightedElement:s,setHighlightedElement:a})=>{const[o,c]=P.useState(),d=P.useCallback(h=>{const{errors:f}=Mf(CS,h,{prettyErrors:!1}),y=f.map(m=>({message:m.message,line:m.range[1].line,column:m.range[1].col,type:"subtle-error"}));c(y),a({...s,ariaSnapshot:h,lastEdited:"ariaSnapshot"}),t(!1)},[s,a,t]);return x.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[x.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[x.jsx("div",{children:"Locator"}),x.jsx(qt,{style:{margin:"0 4px"},title:"Pick locator",icon:"target",toggled:e,onClick:()=>t(!e)}),x.jsx("div",{style:{flex:"auto"}}),x.jsx(qt,{icon:"files",title:"Copy locator",onClick:()=>{m_(s.locator||"")}})]}),x.jsx("div",{style:{height:50},children:x.jsx(Or,{text:s.locator||"",highlighter:i,isFocused:!0,wrapLines:!0,onChange:h=>{a({...s,locator:h,lastEdited:"locator"}),t(!1)}})}),x.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[x.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),x.jsx(qt,{icon:"files",title:"Copy snapshot",onClick:()=>{m_(s.ariaSnapshot||"")}})]}),x.jsx("div",{style:{height:150},children:x.jsx(Or,{text:s.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:o,onChange:d})})]})},Zk=({className:i,style:e,open:t,isModal:s,minWidth:a,verticalOffset:o,requestClose:c,anchor:d,dataTestId:h,children:f})=>{const y=P.useRef(null),[m,_]=P.useState(0),[b]=Yh(y),[w,v]=Yh(d),T=d?Qk(b,w,o):void 0;return P.useEffect(()=>{const A=L=>{!y.current||!(L.target instanceof Node)||y.current.contains(L.target)||c==null||c()},C=L=>{L.key==="Escape"&&(c==null||c())};return t?(document.addEventListener("mousedown",A),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",A),document.removeEventListener("keydown",C)}):()=>{}},[t,c]),P.useLayoutEffect(()=>v(),[t,v]),P.useEffect(()=>{const A=()=>_(C=>C+1);return window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}},[]),P.useLayoutEffect(()=>{y.current&&(t?s?y.current.showModal():y.current.show():y.current.close())},[t,s]),x.jsx("dialog",{ref:y,style:{position:"fixed",margin:T?0:void 0,zIndex:110,top:T==null?void 0:T.top,left:T==null?void 0:T.left,minWidth:a||0,...e},className:i,"data-testid":h,children:f})};function Qk(i,e,t=4,s=4){let a=Math.max(s,e.left);a+i.width>window.innerWidth-s&&(a=window.innerWidth-i.width-s);let o=Math.max(0,e.bottom)+t;return o+i.height>window.innerHeight-t&&(Math.max(0,e.top)>i.height+t?o=Math.max(0,e.top)-i.height-t:o=window.innerHeight-t-i.height),{left:a,top:o}}const eN=({title:i,icon:e,buttonChildren:t,anchorRef:s,dialogDataTestId:a,children:o})=>{const c=P.useRef(null),d=s??c,[h,f]=P.useState(!1);return x.jsxs(x.Fragment,{children:[x.jsx(qt,{ref:c,icon:e,title:i,onClick:()=>f(y=>!y),children:t}),x.jsx(Zk,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:h,verticalOffset:8,requestClose:()=>f(!1),anchor:d,dataTestId:a,children:o})]})},RS=({settings:i})=>x.jsx("div",{className:"vbox settings-view",children:i.map(e=>{const t=`setting-${e.name.replaceAll(/\s+/g,"-")}`;return x.jsx("div",{className:`setting setting-${e.type}`,title:e.title,children:tN(e,t)},e.name)})}),tN=(i,e)=>{switch(i.type){case"check":return x.jsxs(x.Fragment,{children:[x.jsx("input",{type:"checkbox",id:e,checked:i.value,onChange:()=>i.set(!i.value)}),x.jsxs("label",{htmlFor:e,children:[i.name,!!i.count&&x.jsx("span",{className:"setting-counter",children:i.count})]})]});case"select":return x.jsxs(x.Fragment,{children:[x.jsxs("label",{htmlFor:e,children:[i.name,":",!!i.count&&x.jsx("span",{className:"setting-counter",children:i.count})]}),x.jsx("select",{id:e,value:i.value,onChange:t=>i.set(t.target.value),children:i.options.map(t=>x.jsx("option",{value:t.value,children:t.label},t.value))})]});default:return null}},fN=i=>{var t;const e=sN((t=i.model)==null?void 0:t.traceUri);return x.jsx(_0.Provider,{value:i.model,children:x.jsx(nN,{partition:e,...i})})},nN=i=>{var Mo;const{partition:e,model:t,showSourcesFirst:s,rootDir:a,fallbackLocation:o,isLive:c,hideTimeline:d,status:h,annotations:f,inert:y,onOpenExternally:m,revealSource:_,testRunMetadata:b}=i,[w,v]=hn("navigatorTab","actions"),[T,A]=hn("propertiesTab",s?"source":"call"),[C,L]=hn("propertiesSidebarLocation","bottom"),[j]=hn("actionsFilter",[]),[D,F]=$i("selectedCallId"),[B,q]=$i("selectedTime"),[O,Q]=$i("highlightedCallId"),[se,Y]=$i("revealedErrorKey"),[J,te]=$i("highlightedConsoleMessageOrdinal"),[Ne,I]=$i("revealedAttachmentCallId"),[Z,ae]=$i("highlightedResourceOrdinal"),[we,xe]=$i("treeState",{expandedItems:new Map});tx(e);const[N,G]=P.useState({lastEdited:"none"}),[ee,ne]=P.useState(!1),de=P.useCallback(ue=>{F(ue==null?void 0:ue.callId),Y(void 0)},[F,Y]),oe=P.useMemo(()=>t==null?void 0:t.filteredActions(j),[t,j]),Ee=((t==null?void 0:t.actions.length)??0)-((oe==null?void 0:oe.length)??0),st=P.useMemo(()=>oe==null?void 0:oe.find(ue=>ue.callId===O),[oe,O]),ze=P.useCallback(ue=>{Q(ue==null?void 0:ue.callId)},[Q]),Yi=P.useMemo(()=>(t==null?void 0:t.sources)||new Map,[t]);P.useEffect(()=>{q(void 0),Y(void 0)},[t,q,Y]);const zn=P.useMemo(()=>{if(D){const An=oe==null?void 0:oe.find(Zt=>Zt.callId===D);if(An)return An}const ue=t==null?void 0:t.failedAction();if(ue)return ue;if(oe!=null&&oe.length){let An=oe.length-1;for(let Zt=0;Zt<oe.length;++Zt)if(oe[Zt].title==="After Hooks"&&Zt){An=Zt-1;break}return oe[An]}},[t,oe,D]),mn=P.useMemo(()=>st||zn,[zn,st]),Gr=P.useCallback(ue=>{de(ue),ze(void 0)},[de,ze]),rt=P.useCallback(ue=>{A(ue),ue!=="inspector"&&ne(!1)},[A]),Ns=P.useCallback(ue=>{!ee&&ue&&rt("inspector"),ne(ue)},[ne,rt,ee]),Xr=P.useCallback(ue=>{G(ue),rt("inspector")},[rt]),tu=P.useCallback(ue=>{rt("attachments"),I({callId:ue})},[rt,I]);P.useEffect(()=>{_&&rt("source")},[_,rt]);const Ms=KT(t,B),Ki=vE(t,B),di=VT(t),Yr=P.useMemo(()=>{var ue;return se!==void 0?(ue=di.errors.get(se))==null?void 0:ue.stack:mn==null?void 0:mn.stack},[mn,se,di]),hi=(t==null?void 0:t.sdkLanguage)||"javascript",nu={id:"inspector",title:"Locator",render:()=>x.jsx(Wk,{sdkLanguage:hi,isInspecting:ee,setIsInspecting:Ns,highlightedElement:N,setHighlightedElement:G})},xt={id:"call",title:"Call",render:()=>x.jsx(dT,{action:mn,startTimeOffset:(t==null?void 0:t.startTime)??0,sdkLanguage:hi})},iu={id:"log",title:"Log",render:()=>x.jsx(gT,{action:mn,isLive:c})},ko={id:"errors",title:"Errors",errorCount:di.errors.size,render:()=>x.jsx(GT,{errorsModel:di,testRunMetadata:b,sdkLanguage:hi,revealInSource:ue=>{ue.action?de(ue.action):Y(ue.message),rt("source")},wallTime:(t==null?void 0:t.wallTime)??0})};let Kr;!zn&&o&&(Kr=(Mo=o.source)==null?void 0:Mo.errors.length);const fi={id:"source",title:"Source",errorCount:Kr,render:()=>x.jsx(PT,{stack:Yr,sources:Yi,rootDir:a,stackFrameLocation:C==="bottom"?"right":"bottom",fallbackLocation:o,onOpenExternally:m})},su={id:"console",title:"Console",count:Ms.entries.length,render:()=>x.jsx(JT,{consoleModel:Ms,boundaries:$n,selectedTime:B,onAccepted:ue=>q({minimum:ue.timestamp,maximum:ue.timestamp}),onEntryHovered:te})},No={id:"network",title:"Network",count:Ki.resources.length,render:()=>x.jsx(SE,{boundaries:$n,networkModel:Ki,onResourceHovered:ae,sdkLanguage:(t==null?void 0:t.sdkLanguage)??"javascript"})},ru={id:"attachments",title:"Attachments",count:t==null?void 0:t.visibleAttachments.length,render:()=>x.jsx(OT,{revealedAttachmentCallId:Ne})},Ji=[nu,xt,iu,ko,su,No,fi,ru];if(f!==void 0){const ue={id:"annotations",title:"Annotations",count:f.length,render:()=>x.jsx(Jk,{annotations:f})};Ji.push(ue)}if(s){const ue=Ji.indexOf(fi);Ji.splice(ue,1),Ji.splice(1,0,fi)}const{boundaries:$n}=P.useMemo(()=>{const ue={minimum:(t==null?void 0:t.startTime)||0,maximum:(t==null?void 0:t.endTime)||3e4};return ue.minimum>ue.maximum&&(ue.minimum=0,ue.maximum=3e4),ue.maximum+=(ue.maximum-ue.minimum)/20,{boundaries:ue}},[t]);let ct=0;!c&&t&&t.endTime>=0?ct=t.endTime-t.startTime:t&&t.wallTime&&(ct=Date.now()-t.wallTime);const En={id:"actions",title:"Actions",component:x.jsxs("div",{className:"vbox",children:[h&&x.jsxs("div",{className:"workbench-run-status","data-testid":"workbench-run-status",children:[x.jsx("span",{className:We("codicon",h0(h))}),x.jsx("div",{children:lT(h)}),x.jsx("div",{className:"spacer"}),x.jsx("div",{className:"workbench-run-duration",children:ct?kt(ct):""})]}),x.jsx(uT,{sdkLanguage:hi,actions:oe||[],selectedAction:t?zn:void 0,selectedTime:B,setSelectedTime:q,treeState:we,setTreeState:xe,onSelected:Gr,onHighlighted:ze,revealActionAttachment:tu,revealConsole:()=>rt("console"),isLive:c})]})},Tt={id:"metadata",title:"Metadata",component:x.jsx(Kk,{model:t})},au=w==="actions"&&x.jsx(iN,{counters:t==null?void 0:t.actionCounters,hiddenActionsCount:Ee});return x.jsxs("div",{className:"vbox workbench",...y?{inert:!0}:{},children:[!d&&x.jsx(Gk,{model:t,consoleEntries:Ms.entries,networkResources:Ki.resources,boundaries:$n,highlightedAction:st,highlightedResourceOrdinal:Z,highlightedConsoleEntryOrdinal:J,onSelected:Gr,sdkLanguage:hi,selectedTime:B,setSelectedTime:q}),x.jsx(_c,{sidebarSize:250,orientation:C==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:x.jsx(_c,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:x.jsx(jk,{action:mn,model:t,sdkLanguage:hi,testIdAttributeName:(t==null?void 0:t.testIdAttributeName)||"data-testid",isInspecting:ee,setIsInspecting:Ns,highlightedElement:N,setHighlightedElement:Xr}),sidebar:x.jsx(tf,{tabs:[En,Tt],rightToolbar:[au],selectedTab:w,setSelectedTab:v})}),sidebar:x.jsx(tf,{tabs:Ji,selectedTab:T,setSelectedTab:rt,rightToolbar:[C==="bottom"?x.jsx(qt,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{L("right")}}):x.jsx(qt,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{L("bottom")}})],mode:C==="bottom"?"default":"select"})})]})},iN=({counters:i,hiddenActionsCount:e})=>{const[t,s]=hn("actionsFilter",[]),a=P.useRef(null),o=x.jsxs(x.Fragment,{children:[e>0&&x.jsxs("span",{className:"workbench-actions-hidden-count",title:e+" actions hidden by filters",children:[e," hidden"]}),x.jsx("span",{ref:a,className:"codicon codicon-filter"})]});return x.jsx(eN,{title:"Filter actions",dialogDataTestId:"actions-filter-dialog",buttonChildren:o,anchorRef:a,children:x.jsx(RS,{settings:[{type:"check",value:t.includes("getter"),set:c=>s(c?[...t,"getter"]:t.filter(d=>d!=="getter")),name:"Getters",count:i==null?void 0:i.get("getter")},{type:"check",value:t.includes("route"),set:c=>s(c?[...t,"route"]:t.filter(d=>d!=="route")),name:"Network routes",count:i==null?void 0:i.get("route")},{type:"check",value:t.includes("configuration"),set:c=>s(c?[...t,"configuration"]:t.filter(d=>d!=="configuration")),name:"Configuration",count:i==null?void 0:i.get("configuration")}]})})};function sN(i){if(!i)return"default";const e=new URL(i,"http://localhost");return e.searchParams.delete("timestamp"),e.toString()}var Nb;(i=>{function e(t){for(const s of t.splice(0))s.dispose()}i.disposeAll=e})(Nb||(Nb={}));class Sr{constructor(){this._listeners=new Set,this.event=(e,t)=>{this._listeners.add(e);let s=!1;const a=this,o={dispose(){s||(s=!0,a._listeners.delete(e))}};return t&&t.push(o),o}}fire(e){const t=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const s of this._listeners)this._deliveryQueue.push({listener:s,event:e});if(t){for(let s=0;s<this._deliveryQueue.length;s++){const{listener:a,event:o}=this._deliveryQueue[s];a.call(null,o)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class rN extends Error{constructor(){super("Test server connection closed")}}class gN{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",t=>e(t.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 pN{constructor(e){this._onCloseEmitter=new Sr,this._onReportEmitter=new Sr,this._onStdioEmitter=new Sr,this._onTestFilesChangedEmitter=new Sr,this._onLoadTraceRequestedEmitter=new Sr,this._onTestPausedEmitter=new Sr,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this.onTestPaused=this._onTestPausedEmitter.event,this._transport=e,this._transport.onmessage(s=>{const a=JSON.parse(s),{id:o,result:c,error:d,method:h,params:f}=a;if(o){const y=this._callbacks.get(o);if(!y)return;this._callbacks.delete(o),d?y.reject(new Error(d)):y.resolve(c)}else this._dispatchEvent(h,f)});const t=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((s,a)=>{this._transport.onopen(s),this._transport.onerror(a)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(t);for(const s of this._callbacks.values())s.reject(new rN);this._callbacks.clear()})}isClosed(){return this._isClosed}async _sendMessage(e,t){const s=globalThis.__logForTest;s==null||s({method:e,params:t}),await this._connectedPromise;const a=++this._lastId,o={id:a,method:e,params:t};return this._transport.send(JSON.stringify(o)),new Promise((c,d)=>{this._callbacks.set(a,{resolve:c,reject:d})})}_sendMessageNoReply(e,t){this._sendMessage(e,t).catch(()=>{})}_dispatchEvent(e,t){e==="report"?this._onReportEmitter.fire(t):e==="stdio"?this._onStdioEmitter.fire(t):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(t):e==="loadTraceRequested"?this._onLoadTraceRequestedEmitter.fire(t):e==="testPaused"&&this._onTestPausedEmitter.fire(t)}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 mN=({location:i})=>{const[e,t]=hn("shouldPopulateCanvasFromScreenshot",!1),[s,a]=ox(),[o,c]=hn("mergeFiles",!1);return x.jsx(RS,{settings:[{type:"select",value:s,set:a,name:"Theme",options:rx},...i==="ui-mode"?[{type:"check",value:o,set:c,name:"Merge files"}]:[],{type:"check",value:e,set:t,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{eN as D,m0 as E,bt as R,_c as S,dN as T,gN as W,xT as _,pN as a,mN as b,fN as c,Zk as d,oN as e,uN as f,ax as g,lN as h,cN as i,x as j,We as k,aT as l,kt as m,Nf as n,qt as o,hn as p,RS as q,P as r,_s as s,h0 as t,Es as u,Jw as v};
|