rebrowser-playwright-core 1.49.1 → 1.64.1
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/ThirdPartyNotices.txt +7 -1228
- package/bin/install_webkit_wsl.ps1 +33 -0
- package/bin/reinstall_chrome_beta_linux.sh +1 -1
- package/bin/reinstall_chrome_beta_mac.sh +1 -1
- package/bin/reinstall_chrome_stable_linux.sh +1 -1
- package/bin/reinstall_chrome_stable_mac.sh +1 -1
- package/bin/reinstall_msedge_beta_linux.sh +7 -1
- package/bin/reinstall_msedge_beta_mac.sh +1 -1
- package/bin/reinstall_msedge_dev_linux.sh +7 -1
- package/bin/reinstall_msedge_dev_mac.sh +1 -1
- package/bin/reinstall_msedge_stable_linux.sh +7 -1
- package/bin/reinstall_msedge_stable_mac.sh +1 -1
- package/browsers.json +21 -34
- package/cli.js +5 -1
- package/index.js +2 -18
- package/lib/bootstrap.js +149 -0
- package/lib/coreBundle.js +78218 -0
- package/lib/entry/cliDaemon.js +5 -0
- package/lib/entry/dashboardApp.js +3 -0
- package/lib/entry/mcp.js +10 -0
- package/lib/entry/oopBrowserDownload.js +3 -0
- package/lib/package.js +50 -0
- package/lib/server/electron/loader.js +109 -43
- package/lib/serverRegistry.js +1939 -0
- package/lib/serverRegistry.js.LICENSE +65 -0
- package/lib/tools/cli-client/channelSessions.js +141 -0
- package/lib/tools/cli-client/cli.js +7 -0
- package/lib/tools/cli-client/help.json +808 -0
- package/lib/tools/cli-client/minimist.js +128 -0
- package/lib/tools/cli-client/output.js +352 -0
- package/lib/tools/cli-client/program.js +422 -0
- package/lib/tools/cli-client/registry.js +180 -0
- package/lib/tools/cli-client/session.js +261 -0
- package/lib/tools/dashboard/appIcon.png +0 -0
- package/lib/tools/skills/playwright-cli/SKILL.md +493 -0
- package/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
- package/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/lib/tools/skills/playwright-cli/references/pr-attachments.md +60 -0
- package/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
- package/lib/tools/skills/playwright-cli/references/running-code.md +245 -0
- package/lib/tools/skills/playwright-cli/references/session-management.md +227 -0
- package/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
- package/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
- package/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
- package/lib/tools/skills/playwright-cli/references/video-recording.md +216 -0
- package/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
- package/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
- package/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
- package/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
- package/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
- package/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
- package/lib/tools/skills/playwright-trace/SKILL.md +174 -0
- package/lib/tools/utils/extension.js +112 -0
- package/lib/tools/utils/socketConnection.js +108 -0
- package/lib/utilsBundle.js +86076 -79
- package/lib/utilsBundle.js.LICENSE +1890 -0
- package/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
- package/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
- package/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
- package/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
- package/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
- package/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
- package/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
- package/lib/vite/dashboard/index.html +29 -0
- package/lib/vite/dashboard/playwright-logo.svg +24 -0
- package/lib/vite/htmlReport/index.html +3 -56
- package/lib/vite/htmlReport/report.css +2 -0
- package/lib/vite/htmlReport/report.js +32 -0
- package/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/lib/vite/recorder/assets/codeMirrorModule-DK72OMRi.js +32 -0
- package/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
- package/lib/vite/recorder/assets/index-Cn0mmDuv.js +129 -0
- package/lib/vite/recorder/index.html +3 -3
- package/lib/vite/traceViewer/assets/codeMirrorModule-BEB2e8M3.js +32 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-D-g2vrvf.js +184 -0
- package/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
- package/lib/vite/traceViewer/assets/xtermModule-B794rD2Z.js +7 -0
- package/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
- package/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +1 -0
- package/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
- package/lib/vite/traceViewer/index.html +9 -11
- package/lib/vite/traceViewer/index.oNry3Hjv.js +1 -0
- package/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
- package/lib/vite/traceViewer/snapshot.html +4 -15
- package/lib/vite/traceViewer/sw.bundle.js +4 -3
- package/lib/vite/traceViewer/uiMode.CYwC_gH1.js +5 -0
- package/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
- package/lib/vite/traceViewer/uiMode.html +6 -8
- package/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
- package/lib/webp_codec.LICENSE +173 -0
- package/lib/webp_codec.wasm +0 -0
- package/lib/{utilsBundleImpl/xdg-open → xdg-open} +338 -137
- package/package.json +6 -16
- package/types/protocol.d.ts +9357 -6200
- package/types/structs.d.ts +8 -1
- package/types/types.d.ts +9490 -4947
- package/bin/PrintDeps.exe +0 -0
- package/bin/README.md +0 -2
- package/lib/androidServerImpl.js +0 -69
- package/lib/browserServerImpl.js +0 -92
- package/lib/cli/driver.js +0 -95
- package/lib/cli/program.js +0 -607
- package/lib/cli/programWithTestStub.js +0 -67
- package/lib/client/accessibility.js +0 -50
- package/lib/client/android.js +0 -473
- package/lib/client/api.js +0 -285
- package/lib/client/artifact.js +0 -79
- package/lib/client/browser.js +0 -145
- package/lib/client/browserContext.js +0 -559
- package/lib/client/browserType.js +0 -241
- package/lib/client/cdpSession.js +0 -53
- package/lib/client/channelOwner.js +0 -235
- package/lib/client/clientHelper.js +0 -57
- package/lib/client/clientInstrumentation.js +0 -50
- package/lib/client/clock.js +0 -68
- package/lib/client/connection.js +0 -333
- package/lib/client/consoleMessage.js +0 -55
- package/lib/client/coverage.js +0 -41
- package/lib/client/dialog.js +0 -57
- package/lib/client/download.js +0 -62
- package/lib/client/electron.js +0 -135
- package/lib/client/elementHandle.js +0 -321
- package/lib/client/errors.js +0 -77
- package/lib/client/eventEmitter.js +0 -314
- package/lib/client/events.js +0 -94
- package/lib/client/fetch.js +0 -391
- package/lib/client/fileChooser.js +0 -45
- package/lib/client/frame.js +0 -504
- package/lib/client/harRouter.js +0 -99
- package/lib/client/input.js +0 -111
- package/lib/client/jsHandle.js +0 -121
- package/lib/client/jsonPipe.js +0 -35
- package/lib/client/localUtils.js +0 -36
- package/lib/client/locator.js +0 -448
- package/lib/client/network.js +0 -767
- package/lib/client/page.js +0 -748
- package/lib/client/playwright.js +0 -80
- package/lib/client/selectors.js +0 -67
- package/lib/client/stream.js +0 -54
- package/lib/client/tracing.js +0 -147
- package/lib/client/types.js +0 -24
- package/lib/client/video.js +0 -51
- package/lib/client/waiter.js +0 -162
- package/lib/client/webError.js +0 -37
- package/lib/client/worker.js +0 -71
- package/lib/client/writableStream.js +0 -54
- package/lib/common/socksProxy.js +0 -569
- package/lib/common/timeoutSettings.js +0 -73
- package/lib/common/types.js +0 -5
- package/lib/generated/clockSource.js +0 -7
- package/lib/generated/consoleApiSource.js +0 -7
- package/lib/generated/injectedScriptSource.js +0 -7
- package/lib/generated/pollingRecorderSource.js +0 -7
- package/lib/generated/utilityScriptSource.js +0 -7
- package/lib/generated/webSocketMockSource.js +0 -7
- package/lib/image_tools/colorUtils.js +0 -98
- package/lib/image_tools/compare.js +0 -108
- package/lib/image_tools/imageChannel.js +0 -70
- package/lib/image_tools/stats.js +0 -102
- package/lib/inProcessFactory.js +0 -54
- package/lib/inprocess.js +0 -20
- package/lib/outofprocess.js +0 -67
- package/lib/protocol/debug.js +0 -27
- package/lib/protocol/serializers.js +0 -173
- package/lib/protocol/transport.js +0 -82
- package/lib/protocol/validator.js +0 -2780
- package/lib/protocol/validatorPrimitives.js +0 -139
- package/lib/remote/playwrightConnection.js +0 -274
- package/lib/remote/playwrightServer.js +0 -110
- package/lib/server/accessibility.js +0 -62
- package/lib/server/android/android.js +0 -441
- package/lib/server/android/backendAdb.js +0 -172
- package/lib/server/ariaSnapshot.js +0 -33
- package/lib/server/artifact.js +0 -104
- package/lib/server/bidi/bidiBrowser.js +0 -311
- package/lib/server/bidi/bidiChromium.js +0 -124
- package/lib/server/bidi/bidiConnection.js +0 -204
- package/lib/server/bidi/bidiExecutionContext.js +0 -156
- package/lib/server/bidi/bidiFirefox.js +0 -104
- package/lib/server/bidi/bidiInput.js +0 -158
- package/lib/server/bidi/bidiNetworkManager.js +0 -338
- package/lib/server/bidi/bidiOverCdp.js +0 -103
- package/lib/server/bidi/bidiPage.js +0 -529
- package/lib/server/bidi/bidiPdf.js +0 -140
- package/lib/server/bidi/third_party/bidiDeserializer.js +0 -93
- package/lib/server/bidi/third_party/bidiKeyboard.js +0 -238
- package/lib/server/bidi/third_party/bidiProtocol.js +0 -139
- package/lib/server/bidi/third_party/bidiSerializer.js +0 -144
- package/lib/server/bidi/third_party/firefoxPrefs.js +0 -221
- package/lib/server/browser.js +0 -148
- package/lib/server/browserContext.js +0 -667
- package/lib/server/browserType.js +0 -338
- package/lib/server/chromium/chromium.js +0 -354
- package/lib/server/chromium/chromiumSwitches.js +0 -46
- package/lib/server/chromium/crAccessibility.js +0 -237
- package/lib/server/chromium/crBrowser.js +0 -516
- package/lib/server/chromium/crConnection.js +0 -381
- package/lib/server/chromium/crCoverage.js +0 -246
- package/lib/server/chromium/crDevTools.js +0 -108
- package/lib/server/chromium/crDragDrop.js +0 -143
- package/lib/server/chromium/crExecutionContext.js +0 -136
- package/lib/server/chromium/crInput.js +0 -171
- package/lib/server/chromium/crNetworkManager.js +0 -767
- package/lib/server/chromium/crPage.js +0 -1143
- package/lib/server/chromium/crPdf.js +0 -153
- package/lib/server/chromium/crProtocolHelper.js +0 -133
- package/lib/server/chromium/crServiceWorker.js +0 -114
- package/lib/server/chromium/defaultFontFamilies.js +0 -145
- package/lib/server/chromium/videoRecorder.js +0 -155
- package/lib/server/clock.js +0 -125
- package/lib/server/codegen/csharp.js +0 -294
- package/lib/server/codegen/java.js +0 -232
- package/lib/server/codegen/javascript.js +0 -245
- package/lib/server/codegen/jsonl.js +0 -47
- package/lib/server/codegen/language.js +0 -88
- package/lib/server/codegen/languages.js +0 -30
- package/lib/server/codegen/python.js +0 -261
- package/lib/server/codegen/types.js +0 -5
- package/lib/server/console.js +0 -57
- package/lib/server/cookieStore.js +0 -185
- package/lib/server/debugController.js +0 -237
- package/lib/server/debugger.js +0 -132
- package/lib/server/deviceDescriptors.js +0 -26
- package/lib/server/deviceDescriptorsSource.json +0 -1669
- package/lib/server/dialog.js +0 -71
- package/lib/server/dispatchers/androidDispatcher.js +0 -204
- package/lib/server/dispatchers/artifactDispatcher.js +0 -118
- package/lib/server/dispatchers/browserContextDispatcher.js +0 -368
- package/lib/server/dispatchers/browserDispatcher.js +0 -170
- package/lib/server/dispatchers/browserTypeDispatcher.js +0 -55
- package/lib/server/dispatchers/cdpSessionDispatcher.js +0 -48
- package/lib/server/dispatchers/debugControllerDispatcher.js +0 -103
- package/lib/server/dispatchers/dialogDispatcher.js +0 -44
- package/lib/server/dispatchers/dispatcher.js +0 -395
- package/lib/server/dispatchers/electronDispatcher.js +0 -93
- package/lib/server/dispatchers/elementHandlerDispatcher.js +0 -228
- package/lib/server/dispatchers/frameDispatcher.js +0 -293
- package/lib/server/dispatchers/jsHandleDispatcher.js +0 -97
- package/lib/server/dispatchers/jsonPipeDispatcher.js +0 -59
- package/lib/server/dispatchers/localUtilsDispatcher.js +0 -413
- package/lib/server/dispatchers/networkDispatchers.js +0 -221
- package/lib/server/dispatchers/pageDispatcher.js +0 -367
- package/lib/server/dispatchers/playwrightDispatcher.js +0 -107
- package/lib/server/dispatchers/selectorsDispatcher.js +0 -36
- package/lib/server/dispatchers/streamDispatcher.js +0 -62
- package/lib/server/dispatchers/tracingDispatcher.js +0 -64
- package/lib/server/dispatchers/webSocketRouteDispatcher.js +0 -189
- package/lib/server/dispatchers/writableStreamDispatcher.js +0 -58
- package/lib/server/dom.js +0 -888
- package/lib/server/download.js +0 -60
- package/lib/server/electron/electron.js +0 -296
- package/lib/server/errors.js +0 -68
- package/lib/server/fetch.js +0 -669
- package/lib/server/fileChooser.js +0 -42
- package/lib/server/fileUploadUtils.js +0 -75
- package/lib/server/firefox/ffAccessibility.js +0 -216
- package/lib/server/firefox/ffBrowser.js +0 -460
- package/lib/server/firefox/ffConnection.js +0 -168
- package/lib/server/firefox/ffExecutionContext.js +0 -123
- package/lib/server/firefox/ffInput.js +0 -150
- package/lib/server/firefox/ffNetworkManager.js +0 -233
- package/lib/server/firefox/ffPage.js +0 -559
- package/lib/server/firefox/firefox.js +0 -99
- package/lib/server/formData.js +0 -75
- package/lib/server/frameSelectors.js +0 -171
- package/lib/server/frames.js +0 -1691
- package/lib/server/har/harRecorder.js +0 -139
- package/lib/server/har/harTracer.js +0 -542
- package/lib/server/helper.js +0 -103
- package/lib/server/index.js +0 -108
- package/lib/server/input.js +0 -310
- package/lib/server/instrumentation.js +0 -70
- package/lib/server/isomorphic/utilityScriptSerializers.js +0 -226
- package/lib/server/javascript.js +0 -293
- package/lib/server/launchApp.js +0 -91
- package/lib/server/macEditingCommands.js +0 -139
- package/lib/server/network.js +0 -617
- package/lib/server/page.js +0 -873
- package/lib/server/pipeTransport.js +0 -85
- package/lib/server/playwright.js +0 -88
- package/lib/server/progress.js +0 -99
- package/lib/server/protocolError.js +0 -49
- package/lib/server/recorder/contextRecorder.js +0 -299
- package/lib/server/recorder/recorderApp.js +0 -187
- package/lib/server/recorder/recorderCollection.js +0 -116
- package/lib/server/recorder/recorderFrontend.js +0 -5
- package/lib/server/recorder/recorderInTraceViewer.js +0 -144
- package/lib/server/recorder/recorderRunner.js +0 -155
- package/lib/server/recorder/recorderUtils.js +0 -113
- package/lib/server/recorder/throttledFile.js +0 -46
- package/lib/server/recorder.js +0 -364
- package/lib/server/registry/browserFetcher.js +0 -168
- package/lib/server/registry/dependencies.js +0 -322
- package/lib/server/registry/index.js +0 -1052
- package/lib/server/registry/nativeDeps.js +0 -493
- package/lib/server/registry/oopDownloadBrowserMain.js +0 -138
- package/lib/server/screenshotter.js +0 -348
- package/lib/server/selectors.js +0 -73
- package/lib/server/socksClientCertificatesInterceptor.js +0 -340
- package/lib/server/socksInterceptor.js +0 -100
- package/lib/server/trace/recorder/snapshotter.js +0 -161
- package/lib/server/trace/recorder/snapshotterInjected.js +0 -511
- package/lib/server/trace/recorder/tracing.js +0 -596
- package/lib/server/trace/test/inMemorySnapshotter.js +0 -93
- package/lib/server/trace/viewer/traceViewer.js +0 -214
- package/lib/server/transport.js +0 -191
- package/lib/server/types.js +0 -24
- package/lib/server/usKeyboardLayout.js +0 -555
- package/lib/server/webkit/webkit.js +0 -87
- package/lib/server/webkit/wkAccessibility.js +0 -194
- package/lib/server/webkit/wkBrowser.js +0 -329
- package/lib/server/webkit/wkConnection.js +0 -173
- package/lib/server/webkit/wkExecutionContext.js +0 -130
- package/lib/server/webkit/wkInput.js +0 -169
- package/lib/server/webkit/wkInterceptableRequest.js +0 -162
- package/lib/server/webkit/wkPage.js +0 -1225
- package/lib/server/webkit/wkProvisionalPage.js +0 -94
- package/lib/server/webkit/wkWorkers.js +0 -104
- package/lib/third_party/pixelmatch.js +0 -255
- package/lib/utils/ascii.js +0 -31
- package/lib/utils/comparators.js +0 -153
- package/lib/utils/crypto.js +0 -171
- package/lib/utils/debug.js +0 -46
- package/lib/utils/debugLogger.js +0 -91
- package/lib/utils/env.js +0 -49
- package/lib/utils/eventsHelper.js +0 -38
- package/lib/utils/expectUtils.js +0 -33
- package/lib/utils/fileUtils.js +0 -205
- package/lib/utils/happy-eyeballs.js +0 -194
- package/lib/utils/headers.js +0 -52
- package/lib/utils/hostPlatform.js +0 -139
- package/lib/utils/httpServer.js +0 -237
- package/lib/utils/index.js +0 -368
- package/lib/utils/isomorphic/ariaSnapshot.js +0 -267
- package/lib/utils/isomorphic/cssParser.js +0 -250
- package/lib/utils/isomorphic/cssTokenizer.js +0 -979
- package/lib/utils/isomorphic/locatorGenerators.js +0 -660
- package/lib/utils/isomorphic/locatorParser.js +0 -179
- package/lib/utils/isomorphic/locatorUtils.js +0 -62
- package/lib/utils/isomorphic/mimeType.js +0 -29
- package/lib/utils/isomorphic/recorderUtils.js +0 -227
- package/lib/utils/isomorphic/selectorParser.js +0 -397
- package/lib/utils/isomorphic/stringUtils.js +0 -169
- package/lib/utils/isomorphic/traceUtils.js +0 -39
- package/lib/utils/isomorphic/urlMatch.js +0 -124
- package/lib/utils/linuxUtils.js +0 -78
- package/lib/utils/manualPromise.js +0 -109
- package/lib/utils/multimap.js +0 -75
- package/lib/utils/network.js +0 -160
- package/lib/utils/processLauncher.js +0 -248
- package/lib/utils/profiler.js +0 -53
- package/lib/utils/rtti.js +0 -44
- package/lib/utils/semaphore.js +0 -51
- package/lib/utils/sequence.js +0 -64
- package/lib/utils/spawnAsync.js +0 -45
- package/lib/utils/stackTrace.js +0 -134
- package/lib/utils/task.js +0 -58
- package/lib/utils/time.js +0 -37
- package/lib/utils/timeoutRunner.js +0 -66
- package/lib/utils/traceUtils.js +0 -44
- package/lib/utils/userAgent.js +0 -105
- package/lib/utils/wsServer.js +0 -127
- package/lib/utils/zipFile.js +0 -75
- package/lib/utils/zones.js +0 -71
- package/lib/utilsBundleImpl/index.js +0 -210
- package/lib/vite/recorder/assets/codeMirrorModule-C5j27SYZ.js +0 -24
- package/lib/vite/recorder/assets/codeMirrorModule-ez37Vkbh.css +0 -1
- package/lib/vite/recorder/assets/index-iA1aAGZg.css +0 -1
- package/lib/vite/recorder/assets/index-m0XdVJHe.js +0 -184
- package/lib/vite/traceViewer/assets/codeMirrorModule-BBCX0spr.js +0 -24
- package/lib/vite/traceViewer/assets/inspectorTab-B4Iw34Ow.js +0 -68
- package/lib/vite/traceViewer/assets/testServerConnection-DeE2kSzz.js +0 -1
- package/lib/vite/traceViewer/assets/workbench-DFlGYqou.js +0 -9
- package/lib/vite/traceViewer/assets/xtermModule-BeNbaIVa.js +0 -9
- package/lib/vite/traceViewer/codeMirrorModule.ez37Vkbh.css +0 -1
- package/lib/vite/traceViewer/embedded.CmarehFk.js +0 -2
- package/lib/vite/traceViewer/embedded.html +0 -18
- package/lib/vite/traceViewer/embedded.w7WN2u1R.css +0 -1
- package/lib/vite/traceViewer/index.CrbWWHbf.css +0 -1
- package/lib/vite/traceViewer/index.FBucu_gE.js +0 -2
- package/lib/vite/traceViewer/inspectorTab.DEOUW62d.css +0 -1
- package/lib/vite/traceViewer/recorder.B_SY1GJM.css +0 -0
- package/lib/vite/traceViewer/recorder.CW_rzcEp.js +0 -2
- package/lib/vite/traceViewer/recorder.html +0 -17
- package/lib/vite/traceViewer/uiMode.CDUVjusr.js +0 -5
- package/lib/vite/traceViewer/uiMode.voC1ZiOQ.css +0 -1
- package/lib/vite/traceViewer/workbench.C-zR9ysA.css +0 -1
- package/lib/vite/traceViewer/xtermModule.DSXBckUd.css +0 -32
- package/lib/zipBundle.js +0 -25
- package/lib/zipBundleImpl.js +0 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
var Ns=Object.defineProperty;var Ls=(n,t,e)=>t in n?Ns(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var L=(n,t,e)=>Ls(n,typeof t!="symbol"?t+"":t,e);function Us(n,t){const e=new Array(t.length).fill(0);return new Array(t.length).fill(0).map((s,r)=>(i,a)=>{e[r]=i/a*t[r]*1e3,n(e.reduce((l,u)=>l+u,0),1e3)})}const Tn={"&":"&","<":"<",">":">",'"':""","'":"'"};function vs(n){return n.replace(/[&<>"']/ug,t=>Tn[t])}function Fs(n){return n.replace(/[&<]/ug,t=>Tn[t])}function Ot(n,t,e){return n.find((s,r)=>{if(r===n.length-1)return!0;const i=n[r+1];return Math.abs(t(s)-e)<Math.abs(t(i)-e)})}function Sn(n){return Array.isArray(n)&&typeof n[0]=="string"}function Ms(n){return Array.isArray(n)&&Array.isArray(n[0])}class Hs{constructor(t,e,s,r,i){L(this,"_htmlCache");L(this,"_snapshots");L(this,"_index");L(this,"snapshotName");L(this,"_resources");L(this,"_snapshot");L(this,"_callId");L(this,"_screencastFrames");this._htmlCache=t,this._resources=e,this._snapshots=s,this._index=i,this._snapshot=s[i],this._callId=s[i].callId,this._screencastFrames=r,this.snapshotName=s[i].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}closestScreenshot(){var r;const{wallTime:t,timestamp:e}=this.snapshot(),s=t&&((r=this._screencastFrames[0])!=null&&r.frameSwapWallTime)?Ot(this._screencastFrames,i=>i.frameSwapWallTime,t):Ot(this._screencastFrames,i=>i.timestamp,e);return s==null?void 0:s.sha1}render(){const t=[],e=(i,a,l,u)=>{if(typeof i=="string"){l==="STYLE"||l==="style"?t.push(Gs(i)):t.push(Fs(i));return}if(Ms(i)){const d=a-i[0][0];if(d>=0&&d<=a){const h=Bs(this._snapshots[d]),p=i[0][1];if(p>=0&&p<h.length)return e(h[p],d,l,u)}}else if(Sn(i)){const[d,h,...p]=i,b=d==="NOSCRIPT"?"X-NOSCRIPT":d,y=Object.entries(h||{});t.push("<",b);const x="__playwright_current_src__",c=b==="IFRAME"||b==="FRAME",o=b==="A",f=b==="IMG",_=f&&y.some(m=>m[0]===x),g=b==="SOURCE"&&l==="PICTURE"&&(u==null?void 0:u.some(m=>m[0]===x));for(const[m,E]of y){let w=m;c&&m.toLowerCase()==="src"&&(w="__playwright_src__"),f&&m===x&&(w="src"),["src","srcset"].includes(m.toLowerCase())&&(_||g)&&(w="_"+w);let T=E;o&&m.toLowerCase()==="href"?T="link://"+E:(m.toLowerCase()==="href"||m.toLowerCase()==="src"||m===x)&&(T=Qe(E)),t.push(" ",w,'="',vs(T),'"')}t.push(">");for(const m of p)e(m,a,b,y);Ws.has(b)||t.push("</",b,">");return}else return},s=this._snapshot;return{html:this._htmlCache.getOrCompute(this,()=>{e(s.html,this._index,void 0,void 0);const a=(s.doctype?`<!DOCTYPE ${s.doctype}>`:"")+["<style>*,*::before,*::after { visibility: hidden }</style>",`<script>${js(this._callId,this.snapshotName)}<\/script>`].join("")+t.join("");return{value:a,size:a.length}}),pageId:s.pageId,frameId:s.frameId,index:this._index}}resourceByUrl(t,e){const s=this._snapshot;let r,i;for(const l of this._resources){if(typeof l._monotonicTime=="number"&&l._monotonicTime>=s.timestamp)break;l.response.status!==304&&l.request.url===t&&l.request.method===e&&(l._frameref===s.frameId?r=l:i=l)}let a=r??i;if(a&&e.toUpperCase()==="GET"){for(const l of s.resourceOverrides)if(t===l.url&&l.sha1){a={...a,response:{...a.response,content:{...a.response.content,_sha1:l.sha1}}};break}}return a}}const Ws=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]);function Bs(n){if(!n._nodes){const t=[],e=s=>{if(typeof s=="string")t.push(s);else if(Sn(s)){const[,,...r]=s;for(const i of r)e(i);t.push(s)}};e(n.html),n._nodes=t}return n._nodes}function js(...n){function t(e,...s){const r=new URLSearchParams(location.search).has("isUnderTest"),i="Recorded click position in absolute coordinates did not match the center of the clicked element. This is likely due to a difference between the test runner and the trace viewer operating systems.",a=[],l=[],u=[],d=[],h=y=>{for(const x of y.querySelectorAll("[__playwright_scroll_top_]"))a.push(x);for(const x of y.querySelectorAll("[__playwright_scroll_left_]"))l.push(x);for(const x of y.querySelectorAll("[__playwright_value_]")){const c=x;c.type!=="file"&&(c.value=c.getAttribute("__playwright_value_")),x.removeAttribute("__playwright_value_")}for(const x of y.querySelectorAll("[__playwright_checked_]"))x.checked=x.getAttribute("__playwright_checked_")==="true",x.removeAttribute("__playwright_checked_");for(const x of y.querySelectorAll("[__playwright_selected_]"))x.selected=x.getAttribute("__playwright_selected_")==="true",x.removeAttribute("__playwright_selected_");for(const x of s)for(const c of y.querySelectorAll(`[__playwright_target__="${x}"]`)){const o=c.style;o.outline="2px solid #006ab1",o.backgroundColor="#6fa8dc7f",u.push(c)}for(const x of y.querySelectorAll("iframe, frame")){const c=x.getAttribute("__playwright_src__");if(!c)x.setAttribute("src",'data:text/html,<body style="background: #ddd"></body>');else{const o=new URL(e(window.location.href)),f=o.pathname.lastIndexOf("/snapshot/");f!==-1&&(o.pathname=o.pathname.substring(0,f+1)),o.pathname+=c.substring(1),x.setAttribute("src",o.toString())}}{const x=y.querySelector("body[__playwright_custom_elements__]");if(x&&window.customElements){const c=(x.getAttribute("__playwright_custom_elements__")||"").split(",");for(const o of c)window.customElements.define(o,class extends HTMLElement{})}}for(const x of y.querySelectorAll("template[__playwright_shadow_root_]")){const c=x,o=c.parentElement.attachShadow({mode:"open"});o.appendChild(c.content),c.remove(),h(o)}if("adoptedStyleSheets"in y){const x=[...y.adoptedStyleSheets];for(const c of y.querySelectorAll("template[__playwright_style_sheet_]")){const o=c,f=new CSSStyleSheet;f.replaceSync(o.getAttribute("__playwright_style_sheet_")),x.push(f)}y.adoptedStyleSheets=x}d.push(...y.querySelectorAll("canvas"))},p=()=>{window.removeEventListener("load",p);for(const c of a)c.scrollTop=+c.getAttribute("__playwright_scroll_top_"),c.removeAttribute("__playwright_scroll_top_");for(const c of l)c.scrollLeft=+c.getAttribute("__playwright_scroll_left_"),c.removeAttribute("__playwright_scroll_left_");document.styleSheets[0].disabled=!0;const y=new URL(window.location.href).searchParams,x=window.location.pathname.match(/\/page@[a-z0-9]+$/);if(y.get("pointX")&&y.get("pointY")){const c=+y.get("pointX"),o=+y.get("pointY"),f=y.has("hasInputTarget"),_=u.length>0,g=document.documentElement?[document.documentElement]:[];for(const m of _?u:g){const E=document.createElement("x-pw-pointer");if(E.style.position="fixed",E.style.backgroundColor="#f44336",E.style.width="20px",E.style.height="20px",E.style.borderRadius="10px",E.style.margin="-10px 0 0 -10px",E.style.zIndex="2147483646",E.style.display="flex",E.style.alignItems="center",E.style.justifyContent="center",_){const w=m.getBoundingClientRect(),T=w.left+w.width/2,R=w.top+w.height/2;if(E.style.left=T+"px",E.style.top=R+"px",x&&(Math.abs(T-c)>=10||Math.abs(R-o)>=10)){const A=document.createElement("x-pw-pointer-warning");A.textContent="⚠",A.style.fontSize="19px",A.style.color="white",A.style.marginTop="-3.5px",A.style.userSelect="none",E.appendChild(A),E.setAttribute("title",i)}document.documentElement.appendChild(E)}else x&&!f&&(E.style.left=c+"px",E.style.top=o+"px",document.documentElement.appendChild(E))}}if(d.length>0){let c=function(f,_){function g(){const m=document.createElement("canvas");m.width=m.width/Math.floor(m.width/24),m.height=m.height/Math.floor(m.height/24);const E=m.getContext("2d");return E.fillStyle="lightgray",E.fillRect(0,0,m.width,m.height),E.fillStyle="white",E.fillRect(0,0,m.width/2,m.height/2),E.fillRect(m.width/2,m.height/2,m.width,m.height),E.createPattern(m,"repeat")}f.fillStyle=g(),f.fillRect(0,0,_.width,_.height)};if(!x){for(const f of d){const _=f.getContext("2d");c(_,f),f.title="Playwright displays canvas contents on a best-effort basis. It doesn't support canvas elements inside an iframe yet. If this impacts your workflow, please open an issue so we can prioritize."}return}const o=new Image;o.onload=()=>{for(const f of d){const _=f.getContext("2d"),g=f.getAttribute("__playwright_bounding_rect__");if(f.removeAttribute("__playwright_bounding_rect__"),!g)continue;let m;try{m=JSON.parse(g)}catch{continue}const E=m.right>1||m.bottom>1;if(m.left>1||m.top>1){f.title="Playwright couldn't capture canvas contents because it's located outside the viewport.";continue}c(_,f),_.drawImage(o,m.left*o.width,m.top*o.height,(m.right-m.left)*o.width,(m.bottom-m.top)*o.height,0,0,f.width,f.height),r&&console.log("canvas drawn:",JSON.stringify([m.left,m.top,m.right-m.left,m.bottom-m.top].map(T=>Math.floor(T*100)))),E?f.title="Playwright couldn't capture full canvas contents because it's located partially outside the viewport.":f.title="Canvas contents are displayed on a best-effort basis based on viewport screenshots taken during test execution."}},o.onerror=()=>{for(const f of d){const _=f.getContext("2d");c(_,f),f.title="Playwright couldn't show canvas contents because the screenshot failed to load."}},o.src=location.href.replace("/snapshot","/closest-screenshot")}},b=()=>h(document);window.addEventListener("load",p),window.addEventListener("DOMContentLoaded",b)}return`
|
|
2
|
-
(${t.toString()})(${ze.toString()}${n.map(e=>`, "${e}"`).join("")})`}const Rn=["about:","blob:","data:","file:","ftp:","http:","https:","mailto:","sftp:","ws:","wss:"],kt="http://playwright.bloburl/#";function Qe(n){n.startsWith(kt)&&(n=n.substring(kt.length));try{const t=new URL(n);if(t.protocol==="javascript:"||t.protocol==="vbscript:")return"javascript:void(0)";const e=t.protocol==="blob:",s=t.protocol==="file:";if(!e&&!s&&Rn.includes(t.protocol))return n;const r="pw-"+t.protocol.slice(0,t.protocol.length-1);return s||(t.protocol="https:"),t.hostname=t.hostname?`${r}--${t.hostname}`:r,s&&(t.protocol="https:"),t.toString()}catch{return n}}const qs=/url\(['"]?([\w-]+:)\/\//ig;function Gs(n){return n.replace(qs,(t,e)=>!(e==="blob:")&&!(e==="file:")&&Rn.includes(e)?t:t.replace(e+"//",`https://pw-${e.slice(0,-1)}--`))}function ze(n){const t=new URL(n);return t.pathname.endsWith("/snapshot.html")?t.searchParams.get("r"):n}class Ys{constructor(t,e){L(this,"_snapshotStorage");L(this,"_resourceLoader");L(this,"_snapshotIds",new Map);this._snapshotStorage=t,this._resourceLoader=e}serveSnapshot(t,e,s){const r=this._snapshot(t.substring(9),e);if(!r)return new Response(null,{status:404});const i=r.render();return this._snapshotIds.set(s,r),new Response(i.html,{status:200,headers:{"Content-Type":"text/html; charset=utf-8"}})}async serveClosestScreenshot(t,e){const s=this._snapshot(t.substring(19),e),r=s==null?void 0:s.closestScreenshot();return r?new Response(await this._resourceLoader(r)):new Response(null,{status:404})}serveSnapshotInfo(t,e){const s=this._snapshot(t.substring(13),e);return this._respondWithJson(s?{viewport:s.viewport(),url:s.snapshot().frameUrl,timestamp:s.snapshot().timestamp,wallTime:s.snapshot().wallTime}:{error:"No snapshot found"})}_snapshot(t,e){const s=e.get("name");return this._snapshotStorage.snapshotByName(t.slice(1),s)}_respondWithJson(t){return new Response(JSON.stringify(t),{status:200,headers:{"Cache-Control":"public, max-age=31536000","Content-Type":"application/json"}})}async serveResource(t,e,s){let r;const i=this._snapshotIds.get(s);for(const y of t)if(r=i==null?void 0:i.resourceByUrl(Vs(y),e),r)break;if(!r)return new Response(null,{status:404});const a=r.response.content._sha1,l=a?await this._resourceLoader(a)||new Blob([]):new Blob([]);let u=r.response.content.mimeType;/^text\/|^application\/(javascript|json)/.test(u)&&!u.includes("charset")&&(u=`${u}; charset=utf-8`);const h=new Headers;u!=="x-unknown"&&h.set("Content-Type",u);for(const{name:y,value:x}of r.response.headers)h.set(y,x);h.delete("Content-Encoding"),h.delete("Access-Control-Allow-Origin"),h.set("Access-Control-Allow-Origin","*"),h.delete("Content-Length"),h.set("Content-Length",String(l.size)),h.set("Cache-Control","public, max-age=31536000");const{status:p}=r.response,b=p===101||p===204||p===205||p===304;return new Response(b?null:l,{headers:h,status:r.response.status,statusText:r.response.statusText})}}function Vs(n){try{const t=new URL(n);return t.hash="",t.toString()}catch{return n}}function Zs(n){const t=new Map,{files:e,stacks:s}=n;for(const r of s){const[i,a]=r;t.set(`call@${i}`,a.map(l=>({file:e[l[0]],line:l[1],column:l[2],function:l[3]})))}return t}class Ks{constructor(t){L(this,"_maxSize");L(this,"_map");L(this,"_size");this._maxSize=t,this._map=new Map,this._size=0}getOrCompute(t,e){if(this._map.has(t)){const r=this._map.get(t);return this._map.delete(t),this._map.set(t,r),r.value}const s=e();for(;this._map.size&&this._size+s.size>this._maxSize;){const[r,i]=this._map.entries().next().value;this._size-=i.size,this._map.delete(r)}return this._map.set(t,s),this._size+=s.size,s.value}}class Xs{constructor(){L(this,"_resources",[]);L(this,"_frameSnapshots",new Map);L(this,"_cache",new Ks(1e8))}addResource(t){t.request.url=Qe(t.request.url),this._resources.push(t)}addFrameSnapshot(t,e){for(const i of t.resourceOverrides)i.url=Qe(i.url);let s=this._frameSnapshots.get(t.frameId);s||(s={raw:[],renderers:[]},this._frameSnapshots.set(t.frameId,s),t.isMainFrame&&this._frameSnapshots.set(t.pageId,s)),s.raw.push(t);const r=new Hs(this._cache,this._resources,s.raw,e,s.raw.length-1);return s.renderers.push(r),r}snapshotByName(t,e){const s=this._frameSnapshots.get(t);return s==null?void 0:s.renderers.find(r=>r.snapshotName===e)}snapshotsForTest(){return[...this._frameSnapshots.keys()]}finalize(){this._resources.sort((t,e)=>(t._monotonicTime||0)-(e._monotonicTime||0))}}class An extends Error{constructor(t){super(t),this.name="TraceVersionError"}}const It=7;class $s{constructor(t,e){L(this,"_contextEntry");L(this,"_snapshotStorage");L(this,"_actionMap",new Map);L(this,"_version");L(this,"_pageEntries",new Map);L(this,"_jsHandles",new Map);L(this,"_consoleObjects",new Map);this._contextEntry=t,this._snapshotStorage=e}appendTrace(t){for(const e of t.split(`
|
|
3
|
-
`))this._appendEvent(e)}actions(){return[...this._actionMap.values()]}_pageEntry(t){let e=this._pageEntries.get(t);return e||(e={pageId:t,screencastFrames:[]},this._pageEntries.set(t,e),this._contextEntry.pages.push(e)),e}_appendEvent(t){if(!t)return;const e=this._modernize(JSON.parse(t));for(const s of e)this._innerAppendEvent(s)}_innerAppendEvent(t){const e=this._contextEntry;switch(t.type){case"context-options":{if(t.version>It)throw new An("The trace was created by a newer version of Playwright and is not supported by this version of the viewer. Please use latest Playwright to open the trace.");this._version=t.version,e.origin=t.origin,e.browserName=t.browserName,e.channel=t.channel,e.title=t.title,e.platform=t.platform,e.wallTime=t.wallTime,e.startTime=t.monotonicTime,e.sdkLanguage=t.sdkLanguage,e.options=t.options,e.testIdAttributeName=t.testIdAttributeName;break}case"screencast-frame":{this._pageEntry(t.pageId).screencastFrames.push(t);break}case"before":{this._actionMap.set(t.callId,{...t,type:"action",endTime:0,log:[]});break}case"input":{const s=this._actionMap.get(t.callId);s.inputSnapshot=t.inputSnapshot,s.point=t.point;break}case"log":{const s=this._actionMap.get(t.callId);if(!s)return;s.log.push({time:t.time,message:t.message});break}case"after":{const s=this._actionMap.get(t.callId);s.afterSnapshot=t.afterSnapshot,s.endTime=t.endTime,s.result=t.result,s.error=t.error,s.attachments=t.attachments,t.point&&(s.point=t.point);break}case"action":{this._actionMap.set(t.callId,{...t,log:[]});break}case"event":{e.events.push(t);break}case"stdout":{e.stdio.push(t);break}case"stderr":{e.stdio.push(t);break}case"error":{e.errors.push(t);break}case"console":{e.events.push(t);break}case"resource-snapshot":this._snapshotStorage.addResource(t.snapshot),e.resources.push(t.snapshot);break;case"frame-snapshot":this._snapshotStorage.addFrameSnapshot(t.snapshot,this._pageEntry(t.snapshot.pageId).screencastFrames);break}"pageId"in t&&t.pageId&&this._pageEntry(t.pageId),(t.type==="action"||t.type==="before")&&(e.startTime=Math.min(e.startTime,t.startTime)),(t.type==="action"||t.type==="after")&&(e.endTime=Math.max(e.endTime,t.endTime)),t.type==="event"&&(e.startTime=Math.min(e.startTime,t.time),e.endTime=Math.max(e.endTime,t.time)),t.type==="screencast-frame"&&(e.startTime=Math.min(e.startTime,t.timestamp),e.endTime=Math.max(e.endTime,t.timestamp))}_processedContextCreatedEvent(){return this._version!==void 0}_modernize(t){let e=this._version||t.version;if(e===void 0)return[t];let s=[t];for(;e<It;++e)s=this[`_modernize_${e}_to_${e+1}`].call(this,s);return s}_modernize_0_to_1(t){for(const e of t)e.type==="action"&&typeof e.metadata.error=="string"&&(e.metadata.error={error:{name:"Error",message:e.metadata.error}});return t}_modernize_1_to_2(t){var e;for(const s of t)s.type!=="frame-snapshot"||!s.snapshot.isMainFrame||(s.snapshot.viewport=((e=this._contextEntry.options)==null?void 0:e.viewport)||{width:1280,height:720});return t}_modernize_2_to_3(t){for(const e of t){if(e.type!=="resource-snapshot"||e.snapshot.request)continue;const s=e.snapshot;e.snapshot={_frameref:s.frameId,request:{url:s.url,method:s.method,headers:s.requestHeaders,postData:s.requestSha1?{_sha1:s.requestSha1}:void 0},response:{status:s.status,headers:s.responseHeaders,content:{mimeType:s.contentType,_sha1:s.responseSha1}},_monotonicTime:s.timestamp}}return t}_modernize_3_to_4(t){const e=[];for(const s of t){const r=this._modernize_event_3_to_4(s);r&&e.push(r)}return e}_modernize_event_3_to_4(t){var s,r,i,a;if(t.type!=="action"&&t.type!=="event")return t;const e=t.metadata;return e.internal||e.method.startsWith("tracing")?null:t.type==="event"?e.method==="__create__"&&e.type==="ConsoleMessage"?{type:"object",class:e.type,guid:e.params.guid,initializer:e.params.initializer}:{type:"event",time:e.startTime,class:e.type,method:e.method,params:e.params,pageId:e.pageId}:{type:"action",callId:e.id,startTime:e.startTime,endTime:e.endTime,apiName:e.apiName||e.type+"."+e.method,class:e.type,method:e.method,params:e.params,wallTime:e.wallTime||Date.now(),log:e.log,beforeSnapshot:(s=e.snapshots.find(l=>l.title==="before"))==null?void 0:s.snapshotName,inputSnapshot:(r=e.snapshots.find(l=>l.title==="input"))==null?void 0:r.snapshotName,afterSnapshot:(i=e.snapshots.find(l=>l.title==="after"))==null?void 0:i.snapshotName,error:(a=e.error)==null?void 0:a.error,result:e.result,point:e.point,pageId:e.pageId}}_modernize_4_to_5(t){const e=[];for(const s of t){const r=this._modernize_event_4_to_5(s);r&&e.push(r)}return e}_modernize_event_4_to_5(t){var e,s;if(t.type==="event"&&t.method==="__create__"&&t.class==="JSHandle"&&this._jsHandles.set(t.params.guid,t.params.initializer),t.type==="object"){if(t.class!=="ConsoleMessage")return null;const r=(e=t.initializer.args)==null?void 0:e.map(i=>{if(i.guid){const a=this._jsHandles.get(i.guid);return{preview:(a==null?void 0:a.preview)||"",value:""}}return{preview:i.preview||"",value:i.value||""}});return this._consoleObjects.set(t.guid,{type:t.initializer.type,text:t.initializer.text,location:t.initializer.location,args:r}),null}if(t.type==="event"&&t.method==="console"){const r=this._consoleObjects.get(((s=t.params.message)==null?void 0:s.guid)||"");return r?{type:"console",time:t.time,pageId:t.pageId,messageType:r.type,text:r.text,args:r.args,location:r.location}:null}return t}_modernize_5_to_6(t){const e=[];for(const s of t)if(e.push(s),!(s.type!=="after"||!s.log.length))for(const r of s.log)e.push({type:"log",callId:s.callId,message:r,time:-1});return e}_modernize_6_to_7(t){const e=[];if(!this._processedContextCreatedEvent()&&t[0].type!=="context-options"){const s={type:"context-options",origin:"testRunner",version:7,browserName:"",options:{},platform:process.platform,wallTime:0,monotonicTime:0,sdkLanguage:"javascript"};e.push(s)}for(const s of t){if(s.type==="context-options"){e.push({...s,monotonicTime:0,origin:"library"});continue}!this._contextEntry.wallTime&&s.type==="before"&&(this._contextEntry.wallTime=s.wallTime),!this._contextEntry.startTime&&s.type==="before"&&(this._contextEntry.startTime=s.startTime),e.push(s)}return e}}class Js{constructor(){L(this,"contextEntries",[]);L(this,"_snapshotStorage");L(this,"_backend");L(this,"_resourceToContentType",new Map)}async load(t,e){var l,u;this._backend=t;const s=[];let r=!1;for(const d of await this._backend.entryNames()){const h=d.match(/(.+)\.trace/);h&&s.push(h[1]||""),d.includes("src@")&&(r=!0)}if(!s.length)throw new Error("Cannot find .trace file");this._snapshotStorage=new Xs;const i=s.length*3;let a=0;for(const d of s){const h=Qs();h.traceUrl=t.traceURL(),h.hasSource=r;const p=new $s(h,this._snapshotStorage),b=await this._backend.readText(d+".trace")||"";p.appendTrace(b),e(++a,i);const y=await this._backend.readText(d+".network")||"";if(p.appendTrace(y),e(++a,i),h.actions=p.actions().sort((c,o)=>c.startTime-o.startTime),!t.isLive()){for(const c of h.actions.slice().reverse())if(!c.endTime&&!c.error)for(const o of h.actions)o.parentId===c.callId&&c.endTime<o.endTime&&(c.endTime=o.endTime)}const x=await this._backend.readText(d+".stacks");if(x){const c=Zs(JSON.parse(x));for(const o of h.actions)o.stack=o.stack||c.get(o.callId)}e(++a,i);for(const c of h.resources)(l=c.request.postData)!=null&&l._sha1&&this._resourceToContentType.set(c.request.postData._sha1,Dt(c.request.postData.mimeType)),(u=c.response.content)!=null&&u._sha1&&this._resourceToContentType.set(c.response.content._sha1,Dt(c.response.content.mimeType));this.contextEntries.push(h)}this._snapshotStorage.finalize()}async hasEntry(t){return this._backend.hasEntry(t)}async resourceForSha1(t){const e=await this._backend.readBlob("resources/"+t),s=this._resourceToContentType.get(t);return!e||s===void 0||s==="x-unknown"?e:new Blob([e],{type:s})}storage(){return this._snapshotStorage}}function Dt(n){const t=n.match(/^(.*);\s*charset=.*$/);return t?t[1]:n}function Qs(){return{origin:"testRunner",traceUrl:"",startTime:Number.MAX_SAFE_INTEGER,wallTime:Number.MAX_SAFE_INTEGER,endTime:0,browserName:"",options:{deviceScaleFactor:1,isMobile:!1,viewport:{width:1280,height:800}},pages:[],resources:[],actions:[],events:[],errors:[],stdio:[],hasSource:!1}}const zs=15,U=0,z=1,er=2,V=-2,W=-3,Pt=-4,ee=-5,Z=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Cn=1440,tr=0,nr=4,sr=9,rr=5,ir=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ar=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],or=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],cr=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],lr=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],fr=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],te=15;function et(){const n=this;let t,e,s,r,i,a;function l(d,h,p,b,y,x,c,o,f,_,g){let m,E,w,T,R,A,S,C,I,O,N,P,k,M,v;O=0,R=p;do s[d[h+O]]++,O++,R--;while(R!==0);if(s[0]==p)return c[0]=-1,o[0]=0,U;for(C=o[0],A=1;A<=te&&s[A]===0;A++);for(S=A,C<A&&(C=A),R=te;R!==0&&s[R]===0;R--);for(w=R,C>R&&(C=R),o[0]=C,M=1<<A;A<R;A++,M<<=1)if((M-=s[A])<0)return W;if((M-=s[R])<0)return W;for(s[R]+=M,a[1]=A=0,O=1,k=2;--R!==0;)a[k]=A+=s[O],k++,O++;R=0,O=0;do(A=d[h+O])!==0&&(g[a[A]++]=R),O++;while(++R<p);for(p=a[w],a[0]=R=0,O=0,T=-1,P=-C,i[0]=0,N=0,v=0;S<=w;S++)for(m=s[S];m--!==0;){for(;S>P+C;){if(T++,P+=C,v=w-P,v=v>C?C:v,(E=1<<(A=S-P))>m+1&&(E-=m+1,k=S,A<v))for(;++A<v&&!((E<<=1)<=s[++k]);)E-=s[k];if(v=1<<A,_[0]+v>Cn)return W;i[T]=N=_[0],_[0]+=v,T!==0?(a[T]=R,r[0]=A,r[1]=C,A=R>>>P-C,r[2]=N-i[T-1]-A,f.set(r,(i[T-1]+A)*3)):c[0]=N}for(r[1]=S-P,O>=p?r[0]=192:g[O]<b?(r[0]=g[O]<256?0:96,r[2]=g[O++]):(r[0]=x[g[O]-b]+16+64,r[2]=y[g[O++]-b]),E=1<<S-P,A=R>>>P;A<v;A+=E)f.set(r,(N+A)*3);for(A=1<<S-1;R&A;A>>>=1)R^=A;for(R^=A,I=(1<<P)-1;(R&I)!=a[T];)T--,P-=C,I=(1<<P)-1}return M!==0&&w!=1?ee:U}function u(d){let h;for(t||(t=[],e=[],s=new Int32Array(te+1),r=[],i=new Int32Array(te),a=new Int32Array(te+1)),e.length<d&&(e=[]),h=0;h<d;h++)e[h]=0;for(h=0;h<te+1;h++)s[h]=0;for(h=0;h<3;h++)r[h]=0;i.set(s.subarray(0,te),0),a.set(s.subarray(0,te+1),0)}n.inflate_trees_bits=function(d,h,p,b,y){let x;return u(19),t[0]=0,x=l(d,0,19,19,null,null,p,h,b,t,e),x==W?y.msg="oversubscribed dynamic bit lengths tree":(x==ee||h[0]===0)&&(y.msg="incomplete dynamic bit lengths tree",x=W),x},n.inflate_trees_dynamic=function(d,h,p,b,y,x,c,o,f){let _;return u(288),t[0]=0,_=l(p,0,d,257,or,cr,x,b,o,t,e),_!=U||b[0]===0?(_==W?f.msg="oversubscribed literal/length tree":_!=Pt&&(f.msg="incomplete literal/length tree",_=W),_):(u(288),_=l(p,d,h,0,lr,fr,c,y,o,t,e),_!=U||y[0]===0&&d>257?(_==W?f.msg="oversubscribed distance tree":_==ee?(f.msg="incomplete distance tree",_=W):_!=Pt&&(f.msg="empty distance tree with lengths",_=W),_):U)}}et.inflate_trees_fixed=function(n,t,e,s){return n[0]=sr,t[0]=rr,e[0]=ir,s[0]=ar,U};const ke=0,Nt=1,Lt=2,Ut=3,vt=4,Ft=5,Mt=6,qe=7,Ht=8,Ie=9;function ur(){const n=this;let t,e=0,s,r=0,i=0,a=0,l=0,u=0,d=0,h=0,p,b=0,y,x=0;function c(o,f,_,g,m,E,w,T){let R,A,S,C,I,O,N,P,k,M,v,be,D,fe,F,H;N=T.next_in_index,P=T.avail_in,I=w.bitb,O=w.bitk,k=w.write,M=k<w.read?w.read-k-1:w.end-k,v=Z[o],be=Z[f];do{for(;O<20;)P--,I|=(T.read_byte(N++)&255)<<O,O+=8;if(R=I&v,A=_,S=g,H=(S+R)*3,(C=A[H])===0){I>>=A[H+1],O-=A[H+1],w.win[k++]=A[H+2],M--;continue}do{if(I>>=A[H+1],O-=A[H+1],C&16){for(C&=15,D=A[H+2]+(I&Z[C]),I>>=C,O-=C;O<15;)P--,I|=(T.read_byte(N++)&255)<<O,O+=8;R=I&be,A=m,S=E,H=(S+R)*3,C=A[H];do if(I>>=A[H+1],O-=A[H+1],C&16){for(C&=15;O<C;)P--,I|=(T.read_byte(N++)&255)<<O,O+=8;if(fe=A[H+2]+(I&Z[C]),I>>=C,O-=C,M-=D,k>=fe)F=k-fe,k-F>0&&2>k-F?(w.win[k++]=w.win[F++],w.win[k++]=w.win[F++],D-=2):(w.win.set(w.win.subarray(F,F+2),k),k+=2,F+=2,D-=2);else{F=k-fe;do F+=w.end;while(F<0);if(C=w.end-F,D>C){if(D-=C,k-F>0&&C>k-F)do w.win[k++]=w.win[F++];while(--C!==0);else w.win.set(w.win.subarray(F,F+C),k),k+=C,F+=C,C=0;F=0}}if(k-F>0&&D>k-F)do w.win[k++]=w.win[F++];while(--D!==0);else w.win.set(w.win.subarray(F,F+D),k),k+=D,F+=D,D=0;break}else if(!(C&64))R+=A[H+2],R+=I&Z[C],H=(S+R)*3,C=A[H];else return T.msg="invalid distance code",D=T.avail_in-P,D=O>>3<D?O>>3:D,P+=D,N-=D,O-=D<<3,w.bitb=I,w.bitk=O,T.avail_in=P,T.total_in+=N-T.next_in_index,T.next_in_index=N,w.write=k,W;while(!0);break}if(C&64)return C&32?(D=T.avail_in-P,D=O>>3<D?O>>3:D,P+=D,N-=D,O-=D<<3,w.bitb=I,w.bitk=O,T.avail_in=P,T.total_in+=N-T.next_in_index,T.next_in_index=N,w.write=k,z):(T.msg="invalid literal/length code",D=T.avail_in-P,D=O>>3<D?O>>3:D,P+=D,N-=D,O-=D<<3,w.bitb=I,w.bitk=O,T.avail_in=P,T.total_in+=N-T.next_in_index,T.next_in_index=N,w.write=k,W);if(R+=A[H+2],R+=I&Z[C],H=(S+R)*3,(C=A[H])===0){I>>=A[H+1],O-=A[H+1],w.win[k++]=A[H+2],M--;break}}while(!0)}while(M>=258&&P>=10);return D=T.avail_in-P,D=O>>3<D?O>>3:D,P+=D,N-=D,O-=D<<3,w.bitb=I,w.bitk=O,T.avail_in=P,T.total_in+=N-T.next_in_index,T.next_in_index=N,w.write=k,U}n.init=function(o,f,_,g,m,E){t=ke,d=o,h=f,p=_,b=g,y=m,x=E,s=null},n.proc=function(o,f,_){let g,m,E,w=0,T=0,R=0,A,S,C,I;for(R=f.next_in_index,A=f.avail_in,w=o.bitb,T=o.bitk,S=o.write,C=S<o.read?o.read-S-1:o.end-S;;)switch(t){case ke:if(C>=258&&A>=10&&(o.bitb=w,o.bitk=T,f.avail_in=A,f.total_in+=R-f.next_in_index,f.next_in_index=R,o.write=S,_=c(d,h,p,b,y,x,o,f),R=f.next_in_index,A=f.avail_in,w=o.bitb,T=o.bitk,S=o.write,C=S<o.read?o.read-S-1:o.end-S,_!=U)){t=_==z?qe:Ie;break}i=d,s=p,r=b,t=Nt;case Nt:for(g=i;T<g;){if(A!==0)_=U;else return o.bitb=w,o.bitk=T,f.avail_in=A,f.total_in+=R-f.next_in_index,f.next_in_index=R,o.write=S,o.inflate_flush(f,_);A--,w|=(f.read_byte(R++)&255)<<T,T+=8}if(m=(r+(w&Z[g]))*3,w>>>=s[m+1],T-=s[m+1],E=s[m],E===0){a=s[m+2],t=Mt;break}if(E&16){l=E&15,e=s[m+2],t=Lt;break}if(!(E&64)){i=E,r=m/3+s[m+2];break}if(E&32){t=qe;break}return t=Ie,f.msg="invalid literal/length code",_=W,o.bitb=w,o.bitk=T,f.avail_in=A,f.total_in+=R-f.next_in_index,f.next_in_index=R,o.write=S,o.inflate_flush(f,_);case Lt:for(g=l;T<g;){if(A!==0)_=U;else return o.bitb=w,o.bitk=T,f.avail_in=A,f.total_in+=R-f.next_in_index,f.next_in_index=R,o.write=S,o.inflate_flush(f,_);A--,w|=(f.read_byte(R++)&255)<<T,T+=8}e+=w&Z[g],w>>=g,T-=g,i=h,s=y,r=x,t=Ut;case Ut:for(g=i;T<g;){if(A!==0)_=U;else return o.bitb=w,o.bitk=T,f.avail_in=A,f.total_in+=R-f.next_in_index,f.next_in_index=R,o.write=S,o.inflate_flush(f,_);A--,w|=(f.read_byte(R++)&255)<<T,T+=8}if(m=(r+(w&Z[g]))*3,w>>=s[m+1],T-=s[m+1],E=s[m],E&16){l=E&15,u=s[m+2],t=vt;break}if(!(E&64)){i=E,r=m/3+s[m+2];break}return t=Ie,f.msg="invalid distance code",_=W,o.bitb=w,o.bitk=T,f.avail_in=A,f.total_in+=R-f.next_in_index,f.next_in_index=R,o.write=S,o.inflate_flush(f,_);case vt:for(g=l;T<g;){if(A!==0)_=U;else return o.bitb=w,o.bitk=T,f.avail_in=A,f.total_in+=R-f.next_in_index,f.next_in_index=R,o.write=S,o.inflate_flush(f,_);A--,w|=(f.read_byte(R++)&255)<<T,T+=8}u+=w&Z[g],w>>=g,T-=g,t=Ft;case Ft:for(I=S-u;I<0;)I+=o.end;for(;e!==0;){if(C===0&&(S==o.end&&o.read!==0&&(S=0,C=S<o.read?o.read-S-1:o.end-S),C===0&&(o.write=S,_=o.inflate_flush(f,_),S=o.write,C=S<o.read?o.read-S-1:o.end-S,S==o.end&&o.read!==0&&(S=0,C=S<o.read?o.read-S-1:o.end-S),C===0)))return o.bitb=w,o.bitk=T,f.avail_in=A,f.total_in+=R-f.next_in_index,f.next_in_index=R,o.write=S,o.inflate_flush(f,_);o.win[S++]=o.win[I++],C--,I==o.end&&(I=0),e--}t=ke;break;case Mt:if(C===0&&(S==o.end&&o.read!==0&&(S=0,C=S<o.read?o.read-S-1:o.end-S),C===0&&(o.write=S,_=o.inflate_flush(f,_),S=o.write,C=S<o.read?o.read-S-1:o.end-S,S==o.end&&o.read!==0&&(S=0,C=S<o.read?o.read-S-1:o.end-S),C===0)))return o.bitb=w,o.bitk=T,f.avail_in=A,f.total_in+=R-f.next_in_index,f.next_in_index=R,o.write=S,o.inflate_flush(f,_);_=U,o.win[S++]=a,C--,t=ke;break;case qe:if(T>7&&(T-=8,A++,R--),o.write=S,_=o.inflate_flush(f,_),S=o.write,C=S<o.read?o.read-S-1:o.end-S,o.read!=o.write)return o.bitb=w,o.bitk=T,f.avail_in=A,f.total_in+=R-f.next_in_index,f.next_in_index=R,o.write=S,o.inflate_flush(f,_);t=Ht;case Ht:return _=z,o.bitb=w,o.bitk=T,f.avail_in=A,f.total_in+=R-f.next_in_index,f.next_in_index=R,o.write=S,o.inflate_flush(f,_);case Ie:return _=W,o.bitb=w,o.bitk=T,f.avail_in=A,f.total_in+=R-f.next_in_index,f.next_in_index=R,o.write=S,o.inflate_flush(f,_);default:return _=V,o.bitb=w,o.bitk=T,f.avail_in=A,f.total_in+=R-f.next_in_index,f.next_in_index=R,o.write=S,o.inflate_flush(f,_)}},n.free=function(){}}const Wt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],_e=0,Ge=1,Bt=2,jt=3,qt=4,Gt=5,De=6,Pe=7,Yt=8,ue=9;function dr(n,t){const e=this;let s=_e,r=0,i=0,a=0,l;const u=[0],d=[0],h=new ur;let p=0,b=new Int32Array(Cn*3);const y=0,x=new et;e.bitk=0,e.bitb=0,e.win=new Uint8Array(t),e.end=t,e.read=0,e.write=0,e.reset=function(c,o){o&&(o[0]=y),s==De&&h.free(c),s=_e,e.bitk=0,e.bitb=0,e.read=e.write=0},e.reset(n,null),e.inflate_flush=function(c,o){let f,_,g;return _=c.next_out_index,g=e.read,f=(g<=e.write?e.write:e.end)-g,f>c.avail_out&&(f=c.avail_out),f!==0&&o==ee&&(o=U),c.avail_out-=f,c.total_out+=f,c.next_out.set(e.win.subarray(g,g+f),_),_+=f,g+=f,g==e.end&&(g=0,e.write==e.end&&(e.write=0),f=e.write-g,f>c.avail_out&&(f=c.avail_out),f!==0&&o==ee&&(o=U),c.avail_out-=f,c.total_out+=f,c.next_out.set(e.win.subarray(g,g+f),_),_+=f,g+=f),c.next_out_index=_,e.read=g,o},e.proc=function(c,o){let f,_,g,m,E,w,T,R;for(m=c.next_in_index,E=c.avail_in,_=e.bitb,g=e.bitk,w=e.write,T=w<e.read?e.read-w-1:e.end-w;;){let A,S,C,I,O,N,P,k;switch(s){case _e:for(;g<3;){if(E!==0)o=U;else return e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);E--,_|=(c.read_byte(m++)&255)<<g,g+=8}switch(f=_&7,p=f&1,f>>>1){case 0:_>>>=3,g-=3,f=g&7,_>>>=f,g-=f,s=Ge;break;case 1:A=[],S=[],C=[[]],I=[[]],et.inflate_trees_fixed(A,S,C,I),h.init(A[0],S[0],C[0],0,I[0],0),_>>>=3,g-=3,s=De;break;case 2:_>>>=3,g-=3,s=jt;break;case 3:return _>>>=3,g-=3,s=ue,c.msg="invalid block type",o=W,e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o)}break;case Ge:for(;g<32;){if(E!==0)o=U;else return e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);E--,_|=(c.read_byte(m++)&255)<<g,g+=8}if((~_>>>16&65535)!=(_&65535))return s=ue,c.msg="invalid stored block lengths",o=W,e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);r=_&65535,_=g=0,s=r!==0?Bt:p!==0?Pe:_e;break;case Bt:if(E===0||T===0&&(w==e.end&&e.read!==0&&(w=0,T=w<e.read?e.read-w-1:e.end-w),T===0&&(e.write=w,o=e.inflate_flush(c,o),w=e.write,T=w<e.read?e.read-w-1:e.end-w,w==e.end&&e.read!==0&&(w=0,T=w<e.read?e.read-w-1:e.end-w),T===0)))return e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);if(o=U,f=r,f>E&&(f=E),f>T&&(f=T),e.win.set(c.read_buf(m,f),w),m+=f,E-=f,w+=f,T-=f,(r-=f)!==0)break;s=p!==0?Pe:_e;break;case jt:for(;g<14;){if(E!==0)o=U;else return e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);E--,_|=(c.read_byte(m++)&255)<<g,g+=8}if(i=f=_&16383,(f&31)>29||(f>>5&31)>29)return s=ue,c.msg="too many length or distance symbols",o=W,e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);if(f=258+(f&31)+(f>>5&31),!l||l.length<f)l=[];else for(R=0;R<f;R++)l[R]=0;_>>>=14,g-=14,a=0,s=qt;case qt:for(;a<4+(i>>>10);){for(;g<3;){if(E!==0)o=U;else return e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);E--,_|=(c.read_byte(m++)&255)<<g,g+=8}l[Wt[a++]]=_&7,_>>>=3,g-=3}for(;a<19;)l[Wt[a++]]=0;if(u[0]=7,f=x.inflate_trees_bits(l,u,d,b,c),f!=U)return o=f,o==W&&(l=null,s=ue),e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);a=0,s=Gt;case Gt:for(;f=i,!(a>=258+(f&31)+(f>>5&31));){let M,v;for(f=u[0];g<f;){if(E!==0)o=U;else return e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);E--,_|=(c.read_byte(m++)&255)<<g,g+=8}if(f=b[(d[0]+(_&Z[f]))*3+1],v=b[(d[0]+(_&Z[f]))*3+2],v<16)_>>>=f,g-=f,l[a++]=v;else{for(R=v==18?7:v-14,M=v==18?11:3;g<f+R;){if(E!==0)o=U;else return e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);E--,_|=(c.read_byte(m++)&255)<<g,g+=8}if(_>>>=f,g-=f,M+=_&Z[R],_>>>=R,g-=R,R=a,f=i,R+M>258+(f&31)+(f>>5&31)||v==16&&R<1)return l=null,s=ue,c.msg="invalid bit length repeat",o=W,e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);v=v==16?l[R-1]:0;do l[R++]=v;while(--M!==0);a=R}}if(d[0]=-1,O=[],N=[],P=[],k=[],O[0]=9,N[0]=6,f=i,f=x.inflate_trees_dynamic(257+(f&31),1+(f>>5&31),l,O,N,P,k,b,c),f!=U)return f==W&&(l=null,s=ue),o=f,e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);h.init(O[0],N[0],b,P[0],b,k[0]),s=De;case De:if(e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,(o=h.proc(e,c,o))!=z)return e.inflate_flush(c,o);if(o=U,h.free(c),m=c.next_in_index,E=c.avail_in,_=e.bitb,g=e.bitk,w=e.write,T=w<e.read?e.read-w-1:e.end-w,p===0){s=_e;break}s=Pe;case Pe:if(e.write=w,o=e.inflate_flush(c,o),w=e.write,T=w<e.read?e.read-w-1:e.end-w,e.read!=e.write)return e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);s=Yt;case Yt:return o=z,e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);case ue:return o=W,e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o);default:return o=V,e.bitb=_,e.bitk=g,c.avail_in=E,c.total_in+=m-c.next_in_index,c.next_in_index=m,e.write=w,e.inflate_flush(c,o)}}},e.free=function(c){e.reset(c,null),e.win=null,b=null},e.set_dictionary=function(c,o,f){e.win.set(c.subarray(o,o+f),0),e.read=e.write=f},e.sync_point=function(){return s==Ge?1:0}}const hr=32,_r=8,pr=0,Vt=1,Zt=2,Kt=3,Xt=4,$t=5,Ye=6,ye=7,Jt=12,ne=13,mr=[0,0,255,255];function wr(){const n=this;n.mode=0,n.method=0,n.was=[0],n.need=0,n.marker=0,n.wbits=0;function t(e){return!e||!e.istate?V:(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=ye,e.istate.blocks.reset(e,null),U)}n.inflateEnd=function(e){return n.blocks&&n.blocks.free(e),n.blocks=null,U},n.inflateInit=function(e,s){return e.msg=null,n.blocks=null,s<8||s>15?(n.inflateEnd(e),V):(n.wbits=s,e.istate.blocks=new dr(e,1<<s),t(e),U)},n.inflate=function(e,s){let r,i;if(!e||!e.istate||!e.next_in)return V;const a=e.istate;for(s=s==nr?ee:U,r=ee;;)switch(a.mode){case pr:if(e.avail_in===0)return r;if(r=s,e.avail_in--,e.total_in++,((a.method=e.read_byte(e.next_in_index++))&15)!=_r){a.mode=ne,e.msg="unknown compression method",a.marker=5;break}if((a.method>>4)+8>a.wbits){a.mode=ne,e.msg="invalid win size",a.marker=5;break}a.mode=Vt;case Vt:if(e.avail_in===0)return r;if(r=s,e.avail_in--,e.total_in++,i=e.read_byte(e.next_in_index++)&255,((a.method<<8)+i)%31!==0){a.mode=ne,e.msg="incorrect header check",a.marker=5;break}if(!(i&hr)){a.mode=ye;break}a.mode=Zt;case Zt:if(e.avail_in===0)return r;r=s,e.avail_in--,e.total_in++,a.need=(e.read_byte(e.next_in_index++)&255)<<24&4278190080,a.mode=Kt;case Kt:if(e.avail_in===0)return r;r=s,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<16&16711680,a.mode=Xt;case Xt:if(e.avail_in===0)return r;r=s,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<8&65280,a.mode=$t;case $t:return e.avail_in===0?r:(r=s,e.avail_in--,e.total_in++,a.need+=e.read_byte(e.next_in_index++)&255,a.mode=Ye,er);case Ye:return a.mode=ne,e.msg="need dictionary",a.marker=0,V;case ye:if(r=a.blocks.proc(e,r),r==W){a.mode=ne,a.marker=0;break}if(r==U&&(r=s),r!=z)return r;r=s,a.blocks.reset(e,a.was),a.mode=Jt;case Jt:return e.avail_in=0,z;case ne:return W;default:return V}},n.inflateSetDictionary=function(e,s,r){let i=0,a=r;if(!e||!e.istate||e.istate.mode!=Ye)return V;const l=e.istate;return a>=1<<l.wbits&&(a=(1<<l.wbits)-1,i=r-a),l.blocks.set_dictionary(s,i,a),l.mode=ye,U},n.inflateSync=function(e){let s,r,i,a,l;if(!e||!e.istate)return V;const u=e.istate;if(u.mode!=ne&&(u.mode=ne,u.marker=0),(s=e.avail_in)===0)return ee;for(r=e.next_in_index,i=u.marker;s!==0&&i<4;)e.read_byte(r)==mr[i]?i++:e.read_byte(r)!==0?i=0:i=4-i,r++,s--;return e.total_in+=r-e.next_in_index,e.next_in_index=r,e.avail_in=s,u.marker=i,i!=4?W:(a=e.total_in,l=e.total_out,t(e),e.total_in=a,e.total_out=l,u.mode=ye,U)},n.inflateSyncPoint=function(e){return!e||!e.istate||!e.istate.blocks?V:e.istate.blocks.sync_point()}}function On(){}On.prototype={inflateInit(n){const t=this;return t.istate=new wr,n||(n=zs),t.istate.inflateInit(t,n)},inflate(n){const t=this;return t.istate?t.istate.inflate(t,n):V},inflateEnd(){const n=this;if(!n.istate)return V;const t=n.istate.inflateEnd(n);return n.istate=null,t},inflateSync(){const n=this;return n.istate?n.istate.inflateSync(n):V},inflateSetDictionary(n,t){const e=this;return e.istate?e.istate.inflateSetDictionary(e,n,t):V},read_byte(n){return this.next_in[n]},read_buf(n,t){return this.next_in.subarray(n,n+t)}};function gr(n){const t=this,e=new On,s=n&&n.chunkSize?Math.floor(n.chunkSize*2):128*1024,r=tr,i=new Uint8Array(s);let a=!1;e.inflateInit(),e.next_out=i,t.append=function(l,u){const d=[];let h,p,b=0,y=0,x=0;if(l.length!==0){e.next_in_index=0,e.next_in=l,e.avail_in=l.length;do{if(e.next_out_index=0,e.avail_out=s,e.avail_in===0&&!a&&(e.next_in_index=0,a=!0),h=e.inflate(r),a&&h===ee){if(e.avail_in!==0)throw new Error("inflating: bad input")}else if(h!==U&&h!==z)throw new Error("inflating: "+e.msg);if((a||h===z)&&e.avail_in===l.length)throw new Error("inflating: bad input");e.next_out_index&&(e.next_out_index===s?d.push(new Uint8Array(i)):d.push(i.subarray(0,e.next_out_index))),x+=e.next_out_index,u&&e.next_in_index>0&&e.next_in_index!=b&&(u(e.next_in_index),b=e.next_in_index)}while(e.avail_in>0||e.avail_out===0);return d.length>1?(p=new Uint8Array(x),d.forEach(function(c){p.set(c,y),y+=c.length})):p=d[0]?new Uint8Array(d[0]):new Uint8Array,p}},t.flush=function(){e.inflateEnd()}}const de=4294967295,ae=65535,br=8,yr=0,xr=99,Er=67324752,Tr=134695760,Qt=33639248,Sr=101010256,zt=101075792,Rr=117853008,pe=22,Ve=20,Ze=56,Ar=1,Cr=39169,Or=10,kr=1,Ir=21589,Dr=28789,Pr=25461,Nr=6534,en=1,Lr=6,tn=8,nn=2048,sn=16,Ur="/",$=void 0,Ue="undefined",kn="function";class rn{constructor(t){return class extends TransformStream{constructor(e,s){const r=new t(s);super({transform(i,a){a.enqueue(r.append(i))},flush(i){const a=r.flush();a&&i.enqueue(a)}})}}}}const vr=64;let In=2;try{typeof navigator!=Ue&&navigator.hardwareConcurrency&&(In=navigator.hardwareConcurrency)}catch{}const Fr={chunkSize:512*1024,maxWorkers:In,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:$,CompressionStreamNative:typeof CompressionStream!=Ue&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=Ue&&DecompressionStream},oe=Object.assign({},Fr);function Dn(){return oe}function Mr(n){return Math.max(n.chunkSize,vr)}function Pn(n){const{baseURL:t,chunkSize:e,maxWorkers:s,terminateWorkerTimeout:r,useCompressionStream:i,useWebWorkers:a,Deflate:l,Inflate:u,CompressionStream:d,DecompressionStream:h,workerScripts:p}=n;if(se("baseURL",t),se("chunkSize",e),se("maxWorkers",s),se("terminateWorkerTimeout",r),se("useCompressionStream",i),se("useWebWorkers",a),l&&(oe.CompressionStream=new rn(l)),u&&(oe.DecompressionStream=new rn(u)),se("CompressionStream",d),se("DecompressionStream",h),p!==$){const{deflate:b,inflate:y}=p;if((b||y)&&(oe.workerScripts||(oe.workerScripts={})),b){if(!Array.isArray(b))throw new Error("workerScripts.deflate must be an array");oe.workerScripts.deflate=b}if(y){if(!Array.isArray(y))throw new Error("workerScripts.inflate must be an array");oe.workerScripts.inflate=y}}}function se(n,t){t!==$&&(oe[n]=t)}function Hr(){return"application/octet-stream"}const Nn=[];for(let n=0;n<256;n++){let t=n;for(let e=0;e<8;e++)t&1?t=t>>>1^3988292384:t=t>>>1;Nn[n]=t}class ve{constructor(t){this.crc=t||-1}append(t){let e=this.crc|0;for(let s=0,r=t.length|0;s<r;s++)e=e>>>8^Nn[(e^t[s])&255];this.crc=e}get(){return~this.crc}}class Ln extends TransformStream{constructor(){let t;const e=new ve;super({transform(s,r){e.append(s),r.enqueue(s)},flush(){const s=new Uint8Array(4);new DataView(s.buffer).setUint32(0,e.get()),t.value=s}}),t=this}}function Wr(n){if(typeof TextEncoder>"u"){n=unescape(encodeURIComponent(n));const t=new Uint8Array(n.length);for(let e=0;e<t.length;e++)t[e]=n.charCodeAt(e);return t}else return new TextEncoder().encode(n)}const Y={concat(n,t){if(n.length===0||t.length===0)return n.concat(t);const e=n[n.length-1],s=Y.getPartial(e);return s===32?n.concat(t):Y._shiftRight(t,s,e|0,n.slice(0,n.length-1))},bitLength(n){const t=n.length;if(t===0)return 0;const e=n[t-1];return(t-1)*32+Y.getPartial(e)},clamp(n,t){if(n.length*32<t)return n;n=n.slice(0,Math.ceil(t/32));const e=n.length;return t=t&31,e>0&&t&&(n[e-1]=Y.partial(t,n[e-1]&2147483648>>t-1,1)),n},partial(n,t,e){return n===32?t:(e?t|0:t<<32-n)+n*1099511627776},getPartial(n){return Math.round(n/1099511627776)||32},_shiftRight(n,t,e,s){for(s===void 0&&(s=[]);t>=32;t-=32)s.push(e),e=0;if(t===0)return s.concat(n);for(let a=0;a<n.length;a++)s.push(e|n[a]>>>t),e=n[a]<<32-t;const r=n.length?n[n.length-1]:0,i=Y.getPartial(r);return s.push(Y.partial(t+i&31,t+i>32?e:s.pop(),1)),s}},Fe={bytes:{fromBits(n){const e=Y.bitLength(n)/8,s=new Uint8Array(e);let r;for(let i=0;i<e;i++)i&3||(r=n[i/4]),s[i]=r>>>24,r<<=8;return s},toBits(n){const t=[];let e,s=0;for(e=0;e<n.length;e++)s=s<<8|n[e],(e&3)===3&&(t.push(s),s=0);return e&3&&t.push(Y.partial(8*(e&3),s)),t}}},Un={};Un.sha1=class{constructor(n){const t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],n?(t._h=n._h.slice(0),t._buffer=n._buffer.slice(0),t._length=n._length):t.reset()}reset(){const n=this;return n._h=n._init.slice(0),n._buffer=[],n._length=0,n}update(n){const t=this;typeof n=="string"&&(n=Fe.utf8String.toBits(n));const e=t._buffer=Y.concat(t._buffer,n),s=t._length,r=t._length=s+Y.bitLength(n);if(r>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const i=new Uint32Array(e);let a=0;for(let l=t.blockSize+s-(t.blockSize+s&t.blockSize-1);l<=r;l+=t.blockSize)t._block(i.subarray(16*a,16*(a+1))),a+=1;return e.splice(0,16*a),t}finalize(){const n=this;let t=n._buffer;const e=n._h;t=Y.concat(t,[Y.partial(1,1)]);for(let s=t.length+2;s&15;s++)t.push(0);for(t.push(Math.floor(n._length/4294967296)),t.push(n._length|0);t.length;)n._block(t.splice(0,16));return n.reset(),e}_f(n,t,e,s){if(n<=19)return t&e|~t&s;if(n<=39)return t^e^s;if(n<=59)return t&e|t&s|e&s;if(n<=79)return t^e^s}_S(n,t){return t<<n|t>>>32-n}_block(n){const t=this,e=t._h,s=Array(80);for(let d=0;d<16;d++)s[d]=n[d];let r=e[0],i=e[1],a=e[2],l=e[3],u=e[4];for(let d=0;d<=79;d++){d>=16&&(s[d]=t._S(1,s[d-3]^s[d-8]^s[d-14]^s[d-16]));const h=t._S(5,r)+t._f(d,i,a,l)+u+s[d]+t._key[Math.floor(d/20)]|0;u=l,l=a,a=t._S(30,i),i=r,r=h}e[0]=e[0]+r|0,e[1]=e[1]+i|0,e[2]=e[2]+a|0,e[3]=e[3]+l|0,e[4]=e[4]+u|0}};const vn={};vn.aes=class{constructor(n){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const e=t._tables[0][4],s=t._tables[1],r=n.length;let i,a,l,u=1;if(r!==4&&r!==6&&r!==8)throw new Error("invalid aes key size");for(t._key=[a=n.slice(0),l=[]],i=r;i<4*r+28;i++){let d=a[i-1];(i%r===0||r===8&&i%r===4)&&(d=e[d>>>24]<<24^e[d>>16&255]<<16^e[d>>8&255]<<8^e[d&255],i%r===0&&(d=d<<8^d>>>24^u<<24,u=u<<1^(u>>7)*283)),a[i]=a[i-r]^d}for(let d=0;i;d++,i--){const h=a[d&3?i:i-4];i<=4||d<4?l[d]=h:l[d]=s[0][e[h>>>24]]^s[1][e[h>>16&255]]^s[2][e[h>>8&255]]^s[3][e[h&255]]}}encrypt(n){return this._crypt(n,0)}decrypt(n){return this._crypt(n,1)}_precompute(){const n=this._tables[0],t=this._tables[1],e=n[4],s=t[4],r=[],i=[];let a,l,u,d;for(let h=0;h<256;h++)i[(r[h]=h<<1^(h>>7)*283)^h]=h;for(let h=a=0;!e[h];h^=l||1,a=i[a]||1){let p=a^a<<1^a<<2^a<<3^a<<4;p=p>>8^p&255^99,e[h]=p,s[p]=h,d=r[u=r[l=r[h]]];let b=d*16843009^u*65537^l*257^h*16843008,y=r[p]*257^p*16843008;for(let x=0;x<4;x++)n[x][h]=y=y<<24^y>>>8,t[x][p]=b=b<<24^b>>>8}for(let h=0;h<5;h++)n[h]=n[h].slice(0),t[h]=t[h].slice(0)}_crypt(n,t){if(n.length!==4)throw new Error("invalid aes block size");const e=this._key[t],s=e.length/4-2,r=[0,0,0,0],i=this._tables[t],a=i[0],l=i[1],u=i[2],d=i[3],h=i[4];let p=n[0]^e[0],b=n[t?3:1]^e[1],y=n[2]^e[2],x=n[t?1:3]^e[3],c=4,o,f,_;for(let g=0;g<s;g++)o=a[p>>>24]^l[b>>16&255]^u[y>>8&255]^d[x&255]^e[c],f=a[b>>>24]^l[y>>16&255]^u[x>>8&255]^d[p&255]^e[c+1],_=a[y>>>24]^l[x>>16&255]^u[p>>8&255]^d[b&255]^e[c+2],x=a[x>>>24]^l[p>>16&255]^u[b>>8&255]^d[y&255]^e[c+3],c+=4,p=o,b=f,y=_;for(let g=0;g<4;g++)r[t?3&-g:g]=h[p>>>24]<<24^h[b>>16&255]<<16^h[y>>8&255]<<8^h[x&255]^e[c++],o=p,p=b,b=y,y=x,x=o;return r}};const Br={getRandomValues(n){const t=new Uint32Array(n.buffer),e=s=>{let r=987654321;const i=4294967295;return function(){return r=36969*(r&65535)+(r>>16)&i,s=18e3*(s&65535)+(s>>16)&i,(((r<<16)+s&i)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let s=0,r;s<n.length;s+=4){const i=e((r||Math.random())*4294967296);r=i()*987654071,t[s/4]=i()*4294967296|0}return n}},Fn={};Fn.ctrGladman=class{constructor(n,t){this._prf=n,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(n){return this.calculate(this._prf,n,this._iv)}incWord(n){if((n>>24&255)===255){let t=n>>16&255,e=n>>8&255,s=n&255;t===255?(t=0,e===255?(e=0,s===255?s=0:++s):++e):++t,n=0,n+=t<<16,n+=e<<8,n+=s}else n+=1<<24;return n}incCounter(n){(n[0]=this.incWord(n[0]))===0&&(n[1]=this.incWord(n[1]))}calculate(n,t,e){let s;if(!(s=t.length))return[];const r=Y.bitLength(t);for(let i=0;i<s;i+=4){this.incCounter(e);const a=n.encrypt(e);t[i]^=a[0],t[i+1]^=a[1],t[i+2]^=a[2],t[i+3]^=a[3]}return Y.clamp(t,r)}};const he={importKey(n){return new he.hmacSha1(Fe.bytes.toBits(n))},pbkdf2(n,t,e,s){if(e=e||1e4,s<0||e<0)throw new Error("invalid params to pbkdf2");const r=(s>>5)+1<<2;let i,a,l,u,d;const h=new ArrayBuffer(r),p=new DataView(h);let b=0;const y=Y;for(t=Fe.bytes.toBits(t),d=1;b<(r||1);d++){for(i=a=n.encrypt(y.concat(t,[d])),l=1;l<e;l++)for(a=n.encrypt(a),u=0;u<a.length;u++)i[u]^=a[u];for(l=0;b<(r||1)&&l<i.length;l++)p.setInt32(b,i[l]),b+=4}return h.slice(0,s/8)}};he.hmacSha1=class{constructor(n){const t=this,e=t._hash=Un.sha1,s=[[],[]];t._baseHash=[new e,new e];const r=t._baseHash[0].blockSize/32;n.length>r&&(n=new e().update(n).finalize());for(let i=0;i<r;i++)s[0][i]=n[i]^909522486,s[1][i]=n[i]^1549556828;t._baseHash[0].update(s[0]),t._baseHash[1].update(s[1]),t._resultHash=new e(t._baseHash[0])}reset(){const n=this;n._resultHash=new n._hash(n._baseHash[0]),n._updated=!1}update(n){const t=this;t._updated=!0,t._resultHash.update(n)}digest(){const n=this,t=n._resultHash.finalize(),e=new n._hash(n._baseHash[1]).update(t).finalize();return n.reset(),e}encrypt(n){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(n),this.digest(n)}};const jr=typeof crypto<"u"&&typeof crypto.getRandomValues=="function",dt="Invalid password",ht="Invalid signature",_t="zipjs-abort-check-password";function Mn(n){return jr?crypto.getRandomValues(n):Br.getRandomValues(n)}const me=16,qr="raw",Hn={name:"PBKDF2"},Gr={name:"HMAC"},Yr="SHA-1",Vr=Object.assign({hash:Gr},Hn),tt=Object.assign({iterations:1e3,hash:{name:Yr}},Hn),Zr=["deriveBits"],Te=[8,12,16],xe=[16,24,32],re=10,Kr=[0,0,0,0],Wn="undefined",Bn="function",We=typeof crypto!=Wn,Ce=We&&crypto.subtle,jn=We&&typeof Ce!=Wn,J=Fe.bytes,Xr=vn.aes,$r=Fn.ctrGladman,Jr=he.hmacSha1;let an=We&&jn&&typeof Ce.importKey==Bn,on=We&&jn&&typeof Ce.deriveBits==Bn;class Qr extends TransformStream{constructor({password:t,signed:e,encryptionStrength:s,checkPasswordOnly:r}){super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:t,signed:e,strength:s-1,pending:new Uint8Array})},async transform(i,a){const l=this,{password:u,strength:d,resolveReady:h,ready:p}=l;u?(await ei(l,d,u,X(i,0,Te[d]+2)),i=X(i,Te[d]+2),r?a.error(new Error(_t)):h()):await p;const b=new Uint8Array(i.length-re-(i.length-re)%me);a.enqueue(qn(l,i,b,0,re,!0))},async flush(i){const{signed:a,ctr:l,hmac:u,pending:d,ready:h}=this;if(u&&l){await h;const p=X(d,0,d.length-re),b=X(d,d.length-re);let y=new Uint8Array;if(p.length){const x=Re(J,p);u.update(x);const c=l.update(x);y=Se(J,c)}if(a){const x=X(Se(J,u.digest()),0,re);for(let c=0;c<re;c++)if(x[c]!=b[c])throw new Error(ht)}i.enqueue(y)}}})}}class zr extends TransformStream{constructor({password:t,encryptionStrength:e}){let s;super({start(){Object.assign(this,{ready:new Promise(r=>this.resolveReady=r),password:t,strength:e-1,pending:new Uint8Array})},async transform(r,i){const a=this,{password:l,strength:u,resolveReady:d,ready:h}=a;let p=new Uint8Array;l?(p=await ti(a,u,l),d()):await h;const b=new Uint8Array(p.length+r.length-r.length%me);b.set(p,0),i.enqueue(qn(a,r,b,p.length,0))},async flush(r){const{ctr:i,hmac:a,pending:l,ready:u}=this;if(a&&i){await u;let d=new Uint8Array;if(l.length){const h=i.update(Re(J,l));a.update(h),d=Se(J,h)}s.signature=Se(J,a.digest()).slice(0,re),r.enqueue(pt(d,s.signature))}}}),s=this}}function qn(n,t,e,s,r,i){const{ctr:a,hmac:l,pending:u}=n,d=t.length-r;u.length&&(t=pt(u,t),e=ri(e,d-d%me));let h;for(h=0;h<=d-me;h+=me){const p=Re(J,X(t,h,h+me));i&&l.update(p);const b=a.update(p);i||l.update(b),e.set(Se(J,b),h+s)}return n.pending=X(t,h),e}async function ei(n,t,e,s){const r=await Gn(n,t,e,X(s,0,Te[t])),i=X(s,Te[t]);if(r[0]!=i[0]||r[1]!=i[1])throw new Error(dt)}async function ti(n,t,e){const s=Mn(new Uint8Array(Te[t])),r=await Gn(n,t,e,s);return pt(s,r)}async function Gn(n,t,e,s){n.password=null;const r=Wr(e),i=await ni(qr,r,Vr,!1,Zr),a=await si(Object.assign({salt:s},tt),i,8*(xe[t]*2+2)),l=new Uint8Array(a),u=Re(J,X(l,0,xe[t])),d=Re(J,X(l,xe[t],xe[t]*2)),h=X(l,xe[t]*2);return Object.assign(n,{keys:{key:u,authentication:d,passwordVerification:h},ctr:new $r(new Xr(u),Array.from(Kr)),hmac:new Jr(d)}),h}async function ni(n,t,e,s,r){if(an)try{return await Ce.importKey(n,t,e,s,r)}catch{return an=!1,he.importKey(t)}else return he.importKey(t)}async function si(n,t,e){if(on)try{return await Ce.deriveBits(n,t,e)}catch{return on=!1,he.pbkdf2(t,n.salt,tt.iterations,e)}else return he.pbkdf2(t,n.salt,tt.iterations,e)}function pt(n,t){let e=n;return n.length+t.length&&(e=new Uint8Array(n.length+t.length),e.set(n,0),e.set(t,n.length)),e}function ri(n,t){if(t&&t>n.length){const e=n;n=new Uint8Array(t),n.set(e,0)}return n}function X(n,t,e){return n.subarray(t,e)}function Se(n,t){return n.fromBits(t)}function Re(n,t){return n.toBits(t)}const we=12;class ii extends TransformStream{constructor({password:t,passwordVerification:e,checkPasswordOnly:s}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),Yn(this,t)},transform(r,i){const a=this;if(a.password){const l=cn(a,r.subarray(0,we));if(a.password=null,l[we-1]!=a.passwordVerification)throw new Error(dt);r=r.subarray(we)}s?i.error(new Error(_t)):i.enqueue(cn(a,r))}})}}class ai extends TransformStream{constructor({password:t,passwordVerification:e}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),Yn(this,t)},transform(s,r){const i=this;let a,l;if(i.password){i.password=null;const u=Mn(new Uint8Array(we));u[we-1]=i.passwordVerification,a=new Uint8Array(s.length+u.length),a.set(ln(i,u),0),l=we}else a=new Uint8Array(s.length),l=0;a.set(ln(i,s),l),r.enqueue(a)}})}}function cn(n,t){const e=new Uint8Array(t.length);for(let s=0;s<t.length;s++)e[s]=Vn(n)^t[s],mt(n,e[s]);return e}function ln(n,t){const e=new Uint8Array(t.length);for(let s=0;s<t.length;s++)e[s]=Vn(n)^t[s],mt(n,t[s]);return e}function Yn(n,t){const e=[305419896,591751049,878082192];Object.assign(n,{keys:e,crcKey0:new ve(e[0]),crcKey2:new ve(e[2])});for(let s=0;s<t.length;s++)mt(n,t.charCodeAt(s))}function mt(n,t){let[e,s,r]=n.keys;n.crcKey0.append([t]),e=~n.crcKey0.get(),s=fn(Math.imul(fn(s+Zn(e)),134775813)+1),n.crcKey2.append([s>>>24]),r=~n.crcKey2.get(),n.keys=[e,s,r]}function Vn(n){const t=n.keys[2]|2;return Zn(Math.imul(t,t^1)>>>8)}function Zn(n){return n&255}function fn(n){return n&4294967295}const un="deflate-raw";class oi extends TransformStream{constructor(t,{chunkSize:e,CompressionStream:s,CompressionStreamNative:r}){super({});const{compressed:i,encrypted:a,useCompressionStream:l,zipCrypto:u,signed:d,level:h}=t,p=this;let b,y,x=Kn(super.readable);(!a||u)&&d&&(b=new Ln,x=Q(x,b)),i&&(x=$n(x,l,{level:h,chunkSize:e},r,s)),a&&(u?x=Q(x,new ai(t)):(y=new zr(t),x=Q(x,y))),Xn(p,x,()=>{let c;a&&!u&&(c=y.signature),(!a||u)&&d&&(c=new DataView(b.value.buffer).getUint32(0)),p.signature=c})}}class ci extends TransformStream{constructor(t,{chunkSize:e,DecompressionStream:s,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:a,signed:l,signature:u,compressed:d,useCompressionStream:h}=t;let p,b,y=Kn(super.readable);a&&(i?y=Q(y,new ii(t)):(b=new Qr(t),y=Q(y,b))),d&&(y=$n(y,h,{chunkSize:e},r,s)),(!a||i)&&l&&(p=new Ln,y=Q(y,p)),Xn(this,y,()=>{if((!a||i)&&l){const x=new DataView(p.value.buffer);if(u!=x.getUint32(0,!1))throw new Error(ht)}})}}function Kn(n){return Q(n,new TransformStream({transform(t,e){t&&t.length&&e.enqueue(t)}}))}function Xn(n,t,e){t=Q(t,new TransformStream({flush:e})),Object.defineProperty(n,"readable",{get(){return t}})}function $n(n,t,e,s,r){try{const i=t&&s?s:r;n=Q(n,new i(un,e))}catch(i){if(t)n=Q(n,new r(un,e));else throw i}return n}function Q(n,t){return n.pipeThrough(t)}const li="message",fi="start",ui="pull",dn="data",di="ack",hi="close",_i="deflate",Jn="inflate";class pi extends TransformStream{constructor(t,e){super({});const s=this,{codecType:r}=t;let i;r.startsWith(_i)?i=oi:r.startsWith(Jn)&&(i=ci);let a=0;const l=new i(t,e),u=super.readable,d=new TransformStream({transform(h,p){h&&h.length&&(a+=h.length,p.enqueue(h))},flush(){const{signature:h}=l;Object.assign(s,{signature:h,size:a})}});Object.defineProperty(s,"readable",{get(){return u.pipeThrough(l).pipeThrough(d)}})}}const mi=typeof Worker!=Ue;class Ke{constructor(t,{readable:e,writable:s},{options:r,config:i,streamOptions:a,useWebWorkers:l,transferStreams:u,scripts:d},h){const{signal:p}=a;return Object.assign(t,{busy:!0,readable:e.pipeThrough(new wi(e,a,i),{signal:p}),writable:s,options:Object.assign({},r),scripts:d,transferStreams:u,terminate(){const{worker:b,busy:y}=t;b&&!y&&(b.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,h(t)}}),(l&&mi?bi:gi)(t,i)}}class wi extends TransformStream{constructor(t,{onstart:e,onprogress:s,size:r,onend:i},{chunkSize:a}){let l=0;super({start(){e&&Xe(e,r)},async transform(u,d){l+=u.length,s&&await Xe(s,l,r),d.enqueue(u)},flush(){t.size=l,i&&Xe(i,l)}},{highWaterMark:1,size:()=>a})}}async function Xe(n,...t){try{await n(...t)}catch{}}function gi(n,t){return{run:()=>yi(n,t)}}function bi(n,{baseURL:t,chunkSize:e}){return n.interface||Object.assign(n,{worker:Ti(n.scripts[0],t,n),interface:{run:()=>xi(n,{chunkSize:e})}}),n.interface}async function yi({options:n,readable:t,writable:e,onTaskFinished:s},r){const i=new pi(n,r);try{await t.pipeThrough(i).pipeTo(e,{preventClose:!0,preventAbort:!0});const{signature:a,size:l}=i;return{signature:a,size:l}}finally{s()}}async function xi(n,t){let e,s;const r=new Promise((b,y)=>{e=b,s=y});Object.assign(n,{reader:null,writer:null,resolveResult:e,rejectResult:s,result:r});const{readable:i,options:a,scripts:l}=n,{writable:u,closed:d}=Ei(n.writable);nt({type:fi,scripts:l.slice(1),options:a,config:t,readable:i,writable:u},n)||Object.assign(n,{reader:i.getReader(),writer:u.getWriter()});const p=await r;try{await u.getWriter().close()}catch{}return await d,p}function Ei(n){const t=n.getWriter();let e;const s=new Promise(i=>e=i);return{writable:new WritableStream({async write(i){await t.ready,await t.write(i)},close(){t.releaseLock(),e()},abort(i){return t.abort(i)}}),closed:s}}let hn=!0,_n=!0;function Ti(n,t,e){const s={type:"module"};let r,i;typeof n==kn&&(n=n());try{r=new URL(n,t)}catch{r=n}if(hn)try{i=new Worker(r)}catch{hn=!1,i=new Worker(r,s)}else i=new Worker(r,s);return i.addEventListener(li,a=>Si(a,e)),i}function nt(n,{worker:t,writer:e,onTaskFinished:s,transferStreams:r}){try{let{value:i,readable:a,writable:l}=n;const u=[];if(i&&(i.byteLength<i.buffer.byteLength?n.value=i.buffer.slice(0,i.byteLength):n.value=i.buffer,u.push(n.value)),r&&_n?(a&&u.push(a),l&&u.push(l)):n.readable=n.writable=null,u.length)try{return t.postMessage(n,u),!0}catch{_n=!1,n.readable=n.writable=null,t.postMessage(n)}else t.postMessage(n)}catch(i){throw e&&e.releaseLock(),s(),i}}async function Si({data:n},t){const{type:e,value:s,messageId:r,result:i,error:a}=n,{reader:l,writer:u,resolveResult:d,rejectResult:h,onTaskFinished:p}=t;try{if(a){const{message:y,stack:x,code:c,name:o}=a,f=new Error(y);Object.assign(f,{stack:x,code:c,name:o}),b(f)}else{if(e==ui){const{value:y,done:x}=await l.read();nt({type:dn,value:y,done:x,messageId:r},t)}e==dn&&(await u.ready,await u.write(new Uint8Array(s)),nt({type:di,messageId:r},t)),e==hi&&b(null,i)}}catch(y){b(y)}function b(y,x){y?h(y):d(x),u&&u.releaseLock(),p()}}let ie=[];const $e=[];let pn=0;async function Ri(n,t){const{options:e,config:s}=t,{transferStreams:r,useWebWorkers:i,useCompressionStream:a,codecType:l,compressed:u,signed:d,encrypted:h}=e,{workerScripts:p,maxWorkers:b,terminateWorkerTimeout:y}=s;t.transferStreams=r||r===$;const x=!u&&!d&&!h&&!t.transferStreams;t.useWebWorkers=!x&&(i||i===$&&s.useWebWorkers),t.scripts=t.useWebWorkers&&p?p[l]:[],e.useCompressionStream=a||a===$&&s.useCompressionStream;let c;const o=ie.find(_=>!_.busy);if(o)st(o),c=new Ke(o,n,t,f);else if(ie.length<b){const _={indexWorker:pn};pn++,ie.push(_),c=new Ke(_,n,t,f)}else c=await new Promise(_=>$e.push({resolve:_,stream:n,workerOptions:t}));return c.run();function f(_){if($e.length){const[{resolve:g,stream:m,workerOptions:E}]=$e.splice(0,1);g(new Ke(_,m,E,f))}else _.worker?(st(_),Number.isFinite(y)&&y>=0&&(_.terminateTimeout=setTimeout(()=>{ie=ie.filter(g=>g!=_),_.terminate()},y))):ie=ie.filter(g=>g!=_)}}function st(n){const{terminateTimeout:t}=n;t&&(clearTimeout(t),n.terminateTimeout=null)}function Ai(){ie.forEach(n=>{st(n),n.terminate()})}const Qn="HTTP error ",Oe="HTTP Range not supported",zn="Writer iterator completed too soon",Ci="text/plain",Oi="Content-Length",ki="Content-Range",Ii="Accept-Ranges",Di="Range",Pi="Content-Type",Ni="HEAD",wt="GET",es="bytes",Li=64*1024,gt="writable";class Be{constructor(){this.size=0}init(){this.initialized=!0}}class le extends Be{get readable(){const t=this,{chunkSize:e=Li}=t,s=new ReadableStream({start(){this.chunkOffset=0},async pull(r){const{offset:i=0,size:a,diskNumberStart:l}=s,{chunkOffset:u}=this;r.enqueue(await G(t,i+u,Math.min(e,a-u),l)),u+e>a?r.close():this.chunkOffset+=e}});return s}}class bt extends Be{constructor(){super();const t=this,e=new WritableStream({write(s){return t.writeUint8Array(s)}});Object.defineProperty(t,gt,{get(){return e}})}writeUint8Array(){}}class Ui extends le{constructor(t){super();let e=t.length;for(;t.charAt(e-1)=="=";)e--;const s=t.indexOf(",")+1;Object.assign(this,{dataURI:t,dataStart:s,size:Math.floor((e-s)*.75)})}readUint8Array(t,e){const{dataStart:s,dataURI:r}=this,i=new Uint8Array(e),a=Math.floor(t/3)*4,l=atob(r.substring(a+s,Math.ceil((t+e)/3)*4+s)),u=t-Math.floor(a/4)*3;for(let d=u;d<u+e;d++)i[d-u]=l.charCodeAt(d);return i}}class vi extends bt{constructor(t){super(),Object.assign(this,{data:"data:"+(t||"")+";base64,",pending:[]})}writeUint8Array(t){const e=this;let s=0,r=e.pending;const i=e.pending.length;for(e.pending="",s=0;s<Math.floor((i+t.length)/3)*3-i;s++)r+=String.fromCharCode(t[s]);for(;s<t.length;s++)e.pending+=String.fromCharCode(t[s]);r.length>2?e.data+=btoa(r):e.pending=r}getData(){return this.data+btoa(this.pending)}}class yt extends le{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,e){const s=this,r=t+e;let a=await(t||r<s.size?s.blob.slice(t,r):s.blob).arrayBuffer();return a.byteLength>e&&(a=a.slice(t,r)),new Uint8Array(a)}}class ts extends Be{constructor(t){super();const e=this,s=new TransformStream,r=[];t&&r.push([Pi,t]),Object.defineProperty(e,gt,{get(){return s.writable}}),e.blob=new Response(s.readable,{headers:r}).blob()}getData(){return this.blob}}class Fi extends yt{constructor(t){super(new Blob([t],{type:Ci}))}}class Mi extends ts{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){const{encoding:t,utf8:e}=this,s=await super.getData();if(s.text&&e)return s.text();{const r=new FileReader;return new Promise((i,a)=>{Object.assign(r,{onload:({target:l})=>i(l.result),onerror:()=>a(r.error)}),r.readAsText(s,t)})}}}class Hi extends le{constructor(t,e){super(),ns(this,t,e)}async init(){await ss(this,rt,mn),super.init()}readUint8Array(t,e){return rs(this,t,e,rt,mn)}}class Wi extends le{constructor(t,e){super(),ns(this,t,e)}async init(){await ss(this,it,wn),super.init()}readUint8Array(t,e){return rs(this,t,e,it,wn)}}function ns(n,t,e){const{preventHeadRequest:s,useRangeHeader:r,forceRangeRequests:i}=e;e=Object.assign({},e),delete e.preventHeadRequest,delete e.useRangeHeader,delete e.forceRangeRequests,delete e.useXHR,Object.assign(n,{url:t,options:e,preventHeadRequest:s,useRangeHeader:r,forceRangeRequests:i})}async function ss(n,t,e){const{url:s,useRangeHeader:r,forceRangeRequests:i}=n;if(Gi(s)&&(r||i)){const{headers:a}=await t(wt,n,is(n));if(!i&&a.get(Ii)!=es)throw new Error(Oe);{let l;const u=a.get(ki);if(u){const d=u.trim().split(/\s*\/\s*/);if(d.length){const h=d[1];h&&h!="*"&&(l=Number(h))}}l===$?await gn(n,t,e):n.size=l}}else await gn(n,t,e)}async function rs(n,t,e,s,r){const{useRangeHeader:i,forceRangeRequests:a,options:l}=n;if(i||a){const u=await s(wt,n,is(n,t,e));if(u.status!=206)throw new Error(Oe);return new Uint8Array(await u.arrayBuffer())}else{const{data:u}=n;return u||await r(n,l),new Uint8Array(n.data.subarray(t,t+e))}}function is(n,t=0,e=1){return Object.assign({},xt(n),{[Di]:es+"="+t+"-"+(t+e-1)})}function xt({options:n}){const{headers:t}=n;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function mn(n){await as(n,rt)}async function wn(n){await as(n,it)}async function as(n,t){const e=await t(wt,n,xt(n));n.data=new Uint8Array(await e.arrayBuffer()),n.size||(n.size=n.data.length)}async function gn(n,t,e){if(n.preventHeadRequest)await e(n,n.options);else{const r=(await t(Ni,n,xt(n))).headers.get(Oi);r?n.size=Number(r):await e(n,n.options)}}async function rt(n,{options:t,url:e},s){const r=await fetch(e,Object.assign({},t,{method:n,headers:s}));if(r.status<400)return r;throw r.status==416?new Error(Oe):new Error(Qn+(r.statusText||r.status))}function it(n,{url:t},e){return new Promise((s,r)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",()=>{if(i.status<400){const a=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(l=>{const u=l.trim().split(/\s*:\s*/);u[0]=u[0].trim().replace(/^[a-z]|-[a-z]/g,d=>d.toUpperCase()),a.push(u)}),s({status:i.status,arrayBuffer:()=>i.response,headers:new Map(a)})}else r(i.status==416?new Error(Oe):new Error(Qn+(i.statusText||i.status)))},!1),i.addEventListener("error",a=>r(a.detail?a.detail.error:new Error("Network error")),!1),i.open(n,t),e)for(const a of Object.entries(e))i.setRequestHeader(a[0],a[1]);i.responseType="arraybuffer",i.send()})}class os extends le{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR?new Wi(t,e):new Hi(t,e)})}set size(t){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class Bi extends os{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}}class ji extends le{constructor(t){super(),Object.assign(this,{array:t,size:t.length})}readUint8Array(t,e){return this.array.slice(t,t+e)}}class qi extends bt{init(t=0){Object.assign(this,{offset:0,array:new Uint8Array(t)}),super.init()}writeUint8Array(t){const e=this;if(e.offset+t.length>e.array.length){const s=e.array;e.array=new Uint8Array(s.length+t.length),e.array.set(s)}e.array.set(t,e.offset),e.offset+=t.length}getData(){return this.array}}class Et extends le{constructor(t){super(),this.readers=t}async init(){const t=this,{readers:e}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(e.map(async(s,r)=>{await s.init(),r!=e.length-1&&(t.lastDiskOffset+=s.size),t.size+=s.size})),super.init()}async readUint8Array(t,e,s=0){const r=this,{readers:i}=this;let a,l=s;l==-1&&(l=i.length-1);let u=t;for(;u>=i[l].size;)u-=i[l].size,l++;const d=i[l],h=d.size;if(u+e<=h)a=await G(d,u,e);else{const p=h-u;a=new Uint8Array(e),a.set(await G(d,u,p)),a.set(await r.readUint8Array(t+p,e-p,s),p)}return r.lastDiskNumber=Math.max(l,r.lastDiskNumber),a}}class Me extends Be{constructor(t,e=4294967295){super();const s=this;Object.assign(s,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});let r,i,a;const l=new WritableStream({async write(h){const{availableSize:p}=s;if(a)h.length>=p?(await u(h.slice(0,p)),await d(),s.diskOffset+=r.size,s.diskNumber++,a=null,await this.write(h.slice(p))):await u(h);else{const{value:b,done:y}=await t.next();if(y&&!b)throw new Error(zn);r=b,r.size=0,r.maxSize&&(s.maxSize=r.maxSize),s.availableSize=s.maxSize,await Ae(r),i=b.writable,a=i.getWriter(),await this.write(h)}},async close(){await a.ready,await d()}});Object.defineProperty(s,gt,{get(){return l}});async function u(h){const p=h.length;p&&(await a.ready,await a.write(h),r.size+=p,s.size+=p,s.availableSize-=p)}async function d(){i.size=r.size,await a.close()}}}function Gi(n){const{baseURL:t}=Dn(),{protocol:e}=new URL(n,t);return e=="http:"||e=="https:"}async function Ae(n,t){n.init&&!n.initialized&&await n.init(t)}function cs(n){return Array.isArray(n)&&(n=new Et(n)),n instanceof ReadableStream&&(n={readable:n}),n}function ls(n){n.writable===$&&typeof n.next==kn&&(n=new Me(n)),n instanceof WritableStream&&(n={writable:n});const{writable:t}=n;return t.size===$&&(t.size=0),n instanceof Me||Object.assign(n,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),n}function G(n,t,e,s){return n.readUint8Array(t,e,s)}const Yi=Et,Vi=Me,fs="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),Zi=fs.length==256;function Ki(n){if(Zi){let t="";for(let e=0;e<n.length;e++)t+=fs[n[e]];return t}else return new TextDecoder().decode(n)}function at(n,t){return t&&t.trim().toLowerCase()=="cp437"?Ki(n):new TextDecoder(t).decode(n)}const us="filename",ds="rawFilename",hs="comment",_s="rawComment",ps="uncompressedSize",ms="compressedSize",ws="offset",ot="diskNumberStart",ct="lastModDate",lt="rawLastModDate",gs="lastAccessDate",Xi="rawLastAccessDate",bs="creationDate",$i="rawCreationDate",Ji="internalFileAttribute",Qi="externalFileAttribute",zi="msDosCompatible",ea="zip64",ta=[us,ds,ms,ps,ct,lt,hs,_s,gs,bs,ws,ot,ot,Ji,Qi,zi,ea,"directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class bn{constructor(t){ta.forEach(e=>this[e]=t[e])}}const Ne="File format is not recognized",ys="End of central directory not found",xs="End of Zip64 central directory not found",Es="End of Zip64 central directory locator not found",Ts="Central directory header not found",Ss="Local file header not found",Rs="Zip64 extra field not found",As="File contains encrypted entry",Cs="Encryption method not supported",ft="Compression method not supported",ut="Split zip file",yn="utf-8",xn="cp437",na=[[ps,de],[ms,de],[ws,de],[ot,ae]],sa={[ae]:{getValue:B,bytes:4},[de]:{getValue:Le,bytes:8}};class ra{constructor(t,e={}){Object.assign(this,{reader:cs(t),options:e,config:Dn()})}async*getEntriesGenerator(t={}){const e=this;let{reader:s}=e;const{config:r}=e;if(await Ae(s),(s.size===$||!s.readUint8Array)&&(s=new yt(await new Response(s.readable).blob()),await Ae(s)),s.size<pe)throw new Error(Ne);s.chunkSize=Mr(r);const i=await fa(s,Sr,s.size,pe,ae*16);if(!i){const S=await G(s,0,4),C=q(S);throw B(C)==Tr?new Error(ut):new Error(ys)}const a=q(i);let l=B(a,12),u=B(a,16);const d=i.offset,h=j(a,20),p=d+pe+h;let b=j(a,4);const y=s.lastDiskNumber||0;let x=j(a,6),c=j(a,8),o=0,f=0;if(u==de||l==de||c==ae||x==ae){const S=await G(s,i.offset-Ve,Ve),C=q(S);if(B(C,0)!=Rr)throw new Error(xs);u=Le(C,8);let I=await G(s,u,Ze,-1),O=q(I);const N=i.offset-Ve-Ze;if(B(O,0)!=zt&&u!=N){const P=u;u=N,o=u-P,I=await G(s,u,Ze,-1),O=q(I)}if(B(O,0)!=zt)throw new Error(Es);b==ae&&(b=B(O,16)),x==ae&&(x=B(O,20)),c==ae&&(c=Le(O,32)),l==de&&(l=Le(O,40)),u-=l}if(u>=s.size&&(o=s.size-u-l-pe,u=s.size-l-pe),y!=b)throw new Error(ut);if(u<0)throw new Error(Ne);let _=0,g=await G(s,u,l,x),m=q(g);if(l){const S=i.offset-l;if(B(m,_)!=Qt&&u!=S){const C=u;u=S,o+=u-C,g=await G(s,u,l,x),m=q(g)}}const E=i.offset-u-(s.lastDiskOffset||0);if(l!=E&&E>=0&&(l=E,g=await G(s,u,l,x),m=q(g)),u<0||u>=s.size)throw new Error(Ne);const w=K(e,t,"filenameEncoding"),T=K(e,t,"commentEncoding");for(let S=0;S<c;S++){const C=new ia(s,r,e.options);if(B(m,_)!=Qt)throw new Error(Ts);Os(C,m,_+6);const I=!!C.bitFlag.languageEncodingFlag,O=_+46,N=O+C.filenameLength,P=N+C.extraFieldLength,k=j(m,_+4),M=(k&0)==0,v=g.subarray(O,N),be=j(m,_+32),D=P+be,fe=g.subarray(P,D),F=I,H=I,Tt=M&&(ge(m,_+38)&sn)==sn,St=B(m,_+42)+o;Object.assign(C,{versionMadeBy:k,msDosCompatible:M,compressedSize:0,uncompressedSize:0,commentLength:be,directory:Tt,offset:St,diskNumberStart:j(m,_+34),internalFileAttribute:j(m,_+36),externalFileAttribute:B(m,_+38),rawFilename:v,filenameUTF8:F,commentUTF8:H,rawExtraField:g.subarray(N,P)});const[Rt,Ds]=await Promise.all([at(v,F?yn:w||xn),at(fe,H?yn:T||xn)]);Object.assign(C,{rawComment:fe,filename:Rt,comment:Ds,directory:Tt||Rt.endsWith(Ur)}),f=Math.max(St,f),await ks(C,C,m,_+6);const je=new bn(C);je.getData=(Ct,Ps)=>C.getData(Ct,je,Ps),_=D;const{onprogress:At}=t;if(At)try{await At(S+1,c,new bn(C))}catch{}yield je}const R=K(e,t,"extractPrependedData"),A=K(e,t,"extractAppendedData");return R&&(e.prependedData=f>0?await G(s,0,f):new Uint8Array),e.comment=h?await G(s,d+pe,h):new Uint8Array,A&&(e.appendedData=p<s.size?await G(s,p,s.size-p):new Uint8Array),!0}async getEntries(t={}){const e=[];for await(const s of this.getEntriesGenerator(t))e.push(s);return e}async close(){}}class ia{constructor(t,e,s){Object.assign(this,{reader:t,config:e,options:s})}async getData(t,e,s={}){const r=this,{reader:i,offset:a,diskNumberStart:l,extraFieldAES:u,compressionMethod:d,config:h,bitFlag:p,signature:b,rawLastModDate:y,uncompressedSize:x,compressedSize:c}=r,o=e.localDirectory={},f=await G(i,a,30,l),_=q(f);let g=K(r,s,"password");if(g=g&&g.length&&g,u&&u.originalCompressionMethod!=xr)throw new Error(ft);if(d!=yr&&d!=br)throw new Error(ft);if(B(_,0)!=Er)throw new Error(Ss);Os(o,_,4),o.rawExtraField=o.extraFieldLength?await G(i,a+30+o.filenameLength,o.extraFieldLength,l):new Uint8Array,await ks(r,o,_,4,!0),Object.assign(e,{lastAccessDate:o.lastAccessDate,creationDate:o.creationDate});const m=r.encrypted&&o.encrypted,E=m&&!u;if(m){if(!E&&u.strength===$)throw new Error(Cs);if(!g)throw new Error(As)}const w=a+30+o.filenameLength+o.extraFieldLength,T=c,R=i.readable;Object.assign(R,{diskNumberStart:l,offset:w,size:T});const A=K(r,s,"signal"),S=K(r,s,"checkPasswordOnly");S&&(t=new WritableStream),t=ls(t),await Ae(t,x);const{writable:C}=t,{onstart:I,onprogress:O,onend:N}=s,P={options:{codecType:Jn,password:g,zipCrypto:E,encryptionStrength:u&&u.strength,signed:K(r,s,"checkSignature"),passwordVerification:E&&(p.dataDescriptor?y>>>8&255:b>>>24&255),signature:b,compressed:d!=0,encrypted:m,useWebWorkers:K(r,s,"useWebWorkers"),useCompressionStream:K(r,s,"useCompressionStream"),transferStreams:K(r,s,"transferStreams"),checkPasswordOnly:S},config:h,streamOptions:{signal:A,size:T,onstart:I,onprogress:O,onend:N}};let k=0;try{({outputSize:k}=await Ri({readable:R,writable:C},P))}catch(M){if(!S||M.message!=_t)throw M}finally{const M=K(r,s,"preventClose");C.size+=k,!M&&!C.locked&&await C.getWriter().close()}return S?void 0:t.getData?t.getData():C}}function Os(n,t,e){const s=n.rawBitFlag=j(t,e+2),r=(s&en)==en,i=B(t,e+6);Object.assign(n,{encrypted:r,version:j(t,e),bitFlag:{level:(s&Lr)>>1,dataDescriptor:(s&tn)==tn,languageEncodingFlag:(s&nn)==nn},rawLastModDate:i,lastModDate:ua(i),filenameLength:j(t,e+22),extraFieldLength:j(t,e+24)})}async function ks(n,t,e,s,r){const{rawExtraField:i}=t,a=t.extraField=new Map,l=q(new Uint8Array(i));let u=0;try{for(;u<i.length;){const f=j(l,u),_=j(l,u+2);a.set(f,{type:f,data:i.slice(u+4,u+4+_)}),u+=4+_}}catch{}const d=j(e,s+4);Object.assign(t,{signature:B(e,s+10),uncompressedSize:B(e,s+18),compressedSize:B(e,s+14)});const h=a.get(Ar);h&&(aa(h,t),t.extraFieldZip64=h);const p=a.get(Dr);p&&(await En(p,us,ds,t,n),t.extraFieldUnicodePath=p);const b=a.get(Pr);b&&(await En(b,hs,_s,t,n),t.extraFieldUnicodeComment=b);const y=a.get(Cr);y?(oa(y,t,d),t.extraFieldAES=y):t.compressionMethod=d;const x=a.get(Or);x&&(ca(x,t),t.extraFieldNTFS=x);const c=a.get(Ir);c&&(la(c,t,r),t.extraFieldExtendedTimestamp=c);const o=a.get(Nr);o&&(t.extraFieldUSDZ=o)}function aa(n,t){t.zip64=!0;const e=q(n.data),s=na.filter(([r,i])=>t[r]==i);for(let r=0,i=0;r<s.length;r++){const[a,l]=s[r];if(t[a]==l){const u=sa[l];t[a]=n[a]=u.getValue(e,i),i+=u.bytes}else if(n[a])throw new Error(Rs)}}async function En(n,t,e,s,r){const i=q(n.data),a=new ve;a.append(r[e]);const l=q(new Uint8Array(4));l.setUint32(0,a.get(),!0);const u=B(i,1);Object.assign(n,{version:ge(i,0),[t]:at(n.data.subarray(5)),valid:!r.bitFlag.languageEncodingFlag&&u==B(l,0)}),n.valid&&(s[t]=n[t],s[t+"UTF8"]=!0)}function oa(n,t,e){const s=q(n.data),r=ge(s,4);Object.assign(n,{vendorVersion:ge(s,0),vendorId:ge(s,2),strength:r,originalCompressionMethod:e,compressionMethod:j(s,5)}),t.compressionMethod=n.compressionMethod}function ca(n,t){const e=q(n.data);let s=4,r;try{for(;s<n.data.length&&!r;){const i=j(e,s),a=j(e,s+2);i==kr&&(r=n.data.slice(s+4,s+4+a)),s+=4+a}}catch{}try{if(r&&r.length==24){const i=q(r),a=i.getBigUint64(0,!0),l=i.getBigUint64(8,!0),u=i.getBigUint64(16,!0);Object.assign(n,{rawLastModDate:a,rawLastAccessDate:l,rawCreationDate:u});const d=Je(a),h=Je(l),p=Je(u),b={lastModDate:d,lastAccessDate:h,creationDate:p};Object.assign(n,b),Object.assign(t,b)}}catch{}}function la(n,t,e){const s=q(n.data),r=ge(s,0),i=[],a=[];e?((r&1)==1&&(i.push(ct),a.push(lt)),(r&2)==2&&(i.push(gs),a.push(Xi)),(r&4)==4&&(i.push(bs),a.push($i))):n.data.length>=5&&(i.push(ct),a.push(lt));let l=1;i.forEach((u,d)=>{if(n.data.length>=l+4){const h=B(s,l);t[u]=n[u]=new Date(h*1e3);const p=a[d];n[p]=h}l+=4})}async function fa(n,t,e,s,r){const i=new Uint8Array(4),a=q(i);da(a,0,t);const l=s+r;return await u(s)||await u(Math.min(l,e));async function u(d){const h=e-d,p=await G(n,h,d);for(let b=p.length-s;b>=0;b--)if(p[b]==i[0]&&p[b+1]==i[1]&&p[b+2]==i[2]&&p[b+3]==i[3])return{offset:h+b,buffer:p.slice(b,b+s).buffer}}}function K(n,t,e){return t[e]===$?n.options[e]:t[e]}function ua(n){const t=(n&4294901760)>>16,e=n&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(e&63488)>>11,(e&2016)>>5,(e&31)*2,0)}catch{}}function Je(n){return new Date(Number(n/BigInt(1e4)-BigInt(116444736e5)))}function ge(n,t){return n.getUint8(t)}function j(n,t){return n.getUint16(t,!0)}function B(n,t){return n.getUint32(t,!0)}function Le(n,t){return Number(n.getBigUint64(t,!0))}function da(n,t,e){n.setUint32(t,e,!0)}function q(n){return new DataView(n.buffer)}Pn({Inflate:gr});const ha=Object.freeze(Object.defineProperty({__proto__:null,BlobReader:yt,BlobWriter:ts,Data64URIReader:Ui,Data64URIWriter:vi,ERR_BAD_FORMAT:Ne,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Ts,ERR_ENCRYPTED:As,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Es,ERR_EOCDR_NOT_FOUND:ys,ERR_EOCDR_ZIP64_NOT_FOUND:xs,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Rs,ERR_HTTP_RANGE:Oe,ERR_INVALID_PASSWORD:dt,ERR_INVALID_SIGNATURE:ht,ERR_ITERATOR_COMPLETED_TOO_SOON:zn,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Ss,ERR_SPLIT_ZIP_FILE:ut,ERR_UNSUPPORTED_COMPRESSION:ft,ERR_UNSUPPORTED_ENCRYPTION:Cs,HttpRangeReader:Bi,HttpReader:os,Reader:le,SplitDataReader:Et,SplitDataWriter:Me,SplitZipReader:Yi,SplitZipWriter:Vi,TextReader:Fi,TextWriter:Mi,Uint8ArrayReader:ji,Uint8ArrayWriter:qi,Writer:bt,ZipReader:ra,configure:Pn,getMimeType:Hr,initReader:cs,initStream:Ae,initWriter:ls,readUint8Array:G,terminateWorkers:Ai},Symbol.toStringTag,{value:"Module"})),Ee=ha;class _a{constructor(t,e){L(this,"_zipReader");L(this,"_entriesPromise");L(this,"_traceURL");this._traceURL=t,Ee.configure({baseURL:self.location.href}),this._zipReader=new Ee.ZipReader(new Ee.HttpReader(ma(t),{mode:"cors",preventHeadRequest:!0}),{useWebWorkers:!1}),this._entriesPromise=this._zipReader.getEntries({onprogress:e}).then(s=>{const r=new Map;for(const i of s)r.set(i.filename,i);return r})}isLive(){return!1}traceURL(){return this._traceURL}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(t){return(await this._entriesPromise).has(t)}async readText(t){var i;const s=(await this._entriesPromise).get(t);if(!s)return;const r=new Ee.TextWriter;return await((i=s.getData)==null?void 0:i.call(s,r)),r.getData()}async readBlob(t){const s=(await this._entriesPromise).get(t);if(!s)return;const r=new Ee.BlobWriter;return await s.getData(r),r.getData()}}class pa{constructor(t){L(this,"_entriesPromise");L(this,"_traceURL");this._traceURL=t,this._entriesPromise=fetch("/trace/file?path="+encodeURIComponent(t)).then(async e=>{const s=JSON.parse(await e.text()),r=new Map;for(const i of s.entries)r.set(i.name,i.path);return r})}isLive(){return!0}traceURL(){return this._traceURL}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(t){return(await this._entriesPromise).has(t)}async readText(t){const e=await this._readEntry(t);return e==null?void 0:e.text()}async readBlob(t){const e=await this._readEntry(t);return(e==null?void 0:e.status)===200?await(e==null?void 0:e.blob()):void 0}async _readEntry(t){const s=(await this._entriesPromise).get(t);if(s)return fetch("/trace/file?path="+encodeURIComponent(s))}}function ma(n){let t=n.startsWith("http")||n.startsWith("blob")?n:`file?path=${encodeURIComponent(n)}`;return t.startsWith("https://www.dropbox.com/")&&(t="https://dl.dropboxusercontent.com/"+t.substring(24)),t}self.addEventListener("install",function(n){self.skipWaiting()});self.addEventListener("activate",function(n){n.waitUntil(self.clients.claim())});const wa=new URL(self.registration.scope).pathname,ce=new Map,He=new Map;async function ga(n,t,e,s,r){var u;await Is();let i=He.get(e);i||(i={limit:s,traceUrls:new Set},He.set(e,i)),i.traceUrls.add(n);const a=new Js;try{const[d,h]=Us(r,[.5,.4,.1]),p=n.endsWith("json")?new pa(n):new _a(n,d);await a.load(p,h)}catch(d){throw console.error(d),(u=d==null?void 0:d.message)!=null&&u.includes("Cannot find .trace file")&&await a.hasEntry("index.html")?new Error("Could not load trace. Did you upload a Playwright HTML report instead? Make sure to extract the archive first and then double-click the index.html file or put it on a web server."):d instanceof An?new Error(`Could not load trace from ${t||n}. ${d.message}`):t?new Error(`Could not load trace from ${t}. Make sure to upload a valid Playwright trace.`):new Error(`Could not load trace from ${n}. Make sure a valid Playwright Trace is accessible over this url.`)}const l=new Ys(a.storage(),d=>a.resourceForSha1(d));return ce.set(n,{traceModel:a,snapshotServer:l}),a}async function ba(n){if(n.request.url.startsWith("chrome-extension://"))return fetch(n.request);const t=n.request,e=await self.clients.get(n.clientId),s=self.registration.scope.startsWith("https://");if(t.url.startsWith(self.registration.scope)){const u=new URL(ze(t.url)),d=u.pathname.substring(wa.length-1);if(d==="/ping")return await Is(),new Response(null,{status:200});const h=u.searchParams.get("trace");if(d==="/contexts")try{const p=u.searchParams.has("limit")?+u.searchParams.get("limit"):void 0,b=await ga(h,u.searchParams.get("traceFileName"),n.clientId,p,(y,x)=>{e.postMessage({method:"progress",params:{done:y,total:x}})});return new Response(JSON.stringify(b.contextEntries),{status:200,headers:{"Content-Type":"application/json"}})}catch(p){return new Response(JSON.stringify({error:p==null?void 0:p.message}),{status:500,headers:{"Content-Type":"application/json"}})}if(d.startsWith("/snapshotInfo/")){const{snapshotServer:p}=ce.get(h)||{};return p?p.serveSnapshotInfo(d,u.searchParams):new Response(null,{status:404})}if(d.startsWith("/snapshot/")){const{snapshotServer:p}=ce.get(h)||{};if(!p)return new Response(null,{status:404});const b=p.serveSnapshot(d,u.searchParams,u.href);return s&&b.headers.set("Content-Security-Policy","upgrade-insecure-requests"),b}if(d.startsWith("/closest-screenshot/")){const{snapshotServer:p}=ce.get(h)||{};return p?p.serveClosestScreenshot(d,u.searchParams):new Response(null,{status:404})}if(d.startsWith("/sha1/")){const p=d.slice(6);for(const b of ce.values()){const y=await b.traceModel.resourceForSha1(p);if(y)return new Response(y,{status:200,headers:ya(u.searchParams)})}return new Response(null,{status:404})}return fetch(n.request)}const r=ze(e.url),i=new URL(r).searchParams.get("trace"),{snapshotServer:a}=ce.get(i)||{};if(!a)return new Response(null,{status:404});const l=[t.url];return s&&t.url.startsWith("https://")&&l.push(t.url.replace(/^https/,"http")),a.serveResource(l,t.method,r)}function ya(n){const t=n.get("dn"),e=n.get("dct");if(!t)return;const s=new Headers;return s.set("Content-Disposition",`attachment; filename="attachment"; filename*=UTF-8''${encodeURIComponent(t)}`),e&&s.set("Content-Type",e),s}async function Is(){const n=await self.clients.matchAll(),t=new Set;for(const[e,s]of He){if(!n.find(r=>r.id===e)){He.delete(e);continue}if(s.limit!==void 0){const r=[...s.traceUrls];s.traceUrls=new Set(r.slice(r.length-s.limit))}s.traceUrls.forEach(r=>t.add(r))}for(const e of ce.keys())t.has(e)||ce.delete(e)}self.addEventListener("fetch",function(n){n.respondWith(ba(n))});
|
|
1
|
+
var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};function n(e){let t;for(let n of Object.keys(e)){let r=e[n];r&&(t||={},t[n]=r,e[n]=0)}return t}function r(e){let t;for(let n of Object.keys(e)){let r=e[n];r.some(Boolean)&&(t||={},t[n]=r.slice(),r.fill(0))}return t}var i=class{constructor(e,t){this._snapshotIds=new Map,this._snapshotStorage=e,this._resourceLoader=t}serveSnapshot(e,t,n){let r=this._snapshot(e,t);if(!r)return new Response(null,{status:404});let i=r.render();return this._snapshotIds.set(n,r),new Response(i.html,{status:200,headers:{"Content-Type":`text/html; charset=utf-8`,"Content-Security-Policy":`script-src 'nonce-${i.scriptNonce}'; object-src 'none'`}})}async serveClosestScreenshot(e,t){let n=this._snapshot(e,t)?.closestScreenshot();return n?new Response(await this._resourceLoader(n)):new Response(null,{status:404})}serveSnapshotInfo(e,t){let n=this._snapshot(e,t);return this._respondWithJson(n?{viewport:n.viewport(),url:n.snapshot().frameUrl,timestamp:n.snapshot().timestamp,wallTime:n.snapshot().wallTime}:{error:`No snapshot found`})}_snapshot(e,t){return this._snapshotStorage.snapshotForCall(e,t.get(`phase`),t.get(`frameId`)||void 0)}_respondWithJson(e){return new Response(JSON.stringify(e),{status:200,headers:{"Cache-Control":`public, max-age=31536000`,"Content-Type":`application/json`}})}async serveResource(e,t,n){let r,i=this._snapshotIds.get(n);for(let n of e)if(r=i?.resourceByUrl(a(n),t),r)break;if(!r)return new Response(null,{status:404});let o=r.response.content._file,s=o&&await this._resourceLoader(o)||new Blob([]),c=r.response.content.mimeType;/^text\/|^application\/(javascript|json)/.test(c)&&!c.includes(`charset`)&&(c=`${c}; charset=utf-8`);let l=new Headers;c!==`x-unknown`&&l.set(`Content-Type`,c);for(let{name:e,value:t}of r.response.headers)l.set(e,t);l.delete(`Content-Encoding`),l.delete(`Access-Control-Allow-Origin`),l.set(`Access-Control-Allow-Origin`,`*`),l.delete(`Content-Length`),l.set(`Content-Length`,String(s.size)),this._snapshotStorage.hasResourceOverride(r.request.url)?l.set(`Cache-Control`,`no-store, no-cache, max-age=0`):l.set(`Cache-Control`,`public, max-age=31536000`);let{status:u}=r.response;return new Response(u===101||u===204||u===205||u===304?null:s,{headers:l,status:r.response.status,statusText:r.response.statusText})}};function a(e){try{let t=new URL(e);return t.hash=``,t.toString()}catch{return e}}var o={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function s(e){return e.replace(/[&<>"']/gu,e=>o[e])}function c(e){return e.replace(/[&<]/gu,e=>o[e])}function l(e,t,n){return e.find((r,i)=>{if(i===e.length-1)return!0;let a=e[i+1];return Math.abs(t(r)-n)<Math.abs(t(a)-n)})}function u(e){return Array.isArray(e)&&typeof e[0]==`string`}function d(e){return Array.isArray(e)&&Array.isArray(e[0])}var f=class{constructor(e,t,n,r,i){this._htmlCache=e,this._resources=t,this._snapshots=n,this._index=i,this._snapshot=n[i],this._callId=n[i].callId,this._screencastFrames=r,this.snapshotName=n[i].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}closestScreenshot(){let{wallTime:e,timestamp:t}=this.snapshot();return(e&&this._screencastFrames[0]?.frameSwapWallTime?l(this._screencastFrames,e=>e.frameSwapWallTime,e):l(this._screencastFrames,e=>e.timestamp,t))?.file}render(){let e=[],t=(n,r,i,a)=>{if(typeof n==`string`){e.push(c(n));return}if(d(n)){let e=r-n[0][0];if(e>=0&&e<=r){let r=h(this._snapshots[e]),o=n[0][1];if(o>=0&&o<r.length)return t(r[o],e,i,a)}}else if(u(n)){let[o,c,...l]=n;if(o.toUpperCase()===`SCRIPT`||/[\s=<>\/]/.test(o))return;let u=o.toUpperCase(),d=u===`NOSCRIPT`?`X-NOSCRIPT`:o,f=Object.entries(c||{});e.push(`<`,d);let h=`__playwright_current_src__`,g=u===`IFRAME`||u===`FRAME`,_=u===`A`,v=u===`IMG`,y=u===`META`,x=v&&f.some(e=>e[0]===h),C=u===`SOURCE`&&i===`PICTURE`&&a?.some(e=>e[0]===h),w=y&&f.some(e=>e[0].toLowerCase()===`http-equiv`&&!m.has(e[1].trim().toLowerCase()));for(let[t,n]of f){let r=t;if(t.toLowerCase().startsWith(`on`))continue;g&&t.toLowerCase()===`src`&&(r=`__playwright_src__`),g&&(t.toLowerCase()===`srcdoc`||t.toLowerCase()===`sandbox`)&&(r=`__playwright_`+t.toLowerCase()+`__`),u===`OBJECT`&&t.toLowerCase()===`data`&&(r=`__playwright_data__`),u===`EMBED`&&t.toLowerCase()===`src`&&(r=`__playwright_src__`),v&&t===h&&(r=`src`),[`src`,`srcset`].includes(t.toLowerCase())&&(x||C)&&(r=`_`+r),w&&(t.toLowerCase()===`http-equiv`||t.toLowerCase()===`content`)&&(r=`_`+t);let i=n;!_&&(t.toLowerCase()===`href`||t.toLowerCase()===`src`||t===h)&&(i=b(n)),e.push(` `,r,`="`,s(i),`"`)}if(u===`STYLE`){let t=typeof l[0]==`string`?l[0]:``;e.push(` `,`__playwright_style_content__`,`="`,s(S(t)),`"`),e.push(`></`,d,`>`);return}e.push(`>`);for(let e of l)t(e,r,d,f);p.has(d)||e.push(`</`,d,`>`);return}else return},n=this._snapshot,{html:r,scriptNonce:i}=this._htmlCache.getOrCompute(this,()=>{t(n.html,this._index,void 0,void 0);let r=n.doctype?.replace(/[^a-zA-Z0-9]/g,``),i=r?`<!DOCTYPE ${r}>`:``,a=g(),o=i+[`<style>*,*::before,*::after { visibility: hidden }</style>`,`<script nonce="${a}">${_(this.viewport(),this._callId,this.snapshotName)}<\/script>`].join(``)+e.join(``);return{value:{html:o,scriptNonce:a},size:o.length}});return{html:r,scriptNonce:i,pageId:n.pageId,frameId:n.frameId,index:this._index}}resourceByUrl(e,t){let n=this._snapshot,r,i;for(let a of this._resources){if(typeof a._monotonicTime==`number`&&a._monotonicTime>=n.timestamp)break;a.response.status!==304&&a.request.url===e&&a.request.method===t&&(a._frameref===n.frameId?r=a:i=a)}let a=r??i;if(a&&t.toUpperCase()===`GET`){let t=n.resourceOverrides.find(t=>t.url===e);if(t?.ref){let n=this._index-t.ref;n>=0&&n<this._snapshots.length&&(t=this._snapshots[n].resourceOverrides.find(t=>t.url===e))}t?.file&&(a={...a,response:{...a.response,content:{...a.response.content,_file:t.file}}})}return a}},p=new Set([`AREA`,`BASE`,`BR`,`COL`,`COMMAND`,`EMBED`,`HR`,`IMG`,`INPUT`,`KEYGEN`,`LINK`,`MENUITEM`,`META`,`PARAM`,`SOURCE`,`TRACK`,`WBR`]),m=new Set([`content-type`,`content-language`,`default-style`,`x-ua-compatible`]);function h(e){if(!e._nodes){let t=[],n=e=>{if(typeof e==`string`)t.push(e);else if(u(e)){let[,,...r]=e;for(let e of r)n(e);t.push(e)}};n(e.html),e._nodes=t}return e._nodes}function g(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}function _(e,...t){function n(e,t,...n){let r=window,i=new URLSearchParams(r.location.search),a=i.has(`shouldPopulateCanvasFromScreenshot`),o=i.has(`isUnderTest`),s={viewport:t,frames:new WeakMap};r.__playwright_frame_bounding_rects__=s;let c=[],l=[],u=[],d=[],f=r;for(;f!==f.parent&&new URLSearchParams(f.location.search).has(`frameId`);)f=f.parent;let p=t=>{for(let e of t.querySelectorAll(`[__playwright_scroll_top_]`))c.push(e);for(let e of t.querySelectorAll(`[__playwright_scroll_left_]`))l.push(e);for(let e of t.querySelectorAll(`style[__playwright_style_content__]`))e.textContent=e.getAttribute(`__playwright_style_content__`),e.removeAttribute(`__playwright_style_content__`);for(let e of t.querySelectorAll(`[__playwright_value_]`)){let t=e;t.type!==`file`&&(t.value=t.getAttribute(`__playwright_value_`)),e.removeAttribute(`__playwright_value_`)}for(let e of t.querySelectorAll(`[__playwright_checked_]`))e.checked=e.getAttribute(`__playwright_checked_`)===`true`,e.removeAttribute(`__playwright_checked_`);for(let e of t.querySelectorAll(`[__playwright_selected_]`))e.selected=e.getAttribute(`__playwright_selected_`)===`true`,e.removeAttribute(`__playwright_selected_`);for(let e of t.querySelectorAll(`[__playwright_popover_open_]`)){try{e.showPopover()}catch{}e.removeAttribute(`__playwright_popover_open_`)}for(let e of t.querySelectorAll(`[__playwright_dialog_open_]`)){try{e.getAttribute(`__playwright_dialog_open_`)===`modal`?e.showModal():e.show()}catch{}e.removeAttribute(`__playwright_dialog_open_`)}let i=e=>{let t=e.style;t.outline=`2px solid #006ab1`,t.backgroundColor=`#6fa8dc7f`,u.push(e)};for(let e of t.querySelectorAll(`[__playwright_target__=""]`))i(e);for(let e of n)if(e)for(let n of t.querySelectorAll(`[__playwright_target__="${e}"]`))i(n);for(let n of t.querySelectorAll(`iframe, frame`)){let t=n.getAttribute(`__playwright_bounding_rect__`);n.removeAttribute(`__playwright_bounding_rect__`);let i=t?JSON.parse(t):void 0;i&&s.frames.set(n,{boundingRect:i,scrollLeft:0,scrollTop:0});let a=n.getAttribute(`__playwright_src__`);if(!a)n.setAttribute(`src`,e);else{let e=a.substring(a.lastIndexOf(`/`)+1),t=new URL(r.location.href);t.searchParams.set(`frameId`,e),n.setAttribute(`src`,t.toString())}}{let e=t.querySelector(`body[__playwright_custom_elements__]`);if(e&&r.customElements){let t=(e.getAttribute(`__playwright_custom_elements__`)||``).split(`,`);for(let e of t)r.customElements.define(e,class extends HTMLElement{})}}for(let e of t.querySelectorAll(`template[__playwright_shadow_root_]`)){let t=e,n=t.parentElement.attachShadow({mode:`open`});n.appendChild(t.content),t.remove(),p(n)}for(let e of t.querySelectorAll(`a`))e.addEventListener(`click`,e=>{e.preventDefault()});if(`adoptedStyleSheets`in t){let e=[...t.adoptedStyleSheets];for(let n of t.querySelectorAll(`template[__playwright_style_sheet_]`)){let t=n,r=new CSSStyleSheet;r.replaceSync(t.getAttribute(`__playwright_style_sheet_`)),e.push(r)}t.adoptedStyleSheets=e}d.push(...t.querySelectorAll(`canvas`))},m=()=>{r.removeEventListener(`load`,m);for(let e of c)e.scrollTop=+e.getAttribute(`__playwright_scroll_top_`),e.removeAttribute(`__playwright_scroll_top_`),s.frames.has(e)&&(s.frames.get(e).scrollTop=e.scrollTop);for(let e of l)e.scrollLeft=+e.getAttribute(`__playwright_scroll_left_`),e.removeAttribute(`__playwright_scroll_left_`),s.frames.has(e)&&(s.frames.get(e).scrollLeft=e.scrollLeft);r.document.styleSheets[0].disabled=!0;let e=new URL(r.location.href).searchParams;if(r===f&&e.get(`pointX`)&&e.get(`pointY`)){let t=+e.get(`pointX`),n=+e.get(`pointY`),i=r.document.createElement(`x-pw-pointer`);i.style.position=`fixed`,i.style.backgroundColor=`#f44336`,i.style.width=`20px`,i.style.height=`20px`,i.style.borderRadius=`10px`,i.style.margin=`-10px 0 0 -10px`,i.style.zIndex=`2147483646`,i.style.display=`flex`,i.style.alignItems=`center`,i.style.justifyContent=`center`;let a=u[0],o=a?.getBoundingClientRect(),s=a?{x:o.left+o.width/2,y:o.top+o.height/2}:null;if(i.style.left=(s?.x??t)+`px`,i.style.top=(s?.y??n)+`px`,!(!s||Math.abs(s.x-t)<=10&&Math.abs(s.y-n)<=10)){let e=r.document.createElement(`x-pw-pointer-warning`);e.textContent=`⚠`,e.style.fontSize=`19px`,e.style.color=`white`,e.style.marginTop=`-3.5px`,e.style.userSelect=`none`,i.appendChild(e),i.setAttribute(`title`,`Recorded click position in absolute coordinates did not match the center of the clicked element. This is either due to the use of provided offset, or due to a difference between the test runner and the trace viewer operating systems.`)}r.document.documentElement.appendChild(i)}if(d.length>0){function e(e,t){function n(){let e=r.document.createElement(`canvas`);e.width/=Math.floor(e.width/24),e.height/=Math.floor(e.height/24);let t=e.getContext(`2d`);return t.fillStyle=`lightgray`,t.fillRect(0,0,e.width,e.height),t.fillStyle=`white`,t.fillRect(0,0,e.width/2,e.height/2),t.fillRect(e.width/2,e.height/2,e.width,e.height),t.createPattern(e,`repeat`)}e.fillStyle=n(),e.fillRect(0,0,t.width,t.height)}let t=new Image;t.onload=()=>{for(let n of d){let i=n.getContext(`2d`),s=n.getAttribute(`__playwright_bounding_rect__`);if(n.removeAttribute(`__playwright_bounding_rect__`),!s)continue;let c;try{c=JSON.parse(s)}catch{continue}let l=r;for(;l!==f;){let e=l.frameElement;l=l.parent;let t=l.__playwright_frame_bounding_rects__?.frames.get(e);if(!t?.boundingRect)break;let n=t.boundingRect.left-t.scrollLeft,r=t.boundingRect.top-t.scrollTop;c.left+=n,c.top+=r,c.right+=n,c.bottom+=r}let{width:u,height:d}=f.__playwright_frame_bounding_rects__.viewport;c.left/=u,c.top/=d,c.right/=u,c.bottom/=d;let p=c.right>1||c.bottom>1;if(c.left>1||c.top>1){n.title=`Playwright couldn't capture canvas contents because it's located outside the viewport.`;continue}e(i,n),a?(i.drawImage(t,c.left*t.width,c.top*t.height,(c.right-c.left)*t.width,(c.bottom-c.top)*t.height,0,0,n.width,n.height),p?n.title=`Playwright couldn't capture full canvas contents because it's located partially outside the viewport.`:n.title=`Canvas contents are displayed on a best-effort basis based on viewport screenshots taken during test execution.`):n.title=`Canvas content display is disabled.`,o&&console.log(`canvas drawn:`,JSON.stringify([c.left,c.top,c.right-c.left,c.bottom-c.top].map(e=>Math.floor(e*100))))}},t.onerror=()=>{for(let t of d)e(t.getContext(`2d`),t),t.title=`Playwright couldn't show canvas contents because the screenshot failed to load.`},t.src=location.href.replace(`/snapshot`,`/closest-screenshot`)}};r.addEventListener(`load`,m),r.addEventListener(`DOMContentLoaded`,()=>p(r.document))}let r=e=>JSON.stringify(e).replace(/</g,`\\u003c`);return`\n(${n.toString()})(${r(C)},${r(e)}${t.map(e=>`, ${r(String(e))}`).join(``)})`}var v=[`about:`,`blob:`,`data:`,`file:`,`ftp:`,`http:`,`https:`,`mailto:`,`sftp:`,`ws:`,`wss:`],y=`http://playwright.bloburl/#`;function b(e){e.startsWith(y)&&(e=e.substring(27));try{let t=new URL(e);if(t.protocol===`javascript:`||t.protocol===`vbscript:`)return`javascript:void(0)`;let n=t.protocol===`blob:`,r=t.protocol===`file:`;if(!n&&!r&&v.includes(t.protocol))return e;let i=`pw-`+t.protocol.slice(0,t.protocol.length-1);return r||(t.protocol=`https:`),t.hostname=t.hostname?`${i}--${t.hostname}`:i,r&&(t.protocol=`https:`),t.toString()}catch{return e}}var x=/url\(['"]?([\w-]+:)\/\//gi;function S(e){return e.replace(x,(e,t)=>t!==`blob:`&&t!==`file:`&&v.includes(t)?e:e.replace(t+`//`,`https://pw-${t.slice(0,-1)}--`))}var C=`data:text/html;base64,`+btoa(`<body></body><style>body { color-scheme: light dark; background: light-dark(white, #333) }</style>`),w=class{constructor(e){this._maxSize=e,this._map=new Map,this._size=0}getOrCompute(e,t){if(this._map.has(e)){let t=this._map.get(e);return this._map.delete(e),this._map.set(e,t),t.value}let n=t();for(;this._map.size&&this._size+n.size>this._maxSize;){let[e,t]=this._map.entries().next().value;this._size-=t.size,this._map.delete(e)}return this._map.set(e,n),this._size+=n.size,n.value}},T=class{constructor(){this._snapshotsByFrameId=new Map,this._renderersByCallIdAndPhase=new Map,this._cache=new w(1e8),this._resources=[],this._resourceUrlsWithOverrides=new Set}addResource(e){e.request.url=b(e.request.url),this._resources.push(e)}addFrameSnapshot(e,t){for(let t of e.resourceOverrides)t.url=b(t.url);let n=this._snapshotsByFrameId.get(e.frameId);n||(n=[],this._snapshotsByFrameId.set(e.frameId,n)),n.push(e);let r=new f(this._cache,this._resources,n,t,n.length-1);if(e.phase){let t=E(e.callId,e.phase),n=this._renderersByCallIdAndPhase.get(t);n||(n=[],this._renderersByCallIdAndPhase.set(t,n)),n.push(r)}return r}snapshotForCall(e,t,n){return(this._renderersByCallIdAndPhase.get(E(e,t))||[]).find(e=>n?e.snapshot().frameId===n:e.snapshot().isMainFrame)}snapshotsForTest(){return[...this._renderersByCallIdAndPhase.keys()]}finalize(){this._resources.sort((e,t)=>(e._monotonicTime||0)-(t._monotonicTime||0));for(let e of this._snapshotsByFrameId.values())for(let t of e)for(let e of t.resourceOverrides)this._resourceUrlsWithOverrides.add(e.url)}hasResourceOverride(e){return this._resourceUrlsWithOverrides.has(e)}};function E(e,t){return`${e}/${t}`}function D(e){return`call@${e}`}function O(e){let t=new Map,{files:n,stacks:r}=e;for(let e of r){let[r,i]=e;t.set(r,i.map(e=>({file:n[e[0]],line:e[1],column:e[2],function:e[3]})))}return t}var k=class extends Error{constructor(e){super(e),this.name=`TraceVersionError`}},ee=10,te=0,ne=class{constructor(e,t){this._actionMap=new Map,this._pageEntries=new Map,this._jsHandles=new Map,this._consoleObjects=new Map,this._snapshotPhases=new Map,this._legacyCallIdToStepId=new Map,this._contextEntry=e,this._snapshotStorage=t}appendTrace(e){for(let t of e.split(`
|
|
2
|
+
`))this._appendEvent(t)}appendStacks(e){let t=JSON.parse(e),n=t.stacks.map(([e,...t])=>{let n=typeof e==`number`?D(e):e;return[this._legacyCallIdToStepId.get(n)??n,...t]}),r=O({files:t.files,stacks:n});for(let e of this._actionMap.values())e.stack=e.stack||r.get(e.callId)}actions(){return[...this._actionMap.values()]}_collectSnapshotPhase(e,t){e&&this._snapshotPhases.set(e,t)}_pageEntry(e){let t=this._pageEntries.get(e);return t||(t={pageId:e,screencastFrames:[]},this._pageEntries.set(e,t),this._contextEntry.pages.push(t)),t}_appendEvent(e){if(!e)return;let t=this._modernize(JSON.parse(e));for(let e of t)this._innerAppendEvent(e)}_innerAppendEvent(e){let t=this._contextEntry;switch(e.type){case`context-options`:if(e.version>ee)throw new k(`The trace was created by a newer version of Playwright and is not supported by this version of the viewer. Please use latest Playwright to open the trace.`);this._version=e.version,t.origin=e.origin,t.browserName=e.browserName,t.channel=e.channel,t.title=e.title,t.platform=e.platform,t.playwrightVersion=e.playwrightVersion,t.wallTime=e.wallTime,t.monotonicTime=e.monotonicTime,t.startTime=e.monotonicTime,t.sdkLanguage=e.sdkLanguage,t.options=e.options,t.testIdAttributeName=e.testIdAttributeName,t.testTimeout=e.testTimeout,t.annotations=e.annotations;break;case`screencast-frame`:this._pageEntry(e.pageId).screencastFrames.push(e);break;case`screenshot`:t.screenshots.push(e);break;case`video`:t.videos.push(e);break;case`aria-snapshot`:t.ariaSnapshots.push(e);break;case`before`:this._actionMap.set(e.callId,{...e,type:`action`,endTime:0,log:[]});break;case`input`:{let t=this._actionMap.get(e.callId);t.point=e.point,t.box=e.box;break}case`log`:{let t=this._actionMap.get(e.callId);if(!t)return;t.log.push({time:e.time,message:e.message});break}case`after`:{let t=this._actionMap.get(e.callId);t.endTime=e.endTime,t.result=e.result,t.error=e.error,t.attachments=e.attachments,t.annotations=e.annotations,e.point&&(t.point=e.point);break}case`action`:this._actionMap.set(e.callId,{...e,log:[]});break;case`event`:(e.method===`page`||e.method===`pageClosed`)&&e.params?.pageId&&this._pageEntry(e.params.pageId),t.events.push(e);break;case`stdout`:t.stdio.push(e);break;case`stderr`:t.stdio.push(e);break;case`error`:t.errors.push(e);break;case`console`:t.events.push(e);break;case`resource-snapshot`:this._snapshotStorage.addResource(e.snapshot),t.resources.push(e.snapshot);break;case`frame-snapshot`:{let n=e.snapshot;this._snapshotStorage.addFrameSnapshot(n,this._pageEntry(n.pageId).screencastFrames),n.isMainFrame&&n.phase&&t.domSnapshots.push({callId:n.callId,phase:n.phase});break}}`pageId`in e&&e.pageId&&this._pageEntry(e.pageId),(e.type===`action`||e.type===`before`)&&(t.startTime=Math.min(t.startTime,e.startTime)),(e.type===`action`||e.type===`after`)&&(t.endTime=Math.max(t.endTime,e.endTime)),e.type===`event`&&(t.startTime=Math.min(t.startTime,e.time),t.endTime=Math.max(t.endTime,e.time)),e.type===`screencast-frame`&&(t.startTime=Math.min(t.startTime,e.timestamp),t.endTime=Math.max(t.endTime,e.timestamp))}_processedContextCreatedEvent(){return this._version!==void 0}_modernize(e){let t=this._version??e.version??6,n=[e];for(;t<ee;++t)n=this[`_modernize_${t}_to_${t+1}`].call(this,n);return n}_modernize_0_to_1(e){for(let t of e)t.type===`action`&&typeof t.metadata.error==`string`&&(t.metadata.error={error:{name:`Error`,message:t.metadata.error}});return e}_modernize_1_to_2(e){for(let t of e)t.type!==`frame-snapshot`||!t.snapshot.isMainFrame||(t.snapshot.viewport=this._contextEntry.options?.viewport||{width:1280,height:720});return e}_modernize_2_to_3(e){for(let t of e){if(t.type!==`resource-snapshot`||t.snapshot.request)continue;let e=t.snapshot;t.snapshot={_frameref:e.frameId,request:{url:e.url,method:e.method,headers:e.requestHeaders,postData:e.requestSha1?{_sha1:e.requestSha1}:void 0},response:{status:e.status,headers:e.responseHeaders,content:{mimeType:e.contentType,_sha1:e.responseSha1}},_monotonicTime:e.timestamp}}return e}_modernize_3_to_4(e){let t=[];for(let n of e){let e=this._modernize_event_3_to_4(n);e&&t.push(e)}return t}_modernize_event_3_to_4(e){if(e.type!==`action`&&e.type!==`event`)return e;let t=e.metadata;return t.internal||t.method.startsWith(`tracing`)?null:e.type===`event`?t.method===`__create__`&&t.type===`ConsoleMessage`?{type:`object`,class:t.type,guid:t.params.guid,initializer:t.params.initializer}:{type:`event`,time:t.startTime,class:t.type,method:t.method,params:t.params,pageId:t.pageId}:{type:`action`,callId:t.id,startTime:t.startTime,endTime:t.endTime,apiName:t.apiName||t.type+`.`+t.method,class:t.type,method:t.method,params:t.params,wallTime:t.wallTime||Date.now(),log:t.log,beforeSnapshot:t.snapshots.find(e=>e.title===`before`)?.snapshotName,inputSnapshot:t.snapshots.find(e=>e.title===`input`)?.snapshotName,afterSnapshot:t.snapshots.find(e=>e.title===`after`)?.snapshotName,error:t.error?.error,result:t.result,point:t.point,pageId:t.pageId}}_modernize_4_to_5(e){let t=[];for(let n of e){let e=this._modernize_event_4_to_5(n);e&&t.push(e)}return t}_modernize_event_4_to_5(e){if(e.type===`event`&&e.method===`__create__`&&e.class===`JSHandle`&&this._jsHandles.set(e.params.guid,e.params.initializer),e.type===`object`){if(e.class!==`ConsoleMessage`)return null;let t=e.initializer.args?.map(e=>e.guid?{preview:this._jsHandles.get(e.guid)?.preview||``,value:``}:{preview:e.preview||``,value:e.value||``});return this._consoleObjects.set(e.guid,{type:e.initializer.type,text:e.initializer.text,location:e.initializer.location,args:t}),null}if(e.type===`event`&&e.method===`console`){let t=this._consoleObjects.get(e.params.message?.guid||``);return t?{type:`console`,time:e.time,pageId:e.pageId,messageType:t.type,text:t.text,args:t.args,location:t.location}:null}return e}_modernize_5_to_6(e){let t=[];for(let n of e)if(t.push(n),!(n.type!==`after`||!n.log.length))for(let e of n.log)t.push({type:`log`,callId:n.callId,message:e,time:-1});return t}_modernize_6_to_7(e){let t=[];!this._processedContextCreatedEvent()&&e[0].type!==`context-options`&&t.push({type:`context-options`,origin:`testRunner`,version:6,browserName:``,options:{},platform:`unknown`,wallTime:0,monotonicTime:0,sdkLanguage:`javascript`,contextId:``});for(let n of e){if(n.type===`context-options`){t.push({...n,monotonicTime:0,origin:`library`,contextId:``});continue}if(n.type===`before`||n.type===`action`){this._contextEntry.monotonicTime||(this._contextEntry.monotonicTime=n.startTime,this._contextEntry.wallTime=n.wallTime);let e=n,r=n;r.stepId=`${e.apiName}@${e.wallTime}`,t.push(r)}else t.push(n)}return t}_modernize_7_to_8(e){let t=[];for(let n of e)if(n.type===`before`||n.type===`action`){let e=n,r=n;e.apiName&&(r.title=e.apiName,delete r.apiName),r.stepId=e.stepId??e.callId,t.push(r)}else t.push(n);return t}_modernize_8_to_9(e){for(let t of e){if(t.type===`before`||t.type===`input`||t.type===`after`||t.type===`action`){let e=t;this._collectSnapshotPhase(e.beforeSnapshot,`before`),this._collectSnapshotPhase(e.inputSnapshot,`action`),this._collectSnapshotPhase(e.afterSnapshot,`after`),delete e.beforeSnapshot,delete e.inputSnapshot,delete e.afterSnapshot}if(t.type===`after`||t.type===`action`)for(let e of t.attachments||[])e.sha1&&(e.file=`resources/`+e.sha1,delete e.sha1);if(t.type===`screencast-frame`&&t.sha1&&(t.file=`resources/`+t.sha1,delete t.sha1),t.type===`frame-snapshot`){t.snapshot.snapshotName&&(t.snapshot.phase=this._snapshotPhases.get(t.snapshot.snapshotName));for(let e of t.snapshot.resourceOverrides||[])e.sha1&&(e.file=`resources/`+e.sha1,delete e.sha1)}if(t.type===`resource-snapshot`){let e=t.snapshot.request?.postData;e?._sha1&&(e._file=`resources/`+e._sha1,delete e._sha1);let n=t.snapshot.response?.content;n?._sha1&&(n._file=`resources/`+n._sha1,delete n._sha1),t.snapshot._apiRequest&&(this._apiRequestRef||=`api-request-context@`+ ++te,t.snapshot._apiRequestRef=this._apiRequestRef,delete t.snapshot._apiRequest)}}return e}_modernize_9_to_10(e){for(let t of e)(t.type===`before`||t.type===`action`)&&(t.stepId&&t.stepId!==t.callId&&this._legacyCallIdToStepId.set(t.callId,t.stepId),delete t.stepId,t.parentId&&=this._legacyCallIdToStepId.get(t.parentId)??t.parentId),(t.type===`before`||t.type===`input`||t.type===`after`||t.type===`action`||t.type===`log`)&&(t.callId=this._legacyCallIdToStepId.get(t.callId)??t.callId),t.type===`frame-snapshot`&&(t.snapshot.callId=this._legacyCallIdToStepId.get(t.snapshot.callId)??t.snapshot.callId);return e}},re=class{constructor(){this.contextEntries=[],this._resourceToContentType=new Map}async load(e,t,n){this._backend=e;let r=t?.match(/(.+)\.trace$/)?.[1],i=[],a=!1;for(let e of await this._backend.entryNames()){let t=e.match(/(.+)\.trace$/);t&&(!r||r===t[1])&&i.push(t[1]||``),(e.startsWith(`src/`)||e.includes(`src@`))&&(a=!0)}if(!i.length)throw Error(`Cannot find .trace file`);this._snapshotStorage=new T;let o=i.length*3,s=0;for(let t of i){let r=ie();r.hasSource=a;let i=new ne(r,this._snapshotStorage),c=await this._backend.readText(t+`.trace`)||``;i.appendTrace(c),n?.(++s,o);let l=await this._backend.readText(t+`.network`)||``;i.appendTrace(l),n?.(++s,o);let u=await this._backend.readText(t+`.stacks`);if(u&&i.appendStacks(u),n?.(++s,o),r.actions=i.actions().sort((e,t)=>e.startTime-t.startTime),!e.isLive()){for(let e of r.actions.slice().reverse())if(!e.endTime&&!e.error)for(let t of r.actions)t.parentId===e.callId&&e.endTime<t.endTime&&(e.endTime=t.endTime)}for(let e of r.resources)e.request.postData?._file&&this._resourceToContentType.set(e.request.postData._file,A(e.request.postData.mimeType)),e.response.content?._file&&this._resourceToContentType.set(e.response.content._file,A(e.response.content.mimeType));this.contextEntries.push(r)}this._snapshotStorage.finalize()}async hasEntry(e){return this._backend.hasEntry(e)}async resourceEntry(e){let t=await this._backend.readBlob(e),n=this._resourceToContentType.get(e);return!t||n===void 0||n===`x-unknown`?t:new Blob([t],{type:n})}storage(){return this._snapshotStorage}};function A(e){let t=e.match(/^(.*);\s*charset=.*$/);return t?t[1]:e}function ie(){return{origin:`testRunner`,startTime:2**53-1,wallTime:2**53-1,monotonicTime:0,endTime:0,browserName:``,options:{deviceScaleFactor:1,isMobile:!1,viewport:{width:1280,height:800}},pages:[],resources:[],actions:[],screenshots:[],ariaSnapshots:[],domSnapshots:[],videos:[],events:[],errors:[],stdio:[],hasSource:!1}}function j(e,t){let n=Array(t.length).fill(0);return Array(t.length).fill(0).map((r,i)=>(r,a)=>{n[i]=r/a*t[i]*1e3,e(n.reduce((e,t)=>e+t,0),1e3)})}var ae=15,M=0,N=1,oe=2,P=-2,F=-3,se=-4,I=-5,L=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ce=1440,le=0,ue=4,de=9,fe=5,pe=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],me=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],he=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],ge=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],_e=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],ve=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ye=15;function be(){let e=this,t,n,r,i,a,o;function s(e,t,n,s,c,l,u,d,f,p,m){let h,g,_,v,y,b,x,S,C,w,T,E,D,O,k;w=0,y=n;do r[e[t+w]]++,w++,y--;while(y!==0);if(r[0]==n)return u[0]=-1,d[0]=0,M;for(S=d[0],b=1;b<=ye&&r[b]===0;b++);for(x=b,S<b&&(S=b),y=ye;y!==0&&r[y]===0;y--);for(_=y,S>y&&(S=y),d[0]=S,O=1<<b;b<y;b++,O<<=1)if((O-=r[b])<0)return F;if((O-=r[y])<0)return F;for(r[y]+=O,o[1]=b=0,w=1,D=2;--y!==0;)o[D]=b+=r[w],D++,w++;y=0,w=0;do(b=e[t+w])!==0&&(m[o[b]++]=y),w++;while(++y<n);for(n=o[_],o[0]=y=0,w=0,v=-1,E=-S,a[0]=0,T=0,k=0;x<=_;x++)for(h=r[x];h--!==0;){for(;x>E+S;){if(v++,E+=S,k=_-E,k=k>S?S:k,(g=1<<(b=x-E))>h+1&&(g-=h+1,D=x,b<k))for(;++b<k&&!((g<<=1)<=r[++D]);)g-=r[D];if(k=1<<b,p[0]+k>ce)return F;a[v]=T=p[0],p[0]+=k,v===0?u[0]=T:(o[v]=y,i[0]=b,i[1]=S,b=y>>>E-S,i[2]=T-a[v-1]-b,f.set(i,(a[v-1]+b)*3))}for(i[1]=x-E,w>=n?i[0]=192:m[w]<s?(i[0]=m[w]<256?0:96,i[2]=m[w++]):(i[0]=l[m[w]-s]+16+64,i[2]=c[m[w++]-s]),g=1<<x-E,b=y>>>E;b<k;b+=g)f.set(i,(T+b)*3);for(b=1<<x-1;(y&b)!==0;b>>>=1)y^=b;for(y^=b,C=(1<<E)-1;(y&C)!=o[v];)v--,E-=S,C=(1<<E)-1}return O!==0&&_!=1?I:M}function c(e){let s;for(t||(t=[],n=[],r=new Int32Array(16),i=[],a=new Int32Array(ye),o=new Int32Array(16)),n.length<e&&(n=[]),s=0;s<e;s++)n[s]=0;for(s=0;s<16;s++)r[s]=0;for(s=0;s<3;s++)i[s]=0;a.set(r.subarray(0,ye),0),o.set(r.subarray(0,16),0)}e.inflate_trees_bits=function(e,r,i,a,o){let l;return c(19),t[0]=0,l=s(e,0,19,19,null,null,i,r,a,t,n),l==F?o.msg=`oversubscribed dynamic bit lengths tree`:(l==I||r[0]===0)&&(o.msg=`incomplete dynamic bit lengths tree`,l=F),l},e.inflate_trees_dynamic=function(e,r,i,a,o,l,u,d,f){let p;return c(288),t[0]=0,p=s(i,0,e,257,he,ge,l,a,d,t,n),p!=M||a[0]===0?(p==F?f.msg=`oversubscribed literal/length tree`:p!=se&&(f.msg=`incomplete literal/length tree`,p=F),p):(c(288),p=s(i,e,r,0,_e,ve,u,o,d,t,n),p!=M||o[0]===0&&e>257?(p==F?f.msg=`oversubscribed distance tree`:p==I?(f.msg=`incomplete distance tree`,p=F):p!=se&&(f.msg=`empty distance tree with lengths`,p=F),p):M)}}be.inflate_trees_fixed=function(e,t,n,r){return e[0]=de,t[0]=fe,n[0]=pe,r[0]=me,M};var xe=0,Se=1,Ce=2,we=3,Te=4,Ee=5,De=6,Oe=7,ke=8,Ae=9;function je(){let e=this,t,n=0,r,i=0,a=0,o=0,s=0,c=0,l=0,u=0,d,f=0,p,m=0;function h(e,t,n,r,i,a,o,s){let c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C;m=s.next_in_index,h=s.avail_in,f=o.bitb,p=o.bitk,g=o.write,_=g<o.read?o.read-g-1:o.end-g,v=L[e],y=L[t];do{for(;p<20;)h--,f|=(s.read_byte(m++)&255)<<p,p+=8;if(c=f&v,l=n,u=r,C=(u+c)*3,(d=l[C])===0){f>>=l[C+1],p-=l[C+1],o.win[g++]=l[C+2],_--;continue}do{if(f>>=l[C+1],p-=l[C+1],d&16){for(d&=15,b=l[C+2]+(f&L[d]),f>>=d,p-=d;p<15;)h--,f|=(s.read_byte(m++)&255)<<p,p+=8;c=f&y,l=i,u=a,C=(u+c)*3,d=l[C];do if(f>>=l[C+1],p-=l[C+1],d&16){for(d&=15;p<d;)h--,f|=(s.read_byte(m++)&255)<<p,p+=8;if(x=l[C+2]+(f&L[d]),f>>=d,p-=d,_-=b,g>=x)S=g-x,g-S>0&&2>g-S?(o.win[g++]=o.win[S++],o.win[g++]=o.win[S++],b-=2):(o.win.set(o.win.subarray(S,S+2),g),g+=2,S+=2,b-=2);else{S=g-x;do S+=o.end;while(S<0);if(d=o.end-S,b>d){if(b-=d,g-S>0&&d>g-S)do o.win[g++]=o.win[S++];while(--d!==0);else o.win.set(o.win.subarray(S,S+d),g),g+=d,S+=d,d=0;S=0}}if(g-S>0&&b>g-S)do o.win[g++]=o.win[S++];while(--b!==0);else o.win.set(o.win.subarray(S,S+b),g),g+=b,S+=b,b=0;break}else if(!(d&64))c+=l[C+2],c+=f&L[d],C=(u+c)*3,d=l[C];else return s.msg=`invalid distance code`,b=s.avail_in-h,b=p>>3<b?p>>3:b,h+=b,m-=b,p-=b<<3,o.bitb=f,o.bitk=p,s.avail_in=h,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,F;while(!0);break}if(!(d&64)){if(c+=l[C+2],c+=f&L[d],C=(u+c)*3,(d=l[C])===0){f>>=l[C+1],p-=l[C+1],o.win[g++]=l[C+2],_--;break}}else if(d&32)return b=s.avail_in-h,b=p>>3<b?p>>3:b,h+=b,m-=b,p-=b<<3,o.bitb=f,o.bitk=p,s.avail_in=h,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,N;else return s.msg=`invalid literal/length code`,b=s.avail_in-h,b=p>>3<b?p>>3:b,h+=b,m-=b,p-=b<<3,o.bitb=f,o.bitk=p,s.avail_in=h,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,F}while(!0)}while(_>=258&&h>=10);return b=s.avail_in-h,b=p>>3<b?p>>3:b,h+=b,m-=b,p-=b<<3,o.bitb=f,o.bitk=p,s.avail_in=h,s.total_in+=m-s.next_in_index,s.next_in_index=m,o.write=g,M}e.init=function(e,n,i,a,o,s){t=xe,l=e,u=n,d=i,f=a,p=o,m=s,r=null},e.proc=function(e,g,_){let v,y,b,x=0,S=0,C=0,w,T,E,D;for(C=g.next_in_index,w=g.avail_in,x=e.bitb,S=e.bitk,T=e.write,E=T<e.read?e.read-T-1:e.end-T;;)switch(t){case xe:if(E>=258&&w>=10&&(e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,_=h(l,u,d,f,p,m,e,g),C=g.next_in_index,w=g.avail_in,x=e.bitb,S=e.bitk,T=e.write,E=T<e.read?e.read-T-1:e.end-T,_!=M)){t=_==N?Oe:Ae;break}a=l,r=d,i=f,t=Se;case Se:for(v=a;S<v;){if(w!==0)_=M;else return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);w--,x|=(g.read_byte(C++)&255)<<S,S+=8}if(y=(i+(x&L[v]))*3,x>>>=r[y+1],S-=r[y+1],b=r[y],b===0){o=r[y+2],t=De;break}if(b&16){s=b&15,n=r[y+2],t=Ce;break}if(!(b&64)){a=b,i=y/3+r[y+2];break}if(b&32){t=Oe;break}return t=Ae,g.msg=`invalid literal/length code`,_=F,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);case Ce:for(v=s;S<v;){if(w!==0)_=M;else return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);w--,x|=(g.read_byte(C++)&255)<<S,S+=8}n+=x&L[v],x>>=v,S-=v,a=u,r=p,i=m,t=we;case we:for(v=a;S<v;){if(w!==0)_=M;else return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);w--,x|=(g.read_byte(C++)&255)<<S,S+=8}if(y=(i+(x&L[v]))*3,x>>=r[y+1],S-=r[y+1],b=r[y],b&16){s=b&15,c=r[y+2],t=Te;break}if(!(b&64)){a=b,i=y/3+r[y+2];break}return t=Ae,g.msg=`invalid distance code`,_=F,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);case Te:for(v=s;S<v;){if(w!==0)_=M;else return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);w--,x|=(g.read_byte(C++)&255)<<S,S+=8}c+=x&L[v],x>>=v,S-=v,t=Ee;case Ee:for(D=T-c;D<0;)D+=e.end;for(;n!==0;){if(E===0&&(T==e.end&&e.read!==0&&(T=0,E=T<e.read?e.read-T-1:e.end-T),E===0&&(e.write=T,_=e.inflate_flush(g,_),T=e.write,E=T<e.read?e.read-T-1:e.end-T,T==e.end&&e.read!==0&&(T=0,E=T<e.read?e.read-T-1:e.end-T),E===0)))return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);e.win[T++]=e.win[D++],E--,D==e.end&&(D=0),n--}t=xe;break;case De:if(E===0&&(T==e.end&&e.read!==0&&(T=0,E=T<e.read?e.read-T-1:e.end-T),E===0&&(e.write=T,_=e.inflate_flush(g,_),T=e.write,E=T<e.read?e.read-T-1:e.end-T,T==e.end&&e.read!==0&&(T=0,E=T<e.read?e.read-T-1:e.end-T),E===0)))return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);_=M,e.win[T++]=o,E--,t=xe;break;case Oe:if(S>7&&(S-=8,w++,C--),e.write=T,_=e.inflate_flush(g,_),T=e.write,E=T<e.read?e.read-T-1:e.end-T,e.read!=e.write)return e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);t=ke;case ke:return _=N,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);case Ae:return _=F,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_);default:return _=P,e.bitb=x,e.bitk=S,g.avail_in=w,g.total_in+=C-g.next_in_index,g.next_in_index=C,e.write=T,e.inflate_flush(g,_)}},e.free=function(){}}var Me=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Ne=0,Pe=1,Fe=2,Ie=3,Le=4,Re=5,ze=6,Be=7,Ve=8,R=9;function He(e,t){let n=this,r=Ne,i=0,a=0,o=0,s,c=[0],l=[0],u=new je,d=0,f=new Int32Array(ce*3),p=new be;n.bitk=0,n.bitb=0,n.win=new Uint8Array(t),n.end=t,n.read=0,n.write=0,n.reset=function(e,t){t&&(t[0]=0),r==ze&&u.free(e),r=Ne,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=function(e,t){let r,i,a;return i=e.next_out_index,a=n.read,r=(a<=n.write?n.write:n.end)-a,r>e.avail_out&&(r=e.avail_out),r!==0&&t==I&&(t=M),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(a,a+r),i),i+=r,a+=r,a==n.end&&(a=0,n.write==n.end&&(n.write=0),r=n.write-a,r>e.avail_out&&(r=e.avail_out),r!==0&&t==I&&(t=M),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(a,a+r),i),i+=r,a+=r),e.next_out_index=i,n.read=a,t},n.proc=function(e,t){let m,h,g,_,v,y,b,x;for(_=e.next_in_index,v=e.avail_in,h=n.bitb,g=n.bitk,y=n.write,b=y<n.read?n.read-y-1:n.end-y;;){let S,C,w,T,E,D,O,k;switch(r){case Ne:for(;g<3;){if(v!==0)t=M;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}switch(m=h&7,d=m&1,m>>>1){case 0:h>>>=3,g-=3,m=g&7,h>>>=m,g-=m,r=Pe;break;case 1:S=[],C=[],w=[[]],T=[[]],be.inflate_trees_fixed(S,C,w,T),u.init(S[0],C[0],w[0],0,T[0],0),h>>>=3,g-=3,r=ze;break;case 2:h>>>=3,g-=3,r=Ie;break;case 3:return h>>>=3,g-=3,r=R,e.msg=`invalid block type`,t=F,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t)}break;case Pe:for(;g<32;){if(v!==0)t=M;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}if((~h>>>16&65535)!=(h&65535))return r=R,e.msg=`invalid stored block lengths`,t=F,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);i=h&65535,h=g=0,r=i===0?d===0?Ne:Be:Fe;break;case Fe:if(v===0||b===0&&(y==n.end&&n.read!==0&&(y=0,b=y<n.read?n.read-y-1:n.end-y),b===0&&(n.write=y,t=n.inflate_flush(e,t),y=n.write,b=y<n.read?n.read-y-1:n.end-y,y==n.end&&n.read!==0&&(y=0,b=y<n.read?n.read-y-1:n.end-y),b===0)))return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);if(t=M,m=i,m>v&&(m=v),m>b&&(m=b),n.win.set(e.read_buf(_,m),y),_+=m,v-=m,y+=m,b-=m,(i-=m)!==0)break;r=d===0?Ne:Be;break;case Ie:for(;g<14;){if(v!==0)t=M;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}if(a=m=h&16383,(m&31)>29||(m>>5&31)>29)return r=R,e.msg=`too many length or distance symbols`,t=F,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);if(m=258+(m&31)+(m>>5&31),!s||s.length<m)s=[];else for(x=0;x<m;x++)s[x]=0;h>>>=14,g-=14,o=0,r=Le;case Le:for(;o<4+(a>>>10);){for(;g<3;){if(v!==0)t=M;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}s[Me[o++]]=h&7,h>>>=3,g-=3}for(;o<19;)s[Me[o++]]=0;if(c[0]=7,m=p.inflate_trees_bits(s,c,l,f,e),m!=M)return t=m,t==F&&(s=null,r=R),n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);o=0,r=Re;case Re:for(;m=a,!(o>=258+(m&31)+(m>>5&31));){let i,u;for(m=c[0];g<m;){if(v!==0)t=M;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}if(m=f[(l[0]+(h&L[m]))*3+1],u=f[(l[0]+(h&L[m]))*3+2],u<16)h>>>=m,g-=m,s[o++]=u;else{for(x=u==18?7:u-14,i=u==18?11:3;g<m+x;){if(v!==0)t=M;else return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);v--,h|=(e.read_byte(_++)&255)<<g,g+=8}if(h>>>=m,g-=m,i+=h&L[x],h>>>=x,g-=x,x=o,m=a,x+i>258+(m&31)+(m>>5&31)||u==16&&x<1)return s=null,r=R,e.msg=`invalid bit length repeat`,t=F,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);u=u==16?s[x-1]:0;do s[x++]=u;while(--i!==0);o=x}}if(l[0]=-1,E=[],D=[],O=[],k=[],E[0]=9,D[0]=6,m=a,m=p.inflate_trees_dynamic(257+(m&31),1+(m>>5&31),s,E,D,O,k,f,e),m!=M)return m==F&&(s=null,r=R),t=m,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);u.init(E[0],D[0],f,O[0],f,k[0]),r=ze;case ze:if(n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,(t=u.proc(n,e,t))!=N)return n.inflate_flush(e,t);if(t=M,u.free(e),_=e.next_in_index,v=e.avail_in,h=n.bitb,g=n.bitk,y=n.write,b=y<n.read?n.read-y-1:n.end-y,d===0){r=Ne;break}r=Be;case Be:if(n.write=y,t=n.inflate_flush(e,t),y=n.write,b=y<n.read?n.read-y-1:n.end-y,n.read!=n.write)return n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);r=Ve;case Ve:return t=N,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);case R:return t=F,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t);default:return t=P,n.bitb=h,n.bitk=g,e.avail_in=v,e.total_in+=_-e.next_in_index,e.next_in_index=_,n.write=y,n.inflate_flush(e,t)}}},n.free=function(e){n.reset(e,null),n.win=null,f=null},n.set_dictionary=function(e,t,r){n.win.set(e.subarray(t,t+r),0),n.read=n.write=r},n.sync_point=function(){return+(r==Pe)}}var Ue=32,We=8,Ge=0,Ke=1,qe=2,Je=3,Ye=4,Xe=5,Ze=6,Qe=7,$e=12,z=13,et=[0,0,255,255];function tt(){let e=this;e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0;function t(e){return!e||!e.istate?P:(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=Qe,e.istate.blocks.reset(e,null),M)}e.inflateEnd=function(t){return e.blocks&&e.blocks.free(t),e.blocks=null,M},e.inflateInit=function(n,r){return n.msg=null,e.blocks=null,r<8||r>15?(e.inflateEnd(n),P):(e.wbits=r,n.istate.blocks=new He(n,1<<r),t(n),M)},e.inflate=function(e,t){let n,r;if(!e||!e.istate||!e.next_in)return P;let i=e.istate;for(t=t==ue?I:M,n=I;;)switch(i.mode){case Ge:if(e.avail_in===0)return n;if(n=t,e.avail_in--,e.total_in++,((i.method=e.read_byte(e.next_in_index++))&15)!=We){i.mode=z,e.msg=`unknown compression method`,i.marker=5;break}if((i.method>>4)+8>i.wbits){i.mode=z,e.msg=`invalid win size`,i.marker=5;break}i.mode=Ke;case Ke:if(e.avail_in===0)return n;if(n=t,e.avail_in--,e.total_in++,r=e.read_byte(e.next_in_index++)&255,((i.method<<8)+r)%31!=0){i.mode=z,e.msg=`incorrect header check`,i.marker=5;break}if((r&Ue)===0){i.mode=Qe;break}i.mode=qe;case qe:if(e.avail_in===0)return n;n=t,e.avail_in--,e.total_in++,i.need=(e.read_byte(e.next_in_index++)&255)<<24&4278190080,i.mode=Je;case Je:if(e.avail_in===0)return n;n=t,e.avail_in--,e.total_in++,i.need+=(e.read_byte(e.next_in_index++)&255)<<16&16711680,i.mode=Ye;case Ye:if(e.avail_in===0)return n;n=t,e.avail_in--,e.total_in++,i.need+=(e.read_byte(e.next_in_index++)&255)<<8&65280,i.mode=Xe;case Xe:return e.avail_in===0?n:(n=t,e.avail_in--,e.total_in++,i.need+=e.read_byte(e.next_in_index++)&255,i.mode=Ze,oe);case Ze:return i.mode=z,e.msg=`need dictionary`,i.marker=0,P;case Qe:if(n=i.blocks.proc(e,n),n==F){i.mode=z,i.marker=0;break}if(n==M&&(n=t),n!=N)return n;n=t,i.blocks.reset(e,i.was),i.mode=$e;case $e:return e.avail_in=0,N;case z:return F;default:return P}},e.inflateSetDictionary=function(e,t,n){let r=0,i=n;if(!e||!e.istate||e.istate.mode!=Ze)return P;let a=e.istate;return i>=1<<a.wbits&&(i=(1<<a.wbits)-1,r=n-i),a.blocks.set_dictionary(t,r,i),a.mode=Qe,M},e.inflateSync=function(e){let n,r,i,a,o;if(!e||!e.istate)return P;let s=e.istate;if(s.mode!=z&&(s.mode=z,s.marker=0),(n=e.avail_in)===0)return I;for(r=e.next_in_index,i=s.marker;n!==0&&i<4;)e.read_byte(r)==et[i]?i++:i=e.read_byte(r)===0?4-i:0,r++,n--;return e.total_in+=r-e.next_in_index,e.next_in_index=r,e.avail_in=n,s.marker=i,i==4?(a=e.total_in,o=e.total_out,t(e),e.total_in=a,e.total_out=o,s.mode=Qe,M):F},e.inflateSyncPoint=function(e){return!e||!e.istate||!e.istate.blocks?P:e.istate.blocks.sync_point()}}function nt(){}nt.prototype={inflateInit(e){let t=this;return t.istate=new tt,e||=ae,t.istate.inflateInit(t,e)},inflate(e){let t=this;return t.istate?t.istate.inflate(t,e):P},inflateEnd(){let e=this;if(!e.istate)return P;let t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){let e=this;return e.istate?e.istate.inflateSync(e):P},inflateSetDictionary(e,t){let n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):P},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};function rt(e){let t=this,n=new nt,r=e&&e.chunkSize?Math.floor(e.chunkSize*2):128*1024,i=le,a=new Uint8Array(r),o=!1;n.inflateInit(),n.next_out=a,t.append=function(e,t){let s=[],c,l,u=0,d=0,f=0;if(e.length!==0){n.next_in_index=0,n.next_in=e,n.avail_in=e.length;do{if(n.next_out_index=0,n.avail_out=r,n.avail_in===0&&!o&&(n.next_in_index=0,o=!0),c=n.inflate(i),o&&c===I){if(n.avail_in!==0)throw Error(`inflating: bad input`)}else if(c!==M&&c!==N)throw Error(`inflating: `+n.msg);if((o||c===N)&&n.avail_in===e.length)throw Error(`inflating: bad input`);n.next_out_index&&(n.next_out_index===r?s.push(new Uint8Array(a)):s.push(a.subarray(0,n.next_out_index))),f+=n.next_out_index,t&&n.next_in_index>0&&n.next_in_index!=u&&(t(n.next_in_index),u=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return s.length>1?(l=new Uint8Array(f),s.forEach(function(e){l.set(e,d),d+=e.length})):l=s[0]?new Uint8Array(s[0]):new Uint8Array,l}},t.flush=function(){n.inflateEnd()}}var it=4294967295,at=65535,ot=101010256,st=39169,ct=21589,lt=28789,ut=25461,dt=6534,ft=2048,pt=`undefined`,mt=class{constructor(e){return class extends TransformStream{constructor(t,n){let r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){let t=r.flush();t&&e.enqueue(t)}})}}}},ht=64,gt=2;try{typeof navigator<`u`&&navigator.hardwareConcurrency&&(gt=navigator.hardwareConcurrency)}catch{}var B=Object.assign({},{chunkSize:512*1024,maxWorkers:gt,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:void 0,CompressionStreamNative:typeof CompressionStream<`u`&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream<`u`&&DecompressionStream});function _t(){return B}function vt(e){return Math.max(e.chunkSize,ht)}function yt(e){let{baseURL:t,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:i,useCompressionStream:a,useWebWorkers:o,Deflate:s,Inflate:c,CompressionStream:l,DecompressionStream:u,workerScripts:d}=e;if(V(`baseURL`,t),V(`chunkSize`,n),V(`maxWorkers`,r),V(`terminateWorkerTimeout`,i),V(`useCompressionStream`,a),V(`useWebWorkers`,o),s&&(B.CompressionStream=new mt(s)),c&&(B.DecompressionStream=new mt(c)),V(`CompressionStream`,l),V(`DecompressionStream`,u),d!==void 0){let{deflate:e,inflate:t}=d;if((e||t)&&(B.workerScripts||={}),e){if(!Array.isArray(e))throw Error(`workerScripts.deflate must be an array`);B.workerScripts.deflate=e}if(t){if(!Array.isArray(t))throw Error(`workerScripts.inflate must be an array`);B.workerScripts.inflate=t}}}function V(e,t){t!==void 0&&(B[e]=t)}function bt(){return`application/octet-stream`}var xt=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t&1?t=t>>>1^3988292384:t>>>=1;xt[e]=t}var St=class{constructor(e){this.crc=e||-1}append(e){let t=this.crc|0;for(let n=0,r=e.length|0;n<r;n++)t=t>>>8^xt[(t^e[n])&255];this.crc=t}get(){return~this.crc}},Ct=class extends TransformStream{constructor(){let e,t=new St;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){let n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}};function wt(e){if(typeof TextEncoder>`u`){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}else return new TextEncoder().encode(e)}var H={concat(e,t){if(e.length===0||t.length===0)return e.concat(t);let n=e[e.length-1],r=H.getPartial(n);return r===32?e.concat(t):H._shiftRight(t,r,n|0,e.slice(0,e.length-1))},bitLength(e){let t=e.length;if(t===0)return 0;let n=e[t-1];return(t-1)*32+H.getPartial(n)},clamp(e,t){if(e.length*32<t)return e;e=e.slice(0,Math.ceil(t/32));let n=e.length;return t&=31,n>0&&t&&(e[n-1]=H.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,r){for(r===void 0&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(t===0)return r.concat(e);for(let i=0;i<e.length;i++)r.push(n|e[i]>>>t),n=e[i]<<32-t;let i=e.length?e[e.length-1]:0,a=H.getPartial(i);return r.push(H.partial(t+a&31,t+a>32?n:r.pop(),1)),r}},Tt={bytes:{fromBits(e){let t=H.bitLength(e)/8,n=new Uint8Array(t),r;for(let i=0;i<t;i++)i&3||(r=e[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(e){let t=[],n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],(n&3)==3&&(t.push(r),r=0);return n&3&&t.push(H.partial(8*(n&3),r)),t}}},Et={};Et.sha1=class{constructor(e){let t=this;t.blockSize=512,t._init=[1732584193,4023233417,2562383102,271733878,3285377520],t._key=[1518500249,1859775393,2400959708,3395469782],e?(t._h=e._h.slice(0),t._buffer=e._buffer.slice(0),t._length=e._length):t.reset()}reset(){let e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){let t=this;typeof e==`string`&&(e=Tt.utf8String.toBits(e));let n=t._buffer=H.concat(t._buffer,e),r=t._length,i=t._length=r+H.bitLength(e);if(i>9007199254740991)throw Error(`Cannot hash more than 2^53 - 1 bits`);let a=new Uint32Array(n),o=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);e<=i;e+=t.blockSize)t._block(a.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),t}finalize(){let e=this,t=e._buffer,n=e._h;t=H.concat(t,[H.partial(1,1)]);for(let e=t.length+2;e&15;e++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){if(e<=19)return t&n|~t&r;if(e<=39)return t^n^r;if(e<=59)return t&n|t&r|n&r;if(e<=79)return t^n^r}_S(e,t){return t<<e|t>>>32-e}_block(e){let t=this,n=t._h,r=Array(80);for(let t=0;t<16;t++)r[t]=e[t];let i=n[0],a=n[1],o=n[2],s=n[3],c=n[4];for(let e=0;e<=79;e++){e>=16&&(r[e]=t._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));let n=t._S(5,i)+t._f(e,a,o,s)+c+r[e]+t._key[Math.floor(e/20)]|0;c=s,s=o,o=t._S(30,a),a=i,i=n}n[0]=n[0]+i|0,n[1]=n[1]+a|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0}};var Dt={};Dt.aes=class{constructor(e){let t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();let n=t._tables[0][4],r=t._tables[1],i=e.length,a,o,s,c=1;if(i!==4&&i!==6&&i!==8)throw Error(`invalid aes key size`);for(t._key=[o=e.slice(0),s=[]],a=i;a<4*i+28;a++){let e=o[a-1];(a%i===0||i===8&&a%i===4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[e&255],a%i===0&&(e=e<<8^e>>>24^c<<24,c=c<<1^(c>>7)*283)),o[a]=o[a-i]^e}for(let e=0;a;e++,a--){let t=o[e&3?a:a-4];a<=4||e<4?s[e]=t:s[e]=r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[t&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){let e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],a=[],o,s,c,l;for(let e=0;e<256;e++)a[(i[e]=e<<1^(e>>7)*283)^e]=e;for(let u=o=0;!n[u];u^=s||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^a&255^99,n[u]=a,r[a]=u,l=i[c=i[s=i[u]]];let d=l*16843009^c*65537^s*257^u*16843008,f=i[a]*257^a*16843008;for(let n=0;n<4;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=d=d<<24^d>>>8}for(let n=0;n<5;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(e.length!==4)throw Error(`invalid aes block size`);let n=this._key[t],r=n.length/4-2,i=[0,0,0,0],a=this._tables[t],o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],d=e[0]^n[0],f=e[t?3:1]^n[1],p=e[2]^n[2],m=e[t?1:3]^n[3],h=4,g,_,v;for(let e=0;e<r;e++)g=o[d>>>24]^s[f>>16&255]^c[p>>8&255]^l[m&255]^n[h],_=o[f>>>24]^s[p>>16&255]^c[m>>8&255]^l[d&255]^n[h+1],v=o[p>>>24]^s[m>>16&255]^c[d>>8&255]^l[f&255]^n[h+2],m=o[m>>>24]^s[d>>16&255]^c[f>>8&255]^l[p&255]^n[h+3],h+=4,d=g,f=_,p=v;for(let e=0;e<4;e++)i[t?3&-e:e]=u[d>>>24]<<24^u[f>>16&255]<<16^u[p>>8&255]<<8^u[m&255]^n[h++],g=d,d=f,f=p,p=m,m=g;return i}};var Ot={getRandomValues(e){let t=new Uint32Array(e.buffer),n=e=>{let t=987654321,n=4294967295;return function(){return t=36969*(t&65535)+(t>>16)&n,e=18e3*(e&65535)+(e>>16)&n,(((t<<16)+e&n)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,i;r<e.length;r+=4){let e=n((i||Math.random())*4294967296);i=e()*987654071,t[r/4]=e()*4294967296|0}return e}},kt={};kt.ctrGladman=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)==255){let t=e>>16&255,n=e>>8&255,r=e&255;t===255?(t=0,n===255?(n=0,r===255?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];let i=H.bitLength(t);for(let i=0;i<r;i+=4){this.incCounter(n);let r=e.encrypt(n);t[i]^=r[0],t[i+1]^=r[1],t[i+2]^=r[2],t[i+3]^=r[3]}return H.clamp(t,i)}};var At={importKey(e){return new At.hmacSha1(Tt.bytes.toBits(e))},pbkdf2(e,t,n,r){if(n||=1e4,r<0||n<0)throw Error(`invalid params to pbkdf2`);let i=(r>>5)+1<<2,a,o,s,c,l,u=new ArrayBuffer(i),d=new DataView(u),f=0,p=H;for(t=Tt.bytes.toBits(t),l=1;f<(i||1);l++){for(a=o=e.encrypt(p.concat(t,[l])),s=1;s<n;s++)for(o=e.encrypt(o),c=0;c<o.length;c++)a[c]^=o[c];for(s=0;f<(i||1)&&s<a.length;s++)d.setInt32(f,a[s]),f+=4}return u.slice(0,r/8)}};At.hmacSha1=class{constructor(e){let t=this,n=t._hash=Et.sha1,r=[[],[]];t._baseHash=[new n,new n];let i=t._baseHash[0].blockSize/32;e.length>i&&(e=new n().update(e).finalize());for(let t=0;t<i;t++)r[0][t]=e[t]^909522486,r[1][t]=e[t]^1549556828;t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){let e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){let t=this;t._updated=!0,t._resultHash.update(e)}digest(){let e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw Error(`encrypt on already updated hmac called!`);return this.update(e),this.digest(e)}};var jt=typeof crypto<`u`&&typeof crypto.getRandomValues==`function`,Mt=`Invalid password`,Nt=`Invalid signature`,Pt=`zipjs-abort-check-password`;function Ft(e){return jt?crypto.getRandomValues(e):Ot.getRandomValues(e)}var It=16,Lt=`raw`,Rt={name:`PBKDF2`},zt={name:`HMAC`},Bt=`SHA-1`,Vt=Object.assign({hash:zt},Rt),Ht=Object.assign({iterations:1e3,hash:{name:Bt}},Rt),Ut=[`deriveBits`],Wt=[8,12,16],Gt=[16,24,32],U=10,Kt=[0,0,0,0],qt=typeof crypto!=pt,Jt=qt&&crypto.subtle,Yt=qt&&Jt!==void 0,W=Tt.bytes,Xt=Dt.aes,Zt=kt.ctrGladman,Qt=At.hmacSha1,$t=qt&&Yt&&typeof Jt.importKey==`function`,en=qt&&Yt&&typeof Jt.deriveBits==`function`,tn=class extends TransformStream{constructor({password:e,rawPassword:t,signed:n,encryptionStrength:r,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(e=>this.resolveReady=e),password:un(e,t),signed:n,strength:r-1,pending:new Uint8Array})},async transform(e,t){let n=this,{password:r,strength:a,resolveReady:o,ready:s}=n;r?(await an(n,a,r,G(e,0,Wt[a]+2)),e=G(e,Wt[a]+2),i?t.error(Error(Pt)):o()):await s;let c=new Uint8Array(e.length-U-(e.length-U)%It);t.enqueue(rn(n,e,c,0,U,!0))},async flush(e){let{signed:t,ctr:n,hmac:r,pending:i,ready:a}=this;if(r&&n){await a;let o=G(i,0,i.length-U),s=G(i,i.length-U),c=new Uint8Array;if(o.length){let e=mn(W,o);r.update(e),c=pn(W,n.update(e))}if(t){let e=G(pn(W,r.digest()),0,U);for(let t=0;t<U;t++)if(e[t]!=s[t])throw Error(Nt)}e.enqueue(c)}}})}},nn=class extends TransformStream{constructor({password:e,rawPassword:t,encryptionStrength:n}){let r;super({start(){Object.assign(this,{ready:new Promise(e=>this.resolveReady=e),password:un(e,t),strength:n-1,pending:new Uint8Array})},async transform(e,t){let n=this,{password:r,strength:i,resolveReady:a,ready:o}=n,s=new Uint8Array;r?(s=await on(n,i,r),a()):await o;let c=new Uint8Array(s.length+e.length-e.length%It);c.set(s,0),t.enqueue(rn(n,e,c,s.length,0))},async flush(e){let{ctr:t,hmac:n,pending:i,ready:a}=this;if(n&&t){await a;let o=new Uint8Array;if(i.length){let e=t.update(mn(W,i));n.update(e),o=pn(W,e)}r.signature=pn(W,n.digest()).slice(0,U),e.enqueue(dn(o,r.signature))}}}),r=this}};function rn(e,t,n,r,i,a){let{ctr:o,hmac:s,pending:c}=e,l=t.length-i;c.length&&(t=dn(c,t),n=fn(n,l-l%It));let u;for(u=0;u<=l-It;u+=It){let e=mn(W,G(t,u,u+It));a&&s.update(e);let i=o.update(e);a||s.update(i),n.set(pn(W,i),u+r)}return e.pending=G(t,u),n}async function an(e,t,n,r){let i=await sn(e,t,n,G(r,0,Wt[t])),a=G(r,Wt[t]);if(i[0]!=a[0]||i[1]!=a[1])throw Error(Mt)}async function on(e,t,n){let r=Ft(new Uint8Array(Wt[t]));return dn(r,await sn(e,t,n,r))}async function sn(e,t,n,r){e.password=null;let i=await cn(Lt,n,Vt,!1,Ut),a=await ln(Object.assign({salt:r},Ht),i,8*(Gt[t]*2+2)),o=new Uint8Array(a),s=mn(W,G(o,0,Gt[t])),c=mn(W,G(o,Gt[t],Gt[t]*2)),l=G(o,Gt[t]*2);return Object.assign(e,{keys:{key:s,authentication:c,passwordVerification:l},ctr:new Zt(new Xt(s),Array.from(Kt)),hmac:new Qt(c)}),l}async function cn(e,t,n,r,i){if($t)try{return await Jt.importKey(e,t,n,r,i)}catch{return $t=!1,At.importKey(t)}else return At.importKey(t)}async function ln(e,t,n){if(en)try{return await Jt.deriveBits(e,t,n)}catch{return en=!1,At.pbkdf2(t,e.salt,Ht.iterations,n)}else return At.pbkdf2(t,e.salt,Ht.iterations,n)}function un(e,t){return t===void 0?wt(e):t}function dn(e,t){let n=e;return e.length+t.length&&(n=new Uint8Array(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function fn(e,t){if(t&&t>e.length){let n=e;e=new Uint8Array(t),e.set(n,0)}return e}function G(e,t,n){return e.subarray(t,n)}function pn(e,t){return e.fromBits(t)}function mn(e,t){return e.toBits(t)}var hn=12,gn=class extends TransformStream{constructor({password:e,passwordVerification:t,checkPasswordOnly:n}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),bn(this,e)},transform(e,t){let r=this;if(r.password){let t=vn(r,e.subarray(0,hn));if(r.password=null,t.at(-1)!=r.passwordVerification)throw Error(Mt);e=e.subarray(hn)}n?t.error(Error(Pt)):t.enqueue(vn(r,e))}})}},_n=class extends TransformStream{constructor({password:e,passwordVerification:t}){super({start(){Object.assign(this,{password:e,passwordVerification:t}),bn(this,e)},transform(e,t){let n=this,r,i;if(n.password){n.password=null;let t=Ft(new Uint8Array(hn));t[hn-1]=n.passwordVerification,r=new Uint8Array(e.length+t.length),r.set(yn(n,t),0),i=hn}else r=new Uint8Array(e.length),i=0;r.set(yn(n,e),i),t.enqueue(r)}})}};function vn(e,t){let n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Sn(e)^t[r],xn(e,n[r]);return n}function yn(e,t){let n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=Sn(e)^t[r],xn(e,t[r]);return n}function bn(e,t){let n=[305419896,591751049,878082192];Object.assign(e,{keys:n,crcKey0:new St(n[0]),crcKey2:new St(n[2])});for(let n=0;n<t.length;n++)xn(e,t.charCodeAt(n))}function xn(e,t){let[n,r,i]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),r=wn(Math.imul(wn(r+Cn(n)),134775813)+1),e.crcKey2.append([r>>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function Sn(e){let t=e.keys[2]|2;return Cn(Math.imul(t,t^1)>>>8)}function Cn(e){return e&255}function wn(e){return e&4294967295}var Tn=`Invalid uncompressed size`,En=`deflate-raw`,Dn=class extends TransformStream{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});let{compressed:i,encrypted:a,useCompressionStream:o,zipCrypto:s,signed:c,level:l}=e,u=this,d,f,p=super.readable;(!a||s)&&c&&(d=new Ct,p=K(p,d)),i&&(p=An(p,o,{level:l,chunkSize:t},r,n)),a&&(s?p=K(p,new _n(e)):(f=new nn(e),p=K(p,f))),kn(u,p,()=>{let e;a&&!s&&(e=f.signature),(!a||s)&&c&&(e=new DataView(d.value.buffer).getUint32(0)),u.signature=e})}},On=class extends TransformStream{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});let{zipCrypto:i,encrypted:a,signed:o,signature:s,compressed:c,useCompressionStream:l}=e,u,d,f=super.readable;a&&(i?f=K(f,new gn(e)):(d=new tn(e),f=K(f,d))),c&&(f=An(f,l,{chunkSize:t},r,n)),(!a||i)&&o&&(u=new Ct,f=K(f,u)),kn(this,f,()=>{if((!a||i)&&o&&s!=new DataView(u.value.buffer).getUint32(0,!1))throw Error(Nt)})}};function kn(e,t,n){t=K(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function An(e,t,n,r,i){try{e=K(e,new(t&&r?r:i)(En,n))}catch(r){if(t)e=K(e,new i(En,n));else throw r}return e}function K(e,t){return e.pipeThrough(t)}var jn=`message`,Mn=`start`,Nn=`data`,Pn=`close`,Fn=`inflate`,In=class extends TransformStream{constructor(e,t){super({});let n=this,{codecType:r}=e,i;r.startsWith(`deflate`)?i=Dn:r.startsWith(`inflate`)&&(i=On),n.outputSize=0;let a=0,o=new i(e,t),s=super.readable,c=new TransformStream({transform(e,t){e&&e.length&&(a+=e.length,t.enqueue(e))},flush(){Object.assign(n,{inputSize:a})}}),l=new TransformStream({transform(t,r){if(t&&t.length&&(r.enqueue(t),n.outputSize+=t.length,e.outputSize&&n.outputSize>e.outputSize))throw Error(Tn)},flush(){let{signature:e}=o;Object.assign(n,{signature:e,inputSize:a})}});Object.defineProperty(n,"readable",{get(){return s.pipeThrough(c).pipeThrough(o).pipeThrough(l)}})}},Ln=class extends TransformStream{constructor(e){let t;super({transform:n,flush(e){t&&t.length&&e.enqueue(t)}});function n(r,i){if(t){let e=new Uint8Array(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(i.enqueue(r.slice(0,e)),n(r.slice(e),i)):t=r}}},Rn=typeof Worker!=pt,zn=class{constructor(e,{readable:t,writable:n},{options:r,config:i,streamOptions:a,useWebWorkers:o,transferStreams:s,scripts:c},l){let{signal:u}=a;return Object.assign(e,{busy:!0,readable:t.pipeThrough(new Ln(i.chunkSize)).pipeThrough(new Bn(a),{signal:u}),writable:n,options:Object.assign({},r),scripts:c,transferStreams:s,terminate(){return new Promise(t=>{let{worker:n,busy:r}=e;n?(r?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})},onTaskFinished(){let{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,l(e)}}),(o&&Rn?Un:Hn)(e,i)}},Bn=class extends TransformStream{constructor({onstart:e,onprogress:t,size:n,onend:r}){let i=0;super({async start(){e&&await Vn(e,n)},async transform(e,r){i+=e.length,t&&await Vn(t,i,n),r.enqueue(e)},async flush(){r&&await Vn(r,i)}})}};async function Vn(e,...t){try{await e(...t)}catch{}}function Hn(e,t){return{run:()=>Wn(e,t)}}function Un(e,t){let{baseURL:n,chunkSize:r}=t;if(!e.interface){let i;try{i=Yn(e.scripts[0],n,e)}catch{return Rn=!1,Hn(e,t)}Object.assign(e,{worker:i,interface:{run:()=>Gn(e,{chunkSize:r})}})}return e.interface}async function Wn({options:e,readable:t,writable:n,onTaskFinished:r},i){let a;try{a=new In(e,i),await t.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});let{signature:r,inputSize:o,outputSize:s}=a;return{signature:r,inputSize:o,outputSize:s}}catch(e){throw a&&(e.outputSize=a.outputSize),e}finally{r()}}async function Gn(e,t){let n,r,i=new Promise((e,t)=>{n=e,r=t});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:i});let{readable:a,options:o,scripts:s}=e,{writable:c,closed:l}=Kn(e.writable),u=Xn({type:Mn,scripts:s.slice(1),options:o,config:t,readable:a,writable:c},e);u||Object.assign(e,{reader:a.getReader(),writer:c.getWriter()});let d=await i;return u||await c.getWriter().close(),await l,d}function Kn(e){let t,n=new Promise(e=>t=e);return{writable:new WritableStream({async write(t){let n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort(t){return e.getWriter().abort(t)}}),closed:n}}var qn=!0,Jn=!0;function Yn(e,t,n){let r={type:`module`},i,a;typeof e==`function`&&(e=e());try{i=new URL(e,t)}catch{i=e}if(qn)try{a=new Worker(i)}catch{qn=!1,a=new Worker(i,r)}else a=new Worker(i,r);return a.addEventListener(jn,e=>Zn(e,n)),a}function Xn(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:n,readable:r,writable:a}=e,o=[];if(n&&(n.byteLength<n.buffer.byteLength?e.value=n.buffer.slice(0,n.byteLength):e.value=n.buffer,o.push(e.value)),i&&Jn?(r&&o.push(r),a&&o.push(a)):e.readable=e.writable=null,o.length)try{return t.postMessage(e,o),!0}catch{Jn=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw n&&n.releaseLock(),r(),e}}async function Zn({data:e},t){let{type:n,value:r,messageId:i,result:a,error:o}=e,{reader:s,writer:c,resolveResult:l,rejectResult:u,onTaskFinished:d}=t;try{if(o){let{message:e,stack:t,code:n,name:r,outputSize:i}=o,a=Error(e);Object.assign(a,{stack:t,code:n,name:r,outputSize:i}),f(a)}else{if(n==`pull`){let{value:e,done:n}=await s.read();Xn({type:Nn,value:e,done:n,messageId:i},t)}n==`data`&&(await c.ready,await c.write(new Uint8Array(r)),Xn({type:`ack`,messageId:i},t)),n==`close`&&f(null,a)}}catch(e){Xn({type:Pn,messageId:i},t),f(e)}function f(e,t){e?u(e):l(t),c&&c.releaseLock(),d()}}var q=[],Qn=[],$n=0;async function er(e,t){let{options:n,config:r}=t,{transferStreams:i,useWebWorkers:a,useCompressionStream:o,codecType:s,compressed:c,signed:l,encrypted:u}=n,{workerScripts:d,maxWorkers:f}=r;return t.transferStreams=i||i===void 0,t.useWebWorkers=!(!c&&!l&&!u&&!t.transferStreams)&&(a||a===void 0&&r.useWebWorkers),t.scripts=t.useWebWorkers&&d?d[s]:[],n.useCompressionStream=o||o===void 0&&r.useCompressionStream,(await p()).run();async function p(){let n=q.find(e=>!e.busy);if(n)return nr(n),new zn(n,e,t,m);if(q.length<f){let n={indexWorker:$n};return $n++,q.push(n),new zn(n,e,t,m)}else return new Promise(n=>Qn.push({resolve:n,stream:e,workerOptions:t}))}function m(e){if(Qn.length){let[{resolve:t,stream:n,workerOptions:r}]=Qn.splice(0,1);t(new zn(e,n,r,m))}else e.worker?(nr(e),tr(e,t)):q=q.filter(t=>t!=e)}}function tr(e,t){let{config:n}=t,{terminateWorkerTimeout:r}=n;Number.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{q=q.filter(t=>t!=e);try{await e.terminate()}catch{}},r))}function nr(e){let{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}async function rr(){await Promise.allSettled(q.map(e=>(nr(e),e.terminate())))}var ir=`HTTP error `,ar=`HTTP Range not supported`,or=`Writer iterator completed too soon`,sr=`Writer not initialized`,cr=`text/plain`,lr=`Content-Length`,ur=`Content-Range`,dr=`Accept-Ranges`,fr=`Range`,pr=`Content-Type`,mr=`HEAD`,hr=`GET`,gr=`bytes`,_r=64*1024,vr=`writable`,yr=class{constructor(){this.size=0}init(){this.initialized=!0}},J=class extends yr{get readable(){let e=this,{chunkSize:t=_r}=e,n=new ReadableStream({start(){this.chunkOffset=0},async pull(r){let{offset:i=0,size:a,diskNumberStart:o}=n,{chunkOffset:s}=this,c=a===void 0?t:Math.min(t,a-s),l=await Y(e,i+s,c,o);r.enqueue(l),s+t>a||a===void 0&&!l.length&&c?r.close():this.chunkOffset+=t}});return n}},br=class extends yr{constructor(){super();let e=this,t=new WritableStream({write(t){if(!e.initialized)throw Error(sr);return e.writeUint8Array(t)}});Object.defineProperty(e,vr,{get(){return t}})}writeUint8Array(){}},xr=class extends J{constructor(e){super();let t=e.length;for(;e.charAt(t-1)==`=`;)t--;let n=e.indexOf(`,`)+1;Object.assign(this,{dataURI:e,dataStart:n,size:Math.floor((t-n)*.75)})}readUint8Array(e,t){let{dataStart:n,dataURI:r}=this,i=new Uint8Array(t),a=Math.floor(e/3)*4,o=atob(r.substring(a+n,Math.ceil((e+t)/3)*4+n)),s=e-Math.floor(a/4)*3,c=0;for(let e=s;e<s+t&&e<o.length;e++)i[e-s]=o.charCodeAt(e),c++;return c<i.length?i.subarray(0,c):i}},Sr=class extends br{constructor(e){super(),Object.assign(this,{data:`data:`+(e||``)+`;base64,`,pending:[]})}writeUint8Array(e){let t=this,n=0,r=t.pending,i=t.pending.length;for(t.pending=``,n=0;n<Math.floor((i+e.length)/3)*3-i;n++)r+=String.fromCharCode(e[n]);for(;n<e.length;n++)t.pending+=String.fromCharCode(e[n]);r.length&&(r.length>2?t.data+=btoa(r):t.pending+=r)}getData(){return this.data+btoa(this.pending)}},Cr=class extends J{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){let n=this,r=e+t,i=await(e||r<n.size?n.blob.slice(e,r):n.blob).arrayBuffer();return i.byteLength>t&&(i=i.slice(e,r)),new Uint8Array(i)}},wr=class extends yr{constructor(e){super();let t=this,n=new TransformStream,r=[];e&&r.push([pr,e]),Object.defineProperty(t,vr,{get(){return n.writable}}),t.blob=new Response(n.readable,{headers:r}).blob()}getData(){return this.blob}},Tr=class extends Cr{constructor(e){super(new Blob([e],{type:cr}))}},Er=class extends wr{constructor(e){super(e),Object.assign(this,{encoding:e,utf8:!e||e.toLowerCase()==`utf-8`})}async getData(){let{encoding:e,utf8:t}=this,n=await super.getData();if(n.text&&t)return n.text();{let t=new FileReader;return new Promise((r,i)=>{Object.assign(t,{onload:({target:e})=>r(e.result),onerror:()=>i(t.error)}),t.readAsText(n,e)})}}},Dr=class extends J{constructor(e,t){super(),kr(this,e,t)}async init(){await Ar(this,Rr,Pr),super.init()}readUint8Array(e,t){return jr(this,e,t,Rr,Pr)}},Or=class extends J{constructor(e,t){super(),kr(this,e,t)}async init(){await Ar(this,zr,Fr),super.init()}readUint8Array(e,t){return jr(this,e,t,zr,Fr)}};function kr(e,t,n){let{preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o}=n;n=Object.assign({},n),delete n.preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.combineSizeEocd,delete n.useXHR,Object.assign(e,{url:t,options:n,preventHeadRequest:r,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o})}async function Ar(e,t,n){let{url:r,preventHeadRequest:i,useRangeHeader:a,forceRangeRequests:o,combineSizeEocd:s}=e;if(Jr(r)&&(a||o)&&(i===void 0||i)){let r=await t(hr,e,Mr(e,s?-22:void 0));if(!o&&r.headers.get(dr)!=gr)throw Error(ar);{s&&(e.eocdCache=new Uint8Array(await r.arrayBuffer()));let i,a=r.headers.get(ur);if(a){let e=a.trim().split(/\s*\/\s*/);if(e.length){let t=e[1];t&&t!=`*`&&(i=Number(t))}}i===void 0?await Lr(e,t,n):e.size=i}}else await Lr(e,t,n)}async function jr(e,t,n,r,i){let{useRangeHeader:a,forceRangeRequests:o,eocdCache:s,size:c,options:l}=e;if(a||o){if(s&&t==c-22&&n==22)return s;if(t>=c)return new Uint8Array;{t+n>c&&(n=c-t);let i=await r(hr,e,Mr(e,t,n));if(i.status!=206)throw Error(ar);return new Uint8Array(await i.arrayBuffer())}}else{let{data:r}=e;return r||await i(e,l),new Uint8Array(e.data.subarray(t,t+n))}}function Mr(e,t=0,n=1){return Object.assign({},Nr(e),{[fr]:`bytes=`+(t<0?t:t+`-`+(t+n-1))})}function Nr({options:e}){let{headers:t}=e;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function Pr(e){await Ir(e,Rr)}async function Fr(e){await Ir(e,zr)}async function Ir(e,t){let n=await t(hr,e,Nr(e));e.data=new Uint8Array(await n.arrayBuffer()),e.size||=e.data.length}async function Lr(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{let r=(await t(mr,e,Nr(e))).headers.get(lr);r?e.size=Number(r):await n(e,e.options)}}async function Rr(e,{options:t,url:n},r){let i=await fetch(n,Object.assign({},t,{method:e,headers:r}));if(i.status<400)return i;throw i.status==416?Error(ar):Error(ir+(i.statusText||i.status))}function zr(e,{url:t},n){return new Promise((r,i)=>{let a=new XMLHttpRequest;if(a.addEventListener(`load`,()=>{if(a.status<400){let e=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(t=>{let n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,e=>e.toUpperCase()),e.push(n)}),r({status:a.status,arrayBuffer:()=>a.response,headers:new Map(e)})}else i(a.status==416?Error(ar):Error(ir+(a.statusText||a.status)))},!1),a.addEventListener(`error`,e=>i(e.detail?e.detail.error:Error(`Network error`)),!1),a.open(e,t),n)for(let e of Object.entries(n))a.setRequestHeader(e[0],e[1]);a.responseType=`arraybuffer`,a.send()})}var Br=class extends J{constructor(e,t={}){super(),Object.assign(this,{url:e,reader:t.useXHR?new Or(e,t):new Dr(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}},Vr=class extends Br{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},Hr=class extends J{constructor(e){super(),e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),Object.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},Ur=class extends br{init(e=0){Object.assign(this,{offset:0,array:new Uint8Array(e)}),super.init()}writeUint8Array(e){let t=this;if(t.offset+e.length>t.array.length){let n=t.array;t.array=new Uint8Array(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},Wr=class extends J{constructor(e){super(),this.readers=e}async init(){let e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await Promise.all(t.map(async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size})),super.init()}async readUint8Array(e,t,n=0){let r=this,{readers:i}=this,a,o=n;o==-1&&(o=i.length-1);let s=e;for(;i[o]&&s>=i[o].size;)s-=i[o].size,o++;let c=i[o];if(c){let i=c.size;if(s+t<=i)a=await Y(c,s,t);else{let o=i-s;a=new Uint8Array(t);let l=await Y(c,s,o);a.set(l,0);let u=await r.readUint8Array(e+o,t-o,n);a.set(u,o),l.length+u.length<t&&(a=a.subarray(0,l.length+u.length))}}else a=new Uint8Array;return r.lastDiskNumber=Math.max(o,r.lastDiskNumber),a}},Gr=class extends yr{constructor(e,t=4294967295){super();let n=this;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});let r,i,a,o=new WritableStream({async write(t){let{availableSize:o}=n;if(a)t.length>=o?(await s(t.subarray(0,o)),await c(),n.diskOffset+=r.size,n.diskNumber++,a=null,await this.write(t.subarray(o))):await s(t);else{let{value:o,done:s}=await e.next();if(s&&!o)throw Error(or);r=o,r.size=0,r.maxSize&&(n.maxSize=r.maxSize),n.availableSize=n.maxSize,await Yr(r),i=o.writable,a=i.getWriter(),await this.write(t)}},async close(){await a.ready,await c()}});Object.defineProperty(n,vr,{get(){return o}});async function s(e){let t=e.length;t&&(await a.ready,await a.write(e),r.size+=t,n.size+=t,n.availableSize-=t)}async function c(){await a.close()}}},Kr=class{constructor(e){return Array.isArray(e)&&(e=new Wr(e)),e instanceof ReadableStream&&(e={readable:e}),e}},qr=class{constructor(e){return e.writable===void 0&&typeof e.next==`function`&&(e=new Gr(e)),e instanceof WritableStream&&(e={writable:e}),e.size===void 0&&(e.size=0),e instanceof Gr||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}};function Jr(e){let{baseURL:t}=_t(),{protocol:n}=new URL(e,t);return n==`http:`||n==`https:`}async function Yr(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}function Y(e,t,n,r){return e.readUint8Array(t,n,r)}var Xr=Wr,Zr=Gr,Qr=`\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ `.split(``),$r=Qr.length==256;function ei(e){if($r){let t=``;for(let n=0;n<e.length;n++)t+=Qr[e[n]];return t}else return new TextDecoder().decode(e)}function ti(e,t){return t&&t.trim().toLowerCase()==`cp437`?ei(e):new TextDecoder(t).decode(e)}var ni=`filename`,ri=`rawFilename`,ii=`comment`,ai=`rawComment`,oi=`uncompressedSize`,si=`compressedSize`,ci=`offset`,li=`diskNumberStart`,ui=`lastModDate`,di=`rawLastModDate`,fi=`lastAccessDate`,pi=`rawLastAccessDate`,mi=`creationDate`,hi=`rawCreationDate`,gi=[ni,ri,si,oi,ui,di,ii,ai,fi,mi,ci,li,li,`internalFileAttribute`,`internalFileAttributes`,`externalFileAttribute`,`externalFileAttributes`,`msDosCompatible`,`zip64`,`encrypted`,`version`,`versionMadeBy`,`zipCrypto`,`directory`,`executable`,`compressionMethod`,`signature`,`extraField`,`bitFlag`,`filenameUTF8`,`commentUTF8`,`rawExtraField`,`extraFieldZip64`,`extraFieldUnicodePath`,`extraFieldUnicodeComment`,`extraFieldAES`,`extraFieldNTFS`,`extraFieldExtendedTimestamp`],_i=class{constructor(e){gi.forEach(t=>this[t]=e[t])}},vi=`filenameEncoding`,yi=`commentEncoding`,bi=`extractPrependedData`,xi=`extractAppendedData`,Si=`password`,Ci=`rawPassword`,wi=`passThrough`,Ti=`signal`,Ei=`checkPasswordOnly`,Di=`checkOverlappingEntryOnly`,Oi=`checkOverlappingEntry`,ki=`useWebWorkers`,Ai=`useCompressionStream`,ji=`transferStreams`,Mi=`File format is not recognized`,Ni=`End of central directory not found`,Pi=`End of Zip64 central directory locator not found`,Fi=`Central directory header not found`,Ii=`Local file header not found`,Li=`Zip64 extra field not found`,Ri=`File contains encrypted entry`,zi=`Encryption method not supported`,Bi=`Compression method not supported`,Vi=`Split zip file`,Hi=`Overlapping entry found`,Ui=`utf-8`,Wi=`cp437`,Gi=[[oi,it],[si,it],[ci,it],[li,at]],Ki={[at]:{getValue:Q,bytes:4},[it]:{getValue:ca,bytes:8}},qi=class{constructor(e,t={}){Object.assign(this,{reader:new Kr(e),options:t,config:_t(),readRanges:[]})}async*getEntriesGenerator(e={}){let t=this,{reader:n}=t,{config:r}=t;if(await Yr(n),(n.size===void 0||!n.readUint8Array)&&(n=new Cr(await new Response(n.readable).blob()),await Yr(n)),n.size<22)throw Error(Mi);n.chunkSize=vt(r);let i=await ia(n,ot,n.size,22,at*16);if(!i)throw Q($(await Y(n,0,4)))==134695760?Error(Vi):Error(Ni);let a=$(i),o=Q(a,12),s=Q(a,16),c=i.offset,l=Z(a,20),u=c+22+l,d=Z(a,4),f=n.lastDiskNumber||0,p=Z(a,6),m=Z(a,8),h=0,g=0;if(s==4294967295||o==4294967295||m==65535||p==65535){let e=$(await Y(n,i.offset-20,20));if(Q(e,0)==117853008){s=ca(e,8);let t=await Y(n,s,56,-1),r=$(t),a=i.offset-20-56;if(Q(r,0)!=101075792&&s!=a){let e=s;s=a,s>e&&(h=s-e),t=await Y(n,s,56,-1),r=$(t)}if(Q(r,0)!=101075792)throw Error(Pi);d==65535&&(d=Q(r,16)),p==65535&&(p=Q(r,20)),m==65535&&(m=ca(r,32)),o==4294967295&&(o=ca(r,40)),s-=o}}if(s>=n.size&&(h=n.size-s-o-22,s=n.size-o-22),f!=d)throw Error(Vi);if(s<0)throw Error(Mi);let _=0,v=await Y(n,s,o,p),y=$(v);if(o){let e=i.offset-o;if(Q(y,_)!=33639248&&s!=e){let t=s;s=e,s>t&&(h+=s-t),v=await Y(n,s,o,p),y=$(v)}}let b=i.offset-s-(n.lastDiskOffset||0);if(o!=b&&b>=0&&(o=b,v=await Y(n,s,o,p),y=$(v)),s<0||s>=n.size)throw Error(Mi);let x=X(t,e,vi),S=X(t,e,yi);for(let i=0;i<m;i++){let a=new Yi(n,r,t.options);if(Q(y,_)!=33639248)throw Error(Fi);Xi(a,y,_+6);let o=!!a.bitFlag.languageEncodingFlag,s=_+46,c=s+a.filenameLength,l=c+a.extraFieldLength,u=Z(y,_+4),d=u>>8==0,f=u>>8==3,p=v.subarray(s,c),b=Z(y,_+32),C=l+b,w=v.subarray(l,C),T=o,E=o,D=Q(y,_+38),O=d&&(sa(y,_+38)&16)==16||f&&(D>>16&61440)==16384||p.length&&p.at(-1)==47,k=f&&(D>>16&73)!=0,ee=Q(y,_+42)+h;Object.assign(a,{versionMadeBy:u,msDosCompatible:d,compressedSize:0,uncompressedSize:0,commentLength:b,directory:O,offset:ee,diskNumberStart:Z(y,_+34),internalFileAttributes:Z(y,_+36),externalFileAttributes:D,rawFilename:p,filenameUTF8:T,commentUTF8:E,rawExtraField:v.subarray(c,l),executable:k}),a.internalFileAttribute=a.internalFileAttributes,a.externalFileAttribute=a.externalFileAttributes;let te=X(t,e,`decodeText`)||ti,ne=T?Ui:x||Wi,re=E?Ui:S||Wi,A=te(p,ne);A===void 0&&(A=ti(p,ne));let ie=te(w,re);ie===void 0&&(ie=ti(w,re)),Object.assign(a,{rawComment:w,filename:A,comment:ie,directory:O||A.endsWith(`/`)}),g=Math.max(ee,g),Zi(a,a,y,_+6),a.zipCrypto=a.encrypted&&!a.extraFieldAES;let j=new _i(a);j.getData=(e,n)=>a.getData(e,j,t.readRanges,n),j.arrayBuffer=async e=>{let n=new TransformStream,[r]=await Promise.all([new Response(n.readable).arrayBuffer(),a.getData(n,j,t.readRanges,e)]);return r},_=C;let{onprogress:ae}=e;if(ae)try{await ae(i+1,m,new _i(a))}catch{}yield j}let C=X(t,e,bi),w=X(t,e,xi);return C&&(t.prependedData=g>0?await Y(n,0,g):new Uint8Array),t.comment=l?await Y(n,c+22,l):new Uint8Array,w&&(t.appendedData=u<n.size?await Y(n,u,n.size-u):new Uint8Array),!0}async getEntries(e={}){let t=[];for await(let n of this.getEntriesGenerator(e))t.push(n);return t}async close(){}},Ji=class{constructor(e={}){let{readable:t,writable:n}=new TransformStream,r=new qi(t,e).getEntriesGenerator();this.readable=new ReadableStream({async pull(e){let{done:t,value:n}=await r.next();if(t)return e.close();let i={...n,readable:(function(){let{readable:e,writable:t}=new TransformStream;if(n.getData)return n.getData(t),e})()};delete i.getData,e.enqueue(i)}}),this.writable=n}},Yi=class{constructor(e,t,n){Object.assign(this,{reader:e,config:t,options:n})}async getData(e,t,n,r={}){let i=this,{reader:a,offset:o,diskNumberStart:s,extraFieldAES:c,extraFieldZip64:l,compressionMethod:u,config:d,bitFlag:f,signature:p,rawLastModDate:m,uncompressedSize:h,compressedSize:g}=i,{dataDescriptor:_}=f,v=t.localDirectory={},y=$(await Y(a,o,30,s)),b=X(i,r,Si),x=X(i,r,Ci),S=X(i,r,wi);if(b=b&&b.length&&b,x=x&&x.length&&x,c&&c.originalCompressionMethod!=99||u!=0&&u!=8&&!S)throw Error(Bi);if(Q(y,0)!=67324752)throw Error(Ii);Xi(v,y,4);let{extraFieldLength:C,filenameLength:w,lastAccessDate:T,creationDate:E}=v;v.rawExtraField=C?await Y(a,o+30+w,C,s):new Uint8Array,Zi(i,v,y,4,!0),Object.assign(t,{lastAccessDate:T,creationDate:E});let D=i.encrypted&&v.encrypted&&!S,O=D&&!c;if(S||(t.zipCrypto=O),D){if(!O&&c.strength===void 0)throw Error(zi);if(!b&&!x)throw Error(Ri)}let k=o+30+w+C,ee=g,te=a.readable;Object.assign(te,{diskNumberStart:s,offset:k,size:ee});let ne=X(i,r,Ti),re=X(i,r,Ei),A=X(i,r,Oi),ie=X(i,r,Di);ie&&(A=!0);let{onstart:j,onprogress:ae,onend:M}=r,N={options:{codecType:Fn,password:b,rawPassword:x,zipCrypto:O,encryptionStrength:c&&c.strength,signed:X(i,r,`checkSignature`)&&!S,passwordVerification:O&&(_?m>>>8&255:p>>>24&255),outputSize:h,signature:p,compressed:u!=0&&!S,encrypted:i.encrypted&&!S,useWebWorkers:X(i,r,ki),useCompressionStream:X(i,r,Ai),transferStreams:X(i,r,ji),checkPasswordOnly:re},config:d,streamOptions:{signal:ne,size:ee,onstart:j,onprogress:ae,onend:M}};A&&await ra({reader:a,fileEntry:t,offset:o,diskNumberStart:s,signature:p,compressedSize:g,uncompressedSize:h,dataOffset:k,dataDescriptor:_||v.bitFlag.dataDescriptor,extraFieldZip64:l||v.extraFieldZip64,readRanges:n});let oe;try{if(!ie){re&&(e=new WritableStream),e=new qr(e),await Yr(e,S?g:h),{writable:oe}=e;let{outputSize:t}=await er({readable:te,writable:oe},N);if(e.size+=t,t!=(S?g:h))throw Error(Tn)}}catch(t){if(t.outputSize!==void 0&&(e.size+=t.outputSize),!re||t.message!=`zipjs-abort-check-password`)throw t}finally{!X(i,r,`preventClose`)&&oe&&!oe.locked&&await oe.getWriter().close()}return re||ie?void 0:e.getData?e.getData():oe}};function Xi(e,t,n){let r=e.rawBitFlag=Z(t,n+2),i=(r&1)==1,a=Q(t,n+6);Object.assign(e,{encrypted:i,version:Z(t,n),bitFlag:{level:(r&6)>>1,dataDescriptor:(r&8)==8,languageEncodingFlag:(r&ft)==ft},rawLastModDate:a,lastModDate:aa(a),filenameLength:Z(t,n+22),extraFieldLength:Z(t,n+24)})}function Zi(e,t,n,r,i){let{rawExtraField:a}=t,o=t.extraField=new Map,s=$(new Uint8Array(a)),c=0;try{for(;c<a.length;){let e=Z(s,c),t=Z(s,c+2);o.set(e,{type:e,data:a.slice(c+4,c+4+t)}),c+=4+t}}catch{}let l=Z(n,r+4);Object.assign(t,{signature:Q(n,r+10),compressedSize:Q(n,r+14),uncompressedSize:Q(n,r+18)});let u=o.get(1);u&&(Qi(u,t),t.extraFieldZip64=u);let d=o.get(lt);d&&($i(d,ni,ri,t,e),t.extraFieldUnicodePath=d);let f=o.get(ut);f&&($i(f,ii,ai,t,e),t.extraFieldUnicodeComment=f);let p=o.get(st);p?(ea(p,t,l),t.extraFieldAES=p):t.compressionMethod=l;let m=o.get(10);m&&(ta(m,t),t.extraFieldNTFS=m);let h=o.get(ct);h&&(na(h,t,i),t.extraFieldExtendedTimestamp=h);let g=o.get(dt);g&&(t.extraFieldUSDZ=g)}function Qi(e,t){t.zip64=!0;let n=$(e.data),r=Gi.filter(([e,n])=>t[e]==n);for(let i=0,a=0;i<r.length;i++){let[o,s]=r[i];if(t[o]==s){let r=Ki[s];t[o]=e[o]=r.getValue(n,a),a+=r.bytes}else if(e[o])throw Error(Li)}}function $i(e,t,n,r,i){let a=$(e.data),o=new St;o.append(i[n]);let s=$(new Uint8Array(4));s.setUint32(0,o.get(),!0);let c=Q(a,1);Object.assign(e,{version:sa(a,0),[t]:ti(e.data.subarray(5)),valid:!i.bitFlag.languageEncodingFlag&&c==Q(s,0)}),e.valid&&(r[t]=e[t],r[t+`UTF8`]=!0)}function ea(e,t,n){let r=$(e.data),i=sa(r,4);Object.assign(e,{vendorVersion:sa(r,0),vendorId:sa(r,2),strength:i,originalCompressionMethod:n,compressionMethod:Z(r,5)}),t.compressionMethod=e.compressionMethod}function ta(e,t){let n=$(e.data),r=4,i;try{for(;r<e.data.length&&!i;){let t=Z(n,r),a=Z(n,r+2);t==1&&(i=e.data.slice(r+4,r+4+a)),r+=4+a}}catch{}try{if(i&&i.length==24){let n=$(i),r=n.getBigUint64(0,!0),a=n.getBigUint64(8,!0),o=n.getBigUint64(16,!0);Object.assign(e,{rawLastModDate:r,rawLastAccessDate:a,rawCreationDate:o});let s={lastModDate:oa(r),lastAccessDate:oa(a),creationDate:oa(o)};Object.assign(e,s),Object.assign(t,s)}}catch{}}function na(e,t,n){let r=$(e.data),i=sa(r,0),a=[],o=[];n?((i&1)==1&&(a.push(ui),o.push(di)),(i&2)==2&&(a.push(fi),o.push(pi)),(i&4)==4&&(a.push(mi),o.push(hi))):e.data.length>=5&&(a.push(ui),o.push(di));let s=1;a.forEach((n,i)=>{if(e.data.length>=s+4){let a=Q(r,s);t[n]=e[n]=new Date(a*1e3);let c=o[i];e[c]=a}s+=4})}async function ra({reader:e,fileEntry:t,offset:n,diskNumberStart:r,signature:i,compressedSize:a,uncompressedSize:o,dataOffset:s,dataDescriptor:c,extraFieldZip64:l,readRanges:u}){let d=0;if(r)for(let t=0;t<r;t++){let n=e.readers[t];d+=n.size}let f=0;if(c&&(f=l?20:12),f){let n=await Y(e,s+a,f+4,r);if(Q($(n),0)==134695760){let e=Q($(n),4),r,s;l?(r=ca($(n),8),s=ca($(n),16)):(r=Q($(n),8),s=Q($(n),12)),(t.encrypted&&!t.zipCrypto||e==i)&&r==a&&s==o&&(f+=4)}}let p={start:d+n,end:d+s+a+f,fileEntry:t};for(let e of u)if(e.fileEntry!=t&&p.start>=e.start&&p.start<e.end){let t=Error(Hi);throw t.overlappingEntry=e.fileEntry,t}u.push(p)}async function ia(e,t,n,r,i){let a=new Uint8Array(4);la($(a),0,t);let o=r+i;return await s(r)||await s(Math.min(o,n));async function s(t){let i=n-t,o=await Y(e,i,t);for(let e=o.length-r;e>=0;e--)if(o[e]==a[0]&&o[e+1]==a[1]&&o[e+2]==a[2]&&o[e+3]==a[3])return{offset:i+e,buffer:o.slice(e,e+r).buffer}}}function X(e,t,n){return t[n]===void 0?e.options[n]:t[n]}function aa(e){let t=(e&4294901760)>>16,n=e&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(n&63488)>>11,(n&2016)>>5,(n&31)*2,0)}catch{}}function oa(e){return new Date(Number(e/BigInt(1e4)-BigInt(0xa9730b66800)))}function sa(e,t){return e.getUint8(t)}function Z(e,t){return e.getUint16(t,!0)}function Q(e,t){return e.getUint32(t,!0)}function ca(e,t){return Number(e.getBigUint64(t,!0))}function la(e,t,n){e.setUint32(t,n,!0)}function $(e){return new DataView(e.buffer)}var ua=t({BlobReader:()=>Cr,BlobWriter:()=>wr,Data64URIReader:()=>xr,Data64URIWriter:()=>Sr,ERR_BAD_FORMAT:()=>Mi,ERR_CENTRAL_DIRECTORY_NOT_FOUND:()=>Fi,ERR_ENCRYPTED:()=>Ri,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:()=>Pi,ERR_EOCDR_NOT_FOUND:()=>Ni,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:()=>Li,ERR_HTTP_RANGE:()=>ar,ERR_INVALID_PASSWORD:()=>Mt,ERR_INVALID_SIGNATURE:()=>Nt,ERR_INVALID_UNCOMPRESSED_SIZE:()=>Tn,ERR_ITERATOR_COMPLETED_TOO_SOON:()=>or,ERR_LOCAL_FILE_HEADER_NOT_FOUND:()=>Ii,ERR_OVERLAPPING_ENTRY:()=>Hi,ERR_SPLIT_ZIP_FILE:()=>Vi,ERR_UNSUPPORTED_COMPRESSION:()=>Bi,ERR_UNSUPPORTED_ENCRYPTION:()=>zi,ERR_WRITER_NOT_INITIALIZED:()=>sr,GenericReader:()=>Kr,GenericWriter:()=>qr,HttpRangeReader:()=>Vr,HttpReader:()=>Br,Reader:()=>J,SplitDataReader:()=>Wr,SplitDataWriter:()=>Gr,SplitZipReader:()=>Xr,SplitZipWriter:()=>Zr,TextReader:()=>Tr,TextWriter:()=>Er,Uint8ArrayReader:()=>Hr,Uint8ArrayWriter:()=>Ur,Writer:()=>br,ZipReader:()=>qi,ZipReaderStream:()=>Ji,configure:()=>yt,getMimeType:()=>bt,initStream:()=>Yr,readUint8Array:()=>Y,terminateWorkers:()=>rr});yt({Inflate:rt});var da=ua,fa=class{constructor(e,t){da.configure({baseURL:self.location.href}),this._zipReader=new da.ZipReader(new da.HttpReader(this._resolveTraceURI(e),{mode:`cors`,preventHeadRequest:!0}),{useWebWorkers:!1}),this._entriesPromise=this._zipReader.getEntries({onprogress:t}).then(e=>{let t=new Map;for(let n of e)t.set(n.filename,n);return t})}_resolveTraceURI(e){return e.startsWith(`https://www.dropbox.com/`)?`https://dl.dropboxusercontent.com/`+e.substring(24):e}isLive(){return!1}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(e){return(await this._entriesPromise).has(e)}async readText(e){let t=(await this._entriesPromise).get(e);if(!t)return;let n=new da.TextWriter;return await t.getData?.(n),n.getData()}async readBlob(e){let t=(await this._entriesPromise).get(e);if(!t)return;let n=new da.BlobWriter;return await t.getData(n),n.getData()}},pa=class{constructor(e){this._entriesPromise=this._readFile(e).then(async e=>{if(!e)throw Error(`File not found`);let t=await e.json(),n=new Map;for(let e of t.entries)n.set(e.name,e.path);return n})}isLive(){return!0}async entryNames(){return[...(await this._entriesPromise).keys()]}async hasEntry(e){return(await this._entriesPromise).has(e)}async readText(e){return(await this._readEntry(e))?.text()}async readBlob(e){let t=await this._readEntry(e);return t?.status===200?await t?.blob():void 0}async _readEntry(e){let t=(await this._entriesPromise).get(e);if(t)return this._readFile(t)}async _readFile(e){let t=await fetch(e);if(t.status!==404)return t}};self.addEventListener(`install`,function(e){self.skipWaiting()}),self.addEventListener(`activate`,function(e){e.waitUntil(self.clients.claim())});var ma=new URL(self.registration.scope).pathname,ha=new Map,ga=new Map,_a=self.registration.scope.startsWith(`https://`);function va(){ha.clear(),ga.clear()}async function ya(e,t,n){try{return{loadedTrace:await ba(e,t,n)}}catch(e){return{errorResponse:new Response(JSON.stringify({error:e?.message}),{status:500,headers:{"Content-Type":`application/json`}})}}}function ba(e,t,n){let r=t.searchParams.get(`trace`);if(!r)throw Error(`trace parameter is missing`);ga.set(e,r);let i=ha.get(r);if(i)return i;let a=xa(r,n);return ha.set(r,a),a.catch(()=>ha.delete(r)),a}async function xa(e,t){await Ta();let n=new re;try{let[r,i]=j(t,[.5,.4,.1]),a=Oa(e)||e.endsWith(`traces.dir`)?new pa(e):new fa(e,r);await n.load(a,void 0,i)}catch(t){if(console.error(t),t?.message?.includes(`Cannot find .trace file`)&&await n.hasEntry(`index.html`))throw Error(`Could not load trace. Did you upload a Playwright HTML report instead? Make sure to extract the archive first and then double-click the index.html file or put it on a web server.`);if(t instanceof k)throw Error(`Could not load trace from ${e}. ${t.message}`);let r=`Could not load trace from ${e}. Make sure a valid Playwright Trace is accessible over this url.`,i=await navigator.permissions.query({name:`local-network-access`}).catch(()=>{});throw i&&i.state!==`granted`&&(r+=`
|
|
3
|
+
|
|
4
|
+
If your trace is in a local or private network, please grant permission for Local Network Access.`),Error(r)}return{traceLoader:n,snapshotServer:new i(n.storage(),e=>n.resourceEntry(e))}}async function Sa(e){let t=e.request;if(t.url.startsWith(`chrome-extension://`))return fetch(t);let n=new URL(t.url),r;if(t.url.startsWith(self.registration.scope)&&(r=n.pathname.substring(ma.length-1)),r===`/restartServiceWorker`)return va(),new Response(null,{status:200});if(r===`/ping`)return new Response(null,{status:200});if(r===`/coverage`)return new Response(JSON.stringify(Ca()),{status:200,headers:{"Content-Type":`application/json`}});let i=!!e.resultingClientId,a=e.clientId?await self.clients.get(e.clientId):void 0;if(i&&!r?.startsWith(`/file/`)){if(r?.startsWith(`/snapshot/`)){let{errorResponse:t,loadedTrace:i}=await ya(e.resultingClientId,n,Da);if(t)return t;let a=decodeURIComponent(r.substring(10)),o=i.snapshotServer.serveSnapshot(a,n.searchParams,n.href);return _a&&o.headers.append(`Content-Security-Policy`,`upgrade-insecure-requests`),o}return fetch(e.request)}if(!r){if(!a)return new Response(`Sub-resource without a client`,{status:500});let{snapshotServer:e}=await ba(a.id,new URL(a.url),Ea(a));if(!e)return new Response(null,{status:404});let n=[t.url];return _a&&t.url.startsWith(`https://`)&&n.push(t.url.replace(/^https/,`http`)),e.serveResource(n,t.method,a.url)}if(r===`/contexts`||r.startsWith(`/snapshotInfo/`)||r.startsWith(`/closest-screenshot/`)||r.startsWith(`/file/`)){if(!a)return new Response(`Sub-resource without a client`,{status:500});let{errorResponse:e,loadedTrace:t}=await ya(a.id,n,Ea(a));if(e)return e;if(r===`/contexts`)return new Response(JSON.stringify(t.traceLoader.contextEntries),{status:200,headers:{"Content-Type":`application/json`}});if(r.startsWith(`/snapshotInfo/`)){let e=decodeURIComponent(r.substring(14));return t.snapshotServer.serveSnapshotInfo(e,n.searchParams)}if(r.startsWith(`/closest-screenshot/`)){let e=decodeURIComponent(r.substring(20));return t.snapshotServer.serveClosestScreenshot(e,n.searchParams)}if(r.startsWith(`/file/`)){let e=await t.traceLoader.resourceEntry(r.slice(6));return e?new Response(e,{status:200,headers:wa(n.searchParams)}):new Response(null,{status:404})}}return fetch(e.request)}function Ca(){let e=self.__coverage__||{},t=JSON.parse(JSON.stringify(e));for(let t of Object.values(e))n(t.s),n(t.f),r(t.b);return t}function wa(e){let t=e.get(`dn`),n=e.get(`dct`);if(!t)return;let r=new Headers;return r.set(`Content-Disposition`,`attachment; filename="attachment"; filename*=UTF-8''${encodeURIComponent(t)}`),n&&r.set(`Content-Type`,n),r}async function Ta(){let e=await self.clients.matchAll(),t=new Set;for(let[n,r]of ga){if(!e.find(e=>e.id===n)){ga.delete(n);continue}t.add(r)}for(let e of ha.keys())t.has(e)||ha.delete(e)}function Ea(e){return(t,n)=>{e.postMessage({method:`progress`,params:{done:t,total:n}})}}function Da(e,t){}function Oa(e){return!!new URL(e,`http://localhost`).searchParams.get(`path`)?.endsWith(`.json`)}self.addEventListener(`fetch`,function(e){if(e.request.headers.get(`x-pw-serviceworker`)===`skip`)return!1;e.respondWith(Sa(e))});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/xtermModule-B794rD2Z.js","./assets/defaultSettingsView-D-g2vrvf.js","./assets/urlMatch-L3liM589.js","./defaultSettingsView.C8BeHuxd.css","./xtermModule.kHJ-D0s7.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{C as e,D as t,E as n,S as r,T as i,_ as a,a as o,b as s,c,d as l,f as u,g as d,h as f,i as p,k as m,l as h,m as g,n as _,p as v,r as y,t as b,u as x,v as S,w as C,x as w,y as T}from"./assets/defaultSettingsView-D-g2vrvf.js";import"./assets/urlMatch-L3liM589.js";var E=m(t()),D=m(S(),1),O=class{constructor(e,t={}){this.isListing=!1,this._tests=new Map,this._rootSuite=new k(``,`root`),this._options=t,this._reporter=e}reset(){this._rootSuite._entries=[],this._tests.clear()}dispatch(e){let{method:t,params:n}=e;if(t===`onConfigure`){this._onConfigure(n.config);return}if(t===`onProject`){this._onProject(n.project);return}if(t===`onBegin`){this._onBegin();return}if(t===`onTestBegin`){this._onTestBegin(n.testId,n.result);return}if(t===`onTestPaused`){this._onTestPaused(n.testId,n.resultId,n.errors);return}if(t===`onTestEnd`){this._onTestEnd(n.test,n.result);return}if(t===`onStepBegin`){this._onStepBegin(n.testId,n.resultId,n.step);return}if(t===`onAttach`){this._onAttach(n.testId,n.resultId,n.attachments);return}if(t===`onStepEnd`){this._onStepEnd(n.testId,n.resultId,n.step);return}if(t===`onError`){this._onError(n.error,n.workerInfo);return}if(t===`onStdIO`){this._onStdIO(n.type,n.testId,n.resultId,n.data,n.isBase64);return}if(t===`onEnd`)return this._onEnd(n.result);if(t===`onExit`)return this._onExit()}_onConfigure(e){this._rootDir=e.rootDir,this._config=this._parseConfig(e),this._reporter.onConfigure?.(this._config)}_onProject(e){let t=this._options.mergeProjects?this._rootSuite.suites.find(t=>t.project().name===e.name):void 0;t||(t=new k(e.name,`project`),this._rootSuite._addSuite(t));let n=this._parseProject(e);t._project=n;let r=-1;this._options.mergeProjects&&(r=this._config.projects.findIndex(t=>t.name===e.name)),r===-1?this._config.projects.push(n):this._config.projects[r]=n;for(let n of e.suites)this._mergeSuiteInto(n,t)}_onBegin(){this._reporter.onBegin?.(this._rootSuite)}_onTestBegin(e,t){let n=this._tests.get(e);this._options.clearPreviousResultsWhenTestBegins&&(n.results=[]);let r=n._createTestResult(t.id);r.retry=t.retry,r.workerIndex=t.workerIndex,r.parallelIndex=t.parallelIndex,r.setStartTimeNumber(t.startTime),this._reporter.onTestBegin?.(n,r)}_onTestPaused(e,t,n){let r=this._tests.get(e),i=r.results.find(e=>e._id===t);i.errors.push(...n),i.error=i.errors[0],this._reporter.onTestPaused?.(r,i)}_onTestEnd(e,t){let n=this._tests.get(e.testId);n.timeout=e.timeout,n.expectedStatus=e.expectedStatus;let r=n.results.find(e=>e._id===t.id);r.duration=t.duration,r.status=t.status,r.errors.push(...t.errors??[]),r.error=r.errors[0],t.attachments&&(r.attachments=this._parseAttachments(t.attachments)),t.annotations&&(this._absoluteAnnotationLocationsInplace(t.annotations),r.annotations=t.annotations,n.annotations=t.annotations),this._reporter.onTestEnd?.(n,r),r._stepMap=new Map}_onStepBegin(e,t,n){let r=this._tests.get(e),i=r.results.find(e=>e._id===t),a=n.parentStepId?i._stepMap.get(n.parentStepId):void 0,o=new ee(n,a,this._absoluteLocation(n.location),i);a?a.steps.push(o):i.steps.push(o),i._stepMap.set(n.id,o),this._reporter.onStepBegin?.(r,i,o)}_onStepEnd(e,t,n){let r=this._tests.get(e),i=r.results.find(e=>e._id===t),a=i._stepMap.get(n.id);a._endPayload=n,a.duration=n.duration,a.error=n.error,this._reporter.onStepEnd?.(r,i,a)}_onAttach(e,t,n){this._tests.get(e).results.find(e=>e._id===t).attachments.push(...n.map(e=>({name:e.name,contentType:e.contentType,path:e.path,body:e.base64&&globalThis.Buffer?Buffer.from(e.base64,`base64`):void 0})))}_onError(e,t){let n;if(t){let e=this._config.projects.find(e=>e.name===t.projectName);e&&(n={workerIndex:t.workerIndex,parallelIndex:t.parallelIndex,config:this._config,project:e})}this._reporter.onError?.(e,n)}_onStdIO(e,t,n,r,i){let a=i?globalThis.Buffer?Buffer.from(r,`base64`):atob(r):r,o=t?this._tests.get(t):void 0,s=o&&n?o.results.find(e=>e._id===n):void 0;e===`stdout`?(s?.stdout.push(a),this._reporter.onStdOut?.(a,o,s)):(s?.stderr.push(a),this._reporter.onStdErr?.(a,o,s))}async _onEnd(e){await this._reporter.onEnd?.(F(e))}_onExit(){return this._reporter.onExit?.()}_parseConfig(e){let t=I(e);return this._options.configOverrides&&(t.configFile=this._options.configOverrides.configFile,t.reportSlowTests=this._options.configOverrides.reportSlowTests,t.quiet=this._options.configOverrides.quiet,t.reporter=[...this._options.configOverrides.reporter]),t}_parseProject(e){return{metadata:e.metadata,name:e.name,outputDir:this._absolutePath(e.outputDir),repeatEach:e.repeatEach,retries:e.retries,testDir:this._absolutePath(e.testDir),testIgnore:N(e.testIgnore),testMatch:N(e.testMatch),timeout:e.timeout,grep:N(e.grep),grepInvert:N(e.grepInvert),dependencies:e.dependencies,teardown:e.teardown,snapshotDir:this._absolutePath(e.snapshotDir),ignoreSnapshots:e.ignoreSnapshots??!1,use:e.use}}_parseAttachments(e){return e.map(e=>({...e,body:e.base64&&globalThis.Buffer?Buffer.from(e.base64,`base64`):void 0}))}_mergeSuiteInto(e,t){let n=t.suites.find(t=>t.title===e.title);n||(n=new k(e.title,t.type===`project`?`file`:`describe`),t._addSuite(n)),n.location=this._absoluteLocation(e.location),e.entries.forEach(e=>{`testId`in e?this._mergeTestInto(e,n):this._mergeSuiteInto(e,n)})}_mergeTestInto(e,t){let n=this._options.mergeTestCases?t.tests.find(t=>t.title===e.title&&t.repeatEachIndex===e.repeatEachIndex):void 0;n||(n=new A(e.testId,e.title,this._absoluteLocation(e.location),e.repeatEachIndex),t._addTest(n),this._tests.set(n.id,n)),this._updateTest(e,n)}_updateTest(e,t){return t.id=e.testId,t.location=this._absoluteLocation(e.location),t.retries=e.retries,t.tags=e.tags??[],t.annotations=e.annotations??[],this._absoluteAnnotationLocationsInplace(t.annotations),t}_absoluteAnnotationLocationsInplace(e){for(let t of e)t.location&&=this._absoluteLocation(t.location)}_absoluteLocation(e){return e&&{...e,file:this._absolutePath(e.file)}}_absolutePath(e){if(e!==void 0)return this._options.resolvePath?this._options.resolvePath(this._rootDir,e):this._rootDir+`/`+e}},k=class{constructor(e,t){this._entries=[],this._requireFile=``,this._parallelMode=`none`,this.title=e,this._type=t}get type(){return this._type}get suites(){return this._entries.filter(e=>e.type!==`test`)}get tests(){return this._entries.filter(e=>e.type===`test`)}entries(){return this._entries}allTests(){let e=[],t=n=>{for(let r of n.entries())r.type===`test`?e.push(r):t(r)};return t(this),e}titlePath(){let e=this.parent?this.parent.titlePath():[];return(this.title||this._type!==`describe`)&&e.push(this.title),e}project(){return this._project??this.parent?.project()}_addTest(e){e.parent=this,this._entries.push(e)}_addSuite(e){e.parent=this,this._entries.push(e)}skip(e){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}fixme(e){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}fail(e){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}exclude(){throw Error(`Disposition methods are not supported on a TeleSuite (read-only).`)}},A=class{constructor(e,t,n,r){this.fn=()=>{},this.results=[],this.type=`test`,this.expectedStatus=`passed`,this.timeout=0,this.annotations=[],this.retries=0,this.tags=[],this.repeatEachIndex=0,this.id=e,this.title=t,this.location=n,this.repeatEachIndex=r}titlePath(){let e=this.parent?this.parent.titlePath():[];return e.push(this.title),e}outcome(){return P(this)}ok(){let e=this.outcome();return e===`expected`||e===`flaky`||e===`skipped`}_createTestResult(e){let t=new j(this.results.length,e);return this.results.push(t),t}skip(e){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}fixme(e){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}fail(e){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}exclude(){throw Error(`Disposition methods are not supported on a TeleTestCase (read-only).`)}},ee=class{constructor(e,t,n,r){this.duration=-1,this.steps=[],this._startTime=0,this.title=e.title,this.subtitle=e.subtitle,this.category=e.category,this.params=e.params,this.location=n,this.parent=t,this._startTime=e.startTime,this._result=r}titlePath(){return[...this.parent?.titlePath()||[],this.title]}get startTime(){return new Date(this._startTime)}set startTime(e){this._startTime=+e}get attachments(){return this._endPayload?.attachments?.map(e=>this._result.attachments[e])??[]}get annotations(){return this._endPayload?.annotations??[]}},j=class{constructor(e,t){this.parallelIndex=-1,this.workerIndex=-1,this.duration=-1,this.stdout=[],this.stderr=[],this.attachments=[],this.annotations=[],this.status=`skipped`,this.steps=[],this.errors=[],this._stepMap=new Map,this._startTime=0,this.retry=e,this._id=t}setStartTimeNumber(e){this._startTime=e}get startTime(){return new Date(this._startTime)}set startTime(e){this._startTime=+e}},M={argv:[],failOnFlakyTests:!1,forbidOnly:!1,fullyParallel:!1,globalSetup:null,globalTeardown:null,globalTimeout:0,grep:/.*/,grepInvert:null,maxFailures:0,metadata:{},preserveOutput:`always`,projects:[],filteredProjects:[],reporter:[[{}.CI?`dot`:`list`]],reportSlowTests:{max:5,threshold:3e5},configFile:``,rootDir:``,quiet:!1,shard:null,tags:[],updateSnapshots:`default`,updateSourceMethod:`patch`,version:``,workers:0,webServer:null};function N(e){return e.map(e=>e.s===void 0?new RegExp(e.r.source,e.r.flags):e.s)}function P(e){let t=0,n=0,r=0,i=0,a=0;for(let o of e.results)o.status===`interrupted`?++i:o.status===`skipped`&&e.expectedStatus===`skipped`?++t:o.status===`skipped`?++n:o.status===e.expectedStatus?++r:++a;return r===0&&a===0?`skipped`:a===0?`expected`:r===0&&t===0?`unexpected`:`flaky`}function F(e){return{status:e.status,startTime:new Date(e.startTime),duration:e.duration}}function I(e){return{...M,...e}}var te=class{constructor(e,t,n,r,i,a){this._treeItemById=new Map,this._treeItemByTestId=new Map;let o=r&&[...r.values()].some(Boolean);this.pathSeparator=i,this.rootItem={kind:`group`,subKind:`folder`,id:e,title:``,location:{file:``,line:0,column:0},duration:0,parent:void 0,children:[],status:`none`,hasLoadErrors:!1},this._treeItemById.set(e,this.rootItem);let s=(e,t,n,r)=>{for(let i of r===`tests`?[]:t.suites){if(!i.title){s(e,i,n,`all`);continue}let r=n.children.find(e=>e.kind===`group`&&e.title===i.title);r||(r={kind:`group`,subKind:`describe`,id:`suite:`+t.titlePath().join(``)+``+i.title,title:i.title,location:i.location,duration:0,parent:n,children:[],status:`none`,hasLoadErrors:!1},this._addChild(n,r)),s(e,i,r,`all`)}for(let i of r===`suites`?[]:t.tests){let t=i.title,r=n.children.find(e=>e.kind!==`group`&&e.title===t);r||(r={kind:`case`,id:`test:`+i.titlePath().join(``),title:t,parent:n,children:[],tests:[],location:i.location,duration:0,status:`none`,project:void 0,test:void 0,tags:i.tags},this._addChild(n,r));let a=i.results[0],o=`none`;a?.[R]===`scheduled`?o=`scheduled`:a?.[R]===`running`?o=`running`:a?.status===`skipped`?o=`skipped`:a?.status===`interrupted`?o=`none`:a&&i.outcome()!==`expected`?o=`failed`:a&&i.outcome()===`expected`&&(o=`passed`),r.tests.push(i);let s={kind:`test`,id:i.id,title:e.name,location:i.location,test:i,parent:r,children:[],status:o,duration:i.results.length?Math.max(0,i.results[0].duration):0,project:e};this._addChild(r,s),this._treeItemByTestId.set(i.id,s),r.duration=r.children.reduce((e,t)=>e+t.duration,0)}};for(let e of t?.suites||[])if(!(o&&!r.get(e.title)))for(let t of e.suites)if(a){if(s(e.project(),t,this.rootItem,`suites`),t.tests.length){let n=this._defaultDescribeItem();s(e.project(),t,n,`tests`)}}else{let n=this._fileItem(t.location.file.split(i),!0);s(e.project(),t,n,`all`)}for(let e of n){if(!e.location)continue;let t=this._fileItem(e.location.file.split(i),!0);t.hasLoadErrors=!0}}_addChild(e,t){e.children.push(t),t.parent=e,this._treeItemById.set(t.id,t)}filterTree(e,t,n){let r=e.trim().toLowerCase().split(` `),i=[...t.values()].some(Boolean),a=e=>{let a=[...e.tests[0].titlePath(),...e.tests[0].tags].join(` `).toLowerCase();return!r.every(e=>a.includes(e))&&!e.tests.some(e=>n?.has(e.id))?!1:(e.children=e.children.filter(e=>!i||n?.has(e.test.id)||t.get(e.status)),e.tests=e.children.map(e=>e.test),!!e.children.length)},o=e=>{let t=[];for(let n of e.children)n.kind===`case`?a(n)&&t.push(n):(o(n),(n.children.length||n.hasLoadErrors)&&t.push(n));e.children=t};o(this.rootItem)}_fileItem(e,t){if(e.length===0)return this.rootItem;let n=e.join(this.pathSeparator),r=this._treeItemById.get(n);if(r)return r;let i=this._fileItem(e.slice(0,e.length-1),!1),a={kind:`group`,subKind:t?`file`:`folder`,id:n,title:e[e.length-1],location:{file:n,line:0,column:0},duration:0,parent:i,children:[],status:`none`,hasLoadErrors:!1};return this._addChild(i,a),a}_defaultDescribeItem(){let e=this._treeItemById.get(`<anonymous>`);return e||(e={kind:`group`,subKind:`describe`,id:`<anonymous>`,title:`<anonymous>`,location:{file:``,line:0,column:0},duration:0,parent:this.rootItem,children:[],status:`none`,hasLoadErrors:!1},this._addChild(this.rootItem,e)),e}sortAndPropagateStatus(){L(this.rootItem)}flattenForSingleProject(){let e=t=>{t.kind===`case`&&t.children.length===1?(t.project=t.children[0].project,t.test=t.children[0].test,t.children=[],this._treeItemByTestId.set(t.test.id,t)):t.children.forEach(e)};e(this.rootItem)}shortenRoot(){let e=this.rootItem;for(;e.children.length===1&&e.children[0].kind===`group`&&e.children[0].subKind===`folder`;)e=e.children[0];e.location=this.rootItem.location,this.rootItem=e}fileNames(){let e=new Set,t=n=>{n.kind===`group`&&n.subKind===`file`?e.add(n.id):n.children.forEach(t)};return t(this.rootItem),[...e]}flatTreeItems(){let e=[],t=n=>{e.push(n),n.children.forEach(t)};return t(this.rootItem),e}treeItemById(e){return this._treeItemById.get(e)}collectTestIds(e){return ne(e)}};function L(e){for(let t of e.children)L(t);e.kind===`group`&&e.children.sort((e,t)=>e.location.file.localeCompare(t.location.file)||e.location.line-t.location.line);let t=e.children.length>0,n=e.children.length>0,r=!1,i=!1,a=!1;for(let o of e.children)n&&=o.status===`skipped`,t&&=o.status===`passed`||o.status===`skipped`,r||=o.status===`failed`,i||=o.status===`running`,a||=o.status===`scheduled`;i?e.status=`running`:a?e.status=`scheduled`:r?e.status=`failed`:n?e.status=`skipped`:t&&(e.status=`passed`)}function ne(e){let t=new Set,n=new Set,r=e=>{if(e.kind!==`test`&&e.kind!==`case`){e.children.forEach(r);return}let i=e;for(;i&&i.parent&&!(i.kind===`group`&&i.subKind===`file`);)i=i.parent;n.add(i.location.file),e.kind===`case`?e.tests.forEach(e=>t.add(e.id)):t.add(e.id)};return r(e),{testIds:t,locations:n}}var R=Symbol(`statusEx`),re=class{constructor(e){this.loadErrors=[],this.progress={total:0,passed:0,failed:0,skipped:0},this._lastRunTestCount=0,this._receiver=new O(this._createReporter(),{mergeProjects:!0,mergeTestCases:!0,resolvePath:ie(e.pathSeparator),clearPreviousResultsWhenTestBegins:!0}),this._options=e}_createReporter(){return{version:()=>`v2`,onConfigure:e=>{this.config=e,this._lastRunReceiver=new O({version:()=>`v2`,onBegin:e=>{this._lastRunTestCount=e.allTests().length,this._lastRunReceiver=void 0}},{mergeProjects:!0,mergeTestCases:!1,resolvePath:ie(this._options.pathSeparator)}),this._lastRunReceiver.dispatch({method:`onConfigure`,params:{config:e}})},onBegin:e=>{if(this.rootSuite||=e,this._testResultsSnapshot){for(let e of this.rootSuite.allTests())e.results=this._testResultsSnapshot?.get(e.id)||e.results;this._testResultsSnapshot=void 0}this.progress.total=this._lastRunTestCount,this.progress.passed=0,this.progress.failed=0,this.progress.skipped=0,this._options.onUpdate(!0)},onEnd:()=>{this._options.onUpdate(!0)},onTestBegin:(e,t)=>{t[R]=`running`,this._options.onUpdate()},onTestEnd:(e,t)=>{e.outcome()===`skipped`?++this.progress.skipped:e.outcome()===`unexpected`?++this.progress.failed:++this.progress.passed,t[R]=t.status,this._options.onUpdate()},onError:e=>this._handleOnError(e),printsToStdio:()=>!1}}processGlobalReport(e){let t=new O({version:()=>`v2`,onConfigure:e=>{this.config=e},onError:e=>this._handleOnError(e)});for(let n of e)t.dispatch(n)}processListReport(e){let t=this.rootSuite?.allTests()||[];this._testResultsSnapshot=new Map(t.map(e=>[e.id,e.results])),this._receiver.reset();for(let t of e)this._receiver.dispatch(t)}processTestReportEvent(e){this._lastRunReceiver?.dispatch(e)?.catch(()=>{}),this._receiver.dispatch(e)?.catch(()=>{})}_handleOnError(e){this.loadErrors.push(e),this._options.onError?.(e),this._options.onUpdate()}asModel(){return{rootSuite:this.rootSuite||new k(``,`root`),config:this.config,loadErrors:this.loadErrors,progress:this.progress}}};function ie(e){return(t,n)=>{let r=[];for(let i of[...t.split(e),...n.split(e)]){let t=e===`\\`&&r.length===1&&r[0].endsWith(`:`),n=!r.length;if(!(!i&&!n&&!t)&&i!==`.`){if(i===`..`){r.pop();continue}r.push(i)}}return r.join(e)}}var z=d(),ae=({source:e})=>{let[t,n]=i(),[a,o]=E.useState(w()),[s]=E.useState(x(()=>import(`./assets/xtermModule-B794rD2Z.js`).then(e=>e.default),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),c=E.useRef(null);return E.useEffect(()=>(T(o),()=>r(o)),[]),E.useEffect(()=>{let t=e.write,r=e.clear;return(async()=>{let{Terminal:t,FitAddon:r}=await s,i=n.current;if(!i)return;let o=a===`dark-mode`?se:oe;if(c.current&&c.current.terminal.options.theme===o)return;c.current&&(i.textContent=``);let l=new t({convertEol:!0,fontSize:13,scrollback:1e4,fontFamily:`monospace`,theme:o}),u=new r;l.loadAddon(u);for(let t of e.pending)l.write(t);e.write=(t=>{e.pending.push(t),l.write(t)}),e.clear=()=>{e.pending=[],l.clear()},l.open(i),u.fit(),c.current={terminal:l,fitAddon:u}})(),()=>{e.clear=r,e.write=t}},[s,c,n,e,a]),E.useEffect(()=>{setTimeout(()=>{c.current&&(c.current.fitAddon.fit(),e.resize(c.current.terminal.cols,c.current.terminal.rows))},250)},[t,e]),(0,z.jsx)(`div`,{"data-testid":`output`,className:`xterm-wrapper`,style:{flex:`auto`},ref:n})},oe={foreground:`#383a42`,background:`#fafafa`,cursor:`#383a42`,black:`#000000`,red:`#e45649`,green:`#50a14f`,yellow:`#c18401`,blue:`#4078f2`,magenta:`#a626a4`,cyan:`#0184bc`,white:`#a0a0a0`,brightBlack:`#000000`,brightRed:`#e06c75`,brightGreen:`#98c379`,brightYellow:`#d19a66`,brightBlue:`#4078f2`,brightMagenta:`#a626a4`,brightCyan:`#0184bc`,brightWhite:`#383a42`,selectionBackground:`#d7d7d7`,selectionForeground:`#383a42`},se={foreground:`#f8f8f2`,background:`#1e1e1e`,cursor:`#f8f8f0`,black:`#000000`,red:`#ff5555`,green:`#50fa7b`,yellow:`#f1fa8c`,blue:`#bd93f9`,magenta:`#ff79c6`,cyan:`#8be9fd`,white:`#bfbfbf`,brightBlack:`#4d4d4d`,brightRed:`#ff6e6e`,brightGreen:`#69ff94`,brightYellow:`#ffffa5`,brightBlue:`#d6acff`,brightMagenta:`#ff92df`,brightCyan:`#a4ffff`,brightWhite:`#e6e6e6`,selectionBackground:`#44475a`,selectionForeground:`#f8f8f2`},ce=({filterText:e,setFilterText:t,statusFilters:n,setStatusFilters:r,projectFilters:i,setProjectFilters:a,onlyChanged:o,setOnlyChanged:s,testModel:c,runTests:l})=>{let[u,d]=E.useState(!1),f=E.useRef(null);E.useEffect(()=>{f.current?.focus()},[]);let p=[...n.entries()].filter(([e,t])=>t).map(([e])=>e).join(` `)||`all`,m=[...i.entries()].filter(([e,t])=>t).map(([e])=>e).join(` `)||`all`;return(0,z.jsxs)(`div`,{className:`filters`,children:[(0,z.jsx)(h,{expanded:u,setExpanded:d,title:(0,z.jsx)(`input`,{ref:f,type:`search`,placeholder:`Filter (e.g. text, @tag)`,"aria-label":`Filter (e.g. text, @tag)`,spellCheck:!1,value:e,onChange:e=>{t(e.target.value)},onKeyDown:e=>{e.key===`Enter`&&l()}})}),(0,z.jsxs)(`button`,{className:`filter-summary`,"aria-expanded":u,title:`Status: `+p+`
|
|
3
|
+
Projects: `+m+(o?`
|
|
4
|
+
Only changed`:``),onClick:()=>d(!u),children:[(0,z.jsx)(`span`,{className:`filter-label`,children:`Status:`}),` `,p,(0,z.jsx)(`span`,{className:`filter-label`,children:`Projects:`}),` `,m,o&&(0,z.jsx)(z.Fragment,{children:(0,z.jsx)(`span`,{className:`filter-label`,children:`Only changed`})})]}),u&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`hbox`,style:{marginLeft:14,maxHeight:200,overflowY:`auto`},children:[(0,z.jsx)(`div`,{className:`filter-list`,role:`list`,"data-testid":`status-filters`,children:[...n.entries()].map(([e,t])=>(0,z.jsx)(`div`,{className:`filter-entry`,role:`listitem`,children:(0,z.jsxs)(`label`,{children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>{let t=new Map(n);t.set(e,!t.get(e)),r(t)}}),(0,z.jsx)(`div`,{children:e})]})},e))}),(0,z.jsx)(`div`,{className:`filter-list`,role:`list`,"data-testid":`project-filters`,children:[...i.entries()].map(([e,t])=>(0,z.jsx)(`div`,{className:`filter-entry`,role:`listitem`,children:(0,z.jsxs)(`label`,{children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>{let t=new Map(i);t.set(e,!t.get(e)),a(t);let n=c?.config?.configFile;n&&C.setObject(n+`:projects`,[...t.entries()].filter(([e,t])=>t).map(([e])=>e))}}),(0,z.jsx)(`div`,{children:e||`untitled`})]})},e))})]}),(0,z.jsx)(`div`,{className:`filter-entry`,style:{marginLeft:24},children:(0,z.jsxs)(`label`,{children:[(0,z.jsx)(`input`,{type:`checkbox`,checked:o,onChange:()=>s(!o)}),(0,z.jsx)(`div`,{children:`Show only changed files`})]})})]})]})},le=({tag:t,style:n,onClick:r})=>(0,z.jsx)(`span`,{className:e(`tag`,`tag-color-${ue(t)}`),onClick:r,style:{margin:`6px 0 0 6px`,...n},title:`Click to filter by tag: ${t}`,children:t});function ue(e){let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<8)-t);return Math.abs(t%6)}var de=v,fe=({filterText:e,testModel:t,testServerConnection:n,testTree:r,runTests:i,runningState:a,watchAll:o,watchedTreeIds:s,setWatchedTreeIds:d,isLoading:f,onItemSelected:p,requestedCollapseAllCount:m,requestedExpandAllCount:h,setFilterText:_,onRevealSource:v})=>{let[y,b]=E.useState({expandedItems:new Map}),[x,S]=E.useState(),[C,w]=E.useState(m),[T,D]=E.useState(h);E.useEffect(()=>{if(C!==m){y.expandedItems.clear();for(let e of r.flatTreeItems())y.expandedItems.set(e.id,!1);w(m),S(void 0),b({...y});return}if(T!==h){y.expandedItems.clear();for(let e of r.flatTreeItems())y.expandedItems.set(e.id,!0);D(h),S(void 0),b({...y});return}if(!a||a.itemSelectedByUser)return;let e,t=n=>{n.children.forEach(t),!e&&n.status===`failed`&&(n.kind===`test`&&a.testIds.has(n.test.id)||n.kind===`case`&&a.testIds.has(n.tests[0]?.id))&&(e=n)};t(r.rootItem),e&&S(e.id)},[a,S,r,C,w,m,T,D,h,y,b]);let O=E.useMemo(()=>{if(x)return r.treeItemById(x)},[x,r]);E.useEffect(()=>{if(!t)return;let e=pe(O,t),n;O?.kind===`test`?n=O.test:O?.kind===`case`&&O.tests.length===1&&(n=O.tests[0]),p({treeItem:O,testCase:n,testFile:e})},[t,O,p]),E.useEffect(()=>{if(!f)if(o)n?.watchNoReply({fileNames:r.fileNames()});else{let e=new Set;for(let t of s.value){let n=r.treeItemById(t)?.location.file;n&&e.add(n)}n?.watchNoReply({fileNames:[...e]})}},[f,r,o,s,n]);let k=e=>{S(e.id),i(`bounce-if-busy`,r.collectTestIds(e))},A=(t,n)=>{if(t.preventDefault(),t.stopPropagation(),t.metaKey||t.ctrlKey){let t=e.split(` `);t.includes(n)?_(t.filter(e=>e!==n).join(` `).trim()):_((e+` `+n).trim())}else _((e.split(` `).filter(e=>!e.startsWith(`@`)).join(` `)+` `+n).trim())};return(0,z.jsx)(de,{name:`tests`,treeState:y,setTreeState:b,rootItem:r.rootItem,dataTestId:`test-tree`,render:e=>{let t=e.id.replace(/[^\w\d-_]/g,`-`),n=t+`-label`,r=t+`-time`;return(0,z.jsxs)(`div`,{className:`hbox ui-mode-tree-item`,"aria-labelledby":`${n} ${r}`,children:[(0,z.jsxs)(`div`,{id:n,className:`ui-mode-tree-item-title`,children:[(0,z.jsx)(`span`,{children:e.title}),e.kind===`case`?e.tags.map(e=>(0,z.jsx)(le,{tag:e.slice(1),onClick:t=>A(t,e)},e)):null]}),!!e.duration&&e.status!==`skipped`&&(0,z.jsx)(`div`,{id:r,className:`ui-mode-tree-item-time`,children:g(e.duration)}),(0,z.jsxs)(c,{noMinHeight:!0,noShadow:!0,children:[(0,z.jsx)(u,{icon:`play`,title:`Run`,onClick:()=>k(e),disabled:!!a&&!a.completed}),(0,z.jsx)(u,{icon:`go-to-file`,title:`Show source`,onClick:v,style:e.kind===`group`&&e.subKind===`folder`?{visibility:`hidden`}:{}}),!o&&(0,z.jsx)(u,{icon:`eye`,title:`Watch`,onClick:()=>{s.value.has(e.id)?s.value.delete(e.id):s.value.add(e.id),d({...s})},toggled:s.value.has(e.id)})]})]})},icon:e=>l(e.status),title:e=>e.title,selectedItem:O,onAccepted:k,onSelected:e=>{a&&(a.itemSelectedByUser=!0),S(e.id)},isError:e=>e.kind===`group`?e.hasLoadErrors:!1,autoExpandDepth:e?5:1,noItemsMessage:f?`Loading…`:`No tests`})};function pe(e,t){if(!(!e||!t))return{file:e.location.file,line:e.location.line,column:e.location.column,source:{errors:t.loadErrors.filter(t=>t.location?.file===e.location.file).map(e=>({line:e.location.line,message:e.message})),content:void 0}}}function B(e){return`.playwright-artifacts-${e}`}var me=({item:e,rootDir:t,onOpenExternally:n,revealSource:r,pathSeparator:i,onModelChange:o})=>{let[s,c]=E.useState(void 0),[l,u]=E.useState(0),d=E.useRef(null),{outputDir:f}=E.useMemo(()=>({outputDir:e.testCase?he(e.testCase):void 0}),[e]);return E.useEffect(()=>{d.current&&clearTimeout(d.current);let t=e.testCase?.results[0];if(!t||e.treeItem?.status===`scheduled`){c(void 0);return}let n=t&&t.duration>=0&&t.attachments.find(e=>e.name===`trace`);if(n&&n.path){V(n.path,t.startTime.getTime()).then(e=>c({model:e,isLive:!1}));return}if(!f){c(void 0);return}let r=[f,B(t.workerIndex),`traces`,`${e.testCase?.id}.json`].join(i);return d.current=setTimeout(async()=>{try{c({model:await V(r,Date.now()),isLive:!0})}catch{let e=new a(``,[]);e.errorDescriptors.push(...t.errors.flatMap(e=>e.message?[{message:e.message}]:[])),c({model:e,isLive:!1})}finally{u(l+1)}},500),()=>{d.current&&clearTimeout(d.current)}},[f,e,c,l,u,i]),E.useEffect(()=>{o?.(s?.model)},[s,o]),(0,z.jsx)(p,{model:s?.model,showSourcesFirst:!0,rootDir:t,fallbackLocation:e.testFile,isLive:s?.isLive,status:e.treeItem?.status,defaultAnnotations:e.testCase?.annotations??[],onOpenExternally:n,revealSource:r},`workbench`)},he=e=>{for(let t=e.parent;t;t=t.parent)if(t.project())return t.project()?.outputDir};async function V(e,t){let n=`file?path=${encodeURIComponent(e)}×tamp=${t}`,r=new URLSearchParams;return r.set(`trace`,n),new a(n,await(await fetch(`contexts?${r.toString()}`)).json())}var ge={cols:80,rows:24},H={pending:[],clear:()=>{},write:e=>H.pending.push(e),resize:()=>{}},U=new URLSearchParams(window.location.search),W=new URL(U.get(`server`)??`../`,window.location.href),_e=new URL(U.get(`ws`),W);_e.protocol=_e.protocol===`https:`?`wss:`:`ws:`;var G={args:U.getAll(`arg`),grep:U.get(`grep`)||void 0,grepInvert:U.get(`grepInvert`)||void 0,projects:U.getAll(`project`),workers:U.get(`workers`)||void 0,headed:U.has(`headed`),updateSnapshots:U.get(`updateSnapshots`)||void 0,reporters:U.has(`reporter`)?U.getAll(`reporter`):void 0,pathSeparator:U.get(`pathSeparator`)||`/`};G.updateSnapshots&&![`all`,`changed`,`none`,`missing`,`default`].includes(G.updateSnapshots)&&(G.updateSnapshots=void 0);var ve=navigator.platform===`MacIntel`;function ye(e){return e.startsWith(`/`)&&(e=e.substring(1)),e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function be(e,t,n){let r=e.passed+e.failed+e.skipped,i=t?r/t*100|0:0,a=[];return e.passed>0&&a.push(`${e.passed} passed`),e.failed>0&&a.push((0,z.jsxs)(`span`,{className:`status-line-failed`,children:[e.failed,` failed`]},`failed`)),e.skipped>0&&a.push(`${e.skipped} skipped`),(0,z.jsx)(`div`,{"data-testid":`status-line`,className:`status-line`,children:(0,z.jsxs)(`div`,{children:[n&&`Running `,r,`/`,t,` (`,i,`%)`,a.length>0&&` — `,a.map((e,t)=>(0,z.jsxs)(E.Fragment,{children:[t>0?`, `:``,e]},t))]})})}var xe=({})=>{let[t,r]=E.useState(``),[i,a]=E.useState(!1),[s,l]=E.useState(!1),[d,p]=E.useState(new Map([[`passed`,!1],[`failed`,!1],[`skipped`,!1]])),[m,h]=E.useState(new Map),[g,v]=E.useState(),[x,S]=E.useState(),[w,T]=E.useState({}),[D,O]=E.useState(!1),[A,ee]=E.useState(),j=A&&!A.completed,[M,N]=n(`watch-all`,!1),[P,F]=E.useState({value:new Set}),I=E.useRef(Promise.resolve()),L=E.useRef({testIds:new Set,locations:new Set}),[ne,ie]=E.useState(0),[oe,se]=E.useState(0),[le,ue]=E.useState(!1),[de,pe]=E.useState(!0),[B,he]=E.useState(),[V,U]=E.useState(),[W,xe]=E.useState(!1),[K,Se]=E.useState(!1),[Ce,we]=E.useState(!1),[Te,Ee]=E.useState(),De=E.useCallback(()=>we(!0),[we]),[Oe,ke]=n(`single-worker`,!1),[q,Ae]=n(`updateSnapshots`,`default`),[J,je]=n(`only-changed`,!1),[Me,Ne]=n(`stop-on-failure`,!1),[Y]=n(`mergeFiles`,!1),Pe=E.useRef(null),X=E.useCallback(()=>{he(e=>(e?.close(),new _(new y(_e))))},[]);E.useEffect(()=>{Pe.current?.focus(),O(!0),X()},[X]),E.useEffect(()=>{if(!B)return;let e=[B.onStdio(e=>{if(e.buffer){let t=atob(e.buffer);H.write(t)}else H.write(e.text);e.type===`stderr`&&l(!0)}),B.onClose(()=>ue(!0))];return H.resize=(e,t)=>{ge={cols:e,rows:t},B.resizeTerminalNoReply({cols:e,rows:t})},()=>{for(let t of e)t.dispose()}},[B]),E.useEffect(()=>{if(!B)return;let e,t=new re({onUpdate:n=>{clearTimeout(e),e=void 0,n?v(t.asModel()):e||=setTimeout(()=>{v(t.asModel())},250)},onError:e=>{H.write((e.stack||e.value||``)+`
|
|
5
|
+
`),l(!0)},pathSeparator:G.pathSeparator});return U(t),v(void 0),O(!0),F({value:new Set}),(async()=>{try{await B.initialize({interceptStdio:!0,watchTestDirs:!0});let{status:e,report:n}=await B.runGlobalSetup({});if(t.processGlobalReport(n),e!==`passed`)return;let r=await B.listTests({projects:G.projects,locations:G.args,grep:G.grep,grepInvert:G.grepInvert,onlyChanged:J});t.processListReport(r.report),B.onReport(e=>{t.processTestReportEvent(e)});let{hasBrowsers:i}=await B.checkBrowsers({});pe(i)}finally{O(!1)}})(),()=>{clearTimeout(e)}},[J,B]),E.useEffect(()=>{if(!g)return;let{config:e,rootSuite:t}=g,n=e.configFile?C.getObject(e.configFile+`:projects`,void 0):void 0,r=new Map(m);for(let e of r.keys())t.suites.find(t=>t.title===e)||r.delete(e);for(let e of t.suites)r.has(e.title)||r.set(e.title,!!n?.includes(e.title));!n&&r.size&&![...r.values()].includes(!0)&&r.set(r.entries().next().value[0],!0),(m.size!==r.size||[...m].some(([e,t])=>r.get(e)!==t))&&h(r)},[m,g]),E.useEffect(()=>{j&&g?.progress?S(g.progress):g||S(void 0)},[g,j]);let{testTree:Z}=E.useMemo(()=>{if(!g)return{testTree:new te(``,new k(``,`root`),[],m,G.pathSeparator,Y)};let e=new te(``,g.rootSuite,g.loadErrors,m,G.pathSeparator,Y);return e.filterTree(t,d,j?A?.testIds:void 0),e.sortAndPropagateStatus(),e.shortenRoot(),e.flattenForSingleProject(),{testTree:e}},[t,g,d,m,A,j,Y]),Q=E.useCallback((e,t)=>{if(!(!B||!g)&&!(e===`bounce-if-busy`&&j)){for(let e of t.testIds)L.current.testIds.add(e);for(let e of t.locations)L.current.locations.add(e);I.current=I.current.then(async()=>{let{testIds:e,locations:t}=L.current;if(L.current={testIds:new Set,locations:new Set},!e.size)return;for(let t of g.rootSuite?.allTests()||[])if(e.has(t.id)){t.results=[];let e=t._createTestResult(`pending`);e[R]=`scheduled`}v({...g});let n=` [`+new Date().toLocaleTimeString()+`]`;H.write(`\x1B[2m—`.repeat(Math.max(0,ge.cols-n.length))+n+`\x1B[22m`),S({total:0,passed:0,failed:0,skipped:0}),ee({testIds:e}),await B.runTests({locations:[...t].map(ye),grep:G.grep,grepInvert:G.grepInvert,testIds:[...e],projects:[...m].filter(([e,t])=>t).map(([e])=>e),updateSnapshots:q,reporters:G.reporters,workers:Oe?1:void 0,maxFailures:Me?1:void 0,trace:`on`});for(let e of g.rootSuite?.allTests()||[])e.results[0]?.duration===-1&&(e.results=[]);v({...g}),ee(e=>e?{...e,completed:!0}:void 0)})}},[m,j,g,B,q,Oe,Me]),$=E.useCallback(()=>Q(`bounce-if-busy`,Z.collectTestIds(Z.rootItem)),[Q,Z]);E.useEffect(()=>{if(!B||!V)return;let e=B.onTestFilesChanged(async e=>{if(I.current=I.current.then(async()=>{O(!0);try{let e=await B.listTests({projects:G.projects,locations:G.args,grep:G.grep,grepInvert:G.grepInvert,onlyChanged:J});V.processListReport(e.report)}catch(e){console.log(e)}finally{O(!1)}}),await I.current,e.testFiles.length===0)return;let t=V.asModel(),n=new te(``,t.rootSuite,t.loadErrors,m,G.pathSeparator,Y),r=[],i=[],a=new Set(e.testFiles);if(M){let e=t=>{let o=t.location.file;if(o&&a.has(o)){let e=n.collectTestIds(t);r.push(...e.locations),i.push(...e.testIds)}t.kind===`group`&&t.subKind===`folder`&&t.children.forEach(e)};e(n.rootItem)}else for(let e of P.value){let t=n.treeItemById(e);if(!t)continue;let o=t;for(;!(o.kind===`group`&&(o.subKind===`file`||o.subKind===`folder`))&&o.parent;)o=o.parent;let s=o?.location.file;if(s&&a.has(s)){let e=n.collectTestIds(t);r.push(...e.locations),i.push(...e.testIds)}}Q(`queue-if-busy`,{locations:r,testIds:i})});return()=>e.dispose()},[Q,B,M,P,V,m,Y,J]),E.useEffect(()=>{if(!B)return;let e=e=>{e.code===`Backquote`&&e.ctrlKey?(e.preventDefault(),a(!i)):e.code===`F5`&&e.shiftKey?(e.preventDefault(),B?.stopTestsNoReply({})):e.code===`F5`&&(e.preventDefault(),$())};return addEventListener(`keydown`,e),()=>{removeEventListener(`keydown`,e)}},[$,X,B,i]);let Fe=E.useRef(null),Ie=E.useCallback(e=>{e.preventDefault(),e.stopPropagation(),Fe.current?.showModal()},[]),Le=E.useCallback(e=>{e.preventDefault(),e.stopPropagation(),Fe.current?.close()},[]),Re=E.useCallback(e=>{Le(e),a(!0),B?.installBrowsers({}).then(async()=>{a(!1);let{hasBrowsers:e}=await B?.checkBrowsers({});pe(e)})},[Le,B]);return(0,z.jsxs)(`div`,{className:`vbox ui-mode`,children:[!de&&(0,z.jsxs)(`dialog`,{ref:Fe,children:[(0,z.jsxs)(`div`,{className:`title`,children:[(0,z.jsx)(`span`,{className:`codicon codicon-lightbulb`}),`Install browsers`]}),(0,z.jsxs)(`div`,{className:`body`,children:[`Playwright did not find installed browsers.`,(0,z.jsx)(`br`,{}),"Would you like to run `playwright install`?",(0,z.jsx)(`br`,{}),(0,z.jsx)(`button`,{className:`button`,onClick:Re,children:`Install`}),(0,z.jsx)(`button`,{className:`button secondary`,onClick:Le,children:`Dismiss`})]})]}),le&&(0,z.jsxs)(`div`,{className:`disconnected`,children:[(0,z.jsx)(`div`,{className:`title`,children:`UI Mode disconnected`}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`a`,{href:`#`,onClick:()=>window.location.href=`/`,children:`Reload the page`}),` to reconnect`]})]}),(0,z.jsx)(f,{sidebarSize:250,minSidebarSize:150,orientation:`horizontal`,sidebarIsFirst:!0,settingName:`testListSidebar`,main:(0,z.jsxs)(`div`,{className:`vbox`,children:[(0,z.jsxs)(`div`,{className:e(`vbox`,!i&&`hidden`),children:[(0,z.jsxs)(c,{children:[(0,z.jsx)(`div`,{className:`section-title`,style:{flex:`none`},children:`Output`}),(0,z.jsx)(u,{icon:`circle-slash`,title:`Clear output`,onClick:()=>{H.clear(),l(!1)}}),(0,z.jsx)(`div`,{className:`spacer`}),(0,z.jsx)(u,{icon:`close`,title:`Close`,onClick:()=>a(!1)})]}),(0,z.jsx)(ae,{source:H})]}),(0,z.jsx)(`div`,{className:e(`vbox`,i&&`hidden`),children:(0,z.jsx)(me,{pathSeparator:G.pathSeparator,item:w,onModelChange:Ee,rootDir:g?.config?.rootDir,revealSource:Ce,onOpenExternally:e=>B?.openNoReply({location:{file:e.file,line:e.line,column:e.column}})})})]}),sidebar:(0,z.jsxs)(`div`,{className:`vbox ui-mode-sidebar`,children:[(0,z.jsxs)(c,{noShadow:!0,noMinHeight:!0,children:[(0,z.jsx)(`img`,{src:`playwright-logo.svg`,alt:`Playwright logo`}),(0,z.jsx)(`div`,{className:`section-title`,children:`Playwright`}),(0,z.jsx)(u,{icon:`refresh`,title:`Reload`,onClick:()=>X(),disabled:j||D}),(0,z.jsx)(`div`,{style:{position:`relative`},children:(0,z.jsx)(u,{icon:`terminal`,title:`Toggle output — `+(ve?"⌃`":"Ctrl + `"),toggled:i,errorBadge:s?`Output contains error`:void 0,onClick:()=>{a(!i)}})}),!de&&(0,z.jsx)(u,{icon:`lightbulb-autofix`,style:{color:`var(--vscode-list-warningForeground)`},title:`Playwright browsers are missing`,onClick:Ie})]}),(0,z.jsx)(ce,{filterText:t,setFilterText:r,statusFilters:d,setStatusFilters:p,projectFilters:m,setProjectFilters:h,onlyChanged:J,setOnlyChanged:je,testModel:g,runTests:$}),(0,z.jsxs)(c,{className:`section-toolbar`,noMinHeight:!0,children:[!j&&!x&&(0,z.jsx)(`div`,{className:`section-title`,children:`Tests`}),x&&be(x,j?A.testIds.size:x.total,!!j),(0,z.jsx)(u,{icon:`play`,title:`Run all — F5`,onClick:$,disabled:j||D}),(0,z.jsx)(u,{icon:`debug-stop`,title:`Stop — `+(ve?`⇧F5`:`Shift + F5`),onClick:()=>B?.stopTests({}),disabled:!j||D,testId:`stop-button`}),(0,z.jsx)(u,{icon:`eye`,title:`Watch all`,toggled:M,onClick:()=>{F({value:new Set}),N(!M)}}),(0,z.jsx)(u,{icon:`collapse-all`,title:`Collapse all`,onClick:()=>{ie(ne+1)}}),(0,z.jsx)(u,{icon:`expand-all`,title:`Expand all`,onClick:()=>{se(oe+1)}})]}),(0,z.jsx)(fe,{filterText:t,testModel:g,testTree:Z,testServerConnection:B,runningState:A,runTests:Q,onItemSelected:T,watchAll:M,watchedTreeIds:P,setWatchedTreeIds:F,isLoading:D,requestedCollapseAllCount:ne,requestedExpandAllCount:oe,setFilterText:r,onRevealSource:De}),(0,z.jsxs)(c,{noShadow:!0,noMinHeight:!0,className:`settings-toolbar`,onClick:()=>Se(!K),children:[(0,z.jsx)(`span`,{className:`codicon codicon-${K?`chevron-down`:`chevron-right`}`,style:{marginLeft:5},title:K?`Hide Testing Options`:`Show Testing Options`}),(0,z.jsx)(`div`,{className:`section-title`,children:`Testing Options`})]}),K&&(0,z.jsx)(o,{settings:[{type:`check`,value:Oe,set:ke,name:`Single worker`},{type:`check`,value:Me,set:Ne,name:`Stop on first failure`},{type:`select`,options:[{label:`Default`,value:`default`},{label:`All`,value:`all`},{label:`Changed`,value:`changed`},{label:`Missing`,value:`missing`},{label:`None`,value:`none`}],value:q,set:Ae,name:`Update snapshots`}]}),(0,z.jsxs)(c,{noShadow:!0,noMinHeight:!0,className:`settings-toolbar`,onClick:()=>xe(!W),children:[(0,z.jsx)(`span`,{className:`codicon codicon-${W?`chevron-down`:`chevron-right`}`,style:{marginLeft:5},title:W?`Hide Settings`:`Show Settings`}),(0,z.jsx)(`div`,{className:`section-title`,children:`Settings`})]}),W&&(0,z.jsx)(b,{location:`ui-mode`,model:Te})]})})]})};(async()=>{if(s(),window.location.protocol!==`file:`){if(!navigator.serviceWorker)throw Error(`Service workers are not supported.\nMake sure to serve the website (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register(`sw.bundle.js`),navigator.serviceWorker.controller||await new Promise(e=>{navigator.serviceWorker.oncontrollerchange=()=>e()}),setInterval(function(){fetch(`ping`)},1e4)}D.createRoot(document.querySelector(`#root`)).render((0,z.jsx)(xe,{}))})();
|