@checkly/playwright-core 1.48.20 → 1.48.22-beta
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/lib/checkly/fetch.js +3 -10
- package/lib/cli/cli.js +61 -0
- package/lib/common/debugLogger.js +90 -0
- package/lib/generated/recorderSource.js +1 -1
- package/lib/server/fetch.js +1 -1
- package/lib/server/recorder/java.js +4 -36
- package/lib/server/trace/recorder/tracing.js +22 -17
- package/lib/vite/{traceViewer/assets/codeMirrorModule-B7Z3vq11.js → recorder/assets/codeMirrorModule-CR6kB851.js} +1 -1
- package/lib/vite/recorder/assets/{index-Bxxcmxlu.js → index-BcaUAUCW.js} +2 -2
- package/lib/vite/recorder/index.html +1 -1
- package/lib/vite/traceViewer/assets/codeMirrorModule-75b0ca4f.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-CNHvVrFd.js +16437 -0
- package/lib/vite/traceViewer/assets/{codeMirrorModule-BdBhzV6t.js → codeMirrorModule-CpGx_S8D.js} +2 -2
- package/lib/vite/traceViewer/assets/{codeMirrorModule-EhKN7Okm.js → codeMirrorModule-DGE2kpkE.js} +954 -960
- package/lib/vite/traceViewer/assets/codeMirrorModule-SomGa-Da.js +16443 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-c1454a2e.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-c9bb9834.js +24 -0
- package/lib/vite/traceViewer/assets/{codeMirrorModule-BqcXH1AO.js → codeMirrorModule-cc2329e4.js} +11 -1256
- package/lib/vite/traceViewer/assets/codeMirrorModule-d2cc7db0.js +15579 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-da915a35.js +15586 -0
- package/lib/vite/traceViewer/assets/{codeMirrorModule-U6XMqGkV.js → codeMirrorModule-f03b1a3e.js} +661 -1519
- package/lib/vite/traceViewer/assets/codeMirrorModule-f333a775.js +24 -0
- package/lib/vite/traceViewer/assets/{codeMirrorModule-V7N6ppkd.js → codeMirrorModule-uWDlVSQz.js} +2 -2
- package/lib/vite/traceViewer/assets/{codeMirrorModule-Dx6AXgMV.js → codeMirrorModule-yboVpgC0.js} +2 -1248
- package/lib/vite/traceViewer/assets/{inspectorTab-BABZNwlH.js → inspectorTab-B4ynvyY9.js} +18 -8
- package/lib/vite/traceViewer/assets/{inspectorTab-DpvLVMq5.js → inspectorTab-CHcHvp_a.js} +16 -6
- package/lib/vite/traceViewer/assets/{workbench-Bjkiwcr1.js → inspectorTab-Dw0Gnh1T.js} +1847 -3605
- package/lib/vite/traceViewer/assets/{inspectorTab-BPzVEZSf.js → inspectorTab-Ywa000c9.js} +16 -6
- package/lib/vite/traceViewer/assets/{workbench-BcgGQnKb.js → workbench-CROk6Fcc.js} +2 -2
- package/lib/vite/traceViewer/assets/{workbench-ByyWxoT8.js → workbench-CfXOj3eT.js} +2 -2
- package/lib/vite/traceViewer/assets/{workbench-DhqI6jeL.js → workbench-D9CTkv-4.js} +2 -2
- package/lib/vite/traceViewer/assets/{workbench-I4s6sWjN.js → workbench-DNolpp3y.js} +1 -1
- package/lib/vite/traceViewer/assets/workbench-DjoIOtwK.js +1473 -0
- package/lib/vite/traceViewer/assets/workbench-dnZM5a7x.js +1473 -0
- package/lib/vite/traceViewer/assets/wsPort-54626118.js +18361 -0
- package/lib/vite/traceViewer/assets/wsPort-57f274c6.js +18361 -0
- package/lib/vite/traceViewer/assets/wsPort-762c6840.js +64 -0
- package/lib/vite/traceViewer/assets/wsPort-85286e61.js +18361 -0
- package/lib/vite/traceViewer/assets/wsPort-98e00a94.js +64 -0
- package/lib/vite/traceViewer/assets/{wsPort-EUvw-dwH.js → wsPort-CAXygIGt.js} +3 -3
- package/lib/vite/traceViewer/assets/{workbench-Crj6jzdv.js → wsPort-cc0077b5.js} +4046 -4623
- package/lib/vite/traceViewer/assets/wsPort-edfeeb7d.js +64 -0
- package/lib/vite/traceViewer/assets/wsPort-ee2830d7.js +64 -0
- package/lib/vite/traceViewer/assets/{workbench-C5OQh9VX.js → wsPort-peeLnQhT.js} +985 -1540
- package/lib/vite/traceViewer/assets/xtermModule-443332e6.js +9 -0
- package/lib/vite/traceViewer/assets/xtermModule-60687b6b.js +6410 -0
- package/lib/vite/traceViewer/codeMirrorModule.5d0f417c.css +1 -0
- package/lib/vite/traceViewer/codeMirrorModule.eb494ea9.css +344 -0
- package/lib/vite/traceViewer/codicon.79f233d0.ttf +0 -0
- package/lib/vite/traceViewer/{embedded.27BGR_eD.js → embedded.6N1v7bZ1.js} +4 -3
- package/lib/vite/traceViewer/{embedded.DTjd2aiy.js → embedded.BaqdbLsy.js} +4 -3
- package/lib/vite/traceViewer/{embedded.SsjKHrxC.js → embedded.CwwTDBzP.js} +4 -3
- package/lib/vite/traceViewer/{embedded.Zu332ZC1.js → embedded.DeCrOtlO.js} +2 -2
- package/lib/vite/traceViewer/embedded.DnD_eIZU.js +106 -0
- package/lib/vite/traceViewer/embedded.html +3 -3
- package/lib/vite/traceViewer/embedded.i_k4ceMJ.js +106 -0
- package/lib/vite/traceViewer/index.1a1fe659.css +1 -0
- package/lib/vite/traceViewer/index.1b525c1c.js +181 -0
- package/lib/vite/traceViewer/index.55e65778.js +181 -0
- package/lib/vite/traceViewer/{index.6KJ-JQ0L.js → index.5nqVcfiC.js} +2 -2
- package/lib/vite/traceViewer/{index.C0EgJ4oW.js → index.5ooko4n7.js} +21 -36
- package/lib/vite/traceViewer/index.76e9f312.css +124 -0
- package/lib/vite/traceViewer/{index.Dz3icWJV.js → index.Bugo2TbS.js} +4 -3
- package/lib/vite/traceViewer/{index.PqcsvBxQ.js → index.BzvnAP7t.js} +4 -3
- package/lib/vite/traceViewer/{index.CLxsp2W_.js → index.CM_h9lHr.js} +2 -2
- package/lib/vite/traceViewer/{index.yxAwzeWG.js → index.CY13pBr8.js} +4 -3
- package/lib/vite/traceViewer/index.DblJtEW_.js +197 -0
- package/lib/vite/traceViewer/index.UtHmfPiA.js +197 -0
- package/lib/vite/traceViewer/index.a265fbdb.js +2 -0
- package/lib/vite/traceViewer/index.c9f6fa8f.js +2 -0
- package/lib/vite/traceViewer/index.d86e70ca.js +181 -0
- package/lib/vite/traceViewer/index.decad628.js +2 -0
- package/lib/vite/traceViewer/index.e8730524.js +181 -0
- package/lib/vite/traceViewer/index.ed9a3c58.js +2 -0
- package/lib/vite/traceViewer/index.html +3 -3
- package/lib/vite/traceViewer/{recorder.BufKu9Hp.js → recorder.3Xfrl_zV.js} +3 -2
- package/lib/vite/traceViewer/{recorder.am-MV-DQ.js → recorder.BWH6blRw.js} +3 -2
- package/lib/vite/traceViewer/{recorder.7Wl6HrQl.js → recorder.Db1aK_DY.js} +3 -2
- package/lib/vite/traceViewer/recorder.html +2 -2
- package/lib/vite/traceViewer/recorder.uj3cfoMf.js +551 -0
- package/lib/vite/traceViewer/uiMode.08ab2d90.js +4 -0
- package/lib/vite/traceViewer/uiMode.0d0d667b.js +4 -0
- package/lib/vite/traceViewer/uiMode.216233d5.js +1484 -0
- package/lib/vite/traceViewer/{uiMode.DVWUEIHq.css → uiMode.2c31018f.css} +88 -188
- package/lib/vite/traceViewer/uiMode.3ff70f7d.js +4 -0
- package/lib/vite/traceViewer/uiMode.4d0a45af.js +1484 -0
- package/lib/vite/traceViewer/uiMode.66eb0ce2.js +1484 -0
- package/lib/vite/traceViewer/uiMode.8b41a49d.css +1 -0
- package/lib/vite/traceViewer/uiMode.8d080c01.js +1486 -0
- package/lib/vite/traceViewer/uiMode.BKrDfnAk.js +1725 -0
- package/lib/vite/traceViewer/uiMode.BMYUvsRh.js +1725 -0
- package/lib/vite/traceViewer/{uiMode.BZoFj6zV.js → uiMode.BVpTBGoe.js} +4 -3
- package/lib/vite/traceViewer/uiMode.BWhJCEE9.js +1725 -0
- package/lib/vite/traceViewer/uiMode.Bg9fACTB.js +1725 -0
- package/lib/vite/traceViewer/{uiMode.CpC2B27N.js → uiMode.CYBsUhm_.js} +2 -2
- package/lib/vite/traceViewer/{uiMode.Dlo9s_YX.js → uiMode.DCSdxlAq.js} +4 -3
- package/lib/vite/traceViewer/{uiMode.wsGnVMQK.js → uiMode.DtleKuGI.js} +4 -3
- package/lib/vite/traceViewer/uiMode.UamAvOMX.js +1725 -0
- package/lib/vite/traceViewer/uiMode._Kp3dUXk.js +1724 -0
- package/lib/vite/traceViewer/uiMode.bBcXYWNF.js +1725 -0
- package/lib/vite/traceViewer/uiMode.ca6ec898.js +4 -0
- package/lib/vite/traceViewer/{uiMode.iq7CyYy7.js → uiMode.e-PLonGl.js} +2 -2
- package/lib/vite/traceViewer/uiMode.e_-GuqEi.js +1725 -0
- package/lib/vite/traceViewer/uiMode.f1YADWIl.js +1724 -0
- package/lib/vite/traceViewer/uiMode.html +3 -3
- package/lib/vite/traceViewer/uiMode.kHsXCfV8.js +1490 -0
- package/lib/vite/traceViewer/{workbench.B3X2QtYa.css → wsPort.162042f9.css} +63 -315
- package/lib/vite/traceViewer/{workbench.wuxQoE2z.css → wsPort.997c92cf.css} +145 -335
- package/lib/vite/traceViewer/wsPort.9c9a6767.css +1 -0
- package/lib/vite/traceViewer/xtermModule.125f4259.css +191 -0
- package/lib/vite/traceViewer/xtermModule.6428296b.css +32 -0
- package/package.json +1 -1
- package/lib/vite/recorder/assets/codeMirrorModule-d0KhC1qL.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-5yiV-3wl.js +0 -16831
- package/lib/vite/traceViewer/assets/codeMirrorModule-C6p3E9Zg.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-Ca-1BNel.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-CcviAl53.js +0 -16831
- package/lib/vite/traceViewer/assets/codeMirrorModule-CqYUz5ms.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-DS3v0XrQ.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-DZoSgqUd.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-MzSmL4X2.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-T_sdMrbM.js +0 -24
- package/lib/vite/traceViewer/assets/inspectorTab-BHcfR9dD.js +0 -64
- package/lib/vite/traceViewer/assets/inspectorTab-Bbgq0hgt.js +0 -64
- package/lib/vite/traceViewer/assets/inspectorTab-DhBbZz8I.js +0 -64
- package/lib/vite/traceViewer/assets/workbench-B13nfocr.js +0 -9
- package/lib/vite/traceViewer/assets/workbench-BwodYCgl.js +0 -19119
- package/lib/vite/traceViewer/assets/workbench-C43LWZEX.js +0 -72
- package/lib/vite/traceViewer/assets/workbench-DZqNXdoV.js +0 -9
- package/lib/vite/traceViewer/assets/workbench-DrQjKdyE.js +0 -72
- package/lib/vite/traceViewer/assets/workbench-Pa1v1Ojh.js +0 -72
- package/lib/vite/traceViewer/assets/workbench-caTaZnzx.js +0 -72
- package/lib/vite/traceViewer/assets/workbench-gtYcQBNA.js +0 -9
- package/lib/vite/traceViewer/assets/workbench-u2lRPMOT.js +0 -72
- package/lib/vite/traceViewer/assets/xtermModule-CZ7sDYXB.js +0 -6529
- package/lib/vite/traceViewer/embedded.BBZ9gQEw.js +0 -104
- package/lib/vite/traceViewer/embedded.BQq6Psnz.js +0 -104
- package/lib/vite/traceViewer/embedded.BVDVQOzc.js +0 -2
- package/lib/vite/traceViewer/embedded.Bn8Ptzv6.js +0 -2
- package/lib/vite/traceViewer/embedded.CorI3dFX.js +0 -104
- package/lib/vite/traceViewer/embedded.CvhnUgIi.js +0 -2
- package/lib/vite/traceViewer/embedded.D27cnKiB.js +0 -104
- package/lib/vite/traceViewer/embedded.D4lqGydT.js +0 -2
- package/lib/vite/traceViewer/embedded.DPqrDeET.js +0 -2
- package/lib/vite/traceViewer/embedded.DbzY7Q8w.js +0 -2
- package/lib/vite/traceViewer/embedded.Dxe2heQk.js +0 -2
- package/lib/vite/traceViewer/embedded.f-PLGsBT.js +0 -2
- package/lib/vite/traceViewer/index.B7aiTMfZ.js +0 -2
- package/lib/vite/traceViewer/index.B8dgQwuN.js +0 -2
- package/lib/vite/traceViewer/index.BGj8jY3H.js +0 -2
- package/lib/vite/traceViewer/index.BSak5QT9.js +0 -2
- package/lib/vite/traceViewer/index.BrT2kfuc.js +0 -2
- package/lib/vite/traceViewer/index.CB297BuW.js +0 -2
- package/lib/vite/traceViewer/index.CUpI-BFe.js +0 -195
- package/lib/vite/traceViewer/index.DkRbtWVo.js +0 -195
- package/lib/vite/traceViewer/index.DsjmhbB6.js +0 -195
- package/lib/vite/traceViewer/index._cX8k4co.js +0 -2
- package/lib/vite/traceViewer/index.pMAN88y-.js +0 -2
- package/lib/vite/traceViewer/recorder.C88JDknq.js +0 -2
- package/lib/vite/traceViewer/recorder.Ch-WHviK.js +0 -2
- package/lib/vite/traceViewer/recorder.POd-toIn.js +0 -2
- package/lib/vite/traceViewer/uiMode.2tr9k625.js +0 -5
- package/lib/vite/traceViewer/uiMode.BEZVCe5O.js +0 -5
- package/lib/vite/traceViewer/uiMode.C4nbcio6.js +0 -1730
- package/lib/vite/traceViewer/uiMode.D-tg1Oci.js +0 -1730
- package/lib/vite/traceViewer/uiMode.D3cNFP6u.css +0 -1
- package/lib/vite/traceViewer/uiMode.DKjMBMlc.js +0 -1730
- package/lib/vite/traceViewer/uiMode.DVrL7a1K.js +0 -10
- package/lib/vite/traceViewer/uiMode.DdtUZZVS.js +0 -5
- package/lib/vite/traceViewer/uiMode.Dg9oJCQU.js +0 -10
- package/lib/vite/traceViewer/uiMode.DwZAzstF.js +0 -10
- package/lib/vite/traceViewer/uiMode.O07awP3T.js +0 -10
- package/lib/vite/traceViewer/uiMode.gGHHTsyL.js +0 -1730
- package/lib/vite/traceViewer/uiMode.jY2s-9ps.js +0 -10
- package/lib/vite/traceViewer/workbench.DjbIuxix.css +0 -1
- package/lib/vite/traceViewer/workbench.DyTpxWVb.css +0 -1
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
function __vite__mapDeps(indexes) {
|
|
2
|
-
if (!__vite__mapDeps.viteFileDeps) {
|
|
3
|
-
__vite__mapDeps.viteFileDeps = ["./codeMirrorModule-Dx6AXgMV.js","../codeMirrorModule.Cy8X9Wtw.css"]
|
|
4
|
-
}
|
|
5
|
-
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
6
|
-
}
|
|
7
1
|
var __defProp = Object.defineProperty;
|
|
8
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
3
|
var __publicField = (obj, key, value) => {
|
|
@@ -354,14 +348,14 @@ const React = /* @__PURE__ */ getDefaultExportFromCjs(reactExports);
|
|
|
354
348
|
* This source code is licensed under the MIT license found in the
|
|
355
349
|
* LICENSE file in the root directory of this source tree.
|
|
356
350
|
*/
|
|
357
|
-
var f = reactExports, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m
|
|
351
|
+
var f = reactExports, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p$1 = { key: true, ref: true, __self: true, __source: true };
|
|
358
352
|
function q(c, a, g) {
|
|
359
353
|
var b, d = {}, e = null, h = null;
|
|
360
354
|
void 0 !== g && (e = "" + g);
|
|
361
355
|
void 0 !== a.key && (e = "" + a.key);
|
|
362
356
|
void 0 !== a.ref && (h = a.ref);
|
|
363
357
|
for (b in a)
|
|
364
|
-
m
|
|
358
|
+
m.call(a, b) && !p$1.hasOwnProperty(b) && (d[b] = a[b]);
|
|
365
359
|
if (c && c.defaultProps)
|
|
366
360
|
for (b in a = c.defaultProps, a)
|
|
367
361
|
void 0 === d[b] && (d[b] = a[b]);
|
|
@@ -408,7 +402,7 @@ function useMeasure() {
|
|
|
408
402
|
return [measure, ref];
|
|
409
403
|
}
|
|
410
404
|
function msToString(ms) {
|
|
411
|
-
if (
|
|
405
|
+
if (!isFinite(ms))
|
|
412
406
|
return "-";
|
|
413
407
|
if (ms === 0)
|
|
414
408
|
return "0";
|
|
@@ -464,37 +458,24 @@ function copy(text) {
|
|
|
464
458
|
document.execCommand("copy");
|
|
465
459
|
textArea.remove();
|
|
466
460
|
}
|
|
467
|
-
function useSetting(name, defaultValue
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
const
|
|
471
|
-
const setValueWrapper = React.useCallback((value2) => {
|
|
461
|
+
function useSetting(name, defaultValue) {
|
|
462
|
+
const value = name ? settings.getObject(name, defaultValue) : defaultValue;
|
|
463
|
+
const [state, setState] = React.useState(value);
|
|
464
|
+
const setStateWrapper = (value2) => {
|
|
472
465
|
if (name)
|
|
473
466
|
settings.setObject(name, value2);
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
React.useEffect(() => {
|
|
478
|
-
if (name) {
|
|
479
|
-
const onStoreChange = () => setValue(settings.getObject(name, defaultValue));
|
|
480
|
-
settings.onChangeEmitter.addEventListener(name, onStoreChange);
|
|
481
|
-
return () => settings.onChangeEmitter.removeEventListener(name, onStoreChange);
|
|
482
|
-
}
|
|
483
|
-
}, [defaultValue, name]);
|
|
484
|
-
return [value, setValueWrapper];
|
|
467
|
+
setState(value2);
|
|
468
|
+
};
|
|
469
|
+
return [state, setStateWrapper];
|
|
485
470
|
}
|
|
486
471
|
class Settings {
|
|
487
|
-
constructor() {
|
|
488
|
-
this.onChangeEmitter = new EventTarget();
|
|
489
|
-
}
|
|
490
472
|
getString(name, defaultValue) {
|
|
491
473
|
return localStorage[name] || defaultValue;
|
|
492
474
|
}
|
|
493
475
|
setString(name, value) {
|
|
494
|
-
var _a;
|
|
495
476
|
localStorage[name] = value;
|
|
496
|
-
|
|
497
|
-
|
|
477
|
+
if (window.saveSettings)
|
|
478
|
+
window.saveSettings();
|
|
498
479
|
}
|
|
499
480
|
getObject(name, defaultValue) {
|
|
500
481
|
if (!localStorage[name])
|
|
@@ -506,18 +487,12 @@ class Settings {
|
|
|
506
487
|
}
|
|
507
488
|
}
|
|
508
489
|
setObject(name, value) {
|
|
509
|
-
var _a;
|
|
510
490
|
localStorage[name] = JSON.stringify(value);
|
|
511
|
-
|
|
512
|
-
|
|
491
|
+
if (window.saveSettings)
|
|
492
|
+
window.saveSettings();
|
|
513
493
|
}
|
|
514
494
|
}
|
|
515
495
|
const settings = new Settings();
|
|
516
|
-
function clsx(...classes) {
|
|
517
|
-
return classes.filter(Boolean).join(" ");
|
|
518
|
-
}
|
|
519
|
-
const kControlCodesRe = "\\u0000-\\u0020\\u007f-\\u009f";
|
|
520
|
-
const kWebLinkRe = new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s" + kControlCodesRe + '"]{2,}[^\\s' + kControlCodesRe + `"')}\\],:;.!?]`, "ug");
|
|
521
496
|
function applyTheme() {
|
|
522
497
|
if (document.playwrightThemeInitialized)
|
|
523
498
|
return;
|
|
@@ -536,8 +511,12 @@ function applyTheme() {
|
|
|
536
511
|
}
|
|
537
512
|
const listeners = /* @__PURE__ */ new Set();
|
|
538
513
|
function toggleTheme() {
|
|
539
|
-
const oldTheme =
|
|
540
|
-
|
|
514
|
+
const oldTheme = settings.getString("theme", "light-mode");
|
|
515
|
+
let newTheme;
|
|
516
|
+
if (oldTheme === "dark-mode")
|
|
517
|
+
newTheme = "light-mode";
|
|
518
|
+
else
|
|
519
|
+
newTheme = "dark-mode";
|
|
541
520
|
if (oldTheme)
|
|
542
521
|
document.body.classList.remove(oldTheme);
|
|
543
522
|
document.body.classList.add(newTheme);
|
|
@@ -554,15 +533,6 @@ function removeThemeListener(listener) {
|
|
|
554
533
|
function currentTheme() {
|
|
555
534
|
return document.body.classList.contains("dark-mode") ? "dark-mode" : "light-mode";
|
|
556
535
|
}
|
|
557
|
-
function useDarkModeSetting() {
|
|
558
|
-
const [theme, setTheme] = React.useState(currentTheme() === "dark-mode");
|
|
559
|
-
return [theme, (value) => {
|
|
560
|
-
const current = currentTheme() === "dark-mode";
|
|
561
|
-
if (current !== value)
|
|
562
|
-
toggleTheme();
|
|
563
|
-
setTheme(value);
|
|
564
|
-
}];
|
|
565
|
-
}
|
|
566
536
|
var reactDom = { exports: {} };
|
|
567
537
|
var reactDom_production_min = {};
|
|
568
538
|
var scheduler = { exports: {} };
|
|
@@ -7780,12 +7750,6 @@ function checkDCE() {
|
|
|
7780
7750
|
reactDom.exports = reactDom_production_min;
|
|
7781
7751
|
}
|
|
7782
7752
|
var reactDomExports = reactDom.exports;
|
|
7783
|
-
var createRoot;
|
|
7784
|
-
var m = reactDomExports;
|
|
7785
|
-
{
|
|
7786
|
-
createRoot = m.createRoot;
|
|
7787
|
-
m.hydrateRoot;
|
|
7788
|
-
}
|
|
7789
7753
|
const ToolbarButton = ({
|
|
7790
7754
|
children,
|
|
7791
7755
|
title = "",
|
|
@@ -7794,11 +7758,9 @@ const ToolbarButton = ({
|
|
|
7794
7758
|
toggled = false,
|
|
7795
7759
|
onClick = () => {
|
|
7796
7760
|
},
|
|
7797
|
-
style
|
|
7798
|
-
testId,
|
|
7799
|
-
className
|
|
7761
|
+
style
|
|
7800
7762
|
}) => {
|
|
7801
|
-
className =
|
|
7763
|
+
let className = `toolbar-button ${icon}`;
|
|
7802
7764
|
if (toggled)
|
|
7803
7765
|
className += " toggled";
|
|
7804
7766
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -7811,7 +7773,6 @@ const ToolbarButton = ({
|
|
|
7811
7773
|
title,
|
|
7812
7774
|
disabled: !!disabled,
|
|
7813
7775
|
style,
|
|
7814
|
-
"data-testid": testId,
|
|
7815
7776
|
children: [
|
|
7816
7777
|
icon && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `codicon codicon-${icon}`, style: children ? { marginRight: 5 } : {} }),
|
|
7817
7778
|
children
|
|
@@ -7850,24 +7811,24 @@ class MultiTraceModel {
|
|
|
7850
7811
|
__publicField(this, "sources");
|
|
7851
7812
|
__publicField(this, "resources");
|
|
7852
7813
|
contexts.forEach((contextEntry) => indexModel(contextEntry));
|
|
7853
|
-
const
|
|
7854
|
-
this.browserName = (
|
|
7855
|
-
this.sdkLanguage =
|
|
7856
|
-
this.channel =
|
|
7857
|
-
this.testIdAttributeName =
|
|
7858
|
-
this.platform = (
|
|
7859
|
-
this.title = (
|
|
7860
|
-
this.options = (
|
|
7861
|
-
this.actions = mergeActionsAndUpdateTiming(contexts);
|
|
7862
|
-
this.pages = [].concat(...contexts.map((c) => c.pages));
|
|
7814
|
+
const primaryContext = contexts.find((context2) => context2.isPrimary);
|
|
7815
|
+
this.browserName = (primaryContext == null ? void 0 : primaryContext.browserName) || "";
|
|
7816
|
+
this.sdkLanguage = primaryContext == null ? void 0 : primaryContext.sdkLanguage;
|
|
7817
|
+
this.channel = primaryContext == null ? void 0 : primaryContext.channel;
|
|
7818
|
+
this.testIdAttributeName = primaryContext == null ? void 0 : primaryContext.testIdAttributeName;
|
|
7819
|
+
this.platform = (primaryContext == null ? void 0 : primaryContext.platform) || "";
|
|
7820
|
+
this.title = (primaryContext == null ? void 0 : primaryContext.title) || "";
|
|
7821
|
+
this.options = (primaryContext == null ? void 0 : primaryContext.options) || {};
|
|
7863
7822
|
this.wallTime = contexts.map((c) => c.wallTime).reduce((prev, cur) => Math.min(prev || Number.MAX_VALUE, cur), Number.MAX_VALUE);
|
|
7864
7823
|
this.startTime = contexts.map((c) => c.startTime).reduce((prev, cur) => Math.min(prev, cur), Number.MAX_VALUE);
|
|
7865
7824
|
this.endTime = contexts.map((c) => c.endTime).reduce((prev, cur) => Math.max(prev, cur), Number.MIN_VALUE);
|
|
7825
|
+
this.pages = [].concat(...contexts.map((c) => c.pages));
|
|
7826
|
+
this.actions = mergeActions(contexts);
|
|
7866
7827
|
this.events = [].concat(...contexts.map((c) => c.events));
|
|
7867
7828
|
this.stdio = [].concat(...contexts.map((c) => c.stdio));
|
|
7868
7829
|
this.errors = [].concat(...contexts.map((c) => c.errors));
|
|
7869
7830
|
this.hasSource = contexts.some((c) => c.hasSource);
|
|
7870
|
-
this.hasStepData = contexts.some((context2) => context2.
|
|
7831
|
+
this.hasStepData = contexts.some((context2) => !context2.isPrimary);
|
|
7871
7832
|
this.resources = [...contexts.map((c) => c.resources)].flat();
|
|
7872
7833
|
this.events.sort((a1, a2) => a1.time - a2.time);
|
|
7873
7834
|
this.resources.sort((a1, a2) => a1._monotonicTime - a2._monotonicTime);
|
|
@@ -7920,74 +7881,31 @@ function indexModel(context2) {
|
|
|
7920
7881
|
}
|
|
7921
7882
|
for (const event of context2.events)
|
|
7922
7883
|
event[contextSymbol] = context2;
|
|
7923
|
-
for (const resource of context2.resources)
|
|
7924
|
-
resource[contextSymbol] = context2;
|
|
7925
|
-
}
|
|
7926
|
-
function mergeActionsAndUpdateTiming(contexts) {
|
|
7927
|
-
const traceFileToContexts = /* @__PURE__ */ new Map();
|
|
7928
|
-
for (const context2 of contexts) {
|
|
7929
|
-
const traceFile = context2.traceUrl;
|
|
7930
|
-
let list = traceFileToContexts.get(traceFile);
|
|
7931
|
-
if (!list) {
|
|
7932
|
-
list = [];
|
|
7933
|
-
traceFileToContexts.set(traceFile, list);
|
|
7934
|
-
}
|
|
7935
|
-
list.push(context2);
|
|
7936
|
-
}
|
|
7937
|
-
const result = [];
|
|
7938
|
-
let traceFileId = 0;
|
|
7939
|
-
for (const [, contexts2] of traceFileToContexts) {
|
|
7940
|
-
if (traceFileToContexts.size > 1)
|
|
7941
|
-
makeCallIdsUniqueAcrossTraceFiles(contexts2, ++traceFileId);
|
|
7942
|
-
const actions = mergeActionsAndUpdateTimingSameTrace(contexts2);
|
|
7943
|
-
result.push(...actions);
|
|
7944
|
-
}
|
|
7945
|
-
result.sort((a1, a2) => {
|
|
7946
|
-
if (a2.parentId === a1.callId)
|
|
7947
|
-
return -1;
|
|
7948
|
-
if (a1.parentId === a2.callId)
|
|
7949
|
-
return 1;
|
|
7950
|
-
return a1.startTime - a2.startTime;
|
|
7951
|
-
});
|
|
7952
|
-
for (let i = 1; i < result.length; ++i)
|
|
7953
|
-
result[i][prevInListSymbol] = result[i - 1];
|
|
7954
|
-
return result;
|
|
7955
|
-
}
|
|
7956
|
-
function makeCallIdsUniqueAcrossTraceFiles(contexts, traceFileId) {
|
|
7957
|
-
for (const context2 of contexts) {
|
|
7958
|
-
for (const action of context2.actions) {
|
|
7959
|
-
if (action.callId)
|
|
7960
|
-
action.callId = `${traceFileId}:${action.callId}`;
|
|
7961
|
-
if (action.parentId)
|
|
7962
|
-
action.parentId = `${traceFileId}:${action.parentId}`;
|
|
7963
|
-
}
|
|
7964
|
-
}
|
|
7965
7884
|
}
|
|
7966
|
-
function
|
|
7885
|
+
function mergeActions(contexts) {
|
|
7967
7886
|
const map = /* @__PURE__ */ new Map();
|
|
7968
|
-
|
|
7969
|
-
const
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
for (const context2 of libraryContexts) {
|
|
7977
|
-
for (const action of context2.actions) {
|
|
7978
|
-
const key = matchByStepId ? action.stepId : `${action.apiName}@${action.wallTime}`;
|
|
7979
|
-
map.set(key, { ...action, context: context2 });
|
|
7980
|
-
}
|
|
7887
|
+
let offset = 0;
|
|
7888
|
+
const primaryContexts = contexts.filter((context2) => context2.isPrimary);
|
|
7889
|
+
const nonPrimaryContexts = contexts.filter((context2) => !context2.isPrimary);
|
|
7890
|
+
for (const context2 of primaryContexts) {
|
|
7891
|
+
for (const action of context2.actions)
|
|
7892
|
+
map.set(`${action.apiName}@${action.wallTime}`, { ...action, context: context2 });
|
|
7893
|
+
if (!offset && context2.actions.length)
|
|
7894
|
+
offset = context2.actions[0].startTime - context2.actions[0].wallTime;
|
|
7981
7895
|
}
|
|
7982
|
-
const delta = monotonicTimeDeltaBetweenLibraryAndRunner(testRunnerContexts, map, matchByStepId);
|
|
7983
|
-
if (delta)
|
|
7984
|
-
adjustMonotonicTime(libraryContexts, delta);
|
|
7985
7896
|
const nonPrimaryIdToPrimaryId = /* @__PURE__ */ new Map();
|
|
7986
|
-
for (const context2 of
|
|
7897
|
+
for (const context2 of nonPrimaryContexts) {
|
|
7987
7898
|
for (const action of context2.actions) {
|
|
7988
|
-
|
|
7899
|
+
if (offset) {
|
|
7900
|
+
const duration = action.endTime - action.startTime;
|
|
7901
|
+
if (action.startTime)
|
|
7902
|
+
action.startTime = action.wallTime + offset;
|
|
7903
|
+
if (action.endTime)
|
|
7904
|
+
action.endTime = action.startTime + duration;
|
|
7905
|
+
}
|
|
7906
|
+
const key = `${action.apiName}@${action.wallTime}`;
|
|
7989
7907
|
const existing = map.get(key);
|
|
7990
|
-
if (existing) {
|
|
7908
|
+
if (existing && existing.apiName === action.apiName) {
|
|
7991
7909
|
nonPrimaryIdToPrimaryId.set(action.callId, existing.callId);
|
|
7992
7910
|
if (action.error)
|
|
7993
7911
|
existing.error = action.error;
|
|
@@ -7995,8 +7913,6 @@ function mergeActionsAndUpdateTimingSameTrace(contexts) {
|
|
|
7995
7913
|
existing.attachments = action.attachments;
|
|
7996
7914
|
if (action.parentId)
|
|
7997
7915
|
existing.parentId = nonPrimaryIdToPrimaryId.get(action.parentId) ?? action.parentId;
|
|
7998
|
-
existing.startTime = action.startTime;
|
|
7999
|
-
existing.endTime = action.endTime;
|
|
8000
7916
|
continue;
|
|
8001
7917
|
}
|
|
8002
7918
|
if (action.parentId)
|
|
@@ -8004,44 +7920,17 @@ function mergeActionsAndUpdateTimingSameTrace(contexts) {
|
|
|
8004
7920
|
map.set(key, { ...action, context: context2 });
|
|
8005
7921
|
}
|
|
8006
7922
|
}
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
}
|
|
8019
|
-
for (const event of context2.events)
|
|
8020
|
-
event.time += monotonicTimeDelta;
|
|
8021
|
-
for (const event of context2.stdio)
|
|
8022
|
-
event.timestamp += monotonicTimeDelta;
|
|
8023
|
-
for (const page of context2.pages) {
|
|
8024
|
-
for (const frame of page.screencastFrames)
|
|
8025
|
-
frame.timestamp += monotonicTimeDelta;
|
|
8026
|
-
}
|
|
8027
|
-
for (const resource of context2.resources) {
|
|
8028
|
-
if (resource._monotonicTime)
|
|
8029
|
-
resource._monotonicTime += monotonicTimeDelta;
|
|
8030
|
-
}
|
|
8031
|
-
}
|
|
8032
|
-
}
|
|
8033
|
-
function monotonicTimeDeltaBetweenLibraryAndRunner(nonPrimaryContexts, libraryActions, matchByStepId) {
|
|
8034
|
-
for (const context2 of nonPrimaryContexts) {
|
|
8035
|
-
for (const action of context2.actions) {
|
|
8036
|
-
if (!action.startTime)
|
|
8037
|
-
continue;
|
|
8038
|
-
const key = matchByStepId ? action.stepId : `${action.apiName}@${action.wallTime}`;
|
|
8039
|
-
const libraryAction = libraryActions.get(key);
|
|
8040
|
-
if (libraryAction)
|
|
8041
|
-
return action.startTime - libraryAction.startTime;
|
|
8042
|
-
}
|
|
8043
|
-
}
|
|
8044
|
-
return 0;
|
|
7923
|
+
const result = [...map.values()];
|
|
7924
|
+
result.sort((a1, a2) => {
|
|
7925
|
+
if (a2.parentId === a1.callId)
|
|
7926
|
+
return -1;
|
|
7927
|
+
if (a1.parentId === a2.callId)
|
|
7928
|
+
return 1;
|
|
7929
|
+
return a1.wallTime - a2.wallTime || a1.startTime - a2.startTime;
|
|
7930
|
+
});
|
|
7931
|
+
for (let i = 1; i < result.length; ++i)
|
|
7932
|
+
result[i][prevInListSymbol] = result[i - 1];
|
|
7933
|
+
return result;
|
|
8045
7934
|
}
|
|
8046
7935
|
function buildActionTree(actions) {
|
|
8047
7936
|
const itemMap = /* @__PURE__ */ new Map();
|
|
@@ -8123,30 +8012,6 @@ function collectSources(actions, errorDescriptors) {
|
|
|
8123
8012
|
}
|
|
8124
8013
|
return result;
|
|
8125
8014
|
}
|
|
8126
|
-
const kRouteMethods = /* @__PURE__ */ new Set([
|
|
8127
|
-
"page.route",
|
|
8128
|
-
"page.routefromhar",
|
|
8129
|
-
"page.unroute",
|
|
8130
|
-
"page.unrouteall",
|
|
8131
|
-
"browsercontext.route",
|
|
8132
|
-
"browsercontext.routefromhar",
|
|
8133
|
-
"browsercontext.unroute",
|
|
8134
|
-
"browsercontext.unrouteall"
|
|
8135
|
-
]);
|
|
8136
|
-
{
|
|
8137
|
-
for (const method of [...kRouteMethods])
|
|
8138
|
-
kRouteMethods.add(method + "async");
|
|
8139
|
-
for (const method of [
|
|
8140
|
-
"page.route_from_har",
|
|
8141
|
-
"page.unroute_all",
|
|
8142
|
-
"context.route_from_har",
|
|
8143
|
-
"context.unroute_all"
|
|
8144
|
-
])
|
|
8145
|
-
kRouteMethods.add(method);
|
|
8146
|
-
}
|
|
8147
|
-
function isRouteAction(action) {
|
|
8148
|
-
return action.class === "Route" || kRouteMethods.has(action.apiName.toLowerCase());
|
|
8149
|
-
}
|
|
8150
8015
|
const kMinSize = 50;
|
|
8151
8016
|
const SplitView = ({
|
|
8152
8017
|
sidebarSize,
|
|
@@ -8155,12 +8020,10 @@ const SplitView = ({
|
|
|
8155
8020
|
orientation = "vertical",
|
|
8156
8021
|
minSidebarSize = kMinSize,
|
|
8157
8022
|
settingName,
|
|
8158
|
-
|
|
8159
|
-
main
|
|
8023
|
+
children
|
|
8160
8024
|
}) => {
|
|
8161
|
-
const
|
|
8162
|
-
const [
|
|
8163
|
-
const [vSize, setVSize] = useSetting(settingName ? settingName + "." + orientation + ":size" : void 0, defaultSize);
|
|
8025
|
+
const [hSize, setHSize] = useSetting(settingName ? settingName + "." + orientation + ":size" : void 0, Math.max(minSidebarSize, sidebarSize) * window.devicePixelRatio);
|
|
8026
|
+
const [vSize, setVSize] = useSetting(settingName ? settingName + "." + orientation + ":size" : void 0, Math.max(minSidebarSize, sidebarSize) * window.devicePixelRatio);
|
|
8164
8027
|
const [resizing, setResizing] = reactExports.useState(null);
|
|
8165
8028
|
const [measure, ref] = useMeasure();
|
|
8166
8029
|
let size;
|
|
@@ -8173,6 +8036,7 @@ const SplitView = ({
|
|
|
8173
8036
|
if (measure && measure.width < size)
|
|
8174
8037
|
size = measure.width - 10;
|
|
8175
8038
|
}
|
|
8039
|
+
const childrenArray = reactExports.Children.toArray(children);
|
|
8176
8040
|
document.body.style.userSelect = resizing ? "none" : "inherit";
|
|
8177
8041
|
let resizerStyle = {};
|
|
8178
8042
|
if (orientation === "vertical") {
|
|
@@ -8186,9 +8050,9 @@ const SplitView = ({
|
|
|
8186
8050
|
else
|
|
8187
8051
|
resizerStyle = { right: resizing ? 0 : size - 4, left: resizing ? 0 : void 0, width: resizing ? "initial" : 8 };
|
|
8188
8052
|
}
|
|
8189
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className:
|
|
8190
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "split-view-main", children:
|
|
8191
|
-
!sidebarHidden && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { flexBasis: size }, className: "split-view-sidebar", children:
|
|
8053
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "split-view " + orientation + (sidebarIsFirst ? " sidebar-first" : ""), ref, children: [
|
|
8054
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "split-view-main", children: childrenArray[0] }),
|
|
8055
|
+
!sidebarHidden && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { flexBasis: size }, className: "split-view-sidebar", children: childrenArray[1] }),
|
|
8192
8056
|
!sidebarHidden && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8193
8057
|
"div",
|
|
8194
8058
|
{
|
|
@@ -8254,17 +8118,8 @@ function cssEscapeOne(s, i) {
|
|
|
8254
8118
|
return s.charAt(i);
|
|
8255
8119
|
return "\\" + s.charAt(i);
|
|
8256
8120
|
}
|
|
8257
|
-
let normalizedWhitespaceCache;
|
|
8258
|
-
function cacheNormalizedWhitespaces() {
|
|
8259
|
-
normalizedWhitespaceCache = /* @__PURE__ */ new Map();
|
|
8260
|
-
}
|
|
8261
8121
|
function normalizeWhiteSpace(text) {
|
|
8262
|
-
|
|
8263
|
-
if (result === void 0) {
|
|
8264
|
-
result = text.replace(/\u200b/g, "").trim().replace(/\s+/g, " ");
|
|
8265
|
-
normalizedWhitespaceCache == null ? void 0 : normalizedWhitespaceCache.set(text, result);
|
|
8266
|
-
}
|
|
8267
|
-
return result;
|
|
8122
|
+
return text.replace(/\u200b/g, "").trim().replace(/\s+/g, " ");
|
|
8268
8123
|
}
|
|
8269
8124
|
function normalizeEscapedRegexQuotes(source) {
|
|
8270
8125
|
return source.replace(/(^|[^\\])(\\\\)*\\(['"`])/g, "$1$2$3");
|
|
@@ -8295,16 +8150,6 @@ function trimString(input, cap, suffix = "") {
|
|
|
8295
8150
|
function trimStringWithEllipsis(input, cap) {
|
|
8296
8151
|
return trimString(input, cap, "…");
|
|
8297
8152
|
}
|
|
8298
|
-
function escapeRegExp(s) {
|
|
8299
|
-
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
8300
|
-
}
|
|
8301
|
-
const escaped = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" };
|
|
8302
|
-
function escapeHTMLAttribute(s) {
|
|
8303
|
-
return s.replace(/[&<>"']/ug, (char) => escaped[char]);
|
|
8304
|
-
}
|
|
8305
|
-
function escapeHTML$1(s) {
|
|
8306
|
-
return s.replace(/[&<]/ug, (char) => escaped[char]);
|
|
8307
|
-
}
|
|
8308
8153
|
const between = function(num, first, last) {
|
|
8309
8154
|
return num >= first && num <= last;
|
|
8310
8155
|
};
|
|
@@ -10337,7 +10182,7 @@ function ListView({
|
|
|
10337
10182
|
onIconClicked,
|
|
10338
10183
|
noItemsMessage,
|
|
10339
10184
|
dataTestId,
|
|
10340
|
-
|
|
10185
|
+
noHighlightOnHover
|
|
10341
10186
|
}) {
|
|
10342
10187
|
const itemListRef = reactExports.useRef(null);
|
|
10343
10188
|
const [highlightedItem, setHighlightedItem] = reactExports.useState();
|
|
@@ -10358,11 +10203,12 @@ function ListView({
|
|
|
10358
10203
|
if (itemListRef.current)
|
|
10359
10204
|
itemListRef.current.scrollTop = scrollPositions.get(name) || 0;
|
|
10360
10205
|
}, [name]);
|
|
10361
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className:
|
|
10206
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "list-view vbox", role: items.length > 0 ? "list" : void 0, "data-testid": dataTestId || name + "-list", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10362
10207
|
"div",
|
|
10363
10208
|
{
|
|
10364
|
-
className:
|
|
10209
|
+
className: "list-view-content",
|
|
10365
10210
|
tabIndex: 0,
|
|
10211
|
+
onDoubleClick: () => selectedItem && (onAccepted == null ? void 0 : onAccepted(selectedItem, items.indexOf(selectedItem))),
|
|
10366
10212
|
onKeyDown: (event) => {
|
|
10367
10213
|
var _a;
|
|
10368
10214
|
if (selectedItem && event.key === "Enter") {
|
|
@@ -10399,27 +10245,23 @@ function ListView({
|
|
|
10399
10245
|
scrollIntoViewIfNeeded(element || void 0);
|
|
10400
10246
|
onHighlighted == null ? void 0 : onHighlighted(void 0);
|
|
10401
10247
|
onSelected == null ? void 0 : onSelected(items[newIndex], newIndex);
|
|
10402
|
-
setHighlightedItem(void 0);
|
|
10403
10248
|
},
|
|
10404
10249
|
ref: itemListRef,
|
|
10405
10250
|
children: [
|
|
10406
10251
|
noItemsMessage && items.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "list-view-empty", children: noItemsMessage }),
|
|
10407
10252
|
items.map((item, index) => {
|
|
10253
|
+
const selectedSuffix = selectedItem === item ? " selected" : "";
|
|
10254
|
+
const highlightedSuffix = !noHighlightOnHover && highlightedItem === item ? " highlighted" : "";
|
|
10255
|
+
const errorSuffix = (isError == null ? void 0 : isError(item, index)) ? " error" : "";
|
|
10256
|
+
const warningSuffix = (isWarning == null ? void 0 : isWarning(item, index)) ? " warning" : "";
|
|
10257
|
+
const infoSuffix = (isInfo == null ? void 0 : isInfo(item, index)) ? " info" : "";
|
|
10408
10258
|
const indentation = (indent == null ? void 0 : indent(item, index)) || 0;
|
|
10409
10259
|
const rendered = render(item, index);
|
|
10410
10260
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
10411
10261
|
"div",
|
|
10412
10262
|
{
|
|
10413
|
-
onDoubleClick: () => onAccepted == null ? void 0 : onAccepted(item, index),
|
|
10414
10263
|
role: "listitem",
|
|
10415
|
-
className:
|
|
10416
|
-
"list-view-entry",
|
|
10417
|
-
selectedItem === item && "selected",
|
|
10418
|
-
!notSelectable && highlightedItem === item && "highlighted",
|
|
10419
|
-
(isError == null ? void 0 : isError(item, index)) && "error",
|
|
10420
|
-
(isWarning == null ? void 0 : isWarning(item, index)) && "warning",
|
|
10421
|
-
(isInfo == null ? void 0 : isInfo(item, index)) && "info"
|
|
10422
|
-
),
|
|
10264
|
+
className: "list-view-entry" + selectedSuffix + highlightedSuffix + errorSuffix + warningSuffix + infoSuffix,
|
|
10423
10265
|
onClick: () => onSelected == null ? void 0 : onSelected(item, index),
|
|
10424
10266
|
onMouseEnter: () => setHighlightedItem(item),
|
|
10425
10267
|
onMouseLeave: () => setHighlightedItem(void 0),
|
|
@@ -10642,8 +10484,7 @@ const renderAction = (action, options) => {
|
|
|
10642
10484
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "action-title", title: action.apiName, children: [
|
|
10643
10485
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: action.apiName }),
|
|
10644
10486
|
locator && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "action-selector", title: locator, children: locator }),
|
|
10645
|
-
action.method === "goto" && action.params.url && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "action-url", title: action.params.url, children: action.params.url })
|
|
10646
|
-
action.class === "APIRequestContext" && action.params.url && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "action-url", title: action.params.url, children: excludeOrigin(action.params.url) })
|
|
10487
|
+
action.method === "goto" && action.params.url && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "action-url", title: action.params.url, children: action.params.url })
|
|
10647
10488
|
] }),
|
|
10648
10489
|
(showDuration || showBadges) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "spacer" }),
|
|
10649
10490
|
showDuration && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "action-duration", children: time || /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "codicon codicon-loading" }) }),
|
|
@@ -10659,27 +10500,19 @@ const renderAction = (action, options) => {
|
|
|
10659
10500
|
] })
|
|
10660
10501
|
] });
|
|
10661
10502
|
};
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
const urlObject = new URL(url);
|
|
10665
|
-
return urlObject.pathname + urlObject.search;
|
|
10666
|
-
} catch (error) {
|
|
10667
|
-
return url;
|
|
10668
|
-
}
|
|
10669
|
-
}
|
|
10670
|
-
const CopyToClipboard = ({ value, description }) => {
|
|
10671
|
-
const [icon, setIcon] = reactExports.useState("copy");
|
|
10503
|
+
const CopyToClipboard = ({ value }) => {
|
|
10504
|
+
const [iconClassName, setIconClassName] = reactExports.useState("codicon-clippy");
|
|
10672
10505
|
const handleCopy = reactExports.useCallback(() => {
|
|
10673
10506
|
navigator.clipboard.writeText(value).then(() => {
|
|
10674
|
-
|
|
10507
|
+
setIconClassName("codicon-check");
|
|
10675
10508
|
setTimeout(() => {
|
|
10676
|
-
|
|
10509
|
+
setIconClassName("codicon-clippy");
|
|
10677
10510
|
}, 3e3);
|
|
10678
10511
|
}, () => {
|
|
10679
|
-
|
|
10512
|
+
setIconClassName("codicon-close");
|
|
10680
10513
|
});
|
|
10681
10514
|
}, [value]);
|
|
10682
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
10515
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `copy-icon codicon ${iconClassName}`, onClick: handleCopy });
|
|
10683
10516
|
};
|
|
10684
10517
|
const PlaceholderPanel = ({ text }) => {
|
|
10685
10518
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "fill", style: {
|
|
@@ -10697,8 +10530,7 @@ const CallTab = ({ action, sdkLanguage }) => {
|
|
|
10697
10530
|
const params = { ...action.params };
|
|
10698
10531
|
delete params.info;
|
|
10699
10532
|
const paramKeys = Object.keys(params);
|
|
10700
|
-
const
|
|
10701
|
-
const wallTime = new Date(timeMillis).toLocaleString();
|
|
10533
|
+
const wallTime = action.wallTime ? new Date(action.wallTime).toLocaleString() : null;
|
|
10702
10534
|
const duration = action.endTime ? msToString(action.endTime - action.startTime) : "Timed Out";
|
|
10703
10535
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "call-tab", children: [
|
|
10704
10536
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "call-line", children: action.apiName }),
|
|
@@ -10728,7 +10560,7 @@ function renderProperty(property, key) {
|
|
|
10728
10560
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "call-line", children: [
|
|
10729
10561
|
property.name,
|
|
10730
10562
|
":",
|
|
10731
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className:
|
|
10563
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `call-value ${property.type}`, title: property.text, children: text }),
|
|
10732
10564
|
["string", "number", "object", "locator"].includes(property.type) && /* @__PURE__ */ jsxRuntimeExports.jsx(CopyToClipboard, { value: property.text })
|
|
10733
10565
|
] }, key);
|
|
10734
10566
|
}
|
|
@@ -10796,7 +10628,7 @@ const LogTab = ({ action, isLive }) => {
|
|
|
10796
10628
|
if (!action || !action.log.length)
|
|
10797
10629
|
return [];
|
|
10798
10630
|
const log = action.log;
|
|
10799
|
-
const wallTimeOffset = action.
|
|
10631
|
+
const wallTimeOffset = action.wallTime - action.startTime;
|
|
10800
10632
|
const entries2 = [];
|
|
10801
10633
|
for (let i = 0; i < log.length; ++i) {
|
|
10802
10634
|
let time = "";
|
|
@@ -10829,7 +10661,7 @@ const LogTab = ({ action, isLive }) => {
|
|
|
10829
10661
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "log-list-duration", children: entry.time }),
|
|
10830
10662
|
entry.message
|
|
10831
10663
|
] }),
|
|
10832
|
-
|
|
10664
|
+
noHighlightOnHover: true
|
|
10833
10665
|
}
|
|
10834
10666
|
);
|
|
10835
10667
|
};
|
|
@@ -11051,23 +10883,21 @@ function useConsoleTabModel(model, selectedTime) {
|
|
|
11051
10883
|
}, [entries, selectedTime]);
|
|
11052
10884
|
return { entries: filteredEntries };
|
|
11053
10885
|
}
|
|
11054
|
-
const ConsoleTab = ({ consoleModel, boundaries
|
|
10886
|
+
const ConsoleTab = ({ consoleModel, boundaries }) => {
|
|
11055
10887
|
if (!consoleModel.entries.length)
|
|
11056
10888
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(PlaceholderPanel, { text: "No console entries" });
|
|
11057
10889
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "console-tab", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11058
10890
|
ConsoleListView,
|
|
11059
10891
|
{
|
|
11060
10892
|
name: "console",
|
|
11061
|
-
onAccepted,
|
|
11062
|
-
onHighlighted: onEntryHovered,
|
|
11063
10893
|
items: consoleModel.entries,
|
|
11064
10894
|
isError: (entry) => entry.isError,
|
|
11065
10895
|
isWarning: (entry) => entry.isWarning,
|
|
11066
10896
|
render: (entry) => {
|
|
11067
10897
|
const timestamp = msToString(entry.timestamp - boundaries.minimum);
|
|
11068
10898
|
const timestampElement = /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "console-time", children: timestamp });
|
|
11069
|
-
const errorSuffix = entry.isError ? "status-error" : entry.isWarning ? "status-warning" : "status-none";
|
|
11070
|
-
const statusElement = entry.browserMessage || entry.browserError ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className:
|
|
10899
|
+
const errorSuffix = entry.isError ? " status-error" : entry.isWarning ? " status-warning" : " status-none";
|
|
10900
|
+
const statusElement = entry.browserMessage || entry.browserError ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "codicon codicon-browser" + errorSuffix, title: "Browser message" }) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "codicon codicon-file" + errorSuffix, title: "Runner message" });
|
|
11071
10901
|
let locationText;
|
|
11072
10902
|
let messageBody;
|
|
11073
10903
|
let messageInnerHTML;
|
|
@@ -11177,11 +11007,9 @@ function supportProperty(cssKey) {
|
|
|
11177
11007
|
const Toolbar = ({
|
|
11178
11008
|
noShadow,
|
|
11179
11009
|
children,
|
|
11180
|
-
noMinHeight
|
|
11181
|
-
className,
|
|
11182
|
-
onClick
|
|
11010
|
+
noMinHeight
|
|
11183
11011
|
}) => {
|
|
11184
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className:
|
|
11012
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "toolbar" + (noShadow ? " no-shadow" : "") + (noMinHeight ? " no-min-height" : ""), children });
|
|
11185
11013
|
};
|
|
11186
11014
|
const TabbedPane = ({ tabs, selectedTab, setSelectedTab, leftToolbar, rightToolbar, dataTestId, mode }) => {
|
|
11187
11015
|
if (!mode)
|
|
@@ -11201,22 +11029,25 @@ const TabbedPane = ({ tabs, selectedTab, setSelectedTab, leftToolbar, rightToolb
|
|
|
11201
11029
|
errorCount: tab.errorCount,
|
|
11202
11030
|
selected: selectedTab === tab.id,
|
|
11203
11031
|
onSelect: setSelectedTab
|
|
11204
|
-
}
|
|
11205
|
-
tab.id
|
|
11032
|
+
}
|
|
11206
11033
|
))
|
|
11207
11034
|
] }),
|
|
11208
11035
|
mode === "select" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { flex: "auto", display: "flex", height: "100%", overflow: "hidden" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("select", { style: { width: "100%", background: "none", cursor: "pointer" }, onChange: (e) => {
|
|
11209
11036
|
setSelectedTab(tabs[e.currentTarget.selectedIndex].id);
|
|
11210
11037
|
}, children: tabs.map((tab) => {
|
|
11211
11038
|
let suffix = "";
|
|
11212
|
-
if (tab.count)
|
|
11213
|
-
suffix =
|
|
11214
|
-
if (tab.
|
|
11215
|
-
suffix = `
|
|
11039
|
+
if (tab.count === 1)
|
|
11040
|
+
suffix = " 🔵";
|
|
11041
|
+
else if (tab.count)
|
|
11042
|
+
suffix = ` 🔵✖️${tab.count}`;
|
|
11043
|
+
if (tab.errorCount === 1)
|
|
11044
|
+
suffix = ` 🔴`;
|
|
11045
|
+
else if (tab.errorCount)
|
|
11046
|
+
suffix = ` 🔴✖️${tab.errorCount}`;
|
|
11216
11047
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("option", { value: tab.id, selected: tab.id === selectedTab, children: [
|
|
11217
11048
|
tab.title,
|
|
11218
11049
|
suffix
|
|
11219
|
-
] }
|
|
11050
|
+
] });
|
|
11220
11051
|
}) }) }),
|
|
11221
11052
|
rightToolbar && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { flex: "none", display: "flex", alignItems: "center" }, children: [
|
|
11222
11053
|
...rightToolbar
|
|
@@ -11235,7 +11066,7 @@ const TabbedPaneTab = ({ id: id2, title, count, errorCount, selected, onSelect }
|
|
|
11235
11066
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
11236
11067
|
"div",
|
|
11237
11068
|
{
|
|
11238
|
-
className:
|
|
11069
|
+
className: "tabbed-pane-tab " + (selected ? "selected" : ""),
|
|
11239
11070
|
onClick: () => onSelect(id2),
|
|
11240
11071
|
title,
|
|
11241
11072
|
children: [
|
|
@@ -11256,8 +11087,6 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
|
11256
11087
|
let promise = Promise.resolve();
|
|
11257
11088
|
if (deps && deps.length > 0) {
|
|
11258
11089
|
const links = document.getElementsByTagName("link");
|
|
11259
|
-
const cspNonceMeta = document.querySelector("meta[property=csp-nonce]");
|
|
11260
|
-
const cspNonce = (cspNonceMeta == null ? void 0 : cspNonceMeta.nonce) || (cspNonceMeta == null ? void 0 : cspNonceMeta.getAttribute("nonce"));
|
|
11261
11090
|
promise = Promise.all(deps.map((dep) => {
|
|
11262
11091
|
dep = assetsURL(dep, importerUrl);
|
|
11263
11092
|
if (dep in seen)
|
|
@@ -11283,9 +11112,6 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
|
11283
11112
|
link.crossOrigin = "";
|
|
11284
11113
|
}
|
|
11285
11114
|
link.href = dep;
|
|
11286
|
-
if (cspNonce) {
|
|
11287
|
-
link.setAttribute("nonce", cspNonce);
|
|
11288
|
-
}
|
|
11289
11115
|
document.head.appendChild(link);
|
|
11290
11116
|
if (isCss) {
|
|
11291
11117
|
return new Promise((res, rej) => {
|
|
@@ -11307,8 +11133,6 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
|
11307
11133
|
const CodeMirrorWrapper = ({
|
|
11308
11134
|
text,
|
|
11309
11135
|
language,
|
|
11310
|
-
mimeType,
|
|
11311
|
-
linkify,
|
|
11312
11136
|
readOnly,
|
|
11313
11137
|
highlight,
|
|
11314
11138
|
revealLine,
|
|
@@ -11319,18 +11143,29 @@ const CodeMirrorWrapper = ({
|
|
|
11319
11143
|
onChange
|
|
11320
11144
|
}) => {
|
|
11321
11145
|
const [measure, codemirrorElement] = useMeasure();
|
|
11322
|
-
const [modulePromise] = reactExports.useState(__vitePreload(() => import("./codeMirrorModule-
|
|
11146
|
+
const [modulePromise] = reactExports.useState(__vitePreload(() => import("./codeMirrorModule-uWDlVSQz.js"), true ? __vite__mapDeps([0,1]) : void 0, import.meta.url).then((m2) => m2.default));
|
|
11323
11147
|
const codemirrorRef = reactExports.useRef(null);
|
|
11324
11148
|
const [codemirror, setCodemirror] = reactExports.useState();
|
|
11325
11149
|
reactExports.useEffect(() => {
|
|
11326
11150
|
(async () => {
|
|
11327
11151
|
var _a, _b;
|
|
11328
11152
|
const CodeMirror = await modulePromise;
|
|
11329
|
-
defineCustomMode(CodeMirror);
|
|
11330
11153
|
const element = codemirrorElement.current;
|
|
11331
11154
|
if (!element)
|
|
11332
11155
|
return;
|
|
11333
|
-
|
|
11156
|
+
let mode = "";
|
|
11157
|
+
if (language === "javascript")
|
|
11158
|
+
mode = "javascript";
|
|
11159
|
+
if (language === "python")
|
|
11160
|
+
mode = "python";
|
|
11161
|
+
if (language === "java")
|
|
11162
|
+
mode = "text/x-java";
|
|
11163
|
+
if (language === "csharp")
|
|
11164
|
+
mode = "text/x-csharp";
|
|
11165
|
+
if (language === "html")
|
|
11166
|
+
mode = "htmlmixed";
|
|
11167
|
+
if (language === "css")
|
|
11168
|
+
mode = "css";
|
|
11334
11169
|
if (codemirrorRef.current && mode === codemirrorRef.current.cm.getOption("mode") && !!readOnly === codemirrorRef.current.cm.getOption("readOnly") && lineNumbers === codemirrorRef.current.cm.getOption("lineNumbers") && wrapLines === codemirrorRef.current.cm.getOption("lineWrapping")) {
|
|
11335
11170
|
return;
|
|
11336
11171
|
}
|
|
@@ -11348,7 +11183,7 @@ const CodeMirrorWrapper = ({
|
|
|
11348
11183
|
setCodemirror(cm);
|
|
11349
11184
|
return cm;
|
|
11350
11185
|
})();
|
|
11351
|
-
}, [modulePromise, codemirror, codemirrorElement, language,
|
|
11186
|
+
}, [modulePromise, codemirror, codemirrorElement, language, lineNumbers, wrapLines, readOnly, isFocused]);
|
|
11352
11187
|
reactExports.useEffect(() => {
|
|
11353
11188
|
if (codemirrorRef.current)
|
|
11354
11189
|
codemirrorRef.current.cm.setSize(measure.width, measure.height);
|
|
@@ -11404,74 +11239,15 @@ const CodeMirrorWrapper = ({
|
|
|
11404
11239
|
codemirror.off("change", changeListener);
|
|
11405
11240
|
};
|
|
11406
11241
|
}, [codemirror, text, highlight, revealLine, focusOnChange, onChange]);
|
|
11407
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "cm-wrapper", ref: codemirrorElement
|
|
11242
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "cm-wrapper", ref: codemirrorElement });
|
|
11408
11243
|
};
|
|
11409
|
-
function onCodeMirrorClick(event) {
|
|
11410
|
-
var _a;
|
|
11411
|
-
if (!(event.target instanceof HTMLElement))
|
|
11412
|
-
return;
|
|
11413
|
-
let url;
|
|
11414
|
-
if (event.target.classList.contains("cm-linkified")) {
|
|
11415
|
-
url = event.target.textContent;
|
|
11416
|
-
} else if (event.target.classList.contains("cm-link") && ((_a = event.target.nextElementSibling) == null ? void 0 : _a.classList.contains("cm-url"))) {
|
|
11417
|
-
url = event.target.nextElementSibling.textContent.slice(1, -1);
|
|
11418
|
-
}
|
|
11419
|
-
if (url) {
|
|
11420
|
-
event.preventDefault();
|
|
11421
|
-
event.stopPropagation();
|
|
11422
|
-
window.open(url, "_blank");
|
|
11423
|
-
}
|
|
11424
|
-
}
|
|
11425
|
-
let customModeDefined = false;
|
|
11426
|
-
function defineCustomMode(cm) {
|
|
11427
|
-
if (customModeDefined)
|
|
11428
|
-
return;
|
|
11429
|
-
customModeDefined = true;
|
|
11430
|
-
cm.defineSimpleMode("text/linkified", {
|
|
11431
|
-
start: [
|
|
11432
|
-
{ regex: kWebLinkRe, token: "linkified" }
|
|
11433
|
-
]
|
|
11434
|
-
});
|
|
11435
|
-
}
|
|
11436
|
-
function mimeTypeToMode(mimeType) {
|
|
11437
|
-
if (!mimeType)
|
|
11438
|
-
return;
|
|
11439
|
-
if (mimeType.includes("javascript") || mimeType.includes("json"))
|
|
11440
|
-
return "javascript";
|
|
11441
|
-
if (mimeType.includes("python"))
|
|
11442
|
-
return "python";
|
|
11443
|
-
if (mimeType.includes("csharp"))
|
|
11444
|
-
return "text/x-csharp";
|
|
11445
|
-
if (mimeType.includes("java"))
|
|
11446
|
-
return "text/x-java";
|
|
11447
|
-
if (mimeType.includes("markdown"))
|
|
11448
|
-
return "markdown";
|
|
11449
|
-
if (mimeType.includes("html") || mimeType.includes("svg"))
|
|
11450
|
-
return "htmlmixed";
|
|
11451
|
-
if (mimeType.includes("css"))
|
|
11452
|
-
return "css";
|
|
11453
|
-
}
|
|
11454
|
-
function languageToMode(language) {
|
|
11455
|
-
if (!language)
|
|
11456
|
-
return;
|
|
11457
|
-
return {
|
|
11458
|
-
javascript: "javascript",
|
|
11459
|
-
jsonl: "javascript",
|
|
11460
|
-
python: "python",
|
|
11461
|
-
csharp: "text/x-csharp",
|
|
11462
|
-
java: "text/x-java",
|
|
11463
|
-
markdown: "markdown",
|
|
11464
|
-
html: "htmlmixed",
|
|
11465
|
-
css: "css"
|
|
11466
|
-
}[language];
|
|
11467
|
-
}
|
|
11468
11244
|
const NetworkResourceDetails = ({ resource, onClose }) => {
|
|
11469
11245
|
const [selectedTab, setSelectedTab] = reactExports.useState("request");
|
|
11470
11246
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11471
11247
|
TabbedPane,
|
|
11472
11248
|
{
|
|
11473
11249
|
dataTestId: "network-request-details",
|
|
11474
|
-
leftToolbar: [/* @__PURE__ */ jsxRuntimeExports.jsx(ToolbarButton, { icon: "close", title: "Close", onClick: onClose }
|
|
11250
|
+
leftToolbar: [/* @__PURE__ */ jsxRuntimeExports.jsx(ToolbarButton, { icon: "close", title: "Close", onClick: onClose })],
|
|
11475
11251
|
tabs: [
|
|
11476
11252
|
{
|
|
11477
11253
|
id: "request",
|
|
@@ -11499,36 +11275,26 @@ const RequestTab = ({ resource }) => {
|
|
|
11499
11275
|
reactExports.useEffect(() => {
|
|
11500
11276
|
const readResources = async () => {
|
|
11501
11277
|
if (resource.request.postData) {
|
|
11502
|
-
const requestContentTypeHeader = resource.request.headers.find((q2) => q2.name
|
|
11278
|
+
const requestContentTypeHeader = resource.request.headers.find((q2) => q2.name === "Content-Type");
|
|
11503
11279
|
const requestContentType = requestContentTypeHeader ? requestContentTypeHeader.value : "";
|
|
11280
|
+
const language = mimeTypeToHighlighter(requestContentType);
|
|
11504
11281
|
if (resource.request.postData._sha1) {
|
|
11505
11282
|
const response = await fetch(`sha1/${resource.request.postData._sha1}`);
|
|
11506
|
-
setRequestBody({ text: formatBody(await response.text(), requestContentType),
|
|
11283
|
+
setRequestBody({ text: formatBody(await response.text(), requestContentType), language });
|
|
11507
11284
|
} else {
|
|
11508
|
-
setRequestBody({ text: formatBody(resource.request.postData.text, requestContentType),
|
|
11285
|
+
setRequestBody({ text: formatBody(resource.request.postData.text, requestContentType), language });
|
|
11509
11286
|
}
|
|
11510
|
-
} else {
|
|
11511
|
-
setRequestBody(null);
|
|
11512
11287
|
}
|
|
11513
11288
|
};
|
|
11514
11289
|
readResources();
|
|
11515
11290
|
}, [resource]);
|
|
11516
11291
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "network-request-details-tab", children: [
|
|
11517
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "network-request-details-header", children: "
|
|
11518
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "network-request-details-url", children:
|
|
11519
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "network-request-details-general", children: `Method: ${resource.request.method}` }),
|
|
11520
|
-
resource.response.status !== -1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "network-request-details-general", style: { display: "flex" }, children: [
|
|
11521
|
-
"Status Code: ",
|
|
11522
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: statusClass(resource.response.status), style: { display: "inline-flex" }, children: `${resource.response.status} ${resource.response.statusText}` })
|
|
11523
|
-
] }),
|
|
11524
|
-
resource.request.queryString.length ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
11525
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "network-request-details-header", children: "Query String Parameters" }),
|
|
11526
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "network-request-details-headers", children: resource.request.queryString.map((param) => `${param.name}: ${param.value}`).join("\n") })
|
|
11527
|
-
] }) : null,
|
|
11292
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "network-request-details-header", children: "URL" }),
|
|
11293
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "network-request-details-url", children: resource.request.url }),
|
|
11528
11294
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "network-request-details-header", children: "Request Headers" }),
|
|
11529
11295
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "network-request-details-headers", children: resource.request.headers.map((pair) => `${pair.name}: ${pair.value}`).join("\n") }),
|
|
11530
11296
|
requestBody && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "network-request-details-header", children: "Request Body" }),
|
|
11531
|
-
requestBody && /* @__PURE__ */ jsxRuntimeExports.jsx(CodeMirrorWrapper, { text: requestBody.text,
|
|
11297
|
+
requestBody && /* @__PURE__ */ jsxRuntimeExports.jsx(CodeMirrorWrapper, { text: requestBody.text, language: requestBody.language, readOnly: true, lineNumbers: true })
|
|
11532
11298
|
] });
|
|
11533
11299
|
};
|
|
11534
11300
|
const ResponseTab = ({ resource }) => {
|
|
@@ -11543,7 +11309,6 @@ const BodyTab = ({ resource }) => {
|
|
|
11543
11309
|
const readResources = async () => {
|
|
11544
11310
|
if (resource.response.content._sha1) {
|
|
11545
11311
|
const useBase64 = resource.response.content.mimeType.includes("image");
|
|
11546
|
-
const isFont = resource.response.content.mimeType.includes("font");
|
|
11547
11312
|
const response = await fetch(`sha1/${resource.response.content._sha1}`);
|
|
11548
11313
|
if (useBase64) {
|
|
11549
11314
|
const blob = await response.blob();
|
|
@@ -11551,64 +11316,21 @@ const BodyTab = ({ resource }) => {
|
|
|
11551
11316
|
const eventPromise = new Promise((f2) => reader.onload = f2);
|
|
11552
11317
|
reader.readAsDataURL(blob);
|
|
11553
11318
|
setResponseBody({ dataUrl: (await eventPromise).target.result });
|
|
11554
|
-
} else if (isFont) {
|
|
11555
|
-
const font = await response.arrayBuffer();
|
|
11556
|
-
setResponseBody({ font });
|
|
11557
11319
|
} else {
|
|
11558
11320
|
const formattedBody = formatBody(await response.text(), resource.response.content.mimeType);
|
|
11559
|
-
|
|
11321
|
+
const language = mimeTypeToHighlighter(resource.response.content.mimeType);
|
|
11322
|
+
setResponseBody({ text: formattedBody, language });
|
|
11560
11323
|
}
|
|
11561
|
-
} else {
|
|
11562
|
-
setResponseBody(null);
|
|
11563
11324
|
}
|
|
11564
11325
|
};
|
|
11565
11326
|
readResources();
|
|
11566
11327
|
}, [resource]);
|
|
11567
11328
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "network-request-details-tab", children: [
|
|
11568
11329
|
!resource.response.content._sha1 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Response body is not available for this request." }),
|
|
11569
|
-
responseBody && responseBody.font && /* @__PURE__ */ jsxRuntimeExports.jsx(FontPreview, { font: responseBody.font }),
|
|
11570
11330
|
responseBody && responseBody.dataUrl && /* @__PURE__ */ jsxRuntimeExports.jsx("img", { draggable: "false", src: responseBody.dataUrl }),
|
|
11571
|
-
responseBody && responseBody.text && /* @__PURE__ */ jsxRuntimeExports.jsx(CodeMirrorWrapper, { text: responseBody.text,
|
|
11572
|
-
] });
|
|
11573
|
-
};
|
|
11574
|
-
const FontPreview = ({ font }) => {
|
|
11575
|
-
const [isError, setIsError] = reactExports.useState(false);
|
|
11576
|
-
reactExports.useEffect(() => {
|
|
11577
|
-
let fontFace;
|
|
11578
|
-
try {
|
|
11579
|
-
fontFace = new FontFace("font-preview", font);
|
|
11580
|
-
if (fontFace.status === "loaded")
|
|
11581
|
-
document.fonts.add(fontFace);
|
|
11582
|
-
if (fontFace.status === "error")
|
|
11583
|
-
setIsError(true);
|
|
11584
|
-
} catch {
|
|
11585
|
-
setIsError(true);
|
|
11586
|
-
}
|
|
11587
|
-
return () => {
|
|
11588
|
-
document.fonts.delete(fontFace);
|
|
11589
|
-
};
|
|
11590
|
-
}, [font]);
|
|
11591
|
-
if (isError)
|
|
11592
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "network-font-preview-error", children: "Could not load font preview" });
|
|
11593
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "network-font-preview", children: [
|
|
11594
|
-
"ABCDEFGHIJKLM",
|
|
11595
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
11596
|
-
"NOPQRSTUVWXYZ",
|
|
11597
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
11598
|
-
"abcdefghijklm",
|
|
11599
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
11600
|
-
"nopqrstuvwxyz",
|
|
11601
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
11602
|
-
"1234567890"
|
|
11331
|
+
responseBody && responseBody.text && /* @__PURE__ */ jsxRuntimeExports.jsx(CodeMirrorWrapper, { text: responseBody.text, language: responseBody.language, readOnly: true, lineNumbers: true })
|
|
11603
11332
|
] });
|
|
11604
11333
|
};
|
|
11605
|
-
function statusClass(statusCode) {
|
|
11606
|
-
if (statusCode < 300 || statusCode === 304)
|
|
11607
|
-
return "green-circle";
|
|
11608
|
-
if (statusCode < 400)
|
|
11609
|
-
return "yellow-circle";
|
|
11610
|
-
return "red-circle";
|
|
11611
|
-
}
|
|
11612
11334
|
function formatBody(body, contentType) {
|
|
11613
11335
|
if (body === null)
|
|
11614
11336
|
return "Loading...";
|
|
@@ -11626,6 +11348,14 @@ function formatBody(body, contentType) {
|
|
|
11626
11348
|
return decodeURIComponent(bodyStr);
|
|
11627
11349
|
return bodyStr;
|
|
11628
11350
|
}
|
|
11351
|
+
function mimeTypeToHighlighter(mimeType) {
|
|
11352
|
+
if (mimeType.includes("javascript") || mimeType.includes("json"))
|
|
11353
|
+
return "javascript";
|
|
11354
|
+
if (mimeType.includes("html"))
|
|
11355
|
+
return "html";
|
|
11356
|
+
if (mimeType.includes("css"))
|
|
11357
|
+
return "css";
|
|
11358
|
+
}
|
|
11629
11359
|
const GlassPane = ({ cursor, onPaneMouseMove, onPaneMouseUp, onPaneDoubleClick }) => {
|
|
11630
11360
|
React.useEffect(() => {
|
|
11631
11361
|
const glassPaneDiv = document.createElement("div");
|
|
@@ -11689,8 +11419,7 @@ const ResizeView = ({ orientation, offsets, setOffsets, resizerColor, resizerWid
|
|
|
11689
11419
|
right: 0,
|
|
11690
11420
|
bottom: 0,
|
|
11691
11421
|
left: -(7 - resizerWidth) / 2,
|
|
11692
|
-
zIndex:
|
|
11693
|
-
// Above the content, but below the film strip hover.
|
|
11422
|
+
zIndex: 1e3,
|
|
11694
11423
|
pointerEvents: "none"
|
|
11695
11424
|
},
|
|
11696
11425
|
ref,
|
|
@@ -11731,8 +11460,7 @@ const ResizeView = ({ orientation, offsets, setOffsets, resizerColor, resizerWid
|
|
|
11731
11460
|
...fillStyle,
|
|
11732
11461
|
background: resizerColor
|
|
11733
11462
|
} })
|
|
11734
|
-
}
|
|
11735
|
-
index
|
|
11463
|
+
}
|
|
11736
11464
|
);
|
|
11737
11465
|
})
|
|
11738
11466
|
]
|
|
@@ -11740,24 +11468,12 @@ const ResizeView = ({ orientation, offsets, setOffsets, resizerColor, resizerWid
|
|
|
11740
11468
|
);
|
|
11741
11469
|
};
|
|
11742
11470
|
function GridView(model) {
|
|
11743
|
-
const
|
|
11744
|
-
|
|
11745
|
-
const
|
|
11746
|
-
|
|
11747
|
-
const column = model.columns[i];
|
|
11748
|
-
offsets2[i] = (offsets2[i - 1] || 0) + model.columnWidths.get(column);
|
|
11749
|
-
}
|
|
11750
|
-
setOffsets(offsets2);
|
|
11751
|
-
}, [model.columns, model.columnWidths]);
|
|
11752
|
-
function updateColumnWidths(offsets2) {
|
|
11753
|
-
const widths = new Map(model.columnWidths.entries());
|
|
11754
|
-
for (let i = 0; i < offsets2.length; ++i) {
|
|
11755
|
-
const width = offsets2[i] - (offsets2[i - 1] || 0);
|
|
11756
|
-
const column = model.columns[i];
|
|
11757
|
-
widths.set(column, width);
|
|
11758
|
-
}
|
|
11759
|
-
model.setColumnWidths(widths);
|
|
11471
|
+
const initialOffsets = [];
|
|
11472
|
+
for (let i = 0; i < model.columns.length - 1; ++i) {
|
|
11473
|
+
const column = model.columns[i];
|
|
11474
|
+
initialOffsets[i] = (initialOffsets[i - 1] || 0) + model.columnWidth(column);
|
|
11760
11475
|
}
|
|
11476
|
+
const [offsets, setOffsets] = reactExports.useState(initialOffsets);
|
|
11761
11477
|
const toggleSorting = reactExports.useCallback((f2) => {
|
|
11762
11478
|
var _a, _b;
|
|
11763
11479
|
(_b = model.setSorting) == null ? void 0 : _b.call(model, { by: f2, negate: ((_a = model.sorting) == null ? void 0 : _a.by) === f2 ? !model.sorting.negate : false });
|
|
@@ -11768,7 +11484,7 @@ function GridView(model) {
|
|
|
11768
11484
|
{
|
|
11769
11485
|
orientation: "horizontal",
|
|
11770
11486
|
offsets,
|
|
11771
|
-
setOffsets
|
|
11487
|
+
setOffsets,
|
|
11772
11488
|
resizerColor: "var(--vscode-panel-border)",
|
|
11773
11489
|
resizerWidth: 1,
|
|
11774
11490
|
minColumnWidth: 25
|
|
@@ -11781,7 +11497,7 @@ function GridView(model) {
|
|
|
11781
11497
|
{
|
|
11782
11498
|
className: "grid-view-header-cell " + sortingHeader(column, model.sorting),
|
|
11783
11499
|
style: {
|
|
11784
|
-
width: i
|
|
11500
|
+
width: offsets[i] - (offsets[i - 1] || 0)
|
|
11785
11501
|
},
|
|
11786
11502
|
onClick: () => model.setSorting && toggleSorting(column),
|
|
11787
11503
|
children: [
|
|
@@ -11789,8 +11505,7 @@ function GridView(model) {
|
|
|
11789
11505
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "codicon codicon-triangle-up" }),
|
|
11790
11506
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "codicon codicon-triangle-down" })
|
|
11791
11507
|
]
|
|
11792
|
-
}
|
|
11793
|
-
model.columnTitle(column)
|
|
11508
|
+
}
|
|
11794
11509
|
);
|
|
11795
11510
|
}) }),
|
|
11796
11511
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -11807,12 +11522,9 @@ function GridView(model) {
|
|
|
11807
11522
|
{
|
|
11808
11523
|
className: `grid-view-cell grid-view-column-${String(column)}`,
|
|
11809
11524
|
title,
|
|
11810
|
-
style: {
|
|
11811
|
-
width: i < model.columns.length - 1 ? model.columnWidths.get(column) : void 0
|
|
11812
|
-
},
|
|
11525
|
+
style: { width: offsets[i] - (offsets[i - 1] || 0) },
|
|
11813
11526
|
children: body
|
|
11814
|
-
}
|
|
11815
|
-
model.columnTitle(column)
|
|
11527
|
+
}
|
|
11816
11528
|
);
|
|
11817
11529
|
}) });
|
|
11818
11530
|
},
|
|
@@ -11830,7 +11542,7 @@ function GridView(model) {
|
|
|
11830
11542
|
onIconClicked: model.onIconClicked,
|
|
11831
11543
|
noItemsMessage: model.noItemsMessage,
|
|
11832
11544
|
dataTestId: model.dataTestId,
|
|
11833
|
-
|
|
11545
|
+
noHighlightOnHover: model.noHighlightOnHover
|
|
11834
11546
|
}
|
|
11835
11547
|
)
|
|
11836
11548
|
] })
|
|
@@ -11839,32 +11551,6 @@ function GridView(model) {
|
|
|
11839
11551
|
function sortingHeader(column, sorting) {
|
|
11840
11552
|
return column === (sorting == null ? void 0 : sorting.by) ? " filter-" + (sorting.negate ? "negative" : "positive") : "";
|
|
11841
11553
|
}
|
|
11842
|
-
const resourceTypes = ["All", "Fetch", "HTML", "JS", "CSS", "Font", "Image"];
|
|
11843
|
-
const defaultFilterState = { searchValue: "", resourceType: "All" };
|
|
11844
|
-
const NetworkFilters = ({ filterState, onFilterStateChange }) => {
|
|
11845
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "network-filters", children: [
|
|
11846
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11847
|
-
"input",
|
|
11848
|
-
{
|
|
11849
|
-
type: "search",
|
|
11850
|
-
placeholder: "Filter network",
|
|
11851
|
-
spellCheck: false,
|
|
11852
|
-
value: filterState.searchValue,
|
|
11853
|
-
onChange: (e) => onFilterStateChange({ ...filterState, searchValue: e.target.value })
|
|
11854
|
-
}
|
|
11855
|
-
),
|
|
11856
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "network-filters-resource-types", children: resourceTypes.map((resourceType) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11857
|
-
"div",
|
|
11858
|
-
{
|
|
11859
|
-
title: resourceType,
|
|
11860
|
-
onClick: () => onFilterStateChange({ ...filterState, resourceType }),
|
|
11861
|
-
className: `network-filters-resource-type ${filterState.resourceType === resourceType ? "selected" : ""}`,
|
|
11862
|
-
children: resourceType
|
|
11863
|
-
},
|
|
11864
|
-
resourceType
|
|
11865
|
-
)) })
|
|
11866
|
-
] });
|
|
11867
|
-
};
|
|
11868
11554
|
const NetworkGridView = GridView;
|
|
11869
11555
|
function useNetworkTabModel(model, selectedTime) {
|
|
11870
11556
|
const resources = reactExports.useMemo(() => {
|
|
@@ -11876,26 +11562,17 @@ function useNetworkTabModel(model, selectedTime) {
|
|
|
11876
11562
|
});
|
|
11877
11563
|
return filtered;
|
|
11878
11564
|
}, [model, selectedTime]);
|
|
11879
|
-
|
|
11880
|
-
return { resources, contextIdMap };
|
|
11565
|
+
return { resources };
|
|
11881
11566
|
}
|
|
11882
11567
|
const NetworkTab = ({ boundaries, networkModel, onEntryHovered }) => {
|
|
11883
11568
|
const [sorting, setSorting] = reactExports.useState(void 0);
|
|
11884
11569
|
const [selectedEntry, setSelectedEntry] = reactExports.useState(void 0);
|
|
11885
|
-
const [filterState, setFilterState] = reactExports.useState(defaultFilterState);
|
|
11886
11570
|
const { renderedEntries } = reactExports.useMemo(() => {
|
|
11887
|
-
const renderedEntries2 = networkModel.resources.map((entry) => renderEntry(entry, boundaries
|
|
11571
|
+
const renderedEntries2 = networkModel.resources.map((entry) => renderEntry(entry, boundaries));
|
|
11888
11572
|
if (sorting)
|
|
11889
11573
|
sort(renderedEntries2, sorting);
|
|
11890
11574
|
return { renderedEntries: renderedEntries2 };
|
|
11891
|
-
}, [networkModel.resources,
|
|
11892
|
-
const [columnWidths, setColumnWidths] = reactExports.useState(() => {
|
|
11893
|
-
return new Map(allColumns().map((column) => [column, columnWidth(column)]));
|
|
11894
|
-
});
|
|
11895
|
-
const onFilterStateChange = reactExports.useCallback((newFilterState) => {
|
|
11896
|
-
setFilterState(newFilterState);
|
|
11897
|
-
setSelectedEntry(void 0);
|
|
11898
|
-
}, []);
|
|
11575
|
+
}, [networkModel.resources, sorting, boundaries]);
|
|
11899
11576
|
if (!networkModel.resources.length)
|
|
11900
11577
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(PlaceholderPanel, { text: "No network calls" });
|
|
11901
11578
|
const grid = /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -11906,11 +11583,10 @@ const NetworkTab = ({ boundaries, networkModel, onEntryHovered }) => {
|
|
|
11906
11583
|
selectedItem: selectedEntry,
|
|
11907
11584
|
onSelected: (item) => setSelectedEntry(item),
|
|
11908
11585
|
onHighlighted: (item) => onEntryHovered(item == null ? void 0 : item.resource),
|
|
11909
|
-
columns:
|
|
11586
|
+
columns: selectedEntry ? ["name"] : ["name", "method", "status", "contentType", "duration", "size", "start", "route"],
|
|
11910
11587
|
columnTitle,
|
|
11911
|
-
|
|
11912
|
-
|
|
11913
|
-
isError: (item) => item.status.code >= 400 || item.status.code === -1,
|
|
11588
|
+
columnWidth,
|
|
11589
|
+
isError: (item) => item.status.code >= 400,
|
|
11914
11590
|
isInfo: (item) => !!item.route,
|
|
11915
11591
|
render: (item, column) => renderCell(item, column),
|
|
11916
11592
|
sorting,
|
|
@@ -11918,24 +11594,14 @@ const NetworkTab = ({ boundaries, networkModel, onEntryHovered }) => {
|
|
|
11918
11594
|
}
|
|
11919
11595
|
);
|
|
11920
11596
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
11921
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(NetworkFilters, { filterState, onFilterStateChange }),
|
|
11922
11597
|
!selectedEntry && grid,
|
|
11923
|
-
selectedEntry && /* @__PURE__ */ jsxRuntimeExports.
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
sidebarIsFirst: true,
|
|
11928
|
-
orientation: "horizontal",
|
|
11929
|
-
settingName: "networkResourceDetails",
|
|
11930
|
-
main: /* @__PURE__ */ jsxRuntimeExports.jsx(NetworkResourceDetails, { resource: selectedEntry.resource, onClose: () => setSelectedEntry(void 0) }),
|
|
11931
|
-
sidebar: grid
|
|
11932
|
-
}
|
|
11933
|
-
)
|
|
11598
|
+
selectedEntry && /* @__PURE__ */ jsxRuntimeExports.jsxs(SplitView, { sidebarSize: 200, sidebarIsFirst: true, orientation: "horizontal", children: [
|
|
11599
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(NetworkResourceDetails, { resource: selectedEntry.resource, onClose: () => setSelectedEntry(void 0) }),
|
|
11600
|
+
grid
|
|
11601
|
+
] })
|
|
11934
11602
|
] });
|
|
11935
11603
|
};
|
|
11936
11604
|
const columnTitle = (column) => {
|
|
11937
|
-
if (column === "contextId")
|
|
11938
|
-
return "Source";
|
|
11939
11605
|
if (column === "name")
|
|
11940
11606
|
return "Name";
|
|
11941
11607
|
if (column === "method")
|
|
@@ -11963,32 +11629,9 @@ const columnWidth = (column) => {
|
|
|
11963
11629
|
return 60;
|
|
11964
11630
|
if (column === "contentType")
|
|
11965
11631
|
return 200;
|
|
11966
|
-
if (column === "contextId")
|
|
11967
|
-
return 60;
|
|
11968
11632
|
return 100;
|
|
11969
11633
|
};
|
|
11970
|
-
function visibleColumns(entrySelected, renderedEntries) {
|
|
11971
|
-
if (entrySelected) {
|
|
11972
|
-
const columns2 = ["name"];
|
|
11973
|
-
if (hasMultipleContexts(renderedEntries))
|
|
11974
|
-
columns2.unshift("contextId");
|
|
11975
|
-
return columns2;
|
|
11976
|
-
}
|
|
11977
|
-
let columns = allColumns();
|
|
11978
|
-
if (!hasMultipleContexts(renderedEntries))
|
|
11979
|
-
columns = columns.filter((name) => name !== "contextId");
|
|
11980
|
-
return columns;
|
|
11981
|
-
}
|
|
11982
|
-
function allColumns() {
|
|
11983
|
-
return ["contextId", "name", "method", "status", "contentType", "duration", "size", "start", "route"];
|
|
11984
|
-
}
|
|
11985
11634
|
const renderCell = (entry, column) => {
|
|
11986
|
-
if (column === "contextId") {
|
|
11987
|
-
return {
|
|
11988
|
-
body: entry.contextId,
|
|
11989
|
-
title: entry.name.url
|
|
11990
|
-
};
|
|
11991
|
-
}
|
|
11992
11635
|
if (column === "name") {
|
|
11993
11636
|
return {
|
|
11994
11637
|
body: entry.name.name,
|
|
@@ -12015,52 +11658,7 @@ const renderCell = (entry, column) => {
|
|
|
12015
11658
|
return { body: entry.route };
|
|
12016
11659
|
return { body: "" };
|
|
12017
11660
|
};
|
|
12018
|
-
|
|
12019
|
-
constructor(model) {
|
|
12020
|
-
__publicField(this, "_pagerefToShortId", /* @__PURE__ */ new Map());
|
|
12021
|
-
__publicField(this, "_contextToId", /* @__PURE__ */ new Map());
|
|
12022
|
-
__publicField(this, "_lastPageId", 0);
|
|
12023
|
-
__publicField(this, "_lastApiRequestContextId", 0);
|
|
12024
|
-
}
|
|
12025
|
-
contextId(resource) {
|
|
12026
|
-
if (resource.pageref)
|
|
12027
|
-
return this._pageId(resource.pageref);
|
|
12028
|
-
else if (resource._apiRequest)
|
|
12029
|
-
return this._apiRequestContextId(resource);
|
|
12030
|
-
return "";
|
|
12031
|
-
}
|
|
12032
|
-
_pageId(pageref) {
|
|
12033
|
-
let shortId = this._pagerefToShortId.get(pageref);
|
|
12034
|
-
if (!shortId) {
|
|
12035
|
-
++this._lastPageId;
|
|
12036
|
-
shortId = "page#" + this._lastPageId;
|
|
12037
|
-
this._pagerefToShortId.set(pageref, shortId);
|
|
12038
|
-
}
|
|
12039
|
-
return shortId;
|
|
12040
|
-
}
|
|
12041
|
-
_apiRequestContextId(resource) {
|
|
12042
|
-
const contextEntry = context(resource);
|
|
12043
|
-
if (!contextEntry)
|
|
12044
|
-
return "";
|
|
12045
|
-
let contextId = this._contextToId.get(contextEntry);
|
|
12046
|
-
if (!contextId) {
|
|
12047
|
-
++this._lastApiRequestContextId;
|
|
12048
|
-
contextId = "api#" + this._lastApiRequestContextId;
|
|
12049
|
-
this._contextToId.set(contextEntry, contextId);
|
|
12050
|
-
}
|
|
12051
|
-
return contextId;
|
|
12052
|
-
}
|
|
12053
|
-
}
|
|
12054
|
-
function hasMultipleContexts(renderedEntries) {
|
|
12055
|
-
const contextIds = /* @__PURE__ */ new Set();
|
|
12056
|
-
for (const entry of renderedEntries) {
|
|
12057
|
-
contextIds.add(entry.contextId);
|
|
12058
|
-
if (contextIds.size > 1)
|
|
12059
|
-
return true;
|
|
12060
|
-
}
|
|
12061
|
-
return false;
|
|
12062
|
-
}
|
|
12063
|
-
const renderEntry = (resource, boundaries, contextIdGenerator) => {
|
|
11661
|
+
const renderEntry = (resource, boundaries) => {
|
|
12064
11662
|
const routeStatus = formatRouteStatus(resource);
|
|
12065
11663
|
let resourceName;
|
|
12066
11664
|
try {
|
|
@@ -12084,8 +11682,7 @@ const renderEntry = (resource, boundaries, contextIdGenerator) => {
|
|
|
12084
11682
|
size: resource.response._transferSize > 0 ? resource.response._transferSize : resource.response.bodySize,
|
|
12085
11683
|
start: resource._monotonicTime - boundaries.minimum,
|
|
12086
11684
|
route: routeStatus,
|
|
12087
|
-
resource
|
|
12088
|
-
contextId: contextIdGenerator.contextId(resource)
|
|
11685
|
+
resource
|
|
12089
11686
|
};
|
|
12090
11687
|
};
|
|
12091
11688
|
function formatRouteStatus(request) {
|
|
@@ -12140,23 +11737,6 @@ function comparator(sortBy) {
|
|
|
12140
11737
|
return a.route.localeCompare(b.route);
|
|
12141
11738
|
};
|
|
12142
11739
|
}
|
|
12143
|
-
if (sortBy === "contextId")
|
|
12144
|
-
return (a, b) => a.contextId.localeCompare(b.contextId);
|
|
12145
|
-
}
|
|
12146
|
-
const resourceTypePredicates = {
|
|
12147
|
-
"All": () => true,
|
|
12148
|
-
"Fetch": (contentType) => contentType === "application/json",
|
|
12149
|
-
"HTML": (contentType) => contentType === "text/html",
|
|
12150
|
-
"CSS": (contentType) => contentType === "text/css",
|
|
12151
|
-
"JS": (contentType) => contentType.includes("javascript"),
|
|
12152
|
-
"Font": (contentType) => contentType.includes("font"),
|
|
12153
|
-
"Image": (contentType) => contentType.includes("image")
|
|
12154
|
-
};
|
|
12155
|
-
function filterEntry({ searchValue, resourceType }) {
|
|
12156
|
-
return (entry) => {
|
|
12157
|
-
const typePredicate = resourceTypePredicates[resourceType];
|
|
12158
|
-
return typePredicate(entry.contentType) && entry.name.url.toLowerCase().includes(searchValue.toLowerCase());
|
|
12159
|
-
};
|
|
12160
11740
|
}
|
|
12161
11741
|
const XPathEngine = {
|
|
12162
11742
|
queryAll(root, selector) {
|
|
@@ -12224,7 +11804,7 @@ function isElementStyleVisibilityVisible(element, style) {
|
|
|
12224
11804
|
if (!style)
|
|
12225
11805
|
return true;
|
|
12226
11806
|
if (Element.prototype.checkVisibility && browserNameForWorkarounds !== "webkit") {
|
|
12227
|
-
if (!element.checkVisibility())
|
|
11807
|
+
if (!element.checkVisibility({ checkOpacity: false, checkVisibilityCSS: false }))
|
|
12228
11808
|
return false;
|
|
12229
11809
|
} else {
|
|
12230
11810
|
const detailsOrSummary = element.closest("details,summary");
|
|
@@ -12259,62 +11839,35 @@ function isVisibleTextNode(node) {
|
|
|
12259
11839
|
const rect = range.getBoundingClientRect();
|
|
12260
11840
|
return rect.width > 0 && rect.height > 0;
|
|
12261
11841
|
}
|
|
12262
|
-
function elementSafeTagName(element) {
|
|
12263
|
-
if (element instanceof HTMLFormElement)
|
|
12264
|
-
return "FORM";
|
|
12265
|
-
return element.tagName.toUpperCase();
|
|
12266
|
-
}
|
|
12267
11842
|
function hasExplicitAccessibleName(e) {
|
|
12268
11843
|
return e.hasAttribute("aria-label") || e.hasAttribute("aria-labelledby");
|
|
12269
11844
|
}
|
|
12270
11845
|
const kAncestorPreventingLandmark = "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]";
|
|
12271
|
-
const kGlobalAriaAttributes =
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
|
|
12292
|
-
|
|
12293
|
-
|
|
12294
|
-
|
|
12295
|
-
|
|
12296
|
-
["aria-roledescription", /* @__PURE__ */ new Set(["generic"])]
|
|
12297
|
-
]);
|
|
12298
|
-
function hasGlobalAriaAttribute(element, forRole) {
|
|
12299
|
-
return [...kGlobalAriaAttributes].some(([attr, prohibited]) => {
|
|
12300
|
-
return !(prohibited == null ? void 0 : prohibited.has(forRole || "")) && element.hasAttribute(attr);
|
|
12301
|
-
});
|
|
12302
|
-
}
|
|
12303
|
-
function hasTabIndex(element) {
|
|
12304
|
-
return !Number.isNaN(Number(String(element.getAttribute("tabindex"))));
|
|
12305
|
-
}
|
|
12306
|
-
function isFocusable(element) {
|
|
12307
|
-
return !isNativelyDisabled(element) && (isNativelyFocusable(element) || hasTabIndex(element));
|
|
12308
|
-
}
|
|
12309
|
-
function isNativelyFocusable(element) {
|
|
12310
|
-
const tagName = elementSafeTagName(element);
|
|
12311
|
-
if (["BUTTON", "DETAILS", "SELECT", "TEXTAREA"].includes(tagName))
|
|
12312
|
-
return true;
|
|
12313
|
-
if (tagName === "A" || tagName === "AREA")
|
|
12314
|
-
return element.hasAttribute("href");
|
|
12315
|
-
if (tagName === "INPUT")
|
|
12316
|
-
return !element.hidden;
|
|
12317
|
-
return false;
|
|
11846
|
+
const kGlobalAriaAttributes = [
|
|
11847
|
+
"aria-atomic",
|
|
11848
|
+
"aria-busy",
|
|
11849
|
+
"aria-controls",
|
|
11850
|
+
"aria-current",
|
|
11851
|
+
"aria-describedby",
|
|
11852
|
+
"aria-details",
|
|
11853
|
+
"aria-disabled",
|
|
11854
|
+
"aria-dropeffect",
|
|
11855
|
+
"aria-errormessage",
|
|
11856
|
+
"aria-flowto",
|
|
11857
|
+
"aria-grabbed",
|
|
11858
|
+
"aria-haspopup",
|
|
11859
|
+
"aria-hidden",
|
|
11860
|
+
"aria-invalid",
|
|
11861
|
+
"aria-keyshortcuts",
|
|
11862
|
+
"aria-label",
|
|
11863
|
+
"aria-labelledby",
|
|
11864
|
+
"aria-live",
|
|
11865
|
+
"aria-owns",
|
|
11866
|
+
"aria-relevant",
|
|
11867
|
+
"aria-roledescription"
|
|
11868
|
+
];
|
|
11869
|
+
function hasGlobalAriaAttribute(e) {
|
|
11870
|
+
return kGlobalAriaAttributes.some((a) => e.hasAttribute(a));
|
|
12318
11871
|
}
|
|
12319
11872
|
const kImplicitRoleByTagName = {
|
|
12320
11873
|
"A": (e) => {
|
|
@@ -12350,14 +11903,14 @@ const kImplicitRoleByTagName = {
|
|
|
12350
11903
|
"HEADER": (e) => closestCrossShadow(e, kAncestorPreventingLandmark) ? null : "banner",
|
|
12351
11904
|
"HR": () => "separator",
|
|
12352
11905
|
"HTML": () => "document",
|
|
12353
|
-
"IMG": (e) => e.getAttribute("alt") === "" && !
|
|
11906
|
+
"IMG": (e) => e.getAttribute("alt") === "" && !hasGlobalAriaAttribute(e) && Number.isNaN(Number(String(e.getAttribute("tabindex")))) ? "presentation" : "img",
|
|
12354
11907
|
"INPUT": (e) => {
|
|
12355
11908
|
const type = e.type.toLowerCase();
|
|
12356
11909
|
if (type === "search")
|
|
12357
11910
|
return e.hasAttribute("list") ? "combobox" : "searchbox";
|
|
12358
11911
|
if (["email", "tel", "text", "url", ""].includes(type)) {
|
|
12359
11912
|
const list = getIdRefs(e, e.getAttribute("list"))[0];
|
|
12360
|
-
return list &&
|
|
11913
|
+
return list && list.tagName === "DATALIST" ? "combobox" : "textbox";
|
|
12361
11914
|
}
|
|
12362
11915
|
if (type === "hidden")
|
|
12363
11916
|
return "";
|
|
@@ -12433,17 +11986,17 @@ const kPresentationInheritanceParents = {
|
|
|
12433
11986
|
};
|
|
12434
11987
|
function getImplicitAriaRole(element) {
|
|
12435
11988
|
var _a;
|
|
12436
|
-
const implicitRole = ((_a = kImplicitRoleByTagName[
|
|
11989
|
+
const implicitRole = ((_a = kImplicitRoleByTagName[element.tagName.toUpperCase()]) == null ? void 0 : _a.call(kImplicitRoleByTagName, element)) || "";
|
|
12437
11990
|
if (!implicitRole)
|
|
12438
11991
|
return null;
|
|
12439
11992
|
let ancestor = element;
|
|
12440
11993
|
while (ancestor) {
|
|
12441
11994
|
const parent = parentElementOrShadowHost(ancestor);
|
|
12442
|
-
const parents = kPresentationInheritanceParents[
|
|
12443
|
-
if (!parents || !parent || !parents.includes(
|
|
11995
|
+
const parents = kPresentationInheritanceParents[ancestor.tagName];
|
|
11996
|
+
if (!parents || !parent || !parents.includes(parent.tagName))
|
|
12444
11997
|
break;
|
|
12445
11998
|
const parentExplicitRole = getExplicitAriaRole(parent);
|
|
12446
|
-
if ((parentExplicitRole === "none" || parentExplicitRole === "presentation") && !hasPresentationConflictResolution(parent
|
|
11999
|
+
if ((parentExplicitRole === "none" || parentExplicitRole === "presentation") && !hasPresentationConflictResolution(parent))
|
|
12447
12000
|
return parentExplicitRole;
|
|
12448
12001
|
ancestor = parent;
|
|
12449
12002
|
}
|
|
@@ -12551,28 +12104,22 @@ function getExplicitAriaRole(element) {
|
|
|
12551
12104
|
const roles = (element.getAttribute("role") || "").split(" ").map((role) => role.trim());
|
|
12552
12105
|
return roles.find((role) => validRoles.includes(role)) || null;
|
|
12553
12106
|
}
|
|
12554
|
-
function hasPresentationConflictResolution(element
|
|
12555
|
-
return hasGlobalAriaAttribute(element
|
|
12107
|
+
function hasPresentationConflictResolution(element) {
|
|
12108
|
+
return !hasGlobalAriaAttribute(element);
|
|
12556
12109
|
}
|
|
12557
12110
|
function getAriaRole(element) {
|
|
12558
12111
|
const explicitRole = getExplicitAriaRole(element);
|
|
12559
12112
|
if (!explicitRole)
|
|
12560
12113
|
return getImplicitAriaRole(element);
|
|
12561
|
-
if (explicitRole === "none" || explicitRole === "presentation")
|
|
12562
|
-
|
|
12563
|
-
if (hasPresentationConflictResolution(element, implicitRole))
|
|
12564
|
-
return implicitRole;
|
|
12565
|
-
}
|
|
12114
|
+
if ((explicitRole === "none" || explicitRole === "presentation") && hasPresentationConflictResolution(element))
|
|
12115
|
+
return getImplicitAriaRole(element);
|
|
12566
12116
|
return explicitRole;
|
|
12567
12117
|
}
|
|
12568
12118
|
function getAriaBoolean(attr) {
|
|
12569
12119
|
return attr === null ? void 0 : attr.toLowerCase() === "true";
|
|
12570
12120
|
}
|
|
12571
|
-
function isElementIgnoredForAria(element) {
|
|
12572
|
-
return ["STYLE", "SCRIPT", "NOSCRIPT", "TEMPLATE"].includes(elementSafeTagName(element));
|
|
12573
|
-
}
|
|
12574
12121
|
function isElementHiddenForAria(element) {
|
|
12575
|
-
if (
|
|
12122
|
+
if (["STYLE", "SCRIPT", "NOSCRIPT", "TEMPLATE"].includes(element.tagName))
|
|
12576
12123
|
return true;
|
|
12577
12124
|
const style = getElementComputedStyle(element);
|
|
12578
12125
|
const isSlot = element.nodeName === "SLOT";
|
|
@@ -12628,11 +12175,8 @@ function getIdRefs(element, ref) {
|
|
|
12628
12175
|
return [];
|
|
12629
12176
|
}
|
|
12630
12177
|
}
|
|
12631
|
-
function
|
|
12632
|
-
return s.trim();
|
|
12633
|
-
}
|
|
12634
|
-
function asFlatString(s) {
|
|
12635
|
-
return s.split(" ").map((chunk) => chunk.replace(/\r\n/g, "\n").replace(/\s\s*/g, " ")).join(" ").trim();
|
|
12178
|
+
function normalizeAccessbileName(s) {
|
|
12179
|
+
return s.replace(/\r\n/g, "\n").replace(/\u00A0/g, " ").replace(/\s\s+/g, " ").trim();
|
|
12636
12180
|
}
|
|
12637
12181
|
function queryInAriaOwned(element, selector) {
|
|
12638
12182
|
const result = [...element.querySelectorAll(selector)];
|
|
@@ -12654,7 +12198,7 @@ function getPseudoContent(element, pseudo) {
|
|
|
12654
12198
|
return content;
|
|
12655
12199
|
}
|
|
12656
12200
|
function getPseudoContentImpl(pseudoStyle) {
|
|
12657
|
-
if (!pseudoStyle
|
|
12201
|
+
if (!pseudoStyle)
|
|
12658
12202
|
return "";
|
|
12659
12203
|
const content = pseudoStyle.content;
|
|
12660
12204
|
if (content[0] === "'" && content[content.length - 1] === "'" || content[0] === '"' && content[content.length - 1] === '"') {
|
|
@@ -12684,13 +12228,12 @@ function getElementAccessibleName(element, includeHidden) {
|
|
|
12684
12228
|
accessibleName = "";
|
|
12685
12229
|
const elementProhibitsNaming = ["caption", "code", "definition", "deletion", "emphasis", "generic", "insertion", "mark", "paragraph", "presentation", "strong", "subscript", "suggestion", "superscript", "term", "time"].includes(getAriaRole(element) || "");
|
|
12686
12230
|
if (!elementProhibitsNaming) {
|
|
12687
|
-
accessibleName =
|
|
12231
|
+
accessibleName = normalizeAccessbileName(getElementAccessibleNameInternal(element, {
|
|
12688
12232
|
includeHidden,
|
|
12689
12233
|
visitedElements: /* @__PURE__ */ new Set(),
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
embeddedInNativeTextAlternative: void 0,
|
|
12234
|
+
embeddedInLabelledBy: "none",
|
|
12235
|
+
embeddedInLabel: "none",
|
|
12236
|
+
embeddedInTextAlternativeElement: false,
|
|
12694
12237
|
embeddedInTargetElement: "self"
|
|
12695
12238
|
}));
|
|
12696
12239
|
}
|
|
@@ -12698,75 +12241,46 @@ function getElementAccessibleName(element, includeHidden) {
|
|
|
12698
12241
|
}
|
|
12699
12242
|
return accessibleName;
|
|
12700
12243
|
}
|
|
12701
|
-
function
|
|
12702
|
-
const cache = includeHidden ? cacheAccessibleDescriptionHidden : cacheAccessibleDescription;
|
|
12703
|
-
let accessibleDescription = cache == null ? void 0 : cache.get(element);
|
|
12704
|
-
if (accessibleDescription === void 0) {
|
|
12705
|
-
accessibleDescription = "";
|
|
12706
|
-
if (element.hasAttribute("aria-describedby")) {
|
|
12707
|
-
const describedBy = getIdRefs(element, element.getAttribute("aria-describedby"));
|
|
12708
|
-
accessibleDescription = asFlatString(describedBy.map((ref) => getTextAlternativeInternal(ref, {
|
|
12709
|
-
includeHidden,
|
|
12710
|
-
visitedElements: /* @__PURE__ */ new Set(),
|
|
12711
|
-
embeddedInLabelledBy: void 0,
|
|
12712
|
-
embeddedInLabel: void 0,
|
|
12713
|
-
embeddedInNativeTextAlternative: void 0,
|
|
12714
|
-
embeddedInTargetElement: "none",
|
|
12715
|
-
embeddedInDescribedBy: { element: ref, hidden: isElementHiddenForAria(ref) }
|
|
12716
|
-
})).join(" "));
|
|
12717
|
-
} else if (element.hasAttribute("aria-description")) {
|
|
12718
|
-
accessibleDescription = asFlatString(element.getAttribute("aria-description") || "");
|
|
12719
|
-
} else {
|
|
12720
|
-
accessibleDescription = asFlatString(element.getAttribute("title") || "");
|
|
12721
|
-
}
|
|
12722
|
-
cache == null ? void 0 : cache.set(element, accessibleDescription);
|
|
12723
|
-
}
|
|
12724
|
-
return accessibleDescription;
|
|
12725
|
-
}
|
|
12726
|
-
function getTextAlternativeInternal(element, options) {
|
|
12727
|
-
var _a, _b, _c, _d;
|
|
12244
|
+
function getElementAccessibleNameInternal(element, options) {
|
|
12728
12245
|
if (options.visitedElements.has(element))
|
|
12729
12246
|
return "";
|
|
12730
12247
|
const childOptions = {
|
|
12731
12248
|
...options,
|
|
12249
|
+
embeddedInLabel: options.embeddedInLabel === "self" ? "descendant" : options.embeddedInLabel,
|
|
12250
|
+
embeddedInLabelledBy: options.embeddedInLabelledBy === "self" ? "descendant" : options.embeddedInLabelledBy,
|
|
12732
12251
|
embeddedInTargetElement: options.embeddedInTargetElement === "self" ? "descendant" : options.embeddedInTargetElement
|
|
12733
12252
|
};
|
|
12734
|
-
if (!options.includeHidden) {
|
|
12735
|
-
|
|
12736
|
-
|
|
12737
|
-
options.visitedElements.add(element);
|
|
12738
|
-
return "";
|
|
12739
|
-
}
|
|
12253
|
+
if (!options.includeHidden && options.embeddedInLabelledBy !== "self" && isElementHiddenForAria(element)) {
|
|
12254
|
+
options.visitedElements.add(element);
|
|
12255
|
+
return "";
|
|
12740
12256
|
}
|
|
12741
12257
|
const labelledBy = getAriaLabelledByElements(element);
|
|
12742
|
-
if (
|
|
12743
|
-
const accessibleName = (labelledBy || []).map((ref) =>
|
|
12258
|
+
if (options.embeddedInLabelledBy === "none") {
|
|
12259
|
+
const accessibleName = (labelledBy || []).map((ref) => getElementAccessibleNameInternal(ref, {
|
|
12744
12260
|
...options,
|
|
12745
|
-
embeddedInLabelledBy:
|
|
12746
|
-
embeddedInDescribedBy: void 0,
|
|
12261
|
+
embeddedInLabelledBy: "self",
|
|
12747
12262
|
embeddedInTargetElement: "none",
|
|
12748
|
-
embeddedInLabel:
|
|
12749
|
-
|
|
12263
|
+
embeddedInLabel: "none",
|
|
12264
|
+
embeddedInTextAlternativeElement: false
|
|
12750
12265
|
})).join(" ");
|
|
12751
12266
|
if (accessibleName)
|
|
12752
12267
|
return accessibleName;
|
|
12753
12268
|
}
|
|
12754
12269
|
const role = getAriaRole(element) || "";
|
|
12755
|
-
|
|
12756
|
-
if (!!options.embeddedInLabel || !!options.embeddedInLabelledBy || options.embeddedInTargetElement === "descendant") {
|
|
12270
|
+
if (options.embeddedInLabel !== "none" || options.embeddedInLabelledBy !== "none") {
|
|
12757
12271
|
const isOwnLabel = [...element.labels || []].includes(element);
|
|
12758
12272
|
const isOwnLabelledBy = (labelledBy || []).includes(element);
|
|
12759
12273
|
if (!isOwnLabel && !isOwnLabelledBy) {
|
|
12760
12274
|
if (role === "textbox") {
|
|
12761
12275
|
options.visitedElements.add(element);
|
|
12762
|
-
if (tagName === "INPUT" || tagName === "TEXTAREA")
|
|
12276
|
+
if (element.tagName === "INPUT" || element.tagName === "TEXTAREA")
|
|
12763
12277
|
return element.value;
|
|
12764
12278
|
return element.textContent || "";
|
|
12765
12279
|
}
|
|
12766
12280
|
if (["combobox", "listbox"].includes(role)) {
|
|
12767
12281
|
options.visitedElements.add(element);
|
|
12768
12282
|
let selectedOptions;
|
|
12769
|
-
if (tagName === "SELECT") {
|
|
12283
|
+
if (element.tagName === "SELECT") {
|
|
12770
12284
|
selectedOptions = [...element.selectedOptions];
|
|
12771
12285
|
if (!selectedOptions.length && element.options.length)
|
|
12772
12286
|
selectedOptions.push(element.options[0]);
|
|
@@ -12774,10 +12288,7 @@ function getTextAlternativeInternal(element, options) {
|
|
|
12774
12288
|
const listbox = role === "combobox" ? queryInAriaOwned(element, "*").find((e) => getAriaRole(e) === "listbox") : element;
|
|
12775
12289
|
selectedOptions = listbox ? queryInAriaOwned(listbox, '[aria-selected="true"]').filter((e) => getAriaRole(e) === "option") : [];
|
|
12776
12290
|
}
|
|
12777
|
-
|
|
12778
|
-
return element.value;
|
|
12779
|
-
}
|
|
12780
|
-
return selectedOptions.map((option) => getTextAlternativeInternal(option, childOptions)).join(" ");
|
|
12291
|
+
return selectedOptions.map((option) => getElementAccessibleNameInternal(option, childOptions)).join(" ");
|
|
12781
12292
|
}
|
|
12782
12293
|
if (["progressbar", "scrollbar", "slider", "spinbutton", "meter"].includes(role)) {
|
|
12783
12294
|
options.visitedElements.add(element);
|
|
@@ -12794,15 +12305,15 @@ function getTextAlternativeInternal(element, options) {
|
|
|
12794
12305
|
}
|
|
12795
12306
|
}
|
|
12796
12307
|
const ariaLabel = element.getAttribute("aria-label") || "";
|
|
12797
|
-
if (
|
|
12308
|
+
if (ariaLabel.trim()) {
|
|
12798
12309
|
options.visitedElements.add(element);
|
|
12799
12310
|
return ariaLabel;
|
|
12800
12311
|
}
|
|
12801
12312
|
if (!["presentation", "none"].includes(role)) {
|
|
12802
|
-
if (tagName === "INPUT" && ["button", "submit", "reset"].includes(element.type)) {
|
|
12313
|
+
if (element.tagName === "INPUT" && ["button", "submit", "reset"].includes(element.type)) {
|
|
12803
12314
|
options.visitedElements.add(element);
|
|
12804
12315
|
const value = element.value || "";
|
|
12805
|
-
if (
|
|
12316
|
+
if (value.trim())
|
|
12806
12317
|
return value;
|
|
12807
12318
|
if (element.type === "submit")
|
|
12808
12319
|
return "Submit";
|
|
@@ -12811,85 +12322,85 @@ function getTextAlternativeInternal(element, options) {
|
|
|
12811
12322
|
const title = element.getAttribute("title") || "";
|
|
12812
12323
|
return title;
|
|
12813
12324
|
}
|
|
12814
|
-
if (tagName === "INPUT" && element.type === "image") {
|
|
12325
|
+
if (element.tagName === "INPUT" && element.type === "image") {
|
|
12815
12326
|
options.visitedElements.add(element);
|
|
12816
12327
|
const labels = element.labels || [];
|
|
12817
|
-
if (labels.length &&
|
|
12328
|
+
if (labels.length && options.embeddedInLabelledBy === "none")
|
|
12818
12329
|
return getAccessibleNameFromAssociatedLabels(labels, options);
|
|
12819
12330
|
const alt = element.getAttribute("alt") || "";
|
|
12820
|
-
if (
|
|
12331
|
+
if (alt.trim())
|
|
12821
12332
|
return alt;
|
|
12822
12333
|
const title = element.getAttribute("title") || "";
|
|
12823
|
-
if (
|
|
12334
|
+
if (title.trim())
|
|
12824
12335
|
return title;
|
|
12825
12336
|
return "Submit";
|
|
12826
12337
|
}
|
|
12827
|
-
if (!labelledBy && tagName === "BUTTON") {
|
|
12338
|
+
if (!labelledBy && element.tagName === "BUTTON") {
|
|
12828
12339
|
options.visitedElements.add(element);
|
|
12829
12340
|
const labels = element.labels || [];
|
|
12830
12341
|
if (labels.length)
|
|
12831
12342
|
return getAccessibleNameFromAssociatedLabels(labels, options);
|
|
12832
12343
|
}
|
|
12833
|
-
if (!labelledBy && tagName === "OUTPUT") {
|
|
12344
|
+
if (!labelledBy && element.tagName === "OUTPUT") {
|
|
12834
12345
|
options.visitedElements.add(element);
|
|
12835
12346
|
const labels = element.labels || [];
|
|
12836
12347
|
if (labels.length)
|
|
12837
12348
|
return getAccessibleNameFromAssociatedLabels(labels, options);
|
|
12838
12349
|
return element.getAttribute("title") || "";
|
|
12839
12350
|
}
|
|
12840
|
-
if (!labelledBy && (tagName === "TEXTAREA" || tagName === "SELECT" || tagName === "INPUT")) {
|
|
12351
|
+
if (!labelledBy && (element.tagName === "TEXTAREA" || element.tagName === "SELECT" || element.tagName === "INPUT")) {
|
|
12841
12352
|
options.visitedElements.add(element);
|
|
12842
12353
|
const labels = element.labels || [];
|
|
12843
12354
|
if (labels.length)
|
|
12844
12355
|
return getAccessibleNameFromAssociatedLabels(labels, options);
|
|
12845
|
-
const usePlaceholder = tagName === "INPUT" && ["text", "password", "search", "tel", "email", "url"].includes(element.type) || tagName === "TEXTAREA";
|
|
12356
|
+
const usePlaceholder = element.tagName === "INPUT" && ["text", "password", "search", "tel", "email", "url"].includes(element.type) || element.tagName === "TEXTAREA";
|
|
12846
12357
|
const placeholder = element.getAttribute("placeholder") || "";
|
|
12847
12358
|
const title = element.getAttribute("title") || "";
|
|
12848
12359
|
if (!usePlaceholder || title)
|
|
12849
12360
|
return title;
|
|
12850
12361
|
return placeholder;
|
|
12851
12362
|
}
|
|
12852
|
-
if (!labelledBy && tagName === "FIELDSET") {
|
|
12363
|
+
if (!labelledBy && element.tagName === "FIELDSET") {
|
|
12853
12364
|
options.visitedElements.add(element);
|
|
12854
12365
|
for (let child = element.firstElementChild; child; child = child.nextElementSibling) {
|
|
12855
|
-
if (
|
|
12856
|
-
return
|
|
12366
|
+
if (child.tagName === "LEGEND") {
|
|
12367
|
+
return getElementAccessibleNameInternal(child, {
|
|
12857
12368
|
...childOptions,
|
|
12858
|
-
|
|
12369
|
+
embeddedInTextAlternativeElement: true
|
|
12859
12370
|
});
|
|
12860
12371
|
}
|
|
12861
12372
|
}
|
|
12862
12373
|
const title = element.getAttribute("title") || "";
|
|
12863
12374
|
return title;
|
|
12864
12375
|
}
|
|
12865
|
-
if (!labelledBy && tagName === "FIGURE") {
|
|
12376
|
+
if (!labelledBy && element.tagName === "FIGURE") {
|
|
12866
12377
|
options.visitedElements.add(element);
|
|
12867
12378
|
for (let child = element.firstElementChild; child; child = child.nextElementSibling) {
|
|
12868
|
-
if (
|
|
12869
|
-
return
|
|
12379
|
+
if (child.tagName === "FIGCAPTION") {
|
|
12380
|
+
return getElementAccessibleNameInternal(child, {
|
|
12870
12381
|
...childOptions,
|
|
12871
|
-
|
|
12382
|
+
embeddedInTextAlternativeElement: true
|
|
12872
12383
|
});
|
|
12873
12384
|
}
|
|
12874
12385
|
}
|
|
12875
12386
|
const title = element.getAttribute("title") || "";
|
|
12876
12387
|
return title;
|
|
12877
12388
|
}
|
|
12878
|
-
if (tagName === "IMG") {
|
|
12389
|
+
if (element.tagName === "IMG") {
|
|
12879
12390
|
options.visitedElements.add(element);
|
|
12880
12391
|
const alt = element.getAttribute("alt") || "";
|
|
12881
|
-
if (
|
|
12392
|
+
if (alt.trim())
|
|
12882
12393
|
return alt;
|
|
12883
12394
|
const title = element.getAttribute("title") || "";
|
|
12884
12395
|
return title;
|
|
12885
12396
|
}
|
|
12886
|
-
if (tagName === "TABLE") {
|
|
12397
|
+
if (element.tagName === "TABLE") {
|
|
12887
12398
|
options.visitedElements.add(element);
|
|
12888
12399
|
for (let child = element.firstElementChild; child; child = child.nextElementSibling) {
|
|
12889
|
-
if (
|
|
12890
|
-
return
|
|
12400
|
+
if (child.tagName === "CAPTION") {
|
|
12401
|
+
return getElementAccessibleNameInternal(child, {
|
|
12891
12402
|
...childOptions,
|
|
12892
|
-
|
|
12403
|
+
embeddedInTextAlternativeElement: true
|
|
12893
12404
|
});
|
|
12894
12405
|
}
|
|
12895
12406
|
}
|
|
@@ -12897,44 +12408,43 @@ function getTextAlternativeInternal(element, options) {
|
|
|
12897
12408
|
if (summary)
|
|
12898
12409
|
return summary;
|
|
12899
12410
|
}
|
|
12900
|
-
if (tagName === "AREA") {
|
|
12411
|
+
if (element.tagName === "AREA") {
|
|
12901
12412
|
options.visitedElements.add(element);
|
|
12902
12413
|
const alt = element.getAttribute("alt") || "";
|
|
12903
|
-
if (
|
|
12414
|
+
if (alt.trim())
|
|
12904
12415
|
return alt;
|
|
12905
12416
|
const title = element.getAttribute("title") || "";
|
|
12906
12417
|
return title;
|
|
12907
12418
|
}
|
|
12908
|
-
if (tagName === "SVG" || element.ownerSVGElement) {
|
|
12419
|
+
if (element.tagName.toUpperCase() === "SVG" || element.ownerSVGElement) {
|
|
12909
12420
|
options.visitedElements.add(element);
|
|
12910
12421
|
for (let child = element.firstElementChild; child; child = child.nextElementSibling) {
|
|
12911
|
-
if (
|
|
12912
|
-
return
|
|
12422
|
+
if (child.tagName.toUpperCase() === "TITLE" && child.ownerSVGElement) {
|
|
12423
|
+
return getElementAccessibleNameInternal(child, {
|
|
12913
12424
|
...childOptions,
|
|
12914
|
-
embeddedInLabelledBy:
|
|
12425
|
+
embeddedInLabelledBy: "self"
|
|
12915
12426
|
});
|
|
12916
12427
|
}
|
|
12917
12428
|
}
|
|
12918
12429
|
}
|
|
12919
|
-
if (element.ownerSVGElement && tagName === "A") {
|
|
12430
|
+
if (element.ownerSVGElement && element.tagName.toUpperCase() === "A") {
|
|
12920
12431
|
const title = element.getAttribute("xlink:title") || "";
|
|
12921
|
-
if (
|
|
12432
|
+
if (title.trim()) {
|
|
12922
12433
|
options.visitedElements.add(element);
|
|
12923
12434
|
return title;
|
|
12924
12435
|
}
|
|
12925
12436
|
}
|
|
12926
12437
|
}
|
|
12927
|
-
|
|
12928
|
-
if (allowsNameFromContent(role, options.embeddedInTargetElement === "descendant") || shouldNameFromContentForSummary || !!options.embeddedInLabelledBy || !!options.embeddedInDescribedBy || !!options.embeddedInLabel || !!options.embeddedInNativeTextAlternative) {
|
|
12438
|
+
if (allowsNameFromContent(role, options.embeddedInTargetElement === "descendant") || options.embeddedInLabelledBy !== "none" || options.embeddedInLabel !== "none" || options.embeddedInTextAlternativeElement) {
|
|
12929
12439
|
options.visitedElements.add(element);
|
|
12930
12440
|
const tokens = [];
|
|
12931
12441
|
const visit = (node, skipSlotted) => {
|
|
12932
|
-
var
|
|
12442
|
+
var _a;
|
|
12933
12443
|
if (skipSlotted && node.assignedSlot)
|
|
12934
12444
|
return;
|
|
12935
12445
|
if (node.nodeType === 1) {
|
|
12936
|
-
const display = ((
|
|
12937
|
-
let token =
|
|
12446
|
+
const display = ((_a = getElementComputedStyle(node)) == null ? void 0 : _a.display) || "inline";
|
|
12447
|
+
let token = getElementAccessibleNameInternal(node, childOptions);
|
|
12938
12448
|
if (display !== "inline" || node.nodeName === "BR")
|
|
12939
12449
|
token = " " + token + " ";
|
|
12940
12450
|
tokens.push(token);
|
|
@@ -12959,14 +12469,13 @@ function getTextAlternativeInternal(element, options) {
|
|
|
12959
12469
|
}
|
|
12960
12470
|
tokens.push(getPseudoContent(element, "::after"));
|
|
12961
12471
|
const accessibleName = tokens.join("");
|
|
12962
|
-
|
|
12963
|
-
if (maybeTrimmedAccessibleName)
|
|
12472
|
+
if (accessibleName.trim())
|
|
12964
12473
|
return accessibleName;
|
|
12965
12474
|
}
|
|
12966
|
-
if (!["presentation", "none"].includes(role) || tagName === "IFRAME") {
|
|
12475
|
+
if (!["presentation", "none"].includes(role) || element.tagName === "IFRAME") {
|
|
12967
12476
|
options.visitedElements.add(element);
|
|
12968
12477
|
const title = element.getAttribute("title") || "";
|
|
12969
|
-
if (
|
|
12478
|
+
if (title.trim())
|
|
12970
12479
|
return title;
|
|
12971
12480
|
}
|
|
12972
12481
|
options.visitedElements.add(element);
|
|
@@ -12974,7 +12483,7 @@ function getTextAlternativeInternal(element, options) {
|
|
|
12974
12483
|
}
|
|
12975
12484
|
const kAriaSelectedRoles = ["gridcell", "option", "row", "tab", "rowheader", "columnheader", "treeitem"];
|
|
12976
12485
|
function getAriaSelected(element) {
|
|
12977
|
-
if (
|
|
12486
|
+
if (element.tagName === "OPTION")
|
|
12978
12487
|
return element.selected;
|
|
12979
12488
|
if (kAriaSelectedRoles.includes(getAriaRole(element) || ""))
|
|
12980
12489
|
return getAriaBoolean(element.getAttribute("aria-selected")) === true;
|
|
@@ -12986,10 +12495,9 @@ function getAriaChecked(element) {
|
|
|
12986
12495
|
return result === "error" ? false : result;
|
|
12987
12496
|
}
|
|
12988
12497
|
function getChecked(element, allowMixed) {
|
|
12989
|
-
|
|
12990
|
-
if (allowMixed && tagName === "INPUT" && element.indeterminate)
|
|
12498
|
+
if (allowMixed && element.tagName === "INPUT" && element.indeterminate)
|
|
12991
12499
|
return "mixed";
|
|
12992
|
-
if (tagName === "INPUT" && ["checkbox", "radio"].includes(element.type))
|
|
12500
|
+
if (element.tagName === "INPUT" && ["checkbox", "radio"].includes(element.type))
|
|
12993
12501
|
return element.checked;
|
|
12994
12502
|
if (kAriaCheckedRoles.includes(getAriaRole(element) || "")) {
|
|
12995
12503
|
const checked = element.getAttribute("aria-checked");
|
|
@@ -13014,7 +12522,7 @@ function getAriaPressed(element) {
|
|
|
13014
12522
|
}
|
|
13015
12523
|
const kAriaExpandedRoles = ["application", "button", "checkbox", "combobox", "gridcell", "link", "listbox", "menuitem", "row", "rowheader", "tab", "treeitem", "columnheader", "menuitemcheckbox", "menuitemradio", "rowheader", "switch"];
|
|
13016
12524
|
function getAriaExpanded(element) {
|
|
13017
|
-
if (
|
|
12525
|
+
if (element.tagName === "DETAILS")
|
|
13018
12526
|
return element.open;
|
|
13019
12527
|
if (kAriaExpandedRoles.includes(getAriaRole(element) || "")) {
|
|
13020
12528
|
const expanded = element.getAttribute("aria-expanded");
|
|
@@ -13028,7 +12536,7 @@ function getAriaExpanded(element) {
|
|
|
13028
12536
|
}
|
|
13029
12537
|
const kAriaLevelRoles = ["heading", "listitem", "row", "treeitem"];
|
|
13030
12538
|
function getAriaLevel(element) {
|
|
13031
|
-
const native = { "H1": 1, "H2": 2, "H3": 3, "H4": 4, "H5": 5, "H6": 6 }[
|
|
12539
|
+
const native = { "H1": 1, "H2": 2, "H3": 3, "H4": 4, "H5": 5, "H6": 6 }[element.tagName];
|
|
13032
12540
|
if (native)
|
|
13033
12541
|
return native;
|
|
13034
12542
|
if (kAriaLevelRoles.includes(getAriaRole(element) || "")) {
|
|
@@ -13041,16 +12549,15 @@ function getAriaLevel(element) {
|
|
|
13041
12549
|
}
|
|
13042
12550
|
const kAriaDisabledRoles = ["application", "button", "composite", "gridcell", "group", "input", "link", "menuitem", "scrollbar", "separator", "tab", "checkbox", "columnheader", "combobox", "grid", "listbox", "menu", "menubar", "menuitemcheckbox", "menuitemradio", "option", "radio", "radiogroup", "row", "rowheader", "searchbox", "select", "slider", "spinbutton", "switch", "tablist", "textbox", "toolbar", "tree", "treegrid", "treeitem"];
|
|
13043
12551
|
function getAriaDisabled(element) {
|
|
13044
|
-
return isNativelyDisabled(element) || hasExplicitAriaDisabled(element);
|
|
13045
|
-
}
|
|
13046
|
-
function isNativelyDisabled(element) {
|
|
13047
12552
|
const isNativeFormControl = ["BUTTON", "INPUT", "SELECT", "TEXTAREA", "OPTION", "OPTGROUP"].includes(element.tagName);
|
|
13048
|
-
|
|
12553
|
+
if (isNativeFormControl && (element.hasAttribute("disabled") || belongsToDisabledFieldSet(element)))
|
|
12554
|
+
return true;
|
|
12555
|
+
return hasExplicitAriaDisabled(element);
|
|
13049
12556
|
}
|
|
13050
12557
|
function belongsToDisabledFieldSet(element) {
|
|
13051
12558
|
if (!element)
|
|
13052
12559
|
return false;
|
|
13053
|
-
if (
|
|
12560
|
+
if (element.tagName === "FIELDSET" && element.hasAttribute("disabled"))
|
|
13054
12561
|
return true;
|
|
13055
12562
|
return belongsToDisabledFieldSet(element.parentElement);
|
|
13056
12563
|
}
|
|
@@ -13067,29 +12574,60 @@ function hasExplicitAriaDisabled(element) {
|
|
|
13067
12574
|
return hasExplicitAriaDisabled(parentElementOrShadowHost(element));
|
|
13068
12575
|
}
|
|
13069
12576
|
function getAccessibleNameFromAssociatedLabels(labels, options) {
|
|
13070
|
-
return [...labels].map((label) =>
|
|
12577
|
+
return [...labels].map((label) => getElementAccessibleNameInternal(label, {
|
|
13071
12578
|
...options,
|
|
13072
|
-
embeddedInLabel:
|
|
13073
|
-
|
|
13074
|
-
embeddedInLabelledBy:
|
|
13075
|
-
embeddedInDescribedBy: void 0,
|
|
12579
|
+
embeddedInLabel: "self",
|
|
12580
|
+
embeddedInTextAlternativeElement: false,
|
|
12581
|
+
embeddedInLabelledBy: "none",
|
|
13076
12582
|
embeddedInTargetElement: "none"
|
|
13077
12583
|
})).filter((accessibleName) => !!accessibleName).join(" ");
|
|
13078
12584
|
}
|
|
12585
|
+
function getElementsByRole(document2, role) {
|
|
12586
|
+
if (document2 === cacheElementsByRoleDocument)
|
|
12587
|
+
return cacheElementsByRole.get(role) || [];
|
|
12588
|
+
const map = calculateElementsByRoleMap(document2);
|
|
12589
|
+
if (cachesCounter) {
|
|
12590
|
+
cacheElementsByRoleDocument = document2;
|
|
12591
|
+
cacheElementsByRole = map;
|
|
12592
|
+
}
|
|
12593
|
+
return map.get(role) || [];
|
|
12594
|
+
}
|
|
12595
|
+
function calculateElementsByRoleMap(document2) {
|
|
12596
|
+
const result = /* @__PURE__ */ new Map();
|
|
12597
|
+
const visit = (root) => {
|
|
12598
|
+
const shadows = [];
|
|
12599
|
+
if (root.shadowRoot)
|
|
12600
|
+
shadows.push(root.shadowRoot);
|
|
12601
|
+
for (const element of root.querySelectorAll("*")) {
|
|
12602
|
+
const role = getAriaRole(element);
|
|
12603
|
+
if (role) {
|
|
12604
|
+
let list = result.get(role);
|
|
12605
|
+
if (!list) {
|
|
12606
|
+
list = [];
|
|
12607
|
+
result.set(role, list);
|
|
12608
|
+
}
|
|
12609
|
+
list.push(element);
|
|
12610
|
+
}
|
|
12611
|
+
if (element.shadowRoot)
|
|
12612
|
+
shadows.push(element.shadowRoot);
|
|
12613
|
+
}
|
|
12614
|
+
shadows.forEach(visit);
|
|
12615
|
+
};
|
|
12616
|
+
visit(document2);
|
|
12617
|
+
return result;
|
|
12618
|
+
}
|
|
13079
12619
|
let cacheAccessibleName;
|
|
13080
12620
|
let cacheAccessibleNameHidden;
|
|
13081
|
-
let cacheAccessibleDescription;
|
|
13082
|
-
let cacheAccessibleDescriptionHidden;
|
|
13083
12621
|
let cacheIsHidden;
|
|
13084
12622
|
let cachePseudoContentBefore;
|
|
13085
12623
|
let cachePseudoContentAfter;
|
|
12624
|
+
let cacheElementsByRole;
|
|
12625
|
+
let cacheElementsByRoleDocument;
|
|
13086
12626
|
let cachesCounter = 0;
|
|
13087
12627
|
function beginAriaCaches() {
|
|
13088
12628
|
++cachesCounter;
|
|
13089
12629
|
cacheAccessibleName ?? (cacheAccessibleName = /* @__PURE__ */ new Map());
|
|
13090
12630
|
cacheAccessibleNameHidden ?? (cacheAccessibleNameHidden = /* @__PURE__ */ new Map());
|
|
13091
|
-
cacheAccessibleDescription ?? (cacheAccessibleDescription = /* @__PURE__ */ new Map());
|
|
13092
|
-
cacheAccessibleDescriptionHidden ?? (cacheAccessibleDescriptionHidden = /* @__PURE__ */ new Map());
|
|
13093
12631
|
cacheIsHidden ?? (cacheIsHidden = /* @__PURE__ */ new Map());
|
|
13094
12632
|
cachePseudoContentBefore ?? (cachePseudoContentBefore = /* @__PURE__ */ new Map());
|
|
13095
12633
|
cachePseudoContentAfter ?? (cachePseudoContentAfter = /* @__PURE__ */ new Map());
|
|
@@ -13098,11 +12636,11 @@ function endAriaCaches() {
|
|
|
13098
12636
|
if (!--cachesCounter) {
|
|
13099
12637
|
cacheAccessibleName = void 0;
|
|
13100
12638
|
cacheAccessibleNameHidden = void 0;
|
|
13101
|
-
cacheAccessibleDescription = void 0;
|
|
13102
|
-
cacheAccessibleDescriptionHidden = void 0;
|
|
13103
12639
|
cacheIsHidden = void 0;
|
|
13104
12640
|
cachePseudoContentBefore = void 0;
|
|
13105
12641
|
cachePseudoContentAfter = void 0;
|
|
12642
|
+
cacheElementsByRole = void 0;
|
|
12643
|
+
cacheElementsByRoleDocument = void 0;
|
|
13106
12644
|
}
|
|
13107
12645
|
}
|
|
13108
12646
|
function matchesComponentAttribute(obj, attr) {
|
|
@@ -13381,14 +12919,12 @@ function buildComponentsTreeVue3(instance) {
|
|
|
13381
12919
|
return name;
|
|
13382
12920
|
if (instance2.root === instance2)
|
|
13383
12921
|
return "Root";
|
|
13384
|
-
for (const key in (_b = (_a = instance2.parent) == null ? void 0 : _a.type) == null ? void 0 : _b.components)
|
|
12922
|
+
for (const key in (_b = (_a = instance2.parent) == null ? void 0 : _a.type) == null ? void 0 : _b.components)
|
|
13385
12923
|
if (((_c = instance2.parent) == null ? void 0 : _c.type.components[key]) === instance2.type)
|
|
13386
12924
|
return saveComponentName(instance2, key);
|
|
13387
|
-
|
|
13388
|
-
for (const key in (_d = instance2.appContext) == null ? void 0 : _d.components) {
|
|
12925
|
+
for (const key in (_d = instance2.appContext) == null ? void 0 : _d.components)
|
|
13389
12926
|
if (instance2.appContext.components[key] === instance2.type)
|
|
13390
12927
|
return saveComponentName(instance2, key);
|
|
13391
|
-
}
|
|
13392
12928
|
return "Anonymous Component";
|
|
13393
12929
|
}
|
|
13394
12930
|
function isBeingDestroyed(instance2) {
|
|
@@ -13615,26 +13151,27 @@ function validateAttributes(attrs, role) {
|
|
|
13615
13151
|
return options;
|
|
13616
13152
|
}
|
|
13617
13153
|
function queryRole(scope, options, internal) {
|
|
13618
|
-
const
|
|
13619
|
-
const
|
|
13620
|
-
|
|
13621
|
-
|
|
13154
|
+
const doc = scope.nodeType === 9 ? scope : scope.ownerDocument;
|
|
13155
|
+
const elements = doc ? getElementsByRole(doc, options.role) : [];
|
|
13156
|
+
return elements.filter((element) => {
|
|
13157
|
+
if (!isInsideScope(scope, element))
|
|
13158
|
+
return false;
|
|
13622
13159
|
if (options.selected !== void 0 && getAriaSelected(element) !== options.selected)
|
|
13623
|
-
return;
|
|
13160
|
+
return false;
|
|
13624
13161
|
if (options.checked !== void 0 && getAriaChecked(element) !== options.checked)
|
|
13625
|
-
return;
|
|
13162
|
+
return false;
|
|
13626
13163
|
if (options.pressed !== void 0 && getAriaPressed(element) !== options.pressed)
|
|
13627
|
-
return;
|
|
13164
|
+
return false;
|
|
13628
13165
|
if (options.expanded !== void 0 && getAriaExpanded(element) !== options.expanded)
|
|
13629
|
-
return;
|
|
13166
|
+
return false;
|
|
13630
13167
|
if (options.level !== void 0 && getAriaLevel(element) !== options.level)
|
|
13631
|
-
return;
|
|
13168
|
+
return false;
|
|
13632
13169
|
if (options.disabled !== void 0 && getAriaDisabled(element) !== options.disabled)
|
|
13633
|
-
return;
|
|
13170
|
+
return false;
|
|
13634
13171
|
if (!options.includeHidden) {
|
|
13635
13172
|
const isHidden = isElementHiddenForAria(element);
|
|
13636
13173
|
if (isHidden)
|
|
13637
|
-
return;
|
|
13174
|
+
return false;
|
|
13638
13175
|
}
|
|
13639
13176
|
if (options.name !== void 0) {
|
|
13640
13177
|
const accessibleName = normalizeWhiteSpace(getElementAccessibleName(element, !!options.includeHidden));
|
|
@@ -13643,23 +13180,10 @@ function queryRole(scope, options, internal) {
|
|
|
13643
13180
|
if (internal && !options.exact && options.nameOp === "=")
|
|
13644
13181
|
options.nameOp = "*=";
|
|
13645
13182
|
if (!matchesAttributePart(accessibleName, { name: "", jsonPath: [], op: options.nameOp || "=", value: options.name, caseSensitive: !!options.exact }))
|
|
13646
|
-
return;
|
|
13647
|
-
}
|
|
13648
|
-
result.push(element);
|
|
13649
|
-
};
|
|
13650
|
-
const query = (root) => {
|
|
13651
|
-
const shadows = [];
|
|
13652
|
-
if (root.shadowRoot)
|
|
13653
|
-
shadows.push(root.shadowRoot);
|
|
13654
|
-
for (const element of root.querySelectorAll("*")) {
|
|
13655
|
-
match(element);
|
|
13656
|
-
if (element.shadowRoot)
|
|
13657
|
-
shadows.push(element.shadowRoot);
|
|
13183
|
+
return false;
|
|
13658
13184
|
}
|
|
13659
|
-
|
|
13660
|
-
};
|
|
13661
|
-
query(scope);
|
|
13662
|
-
return result;
|
|
13185
|
+
return true;
|
|
13186
|
+
});
|
|
13663
13187
|
}
|
|
13664
13188
|
function createRoleEngine(internal) {
|
|
13665
13189
|
return {
|
|
@@ -14272,11 +13796,7 @@ function generateSelector(injectedScript, targetElement, options) {
|
|
|
14272
13796
|
}
|
|
14273
13797
|
selectors = [joinTokens(targetTokens)];
|
|
14274
13798
|
} else {
|
|
14275
|
-
|
|
14276
|
-
const interactiveParent = closestCrossShadow(targetElement, "button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]", options.root);
|
|
14277
|
-
if (interactiveParent && isElementVisible(interactiveParent))
|
|
14278
|
-
targetElement = interactiveParent;
|
|
14279
|
-
}
|
|
13799
|
+
targetElement = closestCrossShadow(targetElement, "button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]", options.root) || targetElement;
|
|
14280
13800
|
if (options.multiple) {
|
|
14281
13801
|
const withText = generateSelectorFor(injectedScript, targetElement, options);
|
|
14282
13802
|
const withoutText = generateSelectorFor(injectedScript, targetElement, { ...options, noText: true });
|
|
@@ -14456,10 +13976,8 @@ function buildTextCandidates(injectedScript, element, isTargetNode) {
|
|
|
14456
13976
|
const cssToken = { engine: "css", selector: cssEscape(element.nodeName.toLowerCase()), score: kCSSTagNameScore };
|
|
14457
13977
|
for (const alternative of alternatives)
|
|
14458
13978
|
candidates.push([cssToken, { engine: "internal:has-text", selector: escapeForTextSelector(alternative.text, false), score: kTextScore - alternative.scoreBouns }]);
|
|
14459
|
-
if (text.length <= 80)
|
|
14460
|
-
|
|
14461
|
-
candidates.push([cssToken, { engine: "internal:has-text", selector: escapeForTextSelector(re2, false), score: kTextScoreRegex }]);
|
|
14462
|
-
}
|
|
13979
|
+
if (text.length <= 80)
|
|
13980
|
+
candidates.push([cssToken, { engine: "internal:has-text", selector: "/^" + escapeRegExp(text) + "$/", score: kTextScoreRegex }]);
|
|
14463
13981
|
}
|
|
14464
13982
|
const ariaRole = getAriaRole(element);
|
|
14465
13983
|
if (ariaRole && !["none", "presentation"].includes(ariaRole)) {
|
|
@@ -14611,6 +14129,9 @@ function isGuidLike(id2) {
|
|
|
14611
14129
|
}
|
|
14612
14130
|
return transitionCount >= id2.length / 4;
|
|
14613
14131
|
}
|
|
14132
|
+
function escapeRegExp(s) {
|
|
14133
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
14134
|
+
}
|
|
14614
14135
|
function trimWordBoundary(text, maxLength) {
|
|
14615
14136
|
if (text.length <= maxLength)
|
|
14616
14137
|
return text;
|
|
@@ -14626,7 +14147,7 @@ function suitableTextAlternatives(text) {
|
|
|
14626
14147
|
const match = text.match(/^([\d.,]+)[^.,\w]/);
|
|
14627
14148
|
const leadingNumberLength = match ? match[1].length : 0;
|
|
14628
14149
|
if (leadingNumberLength) {
|
|
14629
|
-
const alt =
|
|
14150
|
+
const alt = text.substring(leadingNumberLength).trimStart();
|
|
14630
14151
|
result.push({ text: alt, scoreBouns: alt.length <= 30 ? 2 : 1 });
|
|
14631
14152
|
}
|
|
14632
14153
|
}
|
|
@@ -14634,7 +14155,7 @@ function suitableTextAlternatives(text) {
|
|
|
14634
14155
|
const match = text.match(/[^.,\w]([\d.,]+)$/);
|
|
14635
14156
|
const trailingNumberLength = match ? match[1].length : 0;
|
|
14636
14157
|
if (trailingNumberLength) {
|
|
14637
|
-
const alt =
|
|
14158
|
+
const alt = text.substring(0, text.length - trailingNumberLength).trimEnd();
|
|
14638
14159
|
result.push({ text: alt, scoreBouns: alt.length <= 30 ? 2 : 1 });
|
|
14639
14160
|
}
|
|
14640
14161
|
}
|
|
@@ -14649,7 +14170,328 @@ function suitableTextAlternatives(text) {
|
|
|
14649
14170
|
result.push({ text: text.substring(0, 80), scoreBouns: 0 });
|
|
14650
14171
|
return result;
|
|
14651
14172
|
}
|
|
14652
|
-
const highlightCSS =
|
|
14173
|
+
const highlightCSS = `/**
|
|
14174
|
+
* Copyright (c) Microsoft Corporation.
|
|
14175
|
+
*
|
|
14176
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
14177
|
+
* you may not use this file except in compliance with the License.
|
|
14178
|
+
* You may obtain a copy of the License at
|
|
14179
|
+
*
|
|
14180
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14181
|
+
*
|
|
14182
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14183
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14184
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14185
|
+
* See the License for the specific language governing permissions and
|
|
14186
|
+
* limitations under the License.
|
|
14187
|
+
*/
|
|
14188
|
+
|
|
14189
|
+
:host {
|
|
14190
|
+
font-size: 13px;
|
|
14191
|
+
font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif;
|
|
14192
|
+
color: #333;
|
|
14193
|
+
}
|
|
14194
|
+
|
|
14195
|
+
x-pw-tooltip {
|
|
14196
|
+
backdrop-filter: blur(5px);
|
|
14197
|
+
background-color: white;
|
|
14198
|
+
border-radius: 6px;
|
|
14199
|
+
box-shadow: 0 0.5rem 1.2rem rgba(0,0,0,.3);
|
|
14200
|
+
display: none;
|
|
14201
|
+
font-size: 12.8px;
|
|
14202
|
+
font-weight: normal;
|
|
14203
|
+
left: 0;
|
|
14204
|
+
line-height: 1.5;
|
|
14205
|
+
max-width: 600px;
|
|
14206
|
+
position: absolute;
|
|
14207
|
+
top: 0;
|
|
14208
|
+
padding: 0;
|
|
14209
|
+
flex-direction: column;
|
|
14210
|
+
overflow: hidden;
|
|
14211
|
+
}
|
|
14212
|
+
|
|
14213
|
+
x-pw-tooltip-line {
|
|
14214
|
+
display: flex;
|
|
14215
|
+
max-width: 600px;
|
|
14216
|
+
padding: 6px;
|
|
14217
|
+
user-select: none;
|
|
14218
|
+
cursor: pointer;
|
|
14219
|
+
}
|
|
14220
|
+
|
|
14221
|
+
x-pw-tooltip-line.selectable:hover {
|
|
14222
|
+
background-color: hsl(0, 0%, 95%);
|
|
14223
|
+
overflow: hidden;
|
|
14224
|
+
}
|
|
14225
|
+
|
|
14226
|
+
x-pw-tooltip-footer {
|
|
14227
|
+
display: flex;
|
|
14228
|
+
max-width: 600px;
|
|
14229
|
+
padding: 6px;
|
|
14230
|
+
user-select: none;
|
|
14231
|
+
color: #777;
|
|
14232
|
+
}
|
|
14233
|
+
|
|
14234
|
+
x-pw-dialog {
|
|
14235
|
+
background-color: white;
|
|
14236
|
+
pointer-events: auto;
|
|
14237
|
+
border-radius: 6px;
|
|
14238
|
+
box-shadow: 0 0.5rem 1.2rem rgba(0,0,0,.3);
|
|
14239
|
+
display: flex;
|
|
14240
|
+
flex-direction: column;
|
|
14241
|
+
position: absolute;
|
|
14242
|
+
width: 400px;
|
|
14243
|
+
height: 150px;
|
|
14244
|
+
z-index: 10;
|
|
14245
|
+
font-size: 13px;
|
|
14246
|
+
}
|
|
14247
|
+
|
|
14248
|
+
x-pw-dialog-body {
|
|
14249
|
+
display: flex;
|
|
14250
|
+
flex-direction: column;
|
|
14251
|
+
flex: auto;
|
|
14252
|
+
}
|
|
14253
|
+
|
|
14254
|
+
x-pw-dialog-body label {
|
|
14255
|
+
margin: 5px 8px;
|
|
14256
|
+
display: flex;
|
|
14257
|
+
flex-direction: row;
|
|
14258
|
+
align-items: center;
|
|
14259
|
+
}
|
|
14260
|
+
|
|
14261
|
+
x-pw-highlight {
|
|
14262
|
+
position: absolute;
|
|
14263
|
+
top: 0;
|
|
14264
|
+
left: 0;
|
|
14265
|
+
width: 0;
|
|
14266
|
+
height: 0;
|
|
14267
|
+
}
|
|
14268
|
+
|
|
14269
|
+
x-pw-action-point {
|
|
14270
|
+
position: absolute;
|
|
14271
|
+
width: 20px;
|
|
14272
|
+
height: 20px;
|
|
14273
|
+
background: red;
|
|
14274
|
+
border-radius: 10px;
|
|
14275
|
+
margin: -10px 0 0 -10px;
|
|
14276
|
+
z-index: 2;
|
|
14277
|
+
}
|
|
14278
|
+
|
|
14279
|
+
x-pw-separator {
|
|
14280
|
+
height: 1px;
|
|
14281
|
+
margin: 6px 9px;
|
|
14282
|
+
background: rgb(148 148 148 / 90%);
|
|
14283
|
+
}
|
|
14284
|
+
|
|
14285
|
+
x-pw-tool-gripper {
|
|
14286
|
+
height: 28px;
|
|
14287
|
+
width: 24px;
|
|
14288
|
+
margin: 2px 0;
|
|
14289
|
+
cursor: grab;
|
|
14290
|
+
}
|
|
14291
|
+
|
|
14292
|
+
x-pw-tool-gripper:active {
|
|
14293
|
+
cursor: grabbing;
|
|
14294
|
+
}
|
|
14295
|
+
|
|
14296
|
+
x-pw-tool-gripper > x-div {
|
|
14297
|
+
width: 100%;
|
|
14298
|
+
height: 100%;
|
|
14299
|
+
-webkit-mask-repeat: no-repeat;
|
|
14300
|
+
-webkit-mask-position: center;
|
|
14301
|
+
-webkit-mask-size: 20px;
|
|
14302
|
+
mask-repeat: no-repeat;
|
|
14303
|
+
mask-position: center;
|
|
14304
|
+
mask-size: 16px;
|
|
14305
|
+
-webkit-mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path d='M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z' /></svg>");
|
|
14306
|
+
mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path d='M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z' /></svg>");
|
|
14307
|
+
background-color: #555555;
|
|
14308
|
+
}
|
|
14309
|
+
|
|
14310
|
+
x-pw-tools-list > label {
|
|
14311
|
+
display: flex;
|
|
14312
|
+
align-items: center;
|
|
14313
|
+
margin: 0 10px;
|
|
14314
|
+
user-select: none;
|
|
14315
|
+
}
|
|
14316
|
+
|
|
14317
|
+
x-pw-tools-list {
|
|
14318
|
+
display: flex;
|
|
14319
|
+
width: 100%;
|
|
14320
|
+
border-bottom: 1px solid #dddddd;
|
|
14321
|
+
}
|
|
14322
|
+
|
|
14323
|
+
x-pw-tool-item {
|
|
14324
|
+
pointer-events: auto;
|
|
14325
|
+
cursor: pointer;
|
|
14326
|
+
height: 28px;
|
|
14327
|
+
width: 28px;
|
|
14328
|
+
border-radius: 3px;
|
|
14329
|
+
}
|
|
14330
|
+
|
|
14331
|
+
x-pw-tool-item:not(.disabled):hover {
|
|
14332
|
+
background-color: hsl(0, 0%, 86%);
|
|
14333
|
+
}
|
|
14334
|
+
|
|
14335
|
+
x-pw-tool-item.active {
|
|
14336
|
+
background-color: rgba(138, 202, 228, 0.5);
|
|
14337
|
+
}
|
|
14338
|
+
|
|
14339
|
+
x-pw-tool-item.active:not(.disabled):hover {
|
|
14340
|
+
background-color: #8acae4c4;
|
|
14341
|
+
}
|
|
14342
|
+
|
|
14343
|
+
x-pw-tool-item > x-div {
|
|
14344
|
+
width: 100%;
|
|
14345
|
+
height: 100%;
|
|
14346
|
+
-webkit-mask-repeat: no-repeat;
|
|
14347
|
+
-webkit-mask-position: center;
|
|
14348
|
+
-webkit-mask-size: 20px;
|
|
14349
|
+
mask-repeat: no-repeat;
|
|
14350
|
+
mask-position: center;
|
|
14351
|
+
mask-size: 16px;
|
|
14352
|
+
background-color: #3a3a3a;
|
|
14353
|
+
}
|
|
14354
|
+
|
|
14355
|
+
x-pw-tool-item.disabled > x-div {
|
|
14356
|
+
background-color: rgba(97, 97, 97, 0.5);
|
|
14357
|
+
cursor: default;
|
|
14358
|
+
}
|
|
14359
|
+
|
|
14360
|
+
x-pw-tool-item.record.active {
|
|
14361
|
+
background-color: transparent;
|
|
14362
|
+
}
|
|
14363
|
+
|
|
14364
|
+
x-pw-tool-item.record.active:hover {
|
|
14365
|
+
background-color: hsl(0, 0%, 86%);
|
|
14366
|
+
}
|
|
14367
|
+
|
|
14368
|
+
x-pw-tool-item.record.active > x-div {
|
|
14369
|
+
background-color: #a1260d;
|
|
14370
|
+
}
|
|
14371
|
+
|
|
14372
|
+
x-pw-tool-item.accept > x-div {
|
|
14373
|
+
background-color: #388a34;
|
|
14374
|
+
}
|
|
14375
|
+
|
|
14376
|
+
x-pw-tool-item.record > x-div {
|
|
14377
|
+
/* codicon: circle-large-filled */
|
|
14378
|
+
-webkit-mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path d='M8 1a6.8 6.8 0 0 1 1.86.253 6.899 6.899 0 0 1 3.083 1.805 6.903 6.903 0 0 1 1.804 3.083C14.916 6.738 15 7.357 15 8s-.084 1.262-.253 1.86a6.9 6.9 0 0 1-.704 1.674 7.157 7.157 0 0 1-2.516 2.509 6.966 6.966 0 0 1-1.668.71A6.984 6.984 0 0 1 8 15a6.984 6.984 0 0 1-1.86-.246 7.098 7.098 0 0 1-1.674-.711 7.3 7.3 0 0 1-1.415-1.094 7.295 7.295 0 0 1-1.094-1.415 7.098 7.098 0 0 1-.71-1.675A6.985 6.985 0 0 1 1 8c0-.643.082-1.262.246-1.86a6.968 6.968 0 0 1 .711-1.667 7.156 7.156 0 0 1 2.509-2.516 6.895 6.895 0 0 1 1.675-.704A6.808 6.808 0 0 1 8 1z'/></svg>");
|
|
14379
|
+
mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path d='M8 1a6.8 6.8 0 0 1 1.86.253 6.899 6.899 0 0 1 3.083 1.805 6.903 6.903 0 0 1 1.804 3.083C14.916 6.738 15 7.357 15 8s-.084 1.262-.253 1.86a6.9 6.9 0 0 1-.704 1.674 7.157 7.157 0 0 1-2.516 2.509 6.966 6.966 0 0 1-1.668.71A6.984 6.984 0 0 1 8 15a6.984 6.984 0 0 1-1.86-.246 7.098 7.098 0 0 1-1.674-.711 7.3 7.3 0 0 1-1.415-1.094 7.295 7.295 0 0 1-1.094-1.415 7.098 7.098 0 0 1-.71-1.675A6.985 6.985 0 0 1 1 8c0-.643.082-1.262.246-1.86a6.968 6.968 0 0 1 .711-1.667 7.156 7.156 0 0 1 2.509-2.516 6.895 6.895 0 0 1 1.675-.704A6.808 6.808 0 0 1 8 1z'/></svg>");
|
|
14380
|
+
}
|
|
14381
|
+
|
|
14382
|
+
x-pw-tool-item.pick-locator > x-div {
|
|
14383
|
+
/* codicon: inspect */
|
|
14384
|
+
-webkit-mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path fill-rule='evenodd' clip-rule='evenodd' d='M1 3l1-1h12l1 1v6h-1V3H2v8h5v1H2l-1-1V3zm14.707 9.707L9 6v9.414l2.707-2.707h4zM10 13V8.414l3.293 3.293h-2L10 13z'/></svg>");
|
|
14385
|
+
mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path fill-rule='evenodd' clip-rule='evenodd' d='M1 3l1-1h12l1 1v6h-1V3H2v8h5v1H2l-1-1V3zm14.707 9.707L9 6v9.414l2.707-2.707h4zM10 13V8.414l3.293 3.293h-2L10 13z'/></svg>");
|
|
14386
|
+
}
|
|
14387
|
+
|
|
14388
|
+
x-pw-tool-item.text > x-div {
|
|
14389
|
+
/* codicon: whole-word */
|
|
14390
|
+
-webkit-mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path fill-rule='evenodd' clip-rule='evenodd' d='M0 11H1V13H15V11H16V14H15H1H0V11Z'/><path d='M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z'/><path d='M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z'/></svg>");
|
|
14391
|
+
mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path fill-rule='evenodd' clip-rule='evenodd' d='M0 11H1V13H15V11H16V14H15H1H0V11Z'/><path d='M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z'/><path d='M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z'/></svg>");
|
|
14392
|
+
}
|
|
14393
|
+
|
|
14394
|
+
x-pw-tool-item.visibility > x-div {
|
|
14395
|
+
/* codicon: eye */
|
|
14396
|
+
-webkit-mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path d='M7.99993 6.00316C9.47266 6.00316 10.6666 7.19708 10.6666 8.66981C10.6666 10.1426 9.47266 11.3365 7.99993 11.3365C6.52715 11.3365 5.33324 10.1426 5.33324 8.66981C5.33324 7.19708 6.52715 6.00316 7.99993 6.00316ZM7.99993 7.00315C7.07946 7.00315 6.33324 7.74935 6.33324 8.66981C6.33324 9.59028 7.07946 10.3365 7.99993 10.3365C8.9204 10.3365 9.6666 9.59028 9.6666 8.66981C9.6666 7.74935 8.9204 7.00315 7.99993 7.00315ZM7.99993 3.66675C11.0756 3.66675 13.7307 5.76675 14.4673 8.70968C14.5344 8.97755 14.3716 9.24908 14.1037 9.31615C13.8358 9.38315 13.5643 9.22041 13.4973 8.95248C12.8713 6.45205 10.6141 4.66675 7.99993 4.66675C5.38454 4.66675 3.12664 6.45359 2.50182 8.95555C2.43491 9.22341 2.16348 9.38635 1.89557 9.31948C1.62766 9.25255 1.46471 8.98115 1.53162 8.71321C2.26701 5.76856 4.9229 3.66675 7.99993 3.66675Z'/></svg>");
|
|
14397
|
+
mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path d='M7.99993 6.00316C9.47266 6.00316 10.6666 7.19708 10.6666 8.66981C10.6666 10.1426 9.47266 11.3365 7.99993 11.3365C6.52715 11.3365 5.33324 10.1426 5.33324 8.66981C5.33324 7.19708 6.52715 6.00316 7.99993 6.00316ZM7.99993 7.00315C7.07946 7.00315 6.33324 7.74935 6.33324 8.66981C6.33324 9.59028 7.07946 10.3365 7.99993 10.3365C8.9204 10.3365 9.6666 9.59028 9.6666 8.66981C9.6666 7.74935 8.9204 7.00315 7.99993 7.00315ZM7.99993 3.66675C11.0756 3.66675 13.7307 5.76675 14.4673 8.70968C14.5344 8.97755 14.3716 9.24908 14.1037 9.31615C13.8358 9.38315 13.5643 9.22041 13.4973 8.95248C12.8713 6.45205 10.6141 4.66675 7.99993 4.66675C5.38454 4.66675 3.12664 6.45359 2.50182 8.95555C2.43491 9.22341 2.16348 9.38635 1.89557 9.31948C1.62766 9.25255 1.46471 8.98115 1.53162 8.71321C2.26701 5.76856 4.9229 3.66675 7.99993 3.66675Z'/></svg>");
|
|
14398
|
+
}
|
|
14399
|
+
|
|
14400
|
+
x-pw-tool-item.value > x-div {
|
|
14401
|
+
/* codicon: symbol-constant */
|
|
14402
|
+
-webkit-mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path fill-rule='evenodd' clip-rule='evenodd' d='M4 6h8v1H4V6zm8 3H4v1h8V9z'/><path fill-rule='evenodd' clip-rule='evenodd' d='M1 4l1-1h12l1 1v8l-1 1H2l-1-1V4zm1 0v8h12V4H2z'/></svg>");
|
|
14403
|
+
mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path fill-rule='evenodd' clip-rule='evenodd' d='M4 6h8v1H4V6zm8 3H4v1h8V9z'/><path fill-rule='evenodd' clip-rule='evenodd' d='M1 4l1-1h12l1 1v8l-1 1H2l-1-1V4zm1 0v8h12V4H2z'/></svg>");
|
|
14404
|
+
}
|
|
14405
|
+
|
|
14406
|
+
x-pw-tool-item.accept > x-div {
|
|
14407
|
+
-webkit-mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>");
|
|
14408
|
+
mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>");
|
|
14409
|
+
}
|
|
14410
|
+
|
|
14411
|
+
x-pw-tool-item.cancel > x-div {
|
|
14412
|
+
-webkit-mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path d='M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/></svg>");
|
|
14413
|
+
mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path d='M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/></svg>");
|
|
14414
|
+
}
|
|
14415
|
+
|
|
14416
|
+
x-pw-tool-item.succeeded > x-div {
|
|
14417
|
+
/* codicon: pass */
|
|
14418
|
+
-webkit-mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path d='M6.27 10.87h.71l4.56-4.56-.71-.71-4.2 4.21-1.92-1.92L4 8.6l2.27 2.27z'/><path fill-rule='evenodd' clip-rule='evenodd' d='M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z'/></svg>") !important;
|
|
14419
|
+
mask-image: url("data:image/svg+xml;utf8,<svg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='currentColor'><path d='M6.27 10.87h.71l4.56-4.56-.71-.71-4.2 4.21-1.92-1.92L4 8.6l2.27 2.27z'/><path fill-rule='evenodd' clip-rule='evenodd' d='M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z'/></svg>") !important;
|
|
14420
|
+
background-color: #388a34 !important;
|
|
14421
|
+
-webkit-mask-size: 18px !important;
|
|
14422
|
+
mask-size: 18px !important;
|
|
14423
|
+
}
|
|
14424
|
+
|
|
14425
|
+
x-pw-overlay {
|
|
14426
|
+
position: absolute;
|
|
14427
|
+
top: 0;
|
|
14428
|
+
max-width: min-content;
|
|
14429
|
+
z-index: 2147483647;
|
|
14430
|
+
background: transparent;
|
|
14431
|
+
pointer-events: auto;
|
|
14432
|
+
}
|
|
14433
|
+
|
|
14434
|
+
x-pw-overlay x-pw-tools-list {
|
|
14435
|
+
background-color: #ffffffdd;
|
|
14436
|
+
box-shadow: rgba(0, 0, 0, 0.1) 0px 5px 5px;
|
|
14437
|
+
border-radius: 3px;
|
|
14438
|
+
border-bottom: none;
|
|
14439
|
+
}
|
|
14440
|
+
|
|
14441
|
+
x-pw-overlay x-pw-tool-item {
|
|
14442
|
+
margin: 2px;
|
|
14443
|
+
}
|
|
14444
|
+
|
|
14445
|
+
textarea.text-editor {
|
|
14446
|
+
font-family: system-ui,Ubuntu,Droid Sans,sans-serif;
|
|
14447
|
+
flex: auto;
|
|
14448
|
+
border: none;
|
|
14449
|
+
margin: 6px 10px;
|
|
14450
|
+
color: #333;
|
|
14451
|
+
outline: 1px solid transparent!important;
|
|
14452
|
+
resize: none;
|
|
14453
|
+
padding: 0;
|
|
14454
|
+
font-size: 13px;
|
|
14455
|
+
}
|
|
14456
|
+
|
|
14457
|
+
textarea.text-editor.does-not-match {
|
|
14458
|
+
outline: 1px solid red !important;
|
|
14459
|
+
}
|
|
14460
|
+
|
|
14461
|
+
x-div {
|
|
14462
|
+
display: block;
|
|
14463
|
+
}
|
|
14464
|
+
|
|
14465
|
+
x-spacer {
|
|
14466
|
+
flex: auto;
|
|
14467
|
+
}
|
|
14468
|
+
|
|
14469
|
+
* {
|
|
14470
|
+
box-sizing: border-box;
|
|
14471
|
+
}
|
|
14472
|
+
|
|
14473
|
+
*[hidden] {
|
|
14474
|
+
display: none !important;
|
|
14475
|
+
}
|
|
14476
|
+
|
|
14477
|
+
x-locator-editor {
|
|
14478
|
+
flex: none;
|
|
14479
|
+
width: 100%;
|
|
14480
|
+
height: 60px;
|
|
14481
|
+
padding: 4px;
|
|
14482
|
+
border-bottom: 1px solid #dddddd;
|
|
14483
|
+
outline: 1px solid transparent;
|
|
14484
|
+
}
|
|
14485
|
+
|
|
14486
|
+
x-locator-editor.does-not-match {
|
|
14487
|
+
outline: 1px solid red;
|
|
14488
|
+
}
|
|
14489
|
+
|
|
14490
|
+
.CodeMirror {
|
|
14491
|
+
width: 100% !important;
|
|
14492
|
+
height: 100% !important;
|
|
14493
|
+
}
|
|
14494
|
+
`;
|
|
14653
14495
|
class Highlight {
|
|
14654
14496
|
constructor(injectedScript) {
|
|
14655
14497
|
this._highlightEntries = [];
|
|
@@ -14679,16 +14521,10 @@ class Highlight {
|
|
|
14679
14521
|
this._actionPointElement = document2.createElement("x-pw-action-point");
|
|
14680
14522
|
this._actionPointElement.setAttribute("hidden", "true");
|
|
14681
14523
|
this._glassPaneShadow = this._glassPaneElement.attachShadow({ mode: this._isUnderTest ? "open" : "closed" });
|
|
14682
|
-
if (typeof this._glassPaneShadow.adoptedStyleSheets.push === "function") {
|
|
14683
|
-
const sheet = new this._injectedScript.window.CSSStyleSheet();
|
|
14684
|
-
sheet.replaceSync(highlightCSS);
|
|
14685
|
-
this._glassPaneShadow.adoptedStyleSheets.push(sheet);
|
|
14686
|
-
} else {
|
|
14687
|
-
const styleElement = this._injectedScript.document.createElement("style");
|
|
14688
|
-
styleElement.textContent = highlightCSS;
|
|
14689
|
-
this._glassPaneShadow.appendChild(styleElement);
|
|
14690
|
-
}
|
|
14691
14524
|
this._glassPaneShadow.appendChild(this._actionPointElement);
|
|
14525
|
+
const styleElement = document2.createElement("style");
|
|
14526
|
+
styleElement.textContent = highlightCSS;
|
|
14527
|
+
this._glassPaneShadow.appendChild(styleElement);
|
|
14692
14528
|
}
|
|
14693
14529
|
install() {
|
|
14694
14530
|
this._injectedScript.document.documentElement.appendChild(this._glassPaneElement);
|
|
@@ -14700,7 +14536,7 @@ class Highlight {
|
|
|
14700
14536
|
if (this._rafRequest)
|
|
14701
14537
|
cancelAnimationFrame(this._rafRequest);
|
|
14702
14538
|
this.updateHighlight(this._injectedScript.querySelectorAll(selector, this._injectedScript.document.documentElement), { tooltipText: asLocator(this._language, stringifySelector(selector)) });
|
|
14703
|
-
this._rafRequest =
|
|
14539
|
+
this._rafRequest = requestAnimationFrame(() => this.runHighlightOnRaf(selector));
|
|
14704
14540
|
}
|
|
14705
14541
|
uninstall() {
|
|
14706
14542
|
if (this._rafRequest)
|
|
@@ -14860,107 +14696,12 @@ class Highlight {
|
|
|
14860
14696
|
this._glassPaneShadow.appendChild(element);
|
|
14861
14697
|
}
|
|
14862
14698
|
}
|
|
14863
|
-
const leafRoles = /* @__PURE__ */ new Set([
|
|
14864
|
-
"button",
|
|
14865
|
-
"checkbox",
|
|
14866
|
-
"combobox",
|
|
14867
|
-
"link",
|
|
14868
|
-
"textbox"
|
|
14869
|
-
]);
|
|
14870
|
-
let lastDom;
|
|
14871
|
-
function generateSimpleDomNode(injectedScript, target) {
|
|
14872
|
-
return generate(injectedScript, target).node;
|
|
14873
|
-
}
|
|
14874
|
-
function selectorForSimpleDomNodeId(injectedScript, id2) {
|
|
14875
|
-
const element = lastDom == null ? void 0 : lastDom.elements.get(id2);
|
|
14876
|
-
if (!element)
|
|
14877
|
-
throw new Error(`Internal error: element with id "${id2}" not found`);
|
|
14878
|
-
return injectedScript.generateSelectorSimple(element);
|
|
14879
|
-
}
|
|
14880
|
-
function generate(injectedScript, target) {
|
|
14881
|
-
const normalizeWhitespace = (text) => text.replace(/[\s\n]+/g, (match) => match.includes("\n") ? "\n" : " ");
|
|
14882
|
-
const tokens = [];
|
|
14883
|
-
const elements = /* @__PURE__ */ new Map();
|
|
14884
|
-
let lastId = 0;
|
|
14885
|
-
let resultTarget;
|
|
14886
|
-
const visit = (node) => {
|
|
14887
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
14888
|
-
tokens.push(node.nodeValue);
|
|
14889
|
-
return;
|
|
14890
|
-
}
|
|
14891
|
-
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
14892
|
-
const element = node;
|
|
14893
|
-
if (element.nodeName === "SCRIPT" || element.nodeName === "STYLE" || element.nodeName === "NOSCRIPT")
|
|
14894
|
-
return;
|
|
14895
|
-
if (injectedScript.utils.isElementVisible(element)) {
|
|
14896
|
-
const role = injectedScript.utils.getAriaRole(element);
|
|
14897
|
-
if (role && leafRoles.has(role)) {
|
|
14898
|
-
let value;
|
|
14899
|
-
if (element.nodeName === "INPUT" || element.nodeName === "TEXTAREA")
|
|
14900
|
-
value = element.value;
|
|
14901
|
-
const name = injectedScript.utils.getElementAccessibleName(element, false);
|
|
14902
|
-
const structuralId = String(++lastId);
|
|
14903
|
-
elements.set(structuralId, element);
|
|
14904
|
-
tokens.push(renderTag(injectedScript, role, name, structuralId, { value }));
|
|
14905
|
-
if (element === target) {
|
|
14906
|
-
const tagNoValue = renderTag(injectedScript, role, name, structuralId);
|
|
14907
|
-
resultTarget = { tag: tagNoValue, id: structuralId };
|
|
14908
|
-
}
|
|
14909
|
-
return;
|
|
14910
|
-
}
|
|
14911
|
-
}
|
|
14912
|
-
for (let child = element.firstChild; child; child = child.nextSibling)
|
|
14913
|
-
visit(child);
|
|
14914
|
-
}
|
|
14915
|
-
};
|
|
14916
|
-
injectedScript.utils.beginAriaCaches();
|
|
14917
|
-
try {
|
|
14918
|
-
visit(injectedScript.document.body);
|
|
14919
|
-
} finally {
|
|
14920
|
-
injectedScript.utils.endAriaCaches();
|
|
14921
|
-
}
|
|
14922
|
-
const dom = {
|
|
14923
|
-
markup: normalizeWhitespace(tokens.join(" ")),
|
|
14924
|
-
elements
|
|
14925
|
-
};
|
|
14926
|
-
if (target && !resultTarget)
|
|
14927
|
-
throw new Error("Target element is not in the simple DOM");
|
|
14928
|
-
lastDom = dom;
|
|
14929
|
-
return { dom, node: resultTarget ? { dom, ...resultTarget } : void 0 };
|
|
14930
|
-
}
|
|
14931
|
-
function renderTag(injectedScript, role, name, id2, params) {
|
|
14932
|
-
const escapedTextContent = injectedScript.utils.escapeHTML(name);
|
|
14933
|
-
const escapedValue = injectedScript.utils.escapeHTMLAttribute((params == null ? void 0 : params.value) || "");
|
|
14934
|
-
switch (role) {
|
|
14935
|
-
case "button":
|
|
14936
|
-
return `<button id="${id2}">${escapedTextContent}</button>`;
|
|
14937
|
-
case "link":
|
|
14938
|
-
return `<a id="${id2}">${escapedTextContent}</a>`;
|
|
14939
|
-
case "textbox":
|
|
14940
|
-
return `<input id="${id2}" title="${escapedTextContent}" value="${escapedValue}"></input>`;
|
|
14941
|
-
}
|
|
14942
|
-
return `<div role=${role} id="${id2}">${escapedTextContent}</div>`;
|
|
14943
|
-
}
|
|
14944
14699
|
class InjectedScript {
|
|
14945
14700
|
// eslint-disable-next-line no-restricted-globals
|
|
14946
14701
|
constructor(window2, isUnderTest, sdkLanguage, testIdAttributeNameForStrictErrorAndConsoleCodegen, stableRafCount, browserName, customEngines) {
|
|
14947
14702
|
this.onGlobalListenersRemoved = /* @__PURE__ */ new Set();
|
|
14948
14703
|
this._testIdAttributeNameForStrictErrorAndConsoleCodegen = "data-testid";
|
|
14949
|
-
this.utils = {
|
|
14950
|
-
asLocator,
|
|
14951
|
-
beginAriaCaches,
|
|
14952
|
-
cacheNormalizedWhitespaces,
|
|
14953
|
-
elementText,
|
|
14954
|
-
endAriaCaches,
|
|
14955
|
-
escapeHTML: escapeHTML$1,
|
|
14956
|
-
escapeHTMLAttribute,
|
|
14957
|
-
getAriaRole,
|
|
14958
|
-
getElementAccessibleDescription,
|
|
14959
|
-
getElementAccessibleName,
|
|
14960
|
-
isElementVisible,
|
|
14961
|
-
isInsideScope,
|
|
14962
|
-
normalizeWhiteSpace
|
|
14963
|
-
};
|
|
14704
|
+
this.utils = { isInsideScope, elementText, asLocator, normalizeWhiteSpace };
|
|
14964
14705
|
this.window = window2;
|
|
14965
14706
|
this.document = window2.document;
|
|
14966
14707
|
this.isUnderTest = isUnderTest;
|
|
@@ -15009,18 +14750,6 @@ class InjectedScript {
|
|
|
15009
14750
|
if (isUnderTest)
|
|
15010
14751
|
this.window.__injectedScript = this;
|
|
15011
14752
|
}
|
|
15012
|
-
builtinSetTimeout(callback, timeout) {
|
|
15013
|
-
var _a;
|
|
15014
|
-
if ((_a = this.window.__pwClock) == null ? void 0 : _a.builtin)
|
|
15015
|
-
return this.window.__pwClock.builtin.setTimeout(callback, timeout);
|
|
15016
|
-
return setTimeout(callback, timeout);
|
|
15017
|
-
}
|
|
15018
|
-
builtinRequestAnimationFrame(callback) {
|
|
15019
|
-
var _a;
|
|
15020
|
-
if ((_a = this.window.__pwClock) == null ? void 0 : _a.builtin)
|
|
15021
|
-
return this.window.__pwClock.builtin.requestAnimationFrame(callback);
|
|
15022
|
-
return requestAnimationFrame(callback);
|
|
15023
|
-
}
|
|
15024
14753
|
eval(expression) {
|
|
15025
14754
|
return this.window.eval(expression);
|
|
15026
14755
|
}
|
|
@@ -15275,6 +15004,9 @@ class InjectedScript {
|
|
|
15275
15004
|
})()`);
|
|
15276
15005
|
return new constrFunction(this, params);
|
|
15277
15006
|
}
|
|
15007
|
+
isVisible(element) {
|
|
15008
|
+
return isElementVisible(element);
|
|
15009
|
+
}
|
|
15278
15010
|
async viewportRatio(element) {
|
|
15279
15011
|
return await new Promise((resolve) => {
|
|
15280
15012
|
const observer = new IntersectionObserver((entries) => {
|
|
@@ -15282,7 +15014,7 @@ class InjectedScript {
|
|
|
15282
15014
|
observer.disconnect();
|
|
15283
15015
|
});
|
|
15284
15016
|
observer.observe(element);
|
|
15285
|
-
|
|
15017
|
+
requestAnimationFrame(() => {
|
|
15286
15018
|
});
|
|
15287
15019
|
});
|
|
15288
15020
|
}
|
|
@@ -15312,14 +15044,14 @@ class InjectedScript {
|
|
|
15312
15044
|
return null;
|
|
15313
15045
|
if (behavior === "none")
|
|
15314
15046
|
return element;
|
|
15315
|
-
if (!element.matches("input, textarea, select")
|
|
15047
|
+
if (!element.matches("input, textarea, select")) {
|
|
15316
15048
|
if (behavior === "button-link")
|
|
15317
15049
|
element = element.closest("button, [role=button], a, [role=link]") || element;
|
|
15318
15050
|
else
|
|
15319
15051
|
element = element.closest("button, [role=button], [role=checkbox], [role=radio]") || element;
|
|
15320
15052
|
}
|
|
15321
15053
|
if (behavior === "follow-label") {
|
|
15322
|
-
if (!element.matches("
|
|
15054
|
+
if (!element.matches("input, textarea, button, select, [role=button], [role=checkbox], [role=radio]") && !element.isContentEditable) {
|
|
15323
15055
|
element = element.closest("label") || element;
|
|
15324
15056
|
}
|
|
15325
15057
|
if (element.nodeName === "LABEL")
|
|
@@ -15382,12 +15114,12 @@ class InjectedScript {
|
|
|
15382
15114
|
if (success !== continuePolling)
|
|
15383
15115
|
fulfill(success);
|
|
15384
15116
|
else
|
|
15385
|
-
|
|
15117
|
+
requestAnimationFrame(raf);
|
|
15386
15118
|
} catch (e) {
|
|
15387
15119
|
reject(e);
|
|
15388
15120
|
}
|
|
15389
15121
|
};
|
|
15390
|
-
|
|
15122
|
+
requestAnimationFrame(raf);
|
|
15391
15123
|
return result;
|
|
15392
15124
|
}
|
|
15393
15125
|
elementState(node, state) {
|
|
@@ -15398,9 +15130,9 @@ class InjectedScript {
|
|
|
15398
15130
|
return "error:notconnected";
|
|
15399
15131
|
}
|
|
15400
15132
|
if (state === "visible")
|
|
15401
|
-
return
|
|
15133
|
+
return this.isVisible(element);
|
|
15402
15134
|
if (state === "hidden")
|
|
15403
|
-
return !
|
|
15135
|
+
return !this.isVisible(element);
|
|
15404
15136
|
const disabled = getAriaDisabled(element);
|
|
15405
15137
|
if (state === "disabled")
|
|
15406
15138
|
return disabled;
|
|
@@ -15768,7 +15500,7 @@ class InjectedScript {
|
|
|
15768
15500
|
attrs.push(` ${name}="${value}"`);
|
|
15769
15501
|
}
|
|
15770
15502
|
attrs.sort((a, b) => a.length - b.length);
|
|
15771
|
-
const attrText = trimStringWithEllipsis(attrs.join(""),
|
|
15503
|
+
const attrText = trimStringWithEllipsis(attrs.join(""), 50);
|
|
15772
15504
|
if (autoClosingTags.has(element.nodeName))
|
|
15773
15505
|
return oneLine(`<${element.nodeName.toLowerCase()}${attrText}/>`);
|
|
15774
15506
|
const children = element.childNodes;
|
|
@@ -15884,7 +15616,7 @@ class InjectedScript {
|
|
|
15884
15616
|
return { matches: false };
|
|
15885
15617
|
if (options.isNot && options.expression === "to.be.in.viewport")
|
|
15886
15618
|
return { matches: false };
|
|
15887
|
-
return { matches: options.isNot,
|
|
15619
|
+
return { matches: options.isNot, missingRecevied: true };
|
|
15888
15620
|
}
|
|
15889
15621
|
return await this.expectSingleElement(element, options);
|
|
15890
15622
|
}
|
|
@@ -15977,20 +15709,6 @@ class InjectedScript {
|
|
|
15977
15709
|
received = element.id;
|
|
15978
15710
|
} else if (expression === "to.have.text") {
|
|
15979
15711
|
received = options.useInnerText ? element.innerText : elementText(/* @__PURE__ */ new Map(), element).full;
|
|
15980
|
-
} else if (expression === "to.have.accessible.name") {
|
|
15981
|
-
received = getElementAccessibleName(
|
|
15982
|
-
element,
|
|
15983
|
-
false
|
|
15984
|
-
/* includeHidden */
|
|
15985
|
-
);
|
|
15986
|
-
} else if (expression === "to.have.accessible.description") {
|
|
15987
|
-
received = getElementAccessibleDescription(
|
|
15988
|
-
element,
|
|
15989
|
-
false
|
|
15990
|
-
/* includeHidden */
|
|
15991
|
-
);
|
|
15992
|
-
} else if (expression === "to.have.role") {
|
|
15993
|
-
received = getAriaRole(element) || "";
|
|
15994
15712
|
} else if (expression === "to.have.title") {
|
|
15995
15713
|
received = this.document.title;
|
|
15996
15714
|
} else if (expression === "to.have.url") {
|
|
@@ -16036,14 +15754,11 @@ class InjectedScript {
|
|
|
16036
15754
|
}
|
|
16037
15755
|
throw this.createStacklessError("Unknown expect matcher: " + expression);
|
|
16038
15756
|
}
|
|
16039
|
-
|
|
16040
|
-
|
|
16041
|
-
if (!element)
|
|
16042
|
-
return;
|
|
16043
|
-
return generateSimpleDomNode(this, element);
|
|
15757
|
+
getElementAccessibleName(element, includeHidden) {
|
|
15758
|
+
return getElementAccessibleName(element, !!includeHidden);
|
|
16044
15759
|
}
|
|
16045
|
-
|
|
16046
|
-
return
|
|
15760
|
+
getAriaRole(element) {
|
|
15761
|
+
return getAriaRole(element);
|
|
16047
15762
|
}
|
|
16048
15763
|
}
|
|
16049
15764
|
const autoClosingTags = /* @__PURE__ */ new Set(["AREA", "BASE", "BR", "COL", "COMMAND", "EMBED", "HR", "IMG", "INPUT", "KEYGEN", "LINK", "MENUITEM", "META", "PARAM", "SOURCE", "TRACK", "WBR"]);
|
|
@@ -16223,7 +15938,6 @@ function deepEquals(a, b) {
|
|
|
16223
15938
|
return isNaN(a) && isNaN(b);
|
|
16224
15939
|
return false;
|
|
16225
15940
|
}
|
|
16226
|
-
const svgJson = { "tagName": "svg", "children": [{ "tagName": "defs", "children": [{ "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-gripper" }, "children": [{ "tagName": "path", "attrs": { "d": "M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-circle-large-filled" }, "children": [{ "tagName": "path", "attrs": { "d": "M8 1a6.8 6.8 0 0 1 1.86.253 6.899 6.899 0 0 1 3.083 1.805 6.903 6.903 0 0 1 1.804 3.083C14.916 6.738 15 7.357 15 8s-.084 1.262-.253 1.86a6.9 6.9 0 0 1-.704 1.674 7.157 7.157 0 0 1-2.516 2.509 6.966 6.966 0 0 1-1.668.71A6.984 6.984 0 0 1 8 15a6.984 6.984 0 0 1-1.86-.246 7.098 7.098 0 0 1-1.674-.711 7.3 7.3 0 0 1-1.415-1.094 7.295 7.295 0 0 1-1.094-1.415 7.098 7.098 0 0 1-.71-1.675A6.985 6.985 0 0 1 1 8c0-.643.082-1.262.246-1.86a6.968 6.968 0 0 1 .711-1.667 7.156 7.156 0 0 1 2.509-2.516 6.895 6.895 0 0 1 1.675-.704A6.808 6.808 0 0 1 8 1z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-inspect" }, "children": [{ "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M1 3l1-1h12l1 1v6h-1V3H2v8h5v1H2l-1-1V3zm14.707 9.707L9 6v9.414l2.707-2.707h4zM10 13V8.414l3.293 3.293h-2L10 13z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-whole-word" }, "children": [{ "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M0 11H1V13H15V11H16V14H15H1H0V11Z" } }, { "tagName": "path", "attrs": { "d": "M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z" } }, { "tagName": "path", "attrs": { "d": "M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-eye" }, "children": [{ "tagName": "path", "attrs": { "d": "M7.99993 6.00316C9.47266 6.00316 10.6666 7.19708 10.6666 8.66981C10.6666 10.1426 9.47266 11.3365 7.99993 11.3365C6.52715 11.3365 5.33324 10.1426 5.33324 8.66981C5.33324 7.19708 6.52715 6.00316 7.99993 6.00316ZM7.99993 7.00315C7.07946 7.00315 6.33324 7.74935 6.33324 8.66981C6.33324 9.59028 7.07946 10.3365 7.99993 10.3365C8.9204 10.3365 9.6666 9.59028 9.6666 8.66981C9.6666 7.74935 8.9204 7.00315 7.99993 7.00315ZM7.99993 3.66675C11.0756 3.66675 13.7307 5.76675 14.4673 8.70968C14.5344 8.97755 14.3716 9.24908 14.1037 9.31615C13.8358 9.38315 13.5643 9.22041 13.4973 8.95248C12.8713 6.45205 10.6141 4.66675 7.99993 4.66675C5.38454 4.66675 3.12664 6.45359 2.50182 8.95555C2.43491 9.22341 2.16348 9.38635 1.89557 9.31948C1.62766 9.25255 1.46471 8.98115 1.53162 8.71321C2.26701 5.76856 4.9229 3.66675 7.99993 3.66675Z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-symbol-constant" }, "children": [{ "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M4 6h8v1H4V6zm8 3H4v1h8V9z" } }, { "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M1 4l1-1h12l1 1v8l-1 1H2l-1-1V4zm1 0v8h12V4H2z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-check" }, "children": [{ "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-close" }, "children": [{ "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-pass" }, "children": [{ "tagName": "path", "attrs": { "d": "M6.27 10.87h.71l4.56-4.56-.71-.71-4.2 4.21-1.92-1.92L4 8.6l2.27 2.27z" } }, { "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z" } }] }] }] };
|
|
16227
15941
|
class NoneTool {
|
|
16228
15942
|
cursor() {
|
|
16229
15943
|
return "default";
|
|
@@ -16318,13 +16032,13 @@ class InspectTool {
|
|
|
16318
16032
|
this._reset(true);
|
|
16319
16033
|
}
|
|
16320
16034
|
onKeyDown(event) {
|
|
16321
|
-
var _a;
|
|
16035
|
+
var _a, _b, _c;
|
|
16322
16036
|
consumeEvent(event);
|
|
16323
16037
|
if (event.key === "Escape") {
|
|
16324
16038
|
if ((_a = this._hoveredModel) == null ? void 0 : _a.tooltipListItemSelected)
|
|
16325
16039
|
this._reset(true);
|
|
16326
16040
|
else if (this._assertVisibility)
|
|
16327
|
-
this._recorder.setMode("recording");
|
|
16041
|
+
(_c = (_b = this._recorder.delegate).setMode) == null ? void 0 : _c.call(_b, "recording");
|
|
16328
16042
|
}
|
|
16329
16043
|
}
|
|
16330
16044
|
onKeyUp(event) {
|
|
@@ -16334,17 +16048,17 @@ class InspectTool {
|
|
|
16334
16048
|
this._reset(false);
|
|
16335
16049
|
}
|
|
16336
16050
|
_commit(selector) {
|
|
16337
|
-
var _a;
|
|
16051
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
16338
16052
|
if (this._assertVisibility) {
|
|
16339
|
-
this._recorder.recordAction({
|
|
16053
|
+
(_b = (_a = this._recorder.delegate).recordAction) == null ? void 0 : _b.call(_a, {
|
|
16340
16054
|
name: "assertVisible",
|
|
16341
16055
|
selector,
|
|
16342
16056
|
signals: []
|
|
16343
16057
|
});
|
|
16344
|
-
this._recorder.setMode("recording");
|
|
16345
|
-
(
|
|
16058
|
+
(_d = (_c = this._recorder.delegate).setMode) == null ? void 0 : _d.call(_c, "recording");
|
|
16059
|
+
(_e = this._recorder.overlay) == null ? void 0 : _e.flashToolSucceeded("assertingVisibility");
|
|
16346
16060
|
} else {
|
|
16347
|
-
this._recorder.setSelector(selector);
|
|
16061
|
+
(_g = (_f = this._recorder.delegate).setSelector) == null ? void 0 : _g.call(_f, selector);
|
|
16348
16062
|
}
|
|
16349
16063
|
}
|
|
16350
16064
|
_reset(userGesture) {
|
|
@@ -16375,8 +16089,6 @@ class RecordActionTool {
|
|
|
16375
16089
|
onClick(event) {
|
|
16376
16090
|
if (isRangeInput(this._hoveredElement))
|
|
16377
16091
|
return;
|
|
16378
|
-
if (event.button === 2 && event.type === "auxclick")
|
|
16379
|
-
return;
|
|
16380
16092
|
if (this._shouldIgnoreMouseEvent(event))
|
|
16381
16093
|
return;
|
|
16382
16094
|
if (this._actionInProgress(event))
|
|
@@ -16402,23 +16114,6 @@ class RecordActionTool {
|
|
|
16402
16114
|
clickCount: event.detail
|
|
16403
16115
|
});
|
|
16404
16116
|
}
|
|
16405
|
-
onContextMenu(event) {
|
|
16406
|
-
if (this._shouldIgnoreMouseEvent(event))
|
|
16407
|
-
return;
|
|
16408
|
-
if (this._actionInProgress(event))
|
|
16409
|
-
return;
|
|
16410
|
-
if (this._consumedDueToNoModel(event, this._hoveredModel))
|
|
16411
|
-
return;
|
|
16412
|
-
this._performAction({
|
|
16413
|
-
name: "click",
|
|
16414
|
-
selector: this._hoveredModel.selector,
|
|
16415
|
-
position: positionForEvent(event),
|
|
16416
|
-
signals: [],
|
|
16417
|
-
button: "right",
|
|
16418
|
-
modifiers: 0,
|
|
16419
|
-
clickCount: 0
|
|
16420
|
-
});
|
|
16421
|
-
}
|
|
16422
16117
|
onPointerDown(event) {
|
|
16423
16118
|
if (this._shouldIgnoreMouseEvent(event))
|
|
16424
16119
|
return;
|
|
@@ -16462,9 +16157,10 @@ class RecordActionTool {
|
|
|
16462
16157
|
this._onFocus(true);
|
|
16463
16158
|
}
|
|
16464
16159
|
onInput(event) {
|
|
16160
|
+
var _a, _b, _c, _d, _e, _f;
|
|
16465
16161
|
const target = this._recorder.deepEventTarget(event);
|
|
16466
16162
|
if (target.nodeName === "INPUT" && target.type.toLowerCase() === "file") {
|
|
16467
|
-
this._recorder.recordAction({
|
|
16163
|
+
(_b = (_a = this._recorder.delegate).recordAction) == null ? void 0 : _b.call(_a, {
|
|
16468
16164
|
name: "setInputFiles",
|
|
16469
16165
|
selector: this._activeModel.selector,
|
|
16470
16166
|
signals: [],
|
|
@@ -16473,7 +16169,7 @@ class RecordActionTool {
|
|
|
16473
16169
|
return;
|
|
16474
16170
|
}
|
|
16475
16171
|
if (isRangeInput(target)) {
|
|
16476
|
-
this._recorder.recordAction({
|
|
16172
|
+
(_d = (_c = this._recorder.delegate).recordAction) == null ? void 0 : _d.call(_c, {
|
|
16477
16173
|
name: "fill",
|
|
16478
16174
|
// must use hoveredModel instead of activeModel for it to work in webkit
|
|
16479
16175
|
selector: this._hoveredModel.selector,
|
|
@@ -16488,7 +16184,7 @@ class RecordActionTool {
|
|
|
16488
16184
|
}
|
|
16489
16185
|
if (this._consumedDueWrongTarget(event))
|
|
16490
16186
|
return;
|
|
16491
|
-
this._recorder.recordAction({
|
|
16187
|
+
(_f = (_e = this._recorder.delegate).recordAction) == null ? void 0 : _f.call(_e, {
|
|
16492
16188
|
name: "fill",
|
|
16493
16189
|
selector: this._activeModel.selector,
|
|
16494
16190
|
signals: [],
|
|
@@ -16501,7 +16197,7 @@ class RecordActionTool {
|
|
|
16501
16197
|
return;
|
|
16502
16198
|
this._performAction({
|
|
16503
16199
|
name: "select",
|
|
16504
|
-
selector: this.
|
|
16200
|
+
selector: this._hoveredModel.selector,
|
|
16505
16201
|
options: [...selectElement.selectedOptions].map((option) => option.value),
|
|
16506
16202
|
signals: []
|
|
16507
16203
|
});
|
|
@@ -16586,23 +16282,24 @@ class RecordActionTool {
|
|
|
16586
16282
|
consumeEvent(event);
|
|
16587
16283
|
return true;
|
|
16588
16284
|
}
|
|
16589
|
-
_performAction(action) {
|
|
16285
|
+
async _performAction(action) {
|
|
16286
|
+
var _a, _b;
|
|
16590
16287
|
this._hoveredElement = null;
|
|
16591
16288
|
this._hoveredModel = null;
|
|
16592
16289
|
this._activeModel = null;
|
|
16593
16290
|
this._recorder.updateHighlight(null, false);
|
|
16594
16291
|
this._performingAction = true;
|
|
16595
|
-
|
|
16596
|
-
|
|
16597
|
-
|
|
16598
|
-
|
|
16599
|
-
|
|
16600
|
-
|
|
16601
|
-
|
|
16602
|
-
|
|
16603
|
-
|
|
16604
|
-
}
|
|
16605
|
-
}
|
|
16292
|
+
await ((_b = (_a = this._recorder.delegate).performAction) == null ? void 0 : _b.call(_a, action).catch(() => {
|
|
16293
|
+
}));
|
|
16294
|
+
this._performingAction = false;
|
|
16295
|
+
this._onFocus(false);
|
|
16296
|
+
if (this._recorder.injectedScript.isUnderTest) {
|
|
16297
|
+
console.error("Action performed for test: " + JSON.stringify({
|
|
16298
|
+
// eslint-disable-line no-console
|
|
16299
|
+
hovered: this._hoveredModel ? this._hoveredModel.selector : null,
|
|
16300
|
+
active: this._activeModel ? this._activeModel.selector : null
|
|
16301
|
+
}));
|
|
16302
|
+
}
|
|
16606
16303
|
}
|
|
16607
16304
|
_shouldGenerateKeyPressFor(event) {
|
|
16608
16305
|
if (event.key === "Enter" && (this._recorder.deepEventTarget(event).nodeName === "TEXTAREA" || this._recorder.deepEventTarget(event).isContentEditable))
|
|
@@ -16645,16 +16342,26 @@ class TextAssertionTool {
|
|
|
16645
16342
|
constructor(recorder, kind) {
|
|
16646
16343
|
this._hoverHighlight = null;
|
|
16647
16344
|
this._action = null;
|
|
16345
|
+
this._dialogElement = null;
|
|
16648
16346
|
this._textCache = /* @__PURE__ */ new Map();
|
|
16649
16347
|
this._recorder = recorder;
|
|
16650
16348
|
this._kind = kind;
|
|
16651
|
-
this.
|
|
16349
|
+
this._acceptButton = this._recorder.document.createElement("x-pw-tool-item");
|
|
16350
|
+
this._acceptButton.title = "Accept";
|
|
16351
|
+
this._acceptButton.classList.add("accept");
|
|
16352
|
+
this._acceptButton.appendChild(this._recorder.document.createElement("x-div"));
|
|
16353
|
+
this._acceptButton.addEventListener("click", () => this._commit());
|
|
16354
|
+
this._cancelButton = this._recorder.document.createElement("x-pw-tool-item");
|
|
16355
|
+
this._cancelButton.title = "Close";
|
|
16356
|
+
this._cancelButton.classList.add("cancel");
|
|
16357
|
+
this._cancelButton.appendChild(this._recorder.document.createElement("x-div"));
|
|
16358
|
+
this._cancelButton.addEventListener("click", () => this._closeDialog());
|
|
16652
16359
|
}
|
|
16653
16360
|
cursor() {
|
|
16654
16361
|
return "pointer";
|
|
16655
16362
|
}
|
|
16656
16363
|
cleanup() {
|
|
16657
|
-
this.
|
|
16364
|
+
this._closeDialog();
|
|
16658
16365
|
this._hoverHighlight = null;
|
|
16659
16366
|
}
|
|
16660
16367
|
onClick(event) {
|
|
@@ -16662,7 +16369,7 @@ class TextAssertionTool {
|
|
|
16662
16369
|
if (this._kind === "value") {
|
|
16663
16370
|
this._commitAssertValue();
|
|
16664
16371
|
} else {
|
|
16665
|
-
if (!this.
|
|
16372
|
+
if (!this._dialogElement)
|
|
16666
16373
|
this._showDialog();
|
|
16667
16374
|
}
|
|
16668
16375
|
}
|
|
@@ -16674,13 +16381,13 @@ class TextAssertionTool {
|
|
|
16674
16381
|
onPointerUp(event) {
|
|
16675
16382
|
var _a;
|
|
16676
16383
|
const target = (_a = this._hoverHighlight) == null ? void 0 : _a.elements[0];
|
|
16677
|
-
if (this._kind === "value" && target &&
|
|
16384
|
+
if (this._kind === "value" && target && target.nodeName === "INPUT" && target.disabled) {
|
|
16678
16385
|
this._commitAssertValue();
|
|
16679
16386
|
}
|
|
16680
16387
|
}
|
|
16681
16388
|
onMouseMove(event) {
|
|
16682
16389
|
var _a;
|
|
16683
|
-
if (this.
|
|
16390
|
+
if (this._dialogElement)
|
|
16684
16391
|
return;
|
|
16685
16392
|
const target = this._recorder.deepEventTarget(event);
|
|
16686
16393
|
if (((_a = this._hoverHighlight) == null ? void 0 : _a.elements[0]) === target)
|
|
@@ -16694,8 +16401,9 @@ class TextAssertionTool {
|
|
|
16694
16401
|
this._recorder.updateHighlight(this._hoverHighlight, true);
|
|
16695
16402
|
}
|
|
16696
16403
|
onKeyDown(event) {
|
|
16404
|
+
var _a, _b;
|
|
16697
16405
|
if (event.key === "Escape")
|
|
16698
|
-
this._recorder.setMode("recording");
|
|
16406
|
+
(_b = (_a = this._recorder.delegate).setMode) == null ? void 0 : _b.call(_a, "recording");
|
|
16699
16407
|
consumeEvent(event);
|
|
16700
16408
|
}
|
|
16701
16409
|
onScroll(event) {
|
|
@@ -16753,11 +16461,12 @@ class TextAssertionTool {
|
|
|
16753
16461
|
return "";
|
|
16754
16462
|
}
|
|
16755
16463
|
_commit() {
|
|
16756
|
-
|
|
16464
|
+
var _a, _b, _c, _d;
|
|
16465
|
+
if (!this._action || !this._dialogElement)
|
|
16757
16466
|
return;
|
|
16758
|
-
this.
|
|
16759
|
-
this._recorder.recordAction(this._action);
|
|
16760
|
-
this._recorder.setMode("recording");
|
|
16467
|
+
this._closeDialog();
|
|
16468
|
+
(_b = (_a = this._recorder.delegate).recordAction) == null ? void 0 : _b.call(_a, this._action);
|
|
16469
|
+
(_d = (_c = this._recorder.delegate).setMode) == null ? void 0 : _d.call(_c, "recording");
|
|
16761
16470
|
}
|
|
16762
16471
|
_showDialog() {
|
|
16763
16472
|
var _a;
|
|
@@ -16766,6 +16475,28 @@ class TextAssertionTool {
|
|
|
16766
16475
|
this._action = this._generateAction();
|
|
16767
16476
|
if (!this._action || this._action.name !== "assertText")
|
|
16768
16477
|
return;
|
|
16478
|
+
this._dialogElement = this._recorder.document.createElement("x-pw-dialog");
|
|
16479
|
+
this._keyboardListener = (event) => {
|
|
16480
|
+
if (event.key === "Escape") {
|
|
16481
|
+
this._closeDialog();
|
|
16482
|
+
return;
|
|
16483
|
+
}
|
|
16484
|
+
if (event.key === "Enter" && (event.ctrlKey || event.metaKey)) {
|
|
16485
|
+
if (this._dialogElement)
|
|
16486
|
+
this._commit();
|
|
16487
|
+
return;
|
|
16488
|
+
}
|
|
16489
|
+
};
|
|
16490
|
+
this._recorder.document.addEventListener("keydown", this._keyboardListener, true);
|
|
16491
|
+
const toolbarElement = this._recorder.document.createElement("x-pw-tools-list");
|
|
16492
|
+
const labelElement = this._recorder.document.createElement("label");
|
|
16493
|
+
labelElement.textContent = "Assert that element contains text";
|
|
16494
|
+
toolbarElement.appendChild(labelElement);
|
|
16495
|
+
toolbarElement.appendChild(this._recorder.document.createElement("x-spacer"));
|
|
16496
|
+
toolbarElement.appendChild(this._acceptButton);
|
|
16497
|
+
toolbarElement.appendChild(this._cancelButton);
|
|
16498
|
+
this._dialogElement.appendChild(toolbarElement);
|
|
16499
|
+
const bodyElement = this._recorder.document.createElement("x-pw-dialog-body");
|
|
16769
16500
|
const action = this._action;
|
|
16770
16501
|
const textElement = this._recorder.document.createElement("textarea");
|
|
16771
16502
|
textElement.setAttribute("spellcheck", "false");
|
|
@@ -16783,26 +16514,31 @@ class TextAssertionTool {
|
|
|
16783
16514
|
textElement.classList.toggle("does-not-match", !matches);
|
|
16784
16515
|
};
|
|
16785
16516
|
textElement.addEventListener("input", updateAndValidate);
|
|
16786
|
-
|
|
16787
|
-
|
|
16788
|
-
|
|
16789
|
-
|
|
16790
|
-
|
|
16791
|
-
|
|
16792
|
-
const position = this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(), dialogElement);
|
|
16793
|
-
this._dialog.moveTo(position.anchorTop, position.anchorLeft);
|
|
16517
|
+
bodyElement.appendChild(textElement);
|
|
16518
|
+
this._dialogElement.appendChild(bodyElement);
|
|
16519
|
+
this._recorder.highlight.appendChild(this._dialogElement);
|
|
16520
|
+
const position = this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(), this._dialogElement);
|
|
16521
|
+
this._dialogElement.style.top = position.anchorTop + "px";
|
|
16522
|
+
this._dialogElement.style.left = position.anchorLeft + "px";
|
|
16794
16523
|
textElement.focus();
|
|
16795
16524
|
}
|
|
16525
|
+
_closeDialog() {
|
|
16526
|
+
if (!this._dialogElement)
|
|
16527
|
+
return;
|
|
16528
|
+
this._dialogElement.remove();
|
|
16529
|
+
this._recorder.document.removeEventListener("keydown", this._keyboardListener);
|
|
16530
|
+
this._dialogElement = null;
|
|
16531
|
+
}
|
|
16796
16532
|
_commitAssertValue() {
|
|
16797
|
-
var _a;
|
|
16533
|
+
var _a, _b, _c, _d, _e;
|
|
16798
16534
|
if (this._kind !== "value")
|
|
16799
16535
|
return;
|
|
16800
16536
|
const action = this._generateAction();
|
|
16801
16537
|
if (!action)
|
|
16802
16538
|
return;
|
|
16803
|
-
this._recorder.recordAction(action);
|
|
16804
|
-
this._recorder.setMode("recording");
|
|
16805
|
-
(
|
|
16539
|
+
(_b = (_a = this._recorder.delegate).recordAction) == null ? void 0 : _b.call(_a, action);
|
|
16540
|
+
(_d = (_c = this._recorder.delegate).setMode) == null ? void 0 : _d.call(_c, "recording");
|
|
16541
|
+
(_e = this._recorder.overlay) == null ? void 0 : _e.flashToolSucceeded("assertingValue");
|
|
16806
16542
|
}
|
|
16807
16543
|
}
|
|
16808
16544
|
class Overlay {
|
|
@@ -16811,38 +16547,37 @@ class Overlay {
|
|
|
16811
16547
|
this._offsetX = 0;
|
|
16812
16548
|
this._measure = { width: 0, height: 0 };
|
|
16813
16549
|
this._recorder = recorder;
|
|
16814
|
-
const document2 = this._recorder.document;
|
|
16550
|
+
const document2 = this._recorder.injectedScript.document;
|
|
16815
16551
|
this._overlayElement = document2.createElement("x-pw-overlay");
|
|
16816
|
-
this._overlayElement.appendChild(createSvgElement(this._recorder.document, svgJson));
|
|
16817
16552
|
const toolsListElement = document2.createElement("x-pw-tools-list");
|
|
16818
16553
|
this._overlayElement.appendChild(toolsListElement);
|
|
16819
16554
|
this._dragHandle = document2.createElement("x-pw-tool-gripper");
|
|
16820
16555
|
this._dragHandle.appendChild(document2.createElement("x-div"));
|
|
16821
16556
|
toolsListElement.appendChild(this._dragHandle);
|
|
16822
|
-
this._recordToggle = this._recorder.document.createElement("x-pw-tool-item");
|
|
16557
|
+
this._recordToggle = this._recorder.injectedScript.document.createElement("x-pw-tool-item");
|
|
16823
16558
|
this._recordToggle.title = "Record";
|
|
16824
16559
|
this._recordToggle.classList.add("record");
|
|
16825
|
-
this._recordToggle.appendChild(this._recorder.document.createElement("x-div"));
|
|
16560
|
+
this._recordToggle.appendChild(this._recorder.injectedScript.document.createElement("x-div"));
|
|
16826
16561
|
toolsListElement.appendChild(this._recordToggle);
|
|
16827
|
-
this._pickLocatorToggle = this._recorder.document.createElement("x-pw-tool-item");
|
|
16562
|
+
this._pickLocatorToggle = this._recorder.injectedScript.document.createElement("x-pw-tool-item");
|
|
16828
16563
|
this._pickLocatorToggle.title = "Pick locator";
|
|
16829
16564
|
this._pickLocatorToggle.classList.add("pick-locator");
|
|
16830
|
-
this._pickLocatorToggle.appendChild(this._recorder.document.createElement("x-div"));
|
|
16565
|
+
this._pickLocatorToggle.appendChild(this._recorder.injectedScript.document.createElement("x-div"));
|
|
16831
16566
|
toolsListElement.appendChild(this._pickLocatorToggle);
|
|
16832
|
-
this._assertVisibilityToggle = this._recorder.document.createElement("x-pw-tool-item");
|
|
16567
|
+
this._assertVisibilityToggle = this._recorder.injectedScript.document.createElement("x-pw-tool-item");
|
|
16833
16568
|
this._assertVisibilityToggle.title = "Assert visibility";
|
|
16834
16569
|
this._assertVisibilityToggle.classList.add("visibility");
|
|
16835
|
-
this._assertVisibilityToggle.appendChild(this._recorder.document.createElement("x-div"));
|
|
16570
|
+
this._assertVisibilityToggle.appendChild(this._recorder.injectedScript.document.createElement("x-div"));
|
|
16836
16571
|
toolsListElement.appendChild(this._assertVisibilityToggle);
|
|
16837
|
-
this._assertTextToggle = this._recorder.document.createElement("x-pw-tool-item");
|
|
16572
|
+
this._assertTextToggle = this._recorder.injectedScript.document.createElement("x-pw-tool-item");
|
|
16838
16573
|
this._assertTextToggle.title = "Assert text";
|
|
16839
16574
|
this._assertTextToggle.classList.add("text");
|
|
16840
|
-
this._assertTextToggle.appendChild(this._recorder.document.createElement("x-div"));
|
|
16575
|
+
this._assertTextToggle.appendChild(this._recorder.injectedScript.document.createElement("x-div"));
|
|
16841
16576
|
toolsListElement.appendChild(this._assertTextToggle);
|
|
16842
|
-
this._assertValuesToggle = this._recorder.document.createElement("x-pw-tool-item");
|
|
16577
|
+
this._assertValuesToggle = this._recorder.injectedScript.document.createElement("x-pw-tool-item");
|
|
16843
16578
|
this._assertValuesToggle.title = "Assert value";
|
|
16844
16579
|
this._assertValuesToggle.classList.add("value");
|
|
16845
|
-
this._assertValuesToggle.appendChild(this._recorder.document.createElement("x-div"));
|
|
16580
|
+
this._assertValuesToggle.appendChild(this._recorder.injectedScript.document.createElement("x-div"));
|
|
16846
16581
|
toolsListElement.appendChild(this._assertValuesToggle);
|
|
16847
16582
|
this._updateVisualPosition();
|
|
16848
16583
|
this._refreshListeners();
|
|
@@ -16854,9 +16589,11 @@ class Overlay {
|
|
|
16854
16589
|
this._dragState = { offsetX: this._offsetX, dragStart: { x: event.clientX, y: 0 } };
|
|
16855
16590
|
}),
|
|
16856
16591
|
addEventListener(this._recordToggle, "click", () => {
|
|
16857
|
-
|
|
16592
|
+
var _a, _b;
|
|
16593
|
+
(_b = (_a = this._recorder.delegate).setMode) == null ? void 0 : _b.call(_a, this._recorder.state.mode === "none" || this._recorder.state.mode === "standby" || this._recorder.state.mode === "inspecting" ? "recording" : "standby");
|
|
16858
16594
|
}),
|
|
16859
16595
|
addEventListener(this._pickLocatorToggle, "click", () => {
|
|
16596
|
+
var _a, _b;
|
|
16860
16597
|
const newMode = {
|
|
16861
16598
|
"inspecting": "standby",
|
|
16862
16599
|
"none": "inspecting",
|
|
@@ -16867,19 +16604,22 @@ class Overlay {
|
|
|
16867
16604
|
"assertingVisibility": "recording-inspecting",
|
|
16868
16605
|
"assertingValue": "recording-inspecting"
|
|
16869
16606
|
};
|
|
16870
|
-
this._recorder.setMode(newMode[this._recorder.state.mode]);
|
|
16607
|
+
(_b = (_a = this._recorder.delegate).setMode) == null ? void 0 : _b.call(_a, newMode[this._recorder.state.mode]);
|
|
16871
16608
|
}),
|
|
16872
16609
|
addEventListener(this._assertVisibilityToggle, "click", () => {
|
|
16610
|
+
var _a, _b;
|
|
16873
16611
|
if (!this._assertVisibilityToggle.classList.contains("disabled"))
|
|
16874
|
-
this._recorder.setMode(this._recorder.state.mode === "assertingVisibility" ? "recording" : "assertingVisibility");
|
|
16612
|
+
(_b = (_a = this._recorder.delegate).setMode) == null ? void 0 : _b.call(_a, this._recorder.state.mode === "assertingVisibility" ? "recording" : "assertingVisibility");
|
|
16875
16613
|
}),
|
|
16876
16614
|
addEventListener(this._assertTextToggle, "click", () => {
|
|
16615
|
+
var _a, _b;
|
|
16877
16616
|
if (!this._assertTextToggle.classList.contains("disabled"))
|
|
16878
|
-
this._recorder.setMode(this._recorder.state.mode === "assertingText" ? "recording" : "assertingText");
|
|
16617
|
+
(_b = (_a = this._recorder.delegate).setMode) == null ? void 0 : _b.call(_a, this._recorder.state.mode === "assertingText" ? "recording" : "assertingText");
|
|
16879
16618
|
}),
|
|
16880
16619
|
addEventListener(this._assertValuesToggle, "click", () => {
|
|
16620
|
+
var _a, _b;
|
|
16881
16621
|
if (!this._assertValuesToggle.classList.contains("disabled"))
|
|
16882
|
-
this._recorder.setMode(this._recorder.state.mode === "assertingValue" ? "recording" : "assertingValue");
|
|
16622
|
+
(_b = (_a = this._recorder.delegate).setMode) == null ? void 0 : _b.call(_a, this._recorder.state.mode === "assertingValue" ? "recording" : "assertingValue");
|
|
16883
16623
|
})
|
|
16884
16624
|
];
|
|
16885
16625
|
}
|
|
@@ -16912,7 +16652,7 @@ class Overlay {
|
|
|
16912
16652
|
flashToolSucceeded(tool) {
|
|
16913
16653
|
const element = tool === "assertingVisibility" ? this._assertVisibilityToggle : this._assertValuesToggle;
|
|
16914
16654
|
element.classList.add("succeeded");
|
|
16915
|
-
|
|
16655
|
+
setTimeout(() => element.classList.remove("succeeded"), 2e3);
|
|
16916
16656
|
}
|
|
16917
16657
|
_hideOverlay() {
|
|
16918
16658
|
this._overlayElement.setAttribute("hidden", "true");
|
|
@@ -16928,6 +16668,7 @@ class Overlay {
|
|
|
16928
16668
|
this._overlayElement.style.left = (this._recorder.injectedScript.window.innerWidth - this._measure.width) / 2 + this._offsetX + "px";
|
|
16929
16669
|
}
|
|
16930
16670
|
onMouseMove(event) {
|
|
16671
|
+
var _a, _b;
|
|
16931
16672
|
if (!event.buttons) {
|
|
16932
16673
|
this._dragState = void 0;
|
|
16933
16674
|
return false;
|
|
@@ -16937,7 +16678,7 @@ class Overlay {
|
|
|
16937
16678
|
const halfGapSize = (this._recorder.injectedScript.window.innerWidth - this._measure.width) / 2 - 10;
|
|
16938
16679
|
this._offsetX = Math.max(-halfGapSize, Math.min(halfGapSize, this._offsetX));
|
|
16939
16680
|
this._updateVisualPosition();
|
|
16940
|
-
this._recorder.setOverlayState({ offsetX: this._offsetX });
|
|
16681
|
+
(_b = (_a = this._recorder.delegate).setOverlayState) == null ? void 0 : _b.call(_a, { offsetX: this._offsetX });
|
|
16941
16682
|
consumeEvent(event);
|
|
16942
16683
|
return true;
|
|
16943
16684
|
}
|
|
@@ -16963,13 +16704,8 @@ class Recorder {
|
|
|
16963
16704
|
constructor(injectedScript) {
|
|
16964
16705
|
this._listeners = [];
|
|
16965
16706
|
this._actionSelectorModel = null;
|
|
16966
|
-
this.state = {
|
|
16967
|
-
|
|
16968
|
-
testIdAttributeName: "data-testid",
|
|
16969
|
-
language: "javascript",
|
|
16970
|
-
overlay: { offsetX: 0 }
|
|
16971
|
-
};
|
|
16972
|
-
this._delegate = {};
|
|
16707
|
+
this.state = { mode: "none", testIdAttributeName: "data-testid", language: "javascript", overlay: { offsetX: 0 } };
|
|
16708
|
+
this.delegate = {};
|
|
16973
16709
|
this.document = injectedScript.document;
|
|
16974
16710
|
this.injectedScript = injectedScript;
|
|
16975
16711
|
this.highlight = injectedScript.createHighlight();
|
|
@@ -16988,13 +16724,12 @@ class Recorder {
|
|
|
16988
16724
|
this.overlay = new Overlay(this);
|
|
16989
16725
|
this.overlay.setUIState(this.state);
|
|
16990
16726
|
}
|
|
16991
|
-
this.
|
|
16992
|
-
this.
|
|
16727
|
+
this._styleElement = this.document.createElement("style");
|
|
16728
|
+
this._styleElement.textContent = `
|
|
16993
16729
|
body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
|
|
16994
16730
|
body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
|
|
16995
|
-
|
|
16731
|
+
`;
|
|
16996
16732
|
this.installListeners();
|
|
16997
|
-
injectedScript.utils.cacheNormalizedWhitespaces();
|
|
16998
16733
|
if (injectedScript.isUnderTest)
|
|
16999
16734
|
console.error("Recorder script ready for test");
|
|
17000
16735
|
}
|
|
@@ -17021,7 +16756,7 @@ class Recorder {
|
|
|
17021
16756
|
];
|
|
17022
16757
|
this.highlight.install();
|
|
17023
16758
|
(_a = this.overlay) == null ? void 0 : _a.install();
|
|
17024
|
-
this.document.
|
|
16759
|
+
this.injectedScript.document.head.appendChild(this._styleElement);
|
|
17025
16760
|
}
|
|
17026
16761
|
_switchCurrentTool() {
|
|
17027
16762
|
var _a, _b, _c;
|
|
@@ -17035,7 +16770,7 @@ class Recorder {
|
|
|
17035
16770
|
}
|
|
17036
16771
|
setUIState(state, delegate) {
|
|
17037
16772
|
var _a, _b, _c, _d;
|
|
17038
|
-
this.
|
|
16773
|
+
this.delegate = delegate;
|
|
17039
16774
|
if (state.actionPoint && this.state.actionPoint && state.actionPoint.x === this.state.actionPoint.x && state.actionPoint.y === this.state.actionPoint.y)
|
|
17040
16775
|
;
|
|
17041
16776
|
else if (!state.actionPoint && !this.state.actionPoint)
|
|
@@ -17192,7 +16927,7 @@ class Recorder {
|
|
|
17192
16927
|
tooltipText = this.injectedScript.utils.asLocator(this.state.language, model.selector);
|
|
17193
16928
|
this.highlight.updateHighlight((model == null ? void 0 : model.elements) || [], { ...model, tooltipText });
|
|
17194
16929
|
if (userGesture)
|
|
17195
|
-
(_b = (_a = this.
|
|
16930
|
+
(_b = (_a = this.delegate).highlightUpdated) == null ? void 0 : _b.call(_a);
|
|
17196
16931
|
}
|
|
17197
16932
|
_ignoreOverlayEvent(event) {
|
|
17198
16933
|
return event.composedPath().some((e) => {
|
|
@@ -17208,93 +16943,6 @@ class Recorder {
|
|
|
17208
16943
|
}
|
|
17209
16944
|
return event.composedPath()[0];
|
|
17210
16945
|
}
|
|
17211
|
-
setMode(mode) {
|
|
17212
|
-
var _a, _b;
|
|
17213
|
-
void ((_b = (_a = this._delegate).setMode) == null ? void 0 : _b.call(_a, mode));
|
|
17214
|
-
}
|
|
17215
|
-
async performAction(action) {
|
|
17216
|
-
var _a, _b;
|
|
17217
|
-
await ((_b = (_a = this._delegate).performAction) == null ? void 0 : _b.call(_a, action).catch(() => {
|
|
17218
|
-
}));
|
|
17219
|
-
}
|
|
17220
|
-
recordAction(action) {
|
|
17221
|
-
var _a, _b;
|
|
17222
|
-
void ((_b = (_a = this._delegate).recordAction) == null ? void 0 : _b.call(_a, action));
|
|
17223
|
-
}
|
|
17224
|
-
setOverlayState(state) {
|
|
17225
|
-
var _a, _b;
|
|
17226
|
-
void ((_b = (_a = this._delegate).setOverlayState) == null ? void 0 : _b.call(_a, state));
|
|
17227
|
-
}
|
|
17228
|
-
setSelector(selector) {
|
|
17229
|
-
var _a, _b;
|
|
17230
|
-
void ((_b = (_a = this._delegate).setSelector) == null ? void 0 : _b.call(_a, selector));
|
|
17231
|
-
}
|
|
17232
|
-
}
|
|
17233
|
-
class Dialog {
|
|
17234
|
-
constructor(recorder) {
|
|
17235
|
-
this._dialogElement = null;
|
|
17236
|
-
this._recorder = recorder;
|
|
17237
|
-
}
|
|
17238
|
-
isShowing() {
|
|
17239
|
-
return !!this._dialogElement;
|
|
17240
|
-
}
|
|
17241
|
-
show(options) {
|
|
17242
|
-
const acceptButton = this._recorder.document.createElement("x-pw-tool-item");
|
|
17243
|
-
acceptButton.title = "Accept";
|
|
17244
|
-
acceptButton.classList.add("accept");
|
|
17245
|
-
acceptButton.appendChild(this._recorder.document.createElement("x-div"));
|
|
17246
|
-
acceptButton.addEventListener("click", () => options.onCommit());
|
|
17247
|
-
const cancelButton = this._recorder.document.createElement("x-pw-tool-item");
|
|
17248
|
-
cancelButton.title = "Close";
|
|
17249
|
-
cancelButton.classList.add("cancel");
|
|
17250
|
-
cancelButton.appendChild(this._recorder.document.createElement("x-div"));
|
|
17251
|
-
cancelButton.addEventListener("click", () => {
|
|
17252
|
-
var _a;
|
|
17253
|
-
this.close();
|
|
17254
|
-
(_a = options.onCancel) == null ? void 0 : _a.call(options);
|
|
17255
|
-
});
|
|
17256
|
-
this._dialogElement = this._recorder.document.createElement("x-pw-dialog");
|
|
17257
|
-
this._keyboardListener = (event) => {
|
|
17258
|
-
var _a;
|
|
17259
|
-
if (event.key === "Escape") {
|
|
17260
|
-
this.close();
|
|
17261
|
-
(_a = options.onCancel) == null ? void 0 : _a.call(options);
|
|
17262
|
-
return;
|
|
17263
|
-
}
|
|
17264
|
-
if (event.key === "Enter" && (event.ctrlKey || event.metaKey)) {
|
|
17265
|
-
if (this._dialogElement)
|
|
17266
|
-
options.onCommit();
|
|
17267
|
-
return;
|
|
17268
|
-
}
|
|
17269
|
-
};
|
|
17270
|
-
this._recorder.document.addEventListener("keydown", this._keyboardListener, true);
|
|
17271
|
-
const toolbarElement = this._recorder.document.createElement("x-pw-tools-list");
|
|
17272
|
-
const labelElement = this._recorder.document.createElement("label");
|
|
17273
|
-
labelElement.textContent = options.label;
|
|
17274
|
-
toolbarElement.appendChild(labelElement);
|
|
17275
|
-
toolbarElement.appendChild(this._recorder.document.createElement("x-spacer"));
|
|
17276
|
-
toolbarElement.appendChild(acceptButton);
|
|
17277
|
-
toolbarElement.appendChild(cancelButton);
|
|
17278
|
-
this._dialogElement.appendChild(toolbarElement);
|
|
17279
|
-
const bodyElement = this._recorder.document.createElement("x-pw-dialog-body");
|
|
17280
|
-
bodyElement.appendChild(options.body);
|
|
17281
|
-
this._dialogElement.appendChild(bodyElement);
|
|
17282
|
-
this._recorder.highlight.appendChild(this._dialogElement);
|
|
17283
|
-
return this._dialogElement;
|
|
17284
|
-
}
|
|
17285
|
-
moveTo(top, left) {
|
|
17286
|
-
if (!this._dialogElement)
|
|
17287
|
-
return;
|
|
17288
|
-
this._dialogElement.style.top = top + "px";
|
|
17289
|
-
this._dialogElement.style.left = left + "px";
|
|
17290
|
-
}
|
|
17291
|
-
close() {
|
|
17292
|
-
if (!this._dialogElement)
|
|
17293
|
-
return;
|
|
17294
|
-
this._dialogElement.remove();
|
|
17295
|
-
this._recorder.document.removeEventListener("keydown", this._keyboardListener);
|
|
17296
|
-
this._dialogElement = null;
|
|
17297
|
-
}
|
|
17298
16946
|
}
|
|
17299
16947
|
function deepActiveElement(document2) {
|
|
17300
16948
|
let activeElement = document2.activeElement;
|
|
@@ -17368,18 +17016,6 @@ function querySelector(injectedScript, selector, ownerDocument) {
|
|
|
17368
17016
|
};
|
|
17369
17017
|
}
|
|
17370
17018
|
}
|
|
17371
|
-
function createSvgElement(doc, { tagName, attrs, children }) {
|
|
17372
|
-
const elem = doc.createElementNS("http://www.w3.org/2000/svg", tagName);
|
|
17373
|
-
if (attrs) {
|
|
17374
|
-
for (const [k2, v2] of Object.entries(attrs))
|
|
17375
|
-
elem.setAttribute(k2, v2);
|
|
17376
|
-
}
|
|
17377
|
-
if (children) {
|
|
17378
|
-
for (const c of children)
|
|
17379
|
-
elem.appendChild(createSvgElement(doc, c));
|
|
17380
|
-
}
|
|
17381
|
-
return elem;
|
|
17382
|
-
}
|
|
17383
17019
|
function getByAttributeTextSelector(attrName, text, options) {
|
|
17384
17020
|
return `internal:attr=[${attrName}=${escapeForAttributeSelector(text, (options == null ? void 0 : options.exact) || false)}]`;
|
|
17385
17021
|
}
|
|
@@ -17422,8 +17058,11 @@ function getByRoleSelector(role, options = {}) {
|
|
|
17422
17058
|
return `internal:role=${role}${props.map(([n2, v2]) => `[${n2}=${v2}]`).join("")}`;
|
|
17423
17059
|
}
|
|
17424
17060
|
const selectorSymbol = Symbol("selector");
|
|
17061
|
+
const injectedScriptSymbol = Symbol("injectedScript");
|
|
17425
17062
|
class Locator {
|
|
17426
17063
|
constructor(injectedScript, selector, options) {
|
|
17064
|
+
this[selectorSymbol] = selector;
|
|
17065
|
+
this[injectedScriptSymbol] = injectedScript;
|
|
17427
17066
|
if (options == null ? void 0 : options.hasText)
|
|
17428
17067
|
selector += ` >> internal:has-text=${escapeForTextSelector(options.hasText, false)}`;
|
|
17429
17068
|
if (options == null ? void 0 : options.hasNotText)
|
|
@@ -17432,7 +17071,6 @@ class Locator {
|
|
|
17432
17071
|
selector += ` >> internal:has=` + JSON.stringify(options.has[selectorSymbol]);
|
|
17433
17072
|
if (options == null ? void 0 : options.hasNot)
|
|
17434
17073
|
selector += ` >> internal:has-not=` + JSON.stringify(options.hasNot[selectorSymbol]);
|
|
17435
|
-
this[selectorSymbol] = selector;
|
|
17436
17074
|
if (selector) {
|
|
17437
17075
|
const parsed = injectedScript.parseSelector(selector);
|
|
17438
17076
|
this.element = injectedScript.querySelector(parsed, injectedScript.document, false);
|
|
@@ -17667,7 +17305,7 @@ const BrowserFrame = ({ url }) => {
|
|
|
17667
17305
|
] }) })
|
|
17668
17306
|
] });
|
|
17669
17307
|
};
|
|
17670
|
-
const SnapshotTab = ({ action, sdkLanguage, testIdAttributeName, isInspecting, setIsInspecting, highlightedLocator, setHighlightedLocator
|
|
17308
|
+
const SnapshotTab = ({ action, sdkLanguage, testIdAttributeName, isInspecting, setIsInspecting, highlightedLocator, setHighlightedLocator }) => {
|
|
17671
17309
|
const [measure, ref] = useMeasure();
|
|
17672
17310
|
const [snapshotTab, setSnapshotTab] = reactExports.useState("action");
|
|
17673
17311
|
const { snapshots } = reactExports.useMemo(() => {
|
|
@@ -17800,7 +17438,6 @@ const SnapshotTab = ({ action, sdkLanguage, testIdAttributeName, isInspecting, s
|
|
|
17800
17438
|
}
|
|
17801
17439
|
),
|
|
17802
17440
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Toolbar, { children: [
|
|
17803
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(ToolbarButton, { className: "pick-locator", title: "Pick locator", icon: "target", toggled: isInspecting, onClick: () => setIsInspecting(!isInspecting) }),
|
|
17804
17441
|
["action", "before", "after"].map((tab) => {
|
|
17805
17442
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17806
17443
|
TabbedPaneTab,
|
|
@@ -17809,15 +17446,12 @@ const SnapshotTab = ({ action, sdkLanguage, testIdAttributeName, isInspecting, s
|
|
|
17809
17446
|
title: renderTitle(tab),
|
|
17810
17447
|
selected: snapshotTab === tab,
|
|
17811
17448
|
onSelect: () => setSnapshotTab(tab)
|
|
17812
|
-
}
|
|
17813
|
-
tab
|
|
17449
|
+
}
|
|
17814
17450
|
);
|
|
17815
17451
|
}),
|
|
17816
17452
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { flex: "auto" } }),
|
|
17817
17453
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ToolbarButton, { icon: "link-external", title: "Open snapshot in a new tab", disabled: !popoutUrl, onClick: () => {
|
|
17818
|
-
|
|
17819
|
-
openPage = window.open;
|
|
17820
|
-
const win = openPage(popoutUrl || "", "_blank");
|
|
17454
|
+
const win = window.open(popoutUrl || "", "_blank");
|
|
17821
17455
|
win == null ? void 0 : win.addEventListener("DOMContentLoaded", () => {
|
|
17822
17456
|
const injectedScript = new InjectedScript(win, false, sdkLanguage, testIdAttributeName, 1, "chromium", []);
|
|
17823
17457
|
new ConsoleAPI(injectedScript);
|
|
@@ -17831,8 +17465,8 @@ const SnapshotTab = ({ action, sdkLanguage, testIdAttributeName, isInspecting, s
|
|
|
17831
17465
|
}, children: [
|
|
17832
17466
|
/* @__PURE__ */ jsxRuntimeExports.jsx(BrowserFrame, { url: snapshotInfo.url }),
|
|
17833
17467
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "snapshot-switcher", children: [
|
|
17834
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("iframe", { ref: iframeRef0, name: "snapshot", title: "DOM Snapshot", className:
|
|
17835
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("iframe", { ref: iframeRef1, name: "snapshot", title: "DOM Snapshot", className:
|
|
17468
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("iframe", { ref: iframeRef0, name: "snapshot", title: "DOM Snapshot", className: loadingRef.current.visibleIframe === 0 ? "snapshot-visible" : "" }),
|
|
17469
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("iframe", { ref: iframeRef1, name: "snapshot", title: "DOM Snapshot", className: loadingRef.current.visibleIframe === 1 ? "snapshot-visible" : "" })
|
|
17836
17470
|
] })
|
|
17837
17471
|
] }) })
|
|
17838
17472
|
]
|
|
@@ -17919,7 +17553,7 @@ const StackTraceView = ({ stack, setSelectedFrame, selectedFrame }) => {
|
|
|
17919
17553
|
}
|
|
17920
17554
|
);
|
|
17921
17555
|
};
|
|
17922
|
-
const SourceTab = ({ stack, sources, rootDir, fallbackLocation
|
|
17556
|
+
const SourceTab = ({ stack, sources, hideStackFrames, rootDir, fallbackLocation }) => {
|
|
17923
17557
|
const [lastStack, setLastStack] = reactExports.useState();
|
|
17924
17558
|
const [selectedFrame, setSelectedFrame] = reactExports.useState(0);
|
|
17925
17559
|
reactExports.useEffect(() => {
|
|
@@ -17928,7 +17562,7 @@ const SourceTab = ({ stack, sources, rootDir, fallbackLocation, stackFrameLocati
|
|
|
17928
17562
|
setSelectedFrame(0);
|
|
17929
17563
|
}
|
|
17930
17564
|
}, [stack, lastStack, setLastStack, setSelectedFrame]);
|
|
17931
|
-
const { source, highlight, targetLine, fileName
|
|
17565
|
+
const { source, highlight, targetLine, fileName } = useAsyncMemo(async () => {
|
|
17932
17566
|
var _a, _b;
|
|
17933
17567
|
const actionLocation = stack == null ? void 0 : stack[selectedFrame];
|
|
17934
17568
|
const shouldUseFallback = !(actionLocation == null ? void 0 : actionLocation.file);
|
|
@@ -17940,7 +17574,6 @@ const SourceTab = ({ stack, sources, rootDir, fallbackLocation, stackFrameLocati
|
|
|
17940
17574
|
source2 = { errors: ((_a = fallbackLocation == null ? void 0 : fallbackLocation.source) == null ? void 0 : _a.errors) || [], content: void 0 };
|
|
17941
17575
|
sources.set(file, source2);
|
|
17942
17576
|
}
|
|
17943
|
-
const location2 = shouldUseFallback ? fallbackLocation : actionLocation;
|
|
17944
17577
|
const targetLine2 = shouldUseFallback ? (fallbackLocation == null ? void 0 : fallbackLocation.line) || ((_b = source2.errors[0]) == null ? void 0 : _b.line) || 0 : actionLocation.line;
|
|
17945
17578
|
const fileName2 = rootDir && file.startsWith(rootDir) ? file.substring(rootDir.length + 1) : file;
|
|
17946
17579
|
const highlight2 = source2.errors.map((e) => ({ type: "error", line: e.line, message: e.message }));
|
|
@@ -17959,36 +17592,15 @@ const SourceTab = ({ stack, sources, rootDir, fallbackLocation, stackFrameLocati
|
|
|
17959
17592
|
source2.content = `<Unable to read "${file}">`;
|
|
17960
17593
|
}
|
|
17961
17594
|
}
|
|
17962
|
-
return { source: source2, highlight: highlight2, targetLine: targetLine2, fileName: fileName2
|
|
17595
|
+
return { source: source2, highlight: highlight2, targetLine: targetLine2, fileName: fileName2 };
|
|
17963
17596
|
}, [stack, selectedFrame, rootDir, fallbackLocation], { source: { errors: [], content: "Loading…" }, highlight: [] });
|
|
17964
|
-
|
|
17965
|
-
|
|
17966
|
-
|
|
17967
|
-
|
|
17968
|
-
|
|
17969
|
-
|
|
17970
|
-
|
|
17971
|
-
}
|
|
17972
|
-
}, [onOpenExternally, location]);
|
|
17973
|
-
const showStackFrames = ((stack == null ? void 0 : stack.length) ?? 0) > 1;
|
|
17974
|
-
const shortFileName = getFileName(fileName);
|
|
17975
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17976
|
-
SplitView,
|
|
17977
|
-
{
|
|
17978
|
-
sidebarSize: 200,
|
|
17979
|
-
orientation: stackFrameLocation === "bottom" ? "vertical" : "horizontal",
|
|
17980
|
-
sidebarHidden: !showStackFrames,
|
|
17981
|
-
main: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vbox", "data-testid": "source-code", children: [
|
|
17982
|
-
fileName && /* @__PURE__ */ jsxRuntimeExports.jsxs(Toolbar, { children: [
|
|
17983
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "source-tab-file-name", title: fileName, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: shortFileName }) }),
|
|
17984
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(CopyToClipboard, { description: "Copy filename", value: shortFileName }),
|
|
17985
|
-
location && /* @__PURE__ */ jsxRuntimeExports.jsx(ToolbarButton, { icon: "link-external", title: "Open in VS Code", onClick: openExternally })
|
|
17986
|
-
] }),
|
|
17987
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(CodeMirrorWrapper, { text: source.content || "", language: "javascript", highlight, revealLine: targetLine, readOnly: true, lineNumbers: true })
|
|
17988
|
-
] }),
|
|
17989
|
-
sidebar: /* @__PURE__ */ jsxRuntimeExports.jsx(StackTraceView, { stack, selectedFrame, setSelectedFrame })
|
|
17990
|
-
}
|
|
17991
|
-
);
|
|
17597
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(SplitView, { sidebarSize: 200, orientation: "horizontal", sidebarHidden: hideStackFrames, children: [
|
|
17598
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vbox", "data-testid": "source-code", children: [
|
|
17599
|
+
fileName && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "source-tab-file-name", children: fileName }),
|
|
17600
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CodeMirrorWrapper, { text: source.content || "", language: "javascript", highlight, revealLine: targetLine, readOnly: true, lineNumbers: true })
|
|
17601
|
+
] }),
|
|
17602
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(StackTraceView, { stack, selectedFrame, setSelectedFrame })
|
|
17603
|
+
] });
|
|
17992
17604
|
};
|
|
17993
17605
|
async function calculateSha1(text) {
|
|
17994
17606
|
const buffer = new TextEncoder().encode(text);
|
|
@@ -18001,12 +17613,6 @@ async function calculateSha1(text) {
|
|
|
18001
17613
|
}
|
|
18002
17614
|
return hexCodes.join("");
|
|
18003
17615
|
}
|
|
18004
|
-
function getFileName(fullPath) {
|
|
18005
|
-
if (!fullPath)
|
|
18006
|
-
return "";
|
|
18007
|
-
const pathSep = (fullPath == null ? void 0 : fullPath.includes("/")) ? "/" : "\\";
|
|
18008
|
-
return (fullPath == null ? void 0 : fullPath.split(pathSep).pop()) ?? "";
|
|
18009
|
-
}
|
|
18010
17616
|
const tileSize = { width: 200, height: 45 };
|
|
18011
17617
|
const frameMargin = 2.5;
|
|
18012
17618
|
const rowHeight = tileSize.height + frameMargin * 2;
|
|
@@ -18022,7 +17628,7 @@ const FilmStrip = ({ model, boundaries, previewPoint }) => {
|
|
|
18022
17628
|
const screencastFrames = (_b = (_a = model == null ? void 0 : model.pages) == null ? void 0 : _a[pageIndex]) == null ? void 0 : _b.screencastFrames;
|
|
18023
17629
|
let previewImage = void 0;
|
|
18024
17630
|
let previewSize = void 0;
|
|
18025
|
-
if (previewPoint !== void 0 && screencastFrames
|
|
17631
|
+
if (previewPoint !== void 0 && screencastFrames) {
|
|
18026
17632
|
const previewTime = boundaries.minimum + (boundaries.maximum - boundaries.minimum) * previewPoint.x / measure.width;
|
|
18027
17633
|
previewImage = screencastFrames[upperBound(screencastFrames, previewTime, timeComparator) - 1];
|
|
18028
17634
|
const fitInto = {
|
|
@@ -18032,7 +17638,7 @@ const FilmStrip = ({ model, boundaries, previewPoint }) => {
|
|
|
18032
17638
|
previewSize = previewImage ? inscribe({ width: previewImage.width, height: previewImage.height }, fitInto) : void 0;
|
|
18033
17639
|
}
|
|
18034
17640
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "film-strip", ref, children: [
|
|
18035
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "film-strip-lanes", ref: lanesRef, children: model == null ? void 0 : model.pages.map((page, index) =>
|
|
17641
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "film-strip-lanes", ref: lanesRef, children: model == null ? void 0 : model.pages.map((page, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18036
17642
|
FilmStripLane,
|
|
18037
17643
|
{
|
|
18038
17644
|
boundaries,
|
|
@@ -18040,7 +17646,7 @@ const FilmStrip = ({ model, boundaries, previewPoint }) => {
|
|
|
18040
17646
|
width: measure.width
|
|
18041
17647
|
},
|
|
18042
17648
|
index
|
|
18043
|
-
)
|
|
17649
|
+
)) }),
|
|
18044
17650
|
(previewPoint == null ? void 0 : previewPoint.x) !== void 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "film-strip-hover", style: {
|
|
18045
17651
|
top: measure.bottom + 5,
|
|
18046
17652
|
left: Math.min(previewPoint.x, measure.width - (previewSize ? previewSize.width : 0) - 10)
|
|
@@ -18102,7 +17708,7 @@ function inscribe(object, area) {
|
|
|
18102
17708
|
height: object.height / scale | 0
|
|
18103
17709
|
};
|
|
18104
17710
|
}
|
|
18105
|
-
const Timeline = ({ model, boundaries,
|
|
17711
|
+
const Timeline = ({ model, boundaries, onSelected, highlightedAction, highlightedEntry, selectedTime, setSelectedTime, sdkLanguage }) => {
|
|
18106
17712
|
const [measure, ref] = useMeasure();
|
|
18107
17713
|
const [dragWindow, setDragWindow] = reactExports.useState();
|
|
18108
17714
|
const [previewPoint, setPreviewPoint] = reactExports.useState();
|
|
@@ -18146,31 +17752,12 @@ const Timeline = ({ model, boundaries, consoleEntries, onSelected, highlightedAc
|
|
|
18146
17752
|
error: false
|
|
18147
17753
|
});
|
|
18148
17754
|
}
|
|
18149
|
-
for (const consoleMessage of consoleEntries || []) {
|
|
18150
|
-
bars2.push({
|
|
18151
|
-
consoleMessage,
|
|
18152
|
-
leftTime: consoleMessage.timestamp,
|
|
18153
|
-
rightTime: consoleMessage.timestamp,
|
|
18154
|
-
leftPosition: timeToPosition(measure.width, boundaries, consoleMessage.timestamp),
|
|
18155
|
-
rightPosition: timeToPosition(measure.width, boundaries, consoleMessage.timestamp),
|
|
18156
|
-
active: false,
|
|
18157
|
-
error: consoleMessage.isError
|
|
18158
|
-
});
|
|
18159
|
-
}
|
|
18160
17755
|
return bars2;
|
|
18161
|
-
}, [model,
|
|
17756
|
+
}, [model, boundaries, measure]);
|
|
18162
17757
|
reactExports.useMemo(() => {
|
|
18163
|
-
for (const bar of bars)
|
|
18164
|
-
|
|
18165
|
-
|
|
18166
|
-
else if (highlightedEntry)
|
|
18167
|
-
bar.active = bar.resource === highlightedEntry;
|
|
18168
|
-
else if (highlightedConsoleEntry)
|
|
18169
|
-
bar.active = bar.consoleMessage === highlightedConsoleEntry;
|
|
18170
|
-
else
|
|
18171
|
-
bar.active = false;
|
|
18172
|
-
}
|
|
18173
|
-
}, [bars, highlightedAction, highlightedEntry, highlightedConsoleEntry]);
|
|
17758
|
+
for (const bar of bars)
|
|
17759
|
+
bar.active = !!highlightedAction && bar.action === highlightedAction || !!highlightedEntry && bar.resource === highlightedEntry;
|
|
17760
|
+
}, [bars, highlightedAction, highlightedEntry]);
|
|
18174
17761
|
const onMouseDown = reactExports.useCallback((event) => {
|
|
18175
17762
|
setPreviewPoint(void 0);
|
|
18176
17763
|
if (!ref.current)
|
|
@@ -18285,17 +17872,10 @@ const Timeline = ({ model, boundaries, consoleEntries, onSelected, highlightedAc
|
|
|
18285
17872
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18286
17873
|
"div",
|
|
18287
17874
|
{
|
|
18288
|
-
className:
|
|
18289
|
-
"timeline-bar",
|
|
18290
|
-
bar.action && "action",
|
|
18291
|
-
bar.resource && "network",
|
|
18292
|
-
bar.consoleMessage && "console-message",
|
|
18293
|
-
bar.active && "active",
|
|
18294
|
-
bar.error && "error"
|
|
18295
|
-
),
|
|
17875
|
+
className: "timeline-bar" + (bar.action ? " action" : "") + (bar.resource ? " network" : "") + (bar.active ? " active" : "") + (bar.error ? " error" : ""),
|
|
18296
17876
|
style: {
|
|
18297
17877
|
left: bar.leftPosition,
|
|
18298
|
-
width: Math.max(
|
|
17878
|
+
width: Math.max(1, bar.rightPosition - bar.leftPosition),
|
|
18299
17879
|
top: barTop(bar),
|
|
18300
17880
|
bottom: 0
|
|
18301
17881
|
}
|
|
@@ -18357,7 +17937,7 @@ const MetadataView = ({ model }) => {
|
|
|
18357
17937
|
var _a, _b;
|
|
18358
17938
|
if (!model)
|
|
18359
17939
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {});
|
|
18360
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
17940
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "metadata-view vbox", children: [
|
|
18361
17941
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "call-section", style: { paddingTop: 2 }, children: "Time" }),
|
|
18362
17942
|
!!model.wallTime && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "call-line", children: [
|
|
18363
17943
|
"start time:",
|
|
@@ -18384,13 +17964,6 @@ const MetadataView = ({ model }) => {
|
|
|
18384
17964
|
"user agent:",
|
|
18385
17965
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "call-value datetime", title: model.options.userAgent, children: model.options.userAgent })
|
|
18386
17966
|
] }),
|
|
18387
|
-
model.options.baseURL && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
18388
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "call-section", style: { paddingTop: 2 }, children: "Config" }),
|
|
18389
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "call-line", children: [
|
|
18390
|
-
"baseURL:",
|
|
18391
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("a", { className: "call-value string", href: model.options.baseURL, title: model.options.baseURL, target: "_blank", rel: "noopener noreferrer", children: model.options.baseURL })
|
|
18392
|
-
] })
|
|
18393
|
-
] }),
|
|
18394
17967
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "call-section", children: "Viewport" }),
|
|
18395
17968
|
model.options.viewport && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "call-line", children: [
|
|
18396
17969
|
"width:",
|
|
@@ -18447,7 +18020,7 @@ const checkerboardStyle = {
|
|
|
18447
18020
|
rgb(0 0 0 / 15%) 0px -6.1px 12px,
|
|
18448
18021
|
rgb(0 0 0 / 25%) 0px 6px 12px`
|
|
18449
18022
|
};
|
|
18450
|
-
const ImageDiffView = ({ diff
|
|
18023
|
+
const ImageDiffView = ({ diff }) => {
|
|
18451
18024
|
const [mode, setMode] = reactExports.useState(diff.diff ? "diff" : "actual");
|
|
18452
18025
|
const [showSxsDiff, setShowSxsDiff] = reactExports.useState(false);
|
|
18453
18026
|
const [expectedImage, setExpectedImage] = reactExports.useState(null);
|
|
@@ -18499,10 +18072,10 @@ const ImageDiffView = ({ diff, noTargetBlank }) => {
|
|
|
18499
18072
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ImageWithSize, { image: actualImage, title: "Actual", canvasWidth: sxsScale * imageWidth, canvasHeight: sxsScale * imageHeight, scale: sxsScale })
|
|
18500
18073
|
] })
|
|
18501
18074
|
] }),
|
|
18502
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { alignSelf: "start", lineHeight: "18px"
|
|
18503
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: diff.diff && /* @__PURE__ */ jsxRuntimeExports.jsx("a", { target: "_blank", href: diff.diff.attachment.path,
|
|
18504
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { target:
|
|
18505
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { target:
|
|
18075
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { alignSelf: "start", lineHeight: "18px" }, children: [
|
|
18076
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: diff.diff && /* @__PURE__ */ jsxRuntimeExports.jsx("a", { target: "_blank", href: diff.diff.attachment.path, children: diff.diff.attachment.name }) }),
|
|
18077
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { target: "_blank", href: diff.actual.attachment.path, children: diff.actual.attachment.name }) }),
|
|
18078
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { target: "_blank", href: diff.expected.attachment.path, children: diff.expected.attachment.name }) })
|
|
18506
18079
|
] })
|
|
18507
18080
|
] }) });
|
|
18508
18081
|
};
|
|
@@ -18569,87 +18142,6 @@ const ImageWithSize = ({ image, title, alt, canvasWidth, canvasHeight, scale, on
|
|
|
18569
18142
|
) })
|
|
18570
18143
|
] });
|
|
18571
18144
|
};
|
|
18572
|
-
function isTextualMimeType(mimeType) {
|
|
18573
|
-
return !!mimeType.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/);
|
|
18574
|
-
}
|
|
18575
|
-
const Expandable = ({ title, children, setExpanded, expanded, expandOnTitleClick }) => {
|
|
18576
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx("expandable", expanded && "expanded"), children: [
|
|
18577
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "expandable-title", onClick: () => expandOnTitleClick && setExpanded(!expanded), children: [
|
|
18578
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18579
|
-
"div",
|
|
18580
|
-
{
|
|
18581
|
-
className: clsx("codicon", expanded ? "codicon-chevron-down" : "codicon-chevron-right"),
|
|
18582
|
-
style: { cursor: "pointer", color: "var(--vscode-foreground)", marginLeft: "5px" },
|
|
18583
|
-
onClick: () => !expandOnTitleClick && setExpanded(!expanded)
|
|
18584
|
-
}
|
|
18585
|
-
),
|
|
18586
|
-
title
|
|
18587
|
-
] }),
|
|
18588
|
-
expanded && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginLeft: 25 }, children })
|
|
18589
|
-
] });
|
|
18590
|
-
};
|
|
18591
|
-
function linkifyText(description) {
|
|
18592
|
-
const result = [];
|
|
18593
|
-
let currentIndex = 0;
|
|
18594
|
-
let match;
|
|
18595
|
-
while ((match = kWebLinkRe.exec(description)) !== null) {
|
|
18596
|
-
const stringBeforeMatch = description.substring(currentIndex, match.index);
|
|
18597
|
-
if (stringBeforeMatch)
|
|
18598
|
-
result.push(stringBeforeMatch);
|
|
18599
|
-
const value = match[0];
|
|
18600
|
-
result.push(renderLink(value));
|
|
18601
|
-
currentIndex = match.index + value.length;
|
|
18602
|
-
}
|
|
18603
|
-
const stringAfterMatches = description.substring(currentIndex);
|
|
18604
|
-
if (stringAfterMatches)
|
|
18605
|
-
result.push(stringAfterMatches);
|
|
18606
|
-
return result;
|
|
18607
|
-
}
|
|
18608
|
-
function renderLink(text) {
|
|
18609
|
-
let link = text;
|
|
18610
|
-
if (link.startsWith("www."))
|
|
18611
|
-
link = "https://" + link;
|
|
18612
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: link, target: "_blank", rel: "noopener noreferrer", children: text });
|
|
18613
|
-
}
|
|
18614
|
-
const ExpandableAttachment = ({ attachment }) => {
|
|
18615
|
-
const [expanded, setExpanded] = reactExports.useState(false);
|
|
18616
|
-
const [attachmentText, setAttachmentText] = reactExports.useState(null);
|
|
18617
|
-
const [placeholder, setPlaceholder] = reactExports.useState(null);
|
|
18618
|
-
const isTextAttachment = isTextualMimeType(attachment.contentType);
|
|
18619
|
-
const hasContent = !!attachment.sha1 || !!attachment.path;
|
|
18620
|
-
reactExports.useEffect(() => {
|
|
18621
|
-
if (expanded && attachmentText === null && placeholder === null) {
|
|
18622
|
-
setPlaceholder("Loading ...");
|
|
18623
|
-
fetch(attachmentURL(attachment)).then((response) => response.text()).then((text) => {
|
|
18624
|
-
setAttachmentText(text);
|
|
18625
|
-
setPlaceholder(null);
|
|
18626
|
-
}).catch((e) => {
|
|
18627
|
-
setPlaceholder("Failed to load: " + e.message);
|
|
18628
|
-
});
|
|
18629
|
-
}
|
|
18630
|
-
}, [expanded, attachmentText, placeholder, attachment]);
|
|
18631
|
-
const title = /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { style: { marginLeft: 5 }, children: [
|
|
18632
|
-
linkifyText(attachment.name),
|
|
18633
|
-
" ",
|
|
18634
|
-
hasContent && /* @__PURE__ */ jsxRuntimeExports.jsx("a", { style: { marginLeft: 5 }, href: downloadURL(attachment), children: "download" })
|
|
18635
|
-
] });
|
|
18636
|
-
if (!isTextAttachment || !hasContent)
|
|
18637
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginLeft: 20 }, children: title });
|
|
18638
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
18639
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Expandable, { title, expanded, setExpanded, expandOnTitleClick: true, children: placeholder && /* @__PURE__ */ jsxRuntimeExports.jsx("i", { children: placeholder }) }),
|
|
18640
|
-
expanded && attachmentText !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18641
|
-
CodeMirrorWrapper,
|
|
18642
|
-
{
|
|
18643
|
-
text: attachmentText,
|
|
18644
|
-
readOnly: true,
|
|
18645
|
-
mimeType: attachment.contentType,
|
|
18646
|
-
linkify: true,
|
|
18647
|
-
lineNumbers: true,
|
|
18648
|
-
wrapLines: false
|
|
18649
|
-
}
|
|
18650
|
-
)
|
|
18651
|
-
] });
|
|
18652
|
-
};
|
|
18653
18145
|
const AttachmentsTab = ({ model }) => {
|
|
18654
18146
|
const { diffMap, screenshots, attachments } = reactExports.useMemo(() => {
|
|
18655
18147
|
const attachments2 = /* @__PURE__ */ new Set();
|
|
@@ -18670,8 +18162,8 @@ const AttachmentsTab = ({ model }) => {
|
|
|
18670
18162
|
const entry = diffMap2.get(name) || { expected: void 0, actual: void 0, diff: void 0 };
|
|
18671
18163
|
entry[type] = attachment;
|
|
18672
18164
|
diffMap2.set(name, entry);
|
|
18673
|
-
|
|
18674
|
-
|
|
18165
|
+
}
|
|
18166
|
+
if (attachment.contentType.startsWith("image/")) {
|
|
18675
18167
|
screenshots2.add(attachment);
|
|
18676
18168
|
attachments2.delete(attachment);
|
|
18677
18169
|
}
|
|
@@ -18684,11 +18176,11 @@ const AttachmentsTab = ({ model }) => {
|
|
|
18684
18176
|
[...diffMap.values()].map(({ expected, actual, diff }) => {
|
|
18685
18177
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
18686
18178
|
expected && actual && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "attachments-section", children: "Image diff" }),
|
|
18687
|
-
expected && actual && /* @__PURE__ */ jsxRuntimeExports.jsx(ImageDiffView, {
|
|
18179
|
+
expected && actual && /* @__PURE__ */ jsxRuntimeExports.jsx(ImageDiffView, { diff: {
|
|
18688
18180
|
name: "Image diff",
|
|
18689
|
-
expected: { attachment: { ...expected, path:
|
|
18690
|
-
actual: { attachment: { ...actual, path:
|
|
18691
|
-
diff: diff ? { attachment: { ...diff, path:
|
|
18181
|
+
expected: { attachment: { ...expected, path: attachmentURL(expected) }, title: "Expected" },
|
|
18182
|
+
actual: { attachment: { ...actual, path: attachmentURL(actual) } },
|
|
18183
|
+
diff: diff ? { attachment: { ...diff, path: attachmentURL(diff) } } : void 0
|
|
18692
18184
|
} })
|
|
18693
18185
|
] });
|
|
18694
18186
|
}),
|
|
@@ -18697,46 +18189,20 @@ const AttachmentsTab = ({ model }) => {
|
|
|
18697
18189
|
const url = attachmentURL(a);
|
|
18698
18190
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "attachment-item", children: [
|
|
18699
18191
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { draggable: "false", src: url }) }),
|
|
18700
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { target: "_blank", href: url,
|
|
18192
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { target: "_blank", href: url, children: a.name }) })
|
|
18701
18193
|
] }, `screenshot-${i}`);
|
|
18702
18194
|
}),
|
|
18703
18195
|
attachments.size ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "attachments-section", children: "Attachments" }) : void 0,
|
|
18704
18196
|
[...attachments.values()].map((a, i) => {
|
|
18705
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "attachment-item", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18197
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "attachment-item", children: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: attachmentURL(a) + "&download", children: a.name }) }, `attachment-${i}`);
|
|
18706
18198
|
})
|
|
18707
18199
|
] });
|
|
18708
18200
|
};
|
|
18709
|
-
function attachmentURL(attachment
|
|
18710
|
-
|
|
18711
|
-
|
|
18712
|
-
|
|
18713
|
-
|
|
18714
|
-
}
|
|
18715
|
-
params.set("path", attachment.path);
|
|
18716
|
-
return "file?" + params.toString();
|
|
18717
|
-
}
|
|
18718
|
-
function downloadURL(attachment) {
|
|
18719
|
-
const params = { dn: attachment.name };
|
|
18720
|
-
if (attachment.contentType)
|
|
18721
|
-
params.dct = attachment.contentType;
|
|
18722
|
-
return attachmentURL(attachment, params);
|
|
18723
|
-
}
|
|
18724
|
-
function attachmentKey(attachment, index) {
|
|
18725
|
-
return index + "-" + (attachment.sha1 ? `sha1-` + attachment.sha1 : `path-` + attachment.path);
|
|
18726
|
-
}
|
|
18727
|
-
const AnnotationsTab = ({ annotations }) => {
|
|
18728
|
-
if (!annotations.length)
|
|
18729
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(PlaceholderPanel, { text: "No annotations" });
|
|
18730
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "annotations-tab", children: annotations.map((annotation, i) => {
|
|
18731
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "annotation-item", children: [
|
|
18732
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontWeight: "bold" }, children: annotation.type }),
|
|
18733
|
-
annotation.description && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
18734
|
-
": ",
|
|
18735
|
-
linkifyText(annotation.description)
|
|
18736
|
-
] })
|
|
18737
|
-
] }, `annotation-${i}`);
|
|
18738
|
-
}) });
|
|
18739
|
-
};
|
|
18201
|
+
function attachmentURL(attachment) {
|
|
18202
|
+
if (attachment.sha1)
|
|
18203
|
+
return "sha1/" + attachment.sha1 + "?trace=" + encodeURIComponent(attachment.traceUrl);
|
|
18204
|
+
return "file?path=" + encodeURIComponent(attachment.path);
|
|
18205
|
+
}
|
|
18740
18206
|
const InspectorTab = ({ sdkLanguage, setIsInspecting, highlightedLocator, setHighlightedLocator }) => {
|
|
18741
18207
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vbox", style: { backgroundColor: "var(--vscode-sideBar-background)" }, children: [
|
|
18742
18208
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { margin: "10px 0px 10px 10px", color: "var(--vscode-editorCodeLens-foreground)", flex: "none" }, children: "Locator" }),
|
|
@@ -18775,32 +18241,18 @@ function testStatusText(status) {
|
|
|
18775
18241
|
return "Skipped";
|
|
18776
18242
|
return "Did not run";
|
|
18777
18243
|
}
|
|
18778
|
-
const
|
|
18779
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vbox settings-view", children: settings2.map(({ value, set, title }) => {
|
|
18780
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "setting", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
|
|
18781
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("input", { type: "checkbox", checked: value, onClick: () => set(!value) }),
|
|
18782
|
-
title
|
|
18783
|
-
] }) }, title);
|
|
18784
|
-
}) });
|
|
18785
|
-
};
|
|
18786
|
-
const Workbench = ({ model, showSourcesFirst, rootDir, fallbackLocation, initialSelection, onSelectionChanged, isLive, status, annotations, inert, openPage, onOpenExternally, revealSource, showSettings }) => {
|
|
18787
|
-
var _a;
|
|
18244
|
+
const Workbench = ({ model, hideStackFrames, showSourcesFirst, rootDir, fallbackLocation, initialSelection, onSelectionChanged, isLive, status }) => {
|
|
18788
18245
|
const [selectedAction, setSelectedActionImpl] = reactExports.useState(void 0);
|
|
18789
18246
|
const [revealedStack, setRevealedStack] = reactExports.useState(void 0);
|
|
18790
18247
|
const [highlightedAction, setHighlightedAction] = reactExports.useState();
|
|
18791
18248
|
const [highlightedEntry, setHighlightedEntry] = reactExports.useState();
|
|
18792
|
-
const [highlightedConsoleMessage, setHighlightedConsoleMessage] = reactExports.useState();
|
|
18793
18249
|
const [selectedNavigatorTab, setSelectedNavigatorTab] = reactExports.useState("actions");
|
|
18794
18250
|
const [selectedPropertiesTab, setSelectedPropertiesTab] = useSetting("propertiesTab", showSourcesFirst ? "source" : "call");
|
|
18795
|
-
const [isInspecting,
|
|
18251
|
+
const [isInspecting, setIsInspecting] = reactExports.useState(false);
|
|
18796
18252
|
const [highlightedLocator, setHighlightedLocator] = reactExports.useState("");
|
|
18797
18253
|
const activeAction = model ? highlightedAction || selectedAction : void 0;
|
|
18798
18254
|
const [selectedTime, setSelectedTime] = reactExports.useState();
|
|
18799
18255
|
const [sidebarLocation, setSidebarLocation] = useSetting("propertiesSidebarLocation", "bottom");
|
|
18800
|
-
const [showRouteActions, setShowRouteActions] = useSetting("show-route-actions", true);
|
|
18801
|
-
const filteredActions = reactExports.useMemo(() => {
|
|
18802
|
-
return ((model == null ? void 0 : model.actions) || []).filter((action) => showRouteActions || !isRouteAction(action));
|
|
18803
|
-
}, [model, showRouteActions]);
|
|
18804
18256
|
const setSelectedAction = reactExports.useCallback((action) => {
|
|
18805
18257
|
setSelectedActionImpl(action);
|
|
18806
18258
|
setRevealedStack(action == null ? void 0 : action.stack);
|
|
@@ -18808,7 +18260,6 @@ const Workbench = ({ model, showSourcesFirst, rootDir, fallbackLocation, initial
|
|
|
18808
18260
|
const sources = reactExports.useMemo(() => (model == null ? void 0 : model.sources) || /* @__PURE__ */ new Map(), [model]);
|
|
18809
18261
|
reactExports.useEffect(() => {
|
|
18810
18262
|
setSelectedTime(void 0);
|
|
18811
|
-
setRevealedStack(void 0);
|
|
18812
18263
|
}, [model]);
|
|
18813
18264
|
reactExports.useEffect(() => {
|
|
18814
18265
|
if (selectedAction && (model == null ? void 0 : model.actions.includes(selectedAction)))
|
|
@@ -18831,27 +18282,17 @@ const Workbench = ({ model, showSourcesFirst, rootDir, fallbackLocation, initial
|
|
|
18831
18282
|
}, [model, selectedAction, setSelectedAction, initialSelection]);
|
|
18832
18283
|
const onActionSelected = reactExports.useCallback((action) => {
|
|
18833
18284
|
setSelectedAction(action);
|
|
18834
|
-
setHighlightedAction(void 0);
|
|
18835
18285
|
onSelectionChanged == null ? void 0 : onSelectionChanged(action);
|
|
18836
|
-
}, [setSelectedAction, onSelectionChanged
|
|
18286
|
+
}, [setSelectedAction, onSelectionChanged]);
|
|
18837
18287
|
const selectPropertiesTab = reactExports.useCallback((tab) => {
|
|
18838
18288
|
setSelectedPropertiesTab(tab);
|
|
18839
18289
|
if (tab !== "inspector")
|
|
18840
|
-
|
|
18290
|
+
setIsInspecting(false);
|
|
18841
18291
|
}, [setSelectedPropertiesTab]);
|
|
18842
|
-
const setIsInspecting = reactExports.useCallback((value) => {
|
|
18843
|
-
if (!isInspecting && value)
|
|
18844
|
-
selectPropertiesTab("inspector");
|
|
18845
|
-
setIsInspectingState(value);
|
|
18846
|
-
}, [setIsInspectingState, selectPropertiesTab, isInspecting]);
|
|
18847
18292
|
const locatorPicked = reactExports.useCallback((locator) => {
|
|
18848
18293
|
setHighlightedLocator(locator);
|
|
18849
18294
|
selectPropertiesTab("inspector");
|
|
18850
18295
|
}, [selectPropertiesTab]);
|
|
18851
|
-
reactExports.useEffect(() => {
|
|
18852
|
-
if (revealSource)
|
|
18853
|
-
selectPropertiesTab("source");
|
|
18854
|
-
}, [revealSource, selectPropertiesTab]);
|
|
18855
18296
|
const consoleModel = useConsoleTabModel(model, selectedTime);
|
|
18856
18297
|
const networkModel = useNetworkTabModel(model, selectedTime);
|
|
18857
18298
|
const errorsModel = useErrorsTabModel(model);
|
|
@@ -18894,22 +18335,17 @@ const Workbench = ({ model, showSourcesFirst, rootDir, fallbackLocation, initial
|
|
|
18894
18335
|
selectPropertiesTab("source");
|
|
18895
18336
|
} })
|
|
18896
18337
|
};
|
|
18897
|
-
let fallbackSourceErrorCount = void 0;
|
|
18898
|
-
if (!selectedAction && fallbackLocation)
|
|
18899
|
-
fallbackSourceErrorCount = (_a = fallbackLocation.source) == null ? void 0 : _a.errors.length;
|
|
18900
18338
|
const sourceTab = {
|
|
18901
18339
|
id: "source",
|
|
18902
18340
|
title: "Source",
|
|
18903
|
-
errorCount: fallbackSourceErrorCount,
|
|
18904
18341
|
render: () => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18905
18342
|
SourceTab,
|
|
18906
18343
|
{
|
|
18907
18344
|
stack: revealedStack,
|
|
18908
18345
|
sources,
|
|
18346
|
+
hideStackFrames,
|
|
18909
18347
|
rootDir,
|
|
18910
|
-
|
|
18911
|
-
fallbackLocation,
|
|
18912
|
-
onOpenExternally
|
|
18348
|
+
fallbackLocation
|
|
18913
18349
|
}
|
|
18914
18350
|
)
|
|
18915
18351
|
};
|
|
@@ -18917,16 +18353,7 @@ const Workbench = ({ model, showSourcesFirst, rootDir, fallbackLocation, initial
|
|
|
18917
18353
|
id: "console",
|
|
18918
18354
|
title: "Console",
|
|
18919
18355
|
count: consoleModel.entries.length,
|
|
18920
|
-
render: () => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18921
|
-
ConsoleTab,
|
|
18922
|
-
{
|
|
18923
|
-
consoleModel,
|
|
18924
|
-
boundaries,
|
|
18925
|
-
selectedTime,
|
|
18926
|
-
onAccepted: (m2) => setSelectedTime({ minimum: m2.timestamp, maximum: m2.timestamp }),
|
|
18927
|
-
onEntryHovered: setHighlightedConsoleMessage
|
|
18928
|
-
}
|
|
18929
|
-
)
|
|
18356
|
+
render: () => /* @__PURE__ */ jsxRuntimeExports.jsx(ConsoleTab, { consoleModel, boundaries, selectedTime })
|
|
18930
18357
|
};
|
|
18931
18358
|
const networkTab = {
|
|
18932
18359
|
id: "network",
|
|
@@ -18950,15 +18377,6 @@ const Workbench = ({ model, showSourcesFirst, rootDir, fallbackLocation, initial
|
|
|
18950
18377
|
sourceTab,
|
|
18951
18378
|
attachmentsTab
|
|
18952
18379
|
];
|
|
18953
|
-
if (annotations !== void 0) {
|
|
18954
|
-
const annotationsTab = {
|
|
18955
|
-
id: "annotations",
|
|
18956
|
-
title: "Annotations",
|
|
18957
|
-
count: annotations.length,
|
|
18958
|
-
render: () => /* @__PURE__ */ jsxRuntimeExports.jsx(AnnotationsTab, { annotations })
|
|
18959
|
-
};
|
|
18960
|
-
tabs.push(annotationsTab);
|
|
18961
|
-
}
|
|
18962
18380
|
if (showSourcesFirst) {
|
|
18963
18381
|
const sourceTabIndex = tabs.indexOf(sourceTab);
|
|
18964
18382
|
tabs.splice(sourceTabIndex, 1);
|
|
@@ -18978,116 +18396,139 @@ const Workbench = ({ model, showSourcesFirst, rootDir, fallbackLocation, initial
|
|
|
18978
18396
|
time = model.endTime - model.startTime;
|
|
18979
18397
|
else if (model && model.wallTime)
|
|
18980
18398
|
time = Date.now() - model.wallTime;
|
|
18981
|
-
|
|
18982
|
-
id: "actions",
|
|
18983
|
-
title: "Actions",
|
|
18984
|
-
component: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vbox", children: [
|
|
18985
|
-
status && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "workbench-run-status", children: [
|
|
18986
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: clsx("codicon", testStatusIcon(status)) }),
|
|
18987
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: testStatusText(status) }),
|
|
18988
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "spacer" }),
|
|
18989
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "workbench-run-duration", children: time ? msToString(time) : "" })
|
|
18990
|
-
] }),
|
|
18991
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18992
|
-
ActionList,
|
|
18993
|
-
{
|
|
18994
|
-
sdkLanguage,
|
|
18995
|
-
actions: filteredActions,
|
|
18996
|
-
selectedAction: model ? selectedAction : void 0,
|
|
18997
|
-
selectedTime,
|
|
18998
|
-
setSelectedTime,
|
|
18999
|
-
onSelected: onActionSelected,
|
|
19000
|
-
onHighlighted: setHighlightedAction,
|
|
19001
|
-
revealConsole: () => selectPropertiesTab("console"),
|
|
19002
|
-
isLive
|
|
19003
|
-
}
|
|
19004
|
-
)
|
|
19005
|
-
] })
|
|
19006
|
-
};
|
|
19007
|
-
const metadataTab = {
|
|
19008
|
-
id: "metadata",
|
|
19009
|
-
title: "Metadata",
|
|
19010
|
-
component: /* @__PURE__ */ jsxRuntimeExports.jsx(MetadataView, { model })
|
|
19011
|
-
};
|
|
19012
|
-
const settingsTab = {
|
|
19013
|
-
id: "settings",
|
|
19014
|
-
title: "Settings",
|
|
19015
|
-
component: /* @__PURE__ */ jsxRuntimeExports.jsx(SettingsView, { settings: [{ value: showRouteActions, set: setShowRouteActions, title: "Show route actions" }] })
|
|
19016
|
-
};
|
|
19017
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vbox workbench", ...inert ? { inert: "true" } : {}, children: [
|
|
18399
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vbox workbench", children: [
|
|
19018
18400
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19019
18401
|
Timeline,
|
|
19020
18402
|
{
|
|
19021
18403
|
model,
|
|
19022
|
-
consoleEntries: consoleModel.entries,
|
|
19023
18404
|
boundaries,
|
|
19024
18405
|
highlightedAction,
|
|
19025
18406
|
highlightedEntry,
|
|
19026
|
-
highlightedConsoleEntry: highlightedConsoleMessage,
|
|
19027
18407
|
onSelected: onActionSelected,
|
|
19028
18408
|
sdkLanguage,
|
|
19029
18409
|
selectedTime,
|
|
19030
18410
|
setSelectedTime
|
|
19031
18411
|
}
|
|
19032
18412
|
),
|
|
19033
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
19034
|
-
SplitView,
|
|
19035
|
-
|
|
19036
|
-
|
|
19037
|
-
orientation: sidebarLocation === "bottom" ? "vertical" : "horizontal",
|
|
19038
|
-
settingName: "propertiesSidebar",
|
|
19039
|
-
main: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19040
|
-
SplitView,
|
|
18413
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SplitView, { sidebarSize: 250, orientation: sidebarLocation === "bottom" ? "vertical" : "horizontal", settingName: "propertiesSidebar", children: [
|
|
18414
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SplitView, { sidebarSize: 250, orientation: "horizontal", sidebarIsFirst: true, settingName: "actionListSidebar", children: [
|
|
18415
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18416
|
+
SnapshotTab,
|
|
19041
18417
|
{
|
|
19042
|
-
|
|
19043
|
-
|
|
19044
|
-
|
|
19045
|
-
|
|
19046
|
-
|
|
19047
|
-
|
|
19048
|
-
|
|
19049
|
-
action: activeAction,
|
|
19050
|
-
sdkLanguage,
|
|
19051
|
-
testIdAttributeName: (model == null ? void 0 : model.testIdAttributeName) || "data-testid",
|
|
19052
|
-
isInspecting,
|
|
19053
|
-
setIsInspecting,
|
|
19054
|
-
highlightedLocator,
|
|
19055
|
-
setHighlightedLocator: locatorPicked,
|
|
19056
|
-
openPage
|
|
19057
|
-
}
|
|
19058
|
-
),
|
|
19059
|
-
sidebar: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19060
|
-
TabbedPane,
|
|
19061
|
-
{
|
|
19062
|
-
tabs: showSettings ? [actionsTab, metadataTab, settingsTab] : [actionsTab, metadataTab],
|
|
19063
|
-
selectedTab: selectedNavigatorTab,
|
|
19064
|
-
setSelectedTab: setSelectedNavigatorTab
|
|
19065
|
-
}
|
|
19066
|
-
)
|
|
18418
|
+
action: activeAction,
|
|
18419
|
+
sdkLanguage,
|
|
18420
|
+
testIdAttributeName: (model == null ? void 0 : model.testIdAttributeName) || "data-testid",
|
|
18421
|
+
isInspecting,
|
|
18422
|
+
setIsInspecting,
|
|
18423
|
+
highlightedLocator,
|
|
18424
|
+
setHighlightedLocator: locatorPicked
|
|
19067
18425
|
}
|
|
19068
18426
|
),
|
|
19069
|
-
|
|
18427
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
19070
18428
|
TabbedPane,
|
|
19071
18429
|
{
|
|
19072
|
-
tabs
|
|
19073
|
-
|
|
19074
|
-
|
|
19075
|
-
|
|
19076
|
-
|
|
19077
|
-
|
|
19078
|
-
|
|
19079
|
-
|
|
19080
|
-
|
|
18430
|
+
tabs: [
|
|
18431
|
+
{
|
|
18432
|
+
id: "actions",
|
|
18433
|
+
title: "Actions",
|
|
18434
|
+
component: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "vbox", children: [
|
|
18435
|
+
status && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "workbench-run-status", children: [
|
|
18436
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `codicon ${testStatusIcon(status)}` }),
|
|
18437
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: testStatusText(status) }),
|
|
18438
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "spacer" }),
|
|
18439
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "workbench-run-duration", children: time ? msToString(time) : "" })
|
|
18440
|
+
] }),
|
|
18441
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18442
|
+
ActionList,
|
|
18443
|
+
{
|
|
18444
|
+
sdkLanguage,
|
|
18445
|
+
actions: (model == null ? void 0 : model.actions) || [],
|
|
18446
|
+
selectedAction: model ? selectedAction : void 0,
|
|
18447
|
+
selectedTime,
|
|
18448
|
+
setSelectedTime,
|
|
18449
|
+
onSelected: onActionSelected,
|
|
18450
|
+
onHighlighted: setHighlightedAction,
|
|
18451
|
+
revealConsole: () => selectPropertiesTab("console"),
|
|
18452
|
+
isLive
|
|
18453
|
+
}
|
|
18454
|
+
)
|
|
18455
|
+
] })
|
|
18456
|
+
},
|
|
18457
|
+
{
|
|
18458
|
+
id: "metadata",
|
|
18459
|
+
title: "Metadata",
|
|
18460
|
+
component: /* @__PURE__ */ jsxRuntimeExports.jsx(MetadataView, { model })
|
|
18461
|
+
}
|
|
19081
18462
|
],
|
|
19082
|
-
|
|
18463
|
+
selectedTab: selectedNavigatorTab,
|
|
18464
|
+
setSelectedTab: setSelectedNavigatorTab
|
|
19083
18465
|
}
|
|
19084
18466
|
)
|
|
19085
|
-
}
|
|
19086
|
-
|
|
18467
|
+
] }),
|
|
18468
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
18469
|
+
TabbedPane,
|
|
18470
|
+
{
|
|
18471
|
+
tabs,
|
|
18472
|
+
selectedTab: selectedPropertiesTab,
|
|
18473
|
+
setSelectedTab: selectPropertiesTab,
|
|
18474
|
+
leftToolbar: [
|
|
18475
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ToolbarButton, { title: "Pick locator", icon: "target", toggled: isInspecting, onClick: () => {
|
|
18476
|
+
if (!isInspecting)
|
|
18477
|
+
selectPropertiesTab("inspector");
|
|
18478
|
+
setIsInspecting(!isInspecting);
|
|
18479
|
+
} })
|
|
18480
|
+
],
|
|
18481
|
+
rightToolbar: [
|
|
18482
|
+
sidebarLocation === "bottom" ? /* @__PURE__ */ jsxRuntimeExports.jsx(ToolbarButton, { title: "Dock to right", icon: "layout-sidebar-right-off", onClick: () => {
|
|
18483
|
+
setSidebarLocation("right");
|
|
18484
|
+
} }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ToolbarButton, { title: "Dock to bottom", icon: "layout-panel-off", onClick: () => {
|
|
18485
|
+
setSidebarLocation("bottom");
|
|
18486
|
+
} })
|
|
18487
|
+
],
|
|
18488
|
+
mode: sidebarLocation === "bottom" ? "default" : "select"
|
|
18489
|
+
}
|
|
18490
|
+
)
|
|
18491
|
+
] })
|
|
19087
18492
|
] });
|
|
19088
18493
|
};
|
|
18494
|
+
let lastId = 0;
|
|
18495
|
+
let _ws;
|
|
18496
|
+
const callbacks = /* @__PURE__ */ new Map();
|
|
18497
|
+
async function connect(options) {
|
|
18498
|
+
const guid = new URLSearchParams(window.location.search).get("ws");
|
|
18499
|
+
const ws = new WebSocket(`${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.hostname}:${window.location.port}/${guid}`);
|
|
18500
|
+
await new Promise((f2) => ws.addEventListener("open", f2));
|
|
18501
|
+
ws.addEventListener("close", options.onClose);
|
|
18502
|
+
ws.addEventListener("message", (event) => {
|
|
18503
|
+
const message = JSON.parse(event.data);
|
|
18504
|
+
const { id: id2, result, error, method, params } = message;
|
|
18505
|
+
if (id2) {
|
|
18506
|
+
const callback = callbacks.get(id2);
|
|
18507
|
+
if (!callback)
|
|
18508
|
+
return;
|
|
18509
|
+
callbacks.delete(id2);
|
|
18510
|
+
if (error)
|
|
18511
|
+
callback.reject(new Error(error));
|
|
18512
|
+
else
|
|
18513
|
+
callback.resolve(result);
|
|
18514
|
+
} else {
|
|
18515
|
+
options.onEvent(method, params);
|
|
18516
|
+
}
|
|
18517
|
+
});
|
|
18518
|
+
_ws = ws;
|
|
18519
|
+
setInterval(() => sendMessage("ping").catch(() => {
|
|
18520
|
+
}), 3e4);
|
|
18521
|
+
return sendMessage;
|
|
18522
|
+
}
|
|
18523
|
+
const sendMessage = async (method, params) => {
|
|
18524
|
+
const id2 = ++lastId;
|
|
18525
|
+
const message = { id: id2, method, params };
|
|
18526
|
+
_ws.send(JSON.stringify(message));
|
|
18527
|
+
return new Promise((resolve, reject) => {
|
|
18528
|
+
callbacks.set(id2, { resolve, reject });
|
|
18529
|
+
});
|
|
18530
|
+
};
|
|
19089
18531
|
export {
|
|
19090
|
-
Expandable as E,
|
|
19091
18532
|
MultiTraceModel as M,
|
|
19092
18533
|
React as R,
|
|
19093
18534
|
SplitView as S,
|
|
@@ -19095,25 +18536,29 @@ export {
|
|
|
19095
18536
|
Workbench as W,
|
|
19096
18537
|
__vitePreload as _,
|
|
19097
18538
|
applyTheme as a,
|
|
19098
|
-
|
|
19099
|
-
|
|
19100
|
-
|
|
19101
|
-
|
|
19102
|
-
|
|
19103
|
-
|
|
19104
|
-
|
|
19105
|
-
|
|
18539
|
+
reactDomExports as b,
|
|
18540
|
+
connect as c,
|
|
18541
|
+
currentTheme as d,
|
|
18542
|
+
addThemeListener as e,
|
|
18543
|
+
removeThemeListener as f,
|
|
18544
|
+
useSetting as g,
|
|
18545
|
+
Toolbar as h,
|
|
18546
|
+
testStatusIcon as i,
|
|
19106
18547
|
jsxRuntimeExports as j,
|
|
19107
18548
|
idForAction as k,
|
|
19108
|
-
|
|
18549
|
+
TreeView as l,
|
|
19109
18550
|
msToString as m,
|
|
19110
|
-
|
|
19111
|
-
|
|
19112
|
-
commonjsGlobal as p,
|
|
19113
|
-
getDefaultExportFromCjs as q,
|
|
18551
|
+
commonjsGlobal as n,
|
|
18552
|
+
getDefaultExportFromCjs as o,
|
|
19114
18553
|
reactExports as r,
|
|
19115
18554
|
settings as s,
|
|
19116
18555
|
toggleTheme as t,
|
|
19117
18556
|
useMeasure as u
|
|
19118
18557
|
};
|
|
19119
|
-
|
|
18558
|
+
function __vite__mapDeps(indexes) {
|
|
18559
|
+
if (!__vite__mapDeps.viteFileDeps) {
|
|
18560
|
+
__vite__mapDeps.viteFileDeps = ["./codeMirrorModule-uWDlVSQz.js","../codeMirrorModule.svF_VrcJ.css"]
|
|
18561
|
+
}
|
|
18562
|
+
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
18563
|
+
}
|
|
18564
|
+
//# sourceMappingURL=wsPort-peeLnQhT.js.map
|