@browserless.io/browserless 2.2.0-beta-8 → 2.2.0
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/CHANGELOG.md +21 -2
- package/bin/browserless.js +1 -1
- package/bin/scaffold/README.md +8 -7
- package/build/browserless.js +7 -6
- package/build/browsers/chrome.cdp.d.ts +6 -0
- package/build/browsers/chrome.cdp.js +6 -0
- package/build/browsers/chrome.playwright.d.ts +6 -0
- package/build/browsers/chrome.playwright.js +6 -0
- package/build/browsers/{cdp-chromium.d.ts → chromium.cdp.d.ts} +3 -2
- package/build/browsers/{cdp-chromium.js → chromium.cdp.js} +16 -10
- package/build/browsers/{playwright-chromium.d.ts → chromium.playwright.d.ts} +3 -2
- package/build/browsers/{playwright-chromium.js → chromium.playwright.js} +6 -5
- package/build/browsers/{playwright-firefox.d.ts → firefox.playwright.d.ts} +2 -2
- package/build/browsers/{playwright-firefox.js → firefox.playwright.js} +4 -4
- package/build/browsers/index.d.ts +20 -10
- package/build/browsers/index.js +110 -11
- package/build/browsers/{playwright-webkit.d.ts → webkit.playwright.d.ts} +2 -2
- package/build/browsers/{playwright-webkit.js → webkit.playwright.js} +4 -4
- package/build/data/selectors.json +1 -1
- package/build/exports.d.ts +6 -4
- package/build/exports.js +6 -4
- package/build/hooks.d.ts +4 -5
- package/build/hooks.js +4 -6
- package/build/http.d.ts +22 -1
- package/build/http.js +21 -0
- package/build/router.js +19 -3
- package/build/routes/{chromium/http/content-post.body.json → chrome/http/content.post.body.json} +8 -8
- package/build/routes/chrome/http/content.post.d.ts +7 -0
- package/build/routes/chrome/http/content.post.js +6 -0
- package/build/routes/chrome/http/download.post.d.ts +7 -0
- package/build/routes/chrome/http/download.post.js +6 -0
- package/build/routes/chrome/http/function.post.d.ts +7 -0
- package/build/routes/chrome/http/function.post.js +6 -0
- package/build/routes/chrome/http/json-list.get.d.ts +1 -0
- package/build/routes/chrome/http/json-list.get.js +1 -0
- package/build/routes/chrome/http/json-new.put.d.ts +1 -0
- package/build/routes/chrome/http/json-new.put.js +1 -0
- package/build/routes/chrome/http/json-protocol.get.d.ts +1 -0
- package/build/routes/chrome/http/json-protocol.get.js +1 -0
- package/build/routes/chrome/http/json-version.get.d.ts +1 -0
- package/build/routes/chrome/http/json-version.get.js +1 -0
- package/build/routes/chrome/http/json-version.get.response.json +44 -0
- package/build/routes/{chromium/http/pdf-post.body.json → chrome/http/pdf.post.body.json} +8 -8
- package/build/routes/chrome/http/pdf.post.d.ts +7 -0
- package/build/routes/chrome/http/pdf.post.js +6 -0
- package/build/routes/chrome/http/performance.post.d.ts +7 -0
- package/build/routes/chrome/http/performance.post.js +6 -0
- package/build/routes/{chromium/http/scrape-post.body.json → chrome/http/scrape.post.body.json} +8 -8
- package/build/routes/chrome/http/scrape.post.d.ts +7 -0
- package/build/routes/chrome/http/scrape.post.js +6 -0
- package/build/routes/{chromium/http/screenshot-post.body.json → chrome/http/screenshot.post.body.json} +8 -8
- package/build/routes/chrome/http/screenshot.post.d.ts +7 -0
- package/build/routes/chrome/http/screenshot.post.js +6 -0
- package/build/routes/chrome/tests/content.spec.js +311 -0
- package/build/routes/chrome/tests/download.spec.js +67 -0
- package/build/routes/chrome/tests/function.spec.d.ts +1 -0
- package/build/routes/chrome/tests/function.spec.js +245 -0
- package/build/routes/chrome/tests/json-version.spec.d.ts +1 -0
- package/build/routes/chrome/tests/json-version.spec.js +37 -0
- package/build/routes/chrome/tests/page-websocket.spec.d.ts +1 -0
- package/build/routes/chrome/tests/page-websocket.spec.js +97 -0
- package/build/routes/chrome/tests/pdf.spec.d.ts +1 -0
- package/build/routes/chrome/tests/pdf.spec.js +333 -0
- package/build/routes/chrome/tests/performance.spec.d.ts +1 -0
- package/build/routes/chrome/tests/performance.spec.js +124 -0
- package/build/routes/chrome/tests/scrape.spec.d.ts +1 -0
- package/build/routes/chrome/tests/scrape.spec.js +354 -0
- package/build/routes/chrome/tests/screenshot.spec.d.ts +1 -0
- package/build/routes/chrome/tests/screenshot.spec.js +339 -0
- package/build/routes/chrome/tests/websocket.spec.d.ts +1 -0
- package/build/routes/chrome/tests/websocket.spec.js +371 -0
- package/build/routes/chrome/ws/browser.d.ts +6 -0
- package/build/routes/chrome/ws/browser.js +5 -0
- package/build/routes/chrome/ws/cdp.d.ts +7 -0
- package/build/routes/chrome/ws/cdp.js +6 -0
- package/build/routes/chrome/ws/cdp.query.json +120 -0
- package/build/routes/chrome/ws/page.d.ts +6 -0
- package/build/routes/chrome/ws/page.js +5 -0
- package/build/routes/chrome/ws/page.query.json +120 -0
- package/build/routes/chrome/ws/playwright.d.ts +7 -0
- package/build/routes/chrome/ws/playwright.js +6 -0
- package/build/routes/chromium/http/content.post.body.json +510 -0
- package/build/routes/chromium/http/content.post.d.ts +1 -0
- package/build/routes/chromium/http/content.post.js +1 -0
- package/build/routes/chromium/http/content.post.query.json +183 -0
- package/build/routes/chromium/http/content.post.response.json +5 -0
- package/build/routes/chromium/http/download.post.body.json +32 -0
- package/build/routes/chromium/http/download.post.d.ts +1 -0
- package/build/routes/chromium/http/download.post.js +1 -0
- package/build/routes/chromium/http/download.post.query.json +120 -0
- package/build/routes/chromium/http/download.post.response.json +4 -0
- package/build/routes/chromium/http/function.post.body.json +32 -0
- package/build/routes/chromium/http/function.post.d.ts +1 -0
- package/build/routes/chromium/http/function.post.js +1 -0
- package/build/routes/chromium/http/function.post.query.json +120 -0
- package/build/routes/chromium/http/function.post.response.json +4 -0
- package/build/routes/chromium/http/json-list.get.d.ts +1 -0
- package/build/routes/chromium/http/json-list.get.js +1 -0
- package/build/routes/chromium/http/json-list.get.response.json +52 -0
- package/build/routes/chromium/http/json-new.put.d.ts +1 -0
- package/build/routes/chromium/http/json-new.put.js +1 -0
- package/build/routes/chromium/http/json-new.put.response.json +44 -0
- package/build/routes/chromium/http/json-protocol.get.d.ts +1 -0
- package/build/routes/chromium/http/json-protocol.get.js +1 -0
- package/build/routes/chromium/http/json-protocol.get.response.json +6 -0
- package/build/routes/chromium/http/json-version.get.d.ts +1 -0
- package/build/routes/chromium/http/json-version.get.js +1 -0
- package/build/routes/chromium/http/json-version.get.response.json +44 -0
- package/build/routes/chromium/http/pdf.post.body.json +654 -0
- package/build/routes/chromium/http/pdf.post.d.ts +1 -0
- package/build/routes/chromium/http/pdf.post.js +1 -0
- package/build/routes/chromium/http/pdf.post.query.json +120 -0
- package/build/routes/chromium/http/pdf.post.response.json +5 -0
- package/build/routes/chromium/http/performance.post.body.json +26 -0
- package/build/routes/chromium/http/performance.post.d.ts +1 -0
- package/build/routes/chromium/http/performance.post.js +1 -0
- package/build/routes/chromium/http/performance.post.query.json +120 -0
- package/build/routes/chromium/http/performance.post.response.json +7 -0
- package/build/routes/chromium/http/scrape.post.body.json +557 -0
- package/build/routes/chromium/http/scrape.post.d.ts +1 -0
- package/build/routes/chromium/http/scrape.post.js +1 -0
- package/build/routes/chromium/http/scrape.post.query.json +183 -0
- package/build/routes/chromium/http/scrape.post.response.json +309 -0
- package/build/routes/chromium/http/screenshot.post.body.json +600 -0
- package/build/routes/chromium/http/screenshot.post.d.ts +1 -0
- package/build/routes/chromium/http/screenshot.post.js +1 -0
- package/build/routes/chromium/http/screenshot.post.query.json +120 -0
- package/build/routes/chromium/http/screenshot.post.response.json +5 -0
- package/build/routes/chromium/tests/content.spec.js +16 -16
- package/build/routes/chromium/tests/download.spec.js +3 -3
- package/build/routes/chromium/tests/function.spec.js +10 -10
- package/build/routes/chromium/tests/page-websocket.spec.d.ts +1 -0
- package/build/routes/chromium/tests/page-websocket.spec.js +97 -0
- package/build/routes/chromium/tests/pdf.spec.js +16 -16
- package/build/routes/chromium/tests/performance.spec.js +7 -7
- package/build/routes/chromium/tests/scrape.spec.js +15 -15
- package/build/routes/chromium/tests/screenshot.spec.js +17 -17
- package/build/routes/chromium/tests/websocket.spec.js +31 -37
- package/build/routes/chromium/ws/browser.d.ts +1 -16
- package/build/routes/chromium/ws/browser.js +1 -10
- package/build/routes/chromium/ws/cdp.d.ts +1 -0
- package/build/routes/chromium/ws/cdp.js +1 -0
- package/build/routes/chromium/ws/cdp.query.json +120 -0
- package/build/routes/chromium/ws/page.d.ts +1 -16
- package/build/routes/chromium/ws/page.js +1 -10
- package/build/routes/chromium/ws/playwright.d.ts +1 -0
- package/build/routes/chromium/ws/playwright.js +1 -0
- package/build/routes/firefox/ws/{playwright-firefox.d.ts → playwright.d.ts} +5 -5
- package/build/routes/firefox/ws/{playwright-firefox.js → playwright.js} +4 -4
- package/build/routes/management/http/{sessions-get.response.json → sessions.get.response.json} +11 -1
- package/build/routes/management/http/{static-get.js → static.get.js} +2 -2
- package/build/routes/webkit/ws/{playwright-webkit.d.ts → playwright.d.ts} +5 -5
- package/build/routes/webkit/ws/{playwright-webkit.js → playwright.js} +4 -4
- package/build/routes/webkit/ws/playwright.query.json +100 -0
- package/build/{routes/chromium/ws/cdp-chromium.d.ts → shared/browser.ws.d.ts} +4 -4
- package/build/shared/browser.ws.js +12 -0
- package/build/{routes/chromium/ws/playwright-chromium.d.ts → shared/chromium.playwright.ws.d.ts} +4 -4
- package/build/{routes/chromium/ws/playwright-chromium.js → shared/chromium.playwright.ws.js} +6 -3
- package/build/shared/chromium.ws.d.ts +16 -0
- package/build/shared/chromium.ws.js +10 -0
- package/build/{routes/chromium/http/content-post.d.ts → shared/content.http.d.ts} +3 -3
- package/build/{routes/chromium/http/content-post.js → shared/content.http.js} +3 -3
- package/build/{routes/chromium/http/download-post.d.ts → shared/download.http.d.ts} +3 -3
- package/build/{routes/chromium/http/download-post.js → shared/download.http.js} +4 -4
- package/build/{routes/chromium/http/function-post.d.ts → shared/function.http.d.ts} +3 -3
- package/build/{routes/chromium/http/function-post.js → shared/function.http.js} +4 -4
- package/build/{routes/chromium/http/json-new.d.ts → shared/json-list.http.d.ts} +2 -3
- package/build/{routes/chromium/http/json-list.js → shared/json-list.http.js} +5 -8
- package/build/{routes/chromium/http/json-list.d.ts → shared/json-new.http.d.ts} +2 -3
- package/build/shared/json-new.http.js +34 -0
- package/build/{routes/chromium/http/json-protocol-get.js → shared/json-protocol.http.js} +2 -2
- package/build/{routes/chromium/http/json-version-get.js → shared/json-version.http.js} +3 -3
- package/build/shared/page.ws.d.ts +16 -0
- package/build/shared/page.ws.js +13 -0
- package/build/{routes/chromium/http/pdf-post.d.ts → shared/pdf.http.d.ts} +3 -3
- package/build/{routes/chromium/http/pdf-post.js → shared/pdf.http.js} +3 -3
- package/build/{routes/chromium/http/performance.d.ts → shared/performance.http.d.ts} +3 -3
- package/build/{routes/chromium/http/performance.js → shared/performance.http.js} +4 -4
- package/build/{routes/chromium/http/scrape-post.d.ts → shared/scrape.http.d.ts} +3 -3
- package/build/{routes/chromium/http/scrape-post.js → shared/scrape.http.js} +3 -3
- package/build/{routes/chromium/http/screenshot-post.d.ts → shared/screenshot.http.d.ts} +3 -3
- package/build/{routes/chromium/http/screenshot-post.js → shared/screenshot.http.js} +3 -3
- package/build/shared/utils/performance/child.d.ts +1 -0
- package/build/{routes/chromium → shared}/utils/performance/main.js +1 -1
- package/build/shared/utils/performance/types.js +1 -0
- package/build/shim.js +2 -1
- package/build/types.d.ts +10 -8
- package/build/utils.d.ts +8 -3
- package/build/utils.js +24 -11
- package/docker/base/Dockerfile +1 -1
- package/docker/chrome/Dockerfile +4 -4
- package/docker/chromium/.dockerignore +16 -0
- package/docker/chromium/Dockerfile +40 -0
- package/docker/firefox/Dockerfile +1 -1
- package/docker/multi/Dockerfile +13 -1
- package/docker/webkit/Dockerfile +1 -1
- package/extensions/ublock/3p-filters.html +1 -1
- package/extensions/ublock/_locales/ar/messages.json +4 -0
- package/extensions/ublock/_locales/az/messages.json +4 -0
- package/extensions/ublock/_locales/be/messages.json +4 -0
- package/extensions/ublock/_locales/bg/messages.json +5 -1
- package/extensions/ublock/_locales/bn/messages.json +4 -0
- package/extensions/ublock/_locales/br_FR/messages.json +6 -2
- package/extensions/ublock/_locales/bs/messages.json +4 -0
- package/extensions/ublock/_locales/ca/messages.json +4 -0
- package/extensions/ublock/_locales/cs/messages.json +4 -0
- package/extensions/ublock/_locales/cv/messages.json +4 -0
- package/extensions/ublock/_locales/cy/messages.json +1294 -0
- package/extensions/ublock/_locales/da/messages.json +4 -0
- package/extensions/ublock/_locales/de/messages.json +5 -1
- package/extensions/ublock/_locales/el/messages.json +4 -0
- package/extensions/ublock/_locales/en/messages.json +4 -0
- package/extensions/ublock/_locales/en_GB/messages.json +4 -0
- package/extensions/ublock/_locales/eo/messages.json +9 -5
- package/extensions/ublock/_locales/es/messages.json +4 -0
- package/extensions/ublock/_locales/et/messages.json +4 -0
- package/extensions/ublock/_locales/eu/messages.json +8 -4
- package/extensions/ublock/_locales/fa/messages.json +4 -0
- package/extensions/ublock/_locales/fi/messages.json +4 -0
- package/extensions/ublock/_locales/fil/messages.json +4 -0
- package/extensions/ublock/_locales/fr/messages.json +4 -0
- package/extensions/ublock/_locales/fy/messages.json +4 -0
- package/extensions/ublock/_locales/gl/messages.json +4 -0
- package/extensions/ublock/_locales/gu/messages.json +4 -0
- package/extensions/ublock/_locales/he/messages.json +4 -0
- package/extensions/ublock/_locales/hi/messages.json +4 -0
- package/extensions/ublock/_locales/hr/messages.json +4 -0
- package/extensions/ublock/_locales/hu/messages.json +4 -0
- package/extensions/ublock/_locales/hy/messages.json +4 -0
- package/extensions/ublock/_locales/id/messages.json +5 -1
- package/extensions/ublock/_locales/it/messages.json +4 -0
- package/extensions/ublock/_locales/ja/messages.json +4 -0
- package/extensions/ublock/_locales/ka/messages.json +34 -30
- package/extensions/ublock/_locales/kk/messages.json +4 -0
- package/extensions/ublock/_locales/kn/messages.json +4 -0
- package/extensions/ublock/_locales/ko/messages.json +4 -0
- package/extensions/ublock/_locales/ku/messages.json +4 -0
- package/extensions/ublock/_locales/lt/messages.json +4 -0
- package/extensions/ublock/_locales/lv/messages.json +4 -0
- package/extensions/ublock/_locales/mk/messages.json +4 -0
- package/extensions/ublock/_locales/ml/messages.json +4 -0
- package/extensions/ublock/_locales/mr/messages.json +4 -0
- package/extensions/ublock/_locales/ms/messages.json +13 -9
- package/extensions/ublock/_locales/nb/messages.json +4 -0
- package/extensions/ublock/_locales/nl/messages.json +4 -0
- package/extensions/ublock/_locales/no/messages.json +4 -0
- package/extensions/ublock/_locales/oc/messages.json +4 -0
- package/extensions/ublock/_locales/pa/messages.json +4 -0
- package/extensions/ublock/_locales/pl/messages.json +5 -1
- package/extensions/ublock/_locales/pt_BR/messages.json +4 -0
- package/extensions/ublock/_locales/pt_PT/messages.json +4 -0
- package/extensions/ublock/_locales/ro/messages.json +5 -1
- package/extensions/ublock/_locales/ru/messages.json +4 -0
- package/extensions/ublock/_locales/si/messages.json +4 -0
- package/extensions/ublock/_locales/sk/messages.json +4 -0
- package/extensions/ublock/_locales/sl/messages.json +4 -0
- package/extensions/ublock/_locales/so/messages.json +4 -0
- package/extensions/ublock/_locales/sq/messages.json +4 -0
- package/extensions/ublock/_locales/sr/messages.json +4 -0
- package/extensions/ublock/_locales/sv/messages.json +4 -0
- package/extensions/ublock/_locales/sw/messages.json +4 -0
- package/extensions/ublock/_locales/ta/messages.json +4 -0
- package/extensions/ublock/_locales/te/messages.json +4 -0
- package/extensions/ublock/_locales/th/messages.json +12 -8
- package/extensions/ublock/_locales/tr/messages.json +4 -0
- package/extensions/ublock/_locales/uk/messages.json +4 -0
- package/extensions/ublock/_locales/ur/messages.json +4 -0
- package/extensions/ublock/_locales/vi/messages.json +4 -0
- package/extensions/ublock/_locales/zh_CN/messages.json +6 -2
- package/extensions/ublock/_locales/zh_TW/messages.json +6 -2
- package/extensions/ublock/assets/assets.json +11 -11
- package/extensions/ublock/assets/resources/scriptlets.js +660 -378
- package/extensions/ublock/assets/thirdparties/easylist/easylist.txt +7173 -3455
- package/extensions/ublock/assets/thirdparties/easylist/easyprivacy.txt +18829 -1918
- package/extensions/ublock/assets/thirdparties/pgl.yoyo.org/as/serverlist +21 -26
- package/extensions/ublock/assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat +118 -46
- package/extensions/ublock/assets/thirdparties/urlhaus-filter/urlhaus-filter-online.txt +710 -1117
- package/extensions/ublock/assets/ublock/badlists.txt +0 -4
- package/extensions/ublock/assets/ublock/badware.min.txt +116 -105
- package/extensions/ublock/assets/ublock/filters.min.txt +1443 -1097
- package/extensions/ublock/assets/ublock/privacy.min.txt +50 -31
- package/extensions/ublock/assets/ublock/quick-fixes.min.txt +97 -108
- package/extensions/ublock/assets/ublock/unbreak.min.txt +64 -21
- package/extensions/ublock/css/1p-filters.css +4 -0
- package/extensions/ublock/css/3p-filters.css +6 -4
- package/extensions/ublock/css/common.css +1 -1
- package/extensions/ublock/css/fa-icons.css +1 -0
- package/extensions/ublock/css/logger-ui.css +72 -52
- package/extensions/ublock/css/popup-fenix.css +1 -1
- package/extensions/ublock/img/fontawesome/fontawesome-defs.svg +1 -0
- package/extensions/ublock/js/3p-filters.js +3 -3
- package/extensions/ublock/js/assets.js +7 -4
- package/extensions/ublock/js/background.js +1 -3
- package/extensions/ublock/js/benchmarks.js +1 -0
- package/extensions/ublock/js/broadcast.js +12 -0
- package/extensions/ublock/js/click2load.js +2 -3
- package/extensions/ublock/js/codemirror/ubo-static-filtering.js +1 -0
- package/extensions/ublock/js/commands.js +10 -0
- package/extensions/ublock/js/contentscript-extra.js +13 -11
- package/extensions/ublock/js/contentscript.js +0 -31
- package/extensions/ublock/js/contextmenu.js +5 -1
- package/extensions/ublock/js/dyna-rules.js +83 -52
- package/extensions/ublock/js/fa-icons.js +1 -0
- package/extensions/ublock/js/filtering-context.js +0 -2
- package/extensions/ublock/js/i18n.js +1 -5
- package/extensions/ublock/js/logger-ui.js +71 -38
- package/extensions/ublock/js/logger.js +18 -14
- package/extensions/ublock/js/messaging.js +17 -5
- package/extensions/ublock/js/popup-fenix.js +6 -6
- package/extensions/ublock/js/scriptlet-filtering-core.js +14 -12
- package/extensions/ublock/js/scriptlet-filtering.js +149 -53
- package/extensions/ublock/js/scriptlets/scriptlet-loglevel-1.js +49 -0
- package/extensions/ublock/js/scriptlets/scriptlet-loglevel-2.js +49 -0
- package/extensions/ublock/js/scriptlets/should-inject-contentscript.js +1 -1
- package/extensions/ublock/js/static-dnr-filtering.js +4 -2
- package/extensions/ublock/js/static-filtering-parser.js +14 -8
- package/extensions/ublock/js/static-net-filtering.js +32 -30
- package/extensions/ublock/js/storage.js +18 -4
- package/extensions/ublock/js/traffic.js +3 -3
- package/extensions/ublock/js/ublock.js +1 -1
- package/extensions/ublock/js/vapi-background.js +15 -7
- package/extensions/ublock/logger-ui.html +18 -10
- package/extensions/ublock/manifest.json +4 -1
- package/extensions/ublock/web_accessible_resources/chartbeat.js +3 -0
- package/package.json +12 -11
- package/scripts/build-function.js +1 -1
- package/scripts/build-open-api.js +3 -2
- package/scripts/clean.js +6 -1
- package/scripts/install-debugger.js +20 -0
- package/scripts/install-devtools.js +40 -0
- package/src/browserless.ts +11 -9
- package/src/browsers/chrome.cdp.ts +10 -0
- package/src/browsers/chrome.playwright.ts +10 -0
- package/src/browsers/{cdp-chromium.ts → chromium.cdp.ts} +20 -13
- package/src/browsers/{playwright-chromium.ts → chromium.playwright.ts} +7 -6
- package/src/browsers/{playwright-firefox.ts → firefox.playwright.ts} +5 -5
- package/src/browsers/index.ts +160 -23
- package/src/browsers/{playwright-webkit.ts → webkit.playwright.ts} +5 -5
- package/src/exports.ts +6 -4
- package/src/hooks.ts +4 -12
- package/src/http.ts +21 -0
- package/src/router.ts +21 -5
- package/src/routes/chrome/http/content.post.ts +14 -0
- package/src/routes/chrome/http/download.post.ts +14 -0
- package/src/routes/chrome/http/function.post.ts +14 -0
- package/src/routes/chrome/http/json-list.get.ts +1 -0
- package/src/routes/chrome/http/json-new.put.ts +1 -0
- package/src/routes/chrome/http/json-protocol.get.ts +1 -0
- package/src/routes/chrome/http/json-version.get.ts +1 -0
- package/src/routes/chrome/http/pdf.post.ts +14 -0
- package/src/routes/chrome/http/performance.post.ts +14 -0
- package/src/routes/chrome/http/scrape.post.ts +14 -0
- package/src/routes/chrome/http/screenshot.post.ts +14 -0
- package/src/routes/chrome/tests/content.spec.ts +375 -0
- package/src/routes/chrome/tests/download.spec.ts +77 -0
- package/src/routes/chrome/tests/function.spec.ts +282 -0
- package/src/routes/chrome/tests/json-version.spec.ts +52 -0
- package/src/routes/chrome/tests/page-websocket.spec.ts +129 -0
- package/src/routes/chrome/tests/pdf.spec.ts +380 -0
- package/src/routes/chrome/tests/performance.spec.ts +155 -0
- package/src/routes/chrome/tests/scrape.spec.ts +417 -0
- package/src/routes/chrome/tests/screenshot.spec.ts +387 -0
- package/src/routes/chrome/tests/websocket.spec.ts +491 -0
- package/src/routes/chrome/ws/browser.ts +8 -0
- package/src/routes/chrome/ws/cdp.ts +12 -0
- package/src/routes/chrome/ws/page.ts +8 -0
- package/src/routes/chrome/ws/playwright.ts +12 -0
- package/src/routes/chromium/http/content.post.ts +6 -0
- package/src/routes/chromium/http/download.post.ts +6 -0
- package/src/routes/chromium/http/function.post.ts +6 -0
- package/src/routes/chromium/http/json-list.get.ts +1 -0
- package/src/routes/chromium/http/json-new.put.ts +1 -0
- package/src/routes/chromium/http/json-protocol.get.ts +1 -0
- package/src/routes/chromium/http/json-version.get.ts +1 -0
- package/src/routes/chromium/http/pdf.post.ts +6 -0
- package/src/routes/chromium/http/performance.post.ts +6 -0
- package/src/routes/chromium/http/scrape.post.ts +6 -0
- package/src/routes/chromium/http/screenshot.post.ts +6 -0
- package/src/routes/chromium/tests/content.spec.ts +36 -28
- package/src/routes/chromium/tests/download.spec.ts +3 -3
- package/src/routes/chromium/tests/function.spec.ts +18 -15
- package/src/routes/chromium/tests/page-websocket.spec.ts +129 -0
- package/src/routes/chromium/tests/pdf.spec.ts +31 -26
- package/src/routes/chromium/tests/performance.spec.ts +46 -34
- package/src/routes/chromium/tests/scrape.spec.ts +23 -20
- package/src/routes/chromium/tests/screenshot.spec.ts +24 -24
- package/src/routes/chromium/tests/websocket.spec.ts +31 -40
- package/src/routes/chromium/ws/browser.ts +1 -29
- package/src/routes/chromium/ws/cdp.ts +1 -0
- package/src/routes/chromium/ws/page.ts +1 -29
- package/src/routes/chromium/ws/playwright.ts +4 -0
- package/src/routes/firefox/ws/{playwright-firefox.ts → playwright.ts} +5 -5
- package/src/routes/management/http/{static-get.ts → static.get.ts} +2 -2
- package/src/routes/webkit/ws/{playwright-webkit.ts → playwright.ts} +5 -5
- package/src/shared/browser.ws.ts +34 -0
- package/src/{routes/chromium/ws/playwright-chromium.ts → shared/chromium.playwright.ws.ts} +7 -4
- package/src/{routes/chromium/ws/cdp-chromium.ts → shared/chromium.ws.ts} +6 -6
- package/src/{routes/chromium/http/content-post.ts → shared/content.http.ts} +4 -4
- package/src/{routes/chromium/http/download-post.ts → shared/download.http.ts} +4 -4
- package/src/{routes/chromium/http/function-post.ts → shared/function.http.ts} +4 -4
- package/src/shared/json-list.http.ts +35 -0
- package/src/{routes/chromium/http/json-new.ts → shared/json-new.http.ts} +23 -7
- package/src/{routes/chromium/http/json-protocol-get.ts → shared/json-protocol.http.ts} +3 -5
- package/src/{routes/chromium/http/json-version-get.ts → shared/json-version.http.ts} +4 -5
- package/src/shared/page.ws.ts +35 -0
- package/src/{routes/chromium/http/pdf-post.ts → shared/pdf.http.ts} +4 -4
- package/src/{routes/chromium/http/performance.ts → shared/performance.http.ts} +4 -4
- package/src/{routes/chromium/http/scrape-post.ts → shared/scrape.http.ts} +4 -4
- package/src/{routes/chromium/http/screenshot-post.ts → shared/screenshot.http.ts} +4 -4
- package/src/{routes/chromium → shared}/utils/function/handler.ts +2 -2
- package/src/{routes/chromium → shared}/utils/performance/main.ts +1 -2
- package/src/shim.ts +2 -1
- package/src/types.ts +27 -20
- package/src/utils.ts +32 -14
- package/static/devtools/Images/accelerometer-back.svg +1 -0
- package/static/devtools/Images/accelerometer-bottom.png +0 -0
- package/static/devtools/Images/accelerometer-front.svg +1 -0
- package/static/devtools/Images/accelerometer-left.png +0 -0
- package/static/devtools/Images/accelerometer-right.png +0 -0
- package/static/devtools/Images/accelerometer-top.png +0 -0
- package/static/devtools/Images/baseline-icon.svg +1 -0
- package/static/devtools/Images/breaking_change_icon.svg +1 -0
- package/static/devtools/Images/checkboxCheckmark.svg +1 -0
- package/static/devtools/Images/checker.png +0 -0
- package/static/devtools/Images/chevrons.svg +1 -0
- package/static/devtools/Images/chromeDisabledSelect.png +0 -0
- package/static/devtools/Images/chromeDisabledSelect_2x.png +0 -0
- package/static/devtools/Images/chromeLeft.avif +0 -0
- package/static/devtools/Images/chromeMiddle.avif +0 -0
- package/static/devtools/Images/chromeRight.avif +0 -0
- package/static/devtools/Images/chromeSelect.svg +1 -0
- package/static/devtools/Images/chromeSelectDark.svg +1 -0
- package/static/devtools/Images/cssoverview_icons_2x.avif +0 -0
- package/static/devtools/Images/dropdown_7x6_icon.svg +1 -0
- package/static/devtools/Images/elements_panel_icon.svg +1 -0
- package/static/devtools/Images/errorWave.svg +1 -0
- package/static/devtools/Images/error_icon.svg +1 -0
- package/static/devtools/Images/feedback_thin_16x16_icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-center-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-end-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-space-around-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-space-between-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-space-evenly-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-start-icon.svg +1 -0
- package/static/devtools/Images/flex-align-content-stretch-icon.svg +1 -0
- package/static/devtools/Images/flex-align-items-center-icon.svg +1 -0
- package/static/devtools/Images/flex-align-items-flex-end-icon.svg +1 -0
- package/static/devtools/Images/flex-align-items-flex-start-icon.svg +1 -0
- package/static/devtools/Images/flex-align-items-stretch-icon.svg +1 -0
- package/static/devtools/Images/flex-align-self-center-icon.svg +1 -0
- package/static/devtools/Images/flex-align-self-flex-end-icon.svg +1 -0
- package/static/devtools/Images/flex-align-self-flex-start-icon.svg +1 -0
- package/static/devtools/Images/flex-align-self-stretch-icon.svg +1 -0
- package/static/devtools/Images/flex-direction-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-center-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-flex-end-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-flex-start-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-space-around-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-space-between-icon.svg +1 -0
- package/static/devtools/Images/flex-justify-content-space-evenly-icon.svg +1 -0
- package/static/devtools/Images/ic_checkmark_16x16.svg +3 -0
- package/static/devtools/Images/ic_delete_filter.svg +1 -0
- package/static/devtools/Images/ic_delete_list.svg +1 -0
- package/static/devtools/Images/ic_info_black_18dp.svg +1 -0
- package/static/devtools/Images/ic_page_next_16x16_icon.svg +1 -0
- package/static/devtools/Images/ic_page_prev_16x16_icon.svg +1 -0
- package/static/devtools/Images/ic_redo_16x16_icon.svg +1 -0
- package/static/devtools/Images/ic_show_node_16x16.svg +4 -0
- package/static/devtools/Images/ic_suggest_color.svg +6 -0
- package/static/devtools/Images/ic_undo_16x16_icon.svg +1 -0
- package/static/devtools/Images/ic_warning_black_18dp.svg +1 -0
- package/static/devtools/Images/issue-text-icon.svg +1 -0
- package/static/devtools/Images/largeIcons.svg +1 -0
- package/static/devtools/Images/lighthouse_logo.svg +1 -0
- package/static/devtools/Images/link_icon.svg +1 -0
- package/static/devtools/Images/mediumIcons.svg +1 -0
- package/static/devtools/Images/navigationControls.png +0 -0
- package/static/devtools/Images/navigationControls_2x.png +0 -0
- package/static/devtools/Images/network_panel_icon.svg +1 -0
- package/static/devtools/Images/nodeIcon.avif +0 -0
- package/static/devtools/Images/node_search_icon.svg +1 -0
- package/static/devtools/Images/popoverArrows.png +0 -0
- package/static/devtools/Images/profileGroupIcon.png +0 -0
- package/static/devtools/Images/profileIcon.png +0 -0
- package/static/devtools/Images/profileSmallIcon.png +0 -0
- package/static/devtools/Images/radioDot-dark-theme.png +0 -0
- package/static/devtools/Images/radioDot.png +0 -0
- package/static/devtools/Images/refresh_12x12_icon.svg +1 -0
- package/static/devtools/Images/resizeDiagonal.svg +1 -0
- package/static/devtools/Images/resizeHorizontal.svg +1 -0
- package/static/devtools/Images/resizeVertical.svg +1 -0
- package/static/devtools/Images/resourceCSSIcon.png +0 -0
- package/static/devtools/Images/resourceDocumentIcon.png +0 -0
- package/static/devtools/Images/resourceDocumentIconSmall.png +0 -0
- package/static/devtools/Images/resourceJSIcon.png +0 -0
- package/static/devtools/Images/resourcePlainIcon.png +0 -0
- package/static/devtools/Images/resourcePlainIconSmall.png +0 -0
- package/static/devtools/Images/resourcesTimeGraphIcon.avif +0 -0
- package/static/devtools/Images/searchNext.png +0 -0
- package/static/devtools/Images/searchPrev.png +0 -0
- package/static/devtools/Images/securityIcons.svg +1 -0
- package/static/devtools/Images/settings_14x14_icon.svg +1 -0
- package/static/devtools/Images/smallIcons.svg +1 -0
- package/static/devtools/Images/sources_panel_icon.svg +1 -0
- package/static/devtools/Images/speech.png +0 -0
- package/static/devtools/Images/toolbarResizerVertical.png +0 -0
- package/static/devtools/Images/touchCursor.png +0 -0
- package/static/devtools/Images/touchCursor_2x.png +0 -0
- package/static/devtools/Images/treeoutlineTriangles.svg +1 -0
- package/static/devtools/Images/warning_icon.svg +1 -0
- package/static/devtools/Images/whatsnew.avif +0 -0
- package/static/devtools/Tests.js +1654 -0
- package/static/devtools/accessibility/accessibility-legacy.js +1 -0
- package/static/devtools/accessibility/accessibility-meta.js +1 -0
- package/static/devtools/accessibility/accessibility.js +1 -0
- package/static/devtools/accessibility/accessibility_module.js +1 -0
- package/static/devtools/accessibility_test_runner/accessibility_test_runner.js +77 -0
- package/static/devtools/accessibility_test_runner/accessibility_test_runner_module.js +0 -0
- package/static/devtools/animation/animation-legacy.js +1 -0
- package/static/devtools/animation/animation-meta.js +1 -0
- package/static/devtools/animation/animation.js +1 -0
- package/static/devtools/animation/animation_module.js +1 -0
- package/static/devtools/application_test_runner/AppcacheTestRunner.js +220 -0
- package/static/devtools/application_test_runner/CacheStorageTestRunner.js +286 -0
- package/static/devtools/application_test_runner/IndexedDBTestRunner.js +476 -0
- package/static/devtools/application_test_runner/ResourceTreeTestRunner.js +99 -0
- package/static/devtools/application_test_runner/ResourcesTestRunner.js +167 -0
- package/static/devtools/application_test_runner/ServiceWorkersTestRunner.js +131 -0
- package/static/devtools/application_test_runner/application_test_runner.js +10 -0
- package/static/devtools/application_test_runner/application_test_runner_module.js +0 -0
- package/static/devtools/axe_core_test_runner/axe_core_test_runner.js +174 -0
- package/static/devtools/axe_core_test_runner/axe_core_test_runner_module.js +0 -0
- package/static/devtools/bindings/bindings-legacy.js +1 -0
- package/static/devtools/bindings/bindings.js +1 -0
- package/static/devtools/bindings_test_runner/AutomappingTestRunner.js +130 -0
- package/static/devtools/bindings_test_runner/BindingsTestRunner.js +238 -0
- package/static/devtools/bindings_test_runner/IsolatedFilesystemTestRunner.js +287 -0
- package/static/devtools/bindings_test_runner/OverridesTestRunner.js +26 -0
- package/static/devtools/bindings_test_runner/PersistenceTestRunner.js +109 -0
- package/static/devtools/bindings_test_runner/bindings_test_runner.js +9 -0
- package/static/devtools/bindings_test_runner/bindings_test_runner_module.js +0 -0
- package/static/devtools/browser_debugger/browser_debugger-legacy.js +1 -0
- package/static/devtools/browser_debugger/browser_debugger-meta.js +1 -0
- package/static/devtools/browser_debugger/browser_debugger.js +1 -0
- package/static/devtools/browser_debugger/browser_debugger_module.js +1 -0
- package/static/devtools/browser_sdk/browser_sdk-meta.js +1 -0
- package/static/devtools/browser_sdk/browser_sdk.js +1 -0
- package/static/devtools/changes/changes-legacy.js +1 -0
- package/static/devtools/changes/changes-meta.js +1 -0
- package/static/devtools/changes/changes.js +1 -0
- package/static/devtools/changes/changes_module.js +1 -0
- package/static/devtools/client_variations/client_variations.js +1 -0
- package/static/devtools/client_variations/client_variations_module.js +0 -0
- package/static/devtools/cm/cm.js +1 -0
- package/static/devtools/cm/cm_module.js +1 -0
- package/static/devtools/cm_headless/cm_headless.js +1 -0
- package/static/devtools/color_picker/color_picker-legacy.js +1 -0
- package/static/devtools/color_picker/color_picker.js +1 -0
- package/static/devtools/color_picker/color_picker_module.js +1 -0
- package/static/devtools/common/common-legacy.js +1 -0
- package/static/devtools/common/common.js +1 -0
- package/static/devtools/component_helpers/component_helpers.js +1 -0
- package/static/devtools/components/components-legacy.js +1 -0
- package/static/devtools/components/components.js +1 -0
- package/static/devtools/console/console-legacy.js +1 -0
- package/static/devtools/console/console-meta.js +1 -0
- package/static/devtools/console/console.js +6 -0
- package/static/devtools/console/console_module.js +1 -0
- package/static/devtools/console_counters/console_counters-legacy.js +1 -0
- package/static/devtools/console_counters/console_counters.js +1 -0
- package/static/devtools/console_test_runner/console_test_runner.js +696 -0
- package/static/devtools/console_test_runner/console_test_runner_module.js +0 -0
- package/static/devtools/cookie_table/cookie_table-legacy.js +1 -0
- package/static/devtools/cookie_table/cookie_table.js +1 -0
- package/static/devtools/cookie_table/cookie_table_module.js +1 -0
- package/static/devtools/coverage/coverage-legacy.js +1 -0
- package/static/devtools/coverage/coverage-meta.js +1 -0
- package/static/devtools/coverage/coverage.js +1 -0
- package/static/devtools/coverage/coverage_module.js +1 -0
- package/static/devtools/coverage_test_runner/coverage_test_runner.js +151 -0
- package/static/devtools/coverage_test_runner/coverage_test_runner_module.js +0 -0
- package/static/devtools/cpu_profiler_test_runner/cpu_profiler_test_runner.js +72 -0
- package/static/devtools/cpu_profiler_test_runner/cpu_profiler_test_runner_module.js +0 -0
- package/static/devtools/css_overview/css_overview-meta.js +1 -0
- package/static/devtools/css_overview/css_overview.js +146 -0
- package/static/devtools/css_overview/css_overview_module.js +1 -0
- package/static/devtools/data_grid/data_grid-legacy.js +1 -0
- package/static/devtools/data_grid/data_grid.js +1 -0
- package/static/devtools/data_grid/data_grid_module.js +1 -0
- package/static/devtools/data_grid_test_runner/data_grid_test_runner.js +78 -0
- package/static/devtools/data_grid_test_runner/data_grid_test_runner_module.js +0 -0
- package/static/devtools/developer_resources/developer_resources-legacy.js +1 -0
- package/static/devtools/developer_resources/developer_resources-meta.js +1 -0
- package/static/devtools/developer_resources/developer_resources.js +1 -0
- package/static/devtools/developer_resources/developer_resources_module.js +1 -0
- package/static/devtools/device_mode_test_runner/device_mode_test_runner.js +45 -0
- package/static/devtools/device_mode_test_runner/device_mode_test_runner_module.js +0 -0
- package/static/devtools/devtools_app.html +20 -0
- package/static/devtools/devtools_app.js +1 -0
- package/static/devtools/devtools_compatibility.js +1546 -0
- package/static/devtools/diff/diff-legacy.js +1 -0
- package/static/devtools/diff/diff.js +1 -0
- package/static/devtools/diff/diff_module.js +0 -0
- package/static/devtools/dom_extension/dom_extension.js +1 -0
- package/static/devtools/elements/elements-legacy.js +1 -0
- package/static/devtools/elements/elements-meta.js +1 -0
- package/static/devtools/elements/elements.js +469 -0
- package/static/devtools/elements/elements_module.js +1 -0
- package/static/devtools/elements_test_runner/EditDOMTestRunner.js +78 -0
- package/static/devtools/elements_test_runner/ElementsPanelShadowSelectionOnRefreshTestRunner.js +39 -0
- package/static/devtools/elements_test_runner/ElementsTestRunner.js +1280 -0
- package/static/devtools/elements_test_runner/SetOuterHTMLTestRunner.js +115 -0
- package/static/devtools/elements_test_runner/StylesUpdateLinksTestRunner.js +134 -0
- package/static/devtools/elements_test_runner/elements_test_runner.js +9 -0
- package/static/devtools/elements_test_runner/elements_test_runner_module.js +0 -0
- package/static/devtools/emulated_devices/emulated_devices_module.js +0 -0
- package/static/devtools/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPad-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPad-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
- package/static/devtools/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
- package/static/devtools/emulation/emulation-legacy.js +1 -0
- package/static/devtools/emulation/emulation-meta.js +1 -0
- package/static/devtools/emulation/emulation.js +1 -0
- package/static/devtools/event_listeners/event_listeners-legacy.js +1 -0
- package/static/devtools/event_listeners/event_listeners.js +1 -0
- package/static/devtools/event_listeners/event_listeners_module.js +1 -0
- package/static/devtools/extensions/extensions-legacy.js +1 -0
- package/static/devtools/extensions/extensions.js +1 -0
- package/static/devtools/extensions_test_runner/ExtensionsNetworkTestRunner.js +27 -0
- package/static/devtools/extensions_test_runner/ExtensionsTestRunner.js +68 -0
- package/static/devtools/extensions_test_runner/extensions_test_runner.js +6 -0
- package/static/devtools/extensions_test_runner/extensions_test_runner_module.js +0 -0
- package/static/devtools/formatter/formatter-legacy.js +1 -0
- package/static/devtools/formatter/formatter.js +1 -0
- package/static/devtools/formatter/formatter_module.js +0 -0
- package/static/devtools/formatter_worker/FormatterActions.js +1 -0
- package/static/devtools/formatter_worker/formatter_worker-entrypoint.js +1 -0
- package/static/devtools/formatter_worker/formatter_worker.js +1 -0
- package/static/devtools/har_importer/har_importer-legacy.js +1 -0
- package/static/devtools/har_importer/har_importer.js +1 -0
- package/static/devtools/har_importer/har_importer_module.js +0 -0
- package/static/devtools/heap_profiler_test_runner/heap_profiler_test_runner.js +740 -0
- package/static/devtools/heap_profiler_test_runner/heap_profiler_test_runner_module.js +0 -0
- package/static/devtools/heap_snapshot_model/heap_snapshot_model-legacy.js +1 -0
- package/static/devtools/heap_snapshot_model/heap_snapshot_model.js +1 -0
- package/static/devtools/heap_snapshot_model/heap_snapshot_model_module.js +0 -0
- package/static/devtools/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +1 -0
- package/static/devtools/heap_snapshot_worker/heap_snapshot_worker-legacy.js +1 -0
- package/static/devtools/heap_snapshot_worker/heap_snapshot_worker.js +1 -0
- package/static/devtools/heap_snapshot_worker/heap_snapshot_worker_module.js +0 -0
- package/static/devtools/help/help-legacy.js +1 -0
- package/static/devtools/help/help-meta.js +1 -0
- package/static/devtools/help/help.js +1 -0
- package/static/devtools/help/help_module.js +1 -0
- package/static/devtools/host/host-legacy.js +1 -0
- package/static/devtools/host/host.js +1 -0
- package/static/devtools/i18n/i18n.js +1 -0
- package/static/devtools/i18n/i18n_locales-tsconfig.json +8 -0
- package/static/devtools/i18n/locales/en-US.json +3566 -0
- package/static/devtools/inline_editor/inline_editor-legacy.js +1 -0
- package/static/devtools/inline_editor/inline_editor.js +203 -0
- package/static/devtools/inline_editor/inline_editor_module.js +1 -0
- package/static/devtools/input/input-legacy.js +1 -0
- package/static/devtools/input/input-meta.js +1 -0
- package/static/devtools/input/input.js +1 -0
- package/static/devtools/input/input_module.js +1 -0
- package/static/devtools/inspector.html +20 -0
- package/static/devtools/inspector.js +1 -0
- package/static/devtools/inspector_main/inspector_main-legacy.js +1 -0
- package/static/devtools/inspector_main/inspector_main-meta.js +1 -0
- package/static/devtools/inspector_main/inspector_main.js +1 -0
- package/static/devtools/integration_test_runner.html +14 -0
- package/static/devtools/integration_test_runner.js +2 -0
- package/static/devtools/issues/issues-legacy.js +1 -0
- package/static/devtools/issues/issues-meta.js +1 -0
- package/static/devtools/issues/issues.js +67 -0
- package/static/devtools/issues/issues_module.js +1 -0
- package/static/devtools/javascript_metadata/javascript_metadata-legacy.js +1 -0
- package/static/devtools/javascript_metadata/javascript_metadata.js +1 -0
- package/static/devtools/javascript_metadata/javascript_metadata_module.js +0 -0
- package/static/devtools/js_app.html +20 -0
- package/static/devtools/js_app.js +1 -0
- package/static/devtools/js_main/js_main-legacy.js +1 -0
- package/static/devtools/js_main/js_main.js +1 -0
- package/static/devtools/js_profiler/js_profiler-meta.js +1 -0
- package/static/devtools/js_profiler/js_profiler.js +1 -0
- package/static/devtools/js_profiler/js_profiler_module.js +0 -0
- package/static/devtools/layer_viewer/layer_viewer-legacy.js +1 -0
- package/static/devtools/layer_viewer/layer_viewer.js +1 -0
- package/static/devtools/layer_viewer/layer_viewer_module.js +1 -0
- package/static/devtools/layers/layers-legacy.js +1 -0
- package/static/devtools/layers/layers-meta.js +1 -0
- package/static/devtools/layers/layers.js +1 -0
- package/static/devtools/layers/layers_module.js +0 -0
- package/static/devtools/layers_test_runner/layers_test_runner.js +156 -0
- package/static/devtools/layers_test_runner/layers_test_runner_module.js +0 -0
- package/static/devtools/lighthouse/lighthouse-legacy.js +1 -0
- package/static/devtools/lighthouse/lighthouse-meta.js +1 -0
- package/static/devtools/lighthouse/lighthouse.js +70 -0
- package/static/devtools/lighthouse/lighthouse_module.js +1 -0
- package/static/devtools/lighthouse_test_runner/lighthouse_test_runner.js +136 -0
- package/static/devtools/lighthouse_test_runner/lighthouse_test_runner_module.js +0 -0
- package/static/devtools/lighthouse_worker/LighthouseService.js +195 -0
- package/static/devtools/lighthouse_worker/lighthouse_worker.js +6 -0
- package/static/devtools/lighthouse_worker.js +1 -0
- package/static/devtools/linear_memory_inspector/linear_memory_inspector-legacy.js +1 -0
- package/static/devtools/linear_memory_inspector/linear_memory_inspector-meta.js +1 -0
- package/static/devtools/linear_memory_inspector/linear_memory_inspector.js +399 -0
- package/static/devtools/linear_memory_inspector/linear_memory_inspector_module.js +0 -0
- package/static/devtools/main/main-legacy.js +1 -0
- package/static/devtools/main/main.js +1 -0
- package/static/devtools/media/media-legacy.js +1 -0
- package/static/devtools/media/media-meta.js +1 -0
- package/static/devtools/media/media.js +1 -0
- package/static/devtools/media/media_module.js +1 -0
- package/static/devtools/mobile_throttling/mobile_throttling-legacy.js +1 -0
- package/static/devtools/mobile_throttling/mobile_throttling-meta.js +1 -0
- package/static/devtools/mobile_throttling/mobile_throttling.js +1 -0
- package/static/devtools/ndb_app.html +20 -0
- package/static/devtools/ndb_app.js +1 -0
- package/static/devtools/network/network-legacy.js +1 -0
- package/static/devtools/network/network-meta.js +1 -0
- package/static/devtools/network/network.js +72 -0
- package/static/devtools/network/network_module.js +1 -0
- package/static/devtools/network_test_runner/network_test_runner.js +280 -0
- package/static/devtools/network_test_runner/network_test_runner_module.js +0 -0
- package/static/devtools/node_app.html +20 -0
- package/static/devtools/node_app.js +1 -0
- package/static/devtools/node_debugger/node_debugger-meta.js +1 -0
- package/static/devtools/node_debugger/node_debugger.js +1 -0
- package/static/devtools/node_debugger/node_debugger_module.js +0 -0
- package/static/devtools/node_main/node_main-legacy.js +1 -0
- package/static/devtools/node_main/node_main-meta.js +1 -0
- package/static/devtools/node_main/node_main.js +1 -0
- package/static/devtools/object_ui/object_ui-legacy.js +1 -0
- package/static/devtools/object_ui/object_ui.js +3 -0
- package/static/devtools/object_ui/object_ui_module.js +1 -0
- package/static/devtools/perf_ui/perf_ui-legacy.js +1 -0
- package/static/devtools/perf_ui/perf_ui.js +152 -0
- package/static/devtools/perf_ui/perf_ui_module.js +1 -0
- package/static/devtools/performance_monitor/performance_monitor-legacy.js +1 -0
- package/static/devtools/performance_monitor/performance_monitor-meta.js +1 -0
- package/static/devtools/performance_monitor/performance_monitor.js +1 -0
- package/static/devtools/performance_monitor/performance_monitor_module.js +1 -0
- package/static/devtools/performance_test_runner/TimelineDataTestRunner.js +5375 -0
- package/static/devtools/performance_test_runner/TimelineTestRunner.js +446 -0
- package/static/devtools/performance_test_runner/performance_test_runner.js +6 -0
- package/static/devtools/performance_test_runner/performance_test_runner_module.js +0 -0
- package/static/devtools/persistence/persistence-legacy.js +1 -0
- package/static/devtools/persistence/persistence-meta.js +1 -0
- package/static/devtools/persistence/persistence.js +1 -0
- package/static/devtools/platform/platform.js +1 -0
- package/static/devtools/profiler/profiler-legacy.js +1 -0
- package/static/devtools/profiler/profiler-meta.js +1 -0
- package/static/devtools/profiler/profiler.js +8 -0
- package/static/devtools/profiler/profiler_module.js +1 -0
- package/static/devtools/protocol_client/protocol_client-legacy.js +1 -0
- package/static/devtools/protocol_client/protocol_client.js +1 -0
- package/static/devtools/protocol_monitor/protocol_monitor-legacy.js +1 -0
- package/static/devtools/protocol_monitor/protocol_monitor-meta.js +1 -0
- package/static/devtools/protocol_monitor/protocol_monitor.js +1 -0
- package/static/devtools/protocol_monitor/protocol_monitor_module.js +1 -0
- package/static/devtools/quick_open/quick_open-legacy.js +1 -0
- package/static/devtools/quick_open/quick_open.js +1 -0
- package/static/devtools/quick_open/quick_open_module.js +1 -0
- package/static/devtools/recorder/recorder.js +1 -0
- package/static/devtools/resources/resources-legacy.js +1 -0
- package/static/devtools/resources/resources-meta.js +1 -0
- package/static/devtools/resources/resources.js +28 -0
- package/static/devtools/resources/resources_module.js +1 -0
- package/static/devtools/root/root-legacy.js +1 -0
- package/static/devtools/root/root.js +1 -0
- package/static/devtools/screencast/screencast-legacy.js +1 -0
- package/static/devtools/screencast/screencast.js +1 -0
- package/static/devtools/sdk/sdk-legacy.js +1 -0
- package/static/devtools/sdk/sdk.js +2 -0
- package/static/devtools/sdk_test_runner/sdk_test_runner.js +297 -0
- package/static/devtools/sdk_test_runner/sdk_test_runner_module.js +0 -0
- package/static/devtools/search/search-legacy.js +1 -0
- package/static/devtools/search/search.js +1 -0
- package/static/devtools/search/search_module.js +1 -0
- package/static/devtools/security/security-legacy.js +1 -0
- package/static/devtools/security/security-meta.js +1 -0
- package/static/devtools/security/security.js +1 -0
- package/static/devtools/security/security_module.js +1 -0
- package/static/devtools/security_test_runner/security_test_runner.js +32 -0
- package/static/devtools/security_test_runner/security_test_runner_module.js +0 -0
- package/static/devtools/services/services-legacy.js +1 -0
- package/static/devtools/services/services.js +1 -0
- package/static/devtools/settings/settings-legacy.js +1 -0
- package/static/devtools/settings/settings-meta.js +1 -0
- package/static/devtools/settings/settings.js +1 -0
- package/static/devtools/settings/settings_module.js +1 -0
- package/static/devtools/shell.js +1 -0
- package/static/devtools/snippets/snippets-legacy.js +1 -0
- package/static/devtools/snippets/snippets.js +1 -0
- package/static/devtools/snippets/snippets_module.js +0 -0
- package/static/devtools/source_frame/source_frame-legacy.js +1 -0
- package/static/devtools/source_frame/source_frame.js +1 -0
- package/static/devtools/source_frame/source_frame_module.js +1 -0
- package/static/devtools/sources/sources-legacy.js +1 -0
- package/static/devtools/sources/sources-meta.js +1 -0
- package/static/devtools/sources/sources.js +13 -0
- package/static/devtools/sources/sources_module.js +1 -0
- package/static/devtools/sources_test_runner/AutocompleteTestRunner.js +46 -0
- package/static/devtools/sources_test_runner/DebuggerTestRunner.js +895 -0
- package/static/devtools/sources_test_runner/EditorTestRunner.js +237 -0
- package/static/devtools/sources_test_runner/LiveEditTestRunner.js +33 -0
- package/static/devtools/sources_test_runner/SearchTestRunner.js +158 -0
- package/static/devtools/sources_test_runner/SourcesTestRunner.js +173 -0
- package/static/devtools/sources_test_runner/sources_test_runner.js +10 -0
- package/static/devtools/sources_test_runner/sources_test_runner_module.js +0 -0
- package/static/devtools/startup/startup.js +1 -0
- package/static/devtools/test_runner/test_runner.js +1 -0
- package/static/devtools/text_editor/text_editor-legacy.js +1 -0
- package/static/devtools/text_editor/text_editor.js +1 -0
- package/static/devtools/text_editor/text_editor_module.js +1 -0
- package/static/devtools/text_utils/text_utils-legacy.js +1 -0
- package/static/devtools/text_utils/text_utils.js +1 -0
- package/static/devtools/theme_support/theme_support.js +1 -0
- package/static/devtools/third_party/acorn/acorn-tsconfig.json +8 -0
- package/static/devtools/third_party/acorn/acorn.js +1 -0
- package/static/devtools/third_party/acorn/package/dist/acorn.d.ts +209 -0
- package/static/devtools/third_party/acorn/package/dist/acorn.mjs +5261 -0
- package/static/devtools/third_party/acorn/package/dist/acorn.mjs.d.ts +2 -0
- package/static/devtools/third_party/acorn/package/dist/acorn.mjs.map +1 -0
- package/static/devtools/third_party/acorn-loose/acorn-loose-tsconfig.json +8 -0
- package/static/devtools/third_party/acorn-loose/package/dist/acorn-loose.d.ts +16 -0
- package/static/devtools/third_party/acorn-loose/package/dist/acorn-loose.mjs +1418 -0
- package/static/devtools/third_party/axe-core/axe.js +16423 -0
- package/static/devtools/third_party/chromium/chromium-tsconfig.json +8 -0
- package/static/devtools/third_party/chromium/client-variations/ClientVariations.d.ts +13 -0
- package/static/devtools/third_party/chromium/client-variations/ClientVariations.js +27 -0
- package/static/devtools/third_party/codemirror/codemirror-tsconfig.json +72 -0
- package/static/devtools/third_party/codemirror/package/addon/comment/comment.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/addon/comment/comment.js +211 -0
- package/static/devtools/third_party/codemirror/package/addon/edit/closebrackets.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/edit/closebrackets.js +201 -0
- package/static/devtools/third_party/codemirror/package/addon/edit/matchbrackets.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/edit/matchbrackets.js +158 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/brace-fold.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/brace-fold.js +105 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/foldcode.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/foldcode.js +157 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/foldgutter.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/fold/foldgutter.js +163 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/multiplex.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/multiplex.js +131 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/overlay.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/overlay.js +90 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/simple.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/mode/simple.js +216 -0
- package/static/devtools/third_party/codemirror/package/addon/runmode/runmode-standalone.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/runmode/runmode-standalone.js +333 -0
- package/static/devtools/third_party/codemirror/package/addon/selection/active-line.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/selection/active-line.js +72 -0
- package/static/devtools/third_party/codemirror/package/addon/selection/mark-selection.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/addon/selection/mark-selection.js +119 -0
- package/static/devtools/third_party/codemirror/package/lib/codemirror.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/lib/codemirror.js +9800 -0
- package/static/devtools/third_party/codemirror/package/mode/clike/clike.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/clike/clike.js +935 -0
- package/static/devtools/third_party/codemirror/package/mode/clojure/clojure.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/clojure/clojure.js +292 -0
- package/static/devtools/third_party/codemirror/package/mode/coffeescript/coffeescript.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/coffeescript/coffeescript.js +359 -0
- package/static/devtools/third_party/codemirror/package/mode/css/css.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/css/css.js +864 -0
- package/static/devtools/third_party/codemirror/package/mode/htmlembedded/htmlembedded.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/htmlembedded/htmlembedded.js +37 -0
- package/static/devtools/third_party/codemirror/package/mode/htmlmixed/htmlmixed.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/htmlmixed/htmlmixed.js +153 -0
- package/static/devtools/third_party/codemirror/package/mode/javascript/javascript.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/javascript/javascript.js +942 -0
- package/static/devtools/third_party/codemirror/package/mode/jsx/jsx.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/jsx/jsx.js +148 -0
- package/static/devtools/third_party/codemirror/package/mode/livescript/livescript.d.ts +4 -0
- package/static/devtools/third_party/codemirror/package/mode/livescript/livescript.js +280 -0
- package/static/devtools/third_party/codemirror/package/mode/markdown/markdown.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/markdown/markdown.js +886 -0
- package/static/devtools/third_party/codemirror/package/mode/php/php.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/php/php.js +234 -0
- package/static/devtools/third_party/codemirror/package/mode/python/python.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/python/python.js +399 -0
- package/static/devtools/third_party/codemirror/package/mode/shell/shell.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/shell/shell.js +168 -0
- package/static/devtools/third_party/codemirror/package/mode/wast/wast.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/wast/wast.js +41 -0
- package/static/devtools/third_party/codemirror/package/mode/xml/xml.d.ts +1 -0
- package/static/devtools/third_party/codemirror/package/mode/xml/xml.js +413 -0
- package/static/devtools/third_party/i18n/bundle-tsconfig.json +8 -0
- package/static/devtools/third_party/i18n/i18n.d.ts +108 -0
- package/static/devtools/third_party/i18n/i18n.js +4336 -0
- package/static/devtools/third_party/lighthouse/lighthouse-dt-bundle.d.ts +1 -0
- package/static/devtools/third_party/lighthouse/lighthouse-dt-bundle.js +1140 -0
- package/static/devtools/third_party/lighthouse/lighthouse-tsconfig.json +10 -0
- package/static/devtools/third_party/lighthouse/locales/ar-XB.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ar.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/bg.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ca.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/cs.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/da.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/de.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/el.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/en-GB.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/en-US.json +2297 -0
- package/static/devtools/third_party/lighthouse/locales/en-XA.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/en-XL.json +2297 -0
- package/static/devtools/third_party/lighthouse/locales/es-419.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/es.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/fi.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/fil.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/fr.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/he.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/hi.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/hr.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/hu.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/id.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/it.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ja.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ko.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/lt.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/lv.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/nl.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/no.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/pl.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/pt-PT.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/pt.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ro.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ru.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sk.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sl.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sr-Latn.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sr.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/sv.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/ta.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/te.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/th.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/tr.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/uk.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/vi.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/zh-HK.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/zh-TW.json +2066 -0
- package/static/devtools/third_party/lighthouse/locales/zh.json +2066 -0
- package/static/devtools/third_party/lighthouse/report-assets/report-generator.d.ts +1 -0
- package/static/devtools/third_party/lighthouse/report-assets/report-generator.js +167 -0
- package/static/devtools/third_party/lighthouse/report-assets/report.d.ts +1 -0
- package/static/devtools/third_party/lighthouse/report-assets/report.js +5032 -0
- package/static/devtools/third_party/lit-html/lit-html-tsconfig.json +22 -0
- package/static/devtools/third_party/lit-html/lit-html.js +120 -0
- package/static/devtools/third_party/lit-html/package/directives/class-map.d.ts +28 -0
- package/static/devtools/third_party/lit-html/package/directives/class-map.js +101 -0
- package/static/devtools/third_party/lit-html/package/directives/class-map.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/directives/if-defined.d.ts +22 -0
- package/static/devtools/third_party/lit-html/package/directives/if-defined.js +37 -0
- package/static/devtools/third_party/lit-html/package/directives/if-defined.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/directives/live.d.ts +38 -0
- package/static/devtools/third_party/lit-html/package/directives/live.js +73 -0
- package/static/devtools/third_party/lit-html/package/directives/live.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/directives/repeat.d.ts +37 -0
- package/static/devtools/third_party/lit-html/package/directives/repeat.js +415 -0
- package/static/devtools/third_party/lit-html/package/directives/repeat.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/directives/style-map.d.ts +36 -0
- package/static/devtools/third_party/lit-html/package/directives/style-map.js +78 -0
- package/static/devtools/third_party/lit-html/package/directives/style-map.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/default-template-processor.d.ts +39 -0
- package/static/devtools/third_party/lit-html/package/lib/default-template-processor.js +52 -0
- package/static/devtools/third_party/lit-html/package/lib/default-template-processor.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/directive.d.ts +59 -0
- package/static/devtools/third_party/lit-html/package/lib/directive.js +63 -0
- package/static/devtools/third_party/lit-html/package/lib/directive.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/dom.d.ts +29 -0
- package/static/devtools/third_party/lit-html/package/lib/dom.js +44 -0
- package/static/devtools/third_party/lit-html/package/lib/dom.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/part.d.ts +46 -0
- package/static/devtools/third_party/lit-html/package/lib/part.js +23 -0
- package/static/devtools/third_party/lit-html/package/lib/part.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/parts.d.ts +148 -0
- package/static/devtools/third_party/lit-html/package/lib/parts.js +476 -0
- package/static/devtools/third_party/lit-html/package/lib/parts.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/render.d.ts +33 -0
- package/static/devtools/third_party/lit-html/package/lib/render.js +43 -0
- package/static/devtools/third_party/lit-html/package/lib/render.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/template-factory.d.ts +57 -0
- package/static/devtools/third_party/lit-html/package/lib/template-factory.js +48 -0
- package/static/devtools/third_party/lit-html/package/lib/template-factory.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/template-instance.d.ts +30 -0
- package/static/devtools/third_party/lit-html/package/lib/template-instance.js +134 -0
- package/static/devtools/third_party/lit-html/package/lib/template-instance.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/template-result.d.ts +42 -0
- package/static/devtools/third_party/lit-html/package/lib/template-result.js +131 -0
- package/static/devtools/third_party/lit-html/package/lib/template-result.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lib/template.d.ts +92 -0
- package/static/devtools/third_party/lit-html/package/lib/template.js +215 -0
- package/static/devtools/third_party/lit-html/package/lib/template.js.map +1 -0
- package/static/devtools/third_party/lit-html/package/lit-html.d.ts +42 -0
- package/static/devtools/third_party/lit-html/package/lit-html.js +59 -0
- package/static/devtools/third_party/lit-html/package/lit-html.js.map +1 -0
- package/static/devtools/third_party/marked/marked-tsconfig.json +8 -0
- package/static/devtools/third_party/marked/marked.js +1 -0
- package/static/devtools/third_party/marked/package/lib/marked.esm.d.ts +1 -0
- package/static/devtools/third_party/marked/package/lib/marked.esm.js +2584 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts +53 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/api-docs-entry.js +64 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts +176 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Accessibility.js +356 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts +21 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +81 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts +423 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Browser.js +516 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +39 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +76 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts +26 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserWebSocketTransport.js +30 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts +120 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Connection.js +266 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectionTransport.js +15 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +72 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +60 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts +181 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Coverage.js +316 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +174 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +647 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts +53 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Debug.js +77 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts +33 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/DeviceDescriptors.js +873 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts +76 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Dialog.js +92 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.d.ts +25 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EmulationManager.js +33 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts +34 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Errors.js +37 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts +59 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EvalTypes.js +15 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts +89 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +109 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.d.ts +82 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Events.js +83 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts +189 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/ExecutionContext.js +313 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts +60 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.js +66 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts +735 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/FrameManager.js +962 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts +276 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPRequest.js +421 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts +128 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/HTTPResponse.js +150 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts +322 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Input.js +463 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts +439 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +724 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts +62 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/LifecycleWatcher.js +145 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts +80 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/NetworkManager.js +262 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts +152 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.js +31 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts +910 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Page.js +1343 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.d.ts +21 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Product.js +15 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts +135 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Puppeteer.js +133 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.d.ts +24 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/PuppeteerViewport.js +0 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts +66 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js +157 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.d.ts +61 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/SecurityDetails.js +72 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts +98 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Target.js +137 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.d.ts +28 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/TimeoutSettings.js +43 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts +47 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/Tracing.js +94 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.d.ts +40 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/USKeyboardLayout.js +403 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts +102 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/WebWorker.js +109 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/assert.js +24 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.d.ts +17 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/fetch.js +20 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts +66 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/common/helper.js +288 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts +17 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/environment.js +16 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-node.js +39 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/initialize-web.js +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts +132 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserFetcher.js +468 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts +40 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserRunner.js +197 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +42 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.js +0 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts +16 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Launcher.js +469 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts +29 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js +34 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts +31 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/PipeTransport.js +61 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts +156 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/Puppeteer.js +183 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node/install.js +151 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node-puppeteer-core.js +23 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/node.js +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +19 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.d.ts +18 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/puppeteer/web.js +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts +22 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.d.ts.map +1 -0
- package/static/devtools/third_party/puppeteer/package/lib/esm/vendor/mitt/src/index.js +53 -0
- package/static/devtools/third_party/puppeteer/puppeteer-tsconfig.json +58 -0
- package/static/devtools/third_party/puppeteer/puppeteer.js +1 -0
- package/static/devtools/third_party/wasmparser/package/dist/esm/WasmDis.js +1595 -0
- package/static/devtools/third_party/wasmparser/package/dist/esm/WasmParser.js +3120 -0
- package/static/devtools/third_party/wasmparser/wasmparser-tsconfig.json +9 -0
- package/static/devtools/timeline/timeline-legacy.js +1 -0
- package/static/devtools/timeline/timeline-meta.js +1 -0
- package/static/devtools/timeline/timeline.js +1 -0
- package/static/devtools/timeline/timeline_module.js +1 -0
- package/static/devtools/timeline_model/timeline_model-legacy.js +1 -0
- package/static/devtools/timeline_model/timeline_model.js +1 -0
- package/static/devtools/timeline_model/timeline_model_module.js +0 -0
- package/static/devtools/toolbox.html +20 -0
- package/static/devtools/toolbox.js +1 -0
- package/static/devtools/toolbox_bootstrap/toolbox_bootstrap.js +1 -0
- package/static/devtools/ui/components/components.js +378 -0
- package/static/devtools/ui/ui-legacy.js +1 -0
- package/static/devtools/ui/ui.js +3 -0
- package/static/devtools/ui/utils/utils.js +1 -0
- package/static/devtools/wasmparser_worker/wasmparser_worker-entrypoint.js +1 -0
- package/static/devtools/wasmparser_worker/wasmparser_worker.js +1 -0
- package/static/devtools/web_audio/graph_visualizer/graph_visualizer.js +1 -0
- package/static/devtools/web_audio/web_audio-legacy.js +1 -0
- package/static/devtools/web_audio/web_audio-meta.js +1 -0
- package/static/devtools/web_audio/web_audio.js +23 -0
- package/static/devtools/web_audio/web_audio_module.js +1 -0
- package/static/devtools/webauthn/webauthn-legacy.js +1 -0
- package/static/devtools/webauthn/webauthn-meta.js +1 -0
- package/static/devtools/webauthn/webauthn.js +6 -0
- package/static/devtools/webauthn/webauthn_module.js +1 -0
- package/static/devtools/worker_app.html +20 -0
- package/static/devtools/worker_app.js +1 -0
- package/static/devtools/worker_main/worker_main-legacy.js +1 -0
- package/static/devtools/worker_main/worker_main.js +1 -0
- package/static/devtools/worker_service/worker_service.js +1 -0
- package/static/devtools/workspace/workspace-legacy.js +1 -0
- package/static/devtools/workspace/workspace.js +1 -0
- package/static/devtools/workspace_diff/workspace_diff-legacy.js +1 -0
- package/static/devtools/workspace_diff/workspace_diff.js +1 -0
- package/static/devtools/workspace_diff/workspace_diff_module.js +0 -0
- package/static/docs/swagger.json +2337 -279
- package/static/function/client.js +1037 -992
- package/build/routes/chromium/http/json-new.js +0 -23
- package/build/routes/chromium/http/json-version-get.response.json +0 -37
- package/build/routes/chromium/utils/cdp.d.ts +0 -2
- package/build/routes/chromium/utils/cdp.js +0 -14
- package/build/routes/chromium/ws/cdp-chromium.js +0 -10
- package/src/routes/chromium/http/json-list.ts +0 -50
- package/src/routes/chromium/utils/cdp.ts +0 -19
- package/build/routes/{chromium/http/content-post.query.json → chrome/http/content.post.query.json} +0 -0
- package/build/routes/{chromium/http/content-post.response.json → chrome/http/content.post.response.json} +0 -0
- package/build/routes/{chromium/http/download-post.body.json → chrome/http/download.post.body.json} +0 -0
- package/build/routes/{chromium/http/download-post.query.json → chrome/http/download.post.query.json} +0 -0
- package/build/routes/{chromium/http/download-post.response.json → chrome/http/download.post.response.json} +0 -0
- package/build/routes/{chromium/http/function-post.body.json → chrome/http/function.post.body.json} +0 -0
- package/build/routes/{chromium/http/function-post.query.json → chrome/http/function.post.query.json} +0 -0
- package/build/routes/{chromium/http/function-post.response.json → chrome/http/function.post.response.json} +0 -0
- package/build/routes/{chromium/http/json-list.response.json → chrome/http/json-list.get.response.json} +0 -0
- package/build/routes/{chromium/http/json-new.response.json → chrome/http/json-new.put.response.json} +0 -0
- package/build/routes/{chromium/http/json-protocol-get.response.json → chrome/http/json-protocol.get.response.json} +0 -0
- package/build/routes/{chromium/http/pdf-post.query.json → chrome/http/pdf.post.query.json} +0 -0
- package/build/routes/{chromium/http/pdf-post.response.json → chrome/http/pdf.post.response.json} +0 -0
- package/build/routes/{chromium/http/performance.body.json → chrome/http/performance.post.body.json} +0 -0
- package/build/routes/{chromium/http/performance.query.json → chrome/http/performance.post.query.json} +0 -0
- package/build/routes/{chromium/http/performance.response.json → chrome/http/performance.post.response.json} +0 -0
- package/build/routes/{chromium/http/scrape-post.query.json → chrome/http/scrape.post.query.json} +0 -0
- package/build/routes/{chromium/http/scrape-post.response.json → chrome/http/scrape.post.response.json} +0 -0
- package/build/routes/{chromium/http/screenshot-post.query.json → chrome/http/screenshot.post.query.json} +0 -0
- package/build/routes/{chromium/http/screenshot-post.response.json → chrome/http/screenshot.post.response.json} +0 -0
- package/build/routes/{chromium/utils/performance/child.d.ts → chrome/tests/content.spec.d.ts} +0 -0
- package/build/routes/{chromium/utils/performance/types.js → chrome/tests/download.spec.d.ts} +0 -0
- package/build/routes/{chromium/ws/cdp-chromium.query.json → chrome/ws/browser.query.json} +0 -0
- package/build/routes/{chromium/ws/playwright-chromium.query.json → chrome/ws/playwright.query.json} +0 -0
- package/build/routes/{firefox/ws/playwright-firefox.query.json → chromium/ws/playwright.query.json} +0 -0
- package/build/routes/{webkit/ws/playwright-webkit.query.json → firefox/ws/playwright.query.json} +0 -0
- package/build/routes/management/http/{config-get.d.ts → config.get.d.ts} +0 -0
- package/build/routes/management/http/{config-get.js → config.get.js} +0 -0
- package/build/routes/management/http/{config-get.response.json → config.get.response.json} +0 -0
- package/build/routes/management/http/{metrics-total-get.d.ts → metrics-total.get.d.ts} +0 -0
- package/build/routes/management/http/{metrics-total-get.js → metrics-total.get.js} +0 -0
- package/build/routes/management/http/{metrics-total-get.response.json → metrics-total.get.response.json} +0 -0
- package/build/routes/management/http/{metrics-get.d.ts → metrics.get.d.ts} +0 -0
- package/build/routes/management/http/{metrics-get.js → metrics.get.js} +0 -0
- package/build/routes/management/http/{metrics-get.response.json → metrics.get.response.json} +0 -0
- package/build/routes/management/http/{sessions-get.d.ts → sessions.get.d.ts} +0 -0
- package/build/routes/management/http/{sessions-get.js → sessions.get.js} +0 -0
- package/build/routes/management/http/{static-get.d.ts → static.get.d.ts} +0 -0
- package/build/{routes/chromium/http/json-protocol-get.d.ts → shared/json-protocol.http.d.ts} +1 -1
- package/build/{routes/chromium/http/json-version-get.d.ts → shared/json-version.http.d.ts} +1 -1
- /package/build/{routes/chromium → shared}/utils/function/client.d.ts +0 -0
- /package/build/{routes/chromium → shared}/utils/function/client.js +0 -0
- /package/build/{routes/chromium → shared}/utils/function/handler.d.ts +0 -0
- /package/build/{routes/chromium → shared}/utils/function/handler.js +0 -0
- /package/build/{routes/chromium → shared}/utils/performance/child.js +0 -0
- /package/build/{routes/chromium → shared}/utils/performance/main.d.ts +0 -0
- /package/build/{routes/chromium → shared}/utils/performance/types.d.ts +0 -0
- /package/src/routes/management/http/{config-get.ts → config.get.ts} +0 -0
- /package/src/routes/management/http/{metrics-total-get.ts → metrics-total.get.ts} +0 -0
- /package/src/routes/management/http/{metrics-get.ts → metrics.get.ts} +0 -0
- /package/src/routes/management/http/{sessions-get.ts → sessions.get.ts} +0 -0
- /package/src/{routes/chromium → shared}/utils/function/client.ts +0 -0
- /package/src/{routes/chromium → shared}/utils/performance/child.ts +0 -0
- /package/src/{routes/chromium → shared}/utils/performance/types.ts +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2020 Google Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
declare const _default: import("./api-docs-entry.js").Puppeteer;
|
|
17
|
+
export default _default;
|
|
18
|
+
//# sourceMappingURL=web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../src/web.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AASH,wBAAmD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2020 Google Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { isNode } from './environment.js';
|
|
17
|
+
import { initializePuppeteerWeb } from './initialize-web.js';
|
|
18
|
+
|
|
19
|
+
if (isNode) {
|
|
20
|
+
throw new Error('Trying to run Puppeteer-Web in a Node environment');
|
|
21
|
+
}
|
|
22
|
+
export default initializePuppeteerWeb('puppeteer');
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare type EventType = string | symbol;
|
|
2
|
+
export declare type Handler<T = any> = (event?: T) => void;
|
|
3
|
+
export declare type WildcardHandler = (type: EventType, event?: any) => void;
|
|
4
|
+
export declare type EventHandlerList = Array<Handler>;
|
|
5
|
+
export declare type WildCardEventHandlerList = Array<WildcardHandler>;
|
|
6
|
+
export declare type EventHandlerMap = Map<EventType, EventHandlerList | WildCardEventHandlerList>;
|
|
7
|
+
export interface Emitter {
|
|
8
|
+
all: EventHandlerMap;
|
|
9
|
+
on<T = any>(type: EventType, handler: Handler<T>): void;
|
|
10
|
+
on(type: '*', handler: WildcardHandler): void;
|
|
11
|
+
off<T = any>(type: EventType, handler: Handler<T>): void;
|
|
12
|
+
off(type: '*', handler: WildcardHandler): void;
|
|
13
|
+
emit<T = any>(type: EventType, event?: T): void;
|
|
14
|
+
emit(type: '*', event?: any): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Mitt: Tiny (~200b) functional event emitter / pubsub.
|
|
18
|
+
* @name mitt
|
|
19
|
+
* @returns {Mitt}
|
|
20
|
+
*/
|
|
21
|
+
export default function mitt(all?: EventHandlerMap): Emitter;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../vendor/mitt/src/index.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAIxC,oBAAY,OAAO,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;AACnD,oBAAY,eAAe,GAAG,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;AAGrE,oBAAY,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AAC9C,oBAAY,wBAAwB,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AAG9D,oBAAY,eAAe,GAAG,GAAG,CAAC,SAAS,EAAE,gBAAgB,GAAG,wBAAwB,CAAC,CAAC;AAE1F,MAAM,WAAW,OAAO;IACvB,GAAG,EAAE,eAAe,CAAC;IAErB,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACxD,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAE9C,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACzD,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAE/C,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IAChD,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,GAAG,CAAC,EAAE,eAAe,GAAG,OAAO,CAoD3D"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mitt: Tiny (~200b) functional event emitter / pubsub.
|
|
3
|
+
* @name mitt
|
|
4
|
+
* @returns {Mitt}
|
|
5
|
+
*/
|
|
6
|
+
export default function mitt(all) {
|
|
7
|
+
all = all || new Map();
|
|
8
|
+
return {
|
|
9
|
+
/**
|
|
10
|
+
* A Map of event names to registered handler functions.
|
|
11
|
+
*/
|
|
12
|
+
all,
|
|
13
|
+
/**
|
|
14
|
+
* Register an event handler for the given type.
|
|
15
|
+
* @param {string|symbol} type Type of event to listen for, or `"*"` for all events
|
|
16
|
+
* @param {Function} handler Function to call in response to given event
|
|
17
|
+
* @memberOf mitt
|
|
18
|
+
*/
|
|
19
|
+
on(type, handler) {
|
|
20
|
+
const handlers = all.get(type);
|
|
21
|
+
const added = handlers && handlers.push(handler);
|
|
22
|
+
if (!added) {
|
|
23
|
+
all.set(type, [handler]);
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
/**
|
|
27
|
+
* Remove an event handler for the given type.
|
|
28
|
+
* @param {string|symbol} type Type of event to unregister `handler` from, or `"*"`
|
|
29
|
+
* @param {Function} handler Handler function to remove
|
|
30
|
+
* @memberOf mitt
|
|
31
|
+
*/
|
|
32
|
+
off(type, handler) {
|
|
33
|
+
const handlers = all.get(type);
|
|
34
|
+
if (handlers) {
|
|
35
|
+
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* Invoke all handlers for the given type.
|
|
40
|
+
* If present, `"*"` handlers are invoked after type-matched handlers.
|
|
41
|
+
*
|
|
42
|
+
* Note: Manually firing "*" handlers is not supported.
|
|
43
|
+
*
|
|
44
|
+
* @param {string|symbol} type The event type to invoke
|
|
45
|
+
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
|
|
46
|
+
* @memberOf mitt
|
|
47
|
+
*/
|
|
48
|
+
emit(type, evt) {
|
|
49
|
+
(all.get(type) || []).slice().map((handler) => { handler(evt); });
|
|
50
|
+
(all.get('*') || []).slice().map((handler) => { handler(type, evt); });
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"composite": true
|
|
4
|
+
},
|
|
5
|
+
"files": [
|
|
6
|
+
"package/lib/esm/puppeteer/revisions.js",
|
|
7
|
+
"package/lib/esm/puppeteer/index-core.js",
|
|
8
|
+
"package/lib/esm/puppeteer/api-docs-entry.js",
|
|
9
|
+
"package/lib/esm/puppeteer/initialize.js",
|
|
10
|
+
"package/lib/esm/puppeteer/index.js",
|
|
11
|
+
"package/lib/esm/puppeteer/common/TimeoutSettings.js",
|
|
12
|
+
"package/lib/esm/puppeteer/common/DeviceDescriptors.js",
|
|
13
|
+
"package/lib/esm/puppeteer/common/QueryHandler.js",
|
|
14
|
+
"package/lib/esm/puppeteer/common/DOMWorld.js",
|
|
15
|
+
"package/lib/esm/puppeteer/common/Events.js",
|
|
16
|
+
"package/lib/esm/puppeteer/common/JSHandle.js",
|
|
17
|
+
"package/lib/esm/puppeteer/common/FileChooser.js",
|
|
18
|
+
"package/lib/esm/puppeteer/common/EvalTypes.js",
|
|
19
|
+
"package/lib/esm/puppeteer/common/LifecycleWatcher.js",
|
|
20
|
+
"package/lib/esm/puppeteer/common/assert.js",
|
|
21
|
+
"package/lib/esm/puppeteer/common/Page.js",
|
|
22
|
+
"package/lib/esm/puppeteer/common/Coverage.js",
|
|
23
|
+
"package/lib/esm/puppeteer/common/PDFOptions.js",
|
|
24
|
+
"package/lib/esm/puppeteer/common/PuppeteerViewport.js",
|
|
25
|
+
"package/lib/esm/puppeteer/common/Tracing.js",
|
|
26
|
+
"package/lib/esm/puppeteer/common/ConsoleMessage.js",
|
|
27
|
+
"package/lib/esm/puppeteer/common/Dialog.js",
|
|
28
|
+
"package/lib/esm/puppeteer/common/WebWorker.js",
|
|
29
|
+
"package/lib/esm/puppeteer/common/WebSocketTransport.js",
|
|
30
|
+
"package/lib/esm/puppeteer/common/ExecutionContext.js",
|
|
31
|
+
"package/lib/esm/puppeteer/common/HTTPResponse.js",
|
|
32
|
+
"package/lib/esm/puppeteer/common/FrameManager.js",
|
|
33
|
+
"package/lib/esm/puppeteer/common/EventEmitter.js",
|
|
34
|
+
"package/lib/esm/puppeteer/common/Accessibility.js",
|
|
35
|
+
"package/lib/esm/puppeteer/common/Puppeteer.js",
|
|
36
|
+
"package/lib/esm/puppeteer/common/Errors.js",
|
|
37
|
+
"package/lib/esm/puppeteer/common/HTTPRequest.js",
|
|
38
|
+
"package/lib/esm/puppeteer/common/EmulationManager.js",
|
|
39
|
+
"package/lib/esm/puppeteer/common/SecurityDetails.js",
|
|
40
|
+
"package/lib/esm/puppeteer/common/ConnectionTransport.js",
|
|
41
|
+
"package/lib/esm/puppeteer/common/Connection.js",
|
|
42
|
+
"package/lib/esm/puppeteer/common/Browser.js",
|
|
43
|
+
"package/lib/esm/puppeteer/common/NetworkManager.js",
|
|
44
|
+
"package/lib/esm/puppeteer/common/Target.js",
|
|
45
|
+
"package/lib/esm/puppeteer/common/Input.js",
|
|
46
|
+
"package/lib/esm/puppeteer/common/helper.js",
|
|
47
|
+
"package/lib/esm/puppeteer/common/USKeyboardLayout.js",
|
|
48
|
+
"package/lib/esm/puppeteer/common/Debug.js",
|
|
49
|
+
"package/lib/esm/puppeteer/install.js",
|
|
50
|
+
"package/lib/esm/puppeteer/node/BrowserFetcher.js",
|
|
51
|
+
"package/lib/esm/puppeteer/node/BrowserRunner.js",
|
|
52
|
+
"package/lib/esm/puppeteer/node/PipeTransport.js",
|
|
53
|
+
"package/lib/esm/puppeteer/node/Launcher.js",
|
|
54
|
+
"package/lib/esm/puppeteer/node/LaunchOptions.js",
|
|
55
|
+
"package/lib/esm/puppeteer/environment.js",
|
|
56
|
+
"package/lib/esm/vendor/mitt/src/index.js"
|
|
57
|
+
]
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=(e,t)=>{if(!e)throw new Error(t)},t=!("undefined"==typeof process||!process.version),i=e=>t?require("debug")(e):(...t)=>{const i=globalThis.__PUPPETEER_DEBUG;if(!i)return;("*"===i||(i.endsWith("*")?e.startsWith(i):e===i))&&console.log(e+":",...t)};class n{constructor(){var e;this.eventsMap=new Map,this.emitter={all:e=(e=this.eventsMap)||new Map,on(t,i){const n=e.get(t);n&&n.push(i)||e.set(t,[i])},off(t,i){const n=e.get(t);n&&n.splice(n.indexOf(i)>>>0,1)},emit(t,i){(e.get(t)||[]).slice().map((e=>{e(i)})),(e.get("*")||[]).slice().map((e=>{e(t,i)}))}}}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}removeListener(e,t){return this.off(e,t),this}addListener(e,t){return this.on(e,t),this}emit(e,t){return this.emitter.emit(e,t),this.eventListenersCount(e)>0}once(e,t){const i=n=>{t(n),this.off(e,i)};return this.on(e,i)}listenerCount(e){return this.eventListenersCount(e)}removeAllListeners(e){return e?this.eventsMap.delete(e):this.eventsMap.clear(),this}eventListenersCount(e){return this.eventsMap.has(e)?this.eventsMap.get(e).length:0}}const s=i("puppeteer:protocol:SEND ►"),o=i("puppeteer:protocol:RECV ◀"),a={Disconnected:Symbol("Connection.Disconnected")};class r extends n{constructor(e,t,i=0){super(),this._lastId=0,this._sessions=new Map,this._closed=!1,this._callbacks=new Map,this._url=e,this._delay=i,this._transport=t,this._transport.onmessage=this._onMessage.bind(this),this._transport.onclose=this._onClose.bind(this)}static fromSession(e){return e._connection}session(e){return this._sessions.get(e)||null}url(){return this._url}send(e,...t){const i=t.length?t[0]:void 0,n=this._rawSend({method:e,params:i});return new Promise(((t,i)=>{this._callbacks.set(n,{resolve:t,reject:i,error:new Error,method:e})}))}_rawSend(e){const t=++this._lastId,i=JSON.stringify(Object.assign({},e,{id:t}));return s(i),this._transport.send(i),t}async _onMessage(e){this._delay&&await new Promise((e=>setTimeout(e,this._delay))),o(e);const t=JSON.parse(e);if("Target.attachedToTarget"===t.method){const e=t.params.sessionId,i=new d(this,t.params.targetInfo.type,e);this._sessions.set(e,i)}else if("Target.detachedFromTarget"===t.method){const e=this._sessions.get(t.params.sessionId);e&&(e._onClosed(),this._sessions.delete(t.params.sessionId))}if(t.sessionId){const e=this._sessions.get(t.sessionId);e&&e._onMessage(t)}else if(t.id){const e=this._callbacks.get(t.id);e&&(this._callbacks.delete(t.id),t.error?e.reject(l(e.error,e.method,t)):e.resolve(t.result))}else this.emit(t.method,t.params)}_onClose(){if(!this._closed){this._closed=!0,this._transport.onmessage=null,this._transport.onclose=null;for(const e of this._callbacks.values())e.reject(h(e.error,`Protocol error (${e.method}): Target closed.`));this._callbacks.clear();for(const e of this._sessions.values())e._onClosed();this._sessions.clear(),this.emit(a.Disconnected)}}dispose(){this._onClose(),this._transport.close()}async createSession(e){const{sessionId:t}=await this.send("Target.attachToTarget",{targetId:e.targetId,flatten:!0});return this._sessions.get(t)}}const c={Disconnected:Symbol("CDPSession.Disconnected")};class d extends n{constructor(e,t,i){super(),this._callbacks=new Map,this._connection=e,this._targetType=t,this._sessionId=i}send(e,...t){if(!this._connection)return Promise.reject(new Error(`Protocol error (${e}): Session closed. Most likely the ${this._targetType} has been closed.`));const i=t.length?t[0]:void 0,n=this._connection._rawSend({sessionId:this._sessionId,method:e,params:i||{}});return new Promise(((t,i)=>{this._callbacks.set(n,{resolve:t,reject:i,error:new Error,method:e})}))}_onMessage(t){if(t.id&&this._callbacks.has(t.id)){const e=this._callbacks.get(t.id);this._callbacks.delete(t.id),t.error?e.reject(l(e.error,e.method,t)):e.resolve(t.result)}else e(!t.id),this.emit(t.method,t.params)}async detach(){if(!this._connection)throw new Error(`Session already detached. Most likely the ${this._targetType} has been closed.`);await this._connection.send("Target.detachFromTarget",{sessionId:this._sessionId})}_onClosed(){for(const e of this._callbacks.values())e.reject(h(e.error,`Protocol error (${e.method}): Target closed.`));this._callbacks.clear(),this._connection=null,this.emit(c.Disconnected)}}function l(e,t,i){let n=`Protocol error (${t}): ${i.error.message}`;return"data"in i.error&&(n+=" "+i.error.data),h(e,n)}function h(e,t){return e.message=t,e}class u extends Error{constructor(e){super(e),this.name=this.constructor.name,Error.captureStackTrace(this,this.constructor)}}class y extends u{}const m=i("puppeteer:error");function _(e,t,i){return e.on(t,i),{emitter:e,eventName:t,handler:i}}function p(e){for(const t of e)t.emitter.removeListener(t.eventName,t.handler);e.length=0}function g(e){return"string"==typeof e||e instanceof String}function f(t,...i){if(g(t))return e(0===i.length,"Cannot evaluate a string with arguments"),t;return`(${t})(${i.map((function(e){return Object.is(e,void 0)?"undefined":JSON.stringify(e)})).join(",")})`}async function w(){if(!t)throw new Error("Cannot load the fs module API outside of Node.");const e=await import("fs");return e.promises?e:e.default}const k={evaluationString:f,pageBindingInitString:function(e,t){return f((function(e,t){const i=window,n=i[t];i[t]=(...i)=>{const s=window[t];let o=s.callbacks;o||(o=new Map,s.callbacks=o);const a=(s.lastSeq||0)+1;s.lastSeq=a;const r=new Promise(((e,t)=>o.set(a,{resolve:e,reject:t})));return n(JSON.stringify({type:e,name:t,seq:a,args:i})),r}}),e,t)},pageBindingDeliverResultString:function(e,t,i){return f((function(e,t,i){window[e].callbacks.get(t).resolve(i),window[e].callbacks.delete(t)}),e,t,i)},pageBindingDeliverErrorString:function(e,t,i,n){return f((function(e,t,i,n){const s=new Error(i);s.stack=n,window[e].callbacks.get(t).reject(s),window[e].callbacks.delete(t)}),e,t,i,n)},pageBindingDeliverErrorValueString:function(e,t,i){return f((function(e,t,i){window[e].callbacks.get(t).reject(i),window[e].callbacks.delete(t)}),e,t,i)},makePredicateString:function(e,t){return`\n (() => {\n ${t?`const predicateQueryHandler = ${t};`:""}\n const checkWaitForOptions = ${function(e,t,i){if(!e)return i;if(!t&&!i)return e;const n=e.nodeType===Node.TEXT_NODE?e.parentElement:e,s=window.getComputedStyle(n),o=s&&"hidden"!==s.visibility&&function(){const e=n.getBoundingClientRect();return!!(e.top||e.bottom||e.width||e.height)}();return t===o||i===!o?e:null}};\n return (${e})(...args)\n })() `},readProtocolStream:async function(e,i,n){if(!t&&n)throw new Error("Cannot write to a path outside of Node.js environment.");const s=t?await w():null;let o,a=!1;n&&s&&(o=await s.promises.open(n,"w"));const r=[];for(;!a;){const t=await e.send("IO.read",{handle:i});a=t.eof;const c=Buffer.from(t.data,t.base64Encoded?"base64":void 0);r.push(c),n&&s&&await s.promises.writeFile(o,c)}n&&await o.close(),await e.send("IO.close",{handle:i});let c=null;try{c=Buffer.concat(r)}finally{return c}},waitWithTimeout:async function(e,t,i){let n;const s=new y(`waiting for ${t} failed: timeout ${i}ms exceeded`),o=new Promise(((e,t)=>n=t));let a=null;i&&(a=setTimeout((()=>n(s)),i));try{return await Promise.race([e,o])}finally{a&&clearTimeout(a)}},waitForEvent:async function(e,t,i,n,s){let o,a,r;const c=new Promise(((e,t)=>{a=e,r=t})),d=_(e,t,(e=>{i(e)&&a(e)}));function l(){p([d]),clearTimeout(o)}n&&(o=setTimeout((()=>{r(new y("Timeout exceeded while waiting for event"))}),n));const h=await Promise.race([c,s]).then((e=>(l(),e)),(e=>{throw l(),e}));if(h instanceof Error)throw h;return h},isString:g,isNumber:function(e){return"number"==typeof e||e instanceof Number},importFSModule:w,addEventListener:_,removeEventListeners:p,valueFromRemoteObject:function(t){if(e(!t.objectId,"Cannot extract value when objectId is given"),t.unserializableValue){if("bigint"===t.type&&"undefined"!=typeof BigInt)return BigInt(t.unserializableValue.replace("n",""));switch(t.unserializableValue){case"-0":return-0;case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error("Unsupported unserializable value: "+t.unserializableValue)}}return t.value},getExceptionMessage:function(e){if(e.exception)return e.exception.description||e.exception.value;let t=e.text;if(e.stackTrace)for(const i of e.stackTrace.callFrames){const e=i.url+":"+i.lineNumber+":"+i.columnNumber;t+=`\n at ${i.functionName||"<anonymous>"} (${e})`}return t},releaseObject:async function(e,t){t.objectId&&await e.send("Runtime.releaseObject",{objectId:t.objectId}).catch((e=>{m(e)}))}};class C{constructor(e){this._client=e}async snapshot(e={}){const{interestingOnly:t=!0,root:i=null}=e,{nodes:n}=await this._client.send("Accessibility.getFullAXTree");let s=null;if(i){const{node:e}=await this._client.send("DOM.describeNode",{objectId:i._remoteObject.objectId});s=e.backendNodeId}const o=b.createTree(n);let a=o;if(s&&(a=o.find((e=>e.payload.backendDOMNodeId===s)),!a))return null;if(!t)return this.serializeTree(a)[0];const r=new Set;return this.collectInterestingNodes(r,o,!1),r.has(a)?this.serializeTree(a,r)[0]:null}serializeTree(e,t){const i=[];for(const n of e.children)i.push(...this.serializeTree(n,t));if(t&&!t.has(e))return i;const n=e.serialize();return i.length&&(n.children=i),[n]}collectInterestingNodes(e,t,i){if(t.isInteresting(i)&&e.add(t),!t.isLeafNode()){i=i||t.isControl();for(const n of t.children)this.collectInterestingNodes(e,n,i)}}}class b{constructor(e){this.children=[],this._richlyEditable=!1,this._editable=!1,this._focusable=!1,this._hidden=!1,this.payload=e,this._name=this.payload.name?this.payload.name.value:"",this._role=this.payload.role?this.payload.role.value:"Unknown",this._ignored=this.payload.ignored;for(const e of this.payload.properties||[])"editable"===e.name&&(this._richlyEditable="richtext"===e.value.value,this._editable=!0),"focusable"===e.name&&(this._focusable=e.value.value),"hidden"===e.name&&(this._hidden=e.value.value)}_isPlainTextField(){return!this._richlyEditable&&(!!this._editable||("textbox"===this._role||"searchbox"===this._role))}_isTextOnlyObject(){const e=this._role;return"LineBreak"===e||"text"===e||"InlineTextBox"===e}_hasFocusableChild(){if(void 0===this._cachedHasFocusableChild){this._cachedHasFocusableChild=!1;for(const e of this.children)if(e._focusable||e._hasFocusableChild()){this._cachedHasFocusableChild=!0;break}}return this._cachedHasFocusableChild}find(e){if(e(this))return this;for(const t of this.children){const i=t.find(e);if(i)return i}return null}isLeafNode(){if(!this.children.length)return!0;if(this._isPlainTextField()||this._isTextOnlyObject())return!0;switch(this._role){case"doc-cover":case"graphics-symbol":case"img":case"Meter":case"scrollbar":case"slider":case"separator":case"progressbar":return!0}return!this._hasFocusableChild()&&(!(!this._focusable||!this._name)||!("heading"!==this._role||!this._name))}isControl(){switch(this._role){case"button":case"checkbox":case"ColorWell":case"combobox":case"DisclosureTriangle":case"listbox":case"menu":case"menubar":case"menuitem":case"menuitemcheckbox":case"menuitemradio":case"radio":case"scrollbar":case"searchbox":case"slider":case"spinbutton":case"switch":case"tab":case"textbox":case"tree":case"treeitem":return!0;default:return!1}}isInteresting(e){return"Ignored"!==this._role&&!this._hidden&&!this._ignored&&(!(!this._focusable&&!this._richlyEditable)||(!!this.isControl()||!e&&(this.isLeafNode()&&!!this._name)))}serialize(){const e=new Map;for(const t of this.payload.properties||[])e.set(t.name.toLowerCase(),t.value.value);this.payload.name&&e.set("name",this.payload.name.value),this.payload.value&&e.set("value",this.payload.value.value),this.payload.description&&e.set("description",this.payload.description.value);const t={role:this._role},i=["name","value","description","keyshortcuts","roledescription","valuetext"];for(const s of i)e.has(s)&&(t[s]=(n=s,e.get(n)));var n;const s=["disabled","expanded","focused","modal","multiline","multiselectable","readonly","required","selected"],o=t=>e.get(t);for(const e of s){if("focused"===e&&"WebArea"===this._role)continue;o(e)&&(t[e]=o(e))}const a=["checked","pressed"];for(const i of a){if(!e.has(i))continue;const n=e.get(i);t[i]="mixed"===n?"mixed":"true"===n}const r=["level","valuemax","valuemin"],c=t=>e.get(t);for(const i of r)e.has(i)&&(t[i]=c(i));const d=["autocomplete","haspopup","invalid","orientation"],l=t=>e.get(t);for(const e of d){const i=l(e);i&&"false"!==i&&(t[e]=l(e))}return t}static createTree(e){const t=new Map;for(const i of e)t.set(i.nodeId,new b(i));for(const e of t.values())for(const i of e.payload.childIds||[])e.children.push(t.get(i));return t.values().next().value}}class v{constructor(e,t,i,n){this._type=e,this._text=t,this._args=i,this._stackTraceLocations=n}type(){return this._type}text(){return this._text}args(){return this._args}location(){return this._stackTraceLocations.length?this._stackTraceLocations[0]:{}}stackTrace(){return this._stackTraceLocations}}async function x(e,t,i,n){const{nodes:s}=await e.send("Accessibility.queryAXTree",{objectId:t._remoteObject.objectId,accessibleName:i,role:n});return s.filter((e=>"text"!==e.role.value))}function I(e){const t=e=>e.replace(/ +/g," ").trim(),i=new Set(["name","role"]),n={},s=e.replace(/\[\s*(?<attribute>\w+)\s*=\s*"(?<value>\\.|[^"\\]*)"\s*\]/,((e,s,o)=>{if(s=s.trim(),!i.has(s))throw new Error('Unkown aria attribute "${groups.attribute}" in selector');return n[s]=t(o),""}));return s&&!n.name&&(n.name=t(s)),n}const F=async(e,t)=>{const i=e.executionContext(),{name:n,role:s}=I(t),o=await x(i._client,e,n,s);return o.length<1?null:i._adoptBackendNodeId(o[0].backendDOMNodeId)},P=async(e,t)=>{const i=e.executionContext(),{name:n,role:s}=I(t),o=await x(i._client,e,n,s);return Promise.all(o.map((e=>i._adoptBackendNodeId(e.backendDOMNodeId))))},S={queryOne:F,waitFor:async(e,t,i)=>{const n={name:"ariaQuerySelector",pptrFunction:async t=>{const i=await e._document();return await F(i,t)}};return e.waitForSelectorInPage(((e,t)=>globalThis.ariaQuerySelector(t)),t,i,n)},queryAll:P,queryAllArray:async(e,t)=>{const i=await P(e,t);return e.executionContext().evaluateHandle(((...e)=>e),...i)}};function E(e){const t={};return e.queryOne&&(t.queryOne=async(t,i)=>{const n=await t.evaluateHandle(e.queryOne,i),s=n.asElement();return s||(await n.dispose(),null)},t.waitFor=(t,i,n)=>t.waitForSelectorInPage(e.queryOne,i,n)),e.queryAll&&(t.queryAll=async(t,i)=>{const n=await t.evaluateHandle(e.queryAll,i),s=await n.getProperties();await n.dispose();const o=[];for(const e of s.values()){const t=e.asElement();t&&o.push(t)}return o},t.queryAllArray=async(t,i)=>{const n=await t.evaluateHandle(e.queryAll,i);return await n.evaluateHandle((e=>Array.from(e)))}),t}const T=E({queryOne:(e,t)=>e.querySelector(t),queryAll:(e,t)=>e.querySelectorAll(t)}),N=E({queryOne:(e,t)=>{let i=null;const n=e=>{const s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);do{const e=s.currentNode;e.shadowRoot&&n(e.shadowRoot),e instanceof ShadowRoot||!i&&e.matches(t)&&(i=e)}while(!i&&s.nextNode())};return e instanceof Document&&(e=e.documentElement),n(e),i},queryAll:(e,t)=>{const i=[],n=e=>{const s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);do{const e=s.currentNode;e.shadowRoot&&n(e.shadowRoot),e instanceof ShadowRoot||e.matches(t)&&i.push(e)}while(s.nextNode())};return e instanceof Document&&(e=e.documentElement),n(e),i}}),M=new Map([["aria",S],["pierce",N]]),R=new Map(M);function D(e){if(!/^[a-zA-Z]+\//.test(e))return{updatedSelector:e,queryHandler:T};const t=e.indexOf("/"),i=e.slice(0,t),n=e.slice(t+1),s=R.get(i);if(!s)throw new Error(`Query set to use "${i}", but no query handler of that name was found`);return{updatedSelector:n,queryHandler:s}}function q(e,t){const i=e.frame();if("node"===t.subtype&&i){const n=i._frameManager;return new O(e,e._client,t,n.page(),n)}return new K(e,e._client,t)}class K{constructor(e,t,i){this._disposed=!1,this._context=e,this._client=t,this._remoteObject=i}executionContext(){return this._context}async evaluate(e,...t){return await this.executionContext().evaluate(e,this,...t)}async evaluateHandle(e,...t){return await this.executionContext().evaluateHandle(e,this,...t)}async getProperty(e){const t=await this.evaluateHandle(((e,t)=>{const i={__proto__:null};return i[t]=e[t],i}),e),i=(await t.getProperties()).get(e)||null;return await t.dispose(),i}async getProperties(){const e=await this._client.send("Runtime.getProperties",{objectId:this._remoteObject.objectId,ownProperties:!0}),t=new Map;for(const i of e.result)i.enumerable&&t.set(i.name,q(this._context,i.value));return t}async jsonValue(){if(this._remoteObject.objectId){const e=await this._client.send("Runtime.callFunctionOn",{functionDeclaration:"function() { return this; }",objectId:this._remoteObject.objectId,returnByValue:!0,awaitPromise:!0});return k.valueFromRemoteObject(e.result)}return k.valueFromRemoteObject(this._remoteObject)}asElement(){return null}async dispose(){this._disposed||(this._disposed=!0,await k.releaseObject(this._client,this._remoteObject))}toString(){if(this._remoteObject.objectId){return"JSHandle@"+(this._remoteObject.subtype||this._remoteObject.type)}return"JSHandle:"+k.valueFromRemoteObject(this._remoteObject)}}class O extends K{constructor(e,t,i,n,s){super(e,t,i),this._client=t,this._remoteObject=i,this._page=n,this._frameManager=s}asElement(){return this}async contentFrame(){const e=await this._client.send("DOM.describeNode",{objectId:this._remoteObject.objectId});return"string"!=typeof e.node.frameId?null:this._frameManager.frame(e.node.frameId)}async _scrollIntoViewIfNeeded(){const e=await this.evaluate((async(e,t)=>{if(!e.isConnected)return"Node is detached from document";if(e.nodeType!==Node.ELEMENT_NODE)return"Node is not of type HTMLElement";if(!t)return e.scrollIntoView({block:"center",inline:"center",behavior:"instant"}),!1;return 1!==await new Promise((t=>{const i=new IntersectionObserver((e=>{t(e[0].intersectionRatio),i.disconnect()}));i.observe(e)}))&&e.scrollIntoView({block:"center",inline:"center",behavior:"instant"}),!1}),this._page.isJavaScriptEnabled());if(e)throw new Error(e)}async _clickablePoint(){const[e,t]=await Promise.all([this._client.send("DOM.getContentQuads",{objectId:this._remoteObject.objectId}).catch(m),this._client.send("Page.getLayoutMetrics")]);if(!e||!e.quads.length)throw new Error("Node is either not visible or not an HTMLElement");const{clientWidth:i,clientHeight:n}=t.layoutViewport,s=e.quads.map((e=>this._fromProtocolQuad(e))).map((e=>this._intersectQuadWithViewport(e,i,n))).filter((e=>function(e){let t=0;for(let i=0;i<e.length;++i){const n=e[i],s=e[(i+1)%e.length];t+=(n.x*s.y-s.x*n.y)/2}return Math.abs(t)}(e)>1));if(!s.length)throw new Error("Node is either not visible or not an HTMLElement");const o=s[0];let a=0,r=0;for(const e of o)a+=e.x,r+=e.y;return{x:a/4,y:r/4}}_getBoxModel(){const e={objectId:this._remoteObject.objectId};return this._client.send("DOM.getBoxModel",e).catch((e=>m(e)))}_fromProtocolQuad(e){return[{x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},{x:e[6],y:e[7]}]}_intersectQuadWithViewport(e,t,i){return e.map((e=>({x:Math.min(Math.max(e.x,0),t),y:Math.min(Math.max(e.y,0),i)})))}async hover(){await this._scrollIntoViewIfNeeded();const{x:e,y:t}=await this._clickablePoint();await this._page.mouse.move(e,t)}async click(e={}){await this._scrollIntoViewIfNeeded();const{x:t,y:i}=await this._clickablePoint();await this._page.mouse.click(t,i,e)}async select(...t){for(const i of t)e(k.isString(i),'Values must be strings. Found value "'+i+'" of type "'+typeof i+'"');return this.evaluate(((e,t)=>{if("select"!==e.nodeName.toLowerCase())throw new Error("Element is not a <select> element.");const i=Array.from(e.options);e.value=void 0;for(const n of i)if(n.selected=t.includes(n.value),n.selected&&!e.multiple)break;return e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})),i.filter((e=>e.selected)).map((e=>e.value))}),t)}async uploadFile(...i){const n=await this.evaluate((e=>e.multiple));if(e(i.length<=1||n,"Multiple file uploads only work with <input type=file multiple>"),!t)throw new Error("JSHandle#uploadFile can only be used in Node environments.");const s=await import("path"),o=await k.importFSModule(),a=await Promise.all(i.map((async e=>{const t=s.resolve(e);try{await o.promises.access(t,o.constants.R_OK)}catch(t){if("ENOENT"===t.code)throw new Error(e+" does not exist or is not readable")}return t}))),{objectId:r}=this._remoteObject,{node:c}=await this._client.send("DOM.describeNode",{objectId:r}),{backendNodeId:d}=c;0===a.length?await this.evaluate((e=>{e.files=(new DataTransfer).files,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))})):await this._client.send("DOM.setFileInputFiles",{objectId:r,files:a,backendNodeId:d})}async tap(){await this._scrollIntoViewIfNeeded();const{x:e,y:t}=await this._clickablePoint();await this._page.touchscreen.tap(e,t)}async focus(){await this.evaluate((e=>e.focus()))}async type(e,t){await this.focus(),await this._page.keyboard.type(e,t)}async press(e,t){await this.focus(),await this._page.keyboard.press(e,t)}async boundingBox(){const e=await this._getBoxModel();if(!e)return null;const t=e.model.border,i=Math.min(t[0],t[2],t[4],t[6]),n=Math.min(t[1],t[3],t[5],t[7]);return{x:i,y:n,width:Math.max(t[0],t[2],t[4],t[6])-i,height:Math.max(t[1],t[3],t[5],t[7])-n}}async boxModel(){const e=await this._getBoxModel();if(!e)return null;const{content:t,padding:i,border:n,margin:s,width:o,height:a}=e.model;return{content:this._fromProtocolQuad(t),padding:this._fromProtocolQuad(i),border:this._fromProtocolQuad(n),margin:this._fromProtocolQuad(s),width:o,height:a}}async screenshot(t={}){let i=!1,n=await this.boundingBox();e(n,"Node is either not visible or not an HTMLElement");const s=this._page.viewport();if(s&&(n.width>s.width||n.height>s.height)){const e={width:Math.max(s.width,Math.ceil(n.width)),height:Math.max(s.height,Math.ceil(n.height))};await this._page.setViewport(Object.assign({},s,e)),i=!0}await this._scrollIntoViewIfNeeded(),n=await this.boundingBox(),e(n,"Node is either not visible or not an HTMLElement"),e(0!==n.width,"Node has 0 width."),e(0!==n.height,"Node has 0 height.");const{layoutViewport:{pageX:o,pageY:a}}=await this._client.send("Page.getLayoutMetrics"),r=Object.assign({},n);r.x+=o,r.y+=a;const c=await this._page.screenshot(Object.assign({},{clip:r},t));return i&&await this._page.setViewport(s),c}async $(e){const{updatedSelector:t,queryHandler:i}=D(e);return i.queryOne(this,t)}async $$(e){const{updatedSelector:t,queryHandler:i}=D(e);return i.queryAll(this,t)}async $eval(e,t,...i){const n=await this.$(e);if(!n)throw new Error(`Error: failed to find element matching selector "${e}"`);const s=await n.evaluate(t,...i);return await n.dispose(),s}async $$eval(e,t,...i){const{updatedSelector:n,queryHandler:s}=D(e),o=await s.queryAllArray(this,n),a=await o.evaluate(t,...i);return await o.dispose(),a}async $x(e){const t=await this.evaluateHandle(((e,t)=>{const i=(e.ownerDocument||e).evaluate(t,e,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE),n=[];let s;for(;s=i.iterateNext();)n.push(s);return n}),e),i=await t.getProperties();await t.dispose();const n=[];for(const e of i.values()){const t=e.asElement();t&&n.push(t)}return n}async isIntersectingViewport(){return await this.evaluate((async e=>await new Promise((t=>{const i=new IntersectionObserver((e=>{t(e[0].intersectionRatio),i.disconnect()}));i.observe(e)}))>0))}}const L=/^[\040\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$/m;class A{constructor(e,t,i){this._client=e,this._world=i,this._contextId=t.id}frame(){return this._world?this._world.frame():null}async evaluate(e,...t){return await this._evaluateInternal(!0,e,...t)}async evaluateHandle(e,...t){return this._evaluateInternal(!1,e,...t)}async _evaluateInternal(e,t,...i){const n="//# sourceURL=__puppeteer_evaluation_script__";if(k.isString(t)){const i=this._contextId,s=t,o=L.test(s)?s:s+"\n"+n,{exceptionDetails:a,result:r}=await this._client.send("Runtime.evaluate",{expression:o,contextId:i,returnByValue:e,awaitPromise:!0,userGesture:!0}).catch(c);if(a)throw new Error("Evaluation failed: "+k.getExceptionMessage(a));return e?k.valueFromRemoteObject(r):q(this,r)}if("function"!=typeof t)throw new Error(`Expected to get |string| or |function| as the first argument, but got "${t}" instead.`);let s,o=t.toString();try{new Function("("+o+")")}catch(e){o=o.startsWith("async ")?"async function "+o.substring("async ".length):"function "+o;try{new Function("("+o+")")}catch(e){throw new Error("Passed function is not well-serializable!")}}try{s=this._client.send("Runtime.callFunctionOn",{functionDeclaration:o+"\n"+n+"\n",executionContextId:this._contextId,arguments:i.map(function(e){if("bigint"==typeof e)return{unserializableValue:e.toString()+"n"};if(Object.is(e,-0))return{unserializableValue:"-0"};if(Object.is(e,1/0))return{unserializableValue:"Infinity"};if(Object.is(e,-1/0))return{unserializableValue:"-Infinity"};if(Object.is(e,NaN))return{unserializableValue:"NaN"};const t=e&&e instanceof K?e:null;if(t){if(t._context!==this)throw new Error("JSHandles can be evaluated only in the context they were created!");if(t._disposed)throw new Error("JSHandle is disposed!");return t._remoteObject.unserializableValue?{unserializableValue:t._remoteObject.unserializableValue}:t._remoteObject.objectId?{objectId:t._remoteObject.objectId}:{value:t._remoteObject.value}}return{value:e}}.bind(this)),returnByValue:e,awaitPromise:!0,userGesture:!0})}catch(e){throw e instanceof TypeError&&e.message.startsWith("Converting circular structure to JSON")&&(e.message+=" Are you passing a nested JSHandle?"),e}const{exceptionDetails:a,result:r}=await s.catch(c);if(a)throw new Error("Evaluation failed: "+k.getExceptionMessage(a));return e?k.valueFromRemoteObject(r):q(this,r);function c(e){if(e.message.includes("Object reference chain is too long"))return{result:{type:"undefined"}};if(e.message.includes("Object couldn't be returned by value"))return{result:{type:"undefined"}};if(e.message.endsWith("Cannot find context with specified id")||e.message.endsWith("Inspected target navigated or closed"))throw new Error("Execution context was destroyed, most likely because of a navigation.");throw e}}async queryObjects(t){e(!t._disposed,"Prototype JSHandle is disposed!"),e(t._remoteObject.objectId,"Prototype JSHandle must not be referencing primitive value");return q(this,(await this._client.send("Runtime.queryObjects",{prototypeObjectId:t._remoteObject.objectId})).objects)}async _adoptBackendNodeId(e){const{object:t}=await this._client.send("DOM.resolveNode",{backendNodeId:e,executionContextId:this._contextId});return q(this,t)}async _adoptElementHandle(t){e(t.executionContext()!==this,"Cannot adopt handle that already belongs to this execution context"),e(this._world,"Cannot adopt handle without DOMWorld");const i=await this._client.send("DOM.describeNode",{objectId:t._remoteObject.objectId});return this._adoptBackendNodeId(i.node.backendNodeId)}}class j{constructor(e){this._jsCoverage=new B(e),this._cssCoverage=new H(e)}async startJSCoverage(e={}){return await this._jsCoverage.start(e)}async stopJSCoverage(){return await this._jsCoverage.stop()}async startCSSCoverage(e={}){return await this._cssCoverage.start(e)}async stopCSSCoverage(){return await this._cssCoverage.stop()}}class B{constructor(e){this._enabled=!1,this._scriptURLs=new Map,this._scriptSources=new Map,this._eventListeners=[],this._resetOnNavigation=!1,this._reportAnonymousScripts=!1,this._client=e}async start(t={}){e(!this._enabled,"JSCoverage is already enabled");const{resetOnNavigation:i=!0,reportAnonymousScripts:n=!1}=t;this._resetOnNavigation=i,this._reportAnonymousScripts=n,this._enabled=!0,this._scriptURLs.clear(),this._scriptSources.clear(),this._eventListeners=[k.addEventListener(this._client,"Debugger.scriptParsed",this._onScriptParsed.bind(this)),k.addEventListener(this._client,"Runtime.executionContextsCleared",this._onExecutionContextsCleared.bind(this))],await Promise.all([this._client.send("Profiler.enable"),this._client.send("Profiler.startPreciseCoverage",{callCount:!1,detailed:!0}),this._client.send("Debugger.enable"),this._client.send("Debugger.setSkipAllPauses",{skip:!0})])}_onExecutionContextsCleared(){this._resetOnNavigation&&(this._scriptURLs.clear(),this._scriptSources.clear())}async _onScriptParsed(e){if("__puppeteer_evaluation_script__"!==e.url&&(e.url||this._reportAnonymousScripts))try{const t=await this._client.send("Debugger.getScriptSource",{scriptId:e.scriptId});this._scriptURLs.set(e.scriptId,e.url),this._scriptSources.set(e.scriptId,t.scriptSource)}catch(e){m(e)}}async stop(){e(this._enabled,"JSCoverage is not enabled"),this._enabled=!1;const t=await Promise.all([this._client.send("Profiler.takePreciseCoverage"),this._client.send("Profiler.stopPreciseCoverage"),this._client.send("Profiler.disable"),this._client.send("Debugger.disable")]);k.removeEventListeners(this._eventListeners);const i=[],n=t[0];for(const e of n.result){let t=this._scriptURLs.get(e.scriptId);!t&&this._reportAnonymousScripts&&(t="debugger://VM"+e.scriptId);const n=this._scriptSources.get(e.scriptId);if(void 0===n||void 0===t)continue;const s=[];for(const t of e.functions)s.push(...t.ranges);const o=W(s);i.push({url:t,ranges:o,text:n})}return i}}class H{constructor(e){this._enabled=!1,this._stylesheetURLs=new Map,this._stylesheetSources=new Map,this._eventListeners=[],this._resetOnNavigation=!1,this._reportAnonymousScripts=!1,this._client=e}async start(t={}){e(!this._enabled,"CSSCoverage is already enabled");const{resetOnNavigation:i=!0}=t;this._resetOnNavigation=i,this._enabled=!0,this._stylesheetURLs.clear(),this._stylesheetSources.clear(),this._eventListeners=[k.addEventListener(this._client,"CSS.styleSheetAdded",this._onStyleSheet.bind(this)),k.addEventListener(this._client,"Runtime.executionContextsCleared",this._onExecutionContextsCleared.bind(this))],await Promise.all([this._client.send("DOM.enable"),this._client.send("CSS.enable"),this._client.send("CSS.startRuleUsageTracking")])}_onExecutionContextsCleared(){this._resetOnNavigation&&(this._stylesheetURLs.clear(),this._stylesheetSources.clear())}async _onStyleSheet(e){const t=e.header;if(t.sourceURL)try{const e=await this._client.send("CSS.getStyleSheetText",{styleSheetId:t.styleSheetId});this._stylesheetURLs.set(t.styleSheetId,t.sourceURL),this._stylesheetSources.set(t.styleSheetId,e.text)}catch(e){m(e)}}async stop(){e(this._enabled,"CSSCoverage is not enabled"),this._enabled=!1;const t=await this._client.send("CSS.stopRuleUsageTracking");await Promise.all([this._client.send("CSS.disable"),this._client.send("DOM.disable")]),k.removeEventListeners(this._eventListeners);const i=new Map;for(const e of t.ruleUsage){let t=i.get(e.styleSheetId);t||(t=[],i.set(e.styleSheetId,t)),t.push({startOffset:e.startOffset,endOffset:e.endOffset,count:e.used?1:0})}const n=[];for(const e of this._stylesheetURLs.keys()){const t=this._stylesheetURLs.get(e),s=this._stylesheetSources.get(e),o=W(i.get(e)||[]);n.push({url:t,ranges:o,text:s})}return n}}function W(e){const t=[];for(const i of e)t.push({offset:i.startOffset,type:0,range:i}),t.push({offset:i.endOffset,type:1,range:i});t.sort(((e,t)=>{if(e.offset!==t.offset)return e.offset-t.offset;if(e.type!==t.type)return t.type-e.type;const i=e.range.endOffset-e.range.startOffset,n=t.range.endOffset-t.range.startOffset;return 0===e.type?n-i:i-n}));const i=[],n=[];let s=0;for(const e of t){if(i.length&&s<e.offset&&i[i.length-1]>0){const t=n.length?n[n.length-1]:null;t&&t.end===s?t.end=e.offset:n.push({start:s,end:e.offset})}s=e.offset,0===e.type?i.push(e.range.count):i.pop()}return n.filter((e=>e.end-e.start>1))}class ${constructor(e,t,i,n=""){this._handled=!1,this._client=e,this._type=t,this._message=i,this._defaultValue=n}type(){return this._type}message(){return this._message}defaultValue(){return this._defaultValue}async accept(t){e(!this._handled,"Cannot accept dialog which is already handled!"),this._handled=!0,await this._client.send("Page.handleJavaScriptDialog",{accept:!0,promptText:t})}async dismiss(){e(!this._handled,"Cannot dismiss dialog which is already handled!"),this._handled=!0,await this._client.send("Page.handleJavaScriptDialog",{accept:!1})}}class U{constructor(e){this._emulatingMobile=!1,this._hasTouch=!1,this._client=e}async emulateViewport(e){const t=e.isMobile||!1,i=e.width,n=e.height,s=e.deviceScaleFactor||1,o=e.isLandscape?{angle:90,type:"landscapePrimary"}:{angle:0,type:"portraitPrimary"},a=e.hasTouch||!1;await Promise.all([this._client.send("Emulation.setDeviceMetricsOverride",{mobile:t,width:i,height:n,deviceScaleFactor:s,screenOrientation:o}),this._client.send("Emulation.setTouchEmulationEnabled",{enabled:a})]);const r=this._emulatingMobile!==t||this._hasTouch!==a;return this._emulatingMobile=t,this._hasTouch=a,r}}class V{constructor(e,t){this._handled=!1,this._element=e,this._multiple="selectSingle"!==t.mode}isMultiple(){return this._multiple}async accept(t){e(!this._handled,"Cannot accept FileChooser which is already handled!"),this._handled=!0,await this._element.uploadFile(...t)}async cancel(){e(!this._handled,"Cannot cancel FileChooser which is already handled!"),this._handled=!0}}class z{constructor(e,t,i,n,s,o){this._failureText=null,this._response=null,this._fromMemoryCache=!1,this._interceptionHandled=!1,this._headers={},this._client=e,this._requestId=s.requestId,this._isNavigationRequest=s.requestId===s.loaderId&&"Document"===s.type,this._interceptionId=i,this._allowInterception=n,this._url=s.request.url,this._resourceType=s.type.toLowerCase(),this._method=s.request.method,this._postData=s.request.postData,this._frame=t,this._redirectChain=o;for(const e of Object.keys(s.request.headers))this._headers[e.toLowerCase()]=s.request.headers[e]}url(){return this._url}resourceType(){return this._resourceType}method(){return this._method}postData(){return this._postData}headers(){return this._headers}response(){return this._response}frame(){return this._frame}isNavigationRequest(){return this._isNavigationRequest}redirectChain(){return this._redirectChain.slice()}failure(){return this._failureText?{errorText:this._failureText}:null}async continue(t={}){if(this._url.startsWith("data:"))return;e(this._allowInterception,"Request Interception is not enabled!"),e(!this._interceptionHandled,"Request is already handled!");const{url:i,method:n,postData:s,headers:o}=t;this._interceptionHandled=!0;const a=s?Buffer.from(s).toString("base64"):void 0;await this._client.send("Fetch.continueRequest",{requestId:this._interceptionId,url:i,method:n,postData:a,headers:o?Q(o):void 0}).catch((e=>{m(e)}))}async respond(t){if(this._url.startsWith("data:"))return;e(this._allowInterception,"Request Interception is not enabled!"),e(!this._interceptionHandled,"Request is already handled!"),this._interceptionHandled=!0;const i=t.body&&k.isString(t.body)?Buffer.from(t.body):t.body||null,n={};if(t.headers)for(const e of Object.keys(t.headers))n[e.toLowerCase()]=t.headers[e];t.contentType&&(n["content-type"]=t.contentType),i&&!("content-length"in n)&&(n["content-length"]=String(Buffer.byteLength(i))),await this._client.send("Fetch.fulfillRequest",{requestId:this._interceptionId,responseCode:t.status||200,responsePhrase:X[t.status||200],responseHeaders:Q(n),body:i?i.toString("base64"):void 0}).catch((e=>{m(e)}))}async abort(t="failed"){if(this._url.startsWith("data:"))return;const i=J[t];e(i,"Unknown error code: "+t),e(this._allowInterception,"Request Interception is not enabled!"),e(!this._interceptionHandled,"Request is already handled!"),this._interceptionHandled=!0,await this._client.send("Fetch.failRequest",{requestId:this._interceptionId,errorReason:i}).catch((e=>{m(e)}))}}const J={aborted:"Aborted",accessdenied:"AccessDenied",addressunreachable:"AddressUnreachable",blockedbyclient:"BlockedByClient",blockedbyresponse:"BlockedByResponse",connectionaborted:"ConnectionAborted",connectionclosed:"ConnectionClosed",connectionfailed:"ConnectionFailed",connectionrefused:"ConnectionRefused",connectionreset:"ConnectionReset",internetdisconnected:"InternetDisconnected",namenotresolved:"NameNotResolved",timedout:"TimedOut",failed:"Failed"};function Q(e){const t=[];for(const i in e)Object.is(e[i],void 0)||t.push({name:i,value:e[i]+""});return t}const X={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Switch Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"};class G{constructor(e){this._subjectName=e.subjectName,this._issuer=e.issuer,this._validFrom=e.validFrom,this._validTo=e.validTo,this._protocol=e.protocol,this._sanList=e.sanList}issuer(){return this._issuer}validFrom(){return this._validFrom}validTo(){return this._validTo}protocol(){return this._protocol}subjectName(){return this._subjectName}subjectAlternativeNames(){return this._sanList}}class Y{constructor(e,t,i){this._contentPromise=null,this._headers={},this._client=e,this._request=t,this._bodyLoadedPromise=new Promise((e=>{this._bodyLoadedPromiseFulfill=e})),this._remoteAddress={ip:i.remoteIPAddress,port:i.remotePort},this._status=i.status,this._statusText=i.statusText,this._url=t.url(),this._fromDiskCache=!!i.fromDiskCache,this._fromServiceWorker=!!i.fromServiceWorker;for(const e of Object.keys(i.headers))this._headers[e.toLowerCase()]=i.headers[e];this._securityDetails=i.securityDetails?new G(i.securityDetails):null}_resolveBody(e){return this._bodyLoadedPromiseFulfill(e)}remoteAddress(){return this._remoteAddress}url(){return this._url}ok(){return 0===this._status||this._status>=200&&this._status<=299}status(){return this._status}statusText(){return this._statusText}headers(){return this._headers}securityDetails(){return this._securityDetails}buffer(){return this._contentPromise||(this._contentPromise=this._bodyLoadedPromise.then((async e=>{if(e)throw e;const t=await this._client.send("Network.getResponseBody",{requestId:this._request._requestId});return Buffer.from(t.body,t.base64Encoded?"base64":"utf8")}))),this._contentPromise}async text(){return(await this.buffer()).toString("utf8")}async json(){const e=await this.text();return JSON.parse(e)}request(){return this._request}fromCache(){return this._fromDiskCache||this._request._fromMemoryCache}fromServiceWorker(){return this._fromServiceWorker}frame(){return this._request.frame()}}const Z={Request:Symbol("NetworkManager.Request"),Response:Symbol("NetworkManager.Response"),RequestFailed:Symbol("NetworkManager.RequestFailed"),RequestFinished:Symbol("NetworkManager.RequestFinished")};class ee extends n{constructor(e,t,i){super(),this._requestIdToRequest=new Map,this._requestIdToRequestWillBeSentEvent=new Map,this._extraHTTPHeaders={},this._offline=!1,this._credentials=null,this._attemptedAuthentications=new Set,this._userRequestInterceptionEnabled=!1,this._protocolRequestInterceptionEnabled=!1,this._userCacheDisabled=!1,this._requestIdToInterceptionId=new Map,this._client=e,this._ignoreHTTPSErrors=t,this._frameManager=i,this._client.on("Fetch.requestPaused",this._onRequestPaused.bind(this)),this._client.on("Fetch.authRequired",this._onAuthRequired.bind(this)),this._client.on("Network.requestWillBeSent",this._onRequestWillBeSent.bind(this)),this._client.on("Network.requestServedFromCache",this._onRequestServedFromCache.bind(this)),this._client.on("Network.responseReceived",this._onResponseReceived.bind(this)),this._client.on("Network.loadingFinished",this._onLoadingFinished.bind(this)),this._client.on("Network.loadingFailed",this._onLoadingFailed.bind(this))}async initialize(){await this._client.send("Network.enable"),this._ignoreHTTPSErrors&&await this._client.send("Security.setIgnoreCertificateErrors",{ignore:!0})}async authenticate(e){this._credentials=e,await this._updateProtocolRequestInterception()}async setExtraHTTPHeaders(t){this._extraHTTPHeaders={};for(const i of Object.keys(t)){const n=t[i];e(k.isString(n),`Expected value of header "${i}" to be String, but "${typeof n}" is found.`),this._extraHTTPHeaders[i.toLowerCase()]=n}await this._client.send("Network.setExtraHTTPHeaders",{headers:this._extraHTTPHeaders})}extraHTTPHeaders(){return Object.assign({},this._extraHTTPHeaders)}async setOfflineMode(e){this._offline!==e&&(this._offline=e,await this._client.send("Network.emulateNetworkConditions",{offline:this._offline,latency:0,downloadThroughput:-1,uploadThroughput:-1}))}async setUserAgent(e){await this._client.send("Network.setUserAgentOverride",{userAgent:e})}async setCacheEnabled(e){this._userCacheDisabled=!e,await this._updateProtocolCacheDisabled()}async setRequestInterception(e){this._userRequestInterceptionEnabled=e,await this._updateProtocolRequestInterception()}async _updateProtocolRequestInterception(){const e=this._userRequestInterceptionEnabled||!!this._credentials;e!==this._protocolRequestInterceptionEnabled&&(this._protocolRequestInterceptionEnabled=e,e?await Promise.all([this._updateProtocolCacheDisabled(),this._client.send("Fetch.enable",{handleAuthRequests:!0,patterns:[{urlPattern:"*"}]})]):await Promise.all([this._updateProtocolCacheDisabled(),this._client.send("Fetch.disable")]))}async _updateProtocolCacheDisabled(){await this._client.send("Network.setCacheDisabled",{cacheDisabled:this._userCacheDisabled||this._protocolRequestInterceptionEnabled})}_onRequestWillBeSent(e){if(!this._protocolRequestInterceptionEnabled||e.request.url.startsWith("data:"))this._onRequest(e,null);else{const t=e.requestId,i=this._requestIdToInterceptionId.get(t);i?(this._onRequest(e,i),this._requestIdToInterceptionId.delete(t)):this._requestIdToRequestWillBeSentEvent.set(e.requestId,e)}}_onAuthRequired(e){let t="Default";this._attemptedAuthentications.has(e.requestId)?t="CancelAuth":this._credentials&&(t="ProvideCredentials",this._attemptedAuthentications.add(e.requestId));const{username:i,password:n}=this._credentials||{username:void 0,password:void 0};this._client.send("Fetch.continueWithAuth",{requestId:e.requestId,authChallengeResponse:{response:t,username:i,password:n}}).catch(m)}_onRequestPaused(e){!this._userRequestInterceptionEnabled&&this._protocolRequestInterceptionEnabled&&this._client.send("Fetch.continueRequest",{requestId:e.requestId}).catch(m);const t=e.networkId,i=e.requestId;if(t&&this._requestIdToRequestWillBeSentEvent.has(t)){const e=this._requestIdToRequestWillBeSentEvent.get(t);this._onRequest(e,i),this._requestIdToRequestWillBeSentEvent.delete(t)}else this._requestIdToInterceptionId.set(t,i)}_onRequest(e,t){let i=[];if(e.redirectResponse){const t=this._requestIdToRequest.get(e.requestId);t&&(this._handleRequestRedirect(t,e.redirectResponse),i=t._redirectChain)}const n=e.frameId?this._frameManager.frame(e.frameId):null,s=new z(this._client,n,t,this._userRequestInterceptionEnabled,e,i);this._requestIdToRequest.set(e.requestId,s),this.emit(Z.Request,s)}_onRequestServedFromCache(e){const t=this._requestIdToRequest.get(e.requestId);t&&(t._fromMemoryCache=!0)}_handleRequestRedirect(e,t){const i=new Y(this._client,e,t);e._response=i,e._redirectChain.push(e),i._resolveBody(new Error("Response body is unavailable for redirect responses")),this._requestIdToRequest.delete(e._requestId),this._attemptedAuthentications.delete(e._interceptionId),this.emit(Z.Response,i),this.emit(Z.RequestFinished,e)}_onResponseReceived(e){const t=this._requestIdToRequest.get(e.requestId);if(!t)return;const i=new Y(this._client,t,e.response);t._response=i,this.emit(Z.Response,i)}_onLoadingFinished(e){const t=this._requestIdToRequest.get(e.requestId);t&&(t.response()&&t.response()._resolveBody(null),this._requestIdToRequest.delete(t._requestId),this._attemptedAuthentications.delete(t._interceptionId),this.emit(Z.RequestFinished,t))}_onLoadingFailed(e){const t=this._requestIdToRequest.get(e.requestId);if(!t)return;t._failureText=e.errorText;const i=t.response();i&&i._resolveBody(null),this._requestIdToRequest.delete(t._requestId),this._attemptedAuthentications.delete(t._interceptionId),this.emit(Z.RequestFailed,t)}}const te=new Map([["load","load"],["domcontentloaded","DOMContentLoaded"],["networkidle0","networkIdle"],["networkidle2","networkAlmostIdle"]]);class ie{constructor(t,i,n,s){Array.isArray(n)?n=n.slice():"string"==typeof n&&(n=[n]),this._expectedLifecycle=n.map((t=>{const i=te.get(t);return e(i,"Unknown value for options.waitUntil: "+t),i})),this._frameManager=t,this._frame=i,this._initialLoaderId=i._loaderId,this._timeout=s,this._navigationRequest=null,this._eventListeners=[k.addEventListener(t._client,c.Disconnected,(()=>this._terminate(new Error("Navigation failed because browser has disconnected!")))),k.addEventListener(this._frameManager,ae.LifecycleEvent,this._checkLifecycleComplete.bind(this)),k.addEventListener(this._frameManager,ae.FrameNavigatedWithinDocument,this._navigatedWithinDocument.bind(this)),k.addEventListener(this._frameManager,ae.FrameDetached,this._onFrameDetached.bind(this)),k.addEventListener(this._frameManager.networkManager(),Z.Request,this._onRequest.bind(this))],this._sameDocumentNavigationPromise=new Promise((e=>{this._sameDocumentNavigationCompleteCallback=e})),this._lifecyclePromise=new Promise((e=>{this._lifecycleCallback=e})),this._newDocumentNavigationPromise=new Promise((e=>{this._newDocumentNavigationCompleteCallback=e})),this._timeoutPromise=this._createTimeoutPromise(),this._terminationPromise=new Promise((e=>{this._terminationCallback=e})),this._checkLifecycleComplete()}_onRequest(e){e.frame()===this._frame&&e.isNavigationRequest()&&(this._navigationRequest=e)}_onFrameDetached(e){this._frame!==e?this._checkLifecycleComplete():this._terminationCallback.call(null,new Error("Navigating frame was detached"))}navigationResponse(){return this._navigationRequest?this._navigationRequest.response():null}_terminate(e){this._terminationCallback.call(null,e)}sameDocumentNavigationPromise(){return this._sameDocumentNavigationPromise}newDocumentNavigationPromise(){return this._newDocumentNavigationPromise}lifecyclePromise(){return this._lifecyclePromise}timeoutOrTerminationPromise(){return Promise.race([this._timeoutPromise,this._terminationPromise])}_createTimeoutPromise(){if(!this._timeout)return new Promise((()=>{}));const e="Navigation timeout of "+this._timeout+" ms exceeded";return new Promise((e=>this._maximumTimer=setTimeout(e,this._timeout))).then((()=>new y(e)))}_navigatedWithinDocument(e){e===this._frame&&(this._hasSameDocumentNavigation=!0,this._checkLifecycleComplete())}_checkLifecycleComplete(){(function e(t,i){for(const e of i)if(!t._lifecycleEvents.has(e))return!1;for(const n of t.childFrames())if(!e(n,i))return!1;return!0})(this._frame,this._expectedLifecycle)&&(this._lifecycleCallback(),(this._frame._loaderId!==this._initialLoaderId||this._hasSameDocumentNavigation)&&(this._hasSameDocumentNavigation&&this._sameDocumentNavigationCompleteCallback(),this._frame._loaderId!==this._initialLoaderId&&this._newDocumentNavigationCompleteCallback()))}dispose(){k.removeEventListeners(this._eventListeners),clearTimeout(this._maximumTimer)}}class ne{constructor(e,t,i){this._documentPromise=null,this._contextPromise=null,this._contextResolveCallback=null,this._detached=!1,this._waitTasks=new Set,this._boundFunctions=new Map,this._ctxBindings=new Set,this._settingUpBinding=null,this._frameManager=e,this._frame=t,this._timeoutSettings=i,this._setContext(null),e._client.on("Runtime.bindingCalled",(e=>this._onBindingCalled(e)))}frame(){return this._frame}async _setContext(e){if(e){this._contextResolveCallback.call(null,e),this._contextResolveCallback=null;for(const e of this._waitTasks)e.rerun()}else this._documentPromise=null,this._contextPromise=new Promise((e=>{this._contextResolveCallback=e}))}_hasContext(){return!this._contextResolveCallback}_detach(){this._detached=!0;for(const e of this._waitTasks)e.terminate(new Error("waitForFunction failed: frame got detached."))}executionContext(){if(this._detached)throw new Error(`Execution context is not available in detached frame "${this._frame.url()}" (are you trying to evaluate?)`);return this._contextPromise}async evaluateHandle(e,...t){return(await this.executionContext()).evaluateHandle(e,...t)}async evaluate(e,...t){return(await this.executionContext()).evaluate(e,...t)}async $(e){const t=await this._document();return await t.$(e)}async _document(){return this._documentPromise||(this._documentPromise=this.executionContext().then((async e=>(await e.evaluateHandle("document")).asElement()))),this._documentPromise}async $x(e){const t=await this._document();return await t.$x(e)}async $eval(e,t,...i){return(await this._document()).$eval(e,t,...i)}async $$eval(e,t,...i){const n=await this._document();return await n.$$eval(e,t,...i)}async $$(e){const t=await this._document();return await t.$$(e)}async content(){return await this.evaluate((()=>{let e="";return document.doctype&&(e=(new XMLSerializer).serializeToString(document.doctype)),document.documentElement&&(e+=document.documentElement.outerHTML),e}))}async setContent(e,t={}){const{waitUntil:i=["load"],timeout:n=this._timeoutSettings.navigationTimeout()}=t;await this.evaluate((e=>{document.open(),document.write(e),document.close()}),e);const s=new ie(this._frameManager,this._frame,i,n),o=await Promise.race([s.timeoutOrTerminationPromise(),s.lifecyclePromise()]);if(s.dispose(),o)throw o}async addScriptTag(e){const{url:i=null,path:n=null,content:s=null,type:o=""}=e;if(null!==i)try{const e=await this.executionContext();return(await e.evaluateHandle((async function(e,t){const i=document.createElement("script");i.src=e,t&&(i.type=t);const n=new Promise(((e,t)=>{i.onload=e,i.onerror=t}));return document.head.appendChild(i),await n,i}),i,o)).asElement()}catch(e){throw new Error(`Loading script from ${i} failed`)}if(null!==n){if(!t)throw new Error("Cannot pass a filepath to addScriptTag in the browser environment.");const e=await k.importFSModule();let i=await e.promises.readFile(n,"utf8");i+="//# sourceURL="+n.replace(/\n/g,"");const s=await this.executionContext();return(await s.evaluateHandle(a,i,o)).asElement()}if(null!==s){const e=await this.executionContext();return(await e.evaluateHandle(a,s,o)).asElement()}throw new Error("Provide an object with a `url`, `path` or `content` property");function a(e,t="text/javascript"){const i=document.createElement("script");i.type=t,i.text=e;let n=null;if(i.onerror=e=>n=e,document.head.appendChild(i),n)throw n;return i}}async addStyleTag(e){const{url:i=null,path:n=null,content:s=null}=e;if(null!==i)try{const e=await this.executionContext();return(await e.evaluateHandle((async function(e){const t=document.createElement("link");t.rel="stylesheet",t.href=e;const i=new Promise(((e,i)=>{t.onload=e,t.onerror=i}));return document.head.appendChild(t),await i,t}),i)).asElement()}catch(e){throw new Error(`Loading style from ${i} failed`)}if(null!==n){if(!t)throw new Error("Cannot pass a filepath to addStyleTag in the browser environment.");const e=await k.importFSModule();let i=await e.promises.readFile(n,"utf8");i+="/*# sourceURL="+n.replace(/\n/g,"")+"*/";const s=await this.executionContext();return(await s.evaluateHandle(o,i)).asElement()}if(null!==s){const e=await this.executionContext();return(await e.evaluateHandle(o,s)).asElement()}throw new Error("Provide an object with a `url`, `path` or `content` property");async function o(e){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(e));const i=new Promise(((e,i)=>{t.onload=e,t.onerror=i}));return document.head.appendChild(t),await i,t}}async click(t,i){const n=await this.$(t);e(n,"No node found for selector: "+t),await n.click(i),await n.dispose()}async focus(t){const i=await this.$(t);e(i,"No node found for selector: "+t),await i.focus(),await i.dispose()}async hover(t){const i=await this.$(t);e(i,"No node found for selector: "+t),await i.hover(),await i.dispose()}async select(t,...i){const n=await this.$(t);e(n,"No node found for selector: "+t);const s=await n.select(...i);return await n.dispose(),s}async tap(e){const t=await this.$(e);await t.tap(),await t.dispose()}async type(t,i,n){const s=await this.$(t);e(s,"No node found for selector: "+t),await s.type(i,n),await s.dispose()}async waitForSelector(e,t){const{updatedSelector:i,queryHandler:n}=D(e);return n.waitFor(this,i,t)}async addBindingToContext(e,t){if(this._ctxBindings.has(ne.bindingIdentifier(t,e._contextId)))return;if(this._settingUpBinding)return await this._settingUpBinding,this.addBindingToContext(e,t);this._settingUpBinding=(async t=>{const i=k.pageBindingInitString("internal",t);try{await e._client.send("Runtime.addBinding",{name:t,executionContextId:e._contextId}),await e.evaluate(i)}catch(e){const t=e.message.includes("Execution context was destroyed"),i=e.message.includes("Cannot find context with specified id");return t||i?void 0:void m(e)}this._ctxBindings.add(ne.bindingIdentifier(t,e._contextId))})(t),await this._settingUpBinding,this._settingUpBinding=null}async _onBindingCalled(e){let t;if(!this._hasContext())return;const i=await this.executionContext();try{t=JSON.parse(e.payload)}catch{return}const{type:n,name:s,seq:o,args:a}=t;if("internal"===n&&this._ctxBindings.has(ne.bindingIdentifier(s,i._contextId))&&i._contextId===e.executionContextId)try{const e=await this._boundFunctions.get(s)(...a);await i.evaluate((function(e,t,i){globalThis[e].callbacks.get(t).resolve(i),globalThis[e].callbacks.delete(t)}),s,o,e)}catch(e){if(e.message.includes("Protocol error"))return;m(e)}}async waitForSelectorInPage(e,t,i,n){const{visible:s=!1,hidden:o=!1,timeout:a=this._timeoutSettings.timeout()}=i,r=s||o?"raf":"mutation",c=`selector \`${t}\`${o?" to be hidden":""}`;const d={domWorld:this,predicateBody:k.makePredicateString((async function(e,t,i){const n=predicateQueryHandler?await predicateQueryHandler(document,e):document.querySelector(e);return checkWaitForOptions(n,t,i)}),e),title:c,polling:r,timeout:a,args:[t,s,o],binding:n},l=new se(d),h=await l.promise,u=h.asElement();return u||(await h.dispose(),null)}async waitForXPath(e,t){const{visible:i=!1,hidden:n=!1,timeout:s=this._timeoutSettings.timeout()}=t,o=i||n?"raf":"mutation",a=`XPath \`${e}\`${n?" to be hidden":""}`;const r={domWorld:this,predicateBody:k.makePredicateString((function(e,t,i){const n=document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;return checkWaitForOptions(n,t,i)})),title:a,polling:o,timeout:s,args:[e,i,n]},c=new se(r),d=await c.promise,l=d.asElement();return l||(await d.dispose(),null)}waitForFunction(e,t={},...i){const{polling:n="raf",timeout:s=this._timeoutSettings.timeout()}=t;return new se({domWorld:this,predicateBody:e,title:"function",polling:n,timeout:s,args:i}).promise}async title(){return this.evaluate((()=>document.title))}}ne.bindingIdentifier=(e,t)=>`${e}_${t}`;class se{constructor(t){if(this._runCount=0,this._terminated=!1,k.isString(t.polling))e("raf"===t.polling||"mutation"===t.polling,"Unknown polling option: "+t.polling);else{if(!k.isNumber(t.polling))throw new Error("Unknown polling options: "+t.polling);e(t.polling>0,"Cannot poll with non-positive interval: "+t.polling)}var i;if(this._domWorld=t.domWorld,this._polling=t.polling,this._timeout=t.timeout,this._predicateBody=(i=t.predicateBody,k.isString(i)?`return (${i});`:`return (${i})(...args);`),this._args=t.args,this._binding=t.binding,this._runCount=0,this._domWorld._waitTasks.add(this),this._binding&&this._domWorld._boundFunctions.set(this._binding.name,this._binding.pptrFunction),this.promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t})),t.timeout){const e=new y(`waiting for ${t.title} failed: timeout ${t.timeout}ms exceeded`);this._timeoutTimer=setTimeout((()=>this.terminate(e)),t.timeout)}this.rerun()}terminate(e){this._terminated=!0,this._reject(e),this._cleanup()}async rerun(){const e=++this._runCount;let t=null,i=null;const n=await this._domWorld.executionContext();if(!this._terminated&&e===this._runCount&&(this._binding&&await this._domWorld.addBindingToContext(n,this._binding.name),!this._terminated&&e===this._runCount)){try{t=await n.evaluateHandle(oe,this._predicateBody,this._polling,this._timeout,...this._args)}catch(e){i=e}if(this._terminated||e!==this._runCount)t&&await t.dispose();else if(i||!await this._domWorld.evaluate((e=>!e),t).catch((()=>!0))){if(i){if(i.message.includes("TypeError: binding is not a function"))return this.rerun();if(i.message.includes("Execution context is not available in detached frame"))return void this.terminate(new Error("waitForFunction failed: frame got detached."));if(i.message.includes("Execution context was destroyed"))return;if(i.message.includes("Cannot find context with specified id"))return;this._reject(i)}else this._resolve(t);this._cleanup()}else await t.dispose()}}_cleanup(){clearTimeout(this._timeoutTimer),this._domWorld._waitTasks.delete(this)}}async function oe(e,t,i,...n){const s=new Function("...args",e);let o=!1;if(i&&setTimeout((()=>o=!0),i),"raf"===t)return await async function(){let e;const t=new Promise((t=>e=t));return await async function t(){if(o)return void e();const i=await s(...n);i?e(i):requestAnimationFrame(t)}(),t}();if("mutation"===t)return await async function(){const e=await s(...n);if(e)return Promise.resolve(e);let t;const i=new Promise((e=>t=e)),a=new MutationObserver((async()=>{o&&(a.disconnect(),t());const e=await s(...n);e&&(a.disconnect(),t(e))}));return a.observe(document,{childList:!0,subtree:!0,attributes:!0}),i}();if("number"==typeof t)return await async function(e){let t;const i=new Promise((e=>t=e));return await a(),i;async function a(){if(o)return void t();const i=await s(...n);i?t(i):setTimeout(a,e)}}(t)}const ae={FrameAttached:Symbol("FrameManager.FrameAttached"),FrameNavigated:Symbol("FrameManager.FrameNavigated"),FrameDetached:Symbol("FrameManager.FrameDetached"),LifecycleEvent:Symbol("FrameManager.LifecycleEvent"),FrameNavigatedWithinDocument:Symbol("FrameManager.FrameNavigatedWithinDocument"),ExecutionContextCreated:Symbol("FrameManager.ExecutionContextCreated"),ExecutionContextDestroyed:Symbol("FrameManager.ExecutionContextDestroyed")};class re extends n{constructor(e,t,i,n){super(),this._frames=new Map,this._contextIdToContext=new Map,this._isolatedWorlds=new Set,this._client=e,this._page=t,this._networkManager=new ee(e,i,this),this._timeoutSettings=n,this._client.on("Page.frameAttached",(e=>this._onFrameAttached(e.frameId,e.parentFrameId))),this._client.on("Page.frameNavigated",(e=>this._onFrameNavigated(e.frame))),this._client.on("Page.navigatedWithinDocument",(e=>this._onFrameNavigatedWithinDocument(e.frameId,e.url))),this._client.on("Page.frameDetached",(e=>this._onFrameDetached(e.frameId))),this._client.on("Page.frameStoppedLoading",(e=>this._onFrameStoppedLoading(e.frameId))),this._client.on("Runtime.executionContextCreated",(e=>this._onExecutionContextCreated(e.context))),this._client.on("Runtime.executionContextDestroyed",(e=>this._onExecutionContextDestroyed(e.executionContextId))),this._client.on("Runtime.executionContextsCleared",(()=>this._onExecutionContextsCleared())),this._client.on("Page.lifecycleEvent",(e=>this._onLifecycleEvent(e))),this._client.on("Target.attachedToTarget",(async e=>this._onFrameMoved(e)))}async initialize(){const e=await Promise.all([this._client.send("Page.enable"),this._client.send("Page.getFrameTree")]),{frameTree:t}=e[1];this._handleFrameTree(t),await Promise.all([this._client.send("Page.setLifecycleEventsEnabled",{enabled:!0}),this._client.send("Runtime.enable").then((()=>this._ensureIsolatedWorld("__puppeteer_utility_world__"))),this._networkManager.initialize()])}networkManager(){return this._networkManager}async navigateFrame(e,t,i={}){de(i);const{referer:n=this._networkManager.extraHTTPHeaders().referer,waitUntil:s=["load"],timeout:o=this._timeoutSettings.navigationTimeout()}=i,a=new ie(this,e,s,o);let r=!1,c=await Promise.race([async function(e,t,i,n){try{const s=await e.send("Page.navigate",{url:t,referrer:i,frameId:n});return r=!!s.loaderId,s.errorText?new Error(`${s.errorText} at ${t}`):null}catch(e){return e}}(this._client,t,n,e._id),a.timeoutOrTerminationPromise()]);if(c||(c=await Promise.race([a.timeoutOrTerminationPromise(),r?a.newDocumentNavigationPromise():a.sameDocumentNavigationPromise()])),a.dispose(),c)throw c;return a.navigationResponse()}async waitForFrameNavigation(e,t={}){de(t);const{waitUntil:i=["load"],timeout:n=this._timeoutSettings.navigationTimeout()}=t,s=new ie(this,e,i,n),o=await Promise.race([s.timeoutOrTerminationPromise(),s.sameDocumentNavigationPromise(),s.newDocumentNavigationPromise()]);if(s.dispose(),o)throw o;return s.navigationResponse()}async _onFrameMoved(e){"iframe"===e.targetInfo.type&&i("puppeteer:frame")(`The frame '${e.targetInfo.targetId}' moved to another session. Out-of-process iframes (OOPIF) are not supported by Puppeteer yet. https://github.com/puppeteer/puppeteer/issues/2548`)}_onLifecycleEvent(e){const t=this._frames.get(e.frameId);t&&(t._onLifecycleEvent(e.loaderId,e.name),this.emit(ae.LifecycleEvent,t))}_onFrameStoppedLoading(e){const t=this._frames.get(e);t&&(t._onLoadingStopped(),this.emit(ae.LifecycleEvent,t))}_handleFrameTree(e){if(e.frame.parentId&&this._onFrameAttached(e.frame.id,e.frame.parentId),this._onFrameNavigated(e.frame),e.childFrames)for(const t of e.childFrames)this._handleFrameTree(t)}page(){return this._page}mainFrame(){return this._mainFrame}frames(){return Array.from(this._frames.values())}frame(e){return this._frames.get(e)||null}_onFrameAttached(t,i){if(this._frames.has(t))return;e(i);const n=this._frames.get(i),s=new ce(this,n,t);this._frames.set(s._id,s),this.emit(ae.FrameAttached,s)}_onFrameNavigated(t){const i=!t.parentId;let n=i?this._mainFrame:this._frames.get(t.id);if(e(i||n,"We either navigate top level or have old version of the navigated frame"),n)for(const e of n.childFrames())this._removeFramesRecursively(e);i&&(n?(this._frames.delete(n._id),n._id=t.id):n=new ce(this,null,t.id),this._frames.set(t.id,n),this._mainFrame=n),n._navigated(t),this.emit(ae.FrameNavigated,n)}async _ensureIsolatedWorld(e){this._isolatedWorlds.has(e)||(this._isolatedWorlds.add(e),await this._client.send("Page.addScriptToEvaluateOnNewDocument",{source:"//# sourceURL=__puppeteer_evaluation_script__",worldName:e}),await Promise.all(this.frames().map((t=>this._client.send("Page.createIsolatedWorld",{frameId:t._id,grantUniveralAccess:!0,worldName:e}).catch(m)))))}_onFrameNavigatedWithinDocument(e,t){const i=this._frames.get(e);i&&(i._navigatedWithinDocument(t),this.emit(ae.FrameNavigatedWithinDocument,i),this.emit(ae.FrameNavigated,i))}_onFrameDetached(e){const t=this._frames.get(e);t&&this._removeFramesRecursively(t)}_onExecutionContextCreated(e){const t=e.auxData,i=t?t.frameId:null,n=this._frames.get(i)||null;let s=null;n&&(e.auxData&&e.auxData.isDefault?s=n._mainWorld:"__puppeteer_utility_world__"!==e.name||n._secondaryWorld._hasContext()||(s=n._secondaryWorld)),e.auxData&&"isolated"===e.auxData.type&&this._isolatedWorlds.add(e.name);const o=new A(this._client,e,s);s&&s._setContext(o),this._contextIdToContext.set(e.id,o)}_onExecutionContextDestroyed(e){const t=this._contextIdToContext.get(e);t&&(this._contextIdToContext.delete(e),t._world&&t._world._setContext(null))}_onExecutionContextsCleared(){for(const e of this._contextIdToContext.values())e._world&&e._world._setContext(null);this._contextIdToContext.clear()}executionContextById(t){const i=this._contextIdToContext.get(t);return e(i,"INTERNAL ERROR: missing context with id = "+t),i}_removeFramesRecursively(e){for(const t of e.childFrames())this._removeFramesRecursively(t);e._detach(),this._frames.delete(e._id),this.emit(ae.FrameDetached,e)}}class ce{constructor(e,t,i){this._url="",this._detached=!1,this._loaderId="",this._lifecycleEvents=new Set,this._frameManager=e,this._parentFrame=t,this._url="",this._id=i,this._detached=!1,this._loaderId="",this._mainWorld=new ne(e,this,e._timeoutSettings),this._secondaryWorld=new ne(e,this,e._timeoutSettings),this._childFrames=new Set,this._parentFrame&&this._parentFrame._childFrames.add(this)}async goto(e,t={}){return await this._frameManager.navigateFrame(this,e,t)}async waitForNavigation(e={}){return await this._frameManager.waitForFrameNavigation(this,e)}executionContext(){return this._mainWorld.executionContext()}async evaluateHandle(e,...t){return this._mainWorld.evaluateHandle(e,...t)}async evaluate(e,...t){return this._mainWorld.evaluate(e,...t)}async $(e){return this._mainWorld.$(e)}async $x(e){return this._mainWorld.$x(e)}async $eval(e,t,...i){return this._mainWorld.$eval(e,t,...i)}async $$eval(e,t,...i){return this._mainWorld.$$eval(e,t,...i)}async $$(e){return this._mainWorld.$$(e)}async content(){return this._secondaryWorld.content()}async setContent(e,t={}){return this._secondaryWorld.setContent(e,t)}name(){return this._name||""}url(){return this._url}parentFrame(){return this._parentFrame}childFrames(){return Array.from(this._childFrames)}isDetached(){return this._detached}async addScriptTag(e){return this._mainWorld.addScriptTag(e)}async addStyleTag(e){return this._mainWorld.addStyleTag(e)}async click(e,t={}){return this._secondaryWorld.click(e,t)}async focus(e){return this._secondaryWorld.focus(e)}async hover(e){return this._secondaryWorld.hover(e)}select(e,...t){return this._secondaryWorld.select(e,...t)}async tap(e){return this._secondaryWorld.tap(e)}async type(e,t,i){return this._mainWorld.type(e,t,i)}waitFor(e,t={},...i){if(console.warn("waitFor is deprecated and will be removed in a future release. See https://github.com/puppeteer/puppeteer/issues/6214 for details and how to migrate your code."),k.isString(e)){const i=e;return i.startsWith("//")?this.waitForXPath(i,t):this.waitForSelector(i,t)}return k.isNumber(e)?new Promise((t=>setTimeout(t,e))):"function"==typeof e?this.waitForFunction(e,t,...i):Promise.reject(new Error("Unsupported target type: "+typeof e))}waitForTimeout(e){return new Promise((t=>{setTimeout(t,e)}))}async waitForSelector(e,t={}){const i=await this._secondaryWorld.waitForSelector(e,t);if(!i)return null;const n=await this._mainWorld.executionContext(),s=await n._adoptElementHandle(i);return await i.dispose(),s}async waitForXPath(e,t={}){const i=await this._secondaryWorld.waitForXPath(e,t);if(!i)return null;const n=await this._mainWorld.executionContext(),s=await n._adoptElementHandle(i);return await i.dispose(),s}waitForFunction(e,t={},...i){return this._mainWorld.waitForFunction(e,t,...i)}async title(){return this._secondaryWorld.title()}_navigated(e){this._name=e.name,this._url=`${e.url}${e.urlFragment||""}`}_navigatedWithinDocument(e){this._url=e}_onLifecycleEvent(e,t){"init"===t&&(this._loaderId=e,this._lifecycleEvents.clear()),this._lifecycleEvents.add(t)}_onLoadingStopped(){this._lifecycleEvents.add("DOMContentLoaded"),this._lifecycleEvents.add("load")}_detach(){this._detached=!0,this._mainWorld._detach(),this._secondaryWorld._detach(),this._parentFrame&&this._parentFrame._childFrames.delete(this),this._parentFrame=null}}function de(t){e(void 0===t.networkIdleTimeout,"ERROR: networkIdleTimeout option is no longer supported."),e(void 0===t.networkIdleInflight,"ERROR: networkIdleInflight option is no longer supported."),e("networkidle"!==t.waitUntil,'ERROR: "networkidle" option is no longer supported. Use "networkidle2" instead')}const le={0:{keyCode:48,key:"0",code:"Digit0"},1:{keyCode:49,key:"1",code:"Digit1"},2:{keyCode:50,key:"2",code:"Digit2"},3:{keyCode:51,key:"3",code:"Digit3"},4:{keyCode:52,key:"4",code:"Digit4"},5:{keyCode:53,key:"5",code:"Digit5"},6:{keyCode:54,key:"6",code:"Digit6"},7:{keyCode:55,key:"7",code:"Digit7"},8:{keyCode:56,key:"8",code:"Digit8"},9:{keyCode:57,key:"9",code:"Digit9"},Power:{key:"Power",code:"Power"},Eject:{key:"Eject",code:"Eject"},Abort:{keyCode:3,code:"Abort",key:"Cancel"},Help:{keyCode:6,code:"Help",key:"Help"},Backspace:{keyCode:8,code:"Backspace",key:"Backspace"},Tab:{keyCode:9,code:"Tab",key:"Tab"},Numpad5:{keyCode:12,shiftKeyCode:101,key:"Clear",code:"Numpad5",shiftKey:"5",location:3},NumpadEnter:{keyCode:13,code:"NumpadEnter",key:"Enter",text:"\r",location:3},Enter:{keyCode:13,code:"Enter",key:"Enter",text:"\r"},"\r":{keyCode:13,code:"Enter",key:"Enter",text:"\r"},"\n":{keyCode:13,code:"Enter",key:"Enter",text:"\r"},ShiftLeft:{keyCode:16,code:"ShiftLeft",key:"Shift",location:1},ShiftRight:{keyCode:16,code:"ShiftRight",key:"Shift",location:2},ControlLeft:{keyCode:17,code:"ControlLeft",key:"Control",location:1},ControlRight:{keyCode:17,code:"ControlRight",key:"Control",location:2},AltLeft:{keyCode:18,code:"AltLeft",key:"Alt",location:1},AltRight:{keyCode:18,code:"AltRight",key:"Alt",location:2},Pause:{keyCode:19,code:"Pause",key:"Pause"},CapsLock:{keyCode:20,code:"CapsLock",key:"CapsLock"},Escape:{keyCode:27,code:"Escape",key:"Escape"},Convert:{keyCode:28,code:"Convert",key:"Convert"},NonConvert:{keyCode:29,code:"NonConvert",key:"NonConvert"},Space:{keyCode:32,code:"Space",key:" "},Numpad9:{keyCode:33,shiftKeyCode:105,key:"PageUp",code:"Numpad9",shiftKey:"9",location:3},PageUp:{keyCode:33,code:"PageUp",key:"PageUp"},Numpad3:{keyCode:34,shiftKeyCode:99,key:"PageDown",code:"Numpad3",shiftKey:"3",location:3},PageDown:{keyCode:34,code:"PageDown",key:"PageDown"},End:{keyCode:35,code:"End",key:"End"},Numpad1:{keyCode:35,shiftKeyCode:97,key:"End",code:"Numpad1",shiftKey:"1",location:3},Home:{keyCode:36,code:"Home",key:"Home"},Numpad7:{keyCode:36,shiftKeyCode:103,key:"Home",code:"Numpad7",shiftKey:"7",location:3},ArrowLeft:{keyCode:37,code:"ArrowLeft",key:"ArrowLeft"},Numpad4:{keyCode:37,shiftKeyCode:100,key:"ArrowLeft",code:"Numpad4",shiftKey:"4",location:3},Numpad8:{keyCode:38,shiftKeyCode:104,key:"ArrowUp",code:"Numpad8",shiftKey:"8",location:3},ArrowUp:{keyCode:38,code:"ArrowUp",key:"ArrowUp"},ArrowRight:{keyCode:39,code:"ArrowRight",key:"ArrowRight"},Numpad6:{keyCode:39,shiftKeyCode:102,key:"ArrowRight",code:"Numpad6",shiftKey:"6",location:3},Numpad2:{keyCode:40,shiftKeyCode:98,key:"ArrowDown",code:"Numpad2",shiftKey:"2",location:3},ArrowDown:{keyCode:40,code:"ArrowDown",key:"ArrowDown"},Select:{keyCode:41,code:"Select",key:"Select"},Open:{keyCode:43,code:"Open",key:"Execute"},PrintScreen:{keyCode:44,code:"PrintScreen",key:"PrintScreen"},Insert:{keyCode:45,code:"Insert",key:"Insert"},Numpad0:{keyCode:45,shiftKeyCode:96,key:"Insert",code:"Numpad0",shiftKey:"0",location:3},Delete:{keyCode:46,code:"Delete",key:"Delete"},NumpadDecimal:{keyCode:46,shiftKeyCode:110,code:"NumpadDecimal",key:"\0",shiftKey:".",location:3},Digit0:{keyCode:48,code:"Digit0",shiftKey:")",key:"0"},Digit1:{keyCode:49,code:"Digit1",shiftKey:"!",key:"1"},Digit2:{keyCode:50,code:"Digit2",shiftKey:"@",key:"2"},Digit3:{keyCode:51,code:"Digit3",shiftKey:"#",key:"3"},Digit4:{keyCode:52,code:"Digit4",shiftKey:"$",key:"4"},Digit5:{keyCode:53,code:"Digit5",shiftKey:"%",key:"5"},Digit6:{keyCode:54,code:"Digit6",shiftKey:"^",key:"6"},Digit7:{keyCode:55,code:"Digit7",shiftKey:"&",key:"7"},Digit8:{keyCode:56,code:"Digit8",shiftKey:"*",key:"8"},Digit9:{keyCode:57,code:"Digit9",shiftKey:"(",key:"9"},KeyA:{keyCode:65,code:"KeyA",shiftKey:"A",key:"a"},KeyB:{keyCode:66,code:"KeyB",shiftKey:"B",key:"b"},KeyC:{keyCode:67,code:"KeyC",shiftKey:"C",key:"c"},KeyD:{keyCode:68,code:"KeyD",shiftKey:"D",key:"d"},KeyE:{keyCode:69,code:"KeyE",shiftKey:"E",key:"e"},KeyF:{keyCode:70,code:"KeyF",shiftKey:"F",key:"f"},KeyG:{keyCode:71,code:"KeyG",shiftKey:"G",key:"g"},KeyH:{keyCode:72,code:"KeyH",shiftKey:"H",key:"h"},KeyI:{keyCode:73,code:"KeyI",shiftKey:"I",key:"i"},KeyJ:{keyCode:74,code:"KeyJ",shiftKey:"J",key:"j"},KeyK:{keyCode:75,code:"KeyK",shiftKey:"K",key:"k"},KeyL:{keyCode:76,code:"KeyL",shiftKey:"L",key:"l"},KeyM:{keyCode:77,code:"KeyM",shiftKey:"M",key:"m"},KeyN:{keyCode:78,code:"KeyN",shiftKey:"N",key:"n"},KeyO:{keyCode:79,code:"KeyO",shiftKey:"O",key:"o"},KeyP:{keyCode:80,code:"KeyP",shiftKey:"P",key:"p"},KeyQ:{keyCode:81,code:"KeyQ",shiftKey:"Q",key:"q"},KeyR:{keyCode:82,code:"KeyR",shiftKey:"R",key:"r"},KeyS:{keyCode:83,code:"KeyS",shiftKey:"S",key:"s"},KeyT:{keyCode:84,code:"KeyT",shiftKey:"T",key:"t"},KeyU:{keyCode:85,code:"KeyU",shiftKey:"U",key:"u"},KeyV:{keyCode:86,code:"KeyV",shiftKey:"V",key:"v"},KeyW:{keyCode:87,code:"KeyW",shiftKey:"W",key:"w"},KeyX:{keyCode:88,code:"KeyX",shiftKey:"X",key:"x"},KeyY:{keyCode:89,code:"KeyY",shiftKey:"Y",key:"y"},KeyZ:{keyCode:90,code:"KeyZ",shiftKey:"Z",key:"z"},MetaLeft:{keyCode:91,code:"MetaLeft",key:"Meta",location:1},MetaRight:{keyCode:92,code:"MetaRight",key:"Meta",location:2},ContextMenu:{keyCode:93,code:"ContextMenu",key:"ContextMenu"},NumpadMultiply:{keyCode:106,code:"NumpadMultiply",key:"*",location:3},NumpadAdd:{keyCode:107,code:"NumpadAdd",key:"+",location:3},NumpadSubtract:{keyCode:109,code:"NumpadSubtract",key:"-",location:3},NumpadDivide:{keyCode:111,code:"NumpadDivide",key:"/",location:3},F1:{keyCode:112,code:"F1",key:"F1"},F2:{keyCode:113,code:"F2",key:"F2"},F3:{keyCode:114,code:"F3",key:"F3"},F4:{keyCode:115,code:"F4",key:"F4"},F5:{keyCode:116,code:"F5",key:"F5"},F6:{keyCode:117,code:"F6",key:"F6"},F7:{keyCode:118,code:"F7",key:"F7"},F8:{keyCode:119,code:"F8",key:"F8"},F9:{keyCode:120,code:"F9",key:"F9"},F10:{keyCode:121,code:"F10",key:"F10"},F11:{keyCode:122,code:"F11",key:"F11"},F12:{keyCode:123,code:"F12",key:"F12"},F13:{keyCode:124,code:"F13",key:"F13"},F14:{keyCode:125,code:"F14",key:"F14"},F15:{keyCode:126,code:"F15",key:"F15"},F16:{keyCode:127,code:"F16",key:"F16"},F17:{keyCode:128,code:"F17",key:"F17"},F18:{keyCode:129,code:"F18",key:"F18"},F19:{keyCode:130,code:"F19",key:"F19"},F20:{keyCode:131,code:"F20",key:"F20"},F21:{keyCode:132,code:"F21",key:"F21"},F22:{keyCode:133,code:"F22",key:"F22"},F23:{keyCode:134,code:"F23",key:"F23"},F24:{keyCode:135,code:"F24",key:"F24"},NumLock:{keyCode:144,code:"NumLock",key:"NumLock"},ScrollLock:{keyCode:145,code:"ScrollLock",key:"ScrollLock"},AudioVolumeMute:{keyCode:173,code:"AudioVolumeMute",key:"AudioVolumeMute"},AudioVolumeDown:{keyCode:174,code:"AudioVolumeDown",key:"AudioVolumeDown"},AudioVolumeUp:{keyCode:175,code:"AudioVolumeUp",key:"AudioVolumeUp"},MediaTrackNext:{keyCode:176,code:"MediaTrackNext",key:"MediaTrackNext"},MediaTrackPrevious:{keyCode:177,code:"MediaTrackPrevious",key:"MediaTrackPrevious"},MediaStop:{keyCode:178,code:"MediaStop",key:"MediaStop"},MediaPlayPause:{keyCode:179,code:"MediaPlayPause",key:"MediaPlayPause"},Semicolon:{keyCode:186,code:"Semicolon",shiftKey:":",key:";"},Equal:{keyCode:187,code:"Equal",shiftKey:"+",key:"="},NumpadEqual:{keyCode:187,code:"NumpadEqual",key:"=",location:3},Comma:{keyCode:188,code:"Comma",shiftKey:"<",key:","},Minus:{keyCode:189,code:"Minus",shiftKey:"_",key:"-"},Period:{keyCode:190,code:"Period",shiftKey:">",key:"."},Slash:{keyCode:191,code:"Slash",shiftKey:"?",key:"/"},Backquote:{keyCode:192,code:"Backquote",shiftKey:"~",key:"`"},BracketLeft:{keyCode:219,code:"BracketLeft",shiftKey:"{",key:"["},Backslash:{keyCode:220,code:"Backslash",shiftKey:"|",key:"\\"},BracketRight:{keyCode:221,code:"BracketRight",shiftKey:"}",key:"]"},Quote:{keyCode:222,code:"Quote",shiftKey:'"',key:"'"},AltGraph:{keyCode:225,code:"AltGraph",key:"AltGraph"},Props:{keyCode:247,code:"Props",key:"CrSel"},Cancel:{keyCode:3,key:"Cancel",code:"Abort"},Clear:{keyCode:12,key:"Clear",code:"Numpad5",location:3},Shift:{keyCode:16,key:"Shift",code:"ShiftLeft",location:1},Control:{keyCode:17,key:"Control",code:"ControlLeft",location:1},Alt:{keyCode:18,key:"Alt",code:"AltLeft",location:1},Accept:{keyCode:30,key:"Accept"},ModeChange:{keyCode:31,key:"ModeChange"}," ":{keyCode:32,key:" ",code:"Space"},Print:{keyCode:42,key:"Print"},Execute:{keyCode:43,key:"Execute",code:"Open"},"\0":{keyCode:46,key:"\0",code:"NumpadDecimal",location:3},a:{keyCode:65,key:"a",code:"KeyA"},b:{keyCode:66,key:"b",code:"KeyB"},c:{keyCode:67,key:"c",code:"KeyC"},d:{keyCode:68,key:"d",code:"KeyD"},e:{keyCode:69,key:"e",code:"KeyE"},f:{keyCode:70,key:"f",code:"KeyF"},g:{keyCode:71,key:"g",code:"KeyG"},h:{keyCode:72,key:"h",code:"KeyH"},i:{keyCode:73,key:"i",code:"KeyI"},j:{keyCode:74,key:"j",code:"KeyJ"},k:{keyCode:75,key:"k",code:"KeyK"},l:{keyCode:76,key:"l",code:"KeyL"},m:{keyCode:77,key:"m",code:"KeyM"},n:{keyCode:78,key:"n",code:"KeyN"},o:{keyCode:79,key:"o",code:"KeyO"},p:{keyCode:80,key:"p",code:"KeyP"},q:{keyCode:81,key:"q",code:"KeyQ"},r:{keyCode:82,key:"r",code:"KeyR"},s:{keyCode:83,key:"s",code:"KeyS"},t:{keyCode:84,key:"t",code:"KeyT"},u:{keyCode:85,key:"u",code:"KeyU"},v:{keyCode:86,key:"v",code:"KeyV"},w:{keyCode:87,key:"w",code:"KeyW"},x:{keyCode:88,key:"x",code:"KeyX"},y:{keyCode:89,key:"y",code:"KeyY"},z:{keyCode:90,key:"z",code:"KeyZ"},Meta:{keyCode:91,key:"Meta",code:"MetaLeft",location:1},"*":{keyCode:106,key:"*",code:"NumpadMultiply",location:3},"+":{keyCode:107,key:"+",code:"NumpadAdd",location:3},"-":{keyCode:109,key:"-",code:"NumpadSubtract",location:3},"/":{keyCode:111,key:"/",code:"NumpadDivide",location:3},";":{keyCode:186,key:";",code:"Semicolon"},"=":{keyCode:187,key:"=",code:"Equal"},",":{keyCode:188,key:",",code:"Comma"},".":{keyCode:190,key:".",code:"Period"},"`":{keyCode:192,key:"`",code:"Backquote"},"[":{keyCode:219,key:"[",code:"BracketLeft"},"\\":{keyCode:220,key:"\\",code:"Backslash"},"]":{keyCode:221,key:"]",code:"BracketRight"},"'":{keyCode:222,key:"'",code:"Quote"},Attn:{keyCode:246,key:"Attn"},CrSel:{keyCode:247,key:"CrSel",code:"Props"},ExSel:{keyCode:248,key:"ExSel"},EraseEof:{keyCode:249,key:"EraseEof"},Play:{keyCode:250,key:"Play"},ZoomOut:{keyCode:251,key:"ZoomOut"},")":{keyCode:48,key:")",code:"Digit0"},"!":{keyCode:49,key:"!",code:"Digit1"},"@":{keyCode:50,key:"@",code:"Digit2"},"#":{keyCode:51,key:"#",code:"Digit3"},$:{keyCode:52,key:"$",code:"Digit4"},"%":{keyCode:53,key:"%",code:"Digit5"},"^":{keyCode:54,key:"^",code:"Digit6"},"&":{keyCode:55,key:"&",code:"Digit7"},"(":{keyCode:57,key:"(",code:"Digit9"},A:{keyCode:65,key:"A",code:"KeyA"},B:{keyCode:66,key:"B",code:"KeyB"},C:{keyCode:67,key:"C",code:"KeyC"},D:{keyCode:68,key:"D",code:"KeyD"},E:{keyCode:69,key:"E",code:"KeyE"},F:{keyCode:70,key:"F",code:"KeyF"},G:{keyCode:71,key:"G",code:"KeyG"},H:{keyCode:72,key:"H",code:"KeyH"},I:{keyCode:73,key:"I",code:"KeyI"},J:{keyCode:74,key:"J",code:"KeyJ"},K:{keyCode:75,key:"K",code:"KeyK"},L:{keyCode:76,key:"L",code:"KeyL"},M:{keyCode:77,key:"M",code:"KeyM"},N:{keyCode:78,key:"N",code:"KeyN"},O:{keyCode:79,key:"O",code:"KeyO"},P:{keyCode:80,key:"P",code:"KeyP"},Q:{keyCode:81,key:"Q",code:"KeyQ"},R:{keyCode:82,key:"R",code:"KeyR"},S:{keyCode:83,key:"S",code:"KeyS"},T:{keyCode:84,key:"T",code:"KeyT"},U:{keyCode:85,key:"U",code:"KeyU"},V:{keyCode:86,key:"V",code:"KeyV"},W:{keyCode:87,key:"W",code:"KeyW"},X:{keyCode:88,key:"X",code:"KeyX"},Y:{keyCode:89,key:"Y",code:"KeyY"},Z:{keyCode:90,key:"Z",code:"KeyZ"},":":{keyCode:186,key:":",code:"Semicolon"},"<":{keyCode:188,key:"<",code:"Comma"},_:{keyCode:189,key:"_",code:"Minus"},">":{keyCode:190,key:">",code:"Period"},"?":{keyCode:191,key:"?",code:"Slash"},"~":{keyCode:192,key:"~",code:"Backquote"},"{":{keyCode:219,key:"{",code:"BracketLeft"},"|":{keyCode:220,key:"|",code:"Backslash"},"}":{keyCode:221,key:"}",code:"BracketRight"},'"':{keyCode:222,key:'"',code:"Quote"},SoftLeft:{key:"SoftLeft",code:"SoftLeft",location:4},SoftRight:{key:"SoftRight",code:"SoftRight",location:4},Camera:{keyCode:44,key:"Camera",code:"Camera",location:4},Call:{key:"Call",code:"Call",location:4},EndCall:{keyCode:95,key:"EndCall",code:"EndCall",location:4},VolumeDown:{keyCode:182,key:"VolumeDown",code:"VolumeDown",location:4},VolumeUp:{keyCode:183,key:"VolumeUp",code:"VolumeUp",location:4}};class he{constructor(e){this._modifiers=0,this._pressedKeys=new Set,this._client=e}async down(e,t={text:void 0}){const i=this._keyDescriptionForString(e),n=this._pressedKeys.has(i.code);this._pressedKeys.add(i.code),this._modifiers|=this._modifierBit(i.key);const s=void 0===t.text?i.text:t.text;await this._client.send("Input.dispatchKeyEvent",{type:s?"keyDown":"rawKeyDown",modifiers:this._modifiers,windowsVirtualKeyCode:i.keyCode,code:i.code,key:i.key,text:s,unmodifiedText:s,autoRepeat:n,location:i.location,isKeypad:3===i.location})}_modifierBit(e){return"Alt"===e?1:"Control"===e?2:"Meta"===e?4:"Shift"===e?8:0}_keyDescriptionForString(t){const i=8&this._modifiers,n={key:"",keyCode:0,code:"",text:"",location:0},s=le[t];return e(s,`Unknown key: "${t}"`),s.key&&(n.key=s.key),i&&s.shiftKey&&(n.key=s.shiftKey),s.keyCode&&(n.keyCode=s.keyCode),i&&s.shiftKeyCode&&(n.keyCode=s.shiftKeyCode),s.code&&(n.code=s.code),s.location&&(n.location=s.location),1===n.key.length&&(n.text=n.key),s.text&&(n.text=s.text),i&&s.shiftText&&(n.text=s.shiftText),-9&this._modifiers&&(n.text=""),n}async up(e){const t=this._keyDescriptionForString(e);this._modifiers&=~this._modifierBit(t.key),this._pressedKeys.delete(t.code),await this._client.send("Input.dispatchKeyEvent",{type:"keyUp",modifiers:this._modifiers,key:t.key,windowsVirtualKeyCode:t.keyCode,code:t.code,location:t.location})}async sendCharacter(e){await this._client.send("Input.insertText",{text:e})}charIsKey(e){return!!le[e]}async type(e,t={}){const i=t.delay||null;for(const t of e)this.charIsKey(t)?await this.press(t,{delay:i}):(i&&await new Promise((e=>setTimeout(e,i))),await this.sendCharacter(t))}async press(e,t={}){const{delay:i=null}=t;await this.down(e,t),i&&await new Promise((e=>setTimeout(e,t.delay))),await this.up(e)}}class ue{constructor(e,t){this._x=0,this._y=0,this._button="none",this._client=e,this._keyboard=t}async move(e,t,i={}){const{steps:n=1}=i,s=this._x,o=this._y;this._x=e,this._y=t;for(let e=1;e<=n;e++)await this._client.send("Input.dispatchMouseEvent",{type:"mouseMoved",button:this._button,x:s+(this._x-s)*(e/n),y:o+(this._y-o)*(e/n),modifiers:this._keyboard._modifiers})}async click(e,t,i={}){const{delay:n=null}=i;null!==n?(await Promise.all([this.move(e,t),this.down(i)]),await new Promise((e=>setTimeout(e,n))),await this.up(i)):await Promise.all([this.move(e,t),this.down(i),this.up(i)])}async down(e={}){const{button:t="left",clickCount:i=1}=e;this._button=t,await this._client.send("Input.dispatchMouseEvent",{type:"mousePressed",button:t,x:this._x,y:this._y,modifiers:this._keyboard._modifiers,clickCount:i})}async up(e={}){const{button:t="left",clickCount:i=1}=e;this._button="none",await this._client.send("Input.dispatchMouseEvent",{type:"mouseReleased",button:t,x:this._x,y:this._y,modifiers:this._keyboard._modifiers,clickCount:i})}async wheel(e={}){const{deltaX:t=0,deltaY:i=0}=e;await this._client.send("Input.dispatchMouseEvent",{type:"mouseWheel",x:this._x,y:this._y,deltaX:t,deltaY:i,modifiers:this._keyboard._modifiers,pointerType:"mouse"})}}class ye{constructor(e,t){this._client=e,this._keyboard=t}async tap(e,t){const i=[{x:Math.round(e),y:Math.round(t)}];await this._client.send("Input.dispatchTouchEvent",{type:"touchStart",touchPoints:i,modifiers:this._keyboard._modifiers}),await this._client.send("Input.dispatchTouchEvent",{type:"touchEnd",touchPoints:[],modifiers:this._keyboard._modifiers})}}const me={letter:{width:8.5,height:11},legal:{width:8.5,height:14},tabloid:{width:11,height:17},ledger:{width:17,height:11},a0:{width:33.1,height:46.8},a1:{width:23.4,height:33.1},a2:{width:16.54,height:23.4},a3:{width:11.7,height:16.54},a4:{width:8.27,height:11.7},a5:{width:5.83,height:8.27},a6:{width:4.13,height:5.83}};class _e{constructor(){this._defaultTimeout=null,this._defaultNavigationTimeout=null}setDefaultTimeout(e){this._defaultTimeout=e}setDefaultNavigationTimeout(e){this._defaultNavigationTimeout=e}navigationTimeout(){return null!==this._defaultNavigationTimeout?this._defaultNavigationTimeout:null!==this._defaultTimeout?this._defaultTimeout:3e4}timeout(){return null!==this._defaultTimeout?this._defaultTimeout:3e4}}class pe{constructor(e){this._recording=!1,this._path="",this._client=e}async start(t={}){e(!this._recording,"Cannot start recording trace while already recording trace.");const i=["-*","devtools.timeline","v8.execute","disabled-by-default-devtools.timeline","disabled-by-default-devtools.timeline.frame","toplevel","blink.console","blink.user_timing","latencyInfo","disabled-by-default-devtools.timeline.stack","disabled-by-default-v8.cpu_profiler","disabled-by-default-v8.cpu_profiler.hires"],{path:n=null,screenshots:s=!1,categories:o=i}=t;s&&o.push("disabled-by-default-devtools.screenshot"),this._path=n,this._recording=!0,await this._client.send("Tracing.start",{transferMode:"ReturnAsStream",categories:o.join(",")})}async stop(){let e,t;const i=new Promise(((i,n)=>{e=i,t=n}));return this._client.once("Tracing.tracingComplete",(i=>{k.readProtocolStream(this._client,i.stream,this._path).then(e,t)})),await this._client.send("Tracing.end"),this._recording=!1,i}}class ge extends n{constructor(e,t,i,n){let s;super(),this._client=e,this._url=t,this._executionContextPromise=new Promise((e=>this._executionContextCallback=e)),this._client.once("Runtime.executionContextCreated",(async t=>{s=t=>new K(i,e,t);const i=new A(e,t.context,null);this._executionContextCallback(i)})),this._client.send("Runtime.enable").catch(m),this._client.on("Runtime.consoleAPICalled",(e=>i(e.type,e.args.map(s),e.stackTrace))),this._client.on("Runtime.exceptionThrown",(e=>n(e.exceptionDetails)))}url(){return this._url}async executionContext(){return this._executionContextPromise}async evaluate(e,...t){return(await this._executionContextPromise).evaluate(e,...t)}async evaluateHandle(e,...t){return(await this._executionContextPromise).evaluateHandle(e,...t)}}class fe{constructor(){this._chain=Promise.resolve(void 0)}postTask(e){const t=this._chain.then(e);return this._chain=t.catch((()=>{})),t}}class we extends n{constructor(e,t,i){super(),this._closed=!1,this._timeoutSettings=new _e,this._pageBindings=new Map,this._javascriptEnabled=!0,this._workers=new Map,this._fileChooserInterceptors=new Set,this._client=e,this._target=t,this._keyboard=new he(e),this._mouse=new ue(e,this._keyboard),this._touchscreen=new ye(e,this._keyboard),this._accessibility=new C(e),this._frameManager=new re(e,this,i,this._timeoutSettings),this._emulationManager=new U(e),this._tracing=new pe(e),this._coverage=new j(e),this._screenshotTaskQueue=new fe,this._viewport=null,e.on("Target.attachedToTarget",(t=>{if("worker"!==t.targetInfo.type)return void e.send("Target.detachFromTarget",{sessionId:t.sessionId}).catch(m);const i=r.fromSession(e).session(t.sessionId),n=new ge(i,t.targetInfo.url,this._addConsoleMessage.bind(this),this._handleException.bind(this));this._workers.set(t.sessionId,n),this.emit("workercreated",n)})),e.on("Target.detachedFromTarget",(e=>{const t=this._workers.get(e.sessionId);t&&(this.emit("workerdestroyed",t),this._workers.delete(e.sessionId))})),this._frameManager.on(ae.FrameAttached,(e=>this.emit("frameattached",e))),this._frameManager.on(ae.FrameDetached,(e=>this.emit("framedetached",e))),this._frameManager.on(ae.FrameNavigated,(e=>this.emit("framenavigated",e)));const n=this._frameManager.networkManager();n.on(Z.Request,(e=>this.emit("request",e))),n.on(Z.Response,(e=>this.emit("response",e))),n.on(Z.RequestFailed,(e=>this.emit("requestfailed",e))),n.on(Z.RequestFinished,(e=>this.emit("requestfinished",e))),this._fileChooserInterceptors=new Set,e.on("Page.domContentEventFired",(()=>this.emit("domcontentloaded"))),e.on("Page.loadEventFired",(()=>this.emit("load"))),e.on("Runtime.consoleAPICalled",(e=>this._onConsoleAPI(e))),e.on("Runtime.bindingCalled",(e=>this._onBindingCalled(e))),e.on("Page.javascriptDialogOpening",(e=>this._onDialog(e))),e.on("Runtime.exceptionThrown",(e=>this._handleException(e.exceptionDetails))),e.on("Inspector.targetCrashed",(()=>this._onTargetCrashed())),e.on("Performance.metrics",(e=>this._emitMetrics(e))),e.on("Log.entryAdded",(e=>this._onLogEntryAdded(e))),e.on("Page.fileChooserOpened",(e=>this._onFileChooser(e))),this._target._isClosedPromise.then((()=>{this.emit("close"),this._closed=!0}))}static async create(e,t,i,n){const s=new we(e,t,i);return await s._initialize(),n&&await s.setViewport(n),s}async _initialize(){await Promise.all([this._frameManager.initialize(),this._client.send("Target.setAutoAttach",{autoAttach:!0,waitForDebuggerOnStart:!1,flatten:!0}),this._client.send("Performance.enable"),this._client.send("Log.enable")])}async _onFileChooser(e){if(!this._fileChooserInterceptors.size)return;const t=this._frameManager.frame(e.frameId),i=await t.executionContext(),n=await i._adoptBackendNodeId(e.backendNodeId),s=Array.from(this._fileChooserInterceptors);this._fileChooserInterceptors.clear();const o=new V(n,e);for(const e of s)e.call(null,o)}isJavaScriptEnabled(){return this._javascriptEnabled}async waitForFileChooser(e={}){this._fileChooserInterceptors.size||await this._client.send("Page.setInterceptFileChooserDialog",{enabled:!0});const{timeout:t=this._timeoutSettings.timeout()}=e;let i;const n=new Promise((e=>i=e));return this._fileChooserInterceptors.add(i),k.waitWithTimeout(n,"waiting for file chooser",t).catch((e=>{throw this._fileChooserInterceptors.delete(i),e}))}async setGeolocation(e){const{longitude:t,latitude:i,accuracy:n=0}=e;if(t<-180||t>180)throw new Error(`Invalid longitude "${t}": precondition -180 <= LONGITUDE <= 180 failed.`);if(i<-90||i>90)throw new Error(`Invalid latitude "${i}": precondition -90 <= LATITUDE <= 90 failed.`);if(n<0)throw new Error(`Invalid accuracy "${n}": precondition 0 <= ACCURACY failed.`);await this._client.send("Emulation.setGeolocationOverride",{longitude:t,latitude:i,accuracy:n})}target(){return this._target}browser(){return this._target.browser()}browserContext(){return this._target.browserContext()}_onTargetCrashed(){this.emit("error",new Error("Page crashed!"))}_onLogEntryAdded(e){const{level:t,text:i,args:n,source:s,url:o,lineNumber:a}=e.entry;n&&n.map((e=>k.releaseObject(this._client,e))),"worker"!==s&&this.emit("console",new v(t,i,[],[{url:o,lineNumber:a}]))}mainFrame(){return this._frameManager.mainFrame()}get keyboard(){return this._keyboard}get touchscreen(){return this._touchscreen}get coverage(){return this._coverage}get tracing(){return this._tracing}get accessibility(){return this._accessibility}frames(){return this._frameManager.frames()}workers(){return Array.from(this._workers.values())}async setRequestInterception(e){return this._frameManager.networkManager().setRequestInterception(e)}setOfflineMode(e){return this._frameManager.networkManager().setOfflineMode(e)}setDefaultNavigationTimeout(e){this._timeoutSettings.setDefaultNavigationTimeout(e)}setDefaultTimeout(e){this._timeoutSettings.setDefaultTimeout(e)}async $(e){return this.mainFrame().$(e)}async evaluateHandle(e,...t){return(await this.mainFrame().executionContext()).evaluateHandle(e,...t)}async queryObjects(e){return(await this.mainFrame().executionContext()).queryObjects(e)}async $eval(e,t,...i){return this.mainFrame().$eval(e,t,...i)}async $$eval(e,t,...i){return this.mainFrame().$$eval(e,t,...i)}async $$(e){return this.mainFrame().$$(e)}async $x(e){return this.mainFrame().$x(e)}async cookies(...e){const t=(await this._client.send("Network.getCookies",{urls:e.length?e:[this.url()]})).cookies,i=["priority"];return t.map((e=>{for(const t of i)delete e[t];return e}))}async deleteCookie(...e){const t=this.url();for(const i of e){const e=Object.assign({},i);!i.url&&t.startsWith("http")&&(e.url=t),await this._client.send("Network.deleteCookies",e)}}async setCookie(...t){const i=this.url(),n=i.startsWith("http"),s=t.map((t=>{const s=Object.assign({},t);return!s.url&&n&&(s.url=i),e("about:blank"!==s.url,`Blank page can not have cookie "${s.name}"`),e(!String.prototype.startsWith.call(s.url||"","data:"),`Data URL page can not have cookie "${s.name}"`),s}));await this.deleteCookie(...s),s.length&&await this._client.send("Network.setCookies",{cookies:s})}async addScriptTag(e){return this.mainFrame().addScriptTag(e)}async addStyleTag(e){return this.mainFrame().addStyleTag(e)}async exposeFunction(e,t){if(this._pageBindings.has(e))throw new Error(`Failed to add page binding with name ${e}: window['${e}'] already exists!`);this._pageBindings.set(e,t);const i=k.pageBindingInitString("exposedFun",e);await this._client.send("Runtime.addBinding",{name:e}),await this._client.send("Page.addScriptToEvaluateOnNewDocument",{source:i}),await Promise.all(this.frames().map((e=>e.evaluate(i).catch(m))))}async authenticate(e){return this._frameManager.networkManager().authenticate(e)}async setExtraHTTPHeaders(e){return this._frameManager.networkManager().setExtraHTTPHeaders(e)}async setUserAgent(e){return this._frameManager.networkManager().setUserAgent(e)}async metrics(){const e=await this._client.send("Performance.getMetrics");return this._buildMetricsObject(e.metrics)}_emitMetrics(e){this.emit("metrics",{title:e.title,metrics:this._buildMetricsObject(e.metrics)})}_buildMetricsObject(e){const t={};for(const i of e||[])ke.has(i.name)&&(t[i.name]=i.value);return t}_handleException(e){const t=k.getExceptionMessage(e),i=new Error(t);i.stack="",this.emit("pageerror",i)}async _onConsoleAPI(e){if(0===e.executionContextId)return;const t=this._frameManager.executionContextById(e.executionContextId),i=e.args.map((e=>q(t,e)));this._addConsoleMessage(e.type,i,e.stackTrace)}async _onBindingCalled(e){let t;try{t=JSON.parse(e.payload)}catch{return}const{type:i,name:n,seq:s,args:o}=t;if("exposedFun"!==i||!this._pageBindings.has(n))return;let a=null;try{const e=await this._pageBindings.get(n)(...o);a=k.pageBindingDeliverResultString(n,s,e)}catch(e){a=e instanceof Error?k.pageBindingDeliverErrorString(n,s,e.message,e.stack):k.pageBindingDeliverErrorValueString(n,s,e)}this._client.send("Runtime.evaluate",{expression:a,contextId:e.executionContextId}).catch(m)}_addConsoleMessage(e,t,i){if(!this.listenerCount("console"))return void t.forEach((e=>e.dispose()));const n=[];for(const e of t){const t=e._remoteObject;t.objectId?n.push(e.toString()):n.push(k.valueFromRemoteObject(t))}const s=[];if(i)for(const e of i.callFrames)s.push({url:e.url,lineNumber:e.lineNumber,columnNumber:e.columnNumber});const o=new v(e,n.join(" "),t,s);this.emit("console",o)}_onDialog(t){let i=null;new Set(["alert","confirm","prompt","beforeunload"]).has(t.type)&&(i=t.type),e(i,"Unknown javascript dialog type: "+t.type);const n=new $(this._client,i,t.message,t.defaultPrompt);this.emit("dialog",n)}url(){return this.mainFrame().url()}async content(){return await this._frameManager.mainFrame().content()}async setContent(e,t={}){await this._frameManager.mainFrame().setContent(e,t)}async goto(e,t={}){return await this._frameManager.mainFrame().goto(e,t)}async reload(e){return(await Promise.all([this.waitForNavigation(e),this._client.send("Page.reload")]))[0]}async waitForNavigation(e={}){return await this._frameManager.mainFrame().waitForNavigation(e)}_sessionClosePromise(){return this._disconnectPromise||(this._disconnectPromise=new Promise((e=>this._client.once(c.Disconnected,(()=>e(new Error("Target closed"))))))),this._disconnectPromise}async waitForRequest(e,t={}){const{timeout:i=this._timeoutSettings.timeout()}=t;return k.waitForEvent(this._frameManager.networkManager(),Z.Request,(t=>k.isString(e)?e===t.url():"function"==typeof e&&!!e(t)),i,this._sessionClosePromise())}async waitForResponse(e,t={}){const{timeout:i=this._timeoutSettings.timeout()}=t;return k.waitForEvent(this._frameManager.networkManager(),Z.Response,(t=>k.isString(e)?e===t.url():"function"==typeof e&&!!e(t)),i,this._sessionClosePromise())}async goBack(e={}){return this._go(-1,e)}async goForward(e={}){return this._go(1,e)}async _go(e,t){const i=await this._client.send("Page.getNavigationHistory"),n=i.entries[i.currentIndex+e];if(!n)return null;return(await Promise.all([this.waitForNavigation(t),this._client.send("Page.navigateToHistoryEntry",{entryId:n.id})]))[0]}async bringToFront(){await this._client.send("Page.bringToFront")}async emulate(e){await Promise.all([this.setViewport(e.viewport),this.setUserAgent(e.userAgent)])}async setJavaScriptEnabled(e){this._javascriptEnabled!==e&&(this._javascriptEnabled=e,await this._client.send("Emulation.setScriptExecutionDisabled",{value:!e}))}async setBypassCSP(e){await this._client.send("Page.setBypassCSP",{enabled:e})}async emulateMediaType(t){e("screen"===t||"print"===t||null===t,"Unsupported media type: "+t),await this._client.send("Emulation.setEmulatedMedia",{media:t||""})}async emulateMediaFeatures(t){null===t&&await this._client.send("Emulation.setEmulatedMedia",{features:null}),Array.isArray(t)&&(t.every((t=>{const i=t.name;return e(/^prefers-(?:color-scheme|reduced-motion)$/.test(i),"Unsupported media feature: "+i),!0})),await this._client.send("Emulation.setEmulatedMedia",{features:t}))}async emulateTimezone(e){try{await this._client.send("Emulation.setTimezoneOverride",{timezoneId:e||""})}catch(t){if(t.message.includes("Invalid timezone"))throw new Error("Invalid timezone ID: "+e);throw t}}async emulateIdleState(e){e?await this._client.send("Emulation.setIdleOverride",{isUserActive:e.isUserActive,isScreenUnlocked:e.isScreenUnlocked}):await this._client.send("Emulation.clearIdleOverride")}async emulateVisionDeficiency(t){const i=new Set(["none","achromatopsia","blurredVision","deuteranopia","protanopia","tritanopia"]);try{e(!t||i.has(t),"Unsupported vision deficiency: "+t),await this._client.send("Emulation.setEmulatedVisionDeficiency",{type:t||"none"})}catch(e){throw e}}async setViewport(e){const t=await this._emulationManager.emulateViewport(e);this._viewport=e,t&&await this.reload()}viewport(){return this._viewport}async evaluate(e,...t){return this._frameManager.mainFrame().evaluate(e,...t)}async evaluateOnNewDocument(e,...t){const i=k.evaluationString(e,...t);await this._client.send("Page.addScriptToEvaluateOnNewDocument",{source:i})}async setCacheEnabled(e=!0){await this._frameManager.networkManager().setCacheEnabled(e)}async screenshot(t={}){let i=null;if(t.type)e("png"===t.type||"jpeg"===t.type,"Unknown options.type value: "+t.type),i=t.type;else if(t.path){const n=t.path,s=n.slice(n.lastIndexOf(".")+1).toLowerCase();"png"===s?i="png":"jpg"!==s&&"jpeg"!==s||(i="jpeg"),e(i,`Unsupported screenshot type for extension \`.${s}\``)}return i||(i="png"),t.quality&&(e("jpeg"===i,"options.quality is unsupported for the "+i+" screenshots"),e("number"==typeof t.quality,"Expected options.quality to be a number but found "+typeof t.quality),e(Number.isInteger(t.quality),"Expected options.quality to be an integer"),e(t.quality>=0&&t.quality<=100,"Expected options.quality to be between 0 and 100 (inclusive), got "+t.quality)),e(!t.clip||!t.fullPage,"options.clip and options.fullPage are exclusive"),t.clip&&(e("number"==typeof t.clip.x,"Expected options.clip.x to be a number but found "+typeof t.clip.x),e("number"==typeof t.clip.y,"Expected options.clip.y to be a number but found "+typeof t.clip.y),e("number"==typeof t.clip.width,"Expected options.clip.width to be a number but found "+typeof t.clip.width),e("number"==typeof t.clip.height,"Expected options.clip.height to be a number but found "+typeof t.clip.height),e(0!==t.clip.width,"Expected options.clip.width not to be 0."),e(0!==t.clip.height,"Expected options.clip.height not to be 0.")),this._screenshotTaskQueue.postTask((()=>this._screenshotTask(i,t)))}async _screenshotTask(e,i){await this._client.send("Target.activateTarget",{targetId:this._target._targetId});let n=i.clip?function(e){const t=Math.round(e.x),i=Math.round(e.y),n=Math.round(e.width+e.x-t),s=Math.round(e.height+e.y-i);return{x:t,y:i,width:n,height:s,scale:1}}(i.clip):void 0;if(i.fullPage){const e=await this._client.send("Page.getLayoutMetrics"),t=Math.ceil(e.contentSize.width),i=Math.ceil(e.contentSize.height);n={x:0,y:0,width:t,height:i,scale:1};const{isMobile:s=!1,deviceScaleFactor:o=1,isLandscape:a=!1}=this._viewport||{},r=a?{angle:90,type:"landscapePrimary"}:{angle:0,type:"portraitPrimary"};await this._client.send("Emulation.setDeviceMetricsOverride",{mobile:s,width:t,height:i,deviceScaleFactor:o,screenOrientation:r})}const s=i.omitBackground&&"png"===e;s&&await this._client.send("Emulation.setDefaultBackgroundColorOverride",{color:{r:0,g:0,b:0,a:0}});const o=await this._client.send("Page.captureScreenshot",{format:e,quality:i.quality,clip:n});s&&await this._client.send("Emulation.setDefaultBackgroundColorOverride"),i.fullPage&&this._viewport&&await this.setViewport(this._viewport);const a="base64"===i.encoding?o.data:Buffer.from(o.data,"base64");if(!t&&i.path)throw new Error("Screenshots can only be written to a file path in a Node environment.");const r=await k.importFSModule();return i.path&&await r.promises.writeFile(i.path,a),a}async pdf(t={}){const{scale:i=1,displayHeaderFooter:n=!1,headerTemplate:s="",footerTemplate:o="",printBackground:a=!1,landscape:r=!1,pageRanges:c="",preferCSSPageSize:d=!1,margin:l={},path:h=null}=t;let u=8.5,y=11;if(t.format){const i=me[t.format.toLowerCase()];e(i,"Unknown paper format: "+t.format),u=i.width,y=i.height}else u=be(t.width)||u,y=be(t.height)||y;const m=be(l.top)||0,_=be(l.left)||0,p=be(l.bottom)||0,g=be(l.right)||0,f=await this._client.send("Page.printToPDF",{transferMode:"ReturnAsStream",landscape:r,displayHeaderFooter:n,headerTemplate:s,footerTemplate:o,printBackground:a,scale:i,paperWidth:u,paperHeight:y,marginTop:m,marginBottom:p,marginLeft:_,marginRight:g,pageRanges:c,preferCSSPageSize:d});return await k.readProtocolStream(this._client,f.stream,h)}async title(){return this.mainFrame().title()}async close(t={runBeforeUnload:void 0}){e(!!this._client._connection,"Protocol error: Connection closed. Most likely the page has been closed.");!!t.runBeforeUnload?await this._client.send("Page.close"):(await this._client._connection.send("Target.closeTarget",{targetId:this._target._targetId}),await this._target._isClosedPromise)}isClosed(){return this._closed}get mouse(){return this._mouse}click(e,t={}){return this.mainFrame().click(e,t)}focus(e){return this.mainFrame().focus(e)}hover(e){return this.mainFrame().hover(e)}select(e,...t){return this.mainFrame().select(e,...t)}tap(e){return this.mainFrame().tap(e)}type(e,t,i){return this.mainFrame().type(e,t,i)}waitFor(e,t={},...i){return this.mainFrame().waitFor(e,t,...i)}waitForTimeout(e){return this.mainFrame().waitForTimeout(e)}waitForSelector(e,t={}){return this.mainFrame().waitForSelector(e,t)}waitForXPath(e,t={}){return this.mainFrame().waitForXPath(e,t)}waitForFunction(e,t={},...i){return this.mainFrame().waitForFunction(e,t,...i)}}const ke=new Set(["Timestamp","Documents","Frames","JSEventListeners","Nodes","LayoutCount","RecalcStyleCount","LayoutDuration","RecalcStyleDuration","ScriptDuration","TaskDuration","JSHeapUsedSize","JSHeapTotalSize"]),Ce={px:1,in:96,cm:37.8,mm:3.78};function be(t){if(void 0===t)return;let i;if(k.isNumber(t))i=t;else{if(!k.isString(t))throw new Error("page.pdf() Cannot handle parameter type: "+typeof t);{const n=t;let s=n.substring(n.length-2).toLowerCase(),o="";Ce.hasOwnProperty(s)?o=n.substring(0,n.length-2):(s="px",o=n);const a=Number(o);e(!isNaN(a),"Failed to parse parameter value: "+n),i=a*Ce[s]}}return i/96}class ve{constructor(e,t,i,n,s){this._targetInfo=e,this._browserContext=t,this._targetId=e.targetId,this._sessionFactory=i,this._ignoreHTTPSErrors=n,this._defaultViewport=s,this._pagePromise=null,this._workerPromise=null,this._initializedPromise=new Promise((e=>this._initializedCallback=e)).then((async e=>{if(!e)return!1;const t=this.opener();if(!t||!t._pagePromise||"page"!==this.type())return!0;const i=await t._pagePromise;if(!i.listenerCount("popup"))return!0;const n=await this.page();return i.emit("popup",n),!0})),this._isClosedPromise=new Promise((e=>this._closedCallback=e)),this._isInitialized="page"!==this._targetInfo.type||""!==this._targetInfo.url,this._isInitialized&&this._initializedCallback(!0)}createCDPSession(){return this._sessionFactory()}async page(){return"page"!==this._targetInfo.type&&"background_page"!==this._targetInfo.type&&"webview"!==this._targetInfo.type||this._pagePromise||(this._pagePromise=this._sessionFactory().then((e=>we.create(e,this,this._ignoreHTTPSErrors,this._defaultViewport)))),this._pagePromise}async worker(){return"service_worker"!==this._targetInfo.type&&"shared_worker"!==this._targetInfo.type?null:(this._workerPromise||(this._workerPromise=this._sessionFactory().then((e=>new ge(e,this._targetInfo.url,(()=>{}),(()=>{}))))),this._workerPromise)}url(){return this._targetInfo.url}type(){const e=this._targetInfo.type;return"page"===e||"background_page"===e||"service_worker"===e||"shared_worker"===e||"browser"===e||"webview"===e?e:"other"}browser(){return this._browserContext.browser()}browserContext(){return this._browserContext}opener(){const{openerId:e}=this._targetInfo;return e?this.browser()._targets.get(e):null}_targetInfoChanged(e){if(this._targetInfo=e,!this._isInitialized&&("page"!==this._targetInfo.type||""!==this._targetInfo.url))return this._isInitialized=!0,void this._initializedCallback(!0)}}class xe extends n{constructor(e,t,i,n,s,o){super(),this._ignoreHTTPSErrors=i,this._defaultViewport=n,this._process=s,this._connection=e,this._closeCallback=o||function(){},this._defaultContext=new Ie(this._connection,this,null),this._contexts=new Map;for(const e of t)this._contexts.set(e,new Ie(this._connection,this,e));this._targets=new Map,this._connection.on(a.Disconnected,(()=>this.emit("disconnected"))),this._connection.on("Target.targetCreated",this._targetCreated.bind(this)),this._connection.on("Target.targetDestroyed",this._targetDestroyed.bind(this)),this._connection.on("Target.targetInfoChanged",this._targetInfoChanged.bind(this))}static async create(e,t,i,n,s,o){const a=new xe(e,t,i,n,s,o);return await e.send("Target.setDiscoverTargets",{discover:!0}),a}process(){return this._process}async createIncognitoBrowserContext(){const{browserContextId:e}=await this._connection.send("Target.createBrowserContext"),t=new Ie(this._connection,this,e);return this._contexts.set(e,t),t}browserContexts(){return[this._defaultContext,...Array.from(this._contexts.values())]}defaultBrowserContext(){return this._defaultContext}async _disposeContext(e){await this._connection.send("Target.disposeBrowserContext",{browserContextId:e||void 0}),this._contexts.delete(e)}async _targetCreated(t){const i=t.targetInfo,{browserContextId:n}=i,s=n&&this._contexts.has(n)?this._contexts.get(n):this._defaultContext,o=new ve(i,s,(()=>this._connection.createSession(i)),this._ignoreHTTPSErrors,this._defaultViewport);e(!this._targets.has(t.targetInfo.targetId),"Target should not exist before targetCreated"),this._targets.set(t.targetInfo.targetId,o),await o._initializedPromise&&(this.emit("targetcreated",o),s.emit("targetcreated",o))}async _targetDestroyed(e){const t=this._targets.get(e.targetId);t._initializedCallback(!1),this._targets.delete(e.targetId),t._closedCallback(),await t._initializedPromise&&(this.emit("targetdestroyed",t),t.browserContext().emit("targetdestroyed",t))}_targetInfoChanged(t){const i=this._targets.get(t.targetInfo.targetId);e(i,"target should exist before targetInfoChanged");const n=i.url(),s=i._isInitialized;i._targetInfoChanged(t.targetInfo),s&&n!==i.url()&&(this.emit("targetchanged",i),i.browserContext().emit("targetchanged",i))}wsEndpoint(){return this._connection.url()}async newPage(){return this._defaultContext.newPage()}async _createPageInContext(t){const{targetId:i}=await this._connection.send("Target.createTarget",{url:"about:blank",browserContextId:t||void 0}),n=await this._targets.get(i);e(await n._initializedPromise,"Failed to create target for page");return await n.page()}targets(){return Array.from(this._targets.values()).filter((e=>e._isInitialized))}target(){return this.targets().find((e=>"browser"===e.type()))}async waitForTarget(e,t={}){const{timeout:i=3e4}=t,n=this.targets().find(e);if(n)return n;let s;const o=new Promise((e=>s=e));this.on("targetcreated",a),this.on("targetchanged",a);try{return i?await k.waitWithTimeout(o,"target",i):await o}finally{this.removeListener("targetcreated",a),this.removeListener("targetchanged",a)}function a(t){e(t)&&s(t)}}async pages(){return(await Promise.all(this.browserContexts().map((e=>e.pages())))).reduce(((e,t)=>e.concat(t)),[])}async version(){return(await this._getVersion()).product}async userAgent(){return(await this._getVersion()).userAgent}async close(){await this._closeCallback.call(null),this.disconnect()}disconnect(){this._connection.dispose()}isConnected(){return!this._connection._closed}_getVersion(){return this._connection.send("Browser.getVersion")}}class Ie extends n{constructor(e,t,i){super(),this._connection=e,this._browser=t,this._id=i}targets(){return this._browser.targets().filter((e=>e.browserContext()===this))}waitForTarget(e,t={}){return this._browser.waitForTarget((t=>t.browserContext()===this&&e(t)),t)}async pages(){return(await Promise.all(this.targets().filter((e=>"page"===e.type())).map((e=>e.page())))).filter((e=>!!e))}isIncognito(){return!!this._id}async overridePermissions(e,t){const i=new Map([["geolocation","geolocation"],["midi","midi"],["notifications","notifications"],["camera","videoCapture"],["microphone","audioCapture"],["background-sync","backgroundSync"],["ambient-light-sensor","sensors"],["accelerometer","sensors"],["gyroscope","sensors"],["magnetometer","sensors"],["accessibility-events","accessibilityEvents"],["clipboard-read","clipboardReadWrite"],["clipboard-write","clipboardReadWrite"],["payment-handler","paymentHandler"],["idle-detection","idleDetection"],["midi-sysex","midiSysex"]]),n=t.map((e=>{const t=i.get(e);if(!t)throw new Error("Unknown permission: "+e);return t}));await this._connection.send("Browser.grantPermissions",{origin:e,browserContextId:this._id||void 0,permissions:n})}async clearPermissionOverrides(){await this._connection.send("Browser.resetPermissions",{browserContextId:this._id||void 0})}newPage(){return this._browser._createPageInContext(this._id)}browser(){return this._browser}async close(){e(this._id,"Non-incognito profiles cannot be closed!"),await this._browser._disposeContext(this._id)}}export{xe as Browser,r as Connection};
|