@checkly/playwright-core 1.47.12 → 1.48.10-alpha
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/browsers.json +14 -10
- package/lib/cli/program.js +22 -12
- package/lib/client/api.js +6 -0
- package/lib/client/browserContext.js +20 -2
- package/lib/client/channelOwner.js +5 -2
- package/lib/client/connection.js +3 -0
- package/lib/client/fetch.js +16 -3
- package/lib/client/jsHandle.js +0 -8
- package/lib/client/localUtils.js +1 -0
- package/lib/client/network.js +175 -17
- package/lib/client/page.js +21 -0
- package/lib/client/playwright.js +6 -3
- package/lib/client/tracing.js +16 -20
- package/lib/generated/consoleApiSource.js +1 -1
- package/lib/generated/injectedScriptSource.js +1 -1
- package/lib/generated/pollingRecorderSource.js +7 -0
- package/lib/generated/webSocketMockSource.js +7 -0
- package/lib/protocol/validator.js +79 -14
- package/lib/server/bidi/bidiBrowser.js +23 -8
- package/lib/server/bidi/bidiChromium.js +124 -0
- package/lib/server/bidi/bidiConnection.js +1 -1
- package/lib/server/bidi/bidiExecutionContext.js +0 -3
- package/lib/server/bidi/bidiFirefox.js +15 -21
- package/lib/server/bidi/bidiInput.js +16 -32
- package/lib/server/bidi/bidiNetworkManager.js +39 -5
- package/lib/server/bidi/bidiOverCdp.js +103 -0
- package/lib/server/bidi/bidiPage.js +98 -25
- package/lib/server/bidi/bidiPdf.js +140 -0
- package/lib/server/bidi/third_party/firefoxPrefs.js +221 -0
- package/lib/server/browser.js +13 -2
- package/lib/server/browserContext.js +6 -23
- package/lib/server/browserType.js +39 -11
- package/lib/server/chromium/chromium.js +3 -15
- package/lib/server/chromium/chromiumSwitches.js +3 -1
- package/lib/server/chromium/crBrowser.js +4 -3
- package/lib/server/chromium/crExecutionContext.js +0 -7
- package/lib/server/chromium/crPage.js +5 -2
- package/lib/server/chromium/videoRecorder.js +1 -1
- package/lib/server/codegen/csharp.js +2 -2
- package/lib/server/codegen/java.js +1 -1
- package/lib/server/codegen/javascript.js +1 -1
- package/lib/server/codegen/language.js +14 -2
- package/lib/server/codegen/python.js +2 -2
- package/lib/server/cookieStore.js +73 -0
- package/lib/server/debugController.js +2 -2
- package/lib/server/deviceDescriptorsSource.json +51 -51
- package/lib/server/dialog.js +1 -0
- package/lib/server/dispatchers/browserContextDispatcher.js +19 -2
- package/lib/server/dispatchers/jsHandleDispatcher.js +0 -5
- package/lib/server/dispatchers/pageDispatcher.js +9 -0
- package/lib/server/dispatchers/playwrightDispatcher.js +2 -1
- package/lib/server/dispatchers/webSocketRouteDispatcher.js +189 -0
- package/lib/server/download.js +9 -2
- package/lib/server/fetch.js +96 -99
- package/lib/server/firefox/ffBrowser.js +6 -4
- package/lib/server/firefox/ffExecutionContext.js +0 -3
- package/lib/server/firefox/ffPage.js +3 -0
- package/lib/server/firefox/firefox.js +2 -13
- package/lib/server/frameSelectors.js +1 -1
- package/lib/server/frames.js +3 -2
- package/lib/server/har/harTracer.js +11 -0
- package/lib/server/input.js +0 -1
- package/lib/server/javascript.js +0 -7
- package/lib/server/page.js +5 -1
- package/lib/server/playwright.js +5 -2
- package/lib/server/recorder/contextRecorder.js +33 -50
- package/lib/server/recorder/recorderActions.js +2 -1
- package/lib/server/recorder/recorderApp.js +15 -9
- package/lib/server/recorder/recorderCollection.js +68 -79
- package/lib/server/recorder/recorderFrontend.js +5 -0
- package/lib/server/recorder/recorderInTraceViewer.js +144 -0
- package/lib/server/recorder/recorderRunner.js +75 -97
- package/lib/server/recorder/recorderUtils.js +47 -6
- package/lib/server/recorder.js +28 -25
- package/lib/server/registry/index.js +85 -4
- package/lib/server/socksClientCertificatesInterceptor.js +15 -3
- package/lib/server/trace/recorder/snapshotter.js +1 -0
- package/lib/server/trace/recorder/snapshotterInjected.js +2 -2
- package/lib/server/trace/recorder/tracing.js +58 -2
- package/lib/server/trace/test/inMemorySnapshotter.js +1 -1
- package/lib/server/trace/viewer/traceViewer.js +2 -5
- package/lib/server/webkit/webkit.js +1 -1
- package/lib/server/webkit/wkBrowser.js +6 -5
- package/lib/server/webkit/wkExecutionContext.js +0 -3
- package/lib/server/webkit/wkPage.js +4 -1
- package/lib/utils/happy-eyeballs.js +13 -0
- package/lib/utils/hostPlatform.js +2 -2
- package/lib/utils/httpServer.js +1 -0
- package/lib/utils/isomorphic/locatorGenerators.js +9 -18
- package/lib/utils/isomorphic/locatorParser.js +2 -2
- package/lib/utils/isomorphic/recorderUtils.js +195 -0
- package/lib/vite/htmlReport/index.html +12 -12
- package/lib/vite/recorder/assets/codeMirrorModule-CND2fZ5Q.js +24 -0
- package/lib/vite/recorder/assets/{index-NC7rIA63.css → index-BW-aOBcL.css} +1 -1
- package/lib/vite/recorder/assets/{index-A2TWT47O.js → index-CEc83sSS.js} +10 -15
- package/lib/vite/recorder/index.html +2 -2
- package/lib/vite/traceViewer/assets/codeMirrorModule-5yiV-3wl.js +16831 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-B7Z3vq11.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-BdBhzV6t.js +16443 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-BqcXH1AO.js +16838 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-C6p3E9Zg.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-Ca-1BNel.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-CcviAl53.js +16831 -0
- package/lib/vite/{recorder/assets/codeMirrorModule-vr7pfcwZ.js → traceViewer/assets/codeMirrorModule-CqYUz5ms.js} +1 -1
- package/lib/vite/traceViewer/assets/codeMirrorModule-DS3v0XrQ.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-Dx6AXgMV.js +16838 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-EhKN7Okm.js +16449 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-MzSmL4X2.js +24 -0
- package/lib/vite/traceViewer/assets/{codeMirrorModule-cCPLLRBo.js → codeMirrorModule-T_sdMrbM.js} +1 -1
- package/lib/vite/traceViewer/assets/codeMirrorModule-U6XMqGkV.js +16437 -0
- package/lib/vite/traceViewer/assets/inspectorTab-BABZNwlH.js +17351 -0
- package/lib/vite/traceViewer/assets/inspectorTab-BPzVEZSf.js +17351 -0
- package/lib/vite/traceViewer/assets/inspectorTab-Bbgq0hgt.js +64 -0
- package/lib/vite/traceViewer/assets/inspectorTab-DhBbZz8I.js +64 -0
- package/lib/vite/traceViewer/assets/inspectorTab-DpvLVMq5.js +17351 -0
- package/lib/vite/traceViewer/assets/testServerConnection-D-tXL3sj.js +224 -0
- package/lib/vite/traceViewer/assets/workbench-B13nfocr.js +9 -0
- package/lib/vite/traceViewer/assets/workbench-BcgGQnKb.js +1473 -0
- package/lib/vite/traceViewer/assets/{wsPort-MnTGOuCA.js → workbench-Bjkiwcr1.js} +1505 -926
- package/lib/vite/traceViewer/assets/workbench-BwodYCgl.js +19119 -0
- package/lib/vite/traceViewer/assets/workbench-ByyWxoT8.js +1473 -0
- package/lib/vite/traceViewer/assets/{workbench-z8ylMSQK.js → workbench-C43LWZEX.js} +7 -7
- package/lib/vite/traceViewer/assets/workbench-C5OQh9VX.js +19119 -0
- package/lib/vite/traceViewer/assets/workbench-Crj6jzdv.js +19119 -0
- package/lib/vite/traceViewer/assets/workbench-DhqI6jeL.js +1473 -0
- package/lib/vite/traceViewer/assets/workbench-DrQjKdyE.js +72 -0
- package/lib/vite/traceViewer/assets/workbench-Pa1v1Ojh.js +72 -0
- package/lib/vite/traceViewer/assets/workbench-caTaZnzx.js +72 -0
- package/lib/vite/traceViewer/assets/workbench-gtYcQBNA.js +9 -0
- package/lib/vite/traceViewer/assets/workbench-u2lRPMOT.js +72 -0
- package/lib/vite/traceViewer/assets/xtermModule-CZ7sDYXB.js +6529 -0
- package/lib/vite/traceViewer/assets/xtermModule-DZP0glxx.js +5982 -0
- package/lib/vite/traceViewer/codeMirrorModule.Cy8X9Wtw.css +344 -0
- package/lib/vite/traceViewer/embedded.27BGR_eD.js +105 -0
- package/lib/vite/traceViewer/embedded.BBZ9gQEw.js +104 -0
- package/lib/vite/traceViewer/embedded.BQq6Psnz.js +104 -0
- package/lib/vite/traceViewer/{embedded.TOXRJZ9A.js → embedded.BVDVQOzc.js} +1 -1
- package/lib/vite/traceViewer/embedded.Bn8Ptzv6.js +2 -0
- package/lib/vite/traceViewer/embedded.CorI3dFX.js +104 -0
- package/lib/vite/traceViewer/embedded.CvhnUgIi.js +2 -0
- package/lib/vite/traceViewer/embedded.D27cnKiB.js +104 -0
- package/lib/vite/traceViewer/embedded.D4lqGydT.js +2 -0
- package/lib/vite/traceViewer/embedded.DPqrDeET.js +2 -0
- package/lib/vite/traceViewer/embedded.DTjd2aiy.js +105 -0
- package/lib/vite/traceViewer/embedded.DbzY7Q8w.js +2 -0
- package/lib/vite/traceViewer/embedded.DjZq4InJ.css +68 -0
- package/lib/vite/traceViewer/embedded.SsjKHrxC.js +105 -0
- package/lib/vite/traceViewer/embedded.f-PLGsBT.js +2 -0
- package/lib/vite/traceViewer/embedded.html +6 -4
- package/lib/vite/traceViewer/index.B7aiTMfZ.js +2 -0
- package/lib/vite/traceViewer/{index.e7qpO0B0.js → index.B8dgQwuN.js} +1 -1
- package/lib/vite/traceViewer/index.BGj8jY3H.js +2 -0
- package/lib/vite/traceViewer/index.BSak5QT9.js +2 -0
- package/lib/vite/traceViewer/index.BrT2kfuc.js +2 -0
- package/lib/vite/traceViewer/{index.RT4iItO_.js → index.C0EgJ4oW.js} +36 -21
- package/lib/vite/traceViewer/index.CUpI-BFe.js +195 -0
- package/lib/vite/traceViewer/index.DkRbtWVo.js +195 -0
- package/lib/vite/traceViewer/index.DsjmhbB6.js +195 -0
- package/lib/vite/traceViewer/index.Dz3icWJV.js +196 -0
- package/lib/vite/traceViewer/index.PqcsvBxQ.js +196 -0
- package/lib/vite/traceViewer/index.QanXxRUb.css +131 -0
- package/lib/vite/traceViewer/index._cX8k4co.js +2 -0
- package/lib/vite/traceViewer/index.html +7 -5
- package/lib/vite/traceViewer/index.pMAN88y-.js +2 -0
- package/lib/vite/traceViewer/index.yxAwzeWG.js +196 -0
- package/lib/vite/traceViewer/inspectorTab.DGJWXOSd.css +3145 -0
- package/lib/vite/traceViewer/inspectorTab.DLjBDrQR.css +1 -0
- package/lib/vite/traceViewer/recorder.7Wl6HrQl.js +550 -0
- package/lib/vite/traceViewer/recorder.B_SY1GJM.css +0 -0
- package/lib/vite/traceViewer/recorder.BufKu9Hp.js +550 -0
- package/lib/vite/traceViewer/recorder.Ch-WHviK.js +2 -0
- package/lib/vite/traceViewer/recorder.DBDpiNOK.css +15 -0
- package/lib/vite/traceViewer/recorder.POd-toIn.js +2 -0
- package/lib/vite/traceViewer/recorder.am-MV-DQ.js +550 -0
- package/lib/vite/traceViewer/recorder.html +17 -0
- package/lib/vite/traceViewer/sw.bundle.js +3 -3
- package/lib/vite/traceViewer/uiMode.BEZVCe5O.js +5 -0
- package/lib/vite/traceViewer/uiMode.BZoFj6zV.js +1723 -0
- package/lib/vite/traceViewer/uiMode.C4nbcio6.js +1730 -0
- package/lib/vite/traceViewer/uiMode.CAYqod-m.css +1 -0
- package/lib/vite/traceViewer/uiMode.D-tg1Oci.js +1730 -0
- package/lib/vite/traceViewer/uiMode.DKjMBMlc.js +1730 -0
- package/lib/vite/traceViewer/uiMode.DRmgrHSk.css +1462 -0
- package/lib/vite/traceViewer/uiMode.DVWUEIHq.css +1424 -0
- package/lib/vite/traceViewer/{uiMode.MTXOs_2V.js → uiMode.DVrL7a1K.js} +5 -5
- package/lib/vite/traceViewer/uiMode.DdtUZZVS.js +5 -0
- package/lib/vite/traceViewer/uiMode.Dg9oJCQU.js +10 -0
- package/lib/vite/traceViewer/uiMode.Dlo9s_YX.js +1723 -0
- package/lib/vite/traceViewer/uiMode.DwZAzstF.js +10 -0
- package/lib/vite/traceViewer/uiMode.O07awP3T.js +10 -0
- package/lib/vite/traceViewer/uiMode.gGHHTsyL.js +1730 -0
- package/lib/vite/traceViewer/uiMode.html +7 -5
- package/lib/vite/traceViewer/uiMode.jY2s-9ps.js +10 -0
- package/lib/vite/traceViewer/uiMode.wsGnVMQK.js +1723 -0
- package/lib/vite/traceViewer/workbench.B3X2QtYa.css +3702 -0
- package/lib/vite/traceViewer/workbench.BQNDbcQ0.css +550 -0
- package/lib/vite/traceViewer/{workbench.NokwQoMV.css → workbench.DjbIuxix.css} +1 -1
- package/lib/vite/traceViewer/workbench.DlsCx8k5.css +1 -0
- package/lib/vite/traceViewer/workbench.DyTpxWVb.css +1 -0
- package/lib/vite/traceViewer/workbench.wuxQoE2z.css +3703 -0
- package/lib/vite/traceViewer/xtermModule.4oRVGWQ-.css +209 -0
- package/package.json +1 -1
- package/types/protocol.d.ts +610 -173
- package/types/types.d.ts +2037 -949
- package/lib/vite/traceViewer/assets/codeMirrorModule-0bpaqixv.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-clyjx5sb.js +0 -15578
- package/lib/vite/traceViewer/assets/codeMirrorModule-wLpsbIhd.js +0 -24
- package/lib/vite/traceViewer/assets/wsPort-_JBDEilC.js +0 -69
- package/lib/vite/traceViewer/assets/wsPort-f2dAQL4I.js +0 -69
- package/lib/vite/traceViewer/index.-_8-eHEE.js +0 -2
- package/lib/vite/traceViewer/index.-g_5lMbJ.css +0 -1
- package/lib/vite/traceViewer/index.u51inEcm.js +0 -2
- package/lib/vite/traceViewer/uiMode.9CwNsWc6.js +0 -10
- package/lib/vite/traceViewer/uiMode.Fb0bNA4H.js +0 -10
- package/lib/vite/traceViewer/uiMode.pWy0Re7G.css +0 -1
- package/lib/vite/traceViewer/uiMode.yLNTmFO4.js +0 -1490
- package/lib/vite/traceViewer/wsPort.zR1WIy9-.css +0 -1
- /package/lib/vite/recorder/assets/{codeMirrorModule-Hs9-1ZG4.css → codeMirrorModule-ez37Vkbh.css} +0 -0
- /package/lib/vite/recorder/assets/{codicon-wpoHPmsu.ttf → codicon-DCmgc-ay.ttf} +0 -0
- /package/lib/vite/traceViewer/assets/{testServerConnection-_1gRQKgk.js → testServerConnection-DeE2kSzz.js} +0 -0
- /package/lib/vite/traceViewer/assets/{xtermModule-Yt6xwiJ_.js → xtermModule-BeNbaIVa.js} +0 -0
- /package/lib/vite/traceViewer/{codeMirrorModule.Hs9-1ZG4.css → codeMirrorModule.ez37Vkbh.css} +0 -0
- /package/lib/vite/traceViewer/{codicon.wpoHPmsu.ttf → codicon.DCmgc-ay.ttf} +0 -0
- /package/lib/vite/traceViewer/{embedded.MO1jdrtU.css → embedded.w7WN2u1R.css} +0 -0
- /package/lib/vite/traceViewer/{index.q21lh23x.css → index.CrbWWHbf.css} +0 -0
- /package/lib/vite/traceViewer/{uiMode.93DRT-rm.css → uiMode.D3cNFP6u.css} +0 -0
- /package/lib/vite/traceViewer/{xtermModule.0lwXJFHT.css → xtermModule.DSXBckUd.css} +0 -0
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function __vite__mapDeps(indexes) {
|
|
2
|
+
if (!__vite__mapDeps.viteFileDeps) {
|
|
3
|
+
__vite__mapDeps.viteFileDeps = ["./codeMirrorModule-CqYUz5ms.js","../codeMirrorModule.ez37Vkbh.css"]
|
|
4
|
+
}
|
|
5
|
+
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
6
|
+
}
|
|
1
7
|
var vm=Object.defineProperty;var ym=(e,t,n)=>t in e?vm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>(ym(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var nx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ud={exports:{}},Us={},cd={exports:{}},D={};/**
|
|
2
8
|
* @license React
|
|
3
9
|
* react.production.min.js
|
|
@@ -38,7 +44,7 @@ var vm=Object.defineProperty;var ym=(e,t,n)=>t in e?vm(e,t,{enumerable:!0,config
|
|
|
38
44
|
`).replace(uv,"")}function ji(e,t,n){if(t=qu(t),qu(e)!==t&&n)throw Error(L(425))}function xs(){}var gl=null,vl=null;function yl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wl=typeof setTimeout=="function"?setTimeout:void 0,cv=typeof clearTimeout=="function"?clearTimeout:void 0,Xu=typeof Promise=="function"?Promise:void 0,dv=typeof queueMicrotask=="function"?queueMicrotask:typeof Xu<"u"?function(e){return Xu.resolve(null).then(e).catch(fv)}:wl;function fv(e){setTimeout(function(){throw e})}function Lo(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Jr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Jr(t)}function qt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Qu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ur=Math.random().toString(36).slice(2),yt="__reactFiber$"+ur,ri="__reactProps$"+ur,At="__reactContainer$"+ur,xl="__reactEvents$"+ur,hv="__reactListeners$"+ur,pv="__reactHandles$"+ur;function un(e){var t=e[yt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[At]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Qu(e);e!==null;){if(n=e[yt])return n;e=Qu(e)}return t}e=n,n=e.parentNode}return null}function pi(e){return e=e[yt]||e[At],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Dn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function Xs(e){return e[ri]||null}var Sl=[],Fn=-1;function nn(e){return{current:e}}function q(e){0>Fn||(e.current=Sl[Fn],Sl[Fn]=null,Fn--)}function U(e,t){Fn++,Sl[Fn]=e.current,e.current=t}var Zt={},Se=nn(Zt),Oe=nn(!1),gn=Zt;function tr(e,t){var n=e.type.contextTypes;if(!n)return Zt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ze(e){return e=e.childContextTypes,e!=null}function Ss(){q(Oe),q(Se)}function Ku(e,t,n){if(Se.current!==Zt)throw Error(L(168));U(Se,t),U(Oe,n)}function xf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(L(108,Jm(e)||"Unknown",i));return Y({},n,r)}function _s(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zt,gn=Se.current,U(Se,e),U(Oe,Oe.current),!0}function Gu(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=xf(e,t,gn),r.__reactInternalMemoizedMergedChildContext=e,q(Oe),q(Se),U(Se,e)):q(Oe),U(Oe,n)}var kt=null,Qs=!1,Ao=!1;function Sf(e){kt===null?kt=[e]:kt.push(e)}function mv(e){Qs=!0,Sf(e)}function rn(){if(!Ao&&kt!==null){Ao=!0;var e=0,t=H;try{var n=kt;for(H=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}kt=null,Qs=!1}catch(i){throw kt!==null&&(kt=kt.slice(e+1)),Wd(ca,rn),i}finally{H=t,Ao=!1}}return null}var Hn=[],Un=0,Es=null,Ts=0,Ke=[],Ge=0,vn=null,Nt=1,Ct="";function sn(e,t){Hn[Un++]=Ts,Hn[Un++]=Es,Es=e,Ts=t}function _f(e,t,n){Ke[Ge++]=Nt,Ke[Ge++]=Ct,Ke[Ge++]=vn,vn=e;var r=Nt;e=Ct;var i=32-ut(r)-1;r&=~(1<<i),n+=1;var s=32-ut(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Nt=1<<32-ut(t)+i|n<<i|r,Ct=s+e}else Nt=1<<s|n<<i|r,Ct=e}function wa(e){e.return!==null&&(sn(e,1),_f(e,1,0))}function xa(e){for(;e===Es;)Es=Hn[--Un],Hn[Un]=null,Ts=Hn[--Un],Hn[Un]=null;for(;e===vn;)vn=Ke[--Ge],Ke[Ge]=null,Ct=Ke[--Ge],Ke[Ge]=null,Nt=Ke[--Ge],Ke[Ge]=null}var Be=null,Ue=null,Q=!1,lt=null;function Ef(e,t){var n=Je(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Yu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Be=e,Ue=qt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Be=e,Ue=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=vn!==null?{id:Nt,overflow:Ct}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Je(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Be=e,Ue=null,!0):!1;default:return!1}}function _l(e){return(e.mode&1)!==0&&(e.flags&128)===0}function El(e){if(Q){var t=Ue;if(t){var n=t;if(!Yu(e,t)){if(_l(e))throw Error(L(418));t=qt(n.nextSibling);var r=Be;t&&Yu(e,t)?Ef(r,n):(e.flags=e.flags&-4097|2,Q=!1,Be=e)}}else{if(_l(e))throw Error(L(418));e.flags=e.flags&-4097|2,Q=!1,Be=e}}}function Ju(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Be=e}function Mi(e){if(e!==Be)return!1;if(!Q)return Ju(e),Q=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!yl(e.type,e.memoizedProps)),t&&(t=Ue)){if(_l(e))throw Tf(),Error(L(418));for(;t;)Ef(e,t),t=qt(t.nextSibling)}if(Ju(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ue=qt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ue=null}}else Ue=Be?qt(e.stateNode.nextSibling):null;return!0}function Tf(){for(var e=Ue;e;)e=qt(e.nextSibling)}function nr(){Ue=Be=null,Q=!1}function Sa(e){lt===null?lt=[e]:lt.push(e)}var gv=It.ReactCurrentBatchConfig;function st(e,t){if(e&&e.defaultProps){t=Y({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var ks=nn(null),Ns=null,Bn=null,_a=null;function Ea(){_a=Bn=Ns=null}function Ta(e){var t=ks.current;q(ks),e._currentValue=t}function Tl(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Jn(e,t){Ns=e,_a=Bn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&($e=!0),e.firstContext=null)}function nt(e){var t=e._currentValue;if(_a!==e)if(e={context:e,memoizedValue:t,next:null},Bn===null){if(Ns===null)throw Error(L(308));Bn=e,Ns.dependencies={lanes:0,firstContext:e}}else Bn=Bn.next=e;return t}var cn=null;function ka(e){cn===null?cn=[e]:cn.push(e)}function kf(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ka(t)):(n.next=i.next,i.next=n),t.interleaved=n,jt(e,r)}function jt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var $t=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Nf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function bt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Xt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,F&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,jt(e,n)}return i=r.interleaved,i===null?(t.next=t,ka(r)):(t.next=i.next,i.next=t),r.interleaved=t,jt(e,n)}function Ki(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,da(e,n)}}function Zu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Cs(e,t,n,r){var i=e.updateQueue;$t=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,o===null?s=u:o.next=u,o=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==o&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(s!==null){var p=i.baseState;o=0,c=u=a=null,l=s;do{var f=l.lane,g=l.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,w=l;switch(f=t,g=n,w.tag){case 1:if(y=w.payload,typeof y=="function"){p=y.call(g,p,f);break e}p=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=w.payload,f=typeof y=="function"?y.call(g,p,f):y,f==null)break e;p=Y({},p,f);break e;case 2:$t=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[l]:f.push(l))}else g={eventTime:g,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=g,a=p):c=c.next=g,o|=f;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;f=l,l=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(a=p),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);wn|=o,e.lanes=o,e.memoizedState=p}}function ec(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(L(191,i));i.call(r)}}}var Cf=new Td.Component().refs;function kl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Y({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ks={isMounted:function(e){return(e=e._reactInternals)?Tn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ce(),i=Kt(e),s=bt(r,i);s.payload=t,n!=null&&(s.callback=n),t=Xt(e,s,i),t!==null&&(ct(t,e,i,r),Ki(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ce(),i=Kt(e),s=bt(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Xt(e,s,i),t!==null&&(ct(t,e,i,r),Ki(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ce(),r=Kt(e),i=bt(n,r);i.tag=2,t!=null&&(i.callback=t),t=Xt(e,i,r),t!==null&&(ct(t,e,r,n),Ki(t,e,r))}};function tc(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!ei(n,r)||!ei(i,s):!0}function bf(e,t,n){var r=!1,i=Zt,s=t.contextType;return typeof s=="object"&&s!==null?s=nt(s):(i=ze(t)?gn:Se.current,r=t.contextTypes,s=(r=r!=null)?tr(e,i):Zt),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ks,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function nc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ks.enqueueReplaceState(t,t.state,null)}function Nl(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Cf,Na(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=nt(s):(s=ze(t)?gn:Se.current,i.context=tr(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(kl(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Ks.enqueueReplaceState(i,i.state,null),Cs(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function _r(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var l=i.refs;l===Cf&&(l=i.refs={}),o===null?delete l[s]:l[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,e))}return e}function Ii(e,t){throw e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function rc(e){var t=e._init;return t(e._payload)}function Lf(e){function t(h,m){if(e){var v=h.deletions;v===null?(h.deletions=[m],h.flags|=16):v.push(m)}}function n(h,m){if(!e)return null;for(;m!==null;)t(h,m),m=m.sibling;return null}function r(h,m){for(h=new Map;m!==null;)m.key!==null?h.set(m.key,m):h.set(m.index,m),m=m.sibling;return h}function i(h,m){return h=Gt(h,m),h.index=0,h.sibling=null,h}function s(h,m,v){return h.index=v,e?(v=h.alternate,v!==null?(v=v.index,v<m?(h.flags|=2,m):v):(h.flags|=2,m)):(h.flags|=1048576,m)}function o(h){return e&&h.alternate===null&&(h.flags|=2),h}function l(h,m,v,S){return m===null||m.tag!==6?(m=Oo(v,h.mode,S),m.return=h,m):(m=i(m,v),m.return=h,m)}function a(h,m,v,S){var N=v.type;return N===Rn?c(h,m,v.props.children,S,v.key):m!==null&&(m.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Rt&&rc(N)===m.type)?(S=i(m,v.props),S.ref=_r(h,m,v),S.return=h,S):(S=ts(v.type,v.key,v.props,null,h.mode,S),S.ref=_r(h,m,v),S.return=h,S)}function u(h,m,v,S){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=zo(v,h.mode,S),m.return=h,m):(m=i(m,v.children||[]),m.return=h,m)}function c(h,m,v,S,N){return m===null||m.tag!==7?(m=pn(v,h.mode,S,N),m.return=h,m):(m=i(m,v),m.return=h,m)}function p(h,m,v){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Oo(""+m,h.mode,v),m.return=h,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case _i:return v=ts(m.type,m.key,m.props,null,h.mode,v),v.ref=_r(h,null,m),v.return=h,v;case Pn:return m=zo(m,h.mode,v),m.return=h,m;case Rt:var S=m._init;return p(h,S(m._payload),v)}if(jr(m)||vr(m))return m=pn(m,h.mode,v,null),m.return=h,m;Ii(h,m)}return null}function f(h,m,v,S){var N=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return N!==null?null:l(h,m,""+v,S);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case _i:return v.key===N?a(h,m,v,S):null;case Pn:return v.key===N?u(h,m,v,S):null;case Rt:return N=v._init,f(h,m,N(v._payload),S)}if(jr(v)||vr(v))return N!==null?null:c(h,m,v,S,null);Ii(h,v)}return null}function g(h,m,v,S,N){if(typeof S=="string"&&S!==""||typeof S=="number")return h=h.get(v)||null,l(m,h,""+S,N);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case _i:return h=h.get(S.key===null?v:S.key)||null,a(m,h,S,N);case Pn:return h=h.get(S.key===null?v:S.key)||null,u(m,h,S,N);case Rt:var E=S._init;return g(h,m,v,E(S._payload),N)}if(jr(S)||vr(S))return h=h.get(v)||null,c(m,h,S,N,null);Ii(m,S)}return null}function y(h,m,v,S){for(var N=null,E=null,C=m,A=m=0,_=null;C!==null&&A<v.length;A++){C.index>A?(_=C,C=null):_=C.sibling;var T=f(h,C,v[A],S);if(T===null){C===null&&(C=_);break}e&&C&&T.alternate===null&&t(h,C),m=s(T,m,A),E===null?N=T:E.sibling=T,E=T,C=_}if(A===v.length)return n(h,C),Q&&sn(h,A),N;if(C===null){for(;A<v.length;A++)C=p(h,v[A],S),C!==null&&(m=s(C,m,A),E===null?N=C:E.sibling=C,E=C);return Q&&sn(h,A),N}for(C=r(h,C);A<v.length;A++)_=g(C,h,A,v[A],S),_!==null&&(e&&_.alternate!==null&&C.delete(_.key===null?A:_.key),m=s(_,m,A),E===null?N=_:E.sibling=_,E=_);return e&&C.forEach(function(j){return t(h,j)}),Q&&sn(h,A),N}function w(h,m,v,S){var N=vr(v);if(typeof N!="function")throw Error(L(150));if(v=N.call(v),v==null)throw Error(L(151));for(var E=N=null,C=m,A=m=0,_=null,T=v.next();C!==null&&!T.done;A++,T=v.next()){C.index>A?(_=C,C=null):_=C.sibling;var j=f(h,C,T.value,S);if(j===null){C===null&&(C=_);break}e&&C&&j.alternate===null&&t(h,C),m=s(j,m,A),E===null?N=j:E.sibling=j,E=j,C=_}if(T.done)return n(h,C),Q&&sn(h,A),N;if(C===null){for(;!T.done;A++,T=v.next())T=p(h,T.value,S),T!==null&&(m=s(T,m,A),E===null?N=T:E.sibling=T,E=T);return Q&&sn(h,A),N}for(C=r(h,C);!T.done;A++,T=v.next())T=g(C,h,A,T.value,S),T!==null&&(e&&T.alternate!==null&&C.delete(T.key===null?A:T.key),m=s(T,m,A),E===null?N=T:E.sibling=T,E=T);return e&&C.forEach(function(k){return t(h,k)}),Q&&sn(h,A),N}function x(h,m,v,S){if(typeof v=="object"&&v!==null&&v.type===Rn&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case _i:e:{for(var N=v.key,E=m;E!==null;){if(E.key===N){if(N=v.type,N===Rn){if(E.tag===7){n(h,E.sibling),m=i(E,v.props.children),m.return=h,h=m;break e}}else if(E.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Rt&&rc(N)===E.type){n(h,E.sibling),m=i(E,v.props),m.ref=_r(h,E,v),m.return=h,h=m;break e}n(h,E);break}else t(h,E);E=E.sibling}v.type===Rn?(m=pn(v.props.children,h.mode,S,v.key),m.return=h,h=m):(S=ts(v.type,v.key,v.props,null,h.mode,S),S.ref=_r(h,m,v),S.return=h,h=S)}return o(h);case Pn:e:{for(E=v.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){n(h,m.sibling),m=i(m,v.children||[]),m.return=h,h=m;break e}else{n(h,m);break}else t(h,m);m=m.sibling}m=zo(v,h.mode,S),m.return=h,h=m}return o(h);case Rt:return E=v._init,x(h,m,E(v._payload),S)}if(jr(v))return y(h,m,v,S);if(vr(v))return w(h,m,v,S);Ii(h,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(n(h,m.sibling),m=i(m,v),m.return=h,h=m):(n(h,m),m=Oo(v,h.mode,S),m.return=h,h=m),o(h)):n(h,m)}return x}var rr=Lf(!0),Af=Lf(!1),mi={},xt=nn(mi),ii=nn(mi),si=nn(mi);function dn(e){if(e===mi)throw Error(L(174));return e}function Ca(e,t){switch(U(si,t),U(ii,e),U(xt,mi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:il(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=il(t,e)}q(xt),U(xt,t)}function ir(){q(xt),q(ii),q(si)}function jf(e){dn(si.current);var t=dn(xt.current),n=il(t,e.type);t!==n&&(U(ii,e),U(xt,n))}function ba(e){ii.current===e&&(q(xt),q(ii))}var K=nn(0);function bs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jo=[];function La(){for(var e=0;e<jo.length;e++)jo[e]._workInProgressVersionPrimary=null;jo.length=0}var Gi=It.ReactCurrentDispatcher,Mo=It.ReactCurrentBatchConfig,yn=0,G=null,oe=null,ae=null,Ls=!1,Br=!1,oi=0,vv=0;function ge(){throw Error(L(321))}function Aa(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!dt(e[n],t[n]))return!1;return!0}function ja(e,t,n,r,i,s){if(yn=s,G=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gi.current=e===null||e.memoizedState===null?Sv:_v,e=n(r,i),Br){s=0;do{if(Br=!1,oi=0,25<=s)throw Error(L(301));s+=1,ae=oe=null,t.updateQueue=null,Gi.current=Ev,e=n(r,i)}while(Br)}if(Gi.current=As,t=oe!==null&&oe.next!==null,yn=0,ae=oe=G=null,Ls=!1,t)throw Error(L(300));return e}function Ma(){var e=oi!==0;return oi=0,e}function mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ae===null?G.memoizedState=ae=e:ae=ae.next=e,ae}function rt(){if(oe===null){var e=G.alternate;e=e!==null?e.memoizedState:null}else e=oe.next;var t=ae===null?G.memoizedState:ae.next;if(t!==null)ae=t,oe=e;else{if(e===null)throw Error(L(310));oe=e,e={memoizedState:oe.memoizedState,baseState:oe.baseState,baseQueue:oe.baseQueue,queue:oe.queue,next:null},ae===null?G.memoizedState=ae=e:ae=ae.next=e}return ae}function li(e,t){return typeof t=="function"?t(e):t}function Io(e){var t=rt(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=oe,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var l=o=null,a=null,u=s;do{var c=u.lane;if((yn&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var p={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=p,o=r):a=a.next=p,G.lanes|=c,wn|=c}u=u.next}while(u!==null&&u!==s);a===null?o=r:a.next=l,dt(r,t.memoizedState)||($e=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,G.lanes|=s,wn|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Po(e){var t=rt(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);dt(s,t.memoizedState)||($e=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Mf(){}function If(e,t){var n=G,r=rt(),i=t(),s=!dt(r.memoizedState,i);if(s&&(r.memoizedState=i,$e=!0),r=r.queue,Ia($f.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||ae!==null&&ae.memoizedState.tag&1){if(n.flags|=2048,ai(9,Rf.bind(null,n,r,i,t),void 0,null),ue===null)throw Error(L(349));yn&30||Pf(n,t,i)}return i}function Pf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=G.updateQueue,t===null?(t={lastEffect:null,stores:null},G.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Rf(e,t,n,r){t.value=n,t.getSnapshot=r,Of(t)&&zf(e)}function $f(e,t,n){return n(function(){Of(t)&&zf(e)})}function Of(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!dt(e,n)}catch{return!0}}function zf(e){var t=jt(e,1);t!==null&&ct(t,e,1,-1)}function ic(e){var t=mt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:li,lastRenderedState:e},t.queue=e,e=e.dispatch=xv.bind(null,G,e),[t.memoizedState,e]}function ai(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=G.updateQueue,t===null?(t={lastEffect:null,stores:null},G.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Df(){return rt().memoizedState}function Yi(e,t,n,r){var i=mt();G.flags|=e,i.memoizedState=ai(1|t,n,void 0,r===void 0?null:r)}function Gs(e,t,n,r){var i=rt();r=r===void 0?null:r;var s=void 0;if(oe!==null){var o=oe.memoizedState;if(s=o.destroy,r!==null&&Aa(r,o.deps)){i.memoizedState=ai(t,n,s,r);return}}G.flags|=e,i.memoizedState=ai(1|t,n,s,r)}function sc(e,t){return Yi(8390656,8,e,t)}function Ia(e,t){return Gs(2048,8,e,t)}function Ff(e,t){return Gs(4,2,e,t)}function Hf(e,t){return Gs(4,4,e,t)}function Uf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Bf(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4,4,Uf.bind(null,t,e),n)}function Pa(){}function Vf(e,t){var n=rt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Wf(e,t){var n=rt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function qf(e,t,n){return yn&21?(dt(n,t)||(n=Qd(),G.lanes|=n,wn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,$e=!0),e.memoizedState=n)}function yv(e,t){var n=H;H=n!==0&&4>n?n:4,e(!0);var r=Mo.transition;Mo.transition={};try{e(!1),t()}finally{H=n,Mo.transition=r}}function Xf(){return rt().memoizedState}function wv(e,t,n){var r=Kt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Qf(e))Kf(t,n);else if(n=kf(e,t,n,r),n!==null){var i=Ce();ct(n,e,r,i),Gf(n,t,r)}}function xv(e,t,n){var r=Kt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qf(e))Kf(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,dt(l,o)){var a=t.interleaved;a===null?(i.next=i,ka(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=kf(e,t,i,r),n!==null&&(i=Ce(),ct(n,e,r,i),Gf(n,t,r))}}function Qf(e){var t=e.alternate;return e===G||t!==null&&t===G}function Kf(e,t){Br=Ls=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Gf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,da(e,n)}}var As={readContext:nt,useCallback:ge,useContext:ge,useEffect:ge,useImperativeHandle:ge,useInsertionEffect:ge,useLayoutEffect:ge,useMemo:ge,useReducer:ge,useRef:ge,useState:ge,useDebugValue:ge,useDeferredValue:ge,useTransition:ge,useMutableSource:ge,useSyncExternalStore:ge,useId:ge,unstable_isNewReconciler:!1},Sv={readContext:nt,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:nt,useEffect:sc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Yi(4194308,4,Uf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yi(4,2,e,t)},useMemo:function(e,t){var n=mt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=mt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=wv.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:ic,useDebugValue:Pa,useDeferredValue:function(e){return mt().memoizedState=e},useTransition:function(){var e=ic(!1),t=e[0];return e=yv.bind(null,e[1]),mt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=G,i=mt();if(Q){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),ue===null)throw Error(L(349));yn&30||Pf(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,sc($f.bind(null,r,s,e),[e]),r.flags|=2048,ai(9,Rf.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=mt(),t=ue.identifierPrefix;if(Q){var n=Ct,r=Nt;n=(r&~(1<<32-ut(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=oi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=vv++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},_v={readContext:nt,useCallback:Vf,useContext:nt,useEffect:Ia,useImperativeHandle:Bf,useInsertionEffect:Ff,useLayoutEffect:Hf,useMemo:Wf,useReducer:Io,useRef:Df,useState:function(){return Io(li)},useDebugValue:Pa,useDeferredValue:function(e){var t=rt();return qf(t,oe.memoizedState,e)},useTransition:function(){var e=Io(li)[0],t=rt().memoizedState;return[e,t]},useMutableSource:Mf,useSyncExternalStore:If,useId:Xf,unstable_isNewReconciler:!1},Ev={readContext:nt,useCallback:Vf,useContext:nt,useEffect:Ia,useImperativeHandle:Bf,useInsertionEffect:Ff,useLayoutEffect:Hf,useMemo:Wf,useReducer:Po,useRef:Df,useState:function(){return Po(li)},useDebugValue:Pa,useDeferredValue:function(e){var t=rt();return oe===null?t.memoizedState=e:qf(t,oe.memoizedState,e)},useTransition:function(){var e=Po(li)[0],t=rt().memoizedState;return[e,t]},useMutableSource:Mf,useSyncExternalStore:If,useId:Xf,unstable_isNewReconciler:!1};function sr(e,t){try{var n="",r=t;do n+=Ym(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
39
45
|
Error generating stack: `+s.message+`
|
|
40
46
|
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function Ro(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Cl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Tv=typeof WeakMap=="function"?WeakMap:Map;function Yf(e,t,n){n=bt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ms||(Ms=!0,Ol=r),Cl(e,t)},n}function Jf(e,t,n){n=bt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Cl(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Cl(e,t),typeof r!="function"&&(Qt===null?Qt=new Set([this]):Qt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function oc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Tv;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=zv.bind(null,e,t,n),t.then(e,e))}function lc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function ac(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=bt(-1,1),t.tag=2,Xt(n,t,1))),n.lanes|=1),e)}var kv=It.ReactCurrentOwner,$e=!1;function Ee(e,t,n,r){t.child=e===null?Af(t,null,n,r):rr(t,e.child,n,r)}function uc(e,t,n,r,i){n=n.render;var s=t.ref;return Jn(t,i),r=ja(e,t,n,r,s,i),n=Ma(),e!==null&&!$e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Mt(e,t,i)):(Q&&n&&wa(t),t.flags|=1,Ee(e,t,r,i),t.child)}function cc(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Ua(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Zf(e,t,s,r,i)):(e=ts(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:ei,n(o,r)&&e.ref===t.ref)return Mt(e,t,i)}return t.flags|=1,e=Gt(s,r),e.ref=t.ref,e.return=t,t.child=e}function Zf(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ei(s,r)&&e.ref===t.ref)if($e=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&($e=!0);else return t.lanes=e.lanes,Mt(e,t,i)}return bl(e,t,n,r,i)}function eh(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},U(Wn,He),He|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,U(Wn,He),He|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,U(Wn,He),He|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,U(Wn,He),He|=r;return Ee(e,t,i,n),t.child}function th(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function bl(e,t,n,r,i){var s=ze(n)?gn:Se.current;return s=tr(t,s),Jn(t,i),n=ja(e,t,n,r,s,i),r=Ma(),e!==null&&!$e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Mt(e,t,i)):(Q&&r&&wa(t),t.flags|=1,Ee(e,t,n,i),t.child)}function dc(e,t,n,r,i){if(ze(n)){var s=!0;_s(t)}else s=!1;if(Jn(t,i),t.stateNode===null)Ji(e,t),bf(t,n,r),Nl(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var a=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=nt(u):(u=ze(n)?gn:Se.current,u=tr(t,u));var c=n.getDerivedStateFromProps,p=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";p||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||a!==u)&&nc(t,o,r,u),$t=!1;var f=t.memoizedState;o.state=f,Cs(t,r,o,i),a=t.memoizedState,l!==r||f!==a||Oe.current||$t?(typeof c=="function"&&(kl(t,n,c,r),a=t.memoizedState),(l=$t||tc(t,n,l,r,f,a,u))?(p||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),o.props=r,o.state=a,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Nf(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:st(t.type,l),o.props=u,p=t.pendingProps,f=o.context,a=n.contextType,typeof a=="object"&&a!==null?a=nt(a):(a=ze(n)?gn:Se.current,a=tr(t,a));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==p||f!==a)&&nc(t,o,r,a),$t=!1,f=t.memoizedState,o.state=f,Cs(t,r,o,i);var y=t.memoizedState;l!==p||f!==y||Oe.current||$t?(typeof g=="function"&&(kl(t,n,g,r),y=t.memoizedState),(u=$t||tc(t,n,u,r,f,y,a)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,a)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),o.props=r,o.state=y,o.context=a,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ll(e,t,n,r,s,i)}function Ll(e,t,n,r,i,s){th(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&Gu(t,n,!1),Mt(e,t,s);r=t.stateNode,kv.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=rr(t,e.child,null,s),t.child=rr(t,null,l,s)):Ee(e,t,l,s),t.memoizedState=r.state,i&&Gu(t,n,!0),t.child}function nh(e){var t=e.stateNode;t.pendingContext?Ku(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ku(e,t.context,!1),Ca(e,t.containerInfo)}function fc(e,t,n,r,i){return nr(),Sa(i),t.flags|=256,Ee(e,t,n,r),t.child}var Al={dehydrated:null,treeContext:null,retryLane:0};function jl(e){return{baseLanes:e,cachePool:null,transitions:null}}function rh(e,t,n){var r=t.pendingProps,i=K.current,s=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),U(K,i&1),e===null)return El(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Zs(o,r,0,null),e=pn(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=jl(n),t.memoizedState=Al,e):Ra(t,o));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Nv(e,t,o,r,l,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Gt(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=Gt(l,s):(s=pn(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?jl(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Al,r}return s=e.child,e=s.sibling,r=Gt(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ra(e,t){return t=Zs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Pi(e,t,n,r){return r!==null&&Sa(r),rr(t,e.child,null,n),e=Ra(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Nv(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Ro(Error(L(422))),Pi(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Zs({mode:"visible",children:r.children},i,0,null),s=pn(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&rr(t,e.child,null,o),t.child.memoizedState=jl(o),t.memoizedState=Al,s);if(!(t.mode&1))return Pi(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(L(419)),r=Ro(s,r,void 0),Pi(e,t,o,r)}if(l=(o&e.childLanes)!==0,$e||l){if(r=ue,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,jt(e,i),ct(r,e,i,-1))}return Ha(),r=Ro(Error(L(421))),Pi(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Dv.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Ue=qt(i.nextSibling),Be=t,Q=!0,lt=null,e!==null&&(Ke[Ge++]=Nt,Ke[Ge++]=Ct,Ke[Ge++]=vn,Nt=e.id,Ct=e.overflow,vn=t),t=Ra(t,r.children),t.flags|=4096,t)}function hc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Tl(e.return,t,n)}function $o(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function ih(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Ee(e,t,r.children,n),r=K.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hc(e,n,t);else if(e.tag===19)hc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(U(K,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&bs(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$o(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&bs(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$o(t,!0,n,null,s);break;case"together":$o(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ji(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Mt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),wn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=Gt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Gt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Cv(e,t,n){switch(t.tag){case 3:nh(t),nr();break;case 5:jf(t);break;case 1:ze(t.type)&&_s(t);break;case 4:Ca(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;U(ks,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(U(K,K.current&1),t.flags|=128,null):n&t.child.childLanes?rh(e,t,n):(U(K,K.current&1),e=Mt(e,t,n),e!==null?e.sibling:null);U(K,K.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ih(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),U(K,K.current),r)break;return null;case 22:case 23:return t.lanes=0,eh(e,t,n)}return Mt(e,t,n)}var sh,Ml,oh,lh;sh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ml=function(){};oh=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,dn(xt.current);var s=null;switch(n){case"input":i=el(e,i),r=el(e,r),s=[];break;case"select":i=Y({},i,{value:void 0}),r=Y({},r,{value:void 0}),s=[];break;case"textarea":i=rl(e,i),r=rl(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=xs)}sl(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Xr.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in a)a.hasOwnProperty(o)&&l[o]!==a[o]&&(n||(n={}),n[o]=a[o])}else n||(s||(s=[]),s.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(s=s||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(s=s||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Xr.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&W("scroll",e),s||l===a||(s=[])):(s=s||[]).push(u,a))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};lh=function(e,t,n,r){n!==r&&(t.flags|=4)};function Er(e,t){if(!Q)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function bv(e,t,n){var r=t.pendingProps;switch(xa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ve(t),null;case 1:return ze(t.type)&&Ss(),ve(t),null;case 3:return r=t.stateNode,ir(),q(Oe),q(Se),La(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Mi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,lt!==null&&(Fl(lt),lt=null))),Ml(e,t),ve(t),null;case 5:ba(t);var i=dn(si.current);if(n=t.type,e!==null&&t.stateNode!=null)oh(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(L(166));return ve(t),null}if(e=dn(xt.current),Mi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[yt]=t,r[ri]=s,e=(t.mode&1)!==0,n){case"dialog":W("cancel",r),W("close",r);break;case"iframe":case"object":case"embed":W("load",r);break;case"video":case"audio":for(i=0;i<Ir.length;i++)W(Ir[i],r);break;case"source":W("error",r);break;case"img":case"image":case"link":W("error",r),W("load",r);break;case"details":W("toggle",r);break;case"input":_u(r,s),W("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},W("invalid",r);break;case"textarea":Tu(r,s),W("invalid",r)}sl(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&ji(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&ji(r.textContent,l,e),i=["children",""+l]):Xr.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&W("scroll",r)}switch(n){case"input":Ei(r),Eu(r,s,!0);break;case"textarea":Ei(r),ku(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=xs)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Id(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[yt]=t,e[ri]=r,sh(e,t,!1,!1),t.stateNode=e;e:{switch(o=ol(n,r),n){case"dialog":W("cancel",e),W("close",e),i=r;break;case"iframe":case"object":case"embed":W("load",e),i=r;break;case"video":case"audio":for(i=0;i<Ir.length;i++)W(Ir[i],e);i=r;break;case"source":W("error",e),i=r;break;case"img":case"image":case"link":W("error",e),W("load",e),i=r;break;case"details":W("toggle",e),i=r;break;case"input":_u(e,r),i=el(e,r),W("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Y({},r,{value:void 0}),W("invalid",e);break;case"textarea":Tu(e,r),i=rl(e,r),W("invalid",e);break;default:i=r}sl(n,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var a=l[s];s==="style"?$d(e,a):s==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Pd(e,a)):s==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Qr(e,a):typeof a=="number"&&Qr(e,""+a):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Xr.hasOwnProperty(s)?a!=null&&s==="onScroll"&&W("scroll",e):a!=null&&sa(e,s,a,o))}switch(n){case"input":Ei(e),Eu(e,r,!1);break;case"textarea":Ei(e),ku(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Jt(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Qn(e,!!r.multiple,s,!1):r.defaultValue!=null&&Qn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=xs)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ve(t),null;case 6:if(e&&t.stateNode!=null)lh(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=dn(si.current),dn(xt.current),Mi(t)){if(r=t.stateNode,n=t.memoizedProps,r[yt]=t,(s=r.nodeValue!==n)&&(e=Be,e!==null))switch(e.tag){case 3:ji(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ji(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[yt]=t,t.stateNode=r}return ve(t),null;case 13:if(q(K),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Q&&Ue!==null&&t.mode&1&&!(t.flags&128))Tf(),nr(),t.flags|=98560,s=!1;else if(s=Mi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(L(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(L(317));s[yt]=t}else nr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ve(t),s=!1}else lt!==null&&(Fl(lt),lt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||K.current&1?le===0&&(le=3):Ha())),t.updateQueue!==null&&(t.flags|=4),ve(t),null);case 4:return ir(),Ml(e,t),e===null&&ti(t.stateNode.containerInfo),ve(t),null;case 10:return Ta(t.type._context),ve(t),null;case 17:return ze(t.type)&&Ss(),ve(t),null;case 19:if(q(K),s=t.memoizedState,s===null)return ve(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Er(s,!1);else{if(le!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=bs(e),o!==null){for(t.flags|=128,Er(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return U(K,K.current&1|2),t.child}e=e.sibling}s.tail!==null&&ee()>or&&(t.flags|=128,r=!0,Er(s,!1),t.lanes=4194304)}else{if(!r)if(e=bs(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Er(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Q)return ve(t),null}else 2*ee()-s.renderingStartTime>or&&n!==1073741824&&(t.flags|=128,r=!0,Er(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ee(),t.sibling=null,n=K.current,U(K,r?n&1|2:n&1),t):(ve(t),null);case 22:case 23:return Fa(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?He&1073741824&&(ve(t),t.subtreeFlags&6&&(t.flags|=8192)):ve(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function Lv(e,t){switch(xa(t),t.tag){case 1:return ze(t.type)&&Ss(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ir(),q(Oe),q(Se),La(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ba(t),null;case 13:if(q(K),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));nr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(K),null;case 4:return ir(),null;case 10:return Ta(t.type._context),null;case 22:case 23:return Fa(),null;case 24:return null;default:return null}}var Ri=!1,we=!1,Av=typeof WeakSet=="function"?WeakSet:Set,P=null;function Vn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Z(e,t,r)}else n.current=null}function Il(e,t,n){try{n()}catch(r){Z(e,t,r)}}var pc=!1;function jv(e,t){if(gl=vs,e=df(),ya(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,u=0,c=0,p=e,f=null;t:for(;;){for(var g;p!==n||i!==0&&p.nodeType!==3||(l=o+i),p!==s||r!==0&&p.nodeType!==3||(a=o+r),p.nodeType===3&&(o+=p.nodeValue.length),(g=p.firstChild)!==null;)f=p,p=g;for(;;){if(p===e)break t;if(f===n&&++u===i&&(l=o),f===s&&++c===r&&(a=o),(g=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=g}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(vl={focusedElem:e,selectionRange:n},vs=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,x=y.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?w:st(t.type,w),x);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(S){Z(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return y=pc,pc=!1,y}function Vr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Il(t,n,s)}i=i.next}while(i!==r)}}function Ys(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Pl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ah(e){var t=e.alternate;t!==null&&(e.alternate=null,ah(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yt],delete t[ri],delete t[xl],delete t[hv],delete t[pv])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function uh(e){return e.tag===5||e.tag===3||e.tag===4}function mc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xs));else if(r!==4&&(e=e.child,e!==null))for(Rl(e,t,n),e=e.sibling;e!==null;)Rl(e,t,n),e=e.sibling}function $l(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for($l(e,t,n),e=e.sibling;e!==null;)$l(e,t,n),e=e.sibling}var de=null,ot=!1;function Pt(e,t,n){for(n=n.child;n!==null;)ch(e,t,n),n=n.sibling}function ch(e,t,n){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(Bs,n)}catch{}switch(n.tag){case 5:we||Vn(n,t);case 6:var r=de,i=ot;de=null,Pt(e,t,n),de=r,ot=i,de!==null&&(ot?(e=de,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):de.removeChild(n.stateNode));break;case 18:de!==null&&(ot?(e=de,n=n.stateNode,e.nodeType===8?Lo(e.parentNode,n):e.nodeType===1&&Lo(e,n),Jr(e)):Lo(de,n.stateNode));break;case 4:r=de,i=ot,de=n.stateNode.containerInfo,ot=!0,Pt(e,t,n),de=r,ot=i;break;case 0:case 11:case 14:case 15:if(!we&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Il(n,t,o),i=i.next}while(i!==r)}Pt(e,t,n);break;case 1:if(!we&&(Vn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Z(n,t,l)}Pt(e,t,n);break;case 21:Pt(e,t,n);break;case 22:n.mode&1?(we=(r=we)||n.memoizedState!==null,Pt(e,t,n),we=r):Pt(e,t,n);break;default:Pt(e,t,n)}}function gc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Av),t.forEach(function(r){var i=Fv.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function it(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:de=l.stateNode,ot=!1;break e;case 3:de=l.stateNode.containerInfo,ot=!0;break e;case 4:de=l.stateNode.containerInfo,ot=!0;break e}l=l.return}if(de===null)throw Error(L(160));ch(s,o,i),de=null,ot=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){Z(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)dh(t,e),t=t.sibling}function dh(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(it(t,e),ht(e),r&4){try{Vr(3,e,e.return),Ys(3,e)}catch(w){Z(e,e.return,w)}try{Vr(5,e,e.return)}catch(w){Z(e,e.return,w)}}break;case 1:it(t,e),ht(e),r&512&&n!==null&&Vn(n,n.return);break;case 5:if(it(t,e),ht(e),r&512&&n!==null&&Vn(n,n.return),e.flags&32){var i=e.stateNode;try{Qr(i,"")}catch(w){Z(e,e.return,w)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&jd(i,s),ol(l,o);var u=ol(l,s);for(o=0;o<a.length;o+=2){var c=a[o],p=a[o+1];c==="style"?$d(i,p):c==="dangerouslySetInnerHTML"?Pd(i,p):c==="children"?Qr(i,p):sa(i,c,p,u)}switch(l){case"input":tl(i,s);break;case"textarea":Md(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var g=s.value;g!=null?Qn(i,!!s.multiple,g,!1):f!==!!s.multiple&&(s.defaultValue!=null?Qn(i,!!s.multiple,s.defaultValue,!0):Qn(i,!!s.multiple,s.multiple?[]:"",!1))}i[ri]=s}catch(w){Z(e,e.return,w)}}break;case 6:if(it(t,e),ht(e),r&4){if(e.stateNode===null)throw Error(L(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(w){Z(e,e.return,w)}}break;case 3:if(it(t,e),ht(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Jr(t.containerInfo)}catch(w){Z(e,e.return,w)}break;case 4:it(t,e),ht(e);break;case 13:it(t,e),ht(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(za=ee())),r&4&&gc(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(we=(u=we)||c,it(t,e),we=u):it(t,e),ht(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(P=e,c=e.child;c!==null;){for(p=P=c;P!==null;){switch(f=P,g=f.child,f.tag){case 0:case 11:case 14:case 15:Vr(4,f,f.return);break;case 1:Vn(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(w){Z(r,n,w)}}break;case 5:Vn(f,f.return);break;case 22:if(f.memoizedState!==null){yc(p);continue}}g!==null?(g.return=f,P=g):yc(p)}c=c.sibling}e:for(c=null,p=e;;){if(p.tag===5){if(c===null){c=p;try{i=p.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=p.stateNode,a=p.memoizedProps.style,o=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=Rd("display",o))}catch(w){Z(e,e.return,w)}}}else if(p.tag===6){if(c===null)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(w){Z(e,e.return,w)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;c===p&&(c=null),p=p.return}c===p&&(c=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:it(t,e),ht(e),r&4&&gc(e);break;case 21:break;default:it(t,e),ht(e)}}function ht(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(uh(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Qr(i,""),r.flags&=-33);var s=mc(e);$l(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,l=mc(e);Rl(e,l,o);break;default:throw Error(L(161))}}catch(a){Z(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mv(e,t,n){P=e,fh(e)}function fh(e,t,n){for(var r=(e.mode&1)!==0;P!==null;){var i=P,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Ri;if(!o){var l=i.alternate,a=l!==null&&l.memoizedState!==null||we;l=Ri;var u=we;if(Ri=o,(we=a)&&!u)for(P=i;P!==null;)o=P,a=o.child,o.tag===22&&o.memoizedState!==null?wc(i):a!==null?(a.return=o,P=a):wc(i);for(;s!==null;)P=s,fh(s),s=s.sibling;P=i,Ri=l,we=u}vc(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,P=s):vc(e)}}function vc(e){for(;P!==null;){var t=P;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:we||Ys(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!we)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:st(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&ec(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ec(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var p=c.dehydrated;p!==null&&Jr(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}we||t.flags&512&&Pl(t)}catch(f){Z(t,t.return,f)}}if(t===e){P=null;break}if(n=t.sibling,n!==null){n.return=t.return,P=n;break}P=t.return}}function yc(e){for(;P!==null;){var t=P;if(t===e){P=null;break}var n=t.sibling;if(n!==null){n.return=t.return,P=n;break}P=t.return}}function wc(e){for(;P!==null;){var t=P;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ys(4,t)}catch(a){Z(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){Z(t,i,a)}}var s=t.return;try{Pl(t)}catch(a){Z(t,s,a)}break;case 5:var o=t.return;try{Pl(t)}catch(a){Z(t,o,a)}}}catch(a){Z(t,t.return,a)}if(t===e){P=null;break}var l=t.sibling;if(l!==null){l.return=t.return,P=l;break}P=t.return}}var Iv=Math.ceil,js=It.ReactCurrentDispatcher,$a=It.ReactCurrentOwner,tt=It.ReactCurrentBatchConfig,F=0,ue=null,ie=null,he=0,He=0,Wn=nn(0),le=0,ui=null,wn=0,Js=0,Oa=0,Wr=null,Ie=null,za=0,or=1/0,Tt=null,Ms=!1,Ol=null,Qt=null,$i=!1,Ut=null,Is=0,qr=0,zl=null,Zi=-1,es=0;function Ce(){return F&6?ee():Zi!==-1?Zi:Zi=ee()}function Kt(e){return e.mode&1?F&2&&he!==0?he&-he:gv.transition!==null?(es===0&&(es=Qd()),es):(e=H,e!==0||(e=window.event,e=e===void 0?16:tf(e.type)),e):1}function ct(e,t,n,r){if(50<qr)throw qr=0,zl=null,Error(L(185));fi(e,n,r),(!(F&2)||e!==ue)&&(e===ue&&(!(F&2)&&(Js|=n),le===4&&Ft(e,he)),De(e,r),n===1&&F===0&&!(t.mode&1)&&(or=ee()+500,Qs&&rn()))}function De(e,t){var n=e.callbackNode;gg(e,t);var r=gs(e,e===ue?he:0);if(r===0)n!==null&&bu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&bu(n),t===1)e.tag===0?mv(xc.bind(null,e)):Sf(xc.bind(null,e)),dv(function(){!(F&6)&&rn()}),n=null;else{switch(Kd(r)){case 1:n=ca;break;case 4:n=qd;break;case 16:n=ms;break;case 536870912:n=Xd;break;default:n=ms}n=xh(n,hh.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function hh(e,t){if(Zi=-1,es=0,F&6)throw Error(L(327));var n=e.callbackNode;if(Zn()&&e.callbackNode!==n)return null;var r=gs(e,e===ue?he:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ps(e,r);else{t=r;var i=F;F|=2;var s=mh();(ue!==e||he!==t)&&(Tt=null,or=ee()+500,hn(e,t));do try{$v();break}catch(l){ph(e,l)}while(!0);Ea(),js.current=s,F=i,ie!==null?t=0:(ue=null,he=0,t=le)}if(t!==0){if(t===2&&(i=dl(e),i!==0&&(r=i,t=Dl(e,i))),t===1)throw n=ui,hn(e,0),Ft(e,r),De(e,ee()),n;if(t===6)Ft(e,r);else{if(i=e.current.alternate,!(r&30)&&!Pv(i)&&(t=Ps(e,r),t===2&&(s=dl(e),s!==0&&(r=s,t=Dl(e,s))),t===1))throw n=ui,hn(e,0),Ft(e,r),De(e,ee()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:on(e,Ie,Tt);break;case 3:if(Ft(e,r),(r&130023424)===r&&(t=za+500-ee(),10<t)){if(gs(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Ce(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=wl(on.bind(null,e,Ie,Tt),t);break}on(e,Ie,Tt);break;case 4:if(Ft(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-ut(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Iv(r/1960))-r,10<r){e.timeoutHandle=wl(on.bind(null,e,Ie,Tt),r);break}on(e,Ie,Tt);break;case 5:on(e,Ie,Tt);break;default:throw Error(L(329))}}}return De(e,ee()),e.callbackNode===n?hh.bind(null,e):null}function Dl(e,t){var n=Wr;return e.current.memoizedState.isDehydrated&&(hn(e,t).flags|=256),e=Ps(e,t),e!==2&&(t=Ie,Ie=n,t!==null&&Fl(t)),e}function Fl(e){Ie===null?Ie=e:Ie.push.apply(Ie,e)}function Pv(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!dt(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ft(e,t){for(t&=~Oa,t&=~Js,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ut(t),r=1<<n;e[n]=-1,t&=~r}}function xc(e){if(F&6)throw Error(L(327));Zn();var t=gs(e,0);if(!(t&1))return De(e,ee()),null;var n=Ps(e,t);if(e.tag!==0&&n===2){var r=dl(e);r!==0&&(t=r,n=Dl(e,r))}if(n===1)throw n=ui,hn(e,0),Ft(e,t),De(e,ee()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,on(e,Ie,Tt),De(e,ee()),null}function Da(e,t){var n=F;F|=1;try{return e(t)}finally{F=n,F===0&&(or=ee()+500,Qs&&rn())}}function xn(e){Ut!==null&&Ut.tag===0&&!(F&6)&&Zn();var t=F;F|=1;var n=tt.transition,r=H;try{if(tt.transition=null,H=1,e)return e()}finally{H=r,tt.transition=n,F=t,!(F&6)&&rn()}}function Fa(){He=Wn.current,q(Wn)}function hn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,cv(n)),ie!==null)for(n=ie.return;n!==null;){var r=n;switch(xa(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ss();break;case 3:ir(),q(Oe),q(Se),La();break;case 5:ba(r);break;case 4:ir();break;case 13:q(K);break;case 19:q(K);break;case 10:Ta(r.type._context);break;case 22:case 23:Fa()}n=n.return}if(ue=e,ie=e=Gt(e.current,null),he=He=t,le=0,ui=null,Oa=Js=wn=0,Ie=Wr=null,cn!==null){for(t=0;t<cn.length;t++)if(n=cn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}cn=null}return e}function ph(e,t){do{var n=ie;try{if(Ea(),Gi.current=As,Ls){for(var r=G.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ls=!1}if(yn=0,ae=oe=G=null,Br=!1,oi=0,$a.current=null,n===null||n.return===null){le=1,ui=t,ie=null;break}e:{var s=e,o=n.return,l=n,a=t;if(t=he,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,p=c.tag;if(!(c.mode&1)&&(p===0||p===11||p===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var g=lc(o);if(g!==null){g.flags&=-257,ac(g,o,l,s,t),g.mode&1&&oc(s,u,t),t=g,a=u;var y=t.updateQueue;if(y===null){var w=new Set;w.add(a),t.updateQueue=w}else y.add(a);break e}else{if(!(t&1)){oc(s,u,t),Ha();break e}a=Error(L(426))}}else if(Q&&l.mode&1){var x=lc(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),ac(x,o,l,s,t),Sa(sr(a,l));break e}}s=a=sr(a,l),le!==4&&(le=2),Wr===null?Wr=[s]:Wr.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var h=Yf(s,a,t);Zu(s,h);break e;case 1:l=a;var m=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof m.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Qt===null||!Qt.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=Jf(s,l,t);Zu(s,S);break e}}s=s.return}while(s!==null)}vh(n)}catch(N){t=N,ie===n&&n!==null&&(ie=n=n.return);continue}break}while(!0)}function mh(){var e=js.current;return js.current=As,e===null?As:e}function Ha(){(le===0||le===3||le===2)&&(le=4),ue===null||!(wn&268435455)&&!(Js&268435455)||Ft(ue,he)}function Ps(e,t){var n=F;F|=2;var r=mh();(ue!==e||he!==t)&&(Tt=null,hn(e,t));do try{Rv();break}catch(i){ph(e,i)}while(!0);if(Ea(),F=n,js.current=r,ie!==null)throw Error(L(261));return ue=null,he=0,le}function Rv(){for(;ie!==null;)gh(ie)}function $v(){for(;ie!==null&&!lg();)gh(ie)}function gh(e){var t=wh(e.alternate,e,He);e.memoizedProps=e.pendingProps,t===null?vh(e):ie=t,$a.current=null}function vh(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Lv(n,t),n!==null){n.flags&=32767,ie=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{le=6,ie=null;return}}else if(n=bv(n,t,He),n!==null){ie=n;return}if(t=t.sibling,t!==null){ie=t;return}ie=t=e}while(t!==null);le===0&&(le=5)}function on(e,t,n){var r=H,i=tt.transition;try{tt.transition=null,H=1,Ov(e,t,n,r)}finally{tt.transition=i,H=r}return null}function Ov(e,t,n,r){do Zn();while(Ut!==null);if(F&6)throw Error(L(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(L(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(vg(e,s),e===ue&&(ie=ue=null,he=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||$i||($i=!0,xh(ms,function(){return Zn(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=tt.transition,tt.transition=null;var o=H;H=1;var l=F;F|=4,$a.current=null,jv(e,n),dh(n,e),rv(vl),vs=!!gl,vl=gl=null,e.current=n,Mv(n),ag(),F=l,H=o,tt.transition=s}else e.current=n;if($i&&($i=!1,Ut=e,Is=i),s=e.pendingLanes,s===0&&(Qt=null),dg(n.stateNode),De(e,ee()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ms)throw Ms=!1,e=Ol,Ol=null,e;return Is&1&&e.tag!==0&&Zn(),s=e.pendingLanes,s&1?e===zl?qr++:(qr=0,zl=e):qr=0,rn(),null}function Zn(){if(Ut!==null){var e=Kd(Is),t=tt.transition,n=H;try{if(tt.transition=null,H=16>e?16:e,Ut===null)var r=!1;else{if(e=Ut,Ut=null,Is=0,F&6)throw Error(L(331));var i=F;for(F|=4,P=e.current;P!==null;){var s=P,o=s.child;if(P.flags&16){var l=s.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(P=u;P!==null;){var c=P;switch(c.tag){case 0:case 11:case 15:Vr(8,c,s)}var p=c.child;if(p!==null)p.return=c,P=p;else for(;P!==null;){c=P;var f=c.sibling,g=c.return;if(ah(c),c===u){P=null;break}if(f!==null){f.return=g,P=f;break}P=g}}}var y=s.alternate;if(y!==null){var w=y.child;if(w!==null){y.child=null;do{var x=w.sibling;w.sibling=null,w=x}while(w!==null)}}P=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,P=o;else e:for(;P!==null;){if(s=P,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Vr(9,s,s.return)}var h=s.sibling;if(h!==null){h.return=s.return,P=h;break e}P=s.return}}var m=e.current;for(P=m;P!==null;){o=P;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,P=v;else e:for(o=m;P!==null;){if(l=P,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Ys(9,l)}}catch(N){Z(l,l.return,N)}if(l===o){P=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,P=S;break e}P=l.return}}if(F=i,rn(),wt&&typeof wt.onPostCommitFiberRoot=="function")try{wt.onPostCommitFiberRoot(Bs,e)}catch{}r=!0}return r}finally{H=n,tt.transition=t}}return!1}function Sc(e,t,n){t=sr(n,t),t=Yf(e,t,1),e=Xt(e,t,1),t=Ce(),e!==null&&(fi(e,1,t),De(e,t))}function Z(e,t,n){if(e.tag===3)Sc(e,e,n);else for(;t!==null;){if(t.tag===3){Sc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Qt===null||!Qt.has(r))){e=sr(n,e),e=Jf(t,e,1),t=Xt(t,e,1),e=Ce(),t!==null&&(fi(t,1,e),De(t,e));break}}t=t.return}}function zv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ce(),e.pingedLanes|=e.suspendedLanes&n,ue===e&&(he&n)===n&&(le===4||le===3&&(he&130023424)===he&&500>ee()-za?hn(e,0):Oa|=n),De(e,t)}function yh(e,t){t===0&&(e.mode&1?(t=Ni,Ni<<=1,!(Ni&130023424)&&(Ni=4194304)):t=1);var n=Ce();e=jt(e,t),e!==null&&(fi(e,t,n),De(e,n))}function Dv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yh(e,n)}function Fv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),yh(e,n)}var wh;wh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Oe.current)$e=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return $e=!1,Cv(e,t,n);$e=!!(e.flags&131072)}else $e=!1,Q&&t.flags&1048576&&_f(t,Ts,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ji(e,t),e=t.pendingProps;var i=tr(t,Se.current);Jn(t,n),i=ja(null,t,r,e,i,n);var s=Ma();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ze(r)?(s=!0,_s(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Na(t),i.updater=Ks,t.stateNode=i,i._reactInternals=t,Nl(t,r,e,n),t=Ll(null,t,r,!0,s,n)):(t.tag=0,Q&&s&&wa(t),Ee(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ji(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Uv(r),e=st(r,e),i){case 0:t=bl(null,t,r,e,n);break e;case 1:t=dc(null,t,r,e,n);break e;case 11:t=uc(null,t,r,e,n);break e;case 14:t=cc(null,t,r,st(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:st(r,i),bl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:st(r,i),dc(e,t,r,i,n);case 3:e:{if(nh(t),e===null)throw Error(L(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Nf(e,t),Cs(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=sr(Error(L(423)),t),t=fc(e,t,r,n,i);break e}else if(r!==i){i=sr(Error(L(424)),t),t=fc(e,t,r,n,i);break e}else for(Ue=qt(t.stateNode.containerInfo.firstChild),Be=t,Q=!0,lt=null,n=Af(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(nr(),r===i){t=Mt(e,t,n);break e}Ee(e,t,r,n)}t=t.child}return t;case 5:return jf(t),e===null&&El(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,yl(r,i)?o=null:s!==null&&yl(r,s)&&(t.flags|=32),th(e,t),Ee(e,t,o,n),t.child;case 6:return e===null&&El(t),null;case 13:return rh(e,t,n);case 4:return Ca(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=rr(t,null,r,n):Ee(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:st(r,i),uc(e,t,r,i,n);case 7:return Ee(e,t,t.pendingProps,n),t.child;case 8:return Ee(e,t,t.pendingProps.children,n),t.child;case 12:return Ee(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,U(ks,r._currentValue),r._currentValue=o,s!==null)if(dt(s.value,o)){if(s.children===i.children&&!Oe.current){t=Mt(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=bt(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Tl(s.return,n,t),l.lanes|=n;break}a=a.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(L(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Tl(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ee(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Jn(t,n),i=nt(i),r=r(i),t.flags|=1,Ee(e,t,r,n),t.child;case 14:return r=t.type,i=st(r,t.pendingProps),i=st(r.type,i),cc(e,t,r,i,n);case 15:return Zf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:st(r,i),Ji(e,t),t.tag=1,ze(r)?(e=!0,_s(t)):e=!1,Jn(t,n),bf(t,r,i),Nl(t,r,i,n),Ll(null,t,r,!0,e,n);case 19:return ih(e,t,n);case 22:return eh(e,t,n)}throw Error(L(156,t.tag))};function xh(e,t){return Wd(e,t)}function Hv(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Je(e,t,n,r){return new Hv(e,t,n,r)}function Ua(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Uv(e){if(typeof e=="function")return Ua(e)?1:0;if(e!=null){if(e=e.$$typeof,e===la)return 11;if(e===aa)return 14}return 2}function Gt(e,t){var n=e.alternate;return n===null?(n=Je(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ts(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Ua(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Rn:return pn(n.children,i,s,t);case oa:o=8,i|=8;break;case Go:return e=Je(12,n,t,i|2),e.elementType=Go,e.lanes=s,e;case Yo:return e=Je(13,n,t,i),e.elementType=Yo,e.lanes=s,e;case Jo:return e=Je(19,n,t,i),e.elementType=Jo,e.lanes=s,e;case bd:return Zs(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Nd:o=10;break e;case Cd:o=9;break e;case la:o=11;break e;case aa:o=14;break e;case Rt:o=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=Je(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function pn(e,t,n,r){return e=Je(7,e,r,t),e.lanes=n,e}function Zs(e,t,n,r){return e=Je(22,e,r,t),e.elementType=bd,e.lanes=n,e.stateNode={isHidden:!1},e}function Oo(e,t,n){return e=Je(6,e,null,t),e.lanes=n,e}function zo(e,t,n){return t=Je(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bv(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yo(0),this.expirationTimes=yo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ba(e,t,n,r,i,s,o,l,a){return e=new Bv(e,t,n,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Je(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Na(s),e}function Vv(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Pn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Sh(e){if(!e)return Zt;e=e._reactInternals;e:{if(Tn(e)!==e||e.tag!==1)throw Error(L(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ze(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(L(171))}if(e.tag===1){var n=e.type;if(ze(n))return xf(e,n,t)}return t}function _h(e,t,n,r,i,s,o,l,a){return e=Ba(n,r,!0,e,i,s,o,l,a),e.context=Sh(null),n=e.current,r=Ce(),i=Kt(n),s=bt(r,i),s.callback=t??null,Xt(n,s,i),e.current.lanes=i,fi(e,i,r),De(e,r),e}function eo(e,t,n,r){var i=t.current,s=Ce(),o=Kt(i);return n=Sh(n),t.context===null?t.context=n:t.pendingContext=n,t=bt(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Xt(i,t,o),e!==null&&(ct(e,i,o,s),Ki(e,i,o)),o}function Rs(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function _c(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Va(e,t){_c(e,t),(e=e.alternate)&&_c(e,t)}function Wv(){return null}var Eh=typeof reportError=="function"?reportError:function(e){console.error(e)};function Wa(e){this._internalRoot=e}to.prototype.render=Wa.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));eo(e,t,null,null)};to.prototype.unmount=Wa.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;xn(function(){eo(null,e,null,null)}),t[At]=null}};function to(e){this._internalRoot=e}to.prototype.unstable_scheduleHydration=function(e){if(e){var t=Jd();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&t!==0&&t<Dt[n].priority;n++);Dt.splice(n,0,e),n===0&&ef(e)}};function qa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function no(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ec(){}function qv(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Rs(o);s.call(u)}}var o=_h(t,r,e,0,null,!1,!1,"",Ec);return e._reactRootContainer=o,e[At]=o.current,ti(e.nodeType===8?e.parentNode:e),xn(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=Rs(a);l.call(u)}}var a=Ba(e,0,!1,null,null,!1,!1,"",Ec);return e._reactRootContainer=a,e[At]=a.current,ti(e.nodeType===8?e.parentNode:e),xn(function(){eo(t,a,n,r)}),a}function ro(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var l=i;i=function(){var a=Rs(o);l.call(a)}}eo(t,o,e,i)}else o=qv(n,t,e,i,r);return Rs(o)}Gd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Mr(t.pendingLanes);n!==0&&(da(t,n|1),De(t,ee()),!(F&6)&&(or=ee()+500,rn()))}break;case 13:xn(function(){var r=jt(e,1);if(r!==null){var i=Ce();ct(r,e,1,i)}}),Va(e,1)}};fa=function(e){if(e.tag===13){var t=jt(e,134217728);if(t!==null){var n=Ce();ct(t,e,134217728,n)}Va(e,134217728)}};Yd=function(e){if(e.tag===13){var t=Kt(e),n=jt(e,t);if(n!==null){var r=Ce();ct(n,e,t,r)}Va(e,t)}};Jd=function(){return H};Zd=function(e,t){var n=H;try{return H=e,t()}finally{H=n}};al=function(e,t,n){switch(t){case"input":if(tl(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Xs(r);if(!i)throw Error(L(90));Ad(r),tl(r,i)}}}break;case"textarea":Md(e,n);break;case"select":t=n.value,t!=null&&Qn(e,!!n.multiple,t,!1)}};Dd=Da;Fd=xn;var Xv={usingClientEntryPoint:!1,Events:[pi,Dn,Xs,Od,zd,Da]},Tr={findFiberByHostInstance:un,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Qv={bundleType:Tr.bundleType,version:Tr.version,rendererPackageName:Tr.rendererPackageName,rendererConfig:Tr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:It.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Bd(e),e===null?null:e.stateNode},findFiberByHostInstance:Tr.findFiberByHostInstance||Wv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Oi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Oi.isDisabled&&Oi.supportsFiber)try{Bs=Oi.inject(Qv),wt=Oi}catch{}}qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xv;qe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!qa(t))throw Error(L(200));return Vv(e,t,null,n)};qe.createRoot=function(e,t){if(!qa(e))throw Error(L(299));var n=!1,r="",i=Eh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Ba(e,1,!1,null,null,n,!1,r,i),e[At]=t.current,ti(e.nodeType===8?e.parentNode:e),new Wa(t)};qe.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=Bd(t),e=e===null?null:e.stateNode,e};qe.flushSync=function(e){return xn(e)};qe.hydrate=function(e,t,n){if(!no(t))throw Error(L(200));return ro(null,e,t,!0,n)};qe.hydrateRoot=function(e,t,n){if(!qa(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Eh;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=_h(t,null,e,1,n??null,i,!1,s,o),e[At]=t.current,ti(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new to(t)};qe.render=function(e,t,n){if(!no(t))throw Error(L(200));return ro(null,e,t,!1,n)};qe.unmountComponentAtNode=function(e){if(!no(e))throw Error(L(40));return e._reactRootContainer?(xn(function(){ro(null,null,e,!1,function(){e._reactRootContainer=null,e[At]=null})}),!0):!1};qe.unstable_batchedUpdates=Da;qe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!no(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return ro(e,t,n,!1,r)};qe.version="18.2.0-next-9e3b772b8-20220608";function Th(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Th)}catch(e){console.error(e)}}Th(),Sd.exports=qe;var Kv=Sd.exports,Gv,Tc=Kv;Gv=Tc.createRoot,Tc.hydrateRoot;const en=({children:e,title:t="",icon:n,disabled:r=!1,toggled:i=!1,onClick:s=()=>{},style:o,testId:l,className:a})=>(a=(a||"")+` toolbar-button ${n}`,i&&(a+=" toggled"),d.jsxs("button",{className:a,onMouseDown:kc,onClick:s,onDoubleClick:kc,title:t,disabled:!!r,style:o,"data-testid":l,children:[n&&d.jsx("span",{className:`codicon codicon-${n}`,style:e?{marginRight:5}:{}}),e]})),kc=e=>{e.stopPropagation(),e.preventDefault()},Pr=Symbol("context"),kh=Symbol("next"),Nh=Symbol("prev"),Nc=Symbol("events");class lx{constructor(t){V(this,"startTime");V(this,"endTime");V(this,"browserName");V(this,"channel");V(this,"platform");V(this,"wallTime");V(this,"title");V(this,"options");V(this,"pages");V(this,"actions");V(this,"events");V(this,"stdio");V(this,"errors");V(this,"errorDescriptors");V(this,"hasSource");V(this,"hasStepData");V(this,"sdkLanguage");V(this,"testIdAttributeName");V(this,"sources");V(this,"resources");t.forEach(r=>Yv(r));const n=t.find(r=>r.origin==="library");this.browserName=(n==null?void 0:n.browserName)||"",this.sdkLanguage=n==null?void 0:n.sdkLanguage,this.channel=n==null?void 0:n.channel,this.testIdAttributeName=n==null?void 0:n.testIdAttributeName,this.platform=(n==null?void 0:n.platform)||"",this.title=(n==null?void 0:n.title)||"",this.options=(n==null?void 0:n.options)||{},this.actions=Jv(t),this.pages=[].concat(...t.map(r=>r.pages)),this.wallTime=t.map(r=>r.wallTime).reduce((r,i)=>Math.min(r||Number.MAX_VALUE,i),Number.MAX_VALUE),this.startTime=t.map(r=>r.startTime).reduce((r,i)=>Math.min(r,i),Number.MAX_VALUE),this.endTime=t.map(r=>r.endTime).reduce((r,i)=>Math.max(r,i),Number.MIN_VALUE),this.events=[].concat(...t.map(r=>r.events)),this.stdio=[].concat(...t.map(r=>r.stdio)),this.errors=[].concat(...t.map(r=>r.errors)),this.hasSource=t.some(r=>r.hasSource),this.hasStepData=t.some(r=>r.origin==="testRunner"),this.resources=[...t.map(r=>r.resources)].flat(),this.events.sort((r,i)=>r.time-i.time),this.resources.sort((r,i)=>r._monotonicTime-i._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=a0(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(t=>t.error)}_errorDescriptorsFromActions(){var n;const t=[];for(const r of this.actions||[])(n=r.error)!=null&&n.message&&t.push({action:r,stack:r.stack,message:r.error.message});return t}_errorDescriptorsFromTestRunner(){const t=[];for(const n of this.errors||[])n.message&&t.push({stack:n.stack,message:n.message});return t}}function Yv(e){for(const n of e.pages)n[Pr]=e;for(let n=0;n<e.actions.length;++n){const r=e.actions[n];r[Pr]=e}let t;for(let n=e.actions.length-1;n>=0;n--){const r=e.actions[n];r[kh]=t,r.apiName.includes("route.")||(t=r)}for(const n of e.events)n[Pr]=e;for(const n of e.resources)n[Pr]=e}function Jv(e){const t=new Map;for(const i of e){const s=i.traceUrl;let o=t.get(s);o||(o=[],t.set(s,o)),o.push(i)}const n=[];let r=0;for(const[,i]of t){t.size>1&&Zv(i,++r);const s=e0(i);n.push(...s)}n.sort((i,s)=>s.parentId===i.callId?-1:i.parentId===s.callId?1:i.startTime-s.startTime);for(let i=1;i<n.length;++i)n[i][Nh]=n[i-1];return n}function Zv(e,t){for(const n of e)for(const r of n.actions)r.callId&&(r.callId=`${t}:${r.callId}`),r.parentId&&(r.parentId=`${t}:${r.parentId}`)}function e0(e){const t=new Map,n=e.filter(l=>l.origin==="library"),r=e.filter(l=>l.origin==="testRunner");if(!r.length||!n.length)return e.map(l=>l.actions.map(a=>({...a,context:l}))).flat();const i=n.some(l=>l.actions.some(a=>!!a.stepId));for(const l of n)for(const a of l.actions){const u=i?a.stepId:`${a.apiName}@${a.wallTime}`;t.set(u,{...a,context:l})}const s=n0(r,t,i);s&&t0(n,s);const o=new Map;for(const l of r)for(const a of l.actions){const u=i?a.callId:`${a.apiName}@${a.wallTime}`,c=t.get(u);if(c){o.set(a.callId,c.callId),a.error&&(c.error=a.error),a.attachments&&(c.attachments=a.attachments),a.parentId&&(c.parentId=o.get(a.parentId)??a.parentId),c.startTime=a.startTime,c.endTime=a.endTime;continue}a.parentId&&(a.parentId=o.get(a.parentId)??a.parentId),t.set(u,{...a,context:l})}return[...t.values()]}function t0(e,t){for(const n of e){n.startTime+=t,n.endTime+=t;for(const r of n.actions)r.startTime&&(r.startTime+=t),r.endTime&&(r.endTime+=t);for(const r of n.events)r.time+=t;for(const r of n.stdio)r.timestamp+=t;for(const r of n.pages)for(const i of r.screencastFrames)i.timestamp+=t;for(const r of n.resources)r._monotonicTime&&(r._monotonicTime+=t)}}function n0(e,t,n){for(const r of e)for(const i of r.actions){if(!i.startTime)continue;const s=n?i.stepId:`${i.apiName}@${i.wallTime}`,o=t.get(s);if(o)return i.startTime-o.startTime}return 0}function r0(e){const t=new Map;for(const r of e)t.set(r.callId,{id:r.callId,parent:void 0,children:[],action:r});const n={id:"",parent:void 0,children:[]};for(const r of t.values()){const i=r.action.parentId&&t.get(r.action.parentId)||n;i.children.push(r),r.parent=i}return{rootItem:n,itemMap:t}}function ax(e){return`${e.pageId||"none"}:${e.callId}`}function $s(e){return e[Pr]}function i0(e){return e[kh]}function s0(e){return e[Nh]}function o0(e){let t=0,n=0;for(const r of l0(e)){if(r.type==="console"){const i=r.messageType;i==="warning"?++n:i==="error"&&++t}r.type==="event"&&r.method==="pageError"&&++t}return{errors:t,warnings:n}}function l0(e){let t=e[Nc];if(t)return t;const n=i0(e);return t=$s(e).events.filter(r=>r.time>=e.startTime&&(!n||r.time<n.startTime)),e[Nc]=t,t}function a0(e,t){var r;const n=new Map;for(const i of e)for(const s of i.stack||[]){let o=n.get(s.file);o||(o={errors:[],content:void 0},n.set(s.file,o))}for(const i of t){const{action:s,stack:o,message:l}=i;!s||!o||(r=n.get(o[0].file))==null||r.errors.push({line:o[0].line||0,message:l})}return n}const ns=new Set(["page.route","page.routefromhar","page.unroute","page.unrouteall","browsercontext.route","browsercontext.routefromhar","browsercontext.unroute","browsercontext.unrouteall"]);{for(const e of[...ns])ns.add(e+"async");for(const e of["page.route_from_har","page.unroute_all","context.route_from_har","context.unroute_all"])ns.add(e)}function u0(e){return e.class==="Route"||ns.has(e.apiName.toLowerCase())}const c0=50,Os=({sidebarSize:e,sidebarHidden:t=!1,sidebarIsFirst:n=!1,orientation:r="vertical",minSidebarSize:i=c0,settingName:s,sidebar:o,main:l})=>{const a=Math.max(i,e)*window.devicePixelRatio,[u,c]=Or(s?s+"."+r+":size":void 0,a),[p,f]=Or(s?s+"."+r+":size":void 0,a),[g,y]=b.useState(null),[w,x]=_n();let h;r==="vertical"?(h=p/window.devicePixelRatio,w&&w.height<h&&(h=w.height-10)):(h=u/window.devicePixelRatio,w&&w.width<h&&(h=w.width-10)),document.body.style.userSelect=g?"none":"inherit";let m={};return r==="vertical"?n?m={top:g?0:h-4,bottom:g?0:void 0,height:g?"initial":8}:m={bottom:g?0:h-4,top:g?0:void 0,height:g?"initial":8}:n?m={left:g?0:h-4,right:g?0:void 0,width:g?"initial":8}:m={right:g?0:h-4,left:g?0:void 0,width:g?"initial":8},d.jsxs("div",{className:Ne("split-view",r,n&&"sidebar-first"),ref:x,children:[d.jsx("div",{className:"split-view-main",children:l}),!t&&d.jsx("div",{style:{flexBasis:h},className:"split-view-sidebar",children:o}),!t&&d.jsx("div",{style:m,className:"split-view-resizer",onMouseDown:v=>y({offset:r==="vertical"?v.clientY:v.clientX,size:h}),onMouseUp:()=>y(null),onMouseMove:v=>{if(!v.buttons)y(null);else if(g){const N=(r==="vertical"?v.clientY:v.clientX)-g.offset,E=n?g.size+N:g.size-N,A=v.target.parentElement.getBoundingClientRect(),_=Math.min(Math.max(i,E),(r==="vertical"?A.height:A.width)-i);r==="vertical"?f(_*window.devicePixelRatio):c(_*window.devicePixelRatio)}}})]})};function io(e,t="'"){const n=JSON.stringify(e),r=n.substring(1,n.length-1).replace(/\\"/g,'"');if(t==="'")return t+r.replace(/[']/g,"\\'")+t;if(t==='"')return t+r.replace(/["]/g,'\\"')+t;if(t==="`")return t+r.replace(/[`]/g,"`")+t;throw new Error("Invalid escape char")}function zs(e){return e.charAt(0).toUpperCase()+e.substring(1)}function Ch(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function Ye(e){let t="";for(let n=0;n<e.length;n++)t+=d0(e,n);return t}function kr(e){return`"${Ye(e).replace(/\\ /g," ")}"`}function d0(e,t){const n=e.charCodeAt(t);return n===0?"�":n>=1&&n<=31||n>=48&&n<=57&&(t===0||t===1&&e.charCodeAt(0)===45)?"\\"+n.toString(16)+" ":t===0&&n===45&&e.length===1?"\\"+e.charAt(t):n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?e.charAt(t):"\\"+e.charAt(t)}let ln;function f0(){ln=new Map}function We(e){let t=ln==null?void 0:ln.get(e);return t===void 0&&(t=e.replace(/\u200b/g,"").trim().replace(/\s+/g," "),ln==null||ln.set(e,t)),t}function so(e){return e.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function bh(e){return e.unicode||e.unicodeSets?String(e):String(e).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Ze(e,t){return typeof e!="string"?bh(e):`${JSON.stringify(e)}${t?"s":"i"}`}function Te(e,t){return typeof e!="string"?bh(e):`"${e.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${t?"s":"i"}`}function h0(e,t,n=""){if(e.length<=t)return e;const r=[...e];return r.length>t?r.slice(0,t-n.length).join("")+n:r.join("")}function Cc(e,t){return h0(e,t,"…")}function p0(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Lh={"&":"&","<":"<",">":">",'"':""","'":"'"};function m0(e){return e.replace(/[&<>"']/ug,t=>Lh[t])}function g0(e){return e.replace(/[&<]/ug,t=>Lh[t])}const re=function(e,t,n){return e>=t&&e<=n};function Me(e){return re(e,48,57)}function bc(e){return Me(e)||re(e,65,70)||re(e,97,102)}function v0(e){return re(e,65,90)}function y0(e){return re(e,97,122)}function w0(e){return v0(e)||y0(e)}function x0(e){return e>=128}function rs(e){return w0(e)||x0(e)||e===95}function Lc(e){return rs(e)||Me(e)||e===45}function S0(e){return re(e,0,8)||e===11||re(e,14,31)||e===127}function is(e){return e===10}function St(e){return is(e)||e===9||e===32}const _0=1114111;class Xa extends Error{constructor(t){super(t),this.name="InvalidCharacterError"}}function E0(e){const t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===13&&e.charCodeAt(n+1)===10&&(r=10,n++),(r===13||r===12)&&(r=10),r===0&&(r=65533),re(r,55296,56319)&&re(e.charCodeAt(n+1),56320,57343)){const i=r-55296,s=e.charCodeAt(n+1)-56320;r=Math.pow(2,16)+i*Math.pow(2,10)+s,n++}t.push(r)}return t}function se(e){if(e<=65535)return String.fromCharCode(e);e-=Math.pow(2,16);const t=Math.floor(e/Math.pow(2,10))+55296,n=e%Math.pow(2,10)+56320;return String.fromCharCode(t)+String.fromCharCode(n)}function T0(e){const t=E0(e);let n=-1;const r=[];let i;const s=function(k){return k>=t.length?-1:t[k]},o=function(k){if(k===void 0&&(k=1),k>3)throw"Spec Error: no more than three codepoints of lookahead.";return s(n+k)},l=function(k){return k===void 0&&(k=1),n+=k,i=s(n),!0},a=function(){return n-=1,!0},u=function(k){return k===void 0&&(k=i),k===-1},c=function(){if(p(),l(),St(i)){for(;St(o());)l();return new Hl}else{if(i===34)return y();if(i===35)if(Lc(o())||h(o(1),o(2))){const k=new Vh("");return v(o(1),o(2),o(3))&&(k.type="id"),k.value=C(),k}else return new ye(i);else return i===36?o()===61?(l(),new b0):new ye(i):i===39?y():i===40?new Dh:i===41?new Fh:i===42?o()===61?(l(),new L0):new ye(i):i===43?E()?(a(),f()):new ye(i):i===44?new Rh:i===45?E()?(a(),f()):o(1)===45&&o(2)===62?(l(2),new Mh):S()?(a(),g()):new ye(i):i===46?E()?(a(),f()):new ye(i):i===58?new Ih:i===59?new Ph:i===60?o(1)===33&&o(2)===45&&o(3)===45?(l(3),new jh):new ye(i):i===64?v(o(1),o(2),o(3))?new Bh(C()):new ye(i):i===91?new zh:i===92?m()?(a(),g()):new ye(i):i===93?new Ul:i===94?o()===61?(l(),new C0):new ye(i):i===123?new $h:i===124?o()===61?(l(),new N0):o()===124?(l(),new Hh):new ye(i):i===125?new Oh:i===126?o()===61?(l(),new k0):new ye(i):Me(i)?(a(),f()):rs(i)?(a(),g()):u()?new os:new ye(i)}},p=function(){for(;o(1)===47&&o(2)===42;)for(l(2);;)if(l(),i===42&&o()===47){l();break}else if(u())return},f=function(){const k=A();if(v(o(1),o(2),o(3))){const M=new A0;return M.value=k.value,M.repr=k.repr,M.type=k.type,M.unit=C(),M}else if(o()===37){l();const M=new Qh;return M.value=k.value,M.repr=k.repr,M}else{const M=new Xh;return M.value=k.value,M.repr=k.repr,M.type=k.type,M}},g=function(){const k=C();if(k.toLowerCase()==="url"&&o()===40){for(l();St(o(1))&&St(o(2));)l();return o()===34||o()===39?new ls(k):St(o())&&(o(2)===34||o(2)===39)?new ls(k):w()}else return o()===40?(l(),new ls(k)):new Uh(k)},y=function(k){k===void 0&&(k=i);let M="";for(;l();){if(i===k||u())return new Wh(M);if(is(i))return a(),new Ah;i===92?u(o())||(is(o())?l():M+=se(x())):M+=se(i)}throw new Error("Internal error")},w=function(){const k=new qh("");for(;St(o());)l();if(u(o()))return k;for(;l();){if(i===41||u())return k;if(St(i)){for(;St(o());)l();return o()===41||u(o())?(l(),k):(T(),new ss)}else{if(i===34||i===39||i===40||S0(i))return T(),new ss;if(i===92)if(m())k.value+=se(x());else return T(),new ss;else k.value+=se(i)}}throw new Error("Internal error")},x=function(){if(l(),bc(i)){const k=[i];for(let $=0;$<5&&bc(o());$++)l(),k.push(i);St(o())&&l();let M=parseInt(k.map(function($){return String.fromCharCode($)}).join(""),16);return M>_0&&(M=65533),M}else return u()?65533:i},h=function(k,M){return!(k!==92||is(M))},m=function(){return h(i,o())},v=function(k,M,$){return k===45?rs(M)||M===45||h(M,$):rs(k)?!0:k===92?h(k,M):!1},S=function(){return v(i,o(1),o(2))},N=function(k,M,$){return k===43||k===45?!!(Me(M)||M===46&&Me($)):k===46?!!Me(M):!!Me(k)},E=function(){return N(i,o(1),o(2))},C=function(){let k="";for(;l();)if(Lc(i))k+=se(i);else if(m())k+=se(x());else return a(),k;throw new Error("Internal parse error")},A=function(){let k="",M="integer";for((o()===43||o()===45)&&(l(),k+=se(i));Me(o());)l(),k+=se(i);if(o(1)===46&&Me(o(2)))for(l(),k+=se(i),l(),k+=se(i),M="number";Me(o());)l(),k+=se(i);const $=o(1),ce=o(2),Fe=o(3);if(($===69||$===101)&&Me(ce))for(l(),k+=se(i),l(),k+=se(i),M="number";Me(o());)l(),k+=se(i);else if(($===69||$===101)&&(ce===43||ce===45)&&Me(Fe))for(l(),k+=se(i),l(),k+=se(i),l(),k+=se(i),M="number";Me(o());)l(),k+=se(i);const me=_(k);return{type:M,value:me,repr:k}},_=function(k){return+k},T=function(){for(;l();){if(i===41||u())return;m()&&x()}};let j=0;for(;!u(o());)if(r.push(c()),j++,j>t.length*2)throw new Error("I'm infinite-looping!");return r}class te{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class Ah extends te{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class ss extends te{constructor(){super(...arguments),this.tokenType="BADURL"}}class Hl extends te{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class jh extends te{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class Mh extends te{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class Ih extends te{constructor(){super(...arguments),this.tokenType=":"}}class Ph extends te{constructor(){super(...arguments),this.tokenType=";"}}class Rh extends te{constructor(){super(...arguments),this.tokenType=","}}class cr extends te{constructor(){super(...arguments),this.value="",this.mirror=""}}class $h extends cr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class Oh extends cr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class zh extends cr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Ul extends cr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class Dh extends cr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Fh extends cr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class k0 extends te{constructor(){super(...arguments),this.tokenType="~="}}class N0 extends te{constructor(){super(...arguments),this.tokenType="|="}}class C0 extends te{constructor(){super(...arguments),this.tokenType="^="}}class b0 extends te{constructor(){super(...arguments),this.tokenType="$="}}class L0 extends te{constructor(){super(...arguments),this.tokenType="*="}}class Hh extends te{constructor(){super(...arguments),this.tokenType="||"}}class os extends te{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class ye extends te{constructor(t){super(),this.tokenType="DELIM",this.value="",this.value=se(t)}toString(){return"DELIM("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t}toSource(){return this.value==="\\"?`\\
|
|
41
|
-
`:this.value}}class dr extends te{constructor(){super(...arguments),this.value=""}ASCIIMatch(t){return this.value.toLowerCase()===t.toLowerCase()}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t}}class Uh extends dr{constructor(t){super(),this.tokenType="IDENT",this.value=t}toString(){return"IDENT("+this.value+")"}toSource(){return gi(this.value)}}class ls extends dr{constructor(t){super(),this.tokenType="FUNCTION",this.value=t,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return gi(this.value)+"("}}class Bh extends dr{constructor(t){super(),this.tokenType="AT-KEYWORD",this.value=t}toString(){return"AT("+this.value+")"}toSource(){return"@"+gi(this.value)}}class Vh extends dr{constructor(t){super(),this.tokenType="HASH",this.value=t,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t}toSource(){return this.type==="id"?"#"+gi(this.value):"#"+j0(this.value)}}class Wh extends dr{constructor(t){super(),this.tokenType="STRING",this.value=t}toString(){return'"'+Kh(this.value)+'"'}}class qh extends dr{constructor(t){super(),this.tokenType="URL",this.value=t}toString(){return"URL("+this.value+")"}toSource(){return'url("'+Kh(this.value)+'")'}}class Xh extends te{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const t=super.toJSON();return t.value=this.value,t.type=this.type,t.repr=this.repr,t}toSource(){return this.repr}}class Qh extends te{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.repr=this.repr,t}toSource(){return this.repr+"%"}}class A0 extends te{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t.repr=this.repr,t.unit=this.unit,t}toSource(){const t=this.repr;let n=gi(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||re(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),t+n}}function gi(e){e=""+e;let t="";const n=e.charCodeAt(0);for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(i===0)throw new Xa("Invalid character: the input contains U+0000.");re(i,1,31)||i===127||r===0&&re(i,48,57)||r===1&&re(i,48,57)&&n===45?t+="\\"+i.toString(16)+" ":i>=128||i===45||i===95||re(i,48,57)||re(i,65,90)||re(i,97,122)?t+=e[r]:t+="\\"+e[r]}return t}function j0(e){e=""+e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r===0)throw new Xa("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||re(r,48,57)||re(r,65,90)||re(r,97,122)?t+=e[n]:t+="\\"+r.toString(16)+" "}return t}function Kh(e){e=""+e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r===0)throw new Xa("Invalid character: the input contains U+0000.");re(r,1,31)||r===127?t+="\\"+r.toString(16)+" ":r===34||r===92?t+="\\"+e[n]:t+=e[n]}return t}class Pe extends Error{}function M0(e,t){let n;try{n=T0(e),n[n.length-1]instanceof os||n.push(new os)}catch(_){const T=_.message+` while parsing selector "${e}"`,j=(_.stack||"").indexOf(_.message);throw j!==-1&&(_.stack=_.stack.substring(0,j)+T+_.stack.substring(j+_.message.length)),_.message=T,_}const r=n.find(_=>_ instanceof Bh||_ instanceof Ah||_ instanceof ss||_ instanceof Hh||_ instanceof jh||_ instanceof Mh||_ instanceof Ph||_ instanceof $h||_ instanceof Oh||_ instanceof qh||_ instanceof Qh);if(r)throw new Pe(`Unsupported token "${r.toSource()}" while parsing selector "${e}"`);let i=0;const s=new Set;function o(){return new Pe(`Unexpected token "${n[i].toSource()}" while parsing selector "${e}"`)}function l(){for(;n[i]instanceof Hl;)i++}function a(_=i){return n[_]instanceof Uh}function u(_=i){return n[_]instanceof Wh}function c(_=i){return n[_]instanceof Xh}function p(_=i){return n[_]instanceof Rh}function f(_=i){return n[_]instanceof Dh}function g(_=i){return n[_]instanceof Fh}function y(_=i){return n[_]instanceof ls}function w(_=i){return n[_]instanceof ye&&n[_].value==="*"}function x(_=i){return n[_]instanceof os}function h(_=i){return n[_]instanceof ye&&[">","+","~"].includes(n[_].value)}function m(_=i){return p(_)||g(_)||x(_)||h(_)||n[_]instanceof Hl}function v(){const _=[S()];for(;l(),!!p();)i++,_.push(S());return _}function S(){return l(),c()||u()?n[i++].value:N()}function N(){const _={simples:[]};for(l(),h()?_.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):_.simples.push({selector:E(),combinator:""});;){if(l(),h())_.simples[_.simples.length-1].combinator=n[i++].value,l();else if(m())break;_.simples.push({combinator:"",selector:E()})}return _}function E(){let _="";const T=[];for(;!m();)if(a()||w())_+=n[i++].toSource();else if(n[i]instanceof Vh)_+=n[i++].toSource();else if(n[i]instanceof ye&&n[i].value===".")if(i++,a())_+="."+n[i++].toSource();else throw o();else if(n[i]instanceof Ih)if(i++,a())if(!t.has(n[i].value.toLowerCase()))_+=":"+n[i++].toSource();else{const j=n[i++].value.toLowerCase();T.push({name:j,args:[]}),s.add(j)}else if(y()){const j=n[i++].value.toLowerCase();if(t.has(j)?(T.push({name:j,args:v()}),s.add(j)):_+=`:${j}(${C()})`,l(),!g())throw o();i++}else throw o();else if(n[i]instanceof zh){for(_+="[",i++;!(n[i]instanceof Ul)&&!x();)_+=n[i++].toSource();if(!(n[i]instanceof Ul))throw o();_+="]",i++}else throw o();if(!_&&!T.length)throw o();return{css:_||void 0,functions:T}}function C(){let _="",T=1;for(;!x()&&((f()||y())&&T++,g()&&T--,!!T);)_+=n[i++].toSource();return _}const A=v();if(!x())throw o();if(A.some(_=>typeof _!="object"||!("simples"in _)))throw new Pe(`Error while parsing selector "${e}"`);return{selector:A,names:Array.from(s)}}const Bl=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),I0=new Set(["left-of","right-of","above","below","near"]),Gh=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 oo(e){const t=$0(e),n=[];for(const r of t.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const i=M0(r.body,Gh);n.push({name:"css",body:i.selector,source:r.body});continue}if(Bl.has(r.name)){let i,s;try{const u=JSON.parse("["+r.body+"]");if(!Array.isArray(u)||u.length<1||u.length>2||typeof u[0]!="string")throw new Pe(`Malformed selector: ${r.name}=`+r.body);if(i=u[0],u.length===2){if(typeof u[1]!="number"||!I0.has(r.name))throw new Pe(`Malformed selector: ${r.name}=`+r.body);s=u[1]}}catch{throw new Pe(`Malformed selector: ${r.name}=`+r.body)}const o={name:r.name,source:r.body,body:{parsed:oo(i),distance:s}},l=[...o.body.parsed.parts].reverse().find(u=>u.name==="internal:control"&&u.body==="enter-frame"),a=l?o.body.parsed.parts.indexOf(l):-1;a!==-1&&P0(o.body.parsed.parts.slice(0,a+1),n.slice(0,a+1))&&o.body.parsed.parts.splice(0,a+1),n.push(o);continue}n.push({...r,source:r.body})}if(Bl.has(n[0].name))throw new Pe(`"${n[0].name}" selector cannot be first`);return{capture:t.capture,parts:n}}function P0(e,t){return Sn({parts:e})===Sn({parts:t})}function Sn(e,t){return typeof e=="string"?e:e.parts.map((n,r)=>{let i=!0;!t&&r!==e.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(i=!1);const s=i?n.name+"=":"";return`${r===e.capture?"*":""}${s}${n.source}`}).join(" >> ")}function R0(e,t){const n=(r,i)=>{for(const s of r.parts)t(s,i),Bl.has(s.name)&&n(s.body.parsed,!0)};n(e,!1)}function $0(e){let t=0,n,r=0;const i={parts:[]},s=()=>{const l=e.substring(r,t).trim(),a=l.indexOf("=");let u,c;a!==-1&&l.substring(0,a).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(u=l.substring(0,a).trim(),c=l.substring(a+1)):l.length>1&&l[0]==='"'&&l[l.length-1]==='"'||l.length>1&&l[0]==="'"&&l[l.length-1]==="'"?(u="text",c=l):/^\(*\/\//.test(l)||l.startsWith("..")?(u="xpath",c=l):(u="css",c=l);let p=!1;if(u[0]==="*"&&(p=!0,u=u.substring(1)),i.parts.push({name:u,body:c}),p){if(i.capture!==void 0)throw new Pe("Only one of the selectors can capture using * modifier");i.capture=i.parts.length-1}};if(!e.includes(">>"))return t=e.length,s(),i;const o=()=>{const a=e.substring(r,t).match(/^\s*text\s*=(.*)$/);return!!a&&!!a[1]};for(;t<e.length;){const l=e[t];l==="\\"&&t+1<e.length?t+=2:l===n?(n=void 0,t++):!n&&(l==='"'||l==="'"||l==="`")&&!o()?(n=l,t++):!n&&l===">"&&e[t+1]===">"?(s(),t+=2,r=t):t++}return s(),i}function mn(e,t){let n=0,r=e.length===0;const i=()=>e[n]||"",s=()=>{const x=i();return++n,r=n>=e.length,x},o=x=>{throw r?new Pe(`Unexpected end of selector while parsing selector \`${e}\``):new Pe(`Error while parsing selector \`${e}\` - unexpected symbol "${i()}" at position ${n}`+(x?" during "+x:""))};function l(){for(;!r&&/\s/.test(i());)s()}function a(x){return x>=""||x>="0"&&x<="9"||x>="A"&&x<="Z"||x>="a"&&x<="z"||x>="0"&&x<="9"||x==="_"||x==="-"}function u(){let x="";for(l();!r&&a(i());)x+=s();return x}function c(x){let h=s();for(h!==x&&o("parsing quoted string");!r&&i()!==x;)i()==="\\"&&s(),h+=s();return i()!==x&&o("parsing quoted string"),h+=s(),h}function p(){s()!=="/"&&o("parsing regular expression");let x="",h=!1;for(;!r;){if(i()==="\\")x+=s(),r&&o("parsing regular expression");else if(h&&i()==="]")h=!1;else if(!h&&i()==="[")h=!0;else if(!h&&i()==="/")break;x+=s()}s()!=="/"&&o("parsing regular expression");let m="";for(;!r&&i().match(/[dgimsuy]/);)m+=s();try{return new RegExp(x,m)}catch(v){throw new Pe(`Error while parsing selector \`${e}\`: ${v.message}`)}}function f(){let x="";return l(),i()==="'"||i()==='"'?x=c(i()).slice(1,-1):x=u(),x||o("parsing property path"),x}function g(){l();let x="";return r||(x+=s()),!r&&x!=="="&&(x+=s()),["=","*=","^=","$=","|=","~="].includes(x)||o("parsing operator"),x}function y(){s();const x=[];for(x.push(f()),l();i()===".";)s(),x.push(f()),l();if(i()==="]")return s(),{name:x.join("."),jsonPath:x,op:"<truthy>",value:null,caseSensitive:!1};const h=g();let m,v=!0;if(l(),i()==="/"){if(h!=="=")throw new Pe(`Error while parsing selector \`${e}\` - cannot use ${h} in attribute with regular expression`);m=p()}else if(i()==="'"||i()==='"')m=c(i()).slice(1,-1),l(),i()==="i"||i()==="I"?(v=!1,s()):(i()==="s"||i()==="S")&&(v=!0,s());else{for(m="";!r&&(a(i())||i()==="+"||i()===".");)m+=s();m==="true"?m=!0:m==="false"?m=!1:t||(m=+m,Number.isNaN(m)&&o("parsing attribute value"))}if(l(),i()!=="]"&&o("parsing attribute value"),s(),h!=="="&&typeof m!="string")throw new Pe(`Error while parsing selector \`${e}\` - cannot use ${h} in attribute with non-string matching value - ${m}`);return{name:x.join("."),jsonPath:x,op:h,value:m,caseSensitive:v}}const w={name:"",attributes:[]};for(w.name=u(),l();i()==="[";)w.attributes.push(y()),l();if(r||o(void 0),!w.name&&!w.attributes.length)throw new Pe(`Error while parsing selector \`${e}\` - selector cannot be empty`);return w}function Yt(e,t,n=!1){return Yh(e,t,n)[0]}function Yh(e,t,n=!1,r=20,i){try{return Mn(new B0[e](i),oo(t),n,r)}catch{return[t]}}function Mn(e,t,n=!1,r=20){const i=[...t.parts];for(let l=0;l<i.length-1;l++)if(i[l].name==="nth"&&i[l+1].name==="internal:control"&&i[l+1].body==="enter-frame"){const[a]=i.splice(l,1);i.splice(l+1,0,a)}const s=[];let o=n?"frame-locator":"page";for(let l=0;l<i.length;l++){const a=i[l],u=o;if(o="locator",a.name==="nth"){a.body==="0"?s.push([e.generateLocator(u,"first",""),e.generateLocator(u,"nth","0")]):a.body==="-1"?s.push([e.generateLocator(u,"last",""),e.generateLocator(u,"nth","-1")]):s.push([e.generateLocator(u,"nth",a.body)]);continue}if(a.name==="internal:text"){const{exact:w,text:x}=Nr(a.body);s.push([e.generateLocator(u,"text",x,{exact:w})]);continue}if(a.name==="internal:has-text"){const{exact:w,text:x}=Nr(a.body);if(!w){s.push([e.generateLocator(u,"has-text",x,{exact:w})]);continue}}if(a.name==="internal:has-not-text"){const{exact:w,text:x}=Nr(a.body);if(!w){s.push([e.generateLocator(u,"has-not-text",x,{exact:w})]);continue}}if(a.name==="internal:has"){const w=Mn(e,a.body.parsed,!1,r);s.push(w.map(x=>e.generateLocator(u,"has",x)));continue}if(a.name==="internal:has-not"){const w=Mn(e,a.body.parsed,!1,r);s.push(w.map(x=>e.generateLocator(u,"hasNot",x)));continue}if(a.name==="internal:and"){const w=Mn(e,a.body.parsed,!1,r);s.push(w.map(x=>e.generateLocator(u,"and",x)));continue}if(a.name==="internal:or"){const w=Mn(e,a.body.parsed,!1,r);s.push(w.map(x=>e.generateLocator(u,"or",x)));continue}if(a.name==="internal:chain"){const w=Mn(e,a.body.parsed,!1,r);s.push(w.map(x=>e.generateLocator(u,"chain",x)));continue}if(a.name==="internal:label"){const{exact:w,text:x}=Nr(a.body);s.push([e.generateLocator(u,"label",x,{exact:w})]);continue}if(a.name==="internal:role"){const w=mn(a.body,!0),x={attrs:[]};for(const h of w.attributes)h.name==="name"?(x.exact=h.caseSensitive,x.name=h.value):(h.name==="level"&&typeof h.value=="string"&&(h.value=+h.value),x.attrs.push({name:h.name==="include-hidden"?"includeHidden":h.name,value:h.value}));s.push([e.generateLocator(u,"role",w.name,x)]);continue}if(a.name==="internal:testid"){const w=mn(a.body,!0),{value:x}=w.attributes[0];s.push([e.generateLocator(u,"test-id",x)]);continue}if(a.name==="internal:attr"){const w=mn(a.body,!0),{name:x,value:h,caseSensitive:m}=w.attributes[0],v=h,S=!!m;if(x==="placeholder"){s.push([e.generateLocator(u,"placeholder",v,{exact:S})]);continue}if(x==="alt"){s.push([e.generateLocator(u,"alt",v,{exact:S})]);continue}if(x==="title"){s.push([e.generateLocator(u,"title",v,{exact:S})]);continue}}let c="default";const p=i[l+1];p&&p.name==="internal:control"&&p.body==="enter-frame"&&(c="frame",o="frame-locator",l++);const f=Sn({parts:[a]}),g=e.generateLocator(u,c,f);if(c==="default"&&p&&["internal:has-text","internal:has-not-text"].includes(p.name)){const{exact:w,text:x}=Nr(p.body);if(!w){const h=e.generateLocator("locator",p.name==="internal:has-text"?"has-text":"has-not-text",x,{exact:w}),m={};p.name==="internal:has-text"?m.hasText=x:m.hasNotText=x;const v=e.generateLocator(u,"default",f,m);s.push([e.chainLocators([g,h]),v]),l++;continue}}let y;if(["xpath","css"].includes(a.name)){const w=Sn({parts:[a]},!0);y=e.generateLocator(u,c,w)}s.push([g,y].filter(Boolean))}return O0(e,s,r)}function O0(e,t,n){const r=t.map(()=>""),i=[],s=o=>{if(o===t.length)return i.push(e.chainLocators(r)),r.length<n;for(const l of t[o])if(r[o]=l,!s(o+1))return!1;return!0};return s(0),i}function Nr(e){let t=!1;const n=e.match(/^\/(.*)\/([igm]*)$/);return n?{text:new RegExp(n[1],n[2])}:(e.endsWith('"')?(e=JSON.parse(e),t=!0):e.endsWith('"s')?(e=JSON.parse(e.substring(0,e.length-1)),t=!0):e.endsWith('"i')&&(e=JSON.parse(e.substring(0,e.length-1)),t=!1),{exact:t,text:e})}class z0{constructor(t){this.preferredQuote=t}generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(i.hasText)} })`:i.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(i.hasNotText)} })`:`locator(${this.quote(r)})`;case"frame":return`frameLocator(${this.quote(r)})`;case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"role":const s=[];fe(i.name)?s.push(`name: ${this.regexToSourceString(i.name)}`):typeof i.name=="string"&&(s.push(`name: ${this.quote(i.name)}`),i.exact&&s.push("exact: true"));for(const{name:l,value:a}of i.attrs)s.push(`${l}: ${typeof a=="string"?this.quote(a):a}`);const o=s.length?`, { ${s.join(", ")} }`:"";return`getByRole(${this.quote(r)}${o})`;case"has-text":return`filter({ hasText: ${this.toHasText(r)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(r)} })`;case"has":return`filter({ has: ${r} })`;case"hasNot":return`filter({ hasNot: ${r} })`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("getByText",r,!!i.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact("getByLabel",r,!!i.exact);case"title":return this.toCallWithExact("getByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToSourceString(t){return so(String(t))}toCallWithExact(t,n,r){return fe(n)?`${t}(${this.regexToSourceString(n)})`:r?`${t}(${this.quote(n)}, { exact: true })`:`${t}(${this.quote(n)})`}toHasText(t){return fe(t)?this.regexToSourceString(t):this.quote(t)}toTestIdValue(t){return fe(t)?this.regexToSourceString(t):this.quote(t)}quote(t){return io(t,this.preferredQuote??"'")}}class D0{generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(i.hasText)})`:i.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(i.hasNotText)})`:`locator(${this.quote(r)})`;case"frame":return`frame_locator(${this.quote(r)})`;case"nth":return`nth(${r})`;case"first":return"first";case"last":return"last";case"role":const s=[];fe(i.name)?s.push(`name=${this.regexToString(i.name)}`):typeof i.name=="string"&&(s.push(`name=${this.quote(i.name)}`),i.exact&&s.push("exact=True"));for(const{name:l,value:a}of i.attrs){let u=typeof a=="string"?this.quote(a):a;typeof a=="boolean"&&(u=a?"True":"False"),s.push(`${Ch(l)}=${u}`)}const o=s.length?`, ${s.join(", ")}`:"";return`get_by_role(${this.quote(r)}${o})`;case"has-text":return`filter(has_text=${this.toHasText(r)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(r)})`;case"has":return`filter(has=${r})`;case"hasNot":return`filter(has_not=${r})`;case"and":return`and_(${r})`;case"or":return`or_(${r})`;case"chain":return`locator(${r})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("get_by_text",r,!!i.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!i.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!i.exact);case"label":return this.toCallWithExact("get_by_label",r,!!i.exact);case"title":return this.toCallWithExact("get_by_title",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${so(t.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${n})`}toCallWithExact(t,n,r){return fe(n)?`${t}(${this.regexToString(n)})`:r?`${t}(${this.quote(n)}, exact=True)`:`${t}(${this.quote(n)})`}toHasText(t){return fe(t)?this.regexToString(t):`${this.quote(t)}`}toTestIdValue(t){return fe(t)?this.regexToString(t):this.quote(t)}quote(t){return io(t,'"')}}class F0{generateLocator(t,n,r,i={}){let s;switch(t){case"page":s="Page";break;case"frame-locator":s="FrameLocator";break;case"locator":s="Locator";break}switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, new ${s}.LocatorOptions().setHasText(${this.toHasText(i.hasText)}))`:i.hasNotText!==void 0?`locator(${this.quote(r)}, new ${s}.LocatorOptions().setHasNotText(${this.toHasText(i.hasNotText)}))`:`locator(${this.quote(r)})`;case"frame":return`frameLocator(${this.quote(r)})`;case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"role":const o=[];fe(i.name)?o.push(`.setName(${this.regexToString(i.name)})`):typeof i.name=="string"&&(o.push(`.setName(${this.quote(i.name)})`),i.exact&&o.push(".setExact(true)"));for(const{name:a,value:u}of i.attrs)o.push(`.set${zs(a)}(${typeof u=="string"?this.quote(u):u})`);const l=o.length?`, new ${s}.GetByRoleOptions()${o.join("")}`:"";return`getByRole(AriaRole.${Ch(r).toUpperCase()}${l})`;case"has-text":return`filter(new ${s}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${s}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${s}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${s}.FilterOptions().setHasNot(${r}))`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact(s,"getByText",r,!!i.exact);case"alt":return this.toCallWithExact(s,"getByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact(s,"getByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact(s,"getByLabel",r,!!i.exact);case"title":return this.toCallWithExact(s,"getByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(so(t.source))}${n})`}toCallWithExact(t,n,r,i){return fe(r)?`${n}(${this.regexToString(r)})`:i?`${n}(${this.quote(r)}, new ${t}.${zs(n)}Options().setExact(true))`:`${n}(${this.quote(r)})`}toHasText(t){return fe(t)?this.regexToString(t):this.quote(t)}toTestIdValue(t){return fe(t)?this.regexToString(t):this.quote(t)}quote(t){return io(t,'"')}}class H0{generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(i.hasText)} })`:i.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(i.hasNotText)} })`:`Locator(${this.quote(r)})`;case"frame":return`FrameLocator(${this.quote(r)})`;case"nth":return`Nth(${r})`;case"first":return"First";case"last":return"Last";case"role":const s=[];fe(i.name)?s.push(`NameRegex = ${this.regexToString(i.name)}`):typeof i.name=="string"&&(s.push(`Name = ${this.quote(i.name)}`),i.exact&&s.push("Exact = true"));for(const{name:l,value:a}of i.attrs)s.push(`${zs(l)} = ${typeof a=="string"?this.quote(a):a}`);const o=s.length?`, new() { ${s.join(", ")} }`:"";return`GetByRole(AriaRole.${zs(r)}${o})`;case"has-text":return`Filter(new() { ${this.toHasText(r)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(r)} })`;case"has":return`Filter(new() { Has = ${r} })`;case"hasNot":return`Filter(new() { HasNot = ${r} })`;case"and":return`And(${r})`;case"or":return`Or(${r})`;case"chain":return`Locator(${r})`;case"test-id":return`GetByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("GetByText",r,!!i.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!i.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(so(t.source))}${n})`}toCallWithExact(t,n,r){return fe(n)?`${t}(${this.regexToString(n)})`:r?`${t}(${this.quote(n)}, new() { Exact = true })`:`${t}(${this.quote(n)})`}toHasText(t){return fe(t)?`HasTextRegex = ${this.regexToString(t)}`:`HasText = ${this.quote(t)}`}toTestIdValue(t){return fe(t)?this.regexToString(t):this.quote(t)}toHasNotText(t){return fe(t)?`HasNotTextRegex = ${this.regexToString(t)}`:`HasNotText = ${this.quote(t)}`}quote(t){return io(t,'"')}}class U0{generateLocator(t,n,r,i={}){return JSON.stringify({kind:n,body:r,options:i})}chainLocators(t){const n=t.map(r=>JSON.parse(r));for(let r=0;r<n.length-1;++r)n[r].next=n[r+1];return JSON.stringify(n[0])}}const B0={javascript:z0,python:D0,java:F0,csharp:H0,jsonl:U0};function fe(e){return e instanceof RegExp}const Ac=new Map;function vi({name:e,items:t=[],id:n,render:r,icon:i,isError:s,isWarning:o,isInfo:l,indent:a,selectedItem:u,onAccepted:c,onSelected:p,onLeftArrow:f,onRightArrow:g,onHighlighted:y,onIconClicked:w,noItemsMessage:x,dataTestId:h,notSelectable:m}){const v=b.useRef(null),[S,N]=b.useState();return b.useEffect(()=>{y==null||y(S)},[y,S]),b.useEffect(()=>{const E=v.current;if(!E)return;const C=()=>{Ac.set(e,E.scrollTop)};return E.addEventListener("scroll",C,{passive:!0}),()=>E.removeEventListener("scroll",C)},[e]),b.useEffect(()=>{v.current&&(v.current.scrollTop=Ac.get(e)||0)},[e]),d.jsx("div",{className:Ne("list-view vbox",e+"-list-view"),role:t.length>0?"list":void 0,"data-testid":h||e+"-list",children:d.jsxs("div",{className:Ne("list-view-content",m&&"not-selectable"),tabIndex:0,onKeyDown:E=>{var T;if(u&&E.key==="Enter"){c==null||c(u,t.indexOf(u));return}if(E.key!=="ArrowDown"&&E.key!=="ArrowUp"&&E.key!=="ArrowLeft"&&E.key!=="ArrowRight")return;if(E.stopPropagation(),E.preventDefault(),u&&E.key==="ArrowLeft"){f==null||f(u,t.indexOf(u));return}if(u&&E.key==="ArrowRight"){g==null||g(u,t.indexOf(u));return}const C=u?t.indexOf(u):-1;let A=C;E.key==="ArrowDown"&&(C===-1?A=0:A=Math.min(C+1,t.length-1)),E.key==="ArrowUp"&&(C===-1?A=t.length-1:A=Math.max(C-1,0));const _=(T=v.current)==null?void 0:T.children.item(A);V0(_||void 0),y==null||y(void 0),p==null||p(t[A],A),N(void 0)},ref:v,children:[x&&t.length===0&&d.jsx("div",{className:"list-view-empty",children:x}),t.map((E,C)=>{const A=(a==null?void 0:a(E,C))||0,_=r(E,C);return d.jsxs("div",{onDoubleClick:()=>c==null?void 0:c(E,C),role:"listitem",className:Ne("list-view-entry",u===E&&"selected",!m&&S===E&&"highlighted",(s==null?void 0:s(E,C))&&"error",(o==null?void 0:o(E,C))&&"warning",(l==null?void 0:l(E,C))&&"info"),onClick:()=>p==null?void 0:p(E,C),onMouseEnter:()=>N(E),onMouseLeave:()=>N(void 0),children:[A?new Array(A).fill(0).map(()=>d.jsx("div",{className:"list-view-indent"})):void 0,i&&d.jsx("div",{className:"codicon "+(i(E,C)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:T=>{T.preventDefault(),T.stopPropagation()},onClick:T=>{T.stopPropagation(),T.preventDefault(),w==null||w(E,C)}}),typeof _=="string"?d.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:_}):_]},(n==null?void 0:n(E,C))||C)})]})})}function V0(e){e&&(e!=null&&e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e==null||e.scrollIntoView())}const W0=vi;function q0({name:e,rootItem:t,render:n,icon:r,isError:i,isVisible:s,selectedItem:o,onAccepted:l,onSelected:a,onHighlighted:u,treeState:c,setTreeState:p,noItemsMessage:f,dataTestId:g,autoExpandDepth:y}){const w=b.useMemo(()=>X0(t,o,c.expandedItems,y||0),[t,o,c,y]),x=b.useMemo(()=>{if(!s)return[...w.keys()];const h=new Map,m=S=>{const N=h.get(S);if(N!==void 0)return N;let E=S.children.some(A=>m(A));for(const A of S.children){const _=m(A);E=E||_}const C=s(S)||E;return h.set(S,C),C};for(const S of w.keys())m(S);const v=[];for(const S of w.keys())s(S)&&v.push(S);return v},[w,s]);return d.jsx(W0,{name:e,items:x,id:h=>h.id,dataTestId:g||e+"-tree",render:h=>{const m=n(h);return d.jsxs(d.Fragment,{children:[r&&d.jsx("div",{className:"codicon "+(r(h)||"blank"),style:{minWidth:16,marginRight:4}}),typeof m=="string"?d.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:m}):m]})},icon:h=>{const m=w.get(h).expanded;if(typeof m=="boolean")return m?"codicon-chevron-down":"codicon-chevron-right"},isError:h=>(i==null?void 0:i(h))||!1,indent:h=>w.get(h).depth,selectedItem:o,onAccepted:h=>l==null?void 0:l(h),onSelected:h=>a==null?void 0:a(h),onHighlighted:h=>u==null?void 0:u(h),onLeftArrow:h=>{const{expanded:m,parent:v}=w.get(h);m?(c.expandedItems.set(h.id,!1),p({...c})):v&&(a==null||a(v))},onRightArrow:h=>{h.children.length&&(c.expandedItems.set(h.id,!0),p({...c}))},onIconClicked:h=>{const{expanded:m}=w.get(h);if(m){for(let v=o;v;v=v.parent)if(v===h){a==null||a(h);break}c.expandedItems.set(h.id,!1)}else c.expandedItems.set(h.id,!0);p({...c})},noItemsMessage:f})}function X0(e,t,n,r){const i=new Map,s=new Set;for(let l=t==null?void 0:t.parent;l;l=l.parent)s.add(l.id);const o=(l,a)=>{for(const u of l.children){const c=s.has(u.id)||n.get(u.id),p=r>a&&i.size<25&&c!==!1,f=u.children.length?c??p:void 0;i.set(u,{depth:a,expanded:f,parent:e===l?null:l}),f&&o(u,a+1)}};return o(e,0),i}const Q0=q0,K0=({actions:e,selectedAction:t,selectedTime:n,setSelectedTime:r,sdkLanguage:i,onSelected:s,onHighlighted:o,revealConsole:l,isLive:a})=>{const[u,c]=b.useState({expandedItems:new Map}),{rootItem:p,itemMap:f}=b.useMemo(()=>r0(e),[e]),{selectedItem:g}=b.useMemo(()=>({selectedItem:t?f.get(t.callId):void 0}),[f,t]);return d.jsxs("div",{className:"vbox",children:[n&&d.jsxs("div",{className:"action-list-show-all",onClick:()=>r(void 0),children:[d.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),d.jsx(Q0,{name:"actions",rootItem:p,treeState:u,setTreeState:c,selectedItem:g,onSelected:y=>s(y.action),onHighlighted:y=>o(y==null?void 0:y.action),onAccepted:y=>r({minimum:y.action.startTime,maximum:y.action.endTime}),isError:y=>{var w,x;return!!((x=(w=y.action)==null?void 0:w.error)!=null&&x.message)},isVisible:y=>!n||y.action.startTime<=n.maximum&&y.action.endTime>=n.minimum,render:y=>Qa(y.action,{sdkLanguage:i,revealConsole:l,isLive:a,showDuration:!0,showBadges:!0})})]})},Qa=(e,t)=>{const{sdkLanguage:n,revealConsole:r,isLive:i,showDuration:s,showBadges:o}=t,{errors:l,warnings:a}=o0(e),u=e.params.selector?Yt(n||"javascript",e.params.selector):void 0;let c="";return e.endTime?c=et(e.endTime-e.startTime):e.error?c="Timed out":i||(c="-"),d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"action-title",title:e.apiName,children:[d.jsx("span",{children:e.apiName}),u&&d.jsx("div",{className:"action-selector",title:u,children:u}),e.method==="goto"&&e.params.url&&d.jsx("div",{className:"action-url",title:e.params.url,children:e.params.url}),e.class==="APIRequestContext"&&e.params.url&&d.jsx("div",{className:"action-url",title:e.params.url,children:G0(e.params.url)})]}),(s||o)&&d.jsx("div",{className:"spacer"}),s&&d.jsx("div",{className:"action-duration",children:c||d.jsx("span",{className:"codicon codicon-loading"})}),o&&d.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!l&&d.jsxs("div",{className:"action-icon",children:[d.jsx("span",{className:"codicon codicon-error"}),d.jsx("span",{className:"action-icon-value",children:l})]}),!!a&&d.jsxs("div",{className:"action-icon",children:[d.jsx("span",{className:"codicon codicon-warning"}),d.jsx("span",{className:"action-icon-value",children:a})]})]})]})};function G0(e){try{const t=new URL(e);return t.pathname+t.search}catch{return e}}const Jh=({value:e,description:t})=>{const[n,r]=b.useState("copy"),i=b.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},[e]);return d.jsx(en,{title:t||"Copy",icon:n,onClick:i})},kn=({text:e})=>d.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:e}),Y0=({action:e,sdkLanguage:t})=>{if(!e)return d.jsx(kn,{text:"No action selected"});const n={...e.params};delete n.info;const r=Object.keys(n),i=e.startTime+(e.context.wallTime-e.context.startTime),s=new Date(i).toLocaleString(),o=e.endTime?et(e.endTime-e.startTime):"Timed Out";return d.jsxs("div",{className:"call-tab",children:[d.jsx("div",{className:"call-line",children:e.apiName}),d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"call-section",children:"Time"}),s&&d.jsxs("div",{className:"call-line",children:["wall time:",d.jsx("span",{className:"call-value datetime",title:s,children:s})]}),d.jsxs("div",{className:"call-line",children:["duration:",d.jsx("span",{className:"call-value datetime",title:o,children:o})]})]}),!!r.length&&d.jsx("div",{className:"call-section",children:"Parameters"}),!!r.length&&r.map((l,a)=>jc(Mc(e,l,n[l],t),"param-"+a)),!!e.result&&d.jsx("div",{className:"call-section",children:"Return value"}),!!e.result&&Object.keys(e.result).map((l,a)=>jc(Mc(e,l,e.result[l],t),"result-"+a))]})};function jc(e,t){let n=e.text.replace(/\n/g,"↵");return e.type==="string"&&(n=`"${n}"`),d.jsxs("div",{className:"call-line",children:[e.name,":",d.jsx("span",{className:Ne("call-value",e.type),title:e.text,children:n}),["string","number","object","locator"].includes(e.type)&&d.jsx(Jh,{value:e.text})]},t)}function Mc(e,t,n,r){const i=e.method.includes("eval")||e.method==="waitForFunction";if(t==="files")return{text:"<files>",type:"string",name:t};if((t==="eventInit"||t==="expectedValue"||t==="arg"&&i)&&(n=Ds(n.value,new Array(10).fill({handle:"<handle>"}))),(t==="value"&&i||t==="received"&&e.method==="expect")&&(n=Ds(n,new Array(10).fill({handle:"<handle>"}))),t==="selector")return{text:Yt(r||"javascript",e.params.selector),type:"locator",name:"locator"};const s=typeof n;return s!=="object"||n===null?{text:String(n),type:s,name:t}:n.guid?{text:"<handle>",type:"handle",name:t}:{text:JSON.stringify(n).slice(0,1e3),type:"object",name:t}}function Ds(e,t){if(e.n!==void 0)return e.n;if(e.s!==void 0)return e.s;if(e.b!==void 0)return e.b;if(e.v!==void 0){if(e.v==="undefined")return;if(e.v==="null")return null;if(e.v==="NaN")return NaN;if(e.v==="Infinity")return 1/0;if(e.v==="-Infinity")return-1/0;if(e.v==="-0")return-0}if(e.d!==void 0)return new Date(e.d);if(e.r!==void 0)return new RegExp(e.r.p,e.r.f);if(e.a!==void 0)return e.a.map(n=>Ds(n,t));if(e.o!==void 0){const n={};for(const{k:r,v:i}of e.o)n[r]=Ds(i,t);return n}return e.h!==void 0?t===void 0?"<object>":t[e.h]:"<object>"}const J0=vi,Z0=({action:e,isLive:t})=>{const n=b.useMemo(()=>{var o;if(!e||!e.log.length)return[];const r=e.log,i=e.context.wallTime-e.context.startTime,s=[];for(let l=0;l<r.length;++l){let a="";if(r[l].time!==-1){const u=(o=r[l])==null?void 0:o.time;l+1<r.length?a=et(r[l+1].time-u):e.endTime>0?a=et(e.endTime-u):t?a=et(Date.now()-i-u):a="-"}s.push({message:r[l].message,time:a})}return s},[e,t]);return n.length?d.jsx(J0,{name:"log",items:n,render:r=>d.jsxs("div",{className:"log-list-item",children:[d.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):d.jsx(kn,{text:"No log entries"})};function ci(e){const t=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,n=[];let r,i={};for(;(r=t.exec(e))!==null;){const[,,s,,o]=r;if(s){const l=+s;switch(l){case 0:i={};break;case 1:i["font-weight"]="bold";break;case 3:i["font-style"]="italic";break;case 4:i["text-decoration"]="underline";break;case 8:i.display="none";break;case 9:i["text-decoration"]="line-through";break;case 22:i={...i,"font-weight":void 0,"font-style":void 0,"text-decoration":void 0};break;case 23:i={...i,"font-weight":void 0,"font-style":void 0};break;case 24:i={...i,"text-decoration":void 0};break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:i.color=Ic[l-30];break;case 39:i={...i,color:void 0};break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:i["background-color"]=Ic[l-40];break;case 49:i={...i,"background-color":void 0};break;case 53:i["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:i.color=Pc[l-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:i["background-color"]=Pc[l-100];break}}else o&&n.push(`<span style="${ty(i)}">${ey(o)}</span>`)}return n.join("")}const Ic={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)"},Pc={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 ey(e){return e.replace(/[&"<>]/g,t=>({"&":"&",'"':""","<":"<",">":">"})[t])}function ty(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}const ny=({error:e})=>{const t=b.useMemo(()=>ci(e),[e]);return d.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:t||""}})};function ry(e){return b.useMemo(()=>{if(!e)return{errors:new Map};const t=new Map;for(const n of e.errorDescriptors)t.set(n.message,n);return{errors:t}},[e])}const iy=({errorsModel:e,sdkLanguage:t,revealInSource:n})=>e.errors.size?d.jsx("div",{className:"fill",style:{overflow:"auto"},children:[...e.errors.entries()].map(([r,i])=>{var a;let s,o;const l=(a=i.stack)==null?void 0:a[0];return l&&(s=l.file.replace(/.*[/\\](.*)/,"$1")+":"+l.line,o=l.file+":"+l.line),d.jsxs("div",{children:[d.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)"},children:[i.action&&Qa(i.action,{sdkLanguage:t}),s&&d.jsxs("div",{className:"action-location",children:["@ ",d.jsx("span",{title:o,onClick:()=>n(i),children:s})]})]}),d.jsx(ny,{error:r})]},r)})}):d.jsx(kn,{text:"No errors"}),sy=vi;function oy(e,t){const{entries:n}=b.useMemo(()=>{if(!e)return{entries:[]};const i=[];for(const s of e.events){if(s.type==="console"){const o=s.args&&s.args.length?ay(s.args):Zh(s.text),l=s.location.url,u=`${l?l.substring(l.lastIndexOf("/")+1):"<anonymous>"}:${s.location.lineNumber}`;i.push({browserMessage:{body:o,location:u},isError:s.messageType==="error",isWarning:s.messageType==="warning",timestamp:s.time})}s.type==="event"&&s.method==="pageError"&&i.push({browserError:s.params.error,isError:!0,isWarning:!1,timestamp:s.time})}for(const s of e.stdio){let o="";s.text&&(o=ci(s.text.trim())||""),s.base64&&(o=ci(atob(s.base64).trim())||""),i.push({nodeMessage:{html:o},isError:s.type==="stderr",isWarning:!1,timestamp:s.timestamp})}return i.sort((s,o)=>s.timestamp-o.timestamp),{entries:i}},[e]);return{entries:b.useMemo(()=>t?n.filter(i=>i.timestamp>=t.minimum&&i.timestamp<=t.maximum):n,[n,t])}}const ly=({consoleModel:e,boundaries:t,onEntryHovered:n,onAccepted:r})=>e.entries.length?d.jsx("div",{className:"console-tab",children:d.jsx(sy,{name:"console",onAccepted:r,onHighlighted:n,items:e.entries,isError:i=>i.isError,isWarning:i=>i.isWarning,render:i=>{const s=et(i.timestamp-t.minimum),o=d.jsx("span",{className:"console-time",children:s}),l=i.isError?"status-error":i.isWarning?"status-warning":"status-none",a=i.browserMessage||i.browserError?d.jsx("span",{className:Ne("codicon","codicon-browser",l),title:"Browser message"}):d.jsx("span",{className:Ne("codicon","codicon-file",l),title:"Runner message"});let u,c,p,f;const{browserMessage:g,browserError:y,nodeMessage:w}=i;if(g&&(u=g.location,c=g.body),y){const{error:x,value:h}=y;x?(c=x.message,f=x.stack):c=String(h)}return w&&(p=w.html),d.jsxs("div",{className:"console-line",children:[o,a,u&&d.jsx("span",{className:"console-location",children:u}),c&&d.jsx("span",{className:"console-line-message",children:c}),p&&d.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:p}}),f&&d.jsx("div",{className:"console-stack",children:f})]})}})}):d.jsx(kn,{text:"No console entries"});function ay(e){if(e.length===1)return Zh(e[0].preview);const t=typeof e[0].value=="string"&&e[0].value.includes("%"),n=t?e[0].value:"",r=t?e.slice(1):e;let i=0;const s=/%([%sdifoOc])/g;let o;const l=[];let a=[];l.push(d.jsx("span",{children:a}));let u=0;for(;(o=s.exec(n))!==null;){const c=n.substring(u,o.index);a.push(d.jsx("span",{children:c})),u=o.index+2;const p=o[0][1];if(p==="%")a.push(d.jsx("span",{children:"%"}));else if(p==="s"||p==="o"||p==="O"||p==="d"||p==="i"||p==="f"){const f=r[i++],g={};typeof(f==null?void 0:f.value)!="string"&&(g.color="var(--vscode-debugTokenExpression-number)"),a.push(d.jsx("span",{style:g,children:(f==null?void 0:f.preview)||""}))}else if(p==="c"){a=[];const f=r[i++],g=f?uy(f.preview):{};l.push(d.jsx("span",{style:g,children:a}))}}for(u<n.length&&a.push(d.jsx("span",{children:n.substring(u)}));i<r.length;i++){const c=r[i],p={};a.length&&a.push(d.jsx("span",{children:" "})),typeof(c==null?void 0:c.value)!="string"&&(p.color="var(--vscode-debugTokenExpression-number)"),a.push(d.jsx("span",{style:p,children:(c==null?void 0:c.preview)||""}))}return l}function Zh(e){return[d.jsx("span",{dangerouslySetInnerHTML:{__html:ci(e.trim())}})]}function uy(e){try{const t={},n=e.split(";");for(const r of n){const i=r.trim();if(!i)continue;let[s,o]=i.split(":");if(s=s.trim(),o=o.trim(),!cy(s))continue;const l=s.replace(/-([a-z])/g,a=>a[1].toUpperCase());t[l]=o}return t}catch{return{}}}function cy(e){return["background","border","color","font","line","margin","padding","text"].some(n=>e.startsWith(n))}const Ka=({noShadow:e,children:t,noMinHeight:n,className:r,onClick:i})=>d.jsx("div",{className:Ne("toolbar",e&&"no-shadow",n&&"no-min-height",r),onClick:i,children:t}),Vl=({tabs:e,selectedTab:t,setSelectedTab:n,leftToolbar:r,rightToolbar:i,dataTestId:s,mode:o})=>(o||(o="default"),d.jsx("div",{className:"tabbed-pane","data-testid":s,children:d.jsxs("div",{className:"vbox",children:[d.jsxs(Ka,{children:[r&&d.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),o==="default"&&d.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},children:[...e.map(l=>d.jsx(ep,{id:l.id,title:l.title,count:l.count,errorCount:l.errorCount,selected:t===l.id,onSelect:n},l.id))]}),o==="select"&&d.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},children:d.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},onChange:l=>{n(e[l.currentTarget.selectedIndex].id)},children:e.map(l=>{let a="";return l.count&&(a=` (${l.count})`),l.errorCount&&(a=` (${l.errorCount})`),d.jsxs("option",{value:l.id,selected:l.id===t,children:[l.title,a]},l.id)})})}),i&&d.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...i]})]}),e.map(l=>{const a="tab-content tab-"+l.id;if(l.component)return d.jsx("div",{className:a,style:{display:t===l.id?"inherit":"none"},children:l.component},l.id);if(t===l.id)return d.jsx("div",{className:a,children:l.render()},l.id)})]})})),ep=({id:e,title:t,count:n,errorCount:r,selected:i,onSelect:s})=>d.jsxs("div",{className:Ne("tabbed-pane-tab",i&&"selected"),onClick:()=>s(e),title:t,children:[d.jsx("div",{className:"tabbed-pane-tab-label",children:t}),!!n&&d.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&d.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]},e),dy="modulepreload",fy=function(e,t){return new URL(e,t).href},Rc={},hy=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link");i=Promise.all(n.map(o=>{if(o=fy(o,r),o in Rc)return;Rc[o]=!0;const l=o.endsWith(".css"),a=l?'[rel="stylesheet"]':"";if(!!r)for(let p=s.length-1;p>=0;p--){const f=s[p];if(f.href===o&&(!l||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${a}`))return;const c=document.createElement("link");if(c.rel=l?"stylesheet":dy,l||(c.as="script",c.crossOrigin=""),c.href=o,document.head.appendChild(c),l)return new Promise((p,f)=>{c.addEventListener("load",p),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})}))}return i.then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},yi=({text:e,language:t,mimeType:n,linkify:r,readOnly:i,highlight:s,revealLine:o,lineNumbers:l,isFocused:a,focusOnChange:u,wrapLines:c,onChange:p})=>{const[f,g]=_n(),[y]=b.useState(hy(()=>import("./codeMirrorModule-cCPLLRBo.js"),__vite__mapDeps([0,1]),import.meta.url).then(m=>m.default)),w=b.useRef(null),[x,h]=b.useState();return b.useEffect(()=>{(async()=>{var E,C;const m=await y;my(m);const v=g.current;if(!v)return;const S=vy(t)||gy(n)||(r?"text/linkified":"");if(w.current&&S===w.current.cm.getOption("mode")&&!!i===w.current.cm.getOption("readOnly")&&l===w.current.cm.getOption("lineNumbers")&&c===w.current.cm.getOption("lineWrapping"))return;(C=(E=w.current)==null?void 0:E.cm)==null||C.getWrapperElement().remove();const N=m(v,{value:"",mode:S,readOnly:!!i,lineNumbers:l,lineWrapping:c});return w.current={cm:N},a&&N.focus(),h(N),N})()},[y,x,g,t,n,r,l,c,i,a]),b.useEffect(()=>{w.current&&w.current.cm.setSize(f.width,f.height)},[f]),b.useLayoutEffect(()=>{var S;if(!x)return;let m=!1;if(x.getValue()!==e&&(x.setValue(e),m=!0,u&&(x.execCommand("selectAll"),x.focus())),m||JSON.stringify(s)!==JSON.stringify(w.current.highlight)){for(const E of w.current.highlight||[])x.removeLineClass(E.line-1,"wrap");for(const E of s||[])x.addLineClass(E.line-1,"wrap",`source-line-${E.type}`);for(const E of w.current.widgets||[])x.removeLineWidget(E);const N=[];for(const E of s||[]){if(E.type!=="error")continue;const C=(S=w.current)==null?void 0:S.cm.getLine(E.line-1);if(C){const _=document.createElement("div");_.className="source-line-error-underline",_.innerHTML=" ".repeat(C.length||1),N.push(x.addLineWidget(E.line,_,{above:!0,coverGutter:!1}))}const A=document.createElement("div");A.innerHTML=ci(E.message||""),A.className="source-line-error-widget",N.push(x.addLineWidget(E.line,A,{above:!0,coverGutter:!1}))}w.current.highlight=s,w.current.widgets=N}typeof o=="number"&&w.current.cm.lineCount()>=o&&x.scrollIntoView({line:Math.max(0,o-1),ch:0},50);let v;return p&&(v=()=>p(x.getValue()),x.on("change",v)),()=>{v&&x.off("change",v)}},[x,e,s,o,u,p]),d.jsx("div",{className:"cm-wrapper",ref:g,onClick:py})};function py(e){var n;if(!(e.target instanceof HTMLElement))return;let t;e.target.classList.contains("cm-linkified")?t=e.target.textContent:e.target.classList.contains("cm-link")&&((n=e.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(t=e.target.nextElementSibling.textContent.slice(1,-1)),t&&(e.preventDefault(),e.stopPropagation(),window.open(t,"_blank"))}let $c=!1;function my(e){$c||($c=!0,e.defineSimpleMode("text/linkified",{start:[{regex:xd,token:"linkified"}]}))}function gy(e){if(e){if(e.includes("javascript")||e.includes("json"))return"javascript";if(e.includes("python"))return"python";if(e.includes("csharp"))return"text/x-csharp";if(e.includes("java"))return"text/x-java";if(e.includes("markdown"))return"markdown";if(e.includes("html")||e.includes("svg"))return"htmlmixed";if(e.includes("css"))return"css"}}function vy(e){if(e)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css"}[e]}const yy=({resource:e,onClose:t})=>{const[n,r]=b.useState("request");return d.jsx(Vl,{dataTestId:"network-request-details",leftToolbar:[d.jsx(en,{icon:"close",title:"Close",onClick:t},"close")],tabs:[{id:"request",title:"Request",render:()=>d.jsx(wy,{resource:e})},{id:"response",title:"Response",render:()=>d.jsx(xy,{resource:e})},{id:"body",title:"Body",render:()=>d.jsx(Sy,{resource:e})}],selectedTab:n,setSelectedTab:r})},wy=({resource:e})=>{const[t,n]=b.useState(null);return b.useEffect(()=>{(async()=>{if(e.request.postData){const i=e.request.headers.find(o=>o.name.toLowerCase()==="content-type"),s=i?i.value:"";if(e.request.postData._sha1){const o=await fetch(`sha1/${e.request.postData._sha1}`);n({text:Wl(await o.text(),s),mimeType:s})}else n({text:Wl(e.request.postData.text,s),mimeType:s})}else n(null)})()},[e]),d.jsxs("div",{className:"network-request-details-tab",children:[d.jsx("div",{className:"network-request-details-header",children:"General"}),d.jsx("div",{className:"network-request-details-url",children:`URL: ${e.request.url}`}),d.jsx("div",{className:"network-request-details-general",children:`Method: ${e.request.method}`}),e.response.status!==-1&&d.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",d.jsx("span",{className:Ey(e.response.status),style:{display:"inline-flex"},children:`${e.response.status} ${e.response.statusText}`})]}),e.request.queryString.length?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),d.jsx("div",{className:"network-request-details-headers",children:e.request.queryString.map(r=>`${r.name}: ${r.value}`).join(`
|
|
47
|
+
`:this.value}}class dr extends te{constructor(){super(...arguments),this.value=""}ASCIIMatch(t){return this.value.toLowerCase()===t.toLowerCase()}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t}}class Uh extends dr{constructor(t){super(),this.tokenType="IDENT",this.value=t}toString(){return"IDENT("+this.value+")"}toSource(){return gi(this.value)}}class ls extends dr{constructor(t){super(),this.tokenType="FUNCTION",this.value=t,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return gi(this.value)+"("}}class Bh extends dr{constructor(t){super(),this.tokenType="AT-KEYWORD",this.value=t}toString(){return"AT("+this.value+")"}toSource(){return"@"+gi(this.value)}}class Vh extends dr{constructor(t){super(),this.tokenType="HASH",this.value=t,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t}toSource(){return this.type==="id"?"#"+gi(this.value):"#"+j0(this.value)}}class Wh extends dr{constructor(t){super(),this.tokenType="STRING",this.value=t}toString(){return'"'+Kh(this.value)+'"'}}class qh extends dr{constructor(t){super(),this.tokenType="URL",this.value=t}toString(){return"URL("+this.value+")"}toSource(){return'url("'+Kh(this.value)+'")'}}class Xh extends te{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const t=super.toJSON();return t.value=this.value,t.type=this.type,t.repr=this.repr,t}toSource(){return this.repr}}class Qh extends te{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.repr=this.repr,t}toSource(){return this.repr+"%"}}class A0 extends te{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t.repr=this.repr,t.unit=this.unit,t}toSource(){const t=this.repr;let n=gi(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||re(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),t+n}}function gi(e){e=""+e;let t="";const n=e.charCodeAt(0);for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(i===0)throw new Xa("Invalid character: the input contains U+0000.");re(i,1,31)||i===127||r===0&&re(i,48,57)||r===1&&re(i,48,57)&&n===45?t+="\\"+i.toString(16)+" ":i>=128||i===45||i===95||re(i,48,57)||re(i,65,90)||re(i,97,122)?t+=e[r]:t+="\\"+e[r]}return t}function j0(e){e=""+e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r===0)throw new Xa("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||re(r,48,57)||re(r,65,90)||re(r,97,122)?t+=e[n]:t+="\\"+r.toString(16)+" "}return t}function Kh(e){e=""+e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r===0)throw new Xa("Invalid character: the input contains U+0000.");re(r,1,31)||r===127?t+="\\"+r.toString(16)+" ":r===34||r===92?t+="\\"+e[n]:t+=e[n]}return t}class Pe extends Error{}function M0(e,t){let n;try{n=T0(e),n[n.length-1]instanceof os||n.push(new os)}catch(_){const T=_.message+` while parsing selector "${e}"`,j=(_.stack||"").indexOf(_.message);throw j!==-1&&(_.stack=_.stack.substring(0,j)+T+_.stack.substring(j+_.message.length)),_.message=T,_}const r=n.find(_=>_ instanceof Bh||_ instanceof Ah||_ instanceof ss||_ instanceof Hh||_ instanceof jh||_ instanceof Mh||_ instanceof Ph||_ instanceof $h||_ instanceof Oh||_ instanceof qh||_ instanceof Qh);if(r)throw new Pe(`Unsupported token "${r.toSource()}" while parsing selector "${e}"`);let i=0;const s=new Set;function o(){return new Pe(`Unexpected token "${n[i].toSource()}" while parsing selector "${e}"`)}function l(){for(;n[i]instanceof Hl;)i++}function a(_=i){return n[_]instanceof Uh}function u(_=i){return n[_]instanceof Wh}function c(_=i){return n[_]instanceof Xh}function p(_=i){return n[_]instanceof Rh}function f(_=i){return n[_]instanceof Dh}function g(_=i){return n[_]instanceof Fh}function y(_=i){return n[_]instanceof ls}function w(_=i){return n[_]instanceof ye&&n[_].value==="*"}function x(_=i){return n[_]instanceof os}function h(_=i){return n[_]instanceof ye&&[">","+","~"].includes(n[_].value)}function m(_=i){return p(_)||g(_)||x(_)||h(_)||n[_]instanceof Hl}function v(){const _=[S()];for(;l(),!!p();)i++,_.push(S());return _}function S(){return l(),c()||u()?n[i++].value:N()}function N(){const _={simples:[]};for(l(),h()?_.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):_.simples.push({selector:E(),combinator:""});;){if(l(),h())_.simples[_.simples.length-1].combinator=n[i++].value,l();else if(m())break;_.simples.push({combinator:"",selector:E()})}return _}function E(){let _="";const T=[];for(;!m();)if(a()||w())_+=n[i++].toSource();else if(n[i]instanceof Vh)_+=n[i++].toSource();else if(n[i]instanceof ye&&n[i].value===".")if(i++,a())_+="."+n[i++].toSource();else throw o();else if(n[i]instanceof Ih)if(i++,a())if(!t.has(n[i].value.toLowerCase()))_+=":"+n[i++].toSource();else{const j=n[i++].value.toLowerCase();T.push({name:j,args:[]}),s.add(j)}else if(y()){const j=n[i++].value.toLowerCase();if(t.has(j)?(T.push({name:j,args:v()}),s.add(j)):_+=`:${j}(${C()})`,l(),!g())throw o();i++}else throw o();else if(n[i]instanceof zh){for(_+="[",i++;!(n[i]instanceof Ul)&&!x();)_+=n[i++].toSource();if(!(n[i]instanceof Ul))throw o();_+="]",i++}else throw o();if(!_&&!T.length)throw o();return{css:_||void 0,functions:T}}function C(){let _="",T=1;for(;!x()&&((f()||y())&&T++,g()&&T--,!!T);)_+=n[i++].toSource();return _}const A=v();if(!x())throw o();if(A.some(_=>typeof _!="object"||!("simples"in _)))throw new Pe(`Error while parsing selector "${e}"`);return{selector:A,names:Array.from(s)}}const Bl=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),I0=new Set(["left-of","right-of","above","below","near"]),Gh=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 oo(e){const t=$0(e),n=[];for(const r of t.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const i=M0(r.body,Gh);n.push({name:"css",body:i.selector,source:r.body});continue}if(Bl.has(r.name)){let i,s;try{const u=JSON.parse("["+r.body+"]");if(!Array.isArray(u)||u.length<1||u.length>2||typeof u[0]!="string")throw new Pe(`Malformed selector: ${r.name}=`+r.body);if(i=u[0],u.length===2){if(typeof u[1]!="number"||!I0.has(r.name))throw new Pe(`Malformed selector: ${r.name}=`+r.body);s=u[1]}}catch{throw new Pe(`Malformed selector: ${r.name}=`+r.body)}const o={name:r.name,source:r.body,body:{parsed:oo(i),distance:s}},l=[...o.body.parsed.parts].reverse().find(u=>u.name==="internal:control"&&u.body==="enter-frame"),a=l?o.body.parsed.parts.indexOf(l):-1;a!==-1&&P0(o.body.parsed.parts.slice(0,a+1),n.slice(0,a+1))&&o.body.parsed.parts.splice(0,a+1),n.push(o);continue}n.push({...r,source:r.body})}if(Bl.has(n[0].name))throw new Pe(`"${n[0].name}" selector cannot be first`);return{capture:t.capture,parts:n}}function P0(e,t){return Sn({parts:e})===Sn({parts:t})}function Sn(e,t){return typeof e=="string"?e:e.parts.map((n,r)=>{let i=!0;!t&&r!==e.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(i=!1);const s=i?n.name+"=":"";return`${r===e.capture?"*":""}${s}${n.source}`}).join(" >> ")}function R0(e,t){const n=(r,i)=>{for(const s of r.parts)t(s,i),Bl.has(s.name)&&n(s.body.parsed,!0)};n(e,!1)}function $0(e){let t=0,n,r=0;const i={parts:[]},s=()=>{const l=e.substring(r,t).trim(),a=l.indexOf("=");let u,c;a!==-1&&l.substring(0,a).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(u=l.substring(0,a).trim(),c=l.substring(a+1)):l.length>1&&l[0]==='"'&&l[l.length-1]==='"'||l.length>1&&l[0]==="'"&&l[l.length-1]==="'"?(u="text",c=l):/^\(*\/\//.test(l)||l.startsWith("..")?(u="xpath",c=l):(u="css",c=l);let p=!1;if(u[0]==="*"&&(p=!0,u=u.substring(1)),i.parts.push({name:u,body:c}),p){if(i.capture!==void 0)throw new Pe("Only one of the selectors can capture using * modifier");i.capture=i.parts.length-1}};if(!e.includes(">>"))return t=e.length,s(),i;const o=()=>{const a=e.substring(r,t).match(/^\s*text\s*=(.*)$/);return!!a&&!!a[1]};for(;t<e.length;){const l=e[t];l==="\\"&&t+1<e.length?t+=2:l===n?(n=void 0,t++):!n&&(l==='"'||l==="'"||l==="`")&&!o()?(n=l,t++):!n&&l===">"&&e[t+1]===">"?(s(),t+=2,r=t):t++}return s(),i}function mn(e,t){let n=0,r=e.length===0;const i=()=>e[n]||"",s=()=>{const x=i();return++n,r=n>=e.length,x},o=x=>{throw r?new Pe(`Unexpected end of selector while parsing selector \`${e}\``):new Pe(`Error while parsing selector \`${e}\` - unexpected symbol "${i()}" at position ${n}`+(x?" during "+x:""))};function l(){for(;!r&&/\s/.test(i());)s()}function a(x){return x>=""||x>="0"&&x<="9"||x>="A"&&x<="Z"||x>="a"&&x<="z"||x>="0"&&x<="9"||x==="_"||x==="-"}function u(){let x="";for(l();!r&&a(i());)x+=s();return x}function c(x){let h=s();for(h!==x&&o("parsing quoted string");!r&&i()!==x;)i()==="\\"&&s(),h+=s();return i()!==x&&o("parsing quoted string"),h+=s(),h}function p(){s()!=="/"&&o("parsing regular expression");let x="",h=!1;for(;!r;){if(i()==="\\")x+=s(),r&&o("parsing regular expression");else if(h&&i()==="]")h=!1;else if(!h&&i()==="[")h=!0;else if(!h&&i()==="/")break;x+=s()}s()!=="/"&&o("parsing regular expression");let m="";for(;!r&&i().match(/[dgimsuy]/);)m+=s();try{return new RegExp(x,m)}catch(v){throw new Pe(`Error while parsing selector \`${e}\`: ${v.message}`)}}function f(){let x="";return l(),i()==="'"||i()==='"'?x=c(i()).slice(1,-1):x=u(),x||o("parsing property path"),x}function g(){l();let x="";return r||(x+=s()),!r&&x!=="="&&(x+=s()),["=","*=","^=","$=","|=","~="].includes(x)||o("parsing operator"),x}function y(){s();const x=[];for(x.push(f()),l();i()===".";)s(),x.push(f()),l();if(i()==="]")return s(),{name:x.join("."),jsonPath:x,op:"<truthy>",value:null,caseSensitive:!1};const h=g();let m,v=!0;if(l(),i()==="/"){if(h!=="=")throw new Pe(`Error while parsing selector \`${e}\` - cannot use ${h} in attribute with regular expression`);m=p()}else if(i()==="'"||i()==='"')m=c(i()).slice(1,-1),l(),i()==="i"||i()==="I"?(v=!1,s()):(i()==="s"||i()==="S")&&(v=!0,s());else{for(m="";!r&&(a(i())||i()==="+"||i()===".");)m+=s();m==="true"?m=!0:m==="false"?m=!1:t||(m=+m,Number.isNaN(m)&&o("parsing attribute value"))}if(l(),i()!=="]"&&o("parsing attribute value"),s(),h!=="="&&typeof m!="string")throw new Pe(`Error while parsing selector \`${e}\` - cannot use ${h} in attribute with non-string matching value - ${m}`);return{name:x.join("."),jsonPath:x,op:h,value:m,caseSensitive:v}}const w={name:"",attributes:[]};for(w.name=u(),l();i()==="[";)w.attributes.push(y()),l();if(r||o(void 0),!w.name&&!w.attributes.length)throw new Pe(`Error while parsing selector \`${e}\` - selector cannot be empty`);return w}function Yt(e,t,n=!1){return Yh(e,t,n)[0]}function Yh(e,t,n=!1,r=20,i){try{return Mn(new B0[e](i),oo(t),n,r)}catch{return[t]}}function Mn(e,t,n=!1,r=20){const i=[...t.parts];for(let l=0;l<i.length-1;l++)if(i[l].name==="nth"&&i[l+1].name==="internal:control"&&i[l+1].body==="enter-frame"){const[a]=i.splice(l,1);i.splice(l+1,0,a)}const s=[];let o=n?"frame-locator":"page";for(let l=0;l<i.length;l++){const a=i[l],u=o;if(o="locator",a.name==="nth"){a.body==="0"?s.push([e.generateLocator(u,"first",""),e.generateLocator(u,"nth","0")]):a.body==="-1"?s.push([e.generateLocator(u,"last",""),e.generateLocator(u,"nth","-1")]):s.push([e.generateLocator(u,"nth",a.body)]);continue}if(a.name==="internal:text"){const{exact:w,text:x}=Nr(a.body);s.push([e.generateLocator(u,"text",x,{exact:w})]);continue}if(a.name==="internal:has-text"){const{exact:w,text:x}=Nr(a.body);if(!w){s.push([e.generateLocator(u,"has-text",x,{exact:w})]);continue}}if(a.name==="internal:has-not-text"){const{exact:w,text:x}=Nr(a.body);if(!w){s.push([e.generateLocator(u,"has-not-text",x,{exact:w})]);continue}}if(a.name==="internal:has"){const w=Mn(e,a.body.parsed,!1,r);s.push(w.map(x=>e.generateLocator(u,"has",x)));continue}if(a.name==="internal:has-not"){const w=Mn(e,a.body.parsed,!1,r);s.push(w.map(x=>e.generateLocator(u,"hasNot",x)));continue}if(a.name==="internal:and"){const w=Mn(e,a.body.parsed,!1,r);s.push(w.map(x=>e.generateLocator(u,"and",x)));continue}if(a.name==="internal:or"){const w=Mn(e,a.body.parsed,!1,r);s.push(w.map(x=>e.generateLocator(u,"or",x)));continue}if(a.name==="internal:chain"){const w=Mn(e,a.body.parsed,!1,r);s.push(w.map(x=>e.generateLocator(u,"chain",x)));continue}if(a.name==="internal:label"){const{exact:w,text:x}=Nr(a.body);s.push([e.generateLocator(u,"label",x,{exact:w})]);continue}if(a.name==="internal:role"){const w=mn(a.body,!0),x={attrs:[]};for(const h of w.attributes)h.name==="name"?(x.exact=h.caseSensitive,x.name=h.value):(h.name==="level"&&typeof h.value=="string"&&(h.value=+h.value),x.attrs.push({name:h.name==="include-hidden"?"includeHidden":h.name,value:h.value}));s.push([e.generateLocator(u,"role",w.name,x)]);continue}if(a.name==="internal:testid"){const w=mn(a.body,!0),{value:x}=w.attributes[0];s.push([e.generateLocator(u,"test-id",x)]);continue}if(a.name==="internal:attr"){const w=mn(a.body,!0),{name:x,value:h,caseSensitive:m}=w.attributes[0],v=h,S=!!m;if(x==="placeholder"){s.push([e.generateLocator(u,"placeholder",v,{exact:S})]);continue}if(x==="alt"){s.push([e.generateLocator(u,"alt",v,{exact:S})]);continue}if(x==="title"){s.push([e.generateLocator(u,"title",v,{exact:S})]);continue}}let c="default";const p=i[l+1];p&&p.name==="internal:control"&&p.body==="enter-frame"&&(c="frame",o="frame-locator",l++);const f=Sn({parts:[a]}),g=e.generateLocator(u,c,f);if(c==="default"&&p&&["internal:has-text","internal:has-not-text"].includes(p.name)){const{exact:w,text:x}=Nr(p.body);if(!w){const h=e.generateLocator("locator",p.name==="internal:has-text"?"has-text":"has-not-text",x,{exact:w}),m={};p.name==="internal:has-text"?m.hasText=x:m.hasNotText=x;const v=e.generateLocator(u,"default",f,m);s.push([e.chainLocators([g,h]),v]),l++;continue}}let y;if(["xpath","css"].includes(a.name)){const w=Sn({parts:[a]},!0);y=e.generateLocator(u,c,w)}s.push([g,y].filter(Boolean))}return O0(e,s,r)}function O0(e,t,n){const r=t.map(()=>""),i=[],s=o=>{if(o===t.length)return i.push(e.chainLocators(r)),r.length<n;for(const l of t[o])if(r[o]=l,!s(o+1))return!1;return!0};return s(0),i}function Nr(e){let t=!1;const n=e.match(/^\/(.*)\/([igm]*)$/);return n?{text:new RegExp(n[1],n[2])}:(e.endsWith('"')?(e=JSON.parse(e),t=!0):e.endsWith('"s')?(e=JSON.parse(e.substring(0,e.length-1)),t=!0):e.endsWith('"i')&&(e=JSON.parse(e.substring(0,e.length-1)),t=!1),{exact:t,text:e})}class z0{constructor(t){this.preferredQuote=t}generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(i.hasText)} })`:i.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(i.hasNotText)} })`:`locator(${this.quote(r)})`;case"frame":return`frameLocator(${this.quote(r)})`;case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"role":const s=[];fe(i.name)?s.push(`name: ${this.regexToSourceString(i.name)}`):typeof i.name=="string"&&(s.push(`name: ${this.quote(i.name)}`),i.exact&&s.push("exact: true"));for(const{name:l,value:a}of i.attrs)s.push(`${l}: ${typeof a=="string"?this.quote(a):a}`);const o=s.length?`, { ${s.join(", ")} }`:"";return`getByRole(${this.quote(r)}${o})`;case"has-text":return`filter({ hasText: ${this.toHasText(r)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(r)} })`;case"has":return`filter({ has: ${r} })`;case"hasNot":return`filter({ hasNot: ${r} })`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("getByText",r,!!i.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact("getByLabel",r,!!i.exact);case"title":return this.toCallWithExact("getByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToSourceString(t){return so(String(t))}toCallWithExact(t,n,r){return fe(n)?`${t}(${this.regexToSourceString(n)})`:r?`${t}(${this.quote(n)}, { exact: true })`:`${t}(${this.quote(n)})`}toHasText(t){return fe(t)?this.regexToSourceString(t):this.quote(t)}toTestIdValue(t){return fe(t)?this.regexToSourceString(t):this.quote(t)}quote(t){return io(t,this.preferredQuote??"'")}}class D0{generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(i.hasText)})`:i.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(i.hasNotText)})`:`locator(${this.quote(r)})`;case"frame":return`frame_locator(${this.quote(r)})`;case"nth":return`nth(${r})`;case"first":return"first";case"last":return"last";case"role":const s=[];fe(i.name)?s.push(`name=${this.regexToString(i.name)}`):typeof i.name=="string"&&(s.push(`name=${this.quote(i.name)}`),i.exact&&s.push("exact=True"));for(const{name:l,value:a}of i.attrs){let u=typeof a=="string"?this.quote(a):a;typeof a=="boolean"&&(u=a?"True":"False"),s.push(`${Ch(l)}=${u}`)}const o=s.length?`, ${s.join(", ")}`:"";return`get_by_role(${this.quote(r)}${o})`;case"has-text":return`filter(has_text=${this.toHasText(r)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(r)})`;case"has":return`filter(has=${r})`;case"hasNot":return`filter(has_not=${r})`;case"and":return`and_(${r})`;case"or":return`or_(${r})`;case"chain":return`locator(${r})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("get_by_text",r,!!i.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!i.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!i.exact);case"label":return this.toCallWithExact("get_by_label",r,!!i.exact);case"title":return this.toCallWithExact("get_by_title",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${so(t.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${n})`}toCallWithExact(t,n,r){return fe(n)?`${t}(${this.regexToString(n)})`:r?`${t}(${this.quote(n)}, exact=True)`:`${t}(${this.quote(n)})`}toHasText(t){return fe(t)?this.regexToString(t):`${this.quote(t)}`}toTestIdValue(t){return fe(t)?this.regexToString(t):this.quote(t)}quote(t){return io(t,'"')}}class F0{generateLocator(t,n,r,i={}){let s;switch(t){case"page":s="Page";break;case"frame-locator":s="FrameLocator";break;case"locator":s="Locator";break}switch(n){case"default":return i.hasText!==void 0?`locator(${this.quote(r)}, new ${s}.LocatorOptions().setHasText(${this.toHasText(i.hasText)}))`:i.hasNotText!==void 0?`locator(${this.quote(r)}, new ${s}.LocatorOptions().setHasNotText(${this.toHasText(i.hasNotText)}))`:`locator(${this.quote(r)})`;case"frame":return`frameLocator(${this.quote(r)})`;case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"role":const o=[];fe(i.name)?o.push(`.setName(${this.regexToString(i.name)})`):typeof i.name=="string"&&(o.push(`.setName(${this.quote(i.name)})`),i.exact&&o.push(".setExact(true)"));for(const{name:a,value:u}of i.attrs)o.push(`.set${zs(a)}(${typeof u=="string"?this.quote(u):u})`);const l=o.length?`, new ${s}.GetByRoleOptions()${o.join("")}`:"";return`getByRole(AriaRole.${Ch(r).toUpperCase()}${l})`;case"has-text":return`filter(new ${s}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${s}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${s}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${s}.FilterOptions().setHasNot(${r}))`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact(s,"getByText",r,!!i.exact);case"alt":return this.toCallWithExact(s,"getByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact(s,"getByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact(s,"getByLabel",r,!!i.exact);case"title":return this.toCallWithExact(s,"getByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(so(t.source))}${n})`}toCallWithExact(t,n,r,i){return fe(r)?`${n}(${this.regexToString(r)})`:i?`${n}(${this.quote(r)}, new ${t}.${zs(n)}Options().setExact(true))`:`${n}(${this.quote(r)})`}toHasText(t){return fe(t)?this.regexToString(t):this.quote(t)}toTestIdValue(t){return fe(t)?this.regexToString(t):this.quote(t)}quote(t){return io(t,'"')}}class H0{generateLocator(t,n,r,i={}){switch(n){case"default":return i.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(i.hasText)} })`:i.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(i.hasNotText)} })`:`Locator(${this.quote(r)})`;case"frame":return`FrameLocator(${this.quote(r)})`;case"nth":return`Nth(${r})`;case"first":return"First";case"last":return"Last";case"role":const s=[];fe(i.name)?s.push(`NameRegex = ${this.regexToString(i.name)}`):typeof i.name=="string"&&(s.push(`Name = ${this.quote(i.name)}`),i.exact&&s.push("Exact = true"));for(const{name:l,value:a}of i.attrs)s.push(`${zs(l)} = ${typeof a=="string"?this.quote(a):a}`);const o=s.length?`, new() { ${s.join(", ")} }`:"";return`GetByRole(AriaRole.${zs(r)}${o})`;case"has-text":return`Filter(new() { ${this.toHasText(r)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(r)} })`;case"has":return`Filter(new() { Has = ${r} })`;case"hasNot":return`Filter(new() { HasNot = ${r} })`;case"and":return`And(${r})`;case"or":return`Or(${r})`;case"chain":return`Locator(${r})`;case"test-id":return`GetByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("GetByText",r,!!i.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!i.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!i.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!i.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!i.exact);default:throw new Error("Unknown selector kind "+n)}}chainLocators(t){return t.join(".")}regexToString(t){const n=t.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(so(t.source))}${n})`}toCallWithExact(t,n,r){return fe(n)?`${t}(${this.regexToString(n)})`:r?`${t}(${this.quote(n)}, new() { Exact = true })`:`${t}(${this.quote(n)})`}toHasText(t){return fe(t)?`HasTextRegex = ${this.regexToString(t)}`:`HasText = ${this.quote(t)}`}toTestIdValue(t){return fe(t)?this.regexToString(t):this.quote(t)}toHasNotText(t){return fe(t)?`HasNotTextRegex = ${this.regexToString(t)}`:`HasNotText = ${this.quote(t)}`}quote(t){return io(t,'"')}}class U0{generateLocator(t,n,r,i={}){return JSON.stringify({kind:n,body:r,options:i})}chainLocators(t){const n=t.map(r=>JSON.parse(r));for(let r=0;r<n.length-1;++r)n[r].next=n[r+1];return JSON.stringify(n[0])}}const B0={javascript:z0,python:D0,java:F0,csharp:H0,jsonl:U0};function fe(e){return e instanceof RegExp}const Ac=new Map;function vi({name:e,items:t=[],id:n,render:r,icon:i,isError:s,isWarning:o,isInfo:l,indent:a,selectedItem:u,onAccepted:c,onSelected:p,onLeftArrow:f,onRightArrow:g,onHighlighted:y,onIconClicked:w,noItemsMessage:x,dataTestId:h,notSelectable:m}){const v=b.useRef(null),[S,N]=b.useState();return b.useEffect(()=>{y==null||y(S)},[y,S]),b.useEffect(()=>{const E=v.current;if(!E)return;const C=()=>{Ac.set(e,E.scrollTop)};return E.addEventListener("scroll",C,{passive:!0}),()=>E.removeEventListener("scroll",C)},[e]),b.useEffect(()=>{v.current&&(v.current.scrollTop=Ac.get(e)||0)},[e]),d.jsx("div",{className:Ne("list-view vbox",e+"-list-view"),role:t.length>0?"list":void 0,"data-testid":h||e+"-list",children:d.jsxs("div",{className:Ne("list-view-content",m&&"not-selectable"),tabIndex:0,onKeyDown:E=>{var T;if(u&&E.key==="Enter"){c==null||c(u,t.indexOf(u));return}if(E.key!=="ArrowDown"&&E.key!=="ArrowUp"&&E.key!=="ArrowLeft"&&E.key!=="ArrowRight")return;if(E.stopPropagation(),E.preventDefault(),u&&E.key==="ArrowLeft"){f==null||f(u,t.indexOf(u));return}if(u&&E.key==="ArrowRight"){g==null||g(u,t.indexOf(u));return}const C=u?t.indexOf(u):-1;let A=C;E.key==="ArrowDown"&&(C===-1?A=0:A=Math.min(C+1,t.length-1)),E.key==="ArrowUp"&&(C===-1?A=t.length-1:A=Math.max(C-1,0));const _=(T=v.current)==null?void 0:T.children.item(A);V0(_||void 0),y==null||y(void 0),p==null||p(t[A],A),N(void 0)},ref:v,children:[x&&t.length===0&&d.jsx("div",{className:"list-view-empty",children:x}),t.map((E,C)=>{const A=(a==null?void 0:a(E,C))||0,_=r(E,C);return d.jsxs("div",{onDoubleClick:()=>c==null?void 0:c(E,C),role:"listitem",className:Ne("list-view-entry",u===E&&"selected",!m&&S===E&&"highlighted",(s==null?void 0:s(E,C))&&"error",(o==null?void 0:o(E,C))&&"warning",(l==null?void 0:l(E,C))&&"info"),onClick:()=>p==null?void 0:p(E,C),onMouseEnter:()=>N(E),onMouseLeave:()=>N(void 0),children:[A?new Array(A).fill(0).map(()=>d.jsx("div",{className:"list-view-indent"})):void 0,i&&d.jsx("div",{className:"codicon "+(i(E,C)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:T=>{T.preventDefault(),T.stopPropagation()},onClick:T=>{T.stopPropagation(),T.preventDefault(),w==null||w(E,C)}}),typeof _=="string"?d.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:_}):_]},(n==null?void 0:n(E,C))||C)})]})})}function V0(e){e&&(e!=null&&e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e==null||e.scrollIntoView())}const W0=vi;function q0({name:e,rootItem:t,render:n,icon:r,isError:i,isVisible:s,selectedItem:o,onAccepted:l,onSelected:a,onHighlighted:u,treeState:c,setTreeState:p,noItemsMessage:f,dataTestId:g,autoExpandDepth:y}){const w=b.useMemo(()=>X0(t,o,c.expandedItems,y||0),[t,o,c,y]),x=b.useMemo(()=>{if(!s)return[...w.keys()];const h=new Map,m=S=>{const N=h.get(S);if(N!==void 0)return N;let E=S.children.some(A=>m(A));for(const A of S.children){const _=m(A);E=E||_}const C=s(S)||E;return h.set(S,C),C};for(const S of w.keys())m(S);const v=[];for(const S of w.keys())s(S)&&v.push(S);return v},[w,s]);return d.jsx(W0,{name:e,items:x,id:h=>h.id,dataTestId:g||e+"-tree",render:h=>{const m=n(h);return d.jsxs(d.Fragment,{children:[r&&d.jsx("div",{className:"codicon "+(r(h)||"blank"),style:{minWidth:16,marginRight:4}}),typeof m=="string"?d.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:m}):m]})},icon:h=>{const m=w.get(h).expanded;if(typeof m=="boolean")return m?"codicon-chevron-down":"codicon-chevron-right"},isError:h=>(i==null?void 0:i(h))||!1,indent:h=>w.get(h).depth,selectedItem:o,onAccepted:h=>l==null?void 0:l(h),onSelected:h=>a==null?void 0:a(h),onHighlighted:h=>u==null?void 0:u(h),onLeftArrow:h=>{const{expanded:m,parent:v}=w.get(h);m?(c.expandedItems.set(h.id,!1),p({...c})):v&&(a==null||a(v))},onRightArrow:h=>{h.children.length&&(c.expandedItems.set(h.id,!0),p({...c}))},onIconClicked:h=>{const{expanded:m}=w.get(h);if(m){for(let v=o;v;v=v.parent)if(v===h){a==null||a(h);break}c.expandedItems.set(h.id,!1)}else c.expandedItems.set(h.id,!0);p({...c})},noItemsMessage:f})}function X0(e,t,n,r){const i=new Map,s=new Set;for(let l=t==null?void 0:t.parent;l;l=l.parent)s.add(l.id);const o=(l,a)=>{for(const u of l.children){const c=s.has(u.id)||n.get(u.id),p=r>a&&i.size<25&&c!==!1,f=u.children.length?c??p:void 0;i.set(u,{depth:a,expanded:f,parent:e===l?null:l}),f&&o(u,a+1)}};return o(e,0),i}const Q0=q0,K0=({actions:e,selectedAction:t,selectedTime:n,setSelectedTime:r,sdkLanguage:i,onSelected:s,onHighlighted:o,revealConsole:l,isLive:a})=>{const[u,c]=b.useState({expandedItems:new Map}),{rootItem:p,itemMap:f}=b.useMemo(()=>r0(e),[e]),{selectedItem:g}=b.useMemo(()=>({selectedItem:t?f.get(t.callId):void 0}),[f,t]);return d.jsxs("div",{className:"vbox",children:[n&&d.jsxs("div",{className:"action-list-show-all",onClick:()=>r(void 0),children:[d.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),d.jsx(Q0,{name:"actions",rootItem:p,treeState:u,setTreeState:c,selectedItem:g,onSelected:y=>s(y.action),onHighlighted:y=>o(y==null?void 0:y.action),onAccepted:y=>r({minimum:y.action.startTime,maximum:y.action.endTime}),isError:y=>{var w,x;return!!((x=(w=y.action)==null?void 0:w.error)!=null&&x.message)},isVisible:y=>!n||y.action.startTime<=n.maximum&&y.action.endTime>=n.minimum,render:y=>Qa(y.action,{sdkLanguage:i,revealConsole:l,isLive:a,showDuration:!0,showBadges:!0})})]})},Qa=(e,t)=>{const{sdkLanguage:n,revealConsole:r,isLive:i,showDuration:s,showBadges:o}=t,{errors:l,warnings:a}=o0(e),u=e.params.selector?Yt(n||"javascript",e.params.selector):void 0;let c="";return e.endTime?c=et(e.endTime-e.startTime):e.error?c="Timed out":i||(c="-"),d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"action-title",title:e.apiName,children:[d.jsx("span",{children:e.apiName}),u&&d.jsx("div",{className:"action-selector",title:u,children:u}),e.method==="goto"&&e.params.url&&d.jsx("div",{className:"action-url",title:e.params.url,children:e.params.url}),e.class==="APIRequestContext"&&e.params.url&&d.jsx("div",{className:"action-url",title:e.params.url,children:G0(e.params.url)})]}),(s||o)&&d.jsx("div",{className:"spacer"}),s&&d.jsx("div",{className:"action-duration",children:c||d.jsx("span",{className:"codicon codicon-loading"})}),o&&d.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!l&&d.jsxs("div",{className:"action-icon",children:[d.jsx("span",{className:"codicon codicon-error"}),d.jsx("span",{className:"action-icon-value",children:l})]}),!!a&&d.jsxs("div",{className:"action-icon",children:[d.jsx("span",{className:"codicon codicon-warning"}),d.jsx("span",{className:"action-icon-value",children:a})]})]})]})};function G0(e){try{const t=new URL(e);return t.pathname+t.search}catch{return e}}const Jh=({value:e,description:t})=>{const[n,r]=b.useState("copy"),i=b.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},[e]);return d.jsx(en,{title:t||"Copy",icon:n,onClick:i})},kn=({text:e})=>d.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:e}),Y0=({action:e,sdkLanguage:t})=>{if(!e)return d.jsx(kn,{text:"No action selected"});const n={...e.params};delete n.info;const r=Object.keys(n),i=e.startTime+(e.context.wallTime-e.context.startTime),s=new Date(i).toLocaleString(),o=e.endTime?et(e.endTime-e.startTime):"Timed Out";return d.jsxs("div",{className:"call-tab",children:[d.jsx("div",{className:"call-line",children:e.apiName}),d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"call-section",children:"Time"}),s&&d.jsxs("div",{className:"call-line",children:["wall time:",d.jsx("span",{className:"call-value datetime",title:s,children:s})]}),d.jsxs("div",{className:"call-line",children:["duration:",d.jsx("span",{className:"call-value datetime",title:o,children:o})]})]}),!!r.length&&d.jsx("div",{className:"call-section",children:"Parameters"}),!!r.length&&r.map((l,a)=>jc(Mc(e,l,n[l],t),"param-"+a)),!!e.result&&d.jsx("div",{className:"call-section",children:"Return value"}),!!e.result&&Object.keys(e.result).map((l,a)=>jc(Mc(e,l,e.result[l],t),"result-"+a))]})};function jc(e,t){let n=e.text.replace(/\n/g,"↵");return e.type==="string"&&(n=`"${n}"`),d.jsxs("div",{className:"call-line",children:[e.name,":",d.jsx("span",{className:Ne("call-value",e.type),title:e.text,children:n}),["string","number","object","locator"].includes(e.type)&&d.jsx(Jh,{value:e.text})]},t)}function Mc(e,t,n,r){const i=e.method.includes("eval")||e.method==="waitForFunction";if(t==="files")return{text:"<files>",type:"string",name:t};if((t==="eventInit"||t==="expectedValue"||t==="arg"&&i)&&(n=Ds(n.value,new Array(10).fill({handle:"<handle>"}))),(t==="value"&&i||t==="received"&&e.method==="expect")&&(n=Ds(n,new Array(10).fill({handle:"<handle>"}))),t==="selector")return{text:Yt(r||"javascript",e.params.selector),type:"locator",name:"locator"};const s=typeof n;return s!=="object"||n===null?{text:String(n),type:s,name:t}:n.guid?{text:"<handle>",type:"handle",name:t}:{text:JSON.stringify(n).slice(0,1e3),type:"object",name:t}}function Ds(e,t){if(e.n!==void 0)return e.n;if(e.s!==void 0)return e.s;if(e.b!==void 0)return e.b;if(e.v!==void 0){if(e.v==="undefined")return;if(e.v==="null")return null;if(e.v==="NaN")return NaN;if(e.v==="Infinity")return 1/0;if(e.v==="-Infinity")return-1/0;if(e.v==="-0")return-0}if(e.d!==void 0)return new Date(e.d);if(e.r!==void 0)return new RegExp(e.r.p,e.r.f);if(e.a!==void 0)return e.a.map(n=>Ds(n,t));if(e.o!==void 0){const n={};for(const{k:r,v:i}of e.o)n[r]=Ds(i,t);return n}return e.h!==void 0?t===void 0?"<object>":t[e.h]:"<object>"}const J0=vi,Z0=({action:e,isLive:t})=>{const n=b.useMemo(()=>{var o;if(!e||!e.log.length)return[];const r=e.log,i=e.context.wallTime-e.context.startTime,s=[];for(let l=0;l<r.length;++l){let a="";if(r[l].time!==-1){const u=(o=r[l])==null?void 0:o.time;l+1<r.length?a=et(r[l+1].time-u):e.endTime>0?a=et(e.endTime-u):t?a=et(Date.now()-i-u):a="-"}s.push({message:r[l].message,time:a})}return s},[e,t]);return n.length?d.jsx(J0,{name:"log",items:n,render:r=>d.jsxs("div",{className:"log-list-item",children:[d.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):d.jsx(kn,{text:"No log entries"})};function ci(e){const t=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,n=[];let r,i={};for(;(r=t.exec(e))!==null;){const[,,s,,o]=r;if(s){const l=+s;switch(l){case 0:i={};break;case 1:i["font-weight"]="bold";break;case 3:i["font-style"]="italic";break;case 4:i["text-decoration"]="underline";break;case 8:i.display="none";break;case 9:i["text-decoration"]="line-through";break;case 22:i={...i,"font-weight":void 0,"font-style":void 0,"text-decoration":void 0};break;case 23:i={...i,"font-weight":void 0,"font-style":void 0};break;case 24:i={...i,"text-decoration":void 0};break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:i.color=Ic[l-30];break;case 39:i={...i,color:void 0};break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:i["background-color"]=Ic[l-40];break;case 49:i={...i,"background-color":void 0};break;case 53:i["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:i.color=Pc[l-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:i["background-color"]=Pc[l-100];break}}else o&&n.push(`<span style="${ty(i)}">${ey(o)}</span>`)}return n.join("")}const Ic={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)"},Pc={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 ey(e){return e.replace(/[&"<>]/g,t=>({"&":"&",'"':""","<":"<",">":">"})[t])}function ty(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}const ny=({error:e})=>{const t=b.useMemo(()=>ci(e),[e]);return d.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:t||""}})};function ry(e){return b.useMemo(()=>{if(!e)return{errors:new Map};const t=new Map;for(const n of e.errorDescriptors)t.set(n.message,n);return{errors:t}},[e])}const iy=({errorsModel:e,sdkLanguage:t,revealInSource:n})=>e.errors.size?d.jsx("div",{className:"fill",style:{overflow:"auto"},children:[...e.errors.entries()].map(([r,i])=>{var a;let s,o;const l=(a=i.stack)==null?void 0:a[0];return l&&(s=l.file.replace(/.*[/\\](.*)/,"$1")+":"+l.line,o=l.file+":"+l.line),d.jsxs("div",{children:[d.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)"},children:[i.action&&Qa(i.action,{sdkLanguage:t}),s&&d.jsxs("div",{className:"action-location",children:["@ ",d.jsx("span",{title:o,onClick:()=>n(i),children:s})]})]}),d.jsx(ny,{error:r})]},r)})}):d.jsx(kn,{text:"No errors"}),sy=vi;function oy(e,t){const{entries:n}=b.useMemo(()=>{if(!e)return{entries:[]};const i=[];for(const s of e.events){if(s.type==="console"){const o=s.args&&s.args.length?ay(s.args):Zh(s.text),l=s.location.url,u=`${l?l.substring(l.lastIndexOf("/")+1):"<anonymous>"}:${s.location.lineNumber}`;i.push({browserMessage:{body:o,location:u},isError:s.messageType==="error",isWarning:s.messageType==="warning",timestamp:s.time})}s.type==="event"&&s.method==="pageError"&&i.push({browserError:s.params.error,isError:!0,isWarning:!1,timestamp:s.time})}for(const s of e.stdio){let o="";s.text&&(o=ci(s.text.trim())||""),s.base64&&(o=ci(atob(s.base64).trim())||""),i.push({nodeMessage:{html:o},isError:s.type==="stderr",isWarning:!1,timestamp:s.timestamp})}return i.sort((s,o)=>s.timestamp-o.timestamp),{entries:i}},[e]);return{entries:b.useMemo(()=>t?n.filter(i=>i.timestamp>=t.minimum&&i.timestamp<=t.maximum):n,[n,t])}}const ly=({consoleModel:e,boundaries:t,onEntryHovered:n,onAccepted:r})=>e.entries.length?d.jsx("div",{className:"console-tab",children:d.jsx(sy,{name:"console",onAccepted:r,onHighlighted:n,items:e.entries,isError:i=>i.isError,isWarning:i=>i.isWarning,render:i=>{const s=et(i.timestamp-t.minimum),o=d.jsx("span",{className:"console-time",children:s}),l=i.isError?"status-error":i.isWarning?"status-warning":"status-none",a=i.browserMessage||i.browserError?d.jsx("span",{className:Ne("codicon","codicon-browser",l),title:"Browser message"}):d.jsx("span",{className:Ne("codicon","codicon-file",l),title:"Runner message"});let u,c,p,f;const{browserMessage:g,browserError:y,nodeMessage:w}=i;if(g&&(u=g.location,c=g.body),y){const{error:x,value:h}=y;x?(c=x.message,f=x.stack):c=String(h)}return w&&(p=w.html),d.jsxs("div",{className:"console-line",children:[o,a,u&&d.jsx("span",{className:"console-location",children:u}),c&&d.jsx("span",{className:"console-line-message",children:c}),p&&d.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:p}}),f&&d.jsx("div",{className:"console-stack",children:f})]})}})}):d.jsx(kn,{text:"No console entries"});function ay(e){if(e.length===1)return Zh(e[0].preview);const t=typeof e[0].value=="string"&&e[0].value.includes("%"),n=t?e[0].value:"",r=t?e.slice(1):e;let i=0;const s=/%([%sdifoOc])/g;let o;const l=[];let a=[];l.push(d.jsx("span",{children:a}));let u=0;for(;(o=s.exec(n))!==null;){const c=n.substring(u,o.index);a.push(d.jsx("span",{children:c})),u=o.index+2;const p=o[0][1];if(p==="%")a.push(d.jsx("span",{children:"%"}));else if(p==="s"||p==="o"||p==="O"||p==="d"||p==="i"||p==="f"){const f=r[i++],g={};typeof(f==null?void 0:f.value)!="string"&&(g.color="var(--vscode-debugTokenExpression-number)"),a.push(d.jsx("span",{style:g,children:(f==null?void 0:f.preview)||""}))}else if(p==="c"){a=[];const f=r[i++],g=f?uy(f.preview):{};l.push(d.jsx("span",{style:g,children:a}))}}for(u<n.length&&a.push(d.jsx("span",{children:n.substring(u)}));i<r.length;i++){const c=r[i],p={};a.length&&a.push(d.jsx("span",{children:" "})),typeof(c==null?void 0:c.value)!="string"&&(p.color="var(--vscode-debugTokenExpression-number)"),a.push(d.jsx("span",{style:p,children:(c==null?void 0:c.preview)||""}))}return l}function Zh(e){return[d.jsx("span",{dangerouslySetInnerHTML:{__html:ci(e.trim())}})]}function uy(e){try{const t={},n=e.split(";");for(const r of n){const i=r.trim();if(!i)continue;let[s,o]=i.split(":");if(s=s.trim(),o=o.trim(),!cy(s))continue;const l=s.replace(/-([a-z])/g,a=>a[1].toUpperCase());t[l]=o}return t}catch{return{}}}function cy(e){return["background","border","color","font","line","margin","padding","text"].some(n=>e.startsWith(n))}const Ka=({noShadow:e,children:t,noMinHeight:n,className:r,onClick:i})=>d.jsx("div",{className:Ne("toolbar",e&&"no-shadow",n&&"no-min-height",r),onClick:i,children:t}),Vl=({tabs:e,selectedTab:t,setSelectedTab:n,leftToolbar:r,rightToolbar:i,dataTestId:s,mode:o})=>(o||(o="default"),d.jsx("div",{className:"tabbed-pane","data-testid":s,children:d.jsxs("div",{className:"vbox",children:[d.jsxs(Ka,{children:[r&&d.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),o==="default"&&d.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},children:[...e.map(l=>d.jsx(ep,{id:l.id,title:l.title,count:l.count,errorCount:l.errorCount,selected:t===l.id,onSelect:n},l.id))]}),o==="select"&&d.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},children:d.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},onChange:l=>{n(e[l.currentTarget.selectedIndex].id)},children:e.map(l=>{let a="";return l.count&&(a=` (${l.count})`),l.errorCount&&(a=` (${l.errorCount})`),d.jsxs("option",{value:l.id,selected:l.id===t,children:[l.title,a]},l.id)})})}),i&&d.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...i]})]}),e.map(l=>{const a="tab-content tab-"+l.id;if(l.component)return d.jsx("div",{className:a,style:{display:t===l.id?"inherit":"none"},children:l.component},l.id);if(t===l.id)return d.jsx("div",{className:a,children:l.render()},l.id)})]})})),ep=({id:e,title:t,count:n,errorCount:r,selected:i,onSelect:s})=>d.jsxs("div",{className:Ne("tabbed-pane-tab",i&&"selected"),onClick:()=>s(e),title:t,children:[d.jsx("div",{className:"tabbed-pane-tab-label",children:t}),!!n&&d.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&d.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]},e),dy="modulepreload",fy=function(e,t){return new URL(e,t).href},Rc={},hy=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.all(n.map(a=>{if(a=fy(a,r),a in Rc)return;Rc[a]=!0;const u=a.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(!!r)for(let g=s.length-1;g>=0;g--){const y=s[g];if(y.href===a&&(!u||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":dy,u||(f.as="script",f.crossOrigin=""),f.href=a,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((g,y)=>{f.addEventListener("load",g),f.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},yi=({text:e,language:t,mimeType:n,linkify:r,readOnly:i,highlight:s,revealLine:o,lineNumbers:l,isFocused:a,focusOnChange:u,wrapLines:c,onChange:p})=>{const[f,g]=_n(),[y]=b.useState(hy(()=>import("./codeMirrorModule-CqYUz5ms.js"),__vite__mapDeps([0,1]),import.meta.url).then(m=>m.default)),w=b.useRef(null),[x,h]=b.useState();return b.useEffect(()=>{(async()=>{var E,C;const m=await y;my(m);const v=g.current;if(!v)return;const S=vy(t)||gy(n)||(r?"text/linkified":"");if(w.current&&S===w.current.cm.getOption("mode")&&!!i===w.current.cm.getOption("readOnly")&&l===w.current.cm.getOption("lineNumbers")&&c===w.current.cm.getOption("lineWrapping"))return;(C=(E=w.current)==null?void 0:E.cm)==null||C.getWrapperElement().remove();const N=m(v,{value:"",mode:S,readOnly:!!i,lineNumbers:l,lineWrapping:c});return w.current={cm:N},a&&N.focus(),h(N),N})()},[y,x,g,t,n,r,l,c,i,a]),b.useEffect(()=>{w.current&&w.current.cm.setSize(f.width,f.height)},[f]),b.useLayoutEffect(()=>{var S;if(!x)return;let m=!1;if(x.getValue()!==e&&(x.setValue(e),m=!0,u&&(x.execCommand("selectAll"),x.focus())),m||JSON.stringify(s)!==JSON.stringify(w.current.highlight)){for(const E of w.current.highlight||[])x.removeLineClass(E.line-1,"wrap");for(const E of s||[])x.addLineClass(E.line-1,"wrap",`source-line-${E.type}`);for(const E of w.current.widgets||[])x.removeLineWidget(E);const N=[];for(const E of s||[]){if(E.type!=="error")continue;const C=(S=w.current)==null?void 0:S.cm.getLine(E.line-1);if(C){const _=document.createElement("div");_.className="source-line-error-underline",_.innerHTML=" ".repeat(C.length||1),N.push(x.addLineWidget(E.line,_,{above:!0,coverGutter:!1}))}const A=document.createElement("div");A.innerHTML=ci(E.message||""),A.className="source-line-error-widget",N.push(x.addLineWidget(E.line,A,{above:!0,coverGutter:!1}))}w.current.highlight=s,w.current.widgets=N}typeof o=="number"&&w.current.cm.lineCount()>=o&&x.scrollIntoView({line:Math.max(0,o-1),ch:0},50);let v;return p&&(v=()=>p(x.getValue()),x.on("change",v)),()=>{v&&x.off("change",v)}},[x,e,s,o,u,p]),d.jsx("div",{className:"cm-wrapper",ref:g,onClick:py})};function py(e){var n;if(!(e.target instanceof HTMLElement))return;let t;e.target.classList.contains("cm-linkified")?t=e.target.textContent:e.target.classList.contains("cm-link")&&((n=e.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(t=e.target.nextElementSibling.textContent.slice(1,-1)),t&&(e.preventDefault(),e.stopPropagation(),window.open(t,"_blank"))}let $c=!1;function my(e){$c||($c=!0,e.defineSimpleMode("text/linkified",{start:[{regex:xd,token:"linkified"}]}))}function gy(e){if(e){if(e.includes("javascript")||e.includes("json"))return"javascript";if(e.includes("python"))return"python";if(e.includes("csharp"))return"text/x-csharp";if(e.includes("java"))return"text/x-java";if(e.includes("markdown"))return"markdown";if(e.includes("html")||e.includes("svg"))return"htmlmixed";if(e.includes("css"))return"css"}}function vy(e){if(e)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css"}[e]}const yy=({resource:e,onClose:t})=>{const[n,r]=b.useState("request");return d.jsx(Vl,{dataTestId:"network-request-details",leftToolbar:[d.jsx(en,{icon:"close",title:"Close",onClick:t},"close")],tabs:[{id:"request",title:"Request",render:()=>d.jsx(wy,{resource:e})},{id:"response",title:"Response",render:()=>d.jsx(xy,{resource:e})},{id:"body",title:"Body",render:()=>d.jsx(Sy,{resource:e})}],selectedTab:n,setSelectedTab:r})},wy=({resource:e})=>{const[t,n]=b.useState(null);return b.useEffect(()=>{(async()=>{if(e.request.postData){const i=e.request.headers.find(o=>o.name.toLowerCase()==="content-type"),s=i?i.value:"";if(e.request.postData._sha1){const o=await fetch(`sha1/${e.request.postData._sha1}`);n({text:Wl(await o.text(),s),mimeType:s})}else n({text:Wl(e.request.postData.text,s),mimeType:s})}else n(null)})()},[e]),d.jsxs("div",{className:"network-request-details-tab",children:[d.jsx("div",{className:"network-request-details-header",children:"General"}),d.jsx("div",{className:"network-request-details-url",children:`URL: ${e.request.url}`}),d.jsx("div",{className:"network-request-details-general",children:`Method: ${e.request.method}`}),e.response.status!==-1&&d.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",d.jsx("span",{className:Ey(e.response.status),style:{display:"inline-flex"},children:`${e.response.status} ${e.response.statusText}`})]}),e.request.queryString.length?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),d.jsx("div",{className:"network-request-details-headers",children:e.request.queryString.map(r=>`${r.name}: ${r.value}`).join(`
|
|
42
48
|
`)})]}):null,d.jsx("div",{className:"network-request-details-header",children:"Request Headers"}),d.jsx("div",{className:"network-request-details-headers",children:e.request.headers.map(r=>`${r.name}: ${r.value}`).join(`
|
|
43
49
|
`)}),t&&d.jsx("div",{className:"network-request-details-header",children:"Request Body"}),t&&d.jsx(yi,{text:t.text,mimeType:t.mimeType,readOnly:!0,lineNumbers:!0})]})},xy=({resource:e})=>d.jsxs("div",{className:"network-request-details-tab",children:[d.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),d.jsx("div",{className:"network-request-details-headers",children:e.response.headers.map(t=>`${t.name}: ${t.value}`).join(`
|
|
44
50
|
`)})]}),Sy=({resource:e})=>{const[t,n]=b.useState(null);return b.useEffect(()=>{(async()=>{if(e.response.content._sha1){const i=e.response.content.mimeType.includes("image"),s=e.response.content.mimeType.includes("font"),o=await fetch(`sha1/${e.response.content._sha1}`);if(i){const l=await o.blob(),a=new FileReader,u=new Promise(c=>a.onload=c);a.readAsDataURL(l),n({dataUrl:(await u).target.result})}else if(s){const l=await o.arrayBuffer();n({font:l})}else{const l=Wl(await o.text(),e.response.content.mimeType);n({text:l,mimeType:e.response.content.mimeType})}}else n(null)})()},[e]),d.jsxs("div",{className:"network-request-details-tab",children:[!e.response.content._sha1&&d.jsx("div",{children:"Response body is not available for this request."}),t&&t.font&&d.jsx(_y,{font:t.font}),t&&t.dataUrl&&d.jsx("img",{draggable:"false",src:t.dataUrl}),t&&t.text&&d.jsx(yi,{text:t.text,mimeType:t.mimeType,readOnly:!0,lineNumbers:!0})]})},_y=({font:e})=>{const[t,n]=b.useState(!1);return b.useEffect(()=>{let r;try{r=new FontFace("font-preview",e),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&n(!0)}catch{n(!0)}return()=>{document.fonts.delete(r)}},[e]),t?d.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):d.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",d.jsx("br",{}),"NOPQRSTUVWXYZ",d.jsx("br",{}),"abcdefghijklm",d.jsx("br",{}),"nopqrstuvwxyz",d.jsx("br",{}),"1234567890"]})};function Ey(e){return e<300||e===304?"green-circle":e<400?"yellow-circle":"red-circle"}function Wl(e,t){if(e===null)return"Loading...";const n=e;if(n==="")return"<Empty>";if(t.includes("application/json"))try{return JSON.stringify(JSON.parse(n),null,2)}catch{return n}return t.includes("application/x-www-form-urlencoded")?decodeURIComponent(n):n}const tp=({cursor:e,onPaneMouseMove:t,onPaneMouseUp:n,onPaneDoubleClick:r})=>(at.useEffect(()=>{const i=document.createElement("div");return i.style.position="fixed",i.style.top="0",i.style.right="0",i.style.bottom="0",i.style.left="0",i.style.zIndex="9999",i.style.cursor=e,document.body.appendChild(i),t&&i.addEventListener("mousemove",t),n&&i.addEventListener("mouseup",n),r&&document.body.addEventListener("dblclick",r),()=>{t&&i.removeEventListener("mousemove",t),n&&i.removeEventListener("mouseup",n),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(i)}},[e,t,n,r]),d.jsx(d.Fragment,{})),Ty={position:"absolute",top:0,right:0,bottom:0,left:0},np=({orientation:e,offsets:t,setOffsets:n,resizerColor:r,resizerWidth:i,minColumnWidth:s})=>{const o=s||0,[l,a]=at.useState(null),[u,c]=_n(),p={position:"absolute",right:e==="horizontal"?void 0:0,bottom:e==="horizontal"?0:void 0,width:e==="horizontal"?7:void 0,height:e==="horizontal"?void 0:7,borderTopWidth:e==="horizontal"?void 0:(7-i)/2,borderRightWidth:e==="horizontal"?(7-i)/2:void 0,borderBottomWidth:e==="horizontal"?void 0:(7-i)/2,borderLeftWidth:e==="horizontal"?(7-i)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:e==="horizontal"?"ew-resize":"ns-resize"};return d.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-i)/2,zIndex:100,pointerEvents:"none"},ref:c,children:[!!l&&d.jsx(tp,{cursor:e==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>a(null),onPaneMouseMove:f=>{if(!f.buttons)a(null);else if(l){const g=e==="horizontal"?f.clientX-l.clientX:f.clientY-l.clientY,y=l.offset+g,w=l.index>0?t[l.index-1]:0,x=e==="horizontal"?u.width:u.height,h=Math.min(Math.max(w+o,y),x-o)-t[l.index];for(let m=l.index;m<t.length;++m)t[m]=t[m]+h;n([...t])}}}),t.map((f,g)=>d.jsx("div",{style:{...p,top:e==="horizontal"?0:f,left:e==="horizontal"?f:0,pointerEvents:"initial"},onMouseDown:y=>a({clientX:y.clientX,clientY:y.clientY,offset:f,index:g}),children:d.jsx("div",{style:{...Ty,background:r}})},g))]})};function ky(e){const[t,n]=b.useState([]);b.useEffect(()=>{const s=[];for(let o=0;o<e.columns.length-1;++o){const l=e.columns[o];s[o]=(s[o-1]||0)+e.columnWidths.get(l)}n(s)},[e.columns,e.columnWidths]);function r(s){const o=new Map(e.columnWidths.entries());for(let l=0;l<s.length;++l){const a=s[l]-(s[l-1]||0),u=e.columns[l];o.set(u,a)}e.setColumnWidths(o)}const i=b.useCallback(s=>{var o,l;(l=e.setSorting)==null||l.call(e,{by:s,negate:((o=e.sorting)==null?void 0:o.by)===s?!e.sorting.negate:!1})},[e]);return d.jsxs("div",{className:`grid-view ${e.name}-grid-view`,children:[d.jsx(np,{orientation:"horizontal",offsets:t,setOffsets:r,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),d.jsxs("div",{className:"vbox",children:[d.jsx("div",{className:"grid-view-header",children:e.columns.map((s,o)=>d.jsxs("div",{className:"grid-view-header-cell "+Ny(s,e.sorting),style:{width:o<e.columns.length-1?e.columnWidths.get(s):void 0},onClick:()=>e.setSorting&&i(s),children:[d.jsx("span",{className:"grid-view-header-cell-title",children:e.columnTitle(s)}),d.jsx("span",{className:"codicon codicon-triangle-up"}),d.jsx("span",{className:"codicon codicon-triangle-down"})]},e.columnTitle(s)))}),d.jsx(vi,{name:e.name,items:e.items,id:e.id,render:(s,o)=>d.jsx(d.Fragment,{children:e.columns.map((l,a)=>{const{body:u,title:c}=e.render(s,l,o);return d.jsx("div",{className:`grid-view-cell grid-view-column-${String(l)}`,title:c,style:{width:a<e.columns.length-1?e.columnWidths.get(l):void 0},children:u},e.columnTitle(l))})}),icon:e.icon,indent:e.indent,isError:e.isError,isWarning:e.isWarning,isInfo:e.isInfo,selectedItem:e.selectedItem,onAccepted:e.onAccepted,onSelected:e.onSelected,onLeftArrow:e.onLeftArrow,onRightArrow:e.onRightArrow,onHighlighted:e.onHighlighted,onIconClicked:e.onIconClicked,noItemsMessage:e.noItemsMessage,dataTestId:e.dataTestId,notSelectable:e.notSelectable})]})]})}function Ny(e,t){return e===(t==null?void 0:t.by)?" filter-"+(t.negate?"negative":"positive"):""}const Cy=["All","Fetch","HTML","JS","CSS","Font","Image"],by={searchValue:"",resourceType:"All"},Ly=({filterState:e,onFilterStateChange:t})=>d.jsxs("div",{className:"network-filters",children:[d.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:e.searchValue,onChange:n=>t({...e,searchValue:n.target.value})}),d.jsx("div",{className:"network-filters-resource-types",children:Cy.map(n=>d.jsx("div",{title:n,onClick:()=>t({...e,resourceType:n}),className:`network-filters-resource-type ${e.resourceType===n?"selected":""}`,children:n},n))})]}),Ay=ky;function jy(e,t){const n=b.useMemo(()=>((e==null?void 0:e.resources)||[]).filter(o=>t?!!o._monotonicTime&&o._monotonicTime>=t.minimum&&o._monotonicTime<=t.maximum:!0),[e,t]),r=b.useMemo(()=>new Oy(e),[e]);return{resources:n,contextIdMap:r}}const My=({boundaries:e,networkModel:t,onEntryHovered:n})=>{const[r,i]=b.useState(void 0),[s,o]=b.useState(void 0),[l,a]=b.useState(by),{renderedEntries:u}=b.useMemo(()=>{const y=t.resources.map(w=>zy(w,e,t.contextIdMap)).filter(By(l));return r&&Fy(y,r),{renderedEntries:y}},[t.resources,t.contextIdMap,l,r,e]),[c,p]=b.useState(()=>new Map(rp().map(y=>[y,Py(y)]))),f=b.useCallback(y=>{a(y),o(void 0)},[]);if(!t.resources.length)return d.jsx(kn,{text:"No network calls"});const g=d.jsx(Ay,{name:"network",items:u,selectedItem:s,onSelected:y=>o(y),onHighlighted:y=>n(y==null?void 0:y.resource),columns:Ry(!!s,u),columnTitle:Iy,columnWidths:c,setColumnWidths:p,isError:y=>y.status.code>=400||y.status.code===-1,isInfo:y=>!!y.route,render:(y,w)=>$y(y,w),sorting:r,setSorting:i});return d.jsxs(d.Fragment,{children:[d.jsx(Ly,{filterState:l,onFilterStateChange:f}),!s&&g,s&&d.jsx(Os,{sidebarSize:c.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:d.jsx(yy,{resource:s.resource,onClose:()=>o(void 0)}),sidebar:g})]})},Iy=e=>e==="contextId"?"Source":e==="name"?"Name":e==="method"?"Method":e==="status"?"Status":e==="contentType"?"Content Type":e==="duration"?"Duration":e==="size"?"Size":e==="start"?"Start":e==="route"?"Route":"",Py=e=>e==="name"?200:e==="method"||e==="status"?60:e==="contentType"?200:e==="contextId"?60:100;function Ry(e,t){if(e){const r=["name"];return Oc(t)&&r.unshift("contextId"),r}let n=rp();return Oc(t)||(n=n.filter(r=>r!=="contextId")),n}function rp(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const $y=(e,t)=>t==="contextId"?{body:e.contextId,title:e.name.url}:t==="name"?{body:e.name.name,title:e.name.url}:t==="method"?{body:e.method}:t==="status"?{body:e.status.code>0?e.status.code:"",title:e.status.text}:t==="contentType"?{body:e.contentType}:t==="duration"?{body:et(e.duration)}:t==="size"?{body:Um(e.size)}:t==="start"?{body:et(e.start)}:t==="route"?{body:e.route}:{body:""};class Oy{constructor(t){V(this,"_pagerefToShortId",new Map);V(this,"_contextToId",new Map);V(this,"_lastPageId",0);V(this,"_lastApiRequestContextId",0)}contextId(t){return t.pageref?this._pageId(t.pageref):t._apiRequest?this._apiRequestContextId(t):""}_pageId(t){let n=this._pagerefToShortId.get(t);return n||(++this._lastPageId,n="page#"+this._lastPageId,this._pagerefToShortId.set(t,n)),n}_apiRequestContextId(t){const n=$s(t);if(!n)return"";let r=this._contextToId.get(n);return r||(++this._lastApiRequestContextId,r="api#"+this._lastApiRequestContextId,this._contextToId.set(n,r)),r}}function Oc(e){const t=new Set;for(const n of e)if(t.add(n.contextId),t.size>1)return!0;return!1}const zy=(e,t,n)=>{const r=Dy(e);let i;try{const l=new URL(e.request.url);i=l.pathname.substring(l.pathname.lastIndexOf("/")+1),i||(i=l.host)}catch{i=e.request.url}let s=e.response.content.mimeType;const o=s.match(/^(.*);\s*charset=.*$/);return o&&(s=o[1]),{name:{name:i,url:e.request.url},method:e.request.method,status:{code:e.response.status,text:e.response.statusText},contentType:s,duration:e.time,size:e.response._transferSize>0?e.response._transferSize:e.response.bodySize,start:e._monotonicTime-t.minimum,route:r,resource:e,contextId:n.contextId(e)}};function Dy(e){return e._wasAborted?"aborted":e._wasContinued?"continued":e._wasFulfilled?"fulfilled":e._apiRequest?"api":""}function Fy(e,t){const n=Hy(t==null?void 0:t.by);n&&e.sort(n),t.negate&&e.reverse()}function Hy(e){if(e==="start")return(t,n)=>t.start-n.start;if(e==="duration")return(t,n)=>t.duration-n.duration;if(e==="status")return(t,n)=>t.status.code-n.status.code;if(e==="method")return(t,n)=>{const r=t.method,i=n.method;return r.localeCompare(i)};if(e==="size")return(t,n)=>t.size-n.size;if(e==="contentType")return(t,n)=>t.contentType.localeCompare(n.contentType);if(e==="name")return(t,n)=>t.name.name.localeCompare(n.name.name);if(e==="route")return(t,n)=>t.route.localeCompare(n.route);if(e==="contextId")return(t,n)=>t.contextId.localeCompare(n.contextId)}const Uy={All:()=>!0,Fetch:e=>e==="application/json",HTML:e=>e==="text/html",CSS:e=>e==="text/css",JS:e=>e.includes("javascript"),Font:e=>e.includes("font"),Image:e=>e.includes("image")};function By({searchValue:e,resourceType:t}){return n=>{const r=Uy[t];return r(n.contentType)&&n.name.url.toLowerCase().includes(e.toLowerCase())}}const zc={queryAll(e,t){t.startsWith("/")&&e.nodeType!==Node.DOCUMENT_NODE&&(t="."+t);const n=[],r=e.ownerDocument||e;if(!r)return n;const i=r.evaluate(t,e,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let s=i.iterateNext();s;s=i.iterateNext())s.nodeType===Node.ELEMENT_NODE&&n.push(s);return n}};let ip="";function Vy(e){ip=e}function lo(e,t){for(;t;){if(e.contains(t))return!0;t=op(t)}return!1}function ke(e){if(e.parentElement)return e.parentElement;if(e.parentNode&&e.parentNode.nodeType===11&&e.parentNode.host)return e.parentNode.host}function sp(e){let t=e;for(;t.parentNode;)t=t.parentNode;if(t.nodeType===11||t.nodeType===9)return t}function op(e){for(;e.parentElement;)e=e.parentElement;return ke(e)}function Rr(e,t,n){for(;e;){const r=e.closest(t);if(n&&r!==n&&(r!=null&&r.contains(n)))return;if(r)return r;e=op(e)}}function fr(e,t){return e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,t):void 0}function lp(e,t){if(t=t??fr(e),!t)return!0;if(Element.prototype.checkVisibility&&ip!=="webkit"){if(!e.checkVisibility())return!1}else{const n=e.closest("details,summary");if(n!==e&&(n==null?void 0:n.nodeName)==="DETAILS"&&!n.open)return!1}return t.visibility==="visible"}function fn(e){const t=fr(e);if(!t)return!0;if(t.display==="contents"){for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===1&&fn(r)||r.nodeType===3&&ap(r))return!0;return!1}if(!lp(e,t))return!1;const n=e.getBoundingClientRect();return n.width>0&&n.height>0}function ap(e){const t=e.ownerDocument.createRange();t.selectNode(e);const n=t.getBoundingClientRect();return n.width>0&&n.height>0}function xe(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function Dc(e){return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")}const Fc="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]",Wy=new Map([["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",new Set(["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])],["aria-labelledby",new Set(["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",new Set(["generic"])]]);function up(e,t){return[...Wy].some(([n,r])=>!(r!=null&&r.has(t||""))&&e.hasAttribute(n))}function cp(e){return!Number.isNaN(Number(String(e.getAttribute("tabindex"))))}function qy(e){return!Ep(e)&&(Xy(e)||cp(e))}function Xy(e){const t=xe(e);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(t)?!0:t==="A"||t==="AREA"?e.hasAttribute("href"):t==="INPUT"?!e.hidden:!1}const Do={A:e=>e.hasAttribute("href")?"link":null,AREA:e=>e.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:e=>Rr(e,Fc)?null:"contentinfo",FORM:e=>Dc(e)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:e=>Rr(e,Fc)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:e=>e.getAttribute("alt")===""&&!e.getAttribute("title")&&!up(e)&&!cp(e)?"presentation":"img",INPUT:e=>{const t=e.type.toLowerCase();if(t==="search")return e.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(t)){const n=wi(e,e.getAttribute("list"))[0];return n&&xe(n)==="DATALIST"?"combobox":"textbox"}return t==="hidden"?"":{button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"}[t]||"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",SECTION:e=>Dc(e)?"region":null,SELECT:e=>e.hasAttribute("multiple")||e.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:e=>{const t=Rr(e,"table"),n=t?Fs(t):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:e=>{if(e.getAttribute("scope")==="col")return"columnheader";if(e.getAttribute("scope")==="row")return"rowheader";const t=Rr(e,"table"),n=t?Fs(t):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},Qy={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 Hc(e){var r;const t=((r=Do[xe(e)])==null?void 0:r.call(Do,e))||"";if(!t)return null;let n=e;for(;n;){const i=ke(n),s=Qy[xe(n)];if(!s||!i||!s.includes(xe(i)))break;const o=Fs(i);if((o==="none"||o==="presentation")&&!dp(i,o))return o;n=i}return t}const Ky=["alert","alertdialog","application","article","banner","blockquote","button","caption","cell","checkbox","code","columnheader","combobox","command","complementary","composite","contentinfo","definition","deletion","dialog","directory","document","emphasis","feed","figure","form","generic","grid","gridcell","group","heading","img","input","insertion","landmark","link","list","listbox","listitem","log","main","marquee","math","meter","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","paragraph","presentation","progressbar","radio","radiogroup","range","region","roletype","row","rowgroup","rowheader","scrollbar","search","searchbox","section","sectionhead","select","separator","slider","spinbutton","status","strong","structure","subscript","superscript","switch","tab","table","tablist","tabpanel","term","textbox","time","timer","toolbar","tooltip","tree","treegrid","treeitem","widget","window"],Gy=["command","composite","input","landmark","range","roletype","section","sectionhead","select","structure","widget","window"],Yy=Ky.filter(e=>!Gy.includes(e));function Fs(e){return(e.getAttribute("role")||"").split(" ").map(n=>n.trim()).find(n=>Yy.includes(n))||null}function dp(e,t){return up(e,t)||qy(e)}function be(e){const t=Fs(e);if(!t)return Hc(e);if(t==="none"||t==="presentation"){const n=Hc(e);if(dp(e,n))return n}return t}function fp(e){return e===null?void 0:e.toLowerCase()==="true"}function hp(e){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(xe(e))}function vt(e){if(hp(e))return!0;const t=fr(e),n=e.nodeName==="SLOT";if((t==null?void 0:t.display)==="contents"&&!n){for(let i=e.firstChild;i;i=i.nextSibling)if(i.nodeType===1&&!vt(i)||i.nodeType===3&&ap(i))return!1;return!0}return!(e.nodeName==="OPTION"&&!!e.closest("select"))&&!n&&!lp(e,t)?!0:pp(e)}function pp(e){let t=Ot==null?void 0:Ot.get(e);if(t===void 0){if(t=!1,e.parentElement&&e.parentElement.shadowRoot&&!e.assignedSlot&&(t=!0),!t){const n=fr(e);t=!n||n.display==="none"||fp(e.getAttribute("aria-hidden"))===!0}if(!t){const n=ke(e);n&&(t=pp(n))}Ot==null||Ot.set(e,t)}return t}function wi(e,t){if(!t)return[];const n=sp(e);if(!n)return[];try{const r=t.split(" ").filter(s=>!!s),i=new Set;for(const s of r){const o=n.querySelector("#"+CSS.escape(s));o&&i.add(o)}return[...i]}catch{return[]}}function _t(e){return e.trim()}function as(e){return e.split(" ").map(t=>t.replace(/\r\n/g,`
|
|
@@ -64,9 +70,3 @@ Error generating stack: `+s.message+`
|
|
|
64
70
|
rgb(0 0 0 / 10%) 0px -2px 4px,
|
|
65
71
|
rgb(0 0 0 / 15%) 0px -6.1px 12px,
|
|
66
72
|
rgb(0 0 0 / 25%) 0px 6px 12px`},U1=({diff:e,noTargetBlank:t})=>{const[n,r]=b.useState(e.diff?"diff":"actual"),[i,s]=b.useState(!1),[o,l]=b.useState(null),[a,u]=b.useState(null),[c,p]=b.useState(null),[f,g]=_n();b.useEffect(()=>{(async()=>{var E,C,A;l(await Xo((E=e.expected)==null?void 0:E.attachment.path)),u(await Xo((C=e.actual)==null?void 0:C.attachment.path)),p(await Xo((A=e.diff)==null?void 0:A.attachment.path))})()},[e]);const y=o&&a&&c,w=y?Math.max(o.naturalWidth,a.naturalWidth,200):500,x=y?Math.max(o.naturalHeight,a.naturalHeight,200):500,h=Math.min(1,(f.width-30)/w),m=Math.min(1,(f.width-50)/w/2),v=w*h,S=x*h,N={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return d.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:g,children:y&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[e.diff&&d.jsx("div",{style:{...N,fontWeight:n==="diff"?600:"initial"},onClick:()=>r("diff"),children:"Diff"}),d.jsx("div",{style:{...N,fontWeight:n==="actual"?600:"initial"},onClick:()=>r("actual"),children:"Actual"}),d.jsx("div",{style:{...N,fontWeight:n==="expected"?600:"initial"},onClick:()=>r("expected"),children:"Expected"}),d.jsx("div",{style:{...N,fontWeight:n==="sxs"?600:"initial"},onClick:()=>r("sxs"),children:"Side by side"}),d.jsx("div",{style:{...N,fontWeight:n==="slider"?600:"initial"},onClick:()=>r("slider"),children:"Slider"})]}),d.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:S+60},children:[e.diff&&n==="diff"&&d.jsx(Et,{image:c,alt:"Diff",canvasWidth:v,canvasHeight:S,scale:h}),e.diff&&n==="actual"&&d.jsx(Et,{image:a,alt:"Actual",canvasWidth:v,canvasHeight:S,scale:h}),e.diff&&n==="expected"&&d.jsx(Et,{image:o,alt:"Expected",canvasWidth:v,canvasHeight:S,scale:h}),e.diff&&n==="slider"&&d.jsx(B1,{expectedImage:o,actualImage:a,canvasWidth:v,canvasHeight:S,scale:h}),e.diff&&n==="sxs"&&d.jsxs("div",{style:{display:"flex"},children:[d.jsx(Et,{image:o,title:"Expected",canvasWidth:m*w,canvasHeight:m*x,scale:m}),d.jsx(Et,{image:i?c:a,title:i?"Diff":"Actual",onClick:()=>s(!i),canvasWidth:m*w,canvasHeight:m*x,scale:m})]}),!e.diff&&n==="actual"&&d.jsx(Et,{image:a,title:"Actual",canvasWidth:v,canvasHeight:S,scale:h}),!e.diff&&n==="expected"&&d.jsx(Et,{image:o,title:"Expected",canvasWidth:v,canvasHeight:S,scale:h}),!e.diff&&n==="sxs"&&d.jsxs("div",{style:{display:"flex"},children:[d.jsx(Et,{image:o,title:"Expected",canvasWidth:m*w,canvasHeight:m*x,scale:m}),d.jsx(Et,{image:a,title:"Actual",canvasWidth:m*w,canvasHeight:m*x,scale:m})]})]}),d.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[d.jsx("div",{children:e.diff&&d.jsx("a",{target:"_blank",href:e.diff.attachment.path,rel:"noreferrer",children:e.diff.attachment.name})}),d.jsx("div",{children:d.jsx("a",{target:t?"":"_blank",href:e.actual.attachment.path,rel:"noreferrer",children:e.actual.attachment.name})}),d.jsx("div",{children:d.jsx("a",{target:t?"":"_blank",href:e.expected.attachment.path,rel:"noreferrer",children:e.expected.attachment.name})})]})]})})},B1=({expectedImage:e,actualImage:t,canvasWidth:n,canvasHeight:r,scale:i})=>{const s={position:"absolute",top:0,left:0},[o,l]=b.useState(n/2),a=e.naturalWidth===t.naturalWidth&&e.naturalHeight===t.naturalHeight;return d.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[d.jsxs("div",{style:{margin:5},children:[!a&&d.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),d.jsx("span",{children:e.naturalWidth}),d.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),d.jsx("span",{children:e.naturalHeight}),!a&&d.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!a&&d.jsx("span",{children:t.naturalWidth}),!a&&d.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!a&&d.jsx("span",{children:t.naturalHeight})]}),d.jsxs("div",{style:{position:"relative",width:n,height:r,margin:15,...Yl},children:[d.jsx(np,{orientation:"horizontal",offsets:[o],setOffsets:u=>l(u[0]),resizerColor:"#57606a80",resizerWidth:6}),d.jsx("img",{alt:"Expected",style:{width:e.naturalWidth*i,height:e.naturalHeight*i},draggable:"false",src:e.src}),d.jsx("div",{style:{...s,bottom:0,overflow:"hidden",width:o,...Yl},children:d.jsx("img",{alt:"Actual",style:{width:t.naturalWidth*i,height:t.naturalHeight*i},draggable:"false",src:t.src})})]})]})},Et=({image:e,title:t,alt:n,canvasWidth:r,canvasHeight:i,scale:s,onClick:o})=>d.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[d.jsxs("div",{style:{margin:5},children:[t&&d.jsx("span",{style:{flex:"none",margin:"0 5px"},children:t}),d.jsx("span",{children:e.naturalWidth}),d.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),d.jsx("span",{children:e.naturalHeight})]}),d.jsx("div",{style:{display:"flex",flex:"none",width:r,height:i,margin:15,...Yl},children:d.jsx("img",{width:e.naturalWidth*s,height:e.naturalHeight*s,alt:t||n,style:{cursor:o?"pointer":"initial"},draggable:"false",src:e.src,onClick:o})})]});function V1(e){return!!e.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const W1=({title:e,children:t,setExpanded:n,expanded:r,expandOnTitleClick:i})=>d.jsxs("div",{className:Ne("expandable",r&&"expanded"),children:[d.jsxs("div",{className:"expandable-title",onClick:()=>i&&n(!r),children:[d.jsx("div",{className:Ne("codicon",r?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:()=>!i&&n(!r)}),e]}),r&&d.jsx("div",{style:{marginLeft:25},children:t})]});function om(e){const t=[];let n=0,r;for(;(r=xd.exec(e))!==null;){const s=e.substring(n,r.index);s&&t.push(s);const o=r[0];t.push(q1(o)),n=r.index+o.length}const i=e.substring(n);return i&&t.push(i),t}function q1(e){let t=e;return t.startsWith("www.")&&(t="https://"+t),d.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:e})}const X1=({attachment:e})=>{const[t,n]=b.useState(!1),[r,i]=b.useState(null),[s,o]=b.useState(null),l=V1(e.contentType),a=!!e.sha1||!!e.path;b.useEffect(()=>{t&&r===null&&s===null&&(o("Loading ..."),fetch(ou(e)).then(c=>c.text()).then(c=>{i(c),o(null)}).catch(c=>{o("Failed to load: "+c.message)}))},[t,r,s,e]);const u=d.jsxs("span",{style:{marginLeft:5},children:[om(e.name)," ",a&&d.jsx("a",{style:{marginLeft:5},href:ds(e),children:"download"})]});return!l||!a?d.jsx("div",{style:{marginLeft:20},children:u}):d.jsxs(d.Fragment,{children:[d.jsx(W1,{title:u,expanded:t,setExpanded:n,expandOnTitleClick:!0,children:s&&d.jsx("i",{children:s})}),t&&r!==null&&d.jsx(yi,{text:r,readOnly:!0,mimeType:e.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})]})},Q1=({model:e})=>{const{diffMap:t,screenshots:n,attachments:r}=b.useMemo(()=>{const i=new Set,s=new Set;for(const l of(e==null?void 0:e.actions)||[]){const a=l.context.traceUrl;for(const u of l.attachments||[])i.add({...u,traceUrl:a})}const o=new Map;for(const l of i){if(!l.path&&!l.sha1)continue;const a=l.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(a){const u=a[1],c=a[2],p=o.get(u)||{expected:void 0,actual:void 0,diff:void 0};p[c]=l,o.set(u,p),i.delete(l)}else l.contentType.startsWith("image/")&&(s.add(l),i.delete(l))}return{diffMap:o,attachments:i,screenshots:s}},[e]);return!t.size&&!n.size&&!r.size?d.jsx(kn,{text:"No attachments"}):d.jsxs("div",{className:"attachments-tab",children:[[...t.values()].map(({expected:i,actual:s,diff:o})=>d.jsxs(d.Fragment,{children:[i&&s&&d.jsx("div",{className:"attachments-section",children:"Image diff"}),i&&s&&d.jsx(U1,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...i,path:ds(i)},title:"Expected"},actual:{attachment:{...s,path:ds(s)}},diff:o?{attachment:{...o,path:ds(o)}}:void 0}})]})),n.size?d.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...n.values()].map((i,s)=>{const o=ou(i);return d.jsxs("div",{className:"attachment-item",children:[d.jsx("div",{children:d.jsx("img",{draggable:"false",src:o})}),d.jsx("div",{children:d.jsx("a",{target:"_blank",href:o,rel:"noreferrer",children:i.name})})]},`screenshot-${s}`)}),r.size?d.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...r.values()].map((i,s)=>d.jsx("div",{className:"attachment-item",children:d.jsx(X1,{attachment:i})},K1(i,s)))]})};function ou(e,t={}){const n=new URLSearchParams(t);return e.sha1?(n.set("trace",e.traceUrl),"sha1/"+e.sha1+"?"+n.toString()):(n.set("path",e.path),"file?"+n.toString())}function ds(e){const t={dn:e.name};return e.contentType&&(t.dct=e.contentType),ou(e,t)}function K1(e,t){return t+"-"+(e.sha1?"sha1-"+e.sha1:"path-"+e.path)}const G1=({annotations:e})=>e.length?d.jsx("div",{className:"annotations-tab",children:e.map((t,n)=>d.jsxs("div",{className:"annotation-item",children:[d.jsx("span",{style:{fontWeight:"bold"},children:t.type}),t.description&&d.jsxs("span",{children:[": ",om(t.description)]})]},`annotation-${n}`))}):d.jsx(kn,{text:"No annotations"}),Y1=({sdkLanguage:e,setIsInspecting:t,highlightedLocator:n,setHighlightedLocator:r})=>d.jsxs("div",{className:"vbox",style:{backgroundColor:"var(--vscode-sideBar-background)"},children:[d.jsx("div",{style:{margin:"10px 0px 10px 10px",color:"var(--vscode-editorCodeLens-foreground)",flex:"none"},children:"Locator"}),d.jsx("div",{style:{margin:"0 10px 10px",flex:"auto"},children:d.jsx(yi,{text:n,language:e,focusOnChange:!0,isFocused:!0,wrapLines:!0,onChange:i=>{r(i),t(!1)}})}),d.jsx("div",{style:{position:"absolute",right:5,top:5},children:d.jsx(en,{icon:"files",title:"Copy locator",onClick:()=>{Bm(n)}})})]});function J1(e){return e==="scheduled"?"codicon-clock":e==="running"?"codicon-loading":e==="failed"?"codicon-error":e==="passed"?"codicon-check":e==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function Z1(e){return e==="scheduled"?"Pending":e==="running"?"Running":e==="failed"?"Failed":e==="passed"?"Passed":e==="skipped"?"Skipped":"Did not run"}const ex=({settings:e})=>d.jsx("div",{className:"vbox settings-view",children:e.map(({value:t,set:n,title:r})=>d.jsx("div",{className:"setting",children:d.jsxs("label",{children:[d.jsx("input",{type:"checkbox",checked:t,onClick:()=>n(!t)}),r]})},r))}),ux=({model:e,showSourcesFirst:t,rootDir:n,fallbackLocation:r,initialSelection:i,onSelectionChanged:s,isLive:o,status:l,annotations:a,inert:u,openPage:c,onOpenExternally:p,revealSource:f,showSettings:g})=>{var hu;const[y,w]=b.useState(void 0),[x,h]=b.useState(void 0),[m,v]=b.useState(),[S,N]=b.useState(),[E,C]=b.useState(),[A,_]=b.useState("actions"),[T,j]=Or("propertiesTab",t?"source":"call"),[k,M]=b.useState(!1),[$,ce]=b.useState(""),Fe=e?m||y:void 0,[me,I]=b.useState(),[R,z]=Or("propertiesSidebarLocation","bottom"),[B,ne]=Or("show-route-actions",!0),Nn=b.useMemo(()=>((e==null?void 0:e.actions)||[]).filter(O=>B||!u0(O)),[e,B]),_e=b.useCallback(O=>{w(O),h(O==null?void 0:O.stack)},[w,h]),pr=b.useMemo(()=>(e==null?void 0:e.sources)||new Map,[e]);b.useEffect(()=>{I(void 0),h(void 0)},[e]),b.useEffect(()=>{if(y&&(e!=null&&e.actions.includes(y)))return;const O=e==null?void 0:e.failedAction();if(i&&(e!=null&&e.actions.includes(i)))_e(i);else if(O)_e(O);else if(e!=null&&e.actions.length){let pu=e.actions.length-1;for(let gr=0;gr<e.actions.length;++gr)if(e.actions[gr].apiName==="After Hooks"&&gr){pu=gr-1;break}_e(e.actions[pu])}},[e,y,_e,i]);const ft=b.useCallback(O=>{_e(O),v(void 0),s==null||s(O)},[_e,s,v]),je=b.useCallback(O=>{j(O),O!=="inspector"&&M(!1)},[j]),lu=b.useCallback(O=>{!k&&O&&je("inspector"),M(O)},[M,je,k]),lm=b.useCallback(O=>{ce(O),je("inspector")},[je]);b.useEffect(()=>{f&&je("source")},[f,je]);const uo=oy(e,me),au=jy(e,me),uu=ry(e),am=b.useMemo(()=>(e==null?void 0:e.actions.map(O=>O.attachments||[]).flat())||[],[e]),Cn=(e==null?void 0:e.sdkLanguage)||"javascript",um={id:"inspector",title:"Locator",render:()=>d.jsx(Y1,{sdkLanguage:Cn,setIsInspecting:lu,highlightedLocator:$,setHighlightedLocator:ce})},cm={id:"call",title:"Call",render:()=>d.jsx(Y0,{action:Fe,sdkLanguage:Cn})},dm={id:"log",title:"Log",render:()=>d.jsx(Z0,{action:Fe,isLive:o})},fm={id:"errors",title:"Errors",errorCount:uu.errors.size,render:()=>d.jsx(iy,{errorsModel:uu,sdkLanguage:Cn,revealInSource:O=>{O.action?_e(O.action):h(O.stack),je("source")}})};let cu;!y&&r&&(cu=(hu=r.source)==null?void 0:hu.errors.length);const co={id:"source",title:"Source",errorCount:cu,render:()=>d.jsx(M1,{stack:x,sources:pr,rootDir:n,stackFrameLocation:R==="bottom"?"right":"bottom",fallbackLocation:r,onOpenExternally:p})},hm={id:"console",title:"Console",count:uo.entries.length,render:()=>d.jsx(ly,{consoleModel:uo,boundaries:fo,selectedTime:me,onAccepted:O=>I({minimum:O.timestamp,maximum:O.timestamp}),onEntryHovered:C})},pm={id:"network",title:"Network",count:au.resources.length,render:()=>d.jsx(My,{boundaries:fo,networkModel:au,onEntryHovered:N})},mm={id:"attachments",title:"Attachments",count:am.length,render:()=>d.jsx(Q1,{model:e})},mr=[um,cm,dm,fm,hm,pm,co,mm];if(a!==void 0){const O={id:"annotations",title:"Annotations",count:a.length,render:()=>d.jsx(G1,{annotations:a})};mr.push(O)}if(t){const O=mr.indexOf(co);mr.splice(O,1),mr.splice(1,0,co)}const{boundaries:fo}=b.useMemo(()=>{const O={minimum:(e==null?void 0:e.startTime)||0,maximum:(e==null?void 0:e.endTime)||3e4};return O.minimum>O.maximum&&(O.minimum=0,O.maximum=3e4),O.maximum+=(O.maximum-O.minimum)/20,{boundaries:O}},[e]);let xi=0;!o&&e&&e.endTime>=0?xi=e.endTime-e.startTime:e&&e.wallTime&&(xi=Date.now()-e.wallTime);const du={id:"actions",title:"Actions",component:d.jsxs("div",{className:"vbox",children:[l&&d.jsxs("div",{className:"workbench-run-status",children:[d.jsx("span",{className:Ne("codicon",J1(l))}),d.jsx("div",{children:Z1(l)}),d.jsx("div",{className:"spacer"}),d.jsx("div",{className:"workbench-run-duration",children:xi?et(xi):""})]}),d.jsx(K0,{sdkLanguage:Cn,actions:Nn,selectedAction:e?y:void 0,selectedTime:me,setSelectedTime:I,onSelected:ft,onHighlighted:v,revealConsole:()=>je("console"),isLive:o})]})},fu={id:"metadata",title:"Metadata",component:d.jsx(H1,{model:e})},gm={id:"settings",title:"Settings",component:d.jsx(ex,{settings:[{value:B,set:ne,title:"Show route actions"}]})};return d.jsxs("div",{className:"vbox workbench",...u?{inert:"true"}:{},children:[d.jsx(z1,{model:e,consoleEntries:uo.entries,boundaries:fo,highlightedAction:m,highlightedEntry:S,highlightedConsoleEntry:E,onSelected:ft,sdkLanguage:Cn,selectedTime:me,setSelectedTime:I}),d.jsx(Os,{sidebarSize:250,orientation:R==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:d.jsx(Os,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:d.jsx(C1,{action:Fe,sdkLanguage:Cn,testIdAttributeName:(e==null?void 0:e.testIdAttributeName)||"data-testid",isInspecting:k,setIsInspecting:lu,highlightedLocator:$,setHighlightedLocator:lm,openPage:c}),sidebar:d.jsx(Vl,{tabs:g?[du,fu,gm]:[du,fu],selectedTab:A,setSelectedTab:_})}),sidebar:d.jsx(Vl,{tabs:mr,selectedTab:T,setSelectedTab:je,rightToolbar:[R==="bottom"?d.jsx(en,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{z("right")}}):d.jsx(en,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{z("bottom")}})],mode:R==="bottom"?"default":"select"})})]})};export{W1 as E,lx as M,at as R,Os as S,en as T,ux as W,hy as _,rx as a,Qo as b,Gv as c,ix as d,sx as e,Ne as f,Ka as g,J1 as h,q0 as i,d as j,ax as k,Or as l,et as m,ox as n,ex as o,nx as p,wm as q,b as r,an as s,Wm as t,_n as u};
|
|
67
|
-
function __vite__mapDeps(indexes) {
|
|
68
|
-
if (!__vite__mapDeps.viteFileDeps) {
|
|
69
|
-
__vite__mapDeps.viteFileDeps = ["./codeMirrorModule-cCPLLRBo.js","../codeMirrorModule.Hs9-1ZG4.css"]
|
|
70
|
-
}
|
|
71
|
-
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
72
|
-
}
|