@skyramp/mcp 0.4.1 → 0.4.2-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/commands/localDevTestChangesCommand.js +2 -1
- package/build/commands/recommendTestsAndExecuteCommand.js +15 -7
- package/build/commands/testThisEndpointCommand.js +35 -6
- package/build/execution/wrapperConfig.d.ts +56 -0
- package/build/execution/wrapperConfig.js +155 -0
- package/build/index.js +40 -10
- package/build/playwright/blueprintDigest.js +28 -7
- package/build/playwright/registerPlaywrightTools.js +47 -28
- package/build/playwright/traceExportStore.d.ts +22 -0
- package/build/playwright/traceExportStore.js +81 -0
- package/build/playwright/traceRecordingPrompt.js +11 -3
- package/build/prompts/code-reuse.js +118 -49
- package/build/prompts/fix-error-prompt.d.ts +9 -1
- package/build/prompts/fix-error-prompt.js +31 -28
- package/build/prompts/local-dev/local-dev-plan.d.ts +3 -0
- package/build/prompts/local-dev/local-dev-plan.js +8 -23
- package/build/prompts/local-dev/local-dev-prompts.d.ts +1 -1
- package/build/prompts/local-dev/local-dev-prompts.js +31 -4
- package/build/prompts/modularization/integration-test-modularization.js +13 -6
- package/build/prompts/modularization/ui-test-modularization.js +1 -1
- package/build/prompts/personas.js +1 -1
- package/build/prompts/pom-aware-code-reuse.js +7 -9
- package/build/prompts/reuse-hand-off.d.ts +64 -0
- package/build/prompts/reuse-hand-off.js +130 -0
- package/build/prompts/shared-helper-policy.d.ts +124 -2
- package/build/prompts/shared-helper-policy.js +178 -12
- package/build/prompts/startTraceCollectionPrompts.js +1 -1
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +7 -8
- package/build/prompts/sut-setup/modes/dockerComposePrompt.js +1 -1
- package/build/prompts/sut-setup/shared.d.ts +4 -1
- package/build/prompts/sut-setup/shared.js +6 -4
- package/build/prompts/test-maintenance/actionsInstructions.d.ts +19 -11
- package/build/prompts/test-maintenance/actionsInstructions.js +47 -26
- package/build/prompts/test-maintenance/drift-analysis-prompt.d.ts +16 -8
- package/build/prompts/test-maintenance/drift-analysis-prompt.js +93 -38
- package/build/prompts/test-maintenance/driftAnalysisSections.js +5 -3
- package/build/prompts/test-maintenance/driftAnalysisShared.js +4 -2
- package/build/prompts/test-maintenance/uiDriftAnalysisSections.js +8 -5
- package/build/prompts/test-recommendation/recommendationSections.js +19 -8
- package/build/prompts/test-recommendation/recommendationShared.d.ts +1 -1
- package/build/prompts/test-recommendation/recommendationShared.js +0 -1
- package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +5 -2
- package/build/prompts/test-recommendation/test-recommendation-prompt.js +10 -7
- package/build/prompts/testbot/testbot-prompts.js +133 -63
- package/build/recommendation/answers.js +18 -9
- package/build/recommendation/pullRequestText.js +1 -1
- package/build/recommendation/registerPlan.js +31 -17
- package/build/recommendation/subjectStep.d.ts +8 -10
- package/build/recommendation/subjectStep.js +17 -16
- package/build/recommendation/types.d.ts +71 -17
- package/build/recommendation/types.js +9 -15
- package/build/recommendation/verifierContracts.d.ts +7 -3
- package/build/recommendation/verifierContracts.js +8 -4
- package/build/recommendation/verifiers/changedFile.js +11 -13
- package/build/recommendation/verifiers/citedPath.d.ts +8 -0
- package/build/recommendation/verifiers/citedPath.js +16 -2
- package/build/recommendation/verifiers/coverage.d.ts +2 -2
- package/build/recommendation/verifiers/coverage.js +190 -134
- package/build/recommendation/verifiers/defects.js +56 -16
- package/build/recommendation/verifiers/deliveredMatchesPlan.d.ts +7 -1
- package/build/recommendation/verifiers/deliveredMatchesPlan.js +28 -14
- package/build/recommendation/verifiers/endpointGrounded.js +14 -8
- package/build/recommendation/verifiers/existingCoverage.d.ts +6 -0
- package/build/recommendation/verifiers/existingCoverage.js +30 -21
- package/build/recommendation/verifiers/expectedOutcome.js +17 -8
- package/build/recommendation/verifiers/expectedValueSourced.js +54 -43
- package/build/recommendation/verifiers/issueTraceability.d.ts +5 -0
- package/build/recommendation/verifiers/issueTraceability.js +64 -7
- package/build/recommendation/verifiers/removedElementGuarded.js +19 -11
- package/build/recommendation/verifiers/reportedCategory.js +9 -4
- package/build/recommendation/verifiers/requirementSourced.js +34 -21
- package/build/recommendation/verifiers/screenRoute.js +15 -10
- package/build/recommendation/verifiers/statedDifference.js +15 -8
- package/build/recommendation/verifiers/uiElementGrounded.js +50 -16
- package/build/resources/analysisResources.js +7 -3
- package/build/resources/progressResource.js +4 -2
- package/build/resources/sutSetupResource.js +20 -2
- package/build/resources/testbotResource.js +19 -1
- package/build/services/AnalyticsService.js +3 -1
- package/build/services/ScenarioGenerationService.js +5 -5
- package/build/services/TestDiscoveryService.js +53 -9
- package/build/services/TestExecutionService.js +63 -21
- package/build/services/TestGenerationService.d.ts +1 -1
- package/build/services/TestGenerationService.js +43 -24
- package/build/skills/enhanceAssertionsSkill.d.ts +45 -0
- package/build/skills/enhanceAssertionsSkill.js +103 -0
- package/build/skills/fixTestImportErrorsSkill.d.ts +2 -2
- package/build/skills/fixTestImportErrorsSkill.js +2 -2
- package/build/skills/runTestSkill.d.ts +6 -0
- package/build/skills/runTestSkill.js +17 -0
- package/build/skills/skillFiles.d.ts +38 -0
- package/build/skills/skillFiles.js +94 -0
- package/build/skills/validateAssertionAlignmentSkill.d.ts +34 -0
- package/build/skills/validateAssertionAlignmentSkill.js +59 -0
- package/build/tool-phases.js +4 -1
- package/build/tools/auth/loginTool.js +3 -1
- package/build/tools/auth/logoutTool.js +3 -1
- package/build/tools/budgetExcuse.d.ts +15 -0
- package/build/tools/budgetExcuse.js +113 -0
- package/build/tools/code-refactor/alignAssertionsTool.d.ts +2 -0
- package/build/tools/code-refactor/alignAssertionsTool.js +51 -0
- package/build/tools/code-refactor/assertion-state.d.ts +1 -1
- package/build/tools/code-refactor/assertion-state.js +1 -1
- package/build/tools/code-refactor/assertionOperations.d.ts +44 -0
- package/build/tools/code-refactor/assertionOperations.js +82 -0
- package/build/tools/code-refactor/assertionSkillTools.d.ts +3 -0
- package/build/tools/code-refactor/assertionSkillTools.js +86 -0
- package/build/tools/code-refactor/codeReuseTool.js +27 -3
- package/build/tools/code-refactor/enhanceAssertionsTool.js +19 -83
- package/build/tools/code-refactor/gate-markers.d.ts +51 -0
- package/build/tools/code-refactor/gate-markers.js +95 -0
- package/build/tools/code-refactor/retrofit-state.d.ts +3 -1
- package/build/tools/code-refactor/retrofit-state.js +44 -2
- package/build/tools/code-refactor/reuse-outcome.d.ts +23 -1
- package/build/tools/code-refactor/reuse-outcome.js +36 -13
- package/build/tools/code-refactor/reuse-state.d.ts +90 -16
- package/build/tools/code-refactor/reuse-state.js +191 -61
- package/build/tools/code-refactor/utils-verify-gates.d.ts +4 -0
- package/build/tools/code-refactor/utils-verify-gates.js +269 -30
- package/build/tools/code-refactor/verify-gates.d.ts +15 -1
- package/build/tools/code-refactor/verify-gates.js +36 -4
- package/build/tools/enrichTestWithMocksTool.d.ts +1 -1
- package/build/tools/enrichTestWithMocksTool.js +9 -5
- package/build/tools/executeSkyrampTestTool.d.ts +118 -48
- package/build/tools/executeSkyrampTestTool.js +998 -372
- package/build/tools/execution-video-state.js +1 -1
- package/build/tools/fixErrorTool.js +5 -6
- package/build/tools/generate-tests/batchMockGenerationTool.js +1 -1
- package/build/tools/generate-tests/generateBatchScenarioRestTool.js +114 -73
- package/build/tools/generate-tests/generateContractRestTool.js +34 -16
- package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -0
- package/build/tools/generate-tests/generateE2ERestTool.js +9 -1
- package/build/tools/generate-tests/generateIntegrationRestTool.js +22 -7
- package/build/tools/generate-tests/generateMockRestTool.js +3 -1
- package/build/tools/generate-tests/generateUIRestTool.d.ts +2 -0
- package/build/tools/generate-tests/generateUIRestTool.js +11 -2
- package/build/tools/generate-tests/loadTestSchema.js +1 -3
- package/build/tools/generate-tests/planGuard.js +6 -3
- package/build/tools/generate-tests/scenarioFileIdentity.js +4 -1
- package/build/tools/generate-tests/scenarioLint.js +17 -5
- package/build/tools/generate-tests/trace-reuse-guard.js +5 -2
- package/build/tools/generateEnrichedIntegrationTestTool.js +9 -3
- package/build/tools/one-click/oneClickTool.js +3 -1
- package/build/tools/preflightMockCheckTool.js +23 -7
- package/build/tools/submitReportTool.d.ts +51 -12
- package/build/tools/submitReportTool.js +988 -161
- package/build/tools/test-management/actionsTool.js +241 -51
- package/build/tools/test-management/analyzeChangesTool.d.ts +8 -9
- package/build/tools/test-management/analyzeChangesTool.js +127 -68
- package/build/tools/test-management/analyzeTestHealthTool.d.ts +0 -11
- package/build/tools/test-management/analyzeTestHealthTool.js +42 -76
- package/build/tools/test-management/registerTestPlanTool.d.ts +44 -34
- package/build/tools/test-management/registerTestPlanTool.js +255 -111
- package/build/tools/test-management/resolveScreenTool.js +33 -9
- package/build/tools/test-management/testsOwedBeforeRun.d.ts +28 -0
- package/build/tools/test-management/testsOwedBeforeRun.js +53 -0
- package/build/tools/trace/startTraceCollectionTool.js +3 -1
- package/build/tools/trace/stopTraceCollectionTool.js +42 -6
- package/build/tools/verifyTestDependenciesTool.d.ts +3 -0
- package/build/tools/verifyTestDependenciesTool.js +54 -0
- package/build/tools/workspace/initScanWorkspaceTool.js +9 -3
- package/build/tools/workspace/initializeWorkspaceTool.js +3 -1
- package/build/types/AssertionOutcome.d.ts +1 -1
- package/build/types/EnhanceType.d.ts +6 -0
- package/build/types/EnhanceType.js +1 -0
- package/build/types/RepositoryAnalysis.d.ts +32 -72
- package/build/types/ReuseOutcome.d.ts +100 -7
- package/build/types/ReuseOutcome.js +16 -0
- package/build/types/StepMethod.js +20 -6
- package/build/types/TestAnalysis.d.ts +10 -2
- package/build/types/TestExecution.d.ts +45 -0
- package/build/types/TestRecommendation.d.ts +1 -1
- package/build/types/TestRecommendation.js +4 -1
- package/build/types/TestTypes.d.ts +16 -0
- package/build/types/TestTypes.js +40 -3
- package/build/types/TestbotPromptOptions.d.ts +9 -1
- package/build/types/TestbotReport.d.ts +45 -9
- package/build/utils/AnalysisStateManager.d.ts +137 -34
- package/build/utils/AnalysisStateManager.js +228 -44
- package/build/utils/assertion-verify/api-shared-lints.js +34 -16
- package/build/utils/assertion-verify/metrics.js +39 -6
- package/build/utils/assertion-verify/ui-lints.js +4 -2
- package/build/utils/branchDiff.js +47 -12
- package/build/utils/canonicalJson.js +3 -1
- package/build/utils/connectionErrors.d.ts +10 -0
- package/build/utils/connectionErrors.js +10 -0
- package/build/utils/dartRouteExtractor.js +36 -7
- package/build/utils/fixAttempts.d.ts +26 -0
- package/build/utils/fixAttempts.js +109 -0
- package/build/utils/frontendSelectors.js +23 -4
- package/build/utils/generatedTestRecord.d.ts +19 -0
- package/build/utils/generatedTestRecord.js +61 -0
- package/build/utils/gitStaging.js +7 -2
- package/build/utils/initAgent.js +26 -6
- package/build/utils/language-helper.js +60 -45
- package/build/utils/pathMatching.js +2 -1
- package/build/utils/pathSignatures.js +6 -2
- package/build/utils/planMatchKeys.d.ts +2 -2
- package/build/utils/planMatchKeys.js +20 -14
- package/build/utils/pom-catalog-parse.js +7 -2
- package/build/utils/pom-scope/import-expansion.js +6 -1
- package/build/utils/pom-scope/index.js +50 -12
- package/build/utils/pom-scope/scoring.js +13 -3
- package/build/utils/pom-scope/selector-extractor.js +16 -3
- package/build/utils/pom-scope/strip.d.ts +8 -0
- package/build/utils/pom-scope/strip.js +238 -0
- package/build/utils/pom-scope/testIdDiscovery.js +14 -2
- package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.d.ts +1 -1
- package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.js +4 -2
- package/build/utils/pom-verify/__fixtures__/af-style/report.iframe.page.js +3 -1
- package/build/utils/pom-verify/__fixtures__/af-style/workflow-footer.page.js +3 -1
- package/build/utils/pom-verify/bindings.js +5 -1
- package/build/utils/pom-verify/calls.js +9 -2
- package/build/utils/pom-verify/verify.js +27 -5
- package/build/utils/pr-comment-parser.js +20 -7
- package/build/utils/progress.d.ts +1 -1
- package/build/utils/progress.js +1 -1
- package/build/utils/proxy-terminal.d.ts +19 -1
- package/build/utils/proxy-terminal.js +346 -21
- package/build/utils/rebaselineSnapshots.d.ts +1 -1
- package/build/utils/rebaselineSnapshots.js +6 -16
- package/build/utils/removedUiElements.js +1 -1
- package/build/utils/reportLanguage.js +35 -7
- package/build/utils/reportVerification.d.ts +14 -8
- package/build/utils/reportVerification.js +19 -19
- package/build/utils/repositorySlug.d.ts +32 -0
- package/build/utils/repositorySlug.js +77 -0
- package/build/utils/reuseRouting.d.ts +10 -0
- package/build/utils/reuseRouting.js +21 -2
- package/build/utils/runContextGauge.d.ts +27 -0
- package/build/utils/runContextGauge.js +181 -0
- package/build/utils/runSerialized.d.ts +3 -0
- package/build/utils/runSerialized.js +39 -0
- package/build/utils/screenRoutes.js +74 -18
- package/build/utils/skyrampMdContent.d.ts +1 -1
- package/build/utils/skyrampMdContent.js +1 -1
- package/build/utils/skyrampSdkVersion.d.ts +9 -0
- package/build/utils/skyrampSdkVersion.js +16 -0
- package/build/utils/sourceRouteExtractor.js +13 -6
- package/build/utils/telemetry.d.ts +1 -0
- package/build/utils/telemetry.js +8 -5
- package/build/utils/testDependencyPolicy.d.ts +9 -0
- package/build/utils/testDependencyPolicy.js +809 -0
- package/build/utils/testExecutionRecord.d.ts +94 -0
- package/build/utils/testExecutionRecord.js +269 -0
- package/build/utils/testFileClassification.d.ts +8 -0
- package/build/utils/testFileClassification.js +39 -4
- package/build/utils/trace-parser.js +62 -14
- package/build/utils/urlPath.js +3 -1
- package/build/utils/utils-verify/action-key.d.ts +46 -0
- package/build/utils/utils-verify/action-key.js +120 -38
- package/build/utils/utils-verify/action-sites.d.ts +32 -0
- package/build/utils/utils-verify/action-sites.js +202 -0
- package/build/utils/utils-verify/allow.d.ts +122 -3
- package/build/utils/utils-verify/allow.js +146 -21
- package/build/utils/utils-verify/body-reach.d.ts +120 -0
- package/build/utils/utils-verify/body-reach.js +333 -0
- package/build/utils/utils-verify/call-sites.d.ts +31 -7
- package/build/utils/utils-verify/call-sites.js +80 -13
- package/build/utils/utils-verify/delivered-imports.d.ts +43 -0
- package/build/utils/utils-verify/delivered-imports.js +84 -0
- package/build/utils/utils-verify/fixed-sleep.d.ts +96 -0
- package/build/utils/utils-verify/fixed-sleep.js +461 -0
- package/build/utils/utils-verify/in-house.d.ts +93 -0
- package/build/utils/utils-verify/in-house.js +719 -0
- package/build/utils/utils-verify/incumbent.d.ts +3 -0
- package/build/utils/utils-verify/incumbent.js +75 -0
- package/build/utils/utils-verify/index.d.ts +2 -0
- package/build/utils/utils-verify/index.js +2 -0
- package/build/utils/utils-verify/language-spec.d.ts +51 -10
- package/build/utils/utils-verify/language-spec.js +232 -21
- package/build/utils/utils-verify/locate.d.ts +26 -0
- package/build/utils/utils-verify/locate.js +125 -23
- package/build/utils/utils-verify/module-name.d.ts +40 -0
- package/build/utils/utils-verify/module-name.js +98 -0
- package/build/utils/utils-verify/parse.d.ts +56 -7
- package/build/utils/utils-verify/parse.js +195 -40
- package/build/utils/utils-verify/retrofit-equivalence.d.ts +5 -0
- package/build/utils/utils-verify/retrofit-equivalence.js +4 -2
- package/build/utils/utils-verify/stage.d.ts +5 -0
- package/build/utils/utils-verify/stage.js +47 -2
- package/build/utils/utils-verify/status-once.d.ts +62 -0
- package/build/utils/utils-verify/status-once.js +207 -0
- package/build/utils/utils-verify/typecheck.d.ts +61 -0
- package/build/utils/utils-verify/typecheck.js +338 -0
- package/build/utils/utils-verify/verify.d.ts +79 -3
- package/build/utils/utils-verify/verify.js +531 -61
- package/build/utils/versions.d.ts +3 -3
- package/build/utils/versions.js +1 -1
- package/build/utils/workspaceAuth.js +107 -37
- package/build/workspace/queryParamResolution.js +11 -4
- package/build/workspace/workspace.d.ts +72 -52
- package/build/workspace/workspace.js +19 -15
- package/node_modules/playwright/ThirdPartyNotices.txt +19 -19
- package/node_modules/playwright/lib/mcp/skyramp/assertTool.js +8 -2
- package/node_modules/playwright/lib/mcp/skyramp/common/cssValue.js +87 -0
- package/node_modules/playwright/lib/mcp/skyramp/loadTraceTool.js +31 -0
- package/node_modules/playwright/lib/mcp/skyramp/skyRampImport.js +3 -0
- package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +181 -15
- package/node_modules/playwright/lib/mcp/test/skyRampExport.js +24 -0
- package/node_modules/playwright/lib/transform/babelBundleImpl.js +2353 -190
- package/node_modules/playwright/node_modules/playwright-core/ThirdPartyNotices.txt +62 -34
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/.package-lock.json +72 -41
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.mjs +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/package.json +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/README.md +16 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/index.js +4 -20
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/read.js +17 -17
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/json.js +60 -32
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/raw.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/text.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/urlencoded.js +16 -20
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/utils.js +18 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/README.md +71 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/package.json +52 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/package.json +23 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/CHANGELOG.md +21 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/isObject.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/package.json +6 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/tsconfig.json +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/index.js +266 -45
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/schemes.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/utils.js +396 -92
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/equal.test.js +31 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/fixtures/uri-js-parse.json +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/parse.test.js +7 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security-normalization.test.js +101 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security.test.js +301 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/CHANGELOG.md +7 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/index.d.ts +0 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/package.json +4 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/client.js +30 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/utils.js +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/context.js +32 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/accepts/accepts.js +36 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/proxy/index.js +4 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/ssg.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/utils.js +30 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/streaming/sse.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/hono-base.js +10 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/base.js +44 -23
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/components.js +25 -26
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/context.js +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/render.js +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/server.js +5 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/hooks/index.js +16 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/streaming.js +4 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cache/index.js +103 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/compress/index.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cors/index.js +17 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/csrf/index.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/digest.js +47 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/index.js +7 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/language/language.js +10 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/method-not-allowed/index.js +90 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +3 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +16 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/request.js +20 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/linear-router/router.js +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/pattern-router/router.js +3 -9
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +65 -59
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +71 -128
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +14 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/node.js +47 -70
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/router.js +3 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/utils.js +27 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/accept.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/body.js +21 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/cookie.js +4 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/ipaddr.js +5 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/stream.js +12 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/url.js +19 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/client.js +30 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/utils.js +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/context.js +32 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/accepts/accepts.js +36 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/proxy/index.js +4 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/ssg.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/utils.js +30 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/streaming/sse.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/hono-base.js +10 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/base.js +41 -23
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/components.js +26 -27
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/context.js +6 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/render.js +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/server.js +5 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/hooks/index.js +16 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/intrinsic-element/components.js +4 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/streaming.js +5 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cache/index.js +103 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/compress/index.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cors/index.js +17 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/csrf/index.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/digest.js +47 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/index.js +7 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwk/jwk.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwt/jwt.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/language/language.js +10 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/method-not-allowed/index.js +68 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/pretty-json/index.js +3 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +16 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/request.js +21 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/linear-router/router.js +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/pattern-router/router.js +3 -9
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/node.js +61 -58
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/router.js +77 -129
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/trie.js +14 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/node.js +47 -70
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/router.js +3 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/utils.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +9 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/client/types.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/context.d.ts +6 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/hono-base.d.ts +4 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/base.d.ts +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/index.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/server.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/hooks/index.d.ts +8 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/index.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cache/index.d.ts +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/combine/index.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cors/index.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +2 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/node.d.ts +1 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/router.d.ts +0 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/utils.d.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/headers.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/url.d.ts +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/accept.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/body.js +21 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/cookie.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/ipaddr.js +5 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/stream.js +12 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/url.js +17 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/package.json +11 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/README.md +173 -143
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.d.ts +11 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js +79 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.d.ts +78 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js +119 -24
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.d.ts +151 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js +316 -90
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js +45 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js +50 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/package.json +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/.github/THREAT_MODEL.md +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/CHANGELOG.md +26 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/README.md +19 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/dist/qs.js +25 -25
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/eslint.config.mjs +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/parse.js +16 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/stringify.js +23 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/utils.js +57 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/package.json +8 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/parse.js +419 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/stringify.js +317 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/utils.js +206 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/CHANGELOG.md +10 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/README.md +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/index.js +5 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/package.json +10 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/test/index.js +16 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/index.js +8 -18
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/LICENSE +22 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/README.md +71 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/package.json +52 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/package.json +9 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/package-lock.json +72 -41
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/.package-lock.json +6 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/README.md +23 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/index.js +265 -86
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/README.md +173 -143
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.d.ts +11 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js +79 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.d.ts +78 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js +119 -24
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.d.ts +151 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js +316 -90
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js +45 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js +50 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/package.json +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/package-lock.json +6 -6
- package/node_modules/playwright/node_modules/playwright-core/lib/cli/program.js +18 -9
- package/node_modules/playwright/node_modules/playwright-core/lib/mcpBundleImpl/index.js +47 -47
- package/node_modules/playwright/node_modules/playwright-core/lib/server/codegen/skyramp/jsonlReader.js +3 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +42 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/utilsBundleImpl/index.js +121 -121
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.B7KbSQcC.js → index.BAkLd5DX.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +1 -1
- package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/src/cli/program.ts +31 -9
- package/node_modules/playwright/node_modules/playwright-core/src/server/codegen/skyramp/jsonlReader.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/recorderRunner.ts +57 -1
- package/node_modules/playwright/package.json +2 -2
- package/package.json +7 -6
- package/plugin/prompts/code-reuse/hand-off.md +30 -0
- package/plugin/prompts/generate-tests/generation.md +1 -1
- package/plugin/prompts/plan-tests.md +14 -14
- package/plugin/prompts/testbot-task1.md +2 -2
- package/plugin/skills/enhance-assertions/SKILL.md +25 -0
- package/plugin/skills/enhance-assertions/reference/contract.md +51 -0
- package/plugin/skills/enhance-assertions/reference/integration.md +58 -0
- package/plugin/skills/enhance-assertions/reference/shared-rules.md +220 -0
- package/plugin/skills/enhance-assertions/reference/ui.md +373 -0
- package/plugin/skills/fix-test-import-errors/SKILL.md +45 -50
- package/plugin/skills/run-test/SKILL.md +16 -0
- package/plugin/skills/validate-assertion-alignment-post-execution/SKILL.md +32 -0
- package/plugin/skills/validate-assertion-alignment-post-execution/reference/checks.md +44 -0
- package/plugin/skills/validate-assertion-alignment-post-execution/reference/evidence.md +47 -0
- package/build/adapters/jestAdapter.d.ts +0 -14
- package/build/adapters/jestAdapter.js +0 -113
- package/build/adapters/mochaAdapter.d.ts +0 -13
- package/build/adapters/mochaAdapter.js +0 -87
- package/build/adapters/playwrightAdapter.d.ts +0 -17
- package/build/adapters/playwrightAdapter.js +0 -182
- package/build/adapters/pytestAdapter.d.ts +0 -15
- package/build/adapters/pytestAdapter.js +0 -108
- package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.js +0 -29
- package/build/prompts/enhance-assertions/integrationAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/integrationAssertionsPrompt.js +0 -36
- package/build/prompts/enhance-assertions/sharedAssertionRules.d.ts +0 -16
- package/build/prompts/enhance-assertions/sharedAssertionRules.js +0 -284
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.js +0 -388
- package/build/tools/runExistingTestsTool.d.ts +0 -138
- package/build/tools/runExistingTestsTool.js +0 -644
- package/build/types/ExternalTestExecution.d.ts +0 -67
- package/build/types/ExternalTestExecution.js +0 -8
- package/build/workspace/testSuites.d.ts +0 -20
- package/build/workspace/testSuites.js +0 -17
- package/node_modules/playwright/node_modules/playwright-core/.DS_Store +0 -0
|
@@ -1,209 +1,209 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
`)!=-1,r=this._styles,n=r.length;n--;){var s=vi[r[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,t&&(e=e.replace(g_,function(o){return s.close+o+s.open}))}return e}se.setTheme=function(i){if(typeof i=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in i)(function(t){se[t]=function(r){if(typeof i[t]=="object"){var n=r;for(var s in i[t])n=se[i[t][s]](n);return n}return se[i[t]](r)}})(e)};function w_(){var i={};return Object.keys(Nf).forEach(function(e){i[e]={get:function(){return Tf([e])}}}),i}var x_=function(e,t){var r=t.split("");return r=r.map(e),r.join("")};se.trap=yf();se.zalgo=_f();se.maps={};se.maps.america=wf()(se);se.maps.zebra=Sf()(se);se.maps.rainbow=Of()(se);se.maps.random=Cf()(se);for(Af in se.maps)(function(i){se[i]=function(e){return x_(se.maps[i],e)}})(Af);var Af;If(se,w_())});var Rf=w((rT,Lf)=>{var S_=Pf();Lf.exports=S_});var Ff=w((nT,Mf)=>{var Wi=1e3,Gi=Wi*60,Yi=Gi*60,_i=Yi*24,E_=_i*7,O_=_i*365.25;Mf.exports=function(i,e){e=e||{};var t=typeof i;if(t==="string"&&i.length>0)return k_(i);if(t==="number"&&isFinite(i))return e.long?A_(i):C_(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function k_(i){if(i=String(i),!(i.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*O_;case"weeks":case"week":case"w":return t*E_;case"days":case"day":case"d":return t*_i;case"hours":case"hour":case"hrs":case"hr":case"h":return t*Yi;case"minutes":case"minute":case"mins":case"min":case"m":return t*Gi;case"seconds":case"second":case"secs":case"sec":case"s":return t*Wi;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function C_(i){var e=Math.abs(i);return e>=_i?Math.round(i/_i)+"d":e>=Yi?Math.round(i/Yi)+"h":e>=Gi?Math.round(i/Gi)+"m":e>=Wi?Math.round(i/Wi)+"s":i+"ms"}function A_(i){var e=Math.abs(i);return e>=_i?Dn(i,e,_i,"day"):e>=Yi?Dn(i,e,Yi,"hour"):e>=Gi?Dn(i,e,Gi,"minute"):e>=Wi?Dn(i,e,Wi,"second"):i+" ms"}function Dn(i,e,t,r){var n=e>=t*1.5;return Math.round(i/t)+" "+r+(n?"s":"")}});var Wo=w((sT,qf)=>{function I_(i){t.debug=t,t.default=t,t.coerce=l,t.disable=s,t.enable=n,t.enabled=o,t.humanize=Ff(),t.destroy=c,Object.keys(i).forEach(u=>{t[u]=i[u]}),t.names=[],t.skips=[],t.formatters={};function e(u){let f=0;for(let h=0;h<u.length;h++)f=(f<<5)-f+u.charCodeAt(h),f|=0;return t.colors[Math.abs(f)%t.colors.length]}t.selectColor=e;function t(u){let f,h=null,p,m;function d(...g){if(!d.enabled)return;let _=d,b=Number(new Date),y=b-(f||b);_.diff=y,_.prev=f,_.curr=b,f=b,g[0]=t.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let x=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(T,E)=>{if(T==="%%")return"%";x++;let C=t.formatters[E];if(typeof C=="function"){let S=g[x];T=C.call(_,S),g.splice(x,1),x--}return T}),t.formatArgs.call(_,g),(_.log||t.log).apply(_,g)}return d.namespace=u,d.useColors=t.useColors(),d.color=t.selectColor(u),d.extend=r,d.destroy=t.destroy,Object.defineProperty(d,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(p!==t.namespaces&&(p=t.namespaces,m=t.enabled(u)),m),set:g=>{h=g}}),typeof t.init=="function"&&t.init(d),d}function r(u,f){let h=t(this.namespace+(typeof f=="undefined"?":":f)+u);return h.log=this.log,h}function n(u){t.save(u),t.namespaces=u,t.names=[],t.skips=[];let f,h=(typeof u=="string"?u:"").split(/[\s,]+/),p=h.length;for(f=0;f<p;f++)h[f]&&(u=h[f].replace(/\*/g,".*?"),u[0]==="-"?t.skips.push(new RegExp("^"+u.slice(1)+"$")):t.names.push(new RegExp("^"+u+"$")))}function s(){let u=[...t.names.map(a),...t.skips.map(a).map(f=>"-"+f)].join(",");return t.enable(""),u}function o(u){if(u[u.length-1]==="*")return!0;let f,h;for(f=0,h=t.skips.length;f<h;f++)if(t.skips[f].test(u))return!1;for(f=0,h=t.names.length;f<h;f++)if(t.names[f].test(u))return!0;return!1}function a(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}qf.exports=I_});var Df=w((st,Un)=>{st.formatArgs=N_;st.save=B_;st.load=P_;st.useColors=T_;st.storage=L_();st.destroy=(()=>{let i=!1;return()=>{i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();st.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function T_(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function N_(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+Un.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;i.splice(1,0,e,"color: inherit");let t=0,r=0;i[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(r=t))}),i.splice(r,0,e)}st.log=console.debug||console.log||(()=>{});function B_(i){try{i?st.storage.setItem("debug",i):st.storage.removeItem("debug")}catch{}}function P_(){let i;try{i=st.storage.getItem("debug")}catch{}return!i&&typeof process!="undefined"&&"env"in process&&(i=process.env.DEBUG),i}function L_(){try{return localStorage}catch{}}Un.exports=Wo()(st);var{formatters:R_}=Un.exports;R_.j=function(i){try{return JSON.stringify(i)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var jf=w((oT,Uf)=>{"use strict";Uf.exports=(i,e=process.argv)=>{let t=i.startsWith("-")?"":i.length===1?"-":"--",r=e.indexOf(t+i),n=e.indexOf("--");return r!==-1&&(n===-1||r<n)}});var Hf=w((aT,Vf)=>{"use strict";var M_=require("os"),$f=require("tty"),ht=jf(),{env:qe}=process,jn;ht("no-color")||ht("no-colors")||ht("color=false")||ht("color=never")?jn=0:(ht("color")||ht("colors")||ht("color=true")||ht("color=always"))&&(jn=1);function F_(){if("FORCE_COLOR"in qe)return qe.FORCE_COLOR==="true"?1:qe.FORCE_COLOR==="false"?0:qe.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(qe.FORCE_COLOR,10),3)}function q_(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function D_(i,{streamIsTTY:e,sniffFlags:t=!0}={}){let r=F_();r!==void 0&&(jn=r);let n=t?jn:r;if(n===0)return 0;if(t){if(ht("color=16m")||ht("color=full")||ht("color=truecolor"))return 3;if(ht("color=256"))return 2}if(i&&!e&&n===void 0)return 0;let s=n||0;if(qe.TERM==="dumb")return s;if(process.platform==="win32"){let o=M_.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in qe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in qe)||qe.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in qe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(qe.TEAMCITY_VERSION)?1:0;if(qe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in qe){let o=Number.parseInt((qe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(qe.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(qe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(qe.TERM)||"COLORTERM"in qe?1:s}function Go(i,e={}){let t=D_(i,{streamIsTTY:i&&i.isTTY,...e});return q_(t)}Vf.exports={supportsColor:Go,stdout:Go({isTTY:$f.isatty(1)}),stderr:Go({isTTY:$f.isatty(2)})}});var Gf=w((We,Vn)=>{var U_=require("tty"),$n=require("util");We.init=Y_;We.log=H_;We.formatArgs=$_;We.save=W_;We.load=G_;We.useColors=j_;We.destroy=$n.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");We.colors=[6,2,3,4,5,1];try{let i=Hf();i&&(i.stderr||i).level>=2&&(We.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}We.inspectOpts=Object.keys(process.env).filter(i=>/^debug_/i.test(i)).reduce((i,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,s)=>s.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),i[t]=r,i},{});function j_(){return"colors"in We.inspectOpts?!!We.inspectOpts.colors:U_.isatty(process.stderr.fd)}function $_(i){let{namespace:e,useColors:t}=this;if(t){let r=this.color,n="\x1B[3"+(r<8?r:"8;5;"+r),s=` ${n};1m${e} \x1B[0m`;i[0]=s+i[0].split(`
|
|
1
|
+
"use strict";var l_=Object.create;var Un=Object.defineProperty;var c_=Object.getOwnPropertyDescriptor;var u_=Object.getOwnPropertyNames;var f_=Object.getPrototypeOf,h_=Object.prototype.hasOwnProperty;var w=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),uf=(i,e)=>{for(var t in e)Un(i,t,{get:e[t],enumerable:!0})},ff=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of u_(e))!h_.call(i,n)&&n!==t&&Un(i,n,{get:()=>e[n],enumerable:!(r=c_(e,n))||r.enumerable});return i};var Ne=(i,e,t)=>(t=i!=null?l_(f_(i)):{},ff(e||!i||!i.__esModule?Un(t,"default",{value:i,enumerable:!0}):t,i)),d_=i=>ff(Un({},"__esModule",{value:!0}),i);var mf=w((cT,pf)=>{var df={};pf.exports=df;var hf={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(hf).forEach(function(i){var e=hf[i],t=df[i]=[];t.open="\x1B["+e[0]+"m",t.close="\x1B["+e[1]+"m"})});var yf=w((uT,gf)=>{"use strict";gf.exports=function(i,e){e=e||process.argv;var t=e.indexOf("--"),r=/^-{1,2}/.test(i)?"":"--",n=e.indexOf(r+i);return n!==-1&&(t===-1?!0:n<t)}});var _f=w((fT,vf)=>{"use strict";var p_=require("os"),At=yf(),Xe=process.env,Wi=void 0;At("no-color")||At("no-colors")||At("color=false")?Wi=!1:(At("color")||At("colors")||At("color=true")||At("color=always"))&&(Wi=!0);"FORCE_COLOR"in Xe&&(Wi=Xe.FORCE_COLOR.length===0||parseInt(Xe.FORCE_COLOR,10)!==0);function m_(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function g_(i){if(Wi===!1)return 0;if(At("color=16m")||At("color=full")||At("color=truecolor"))return 3;if(At("color=256"))return 2;if(i&&!i.isTTY&&Wi!==!0)return 0;var e=Wi?1:0;if(process.platform==="win32"){var t=p_.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in Xe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in Xe})||Xe.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in Xe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Xe.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in Xe){var r=parseInt((Xe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Xe.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Xe.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(Xe.TERM)||"COLORTERM"in Xe?1:(Xe.TERM==="dumb",e)}function Go(i){var e=g_(i);return m_(e)}vf.exports={supportsColor:Go,stdout:Go(process.stdout),stderr:Go(process.stderr)}});var wf=w((hT,bf)=>{bf.exports=function(e,t){var r="";e=e||"Run the trap, drop the bass",e=e.split("");var n={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(s){s=s.toLowerCase();var o=n[s]||[" "],a=Math.floor(Math.random()*o.length);typeof n[s]!="undefined"?r+=n[s][a]:r+=s}),r}});var Sf=w((dT,xf)=>{xf.exports=function(e,t){e=e||" he is here ";var r={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},n=[].concat(r.up,r.down,r.mid);function s(l){var c=Math.floor(Math.random()*l);return c}function o(l){var c=!1;return n.filter(function(u){c=u===l}),c}function a(l,c){var u="",f,h;c=c||{},c.up=typeof c.up!="undefined"?c.up:!0,c.mid=typeof c.mid!="undefined"?c.mid:!0,c.down=typeof c.down!="undefined"?c.down:!0,c.size=typeof c.size!="undefined"?c.size:"maxi",l=l.split("");for(h in l)if(!o(h)){switch(u=u+l[h],f={up:0,down:0,mid:0},c.size){case"mini":f.up=s(8),f.mid=s(2),f.down=s(8);break;case"maxi":f.up=s(16)+3,f.mid=s(4)+1,f.down=s(64)+3;break;default:f.up=s(8)+1,f.mid=s(6)/2,f.down=s(8)+1;break}var p=["up","mid","down"];for(var m in p)for(var d=p[m],g=0;g<=f[d];g++)c[d]&&(u=u+r[d][s(r[d].length)])}return u}return a(e,t)}});var Of=w((pT,Ef)=>{Ef.exports=function(i){return function(e,t,r){if(e===" ")return e;switch(t%3){case 0:return i.red(e);case 1:return i.white(e);case 2:return i.blue(e)}}}});var Cf=w((mT,kf)=>{kf.exports=function(i){return function(e,t,r){return t%2===0?e:i.inverse(e)}}});var If=w((gT,Af)=>{Af.exports=function(i){var e=["red","yellow","green","blue","magenta"];return function(t,r,n){return t===" "?t:i[e[r++%e.length]](t)}}});var Nf=w((yT,Tf)=>{Tf.exports=function(i){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(t,r,n){return t===" "?t:i[e[Math.round(Math.random()*(e.length-2))]](t)}}});var Ff=w((_T,Mf)=>{var oe={};Mf.exports=oe;oe.themes={};var y_=require("util"),_i=oe.styles=mf(),Pf=Object.defineProperties,v_=new RegExp(/[\r\n]+/g);oe.supportsColor=_f().supportsColor;typeof oe.enabled=="undefined"&&(oe.enabled=oe.supportsColor()!==!1);oe.enable=function(){oe.enabled=!0};oe.disable=function(){oe.enabled=!1};oe.stripColors=oe.strip=function(i){return(""+i).replace(/\x1B\[\d+m/g,"")};var vT=oe.stylize=function(e,t){if(!oe.enabled)return e+"";var r=_i[t];return!r&&t in oe?oe[t](e):r.open+e+r.close},__=/[|\\{}()[\]^$+*?.]/g,b_=function(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(__,"\\$&")};function Lf(i){var e=function t(){return x_.apply(t,arguments)};return e._styles=i,e.__proto__=w_,e}var Rf=(function(){var i={};return _i.grey=_i.gray,Object.keys(_i).forEach(function(e){_i[e].closeRe=new RegExp(b_(_i[e].close),"g"),i[e]={get:function(){return Lf(this._styles.concat(e))}}}),i})(),w_=Pf(function(){},Rf);function x_(){var i=Array.prototype.slice.call(arguments),e=i.map(function(o){return o!=null&&o.constructor===String?o:y_.inspect(o)}).join(" ");if(!oe.enabled||!e)return e;for(var t=e.indexOf(`
|
|
2
|
+
`)!=-1,r=this._styles,n=r.length;n--;){var s=_i[r[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,t&&(e=e.replace(v_,function(o){return s.close+o+s.open}))}return e}oe.setTheme=function(i){if(typeof i=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in i)(function(t){oe[t]=function(r){if(typeof i[t]=="object"){var n=r;for(var s in i[t])n=oe[i[t][s]](n);return n}return oe[i[t]](r)}})(e)};function S_(){var i={};return Object.keys(Rf).forEach(function(e){i[e]={get:function(){return Lf([e])}}}),i}var E_=function(e,t){var r=t.split("");return r=r.map(e),r.join("")};oe.trap=wf();oe.zalgo=Sf();oe.maps={};oe.maps.america=Of()(oe);oe.maps.zebra=Cf()(oe);oe.maps.rainbow=If()(oe);oe.maps.random=Nf()(oe);for(Bf in oe.maps)(function(i){oe[i]=function(e){return E_(oe.maps[i],e)}})(Bf);var Bf;Pf(oe,S_())});var qf=w((bT,Df)=>{var O_=Ff();Df.exports=O_});var jf=w((wT,Uf)=>{var Yi=1e3,Ki=Yi*60,zi=Ki*60,bi=zi*24,k_=bi*7,C_=bi*365.25;Uf.exports=function(i,e){e=e||{};var t=typeof i;if(t==="string"&&i.length>0)return A_(i);if(t==="number"&&isFinite(i))return e.long?T_(i):I_(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function A_(i){if(i=String(i),!(i.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(e){var t=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return t*C_;case"weeks":case"week":case"w":return t*k_;case"days":case"day":case"d":return t*bi;case"hours":case"hour":case"hrs":case"hr":case"h":return t*zi;case"minutes":case"minute":case"mins":case"min":case"m":return t*Ki;case"seconds":case"second":case"secs":case"sec":case"s":return t*Yi;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function I_(i){var e=Math.abs(i);return e>=bi?Math.round(i/bi)+"d":e>=zi?Math.round(i/zi)+"h":e>=Ki?Math.round(i/Ki)+"m":e>=Yi?Math.round(i/Yi)+"s":i+"ms"}function T_(i){var e=Math.abs(i);return e>=bi?jn(i,e,bi,"day"):e>=zi?jn(i,e,zi,"hour"):e>=Ki?jn(i,e,Ki,"minute"):e>=Yi?jn(i,e,Yi,"second"):i+" ms"}function jn(i,e,t,r){var n=e>=t*1.5;return Math.round(i/t)+" "+r+(n?"s":"")}});var Wo=w((xT,$f)=>{function N_(i){t.debug=t,t.default=t,t.coerce=l,t.disable=s,t.enable=n,t.enabled=o,t.humanize=jf(),t.destroy=c,Object.keys(i).forEach(u=>{t[u]=i[u]}),t.names=[],t.skips=[],t.formatters={};function e(u){let f=0;for(let h=0;h<u.length;h++)f=(f<<5)-f+u.charCodeAt(h),f|=0;return t.colors[Math.abs(f)%t.colors.length]}t.selectColor=e;function t(u){let f,h=null,p,m;function d(...g){if(!d.enabled)return;let v=d,b=Number(new Date),y=b-(f||b);v.diff=y,v.prev=f,v.curr=b,f=b,g[0]=t.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let x=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(A,E)=>{if(A==="%%")return"%";x++;let C=t.formatters[E];if(typeof C=="function"){let S=g[x];A=C.call(v,S),g.splice(x,1),x--}return A}),t.formatArgs.call(v,g),(v.log||t.log).apply(v,g)}return d.namespace=u,d.useColors=t.useColors(),d.color=t.selectColor(u),d.extend=r,d.destroy=t.destroy,Object.defineProperty(d,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(p!==t.namespaces&&(p=t.namespaces,m=t.enabled(u)),m),set:g=>{h=g}}),typeof t.init=="function"&&t.init(d),d}function r(u,f){let h=t(this.namespace+(typeof f=="undefined"?":":f)+u);return h.log=this.log,h}function n(u){t.save(u),t.namespaces=u,t.names=[],t.skips=[];let f,h=(typeof u=="string"?u:"").split(/[\s,]+/),p=h.length;for(f=0;f<p;f++)h[f]&&(u=h[f].replace(/\*/g,".*?"),u[0]==="-"?t.skips.push(new RegExp("^"+u.slice(1)+"$")):t.names.push(new RegExp("^"+u+"$")))}function s(){let u=[...t.names.map(a),...t.skips.map(a).map(f=>"-"+f)].join(",");return t.enable(""),u}function o(u){if(u[u.length-1]==="*")return!0;let f,h;for(f=0,h=t.skips.length;f<h;f++)if(t.skips[f].test(u))return!1;for(f=0,h=t.names.length;f<h;f++)if(t.names[f].test(u))return!0;return!1}function a(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}$f.exports=N_});var Hf=w((at,$n)=>{at.formatArgs=P_;at.save=L_;at.load=R_;at.useColors=B_;at.storage=M_();at.destroy=(()=>{let i=!1;return()=>{i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();at.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function B_(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function P_(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+$n.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;i.splice(1,0,e,"color: inherit");let t=0,r=0;i[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(r=t))}),i.splice(r,0,e)}at.log=console.debug||console.log||(()=>{});function L_(i){try{i?at.storage.setItem("debug",i):at.storage.removeItem("debug")}catch{}}function R_(){let i;try{i=at.storage.getItem("debug")}catch{}return!i&&typeof process!="undefined"&&"env"in process&&(i=process.env.DEBUG),i}function M_(){try{return localStorage}catch{}}$n.exports=Wo()(at);var{formatters:F_}=$n.exports;F_.j=function(i){try{return JSON.stringify(i)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Gf=w((ST,Vf)=>{"use strict";Vf.exports=(i,e=process.argv)=>{let t=i.startsWith("-")?"":i.length===1?"-":"--",r=e.indexOf(t+i),n=e.indexOf("--");return r!==-1&&(n===-1||r<n)}});var Kf=w((ET,Yf)=>{"use strict";var D_=require("os"),Wf=require("tty"),mt=Gf(),{env:qe}=process,Hn;mt("no-color")||mt("no-colors")||mt("color=false")||mt("color=never")?Hn=0:(mt("color")||mt("colors")||mt("color=true")||mt("color=always"))&&(Hn=1);function q_(){if("FORCE_COLOR"in qe)return qe.FORCE_COLOR==="true"?1:qe.FORCE_COLOR==="false"?0:qe.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(qe.FORCE_COLOR,10),3)}function U_(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function j_(i,{streamIsTTY:e,sniffFlags:t=!0}={}){let r=q_();r!==void 0&&(Hn=r);let n=t?Hn:r;if(n===0)return 0;if(t){if(mt("color=16m")||mt("color=full")||mt("color=truecolor"))return 3;if(mt("color=256"))return 2}if(i&&!e&&n===void 0)return 0;let s=n||0;if(qe.TERM==="dumb")return s;if(process.platform==="win32"){let o=D_.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in qe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in qe)||qe.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in qe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(qe.TEAMCITY_VERSION)?1:0;if(qe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in qe){let o=Number.parseInt((qe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(qe.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(qe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(qe.TERM)||"COLORTERM"in qe?1:s}function Yo(i,e={}){let t=j_(i,{streamIsTTY:i&&i.isTTY,...e});return U_(t)}Yf.exports={supportsColor:Yo,stdout:Yo({isTTY:Wf.isatty(1)}),stderr:Yo({isTTY:Wf.isatty(2)})}});var Jf=w((We,Gn)=>{var $_=require("tty"),Vn=require("util");We.init=z_;We.log=W_;We.formatArgs=V_;We.save=Y_;We.load=K_;We.useColors=H_;We.destroy=Vn.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");We.colors=[6,2,3,4,5,1];try{let i=Kf();i&&(i.stderr||i).level>=2&&(We.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}We.inspectOpts=Object.keys(process.env).filter(i=>/^debug_/i.test(i)).reduce((i,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,s)=>s.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),i[t]=r,i},{});function H_(){return"colors"in We.inspectOpts?!!We.inspectOpts.colors:$_.isatty(process.stderr.fd)}function V_(i){let{namespace:e,useColors:t}=this;if(t){let r=this.color,n="\x1B[3"+(r<8?r:"8;5;"+r),s=` ${n};1m${e} \x1B[0m`;i[0]=s+i[0].split(`
|
|
3
3
|
`).join(`
|
|
4
|
-
`+s),i.push(n+"m+"+
|
|
5
|
-
`)}function
|
|
6
|
-
`).map(e=>e.trim()).join(" ")};
|
|
7
|
-
`);let r;for(;(r=
|
|
8
|
-
`),s=s.replace(/\\r/g,"\r")),e[n]=s}return e}function
|
|
9
|
-
`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new
|
|
4
|
+
`+s),i.push(n+"m+"+Gn.exports.humanize(this.diff)+"\x1B[0m")}else i[0]=G_()+e+" "+i[0]}function G_(){return We.inspectOpts.hideDate?"":new Date().toISOString()+" "}function W_(...i){return process.stderr.write(Vn.format(...i)+`
|
|
5
|
+
`)}function Y_(i){i?process.env.DEBUG=i:delete process.env.DEBUG}function K_(){return process.env.DEBUG}function z_(i){i.inspectOpts={};let e=Object.keys(We.inspectOpts);for(let t=0;t<e.length;t++)i.inspectOpts[e[t]]=We.inspectOpts[e[t]]}Gn.exports=Wo()(We);var{formatters:zf}=Gn.exports;zf.o=function(i){return this.inspectOpts.colors=this.useColors,Vn.inspect(i,this.inspectOpts).split(`
|
|
6
|
+
`).map(e=>e.trim()).join(" ")};zf.O=function(i){return this.inspectOpts.colors=this.useColors,Vn.inspect(i,this.inspectOpts)}});var Dr=w((OT,Ko)=>{typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ko.exports=Hf():Ko.exports=Jf()});var yh=w((_2,ib)=>{ib.exports={name:"dotenv",version:"16.4.5",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec","test:coverage":"tap --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var wh=w((b2,Vt)=>{var xa=require("fs"),Sa=require("path"),rb=require("os"),nb=require("crypto"),sb=yh(),Ea=sb.version,ob=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function ab(i){let e={},t=i.toString();t=t.replace(/\r\n?/mg,`
|
|
7
|
+
`);let r;for(;(r=ob.exec(t))!=null;){let n=r[1],s=r[2]||"";s=s.trim();let o=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(s=s.replace(/\\n/g,`
|
|
8
|
+
`),s=s.replace(/\\r/g,"\r")),e[n]=s}return e}function lb(i){let e=bh(i),t=Me.configDotenv({path:e});if(!t.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);throw o.code="MISSING_DATA",o}let r=_h(i).split(","),n=r.length,s;for(let o=0;o<n;o++)try{let a=r[o].trim(),l=fb(t,a);s=Me.decrypt(l.ciphertext,l.key);break}catch(a){if(o+1>=n)throw a}return Me.parse(s)}function cb(i){console.log(`[dotenv@${Ea}][INFO] ${i}`)}function ub(i){console.log(`[dotenv@${Ea}][WARN] ${i}`)}function Zn(i){console.log(`[dotenv@${Ea}][DEBUG] ${i}`)}function _h(i){return i&&i.DOTENV_KEY&&i.DOTENV_KEY.length>0?i.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function fb(i,e){let t;try{t=new URL(e)}catch(a){if(a.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw a}let r=t.password;if(!r){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let n=t.searchParams.get("environment");if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let s=`DOTENV_VAULT_${n.toUpperCase()}`,o=i.parsed[s];if(!o){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:o,key:r}}function bh(i){let e=null;if(i&&i.path&&i.path.length>0)if(Array.isArray(i.path))for(let t of i.path)xa.existsSync(t)&&(e=t.endsWith(".vault")?t:`${t}.vault`);else e=i.path.endsWith(".vault")?i.path:`${i.path}.vault`;else e=Sa.resolve(process.cwd(),".env.vault");return xa.existsSync(e)?e:null}function vh(i){return i[0]==="~"?Sa.join(rb.homedir(),i.slice(1)):i}function hb(i){cb("Loading env from encrypted .env.vault");let e=Me._parseVault(i),t=process.env;return i&&i.processEnv!=null&&(t=i.processEnv),Me.populate(t,e,i),{parsed:e}}function db(i){let e=Sa.resolve(process.cwd(),".env"),t="utf8",r=!!(i&&i.debug);i&&i.encoding?t=i.encoding:r&&Zn("No encoding is specified. UTF-8 is used by default");let n=[e];if(i&&i.path)if(!Array.isArray(i.path))n=[vh(i.path)];else{n=[];for(let l of i.path)n.push(vh(l))}let s,o={};for(let l of n)try{let c=Me.parse(xa.readFileSync(l,{encoding:t}));Me.populate(o,c,i)}catch(c){r&&Zn(`Failed to load ${l} ${c.message}`),s=c}let a=process.env;return i&&i.processEnv!=null&&(a=i.processEnv),Me.populate(a,o,i),s?{parsed:o,error:s}:{parsed:o}}function pb(i){if(_h(i).length===0)return Me.configDotenv(i);let e=bh(i);return e?Me._configVault(i):(ub(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),Me.configDotenv(i))}function mb(i,e){let t=Buffer.from(e.slice(-64),"hex"),r=Buffer.from(i,"base64"),n=r.subarray(0,12),s=r.subarray(-16);r=r.subarray(12,-16);try{let o=nb.createDecipheriv("aes-256-gcm",t,n);return o.setAuthTag(s),`${o.update(r)}${o.final()}`}catch(o){let a=o instanceof RangeError,l=o.message==="Invalid key length",c=o.message==="Unsupported state or unable to authenticate data";if(a||l){let u=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw u.code="INVALID_DOTENV_KEY",u}else if(c){let u=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw u.code="DECRYPTION_FAILED",u}else throw o}}function gb(i,e,t={}){let r=!!(t&&t.debug),n=!!(t&&t.override);if(typeof e!="object"){let s=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw s.code="OBJECT_REQUIRED",s}for(let s of Object.keys(e))Object.prototype.hasOwnProperty.call(i,s)?(n===!0&&(i[s]=e[s]),r&&Zn(n===!0?`"${s}" is already defined and WAS overwritten`:`"${s}" is already defined and was NOT overwritten`)):i[s]=e[s]}var Me={configDotenv:db,_configVault:hb,_parseVault:lb,config:pb,decrypt:mb,parse:ab,populate:gb};Vt.exports.configDotenv=Me.configDotenv;Vt.exports._configVault=Me._configVault;Vt.exports._parseVault=Me._parseVault;Vt.exports.config=Me.config;Vt.exports.decrypt=Me.decrypt;Vt.exports.parse=Me.parse;Vt.exports.populate=Me.populate;Vt.exports=Me});var Sh=w(xh=>{"use strict";var yb=require("url").parse,vb={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},_b=String.prototype.endsWith||function(i){return i.length<=this.length&&this.indexOf(i,this.length-i.length)!==-1};function bb(i){var e=typeof i=="string"?yb(i):i||{},t=e.protocol,r=e.host,n=e.port;if(typeof r!="string"||!r||typeof t!="string"||(t=t.split(":",1)[0],r=r.replace(/:\d*$/,""),n=parseInt(n)||vb[t]||0,!wb(r,n)))return"";var s=Qi("npm_config_"+t+"_proxy")||Qi(t+"_proxy")||Qi("npm_config_proxy")||Qi("all_proxy");return s&&s.indexOf("://")===-1&&(s=t+"://"+s),s}function wb(i,e){var t=(Qi("npm_config_no_proxy")||Qi("no_proxy")).toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(r){if(!r)return!0;var n=r.match(/^(.+):(\d+)$/),s=n?n[1]:r,o=n?parseInt(n[2]):0;return o&&o!==e?!0:/^[.*]/.test(s)?(s.charAt(0)==="*"&&(s=s.slice(1)),!_b.call(i,s)):i!==s}):!0}function Qi(i){return process.env[i.toLowerCase()]||process.env[i.toUpperCase()]||""}xh.getProxyForUrl=bb});var kh=w(it=>{"use strict";var xb=it&&it.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),Sb=it&&it.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),Eh=it&&it.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&xb(e,i,t);return Sb(e,i),e};Object.defineProperty(it,"__esModule",{value:!0});it.req=it.json=it.toBuffer=void 0;var Eb=Eh(require("http")),Ob=Eh(require("https"));async function Oh(i){let e=0,t=[];for await(let r of i)e+=r.length,t.push(r);return Buffer.concat(t,e)}it.toBuffer=Oh;async function kb(i){let t=(await Oh(i)).toString("utf8");try{return JSON.parse(t)}catch(r){let n=r;throw n.message+=` (input: ${t})`,n}}it.json=kb;function Cb(i,e={}){let r=((typeof i=="string"?i:i.href).startsWith("https:")?Ob:Eb).request(i,e),n=new Promise((s,o)=>{r.once("response",s).once("error",o).end()});return r.then=n.then.bind(n),r}it.req=Cb});var ka=w(lt=>{"use strict";var Ah=lt&<.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),Ab=lt&<.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),Ih=lt&<.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&Ah(e,i,t);return Ab(e,i),e},Ib=lt&<.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ah(e,i,t)};Object.defineProperty(lt,"__esModule",{value:!0});lt.Agent=void 0;var Tb=Ih(require("net")),Ch=Ih(require("http")),Nb=require("https");Ib(kh(),lt);var Lt=Symbol("AgentBaseInternalState"),Oa=class extends Ch.Agent{constructor(e){super(e),this[Lt]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
|
|
9
|
+
`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new Tb.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let r=this.sockets[e],n=r.indexOf(t);n!==-1&&(r.splice(n,1),this.totalSocketCount--,r.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?Nb.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,r){let n={...t,secureEndpoint:this.isSecureEndpoint(t)},s=this.getName(n),o=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,n)).then(a=>{if(this.decrementSockets(s,o),a instanceof Ch.Agent)try{return a.addRequest(e,n)}catch(l){return r(l)}this[Lt].currentSocket=a,super.createSocket(e,t,r)},a=>{this.decrementSockets(s,o),r(a)})}createConnection(){let e=this[Lt].currentSocket;if(this[Lt].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){var e;return(e=this[Lt].defaultPort)!=null?e:this.protocol==="https:"?443:80}set defaultPort(e){this[Lt]&&(this[Lt].defaultPort=e)}get protocol(){var e;return(e=this[Lt].protocol)!=null?e:this.isSecureEndpoint()?"https:":"http:"}set protocol(e){this[Lt]&&(this[Lt].protocol=e)}};lt.Agent=Oa});var Th=w(Xi=>{"use strict";var Bb=Xi&&Xi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Xi,"__esModule",{value:!0});Xi.parseProxyResponse=void 0;var Pb=Bb(Dr()),Qn=(0,Pb.default)("https-proxy-agent:parse-proxy-response");function Lb(i){return new Promise((e,t)=>{let r=0,n=[];function s(){let u=i.read();u?c(u):i.once("readable",s)}function o(){i.removeListener("end",a),i.removeListener("error",l),i.removeListener("readable",s)}function a(){o(),Qn("onend"),t(new Error("Proxy connection ended before receiving CONNECT response"))}function l(u){o(),Qn("onerror %o",u),t(u)}function c(u){n.push(u),r+=u.length;let f=Buffer.concat(n,r),h=f.indexOf(`\r
|
|
10
10
|
\r
|
|
11
|
-
`);if(h===-1){
|
|
12
|
-
`),m=p.shift();if(!m)return i.destroy(),t(new Error("No header received from proxy CONNECT response"));let d=m.split(" "),g=+d[1],
|
|
11
|
+
`);if(h===-1){Qn("have not received end of HTTP headers yet..."),s();return}let p=f.slice(0,h).toString("ascii").split(`\r
|
|
12
|
+
`),m=p.shift();if(!m)return i.destroy(),t(new Error("No header received from proxy CONNECT response"));let d=m.split(" "),g=+d[1],v=d.slice(2).join(" "),b={};for(let y of p){if(!y)continue;let x=y.indexOf(":");if(x===-1)return i.destroy(),t(new Error(`Invalid header from proxy CONNECT response: "${y}"`));let _=y.slice(0,x).toLowerCase(),A=y.slice(x+1).trimStart(),E=b[_];typeof E=="string"?b[_]=[E,A]:Array.isArray(E)?E.push(A):b[_]=A}Qn("got proxy server response: %o %o",m,b),o(),e({connect:{statusCode:g,statusText:v,headers:b},buffered:f})}i.on("error",l),i.on("end",a),s()})}Xi.parseProxyResponse=Lb});var Mh=w(gt=>{"use strict";var Rb=gt&>.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),Mb=gt&>.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),Lh=gt&>.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&Rb(e,i,t);return Mb(e,i),e},Rh=gt&>.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(gt,"__esModule",{value:!0});gt.HttpsProxyAgent=void 0;var Xn=Lh(require("net")),Nh=Lh(require("tls")),Fb=Rh(require("assert")),Db=Rh(Dr()),qb=ka(),Ub=require("url"),jb=Th(),Vr=(0,Db.default)("https-proxy-agent"),Bh=i=>i.servername===void 0&&i.host&&!Xn.isIP(i.host)?{...i,servername:i.host}:i,es=class extends qb.Agent{constructor(e,t){var s;super(t),this.options={path:void 0},this.proxy=typeof e=="string"?new Ub.URL(e):e,this.proxyHeaders=(s=t==null?void 0:t.headers)!=null?s:{},Vr("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?Ph(t,"headers"):null,host:r,port:n}}async connect(e,t){let{proxy:r}=this;if(!t.host)throw new TypeError('No "host" provided');let n;r.protocol==="https:"?(Vr("Creating `tls.Socket`: %o",this.connectOpts),n=Nh.connect(Bh(this.connectOpts))):(Vr("Creating `net.Socket`: %o",this.connectOpts),n=Xn.connect(this.connectOpts));let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=Xn.isIPv6(t.host)?`[${t.host}]`:t.host,a=`CONNECT ${o}:${t.port} HTTP/1.1\r
|
|
13
13
|
`;if(r.username||r.password){let h=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(h).toString("base64")}`}s.Host=`${o}:${t.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let h of Object.keys(s))a+=`${h}: ${s[h]}\r
|
|
14
|
-
`;let l=(0,
|
|
15
|
-
`);let{connect:c,buffered:u}=await l;if(e.emit("proxyConnect",c),this.emit("proxyConnect",c,e),c.statusCode===200)return e.once("socket",Ub),t.secureEndpoint?(Vr("Upgrading socket connection to TLS"),Ch.connect({...Ih(Ah(t),"host","path","port"),socket:n})):n;n.destroy();let f=new Zn.Socket({writable:!1});return f.readable=!0,e.once("socket",h=>{Vr("Replaying proxy buffer for failed request"),(0,Rb.default)(h.listenerCount("data")>0),h.push(u),h.push(null)}),f}};Qn.protocols=["http","https"];dt.HttpsProxyAgent=Qn;function Ub(i){i.resume()}function Ih(i,...e){let t={},r;for(r in i)e.includes(r)||(t[r]=i[r]);return t}});var Rh=w((cN,Xn)=>{var Lh=Lh||function(i){return Buffer.from(i).toString("base64")};function jb(i){var e=this,t=Math.round,r=Math.floor,n=new Array(64),s=new Array(64),o=new Array(64),a=new Array(64),l,c,u,f,h=new Array(65535),p=new Array(65535),m=new Array(64),d=new Array(64),g=[],_=0,b=7,y=new Array(64),x=new Array(64),v=new Array(64),T=new Array(256),E=new Array(2048),C,S=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],I=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],A=[0,1,2,3,4,5,6,7,8,9,10,11],M=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],L=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],$=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],P=[0,1,2,3,4,5,6,7,8,9,10,11],F=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],V=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function G(O){for(var j=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],Y=0;Y<64;Y++){var W=r((j[Y]*O+50)/100);W<1?W=1:W>255&&(W=255),n[S[Y]]=W}for(var Z=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],Q=0;Q<64;Q++){var he=r((Z[Q]*O+50)/100);he<1?he=1:he>255&&(he=255),s[S[Q]]=he}for(var de=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Ae=0,we=0;we<8;we++)for(var B=0;B<8;B++)o[Ae]=1/(n[S[Ae]]*de[we]*de[B]*8),a[Ae]=1/(s[S[Ae]]*de[we]*de[B]*8),Ae++}function q(O,j){for(var Y=0,W=0,Z=new Array,Q=1;Q<=16;Q++){for(var he=1;he<=O[Q];he++)Z[j[W]]=[],Z[j[W]][0]=Y,Z[j[W]][1]=Q,W++,Y++;Y*=2}return Z}function Ee(){l=q(I,A),c=q($,P),u=q(M,L),f=q(F,V)}function ae(){for(var O=1,j=2,Y=1;Y<=15;Y++){for(var W=O;W<j;W++)p[32767+W]=Y,h[32767+W]=[],h[32767+W][1]=Y,h[32767+W][0]=W;for(var Z=-(j-1);Z<=-O;Z++)p[32767+Z]=Y,h[32767+Z]=[],h[32767+Z][1]=Y,h[32767+Z][0]=j-1+Z;O<<=1,j<<=1}}function te(){for(var O=0;O<256;O++)E[O]=19595*O,E[O+256>>0]=38470*O,E[O+512>>0]=7471*O+32768,E[O+768>>0]=-11059*O,E[O+1024>>0]=-21709*O,E[O+1280>>0]=32768*O+8421375,E[O+1536>>0]=-27439*O,E[O+1792>>0]=-5329*O}function ie(O){for(var j=O[0],Y=O[1]-1;Y>=0;)j&1<<Y&&(_|=1<<b),Y--,b--,b<0&&(_==255?(k(255),k(0)):k(_),b=7,_=0)}function k(O){g.push(O)}function H(O){k(O>>8&255),k(O&255)}function ye(O,j){var Y,W,Z,Q,he,de,Ae,we,B=0,U,J=8,Oe=64;for(U=0;U<J;++U){Y=O[B],W=O[B+1],Z=O[B+2],Q=O[B+3],he=O[B+4],de=O[B+5],Ae=O[B+6],we=O[B+7];var X=Y+we,oe=Y-we,_e=W+Ae,K=W-Ae,pe=Z+de,He=Z-de,Se=Q+he,ft=Q-he,It=X+Se,yi=X-Se,$i=_e+pe,Vi=_e-pe;O[B]=It+$i,O[B+4]=It-$i;var Tr=(Vi+yi)*.707106781;O[B+2]=yi+Tr,O[B+6]=yi-Tr,It=ft+He,$i=He+K,Vi=K+oe;var Nr=(It-Vi)*.382683433,Ln=.5411961*It+Nr,Br=1.306562965*Vi+Nr,Pr=$i*.707106781,Lr=oe+Pr,Rr=oe-Pr;O[B+5]=Rr+Ln,O[B+3]=Rr-Ln,O[B+1]=Lr+Br,O[B+7]=Lr-Br,B+=8}for(B=0,U=0;U<J;++U){Y=O[B],W=O[B+8],Z=O[B+16],Q=O[B+24],he=O[B+32],de=O[B+40],Ae=O[B+48],we=O[B+56];var Gu=Y+we,$o=Y-we,Yu=W+Ae,Ku=W-Ae,zu=Z+de,Ju=Z-de,Zu=Q+he,s_=Q-he,Mr=Gu+Zu,Vo=Gu-Zu,Rn=Yu+zu,Mn=Yu-zu;O[B]=Mr+Rn,O[B+32]=Mr-Rn;var Qu=(Mn+Vo)*.707106781;O[B+16]=Vo+Qu,O[B+48]=Vo-Qu,Mr=s_+Ju,Rn=Ju+Ku,Mn=Ku+$o;var Xu=(Mr-Mn)*.382683433,ef=.5411961*Mr+Xu,tf=1.306562965*Mn+Xu,rf=Rn*.707106781,nf=$o+rf,sf=$o-rf;O[B+40]=sf+ef,O[B+24]=sf-ef,O[B+8]=nf+tf,O[B+56]=nf-tf,B++}var Fn;for(U=0;U<Oe;++U)Fn=O[U]*j[U],m[U]=Fn>0?Fn+.5|0:Fn-.5|0;return m}function ve(){H(65504),H(16),k(74),k(70),k(73),k(70),k(0),k(1),k(1),k(0),H(1),H(1),k(0),k(0)}function le(O){if(O){H(65505),O[0]===69&&O[1]===120&&O[2]===105&&O[3]===102?H(O.length+2):(H(O.length+5+2),k(69),k(120),k(105),k(102),k(0));for(var j=0;j<O.length;j++)k(O[j])}}function ce(O,j){H(65472),H(17),k(8),H(j),H(O),k(3),k(1),k(17),k(0),k(2),k(17),k(1),k(3),k(17),k(1)}function re(){H(65499),H(132),k(0);for(var O=0;O<64;O++)k(n[O]);k(1);for(var j=0;j<64;j++)k(s[j])}function D(){H(65476),H(418),k(0);for(var O=0;O<16;O++)k(I[O+1]);for(var j=0;j<=11;j++)k(A[j]);k(16);for(var Y=0;Y<16;Y++)k(M[Y+1]);for(var W=0;W<=161;W++)k(L[W]);k(1);for(var Z=0;Z<16;Z++)k($[Z+1]);for(var Q=0;Q<=11;Q++)k(P[Q]);k(17);for(var he=0;he<16;he++)k(F[he+1]);for(var de=0;de<=161;de++)k(V[de])}function R(O){typeof O=="undefined"||O.constructor!==Array||O.forEach(j=>{if(typeof j=="string"){H(65534);var Y=j.length;H(Y+2);var W;for(W=0;W<Y;W++)k(j.charCodeAt(W))}})}function be(){H(65498),H(12),k(3),k(1),k(0),k(2),k(17),k(3),k(17),k(0),k(63),k(0)}function z(O,j,Y,W,Z){for(var Q=Z[0],he=Z[240],de,Ae=16,we=63,B=64,U=ye(O,j),J=0;J<B;++J)d[S[J]]=U[J];var Oe=d[0]-Y;Y=d[0],Oe==0?ie(W[0]):(de=32767+Oe,ie(W[p[de]]),ie(h[de]));for(var X=63;X>0&&d[X]==0;X--);if(X==0)return ie(Q),Y;for(var oe=1,_e;oe<=X;){for(var K=oe;d[oe]==0&&oe<=X;++oe);var pe=oe-K;if(pe>=Ae){_e=pe>>4;for(var He=1;He<=_e;++He)ie(he);pe=pe&15}de=32767+d[oe],ie(Z[(pe<<4)+p[de]]),ie(h[de]),oe++}return X!=we&&ie(Q),Y}function ne(){for(var O=String.fromCharCode,j=0;j<256;j++)T[j]=O(j)}this.encode=function(O,j){var Y=new Date().getTime();j&&ut(j),g=new Array,_=0,b=7,H(65496),ve(),R(O.comments),le(O.exifBuffer),re(),ce(O.width,O.height),D(),be();var W=0,Z=0,Q=0;_=0,b=7,this.encode.displayName="_encode_";for(var he=O.data,de=O.width,Ae=O.height,we=de*4,B=de*3,U,J=0,Oe,X,oe,_e,K,pe,He,Se;J<Ae;){for(U=0;U<we;){for(_e=we*J+U,K=_e,pe=-1,He=0,Se=0;Se<64;Se++)He=Se>>3,pe=(Se&7)*4,K=_e+He*we+pe,J+He>=Ae&&(K-=we*(J+1+He-Ae)),U+pe>=we&&(K-=U+pe-we+4),Oe=he[K++],X=he[K++],oe=he[K++],y[Se]=(E[Oe]+E[X+256>>0]+E[oe+512>>0]>>16)-128,x[Se]=(E[Oe+768>>0]+E[X+1024>>0]+E[oe+1280>>0]>>16)-128,v[Se]=(E[Oe+1280>>0]+E[X+1536>>0]+E[oe+1792>>0]>>16)-128;W=z(y,o,W,l,u),Z=z(x,a,Z,c,f),Q=z(v,a,Q,c,f),U+=32}J+=8}if(b>=0){var ft=[];ft[1]=b+1,ft[0]=(1<<b+1)-1,ie(ft)}if(H(65497),typeof Xn=="undefined")return new Uint8Array(g);return Buffer.from(g);var It,yi};function ut(O){if(O<=0&&(O=1),O>100&&(O=100),C!=O){var j=0;O<50?j=Math.floor(5e3/O):j=Math.floor(200-O*2),G(j),C=O}}function St(){var O=new Date().getTime();i||(i=50),ne(),Ee(),ae(),te(),ut(i);var j=new Date().getTime()-O}St()}typeof Xn!="undefined"?Xn.exports=Ph:typeof window!="undefined"&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].encode=Ph);function Ph(i,e){typeof e=="undefined"&&(e=50);var t=new jb(e),r=t.encode(i,e);return{data:r,width:i.width,height:i.height}}});var Fh=w((uN,Ca)=>{var ka=(function(){"use strict";var e=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,r=799,n=3406,s=2276,o=1567,a=3784,l=5793,c=2896;function u(){}function f(b,y){for(var x=0,v=[],T,E,C=16;C>0&&!b[C-1];)C--;v.push({children:[],index:0});var S=v[0],I;for(T=0;T<C;T++){for(E=0;E<b[T];E++){for(S=v.pop(),S.children[S.index]=y[x];S.index>0;){if(v.length===0)throw new Error("Could not recreate Huffman Table");S=v.pop()}for(S.index++,v.push(S);v.length<=T;)v.push(I={children:[],index:0}),S.children[S.index]=I.children,S=I;x++}T+1<C&&(v.push(I={children:[],index:0}),S.children[S.index]=I.children,S=I)}return v[0].children}function h(b,y,x,v,T,E,C,S,I,A){var M=x.precision,L=x.samplesPerLine,$=x.scanLines,P=x.mcusPerLine,F=x.progressive,V=x.maxH,G=x.maxV,q=y,Ee=0,ae=0;function te(){if(ae>0)return ae--,Ee>>ae&1;if(Ee=b[y++],Ee==255){var B=b[y++];if(B)throw new Error("unexpected marker: "+(Ee<<8|B).toString(16))}return ae=7,Ee>>>7}function ie(B){for(var U=B,J;(J=te())!==null;){if(U=U[J],typeof U=="number")return U;if(typeof U!="object")throw new Error("invalid huffman sequence")}return null}function k(B){for(var U=0;B>0;){var J=te();if(J===null)return;U=U<<1|J,B--}return U}function H(B){var U=k(B);return U>=1<<B-1?U:U+(-1<<B)+1}function ye(B,U){var J=ie(B.huffmanTableDC),Oe=J===0?0:H(J);U[0]=B.pred+=Oe;for(var X=1;X<64;){var oe=ie(B.huffmanTableAC),_e=oe&15,K=oe>>4;if(_e===0){if(K<15)break;X+=16;continue}X+=K;var pe=e[X];U[pe]=H(_e),X++}}function ve(B,U){var J=ie(B.huffmanTableDC),Oe=J===0?0:H(J)<<I;U[0]=B.pred+=Oe}function le(B,U){U[0]|=te()<<I}var ce=0;function re(B,U){if(ce>0){ce--;return}for(var J=E,Oe=C;J<=Oe;){var X=ie(B.huffmanTableAC),oe=X&15,_e=X>>4;if(oe===0){if(_e<15){ce=k(_e)+(1<<_e)-1;break}J+=16;continue}J+=_e;var K=e[J];U[K]=H(oe)*(1<<I),J++}}var D=0,R;function be(B,U){for(var J=E,Oe=C,X=0;J<=Oe;){var oe=e[J],_e=U[oe]<0?-1:1;switch(D){case 0:var K=ie(B.huffmanTableAC),pe=K&15,X=K>>4;if(pe===0)X<15?(ce=k(X)+(1<<X),D=4):(X=16,D=1);else{if(pe!==1)throw new Error("invalid ACn encoding");R=H(pe),D=X?2:3}continue;case 1:case 2:U[oe]?U[oe]+=(te()<<I)*_e:(X--,X===0&&(D=D==2?3:0));break;case 3:U[oe]?U[oe]+=(te()<<I)*_e:(U[oe]=R<<I,D=0);break;case 4:U[oe]&&(U[oe]+=(te()<<I)*_e);break}J++}D===4&&(ce--,ce===0&&(D=0))}function z(B,U,J,Oe,X){var oe=J/P|0,_e=J%P,K=oe*B.v+Oe,pe=_e*B.h+X;B.blocks[K]===void 0&&A.tolerantDecoding||U(B,B.blocks[K][pe])}function ne(B,U,J){var Oe=J/B.blocksPerLine|0,X=J%B.blocksPerLine;B.blocks[Oe]===void 0&&A.tolerantDecoding||U(B,B.blocks[Oe][X])}var ut=v.length,St,O,j,Y,W,Z;F?E===0?Z=S===0?ve:le:Z=S===0?re:be:Z=ye;var Q=0,he,de;ut==1?de=v[0].blocksPerLine*v[0].blocksPerColumn:de=P*x.mcusPerColumn,T||(T=de);for(var Ae,we;Q<de;){for(O=0;O<ut;O++)v[O].pred=0;if(ce=0,ut==1)for(St=v[0],W=0;W<T;W++)ne(St,Z,Q),Q++;else for(W=0;W<T;W++){for(O=0;O<ut;O++)for(St=v[O],Ae=St.h,we=St.v,j=0;j<we;j++)for(Y=0;Y<Ae;Y++)z(St,Z,Q,j,Y);if(Q++,Q===de)break}if(Q===de)do{if(b[y]===255&&b[y+1]!==0)break;y+=1}while(y<b.length-2);if(ae=0,he=b[y]<<8|b[y+1],he<65280)throw new Error("marker was not found");if(he>=65488&&he<=65495)y+=2;else break}return y-q}function p(b,y){var x=[],v=y.blocksPerLine,T=y.blocksPerColumn,E=v<<3,C=new Int32Array(64),S=new Uint8Array(64);function I(q,Ee,ae){var te=y.quantizationTable,ie,k,H,ye,ve,le,ce,re,D,R=ae,be;for(be=0;be<64;be++)R[be]=q[be]*te[be];for(be=0;be<8;++be){var z=8*be;if(R[1+z]==0&&R[2+z]==0&&R[3+z]==0&&R[4+z]==0&&R[5+z]==0&&R[6+z]==0&&R[7+z]==0){D=l*R[0+z]+512>>10,R[0+z]=D,R[1+z]=D,R[2+z]=D,R[3+z]=D,R[4+z]=D,R[5+z]=D,R[6+z]=D,R[7+z]=D;continue}ie=l*R[0+z]+128>>8,k=l*R[4+z]+128>>8,H=R[2+z],ye=R[6+z],ve=c*(R[1+z]-R[7+z])+128>>8,re=c*(R[1+z]+R[7+z])+128>>8,le=R[3+z]<<4,ce=R[5+z]<<4,D=ie-k+1>>1,ie=ie+k+1>>1,k=D,D=H*a+ye*o+128>>8,H=H*o-ye*a+128>>8,ye=D,D=ve-ce+1>>1,ve=ve+ce+1>>1,ce=D,D=re+le+1>>1,le=re-le+1>>1,re=D,D=ie-ye+1>>1,ie=ie+ye+1>>1,ye=D,D=k-H+1>>1,k=k+H+1>>1,H=D,D=ve*s+re*n+2048>>12,ve=ve*n-re*s+2048>>12,re=D,D=le*r+ce*t+2048>>12,le=le*t-ce*r+2048>>12,ce=D,R[0+z]=ie+re,R[7+z]=ie-re,R[1+z]=k+ce,R[6+z]=k-ce,R[2+z]=H+le,R[5+z]=H-le,R[3+z]=ye+ve,R[4+z]=ye-ve}for(be=0;be<8;++be){var ne=be;if(R[8+ne]==0&&R[16+ne]==0&&R[24+ne]==0&&R[32+ne]==0&&R[40+ne]==0&&R[48+ne]==0&&R[56+ne]==0){D=l*ae[be+0]+8192>>14,R[0+ne]=D,R[8+ne]=D,R[16+ne]=D,R[24+ne]=D,R[32+ne]=D,R[40+ne]=D,R[48+ne]=D,R[56+ne]=D;continue}ie=l*R[0+ne]+2048>>12,k=l*R[32+ne]+2048>>12,H=R[16+ne],ye=R[48+ne],ve=c*(R[8+ne]-R[56+ne])+2048>>12,re=c*(R[8+ne]+R[56+ne])+2048>>12,le=R[24+ne],ce=R[40+ne],D=ie-k+1>>1,ie=ie+k+1>>1,k=D,D=H*a+ye*o+2048>>12,H=H*o-ye*a+2048>>12,ye=D,D=ve-ce+1>>1,ve=ve+ce+1>>1,ce=D,D=re+le+1>>1,le=re-le+1>>1,re=D,D=ie-ye+1>>1,ie=ie+ye+1>>1,ye=D,D=k-H+1>>1,k=k+H+1>>1,H=D,D=ve*s+re*n+2048>>12,ve=ve*n-re*s+2048>>12,re=D,D=le*r+ce*t+2048>>12,le=le*t-ce*r+2048>>12,ce=D,R[0+ne]=ie+re,R[56+ne]=ie-re,R[8+ne]=k+ce,R[48+ne]=k-ce,R[16+ne]=H+le,R[40+ne]=H-le,R[24+ne]=ye+ve,R[32+ne]=ye-ve}for(be=0;be<64;++be){var ut=128+(R[be]+8>>4);Ee[be]=ut<0?0:ut>255?255:ut}}_(E*T*8);for(var A,M,L=0;L<T;L++){var $=L<<3;for(A=0;A<8;A++)x.push(new Uint8Array(E));for(var P=0;P<v;P++){I(y.blocks[L][P],S,C);var F=0,V=P<<3;for(M=0;M<8;M++){var G=x[$+M];for(A=0;A<8;A++)G[V+A]=S[F++]}}}return x}function m(b){return b<0?0:b>255?255:b}u.prototype={load:function(y){var x=new XMLHttpRequest;x.open("GET",y,!0),x.responseType="arraybuffer",x.onload=(function(){var v=new Uint8Array(x.response||x.mozResponseArrayBuffer);this.parse(v),this.onload&&this.onload()}).bind(this),x.send(null)},parse:function(y){var x=this.opts.maxResolutionInMP*1e3*1e3,v=0,T=y.length;function E(){var K=y[v]<<8|y[v+1];return v+=2,K}function C(){var K=E(),pe=y.subarray(v,v+K-2);return v+=pe.length,pe}function S(K){var pe=1,He=1,Se,ft;for(ft in K.components)K.components.hasOwnProperty(ft)&&(Se=K.components[ft],pe<Se.h&&(pe=Se.h),He<Se.v&&(He=Se.v));var It=Math.ceil(K.samplesPerLine/8/pe),yi=Math.ceil(K.scanLines/8/He);for(ft in K.components)if(K.components.hasOwnProperty(ft)){Se=K.components[ft];var $i=Math.ceil(Math.ceil(K.samplesPerLine/8)*Se.h/pe),Vi=Math.ceil(Math.ceil(K.scanLines/8)*Se.v/He),Tr=It*Se.h,Nr=yi*Se.v,Ln=Nr*Tr,Br=[];_(Ln*256);for(var Pr=0;Pr<Nr;Pr++){for(var Lr=[],Rr=0;Rr<Tr;Rr++)Lr.push(new Int32Array(64));Br.push(Lr)}Se.blocksPerLine=$i,Se.blocksPerColumn=Vi,Se.blocks=Br}K.maxH=pe,K.maxV=He,K.mcusPerLine=It,K.mcusPerColumn=yi}var I=null,A=null,M=null,L,$,P=[],F=[],V=[],G=[],q=E(),Ee=-1;if(this.comments=[],q!=65496)throw new Error("SOI not found");for(q=E();q!=65497;){var ae,te,ie;switch(q){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var k=C();if(q===65534){var H=String.fromCharCode.apply(null,k);this.comments.push(H)}q===65504&&k[0]===74&&k[1]===70&&k[2]===73&&k[3]===70&&k[4]===0&&(I={version:{major:k[5],minor:k[6]},densityUnits:k[7],xDensity:k[8]<<8|k[9],yDensity:k[10]<<8|k[11],thumbWidth:k[12],thumbHeight:k[13],thumbData:k.subarray(14,14+3*k[12]*k[13])}),q===65505&&k[0]===69&&k[1]===120&&k[2]===105&&k[3]===102&&k[4]===0&&(this.exifBuffer=k.subarray(5,k.length)),q===65518&&k[0]===65&&k[1]===100&&k[2]===111&&k[3]===98&&k[4]===101&&k[5]===0&&(A={version:k[6],flags0:k[7]<<8|k[8],flags1:k[9]<<8|k[10],transformCode:k[11]});break;case 65499:for(var ye=E(),ve=ye+v-2;v<ve;){var le=y[v++];_(256);var ce=new Int32Array(64);if(le>>4===0)for(te=0;te<64;te++){var re=e[te];ce[re]=y[v++]}else if(le>>4===1)for(te=0;te<64;te++){var re=e[te];ce[re]=E()}else throw new Error("DQT: invalid table spec");P[le&15]=ce}break;case 65472:case 65473:case 65474:E(),L={},L.extended=q===65473,L.progressive=q===65474,L.precision=y[v++],L.scanLines=E(),L.samplesPerLine=E(),L.components={},L.componentsOrder=[];var D=L.scanLines*L.samplesPerLine;if(D>x){var R=Math.ceil((D-x)/1e6);throw new Error(`maxResolutionInMP limit exceeded by ${R}MP`)}var be=y[v++],z,ne=0,ut=0;for(ae=0;ae<be;ae++){z=y[v];var St=y[v+1]>>4,O=y[v+1]&15,j=y[v+2];if(St<=0||O<=0)throw new Error("Invalid sampling factor, expected values above 0");L.componentsOrder.push(z),L.components[z]={h:St,v:O,quantizationIdx:j},v+=3}S(L),F.push(L);break;case 65476:var Y=E();for(ae=2;ae<Y;){var W=y[v++],Z=new Uint8Array(16),Q=0;for(te=0;te<16;te++,v++)Q+=Z[te]=y[v];_(16+Q);var he=new Uint8Array(Q);for(te=0;te<Q;te++,v++)he[te]=y[v];ae+=17+Q,(W>>4===0?G:V)[W&15]=f(Z,he)}break;case 65501:E(),$=E();break;case 65500:E(),E();break;case 65498:var de=E(),Ae=y[v++],we=[],B;for(ae=0;ae<Ae;ae++){B=L.components[y[v++]];var U=y[v++];B.huffmanTableDC=G[U>>4],B.huffmanTableAC=V[U&15],we.push(B)}var J=y[v++],Oe=y[v++],X=y[v++],oe=h(y,v,L,we,$,J,Oe,X>>4,X&15,this.opts);v+=oe;break;case 65535:y[v]!==255&&v--;break;default:if(y[v-3]==255&&y[v-2]>=192&&y[v-2]<=254){v-=3;break}else if(q===224||q==225){if(Ee!==-1)throw new Error(`first unknown JPEG marker at offset ${Ee.toString(16)}, second unknown JPEG marker ${q.toString(16)} at offset ${(v-1).toString(16)}`);Ee=v-1;let K=E();if(y[v+K-2]===255){v+=K-2;break}}throw new Error("unknown JPEG marker "+q.toString(16))}q=E()}if(F.length!=1)throw new Error("only single frame JPEGs supported");for(var ae=0;ae<F.length;ae++){var _e=F[ae].components;for(var te in _e)_e[te].quantizationTable=P[_e[te].quantizationIdx],delete _e[te].quantizationIdx}this.width=L.samplesPerLine,this.height=L.scanLines,this.jfif=I,this.adobe=A,this.components=[];for(var ae=0;ae<L.componentsOrder.length;ae++){var B=L.components[L.componentsOrder[ae]];this.components.push({lines:p(L,B),scaleX:B.h/L.maxH,scaleY:B.v/L.maxV})}},getData:function(y,x){var v=this.width/y,T=this.height/x,E,C,S,I,A,M,L,$,P,F,V=0,G,q,Ee,ae,te,ie,k,H,ye,ve,le,ce=y*x*this.components.length;_(ce);var re=new Uint8Array(ce);switch(this.components.length){case 1:for(E=this.components[0],F=0;F<x;F++)for(A=E.lines[0|F*E.scaleY*T],P=0;P<y;P++)G=A[0|P*E.scaleX*v],re[V++]=G;break;case 2:for(E=this.components[0],C=this.components[1],F=0;F<x;F++)for(A=E.lines[0|F*E.scaleY*T],M=C.lines[0|F*C.scaleY*T],P=0;P<y;P++)G=A[0|P*E.scaleX*v],re[V++]=G,G=M[0|P*C.scaleX*v],re[V++]=G;break;case 3:for(le=!0,this.adobe&&this.adobe.transformCode?le=!0:typeof this.opts.colorTransform!="undefined"&&(le=!!this.opts.colorTransform),E=this.components[0],C=this.components[1],S=this.components[2],F=0;F<x;F++)for(A=E.lines[0|F*E.scaleY*T],M=C.lines[0|F*C.scaleY*T],L=S.lines[0|F*S.scaleY*T],P=0;P<y;P++)le?(G=A[0|P*E.scaleX*v],q=M[0|P*C.scaleX*v],Ee=L[0|P*S.scaleX*v],H=m(G+1.402*(Ee-128)),ye=m(G-.3441363*(q-128)-.71413636*(Ee-128)),ve=m(G+1.772*(q-128))):(H=A[0|P*E.scaleX*v],ye=M[0|P*C.scaleX*v],ve=L[0|P*S.scaleX*v]),re[V++]=H,re[V++]=ye,re[V++]=ve;break;case 4:if(!this.adobe)throw new Error("Unsupported color mode (4 components)");for(le=!1,this.adobe&&this.adobe.transformCode?le=!0:typeof this.opts.colorTransform!="undefined"&&(le=!!this.opts.colorTransform),E=this.components[0],C=this.components[1],S=this.components[2],I=this.components[3],F=0;F<x;F++)for(A=E.lines[0|F*E.scaleY*T],M=C.lines[0|F*C.scaleY*T],L=S.lines[0|F*S.scaleY*T],$=I.lines[0|F*I.scaleY*T],P=0;P<y;P++)le?(G=A[0|P*E.scaleX*v],q=M[0|P*C.scaleX*v],Ee=L[0|P*S.scaleX*v],ae=$[0|P*I.scaleX*v],te=255-m(G+1.402*(Ee-128)),ie=255-m(G-.3441363*(q-128)-.71413636*(Ee-128)),k=255-m(G+1.772*(q-128))):(te=A[0|P*E.scaleX*v],ie=M[0|P*C.scaleX*v],k=L[0|P*S.scaleX*v],ae=$[0|P*I.scaleX*v]),re[V++]=255-te,re[V++]=255-ie,re[V++]=255-k,re[V++]=255-ae;break;default:throw new Error("Unsupported color mode")}return re},copyToImageData:function(y,x){var v=y.width,T=y.height,E=y.data,C=this.getData(v,T),S=0,I=0,A,M,L,$,P,F,V,G,q;switch(this.components.length){case 1:for(M=0;M<T;M++)for(A=0;A<v;A++)L=C[S++],E[I++]=L,E[I++]=L,E[I++]=L,x&&(E[I++]=255);break;case 3:for(M=0;M<T;M++)for(A=0;A<v;A++)V=C[S++],G=C[S++],q=C[S++],E[I++]=V,E[I++]=G,E[I++]=q,x&&(E[I++]=255);break;case 4:for(M=0;M<T;M++)for(A=0;A<v;A++)P=C[S++],F=C[S++],L=C[S++],$=C[S++],V=255-m(P*(1-$/255)+$),G=255-m(F*(1-$/255)+$),q=255-m(L*(1-$/255)+$),E[I++]=V,E[I++]=G,E[I++]=q,x&&(E[I++]=255);break;default:throw new Error("Unsupported color mode")}}};var d=0,g=0;function _(b=0){var y=d+b;if(y>g){var x=Math.ceil((y-g)/1024/1024);throw new Error(`maxMemoryUsageInMB limit exceeded by at least ${x}MB`)}d=y}return u.resetMaxMemoryUsage=function(b){d=0,g=b},u.getBytesAllocated=function(){return d},u.requestMemoryAllocation=_,u})();typeof Ca!="undefined"?Ca.exports=Mh:typeof window!="undefined"&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].decode=Mh);function Mh(i,e={}){var t={colorTransform:void 0,useTArray:!1,formatAsRGBA:!0,tolerantDecoding:!0,maxResolutionInMP:100,maxMemoryUsageInMB:512},r={...t,...e},n=new Uint8Array(i),s=new ka;s.opts=r,ka.resetMaxMemoryUsage(r.maxMemoryUsageInMB*1024*1024),s.parse(n);var o=r.formatAsRGBA?4:3,a=s.width*s.height*o;try{ka.requestMemoryAllocation(a);var l={width:s.width,height:s.height,exifBuffer:s.exifBuffer,data:r.useTArray?new Uint8Array(a):Buffer.alloc(a)};s.comments.length>0&&(l.comments=s.comments)}catch(c){throw c instanceof RangeError?new Error("Could not allocate enough memory for the image. Required: "+a):c instanceof ReferenceError&&c.message==="Buffer is not defined"?new Error("Buffer is not globally defined in this environment. Consider setting useTArray to true"):c}return s.copyToImageData(l,r.formatAsRGBA),l}});var Dh=w((fN,qh)=>{var $b=Rh(),Vb=Fh();qh.exports={encode:$b,decode:Vb}});var jh=w((hN,Uh)=>{"use strict";function es(){this._types=Object.create(null),this._extensions=Object.create(null);for(let i=0;i<arguments.length;i++)this.define(arguments[i]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}es.prototype.define=function(i,e){for(let t in i){let r=i[t].map(function(n){return n.toLowerCase()});t=t.toLowerCase();for(let n=0;n<r.length;n++){let s=r[n];if(s[0]!=="*"){if(!e&&s in this._types)throw new Error('Attempt to change mapping for "'+s+'" extension from "'+this._types[s]+'" to "'+t+'". Pass `force=true` to allow this, otherwise remove "'+s+'" from the list of extensions for "'+t+'".');this._types[s]=t}}if(e||!this._extensions[t]){let n=r[0];this._extensions[t]=n[0]!=="*"?n:n.substr(1)}}};es.prototype.getType=function(i){i=String(i);let e=i.replace(/^.*[/\\]/,"").toLowerCase(),t=e.replace(/^.*\./,"").toLowerCase(),r=e.length<i.length;return(t.length<e.length-1||!r)&&this._types[t]||null};es.prototype.getExtension=function(i){return i=/^\s*([^;\s]*)/.test(i)&&RegExp.$1,i&&this._extensions[i.toLowerCase()]||null};Uh.exports=es});var Vh=w((dN,$h)=>{$h.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}});var Wh=w((pN,Hh)=>{Hh.exports={"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}});var Yh=w((mN,Gh)=>{"use strict";var Hb=jh();Gh.exports=new Hb(Vh(),Wh())});var zh=w((gN,Kh)=>{Kh.exports=function(i,e){for(var t=[],r=0;r<i.length;r++){var n=e(i[r],r);Wb(n)?t.push.apply(t,n):t.push(n)}return t};var Wb=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"}});var ed=w((yN,Xh)=>{"use strict";Xh.exports=Zh;function Zh(i,e,t){i instanceof RegExp&&(i=Jh(i,t)),e instanceof RegExp&&(e=Jh(e,t));var r=Qh(i,e,t);return r&&{start:r[0],end:r[1],pre:t.slice(0,r[0]),body:t.slice(r[0]+i.length,r[1]),post:t.slice(r[1]+e.length)}}function Jh(i,e){var t=e.match(i);return t?t[0]:null}Zh.range=Qh;function Qh(i,e,t){var r,n,s,o,a,l=t.indexOf(i),c=t.indexOf(e,l+1),u=l;if(l>=0&&c>0){if(i===e)return[l,c];for(r=[],s=t.length;u>=0&&!a;)u==l?(r.push(u),l=t.indexOf(i,u+1)):r.length==1?a=[r.pop(),c]:(n=r.pop(),n<s&&(s=n,o=c),c=t.indexOf(e,u+1)),u=l<c&&l>=0?l:c;r.length&&(a=[s,o])}return a}});var ld=w((vN,ad)=>{var Gb=zh(),td=ed();ad.exports=zb;var id="\0SLASH"+Math.random()+"\0",rd="\0OPEN"+Math.random()+"\0",Ia="\0CLOSE"+Math.random()+"\0",nd="\0COMMA"+Math.random()+"\0",sd="\0PERIOD"+Math.random()+"\0";function Aa(i){return parseInt(i,10)==i?parseInt(i,10):i.charCodeAt(0)}function Yb(i){return i.split("\\\\").join(id).split("\\{").join(rd).split("\\}").join(Ia).split("\\,").join(nd).split("\\.").join(sd)}function Kb(i){return i.split(id).join("\\").split(rd).join("{").split(Ia).join("}").split(nd).join(",").split(sd).join(".")}function od(i){if(!i)return[""];var e=[],t=td("{","}",i);if(!t)return i.split(",");var r=t.pre,n=t.body,s=t.post,o=r.split(",");o[o.length-1]+="{"+n+"}";var a=od(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function zb(i,e){if(!i)return[];e=e||{};var t=e.max==null?1/0:e.max;return i.substr(0,2)==="{}"&&(i="\\{\\}"+i.substr(2)),Qi(Yb(i),t,!0).map(Kb)}function Jb(i){return"{"+i+"}"}function Zb(i){return/^-?0\d/.test(i)}function Qb(i,e){return i<=e}function Xb(i,e){return i>=e}function Qi(i,e,t){var r=[],n=td("{","}",i);if(!n||/\$$/.test(n.pre))return[i];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),a=s||o,l=n.body.indexOf(",")>=0;if(!a&&!l)return n.post.match(/,(?!,).*\}/)?(i=n.pre+"{"+n.body+Ia+n.post,Qi(i,e,!0)):[i];var c;if(a)c=n.body.split(/\.\./);else if(c=od(n.body),c.length===1&&(c=Qi(c[0],e,!1).map(Jb),c.length===1)){var f=n.post.length?Qi(n.post,e,!1):[""];return f.map(function(M){return n.pre+c[0]+M})}var u=n.pre,f=n.post.length?Qi(n.post,e,!1):[""],h;if(a){var p=Aa(c[0]),m=Aa(c[1]),d=Math.max(c[0].length,c[1].length),g=c.length==3?Math.max(Math.abs(Aa(c[2])),1):1,_=Qb,b=m<p;b&&(g*=-1,_=Xb);var y=c.some(Zb);h=[];for(var x=p;_(x,m);x+=g){var v;if(o)v=String.fromCharCode(x),v==="\\"&&(v="");else if(v=String(x),y){var T=d-v.length;if(T>0){var E=new Array(T+1).join("0");x<0?v="-"+E+v.slice(1):v=E+v}}h.push(v)}}else h=Gb(c,function(A){return Qi(A,e,!1)});for(var C=0;C<h.length;C++)for(var S=0;S<f.length&&r.length<e;S++){var I=u+h[C]+f[S];(!t||a||I)&&r.push(I)}return r}});var pd=w((_N,dd)=>{dd.exports=at;at.Minimatch=Pe;var Hr=(function(){try{return require("path")}catch{}})()||{sep:"/"};at.sep=Hr.sep;var bi=at.GLOBSTAR=Pe.GLOBSTAR={},ew=ld(),cd={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Ta="[^/]",Na=Ta+"*?",tw="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",iw="(?:(?!(?:\\/|^)\\.).)*?",ud=rw("().*{}+?[]^$\\!");function rw(i){return i.split("").reduce(function(e,t){return e[t]=!0,e},{})}var fd=/\/+/;at.filter=nw;function nw(i,e){return e=e||{},function(t,r,n){return at(t,i,e)}}function Zt(i,e){e=e||{};var t={};return Object.keys(i).forEach(function(r){t[r]=i[r]}),Object.keys(e).forEach(function(r){t[r]=e[r]}),t}at.defaults=function(i){if(!i||typeof i!="object"||!Object.keys(i).length)return at;var e=at,t=function(n,s,o){return e(n,s,Zt(i,o))};return t.Minimatch=function(n,s){return new e.Minimatch(n,Zt(i,s))},t.Minimatch.defaults=function(n){return e.defaults(Zt(i,n)).Minimatch},t.filter=function(n,s){return e.filter(n,Zt(i,s))},t.defaults=function(n){return e.defaults(Zt(i,n))},t.makeRe=function(n,s){return e.makeRe(n,Zt(i,s))},t.braceExpand=function(n,s){return e.braceExpand(n,Zt(i,s))},t.match=function(r,n,s){return e.match(r,n,Zt(i,s))},t};Pe.defaults=function(i){return at.defaults(i).Minimatch};function at(i,e,t){return is(e),t||(t={}),!t.nocomment&&e.charAt(0)==="#"?!1:new Pe(e,t).match(i)}function Pe(i,e){if(!(this instanceof Pe))return new Pe(i,e);is(i),e||(e={}),i=i.trim(),!e.allowWindowsEscape&&Hr.sep!=="/"&&(i=i.split(Hr.sep).join("/")),this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion!==void 0?e.maxGlobstarRecursion:200,this.set=[],this.pattern=i,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}Pe.prototype.debug=function(){};Pe.prototype.make=sw;function sw(){var i=this.pattern,e=this.options;if(!e.nocomment&&i.charAt(0)==="#"){this.comment=!0;return}if(!i){this.empty=!0;return}this.parseNegate();var t=this.globSet=this.braceExpand();e.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,t),t=this.globParts=t.map(function(r){return r.split(fd)}),this.debug(this.pattern,t),t=t.map(function(r,n,s){return r.map(this.parse,this)},this),this.debug(this.pattern,t),t=t.filter(function(r){return r.indexOf(!1)===-1}),this.debug(this.pattern,t),this.set=t}Pe.prototype.parseNegate=ow;function ow(){var i=this.pattern,e=!1,t=this.options,r=0;if(!t.nonegate){for(var n=0,s=i.length;n<s&&i.charAt(n)==="!";n++)e=!e,r++;r&&(this.pattern=i.substr(r)),this.negate=e}}at.braceExpand=function(i,e){return hd(i,e)};Pe.prototype.braceExpand=hd;function hd(i,e){return e||(this instanceof Pe?e=this.options:e={}),i=typeof i=="undefined"?this.pattern:i,is(i),e.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:ew(i)}var aw=1024*64,is=function(i){if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>aw)throw new TypeError("pattern is too long")};Pe.prototype.parse=lw;var ts={};function lw(i,e){is(i);var t=this.options;if(i==="**")if(t.noglobstar)i="*";else return bi;if(i==="")return"";var r="",n=!!t.nocase,s=!1,o=[],a=[],l,c=!1,u=-1,f=-1,h=i.charAt(0)==="."?"":t.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",p=this;function m(){if(l){switch(l){case"*":r+=Na,n=!0;break;case"?":r+=Ta,n=!0;break;default:r+="\\"+l;break}p.debug("clearStateChar %j %j",l,r),l=!1}}for(var d=0,g=i.length,_;d<g&&(_=i.charAt(d));d++){if(this.debug("%s %s %s %j",i,d,r,_),s&&ud[_]){r+="\\"+_,s=!1;continue}switch(_){case"/":return!1;case"\\":m(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",i,d,r,_),c){this.debug(" in class"),_==="!"&&d===f+1&&(_="^"),r+=_;continue}if(_==="*"&&l==="*")continue;p.debug("call clearStateChar %j",l),m(),l=_,t.noext&&m();continue;case"(":if(c){r+="(";continue}if(!l){r+="\\(";continue}o.push({type:l,start:d-1,reStart:r.length,open:cd[l].open,close:cd[l].close}),r+=l==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",l,r),l=!1;continue;case")":if(c||!o.length){r+="\\)";continue}m(),n=!0;var b=o.pop();r+=b.close,b.type==="!"&&a.push(b),b.reEnd=r.length;continue;case"|":if(c||!o.length||s){r+="\\|",s=!1;continue}m(),r+="|";continue;case"[":if(m(),c){r+="\\"+_;continue}c=!0,f=d,u=r.length,r+=_;continue;case"]":if(d===f+1||!c){r+="\\"+_,s=!1;continue}var y=i.substring(f+1,d);try{RegExp("["+y+"]")}catch{var x=this.parse(y,ts);r=r.substr(0,u)+"\\["+x[0]+"\\]",n=n||x[1],c=!1;continue}n=!0,c=!1,r+=_;continue;default:m(),s?s=!1:ud[_]&&!(_==="^"&&c)&&(r+="\\"),r+=_}}for(c&&(y=i.substr(f+1),x=this.parse(y,ts),r=r.substr(0,u)+"\\["+x[0],n=n||x[1]),b=o.pop();b;b=o.pop()){var v=r.slice(b.reStart+b.open.length);this.debug("setting tail",r,b),v=v.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(Ee,ae,te){return te||(te="\\"),ae+ae+te+"|"}),this.debug(`tail=%j
|
|
16
|
-
%s`,v,v,b,r);var T=b.type==="*"?Na:b.type==="?"?Ta:"\\"+b.type;n=!0,r=r.slice(0,b.reStart)+T+"\\("+v}m(),s&&(r+="\\\\");var E=!1;switch(r.charAt(0)){case"[":case".":case"(":E=!0}for(var C=a.length-1;C>-1;C--){var S=a[C],I=r.slice(0,S.reStart),A=r.slice(S.reStart,S.reEnd-8),M=r.slice(S.reEnd-8,S.reEnd),L=r.slice(S.reEnd);M+=L;var $=I.split("(").length-1,P=L;for(d=0;d<$;d++)P=P.replace(/\)[+*?]?/,"");L=P;var F="";L===""&&e!==ts&&(F="$");var V=I+A+L+F+M;r=V}if(r!==""&&n&&(r="(?=.)"+r),E&&(r=h+r),e===ts)return[r,n];if(!n)return uw(i);var G=t.nocase?"i":"";try{var q=new RegExp("^"+r+"$",G)}catch{return new RegExp("$.")}return q._glob=i,q._src=r,q}at.makeRe=function(i,e){return new Pe(i,e||{}).makeRe()};Pe.prototype.makeRe=cw;function cw(){if(this.regexp||this.regexp===!1)return this.regexp;var i=this.set;if(!i.length)return this.regexp=!1,this.regexp;var e=this.options,t=e.noglobstar?Na:e.dot?tw:iw,r=e.nocase?"i":"",n=i.map(function(s){return s.map(function(o){return o===bi?t:typeof o=="string"?fw(o):o._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,r)}catch{this.regexp=!1}return this.regexp}at.match=function(i,e,t){t=t||{};var r=new Pe(e,t);return i=i.filter(function(n){return r.match(n)}),r.options.nonull&&!i.length&&i.push(e),i};Pe.prototype.match=function(e,t){if(typeof t=="undefined"&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;var r=this.options;Hr.sep!=="/"&&(e=e.split(Hr.sep).join("/")),e=e.split(fd),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var s,o;for(o=e.length-1;o>=0&&(s=e[o],!s);o--);for(o=0;o<n.length;o++){var a=n[o],l=e;r.matchBase&&a.length===1&&(l=[s]);var c=this.matchOne(l,a,t);if(c)return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate};Pe.prototype.matchOne=function(i,e,t){return e.indexOf(bi)!==-1?this._matchGlobstar(i,e,t,0,0):this._matchOne(i,e,t,0,0)};Pe.prototype._matchGlobstar=function(i,e,t,r,n){var s,o=-1;for(s=n;s<e.length;s++)if(e[s]===bi){o=s;break}var a=-1;for(s=e.length-1;s>=0;s--)if(e[s]===bi){a=s;break}var l=e.slice(n,o),c=t?e.slice(o+1):e.slice(o+1,a),u=t?[]:e.slice(a+1);if(l.length){var f=i.slice(r,r+l.length);if(!this._matchOne(f,l,t,0,0))return!1;r+=l.length}var h=0;if(u.length){if(u.length+r>i.length)return!1;var p=i.length-u.length;if(this._matchOne(i,u,t,p,0))h=u.length;else{if(i[i.length-1]!==""||r+u.length===i.length||(p--,!this._matchOne(i,u,t,p,0)))return!1;h=u.length+1}}if(!c.length){var m=!!h;for(s=r;s<i.length-h;s++){var d=String(i[s]);if(m=!0,d==="."||d===".."||!this.options.dot&&d.charAt(0)===".")return!1}return t||m}for(var g=[[[],0]],_=g[0],b=0,y=[0],x=0;x<c.length;x++){var v=c[x];v===bi?(y.push(b),_=[[],0],g.push(_)):(_[0].push(v),b++)}for(var T=g.length-1,E=i.length-h,C=0;C<g.length;C++)g[C][1]=E-(y[T--]+g[C][0].length);return!!this._matchGlobStarBodySections(i,g,r,0,t,0,!!h)};Pe.prototype._matchGlobStarBodySections=function(i,e,t,r,n,s,o){var a=e[r];if(!a){for(var l=t;l<i.length;l++){o=!0;var c=i[l];if(c==="."||c===".."||!this.options.dot&&c.charAt(0)===".")return!1}return o}for(var u=a[0],f=a[1];t<=f;){var h=this._matchOne(i.slice(0,t+u.length),u,n,t,0);if(h&&s<this.maxGlobstarRecursion){var p=this._matchGlobStarBodySections(i,e,t+u.length,r+1,n,s+1,o);if(p!==!1)return p}var c=i[t];if(c==="."||c===".."||!this.options.dot&&c.charAt(0)===".")return!1;t++}return n||null};Pe.prototype._matchOne=function(i,e,t,r,n){var s,o,a,l;for(s=r,o=n,a=i.length,l=e.length;s<a&&o<l;s++,o++){this.debug("matchOne loop");var c=e[o],u=i[s];if(this.debug(e,c,u),c===!1||c===bi)return!1;var f;if(typeof c=="string"?(f=u===c,this.debug("string match",c,u,f)):(f=u.match(c),this.debug("pattern match",c,u,f)),!f)return!1}if(s===a&&o===l)return!0;if(s===a)return t;if(o===l)return s===a-1&&i[s]==="";throw new Error("wtf?")};function uw(i){return i.replace(/\\(.)/g,"$1")}function fw(i){return i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var Pa=w((bN,gd)=>{"use strict";var md=require("fs"),Ba;function hw(){try{return md.statSync("/.dockerenv"),!0}catch{return!1}}function dw(){try{return md.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}gd.exports=()=>(Ba===void 0&&(Ba=hw()||dw()),Ba)});var _d=w((wN,La)=>{"use strict";var pw=require("os"),mw=require("fs"),yd=Pa(),vd=()=>{if(process.platform!=="linux")return!1;if(pw.release().toLowerCase().includes("microsoft"))return!yd();try{return mw.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!yd():!1}catch{return!1}};process.env.__IS_WSL_TEST__?La.exports=vd:La.exports=vd()});var wd=w((xN,bd)=>{"use strict";bd.exports=(i,e,t)=>{let r=n=>Object.defineProperty(i,e,{value:n,enumerable:!0,writable:!0});return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get(){let n=t();return r(n),n},set(n){r(n)}}),i}});var Ad=w((SN,Cd)=>{var gw=require("path"),yw=require("child_process"),{promises:Ra,constants:kd}=require("fs"),rs=_d(),vw=Pa(),Ma=wd(),xd=gw.join(__dirname,"xdg-open"),{platform:Xi,arch:Sd}=process,_w=(()=>{let i="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",r=!1;try{await Ra.access(t,kd.F_OK),r=!0}catch{}if(!r)return i;let n=await Ra.readFile(t,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(n);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):i}})(),Ed=async(i,e)=>{let t;for(let r of i)try{return await e(r)}catch(n){t=n}throw t},ns=async i=>{if(i={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...i},Array.isArray(i.app))return Ed(i.app,a=>ns({...i,app:a}));let{name:e,arguments:t=[]}=i.app||{};if(t=[...t],Array.isArray(e))return Ed(e,a=>ns({...i,app:{name:a,arguments:t}}));let r,n=[],s={};if(Xi==="darwin")r="open",i.wait&&n.push("--wait-apps"),i.background&&n.push("--background"),i.newInstance&&n.push("--new"),e&&n.push("-a",e);else if(Xi==="win32"||rs&&!vw()){let a=await _w();r=rs?`${a}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,n.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),rs||(s.windowsVerbatimArguments=!0);let l=["Start"];i.wait&&l.push("-Wait"),e?(l.push(`"\`"${e}\`""`,"-ArgumentList"),i.target&&t.unshift(i.target)):i.target&&l.push(`"${i.target}"`),t.length>0&&(t=t.map(c=>`"\`"${c}\`""`),l.push(t.join(","))),i.target=Buffer.from(l.join(" "),"utf16le").toString("base64")}else{if(e)r=e;else{let a=!__dirname||__dirname==="/",l=!1;try{await Ra.access(xd,kd.X_OK),l=!0}catch{}r=process.versions.electron||Xi==="android"||a||!l?"xdg-open":xd}t.length>0&&n.push(...t),i.wait||(s.stdio="ignore",s.detached=!0)}i.target&&n.push(i.target),Xi==="darwin"&&t.length>0&&n.push("--args",...t);let o=yw.spawn(r,n,s);return i.wait?new Promise((a,l)=>{o.once("error",l),o.once("close",c=>{if(i.allowNonzeroExitCode&&c>0){l(new Error(`Exited with code ${c}`));return}a(o)})}):(o.unref(),o)},Fa=(i,e)=>{if(typeof i!="string")throw new TypeError("Expected a `target`");return ns({...e,target:i})},bw=(i,e)=>{if(typeof i!="string")throw new TypeError("Expected a `name`");let{arguments:t=[]}=e||{};if(t!=null&&!Array.isArray(t))throw new TypeError("Expected `appArguments` as Array type");return ns({...e,app:{name:i,arguments:t}})};function Od(i){if(typeof i=="string"||Array.isArray(i))return i;let{[Sd]:e}=i;if(!e)throw new Error(`${Sd} is not supported`);return e}function qa({[Xi]:i},{wsl:e}){if(e&&rs)return Od(e);if(!i)throw new Error(`${Xi} is not supported`);return Od(i)}var ss={};Ma(ss,"chrome",()=>qa({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));Ma(ss,"firefox",()=>qa({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Ma(ss,"edge",()=>qa({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));Fa.apps=ss;Fa.openApp=bw;Cd.exports=Fa});var Da=w((EN,Td)=>{"use strict";var ww=require("util"),Id=require("stream"),Ot=Td.exports=function(){Id.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};ww.inherits(Ot,Id);Ot.prototype.read=function(i,e){this._reads.push({length:Math.abs(i),allowLess:i<0,func:e}),process.nextTick(function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}.bind(this))};Ot.prototype.write=function(i,e){if(!this.writable)return this.emit("error",new Error("Stream not writable")),!1;let t;return Buffer.isBuffer(i)?t=i:t=Buffer.from(i,e||this._encoding),this._buffers.push(t),this._buffered+=t.length,this._process(),this._reads&&this._reads.length===0&&(this._paused=!0),this.writable&&!this._paused};Ot.prototype.end=function(i,e){i&&this.write(i,e),this.writable=!1,this._buffers&&(this._buffers.length===0?this._end():(this._buffers.push(null),this._process()))};Ot.prototype.destroySoon=Ot.prototype.end;Ot.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("Unexpected end of input")),this.destroy()};Ot.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))};Ot.prototype._processReadAllowingLess=function(i){this._reads.shift();let e=this._buffers[0];e.length>i.length?(this._buffered-=i.length,this._buffers[0]=e.slice(i.length),i.func.call(this,e.slice(0,i.length))):(this._buffered-=e.length,this._buffers.shift(),i.func.call(this,e))};Ot.prototype._processRead=function(i){this._reads.shift();let e=0,t=0,r=Buffer.alloc(i.length);for(;e<i.length;){let n=this._buffers[t++],s=Math.min(n.length,i.length-e);n.copy(r,e,0,s),e+=s,s!==n.length&&(this._buffers[--t]=n.slice(s))}t>0&&this._buffers.splice(0,t),this._buffered-=i.length,i.func.call(this,r)};Ot.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let i=this._reads[0];if(i.allowLess)this._processReadAllowingLess(i);else if(this._buffered>=i.length)this._processRead(i);else break}this._buffers&&!this.writable&&this._end()}catch(i){this.emit("error",i)}}});var ja=w(Ua=>{"use strict";var Qt=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];Ua.getImagePasses=function(i,e){let t=[],r=i%8,n=e%8,s=(i-r)/8,o=(e-n)/8;for(let a=0;a<Qt.length;a++){let l=Qt[a],c=s*l.x.length,u=o*l.y.length;for(let f=0;f<l.x.length&&l.x[f]<r;f++)c++;for(let f=0;f<l.y.length&&l.y[f]<n;f++)u++;c>0&&u>0&&t.push({width:c,height:u,index:a})}return t};Ua.getInterlaceIterator=function(i){return function(e,t,r){let n=e%Qt[r].x.length,s=(e-n)/Qt[r].x.length*8+Qt[r].x[n],o=t%Qt[r].y.length,a=(t-o)/Qt[r].y.length*8+Qt[r].y[o];return s*4+a*i*4}}});var $a=w((kN,Nd)=>{"use strict";Nd.exports=function(e,t,r){let n=e+t-r,s=Math.abs(n-e),o=Math.abs(n-t),a=Math.abs(n-r);return s<=o&&s<=a?e:o<=a?t:r}});var Va=w((CN,Pd)=>{"use strict";var xw=ja(),Sw=$a();function Bd(i,e,t){let r=i*e;return t!==8&&(r=Math.ceil(r/(8/t))),r}var er=Pd.exports=function(i,e){let t=i.width,r=i.height,n=i.interlace,s=i.bpp,o=i.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],n){let a=xw.getImagePasses(t,r);for(let l=0;l<a.length;l++)this._images.push({byteWidth:Bd(a[l].width,s,o),height:a[l].height,lineIndex:0})}else this._images.push({byteWidth:Bd(t,s,o),height:r,lineIndex:0});o===8?this._xComparison=s:o===16?this._xComparison=s*2:this._xComparison=1};er.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};er.prototype._unFilterType1=function(i,e,t){let r=this._xComparison,n=r-1;for(let s=0;s<t;s++){let o=i[1+s],a=s>n?e[s-r]:0;e[s]=o+a}};er.prototype._unFilterType2=function(i,e,t){let r=this._lastLine;for(let n=0;n<t;n++){let s=i[1+n],o=r?r[n]:0;e[n]=s+o}};er.prototype._unFilterType3=function(i,e,t){let r=this._xComparison,n=r-1,s=this._lastLine;for(let o=0;o<t;o++){let a=i[1+o],l=s?s[o]:0,c=o>n?e[o-r]:0,u=Math.floor((c+l)/2);e[o]=a+u}};er.prototype._unFilterType4=function(i,e,t){let r=this._xComparison,n=r-1,s=this._lastLine;for(let o=0;o<t;o++){let a=i[1+o],l=s?s[o]:0,c=o>n?e[o-r]:0,u=o>n&&s?s[o-r]:0,f=Sw(c,l,u);e[o]=a+f}};er.prototype._reverseFilterLine=function(i){let e=i[0],t,r=this._images[this._imageIndex],n=r.byteWidth;if(e===0)t=i.slice(1,n+1);else switch(t=Buffer.alloc(n),e){case 1:this._unFilterType1(i,t,n);break;case 2:this._unFilterType2(i,t,n);break;case 3:this._unFilterType3(i,t,n);break;case 4:this._unFilterType4(i,t,n);break;default:throw new Error("Unrecognised filter type - "+e)}this.write(t),r.lineIndex++,r.lineIndex>=r.height?(this._lastLine=null,this._imageIndex++,r=this._images[this._imageIndex]):this._lastLine=t,r?this.read(r.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}});var Md=w((AN,Rd)=>{"use strict";var Ew=require("util"),Ld=Da(),Ow=Va(),kw=Rd.exports=function(i){Ld.call(this);let e=[],t=this;this._filter=new Ow(i,{read:this.read.bind(this),write:function(r){e.push(r)},complete:function(){t.emit("complete",Buffer.concat(e))}}),this._filter.start()};Ew.inherits(kw,Ld)});var tr=w((IN,Fd)=>{"use strict";Fd.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}});var Ga=w((TN,qd)=>{"use strict";var Ha=[];(function(){for(let i=0;i<256;i++){let e=i;for(let t=0;t<8;t++)e&1?e=3988292384^e>>>1:e=e>>>1;Ha[i]=e}})();var Wa=qd.exports=function(){this._crc=-1};Wa.prototype.write=function(i){for(let e=0;e<i.length;e++)this._crc=Ha[(this._crc^i[e])&255]^this._crc>>>8;return!0};Wa.prototype.crc32=function(){return this._crc^-1};Wa.crc32=function(i){let e=-1;for(let t=0;t<i.length;t++)e=Ha[(e^i[t])&255]^e>>>8;return e^-1}});var Ya=w((NN,Dd)=>{"use strict";var Me=tr(),Cw=Ga(),De=Dd.exports=function(i,e){this._options=i,i.checkCRC=i.checkCRC!==!1,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[Me.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[Me.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[Me.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[Me.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[Me.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[Me.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};De.prototype.start=function(){this.read(Me.PNG_SIGNATURE.length,this._parseSignature.bind(this))};De.prototype._parseSignature=function(i){let e=Me.PNG_SIGNATURE;for(let t=0;t<e.length;t++)if(i[t]!==e[t]){this.error(new Error("Invalid file signature"));return}this.read(8,this._parseChunkBegin.bind(this))};De.prototype._parseChunkBegin=function(i){let e=i.readUInt32BE(0),t=i.readUInt32BE(4),r="";for(let s=4;s<8;s++)r+=String.fromCharCode(i[s]);let n=!!(i[4]&32);if(!this._hasIHDR&&t!==Me.TYPE_IHDR){this.error(new Error("Expected IHDR on beggining"));return}if(this._crc=new Cw,this._crc.write(Buffer.from(r)),this._chunks[t])return this._chunks[t](e);if(!n){this.error(new Error("Unsupported critical chunk type "+r));return}this.read(e+4,this._skipChunk.bind(this))};De.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};De.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};De.prototype._parseChunkEnd=function(i){let e=i.readInt32BE(0),t=this._crc.crc32();if(this._options.checkCRC&&t!==e){this.error(new Error("Crc error - "+e+" - "+t));return}this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))};De.prototype._handleIHDR=function(i){this.read(i,this._parseIHDR.bind(this))};De.prototype._parseIHDR=function(i){this._crc.write(i);let e=i.readUInt32BE(0),t=i.readUInt32BE(4),r=i[8],n=i[9],s=i[10],o=i[11],a=i[12];if(r!==8&&r!==4&&r!==2&&r!==1&&r!==16){this.error(new Error("Unsupported bit depth "+r));return}if(!(n in Me.COLORTYPE_TO_BPP_MAP)){this.error(new Error("Unsupported color type"));return}if(s!==0){this.error(new Error("Unsupported compression method"));return}if(o!==0){this.error(new Error("Unsupported filter method"));return}if(a!==0&&a!==1){this.error(new Error("Unsupported interlace method"));return}this._colorType=n;let l=Me.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:t,depth:r,interlace:!!a,palette:!!(n&Me.COLORTYPE_PALETTE),color:!!(n&Me.COLORTYPE_COLOR),alpha:!!(n&Me.COLORTYPE_ALPHA),bpp:l,colorType:n}),this._handleChunkEnd()};De.prototype._handlePLTE=function(i){this.read(i,this._parsePLTE.bind(this))};De.prototype._parsePLTE=function(i){this._crc.write(i);let e=Math.floor(i.length/3);for(let t=0;t<e;t++)this._palette.push([i[t*3],i[t*3+1],i[t*3+2],255]);this.palette(this._palette),this._handleChunkEnd()};De.prototype._handleTRNS=function(i){this.simpleTransparency(),this.read(i,this._parseTRNS.bind(this))};De.prototype._parseTRNS=function(i){if(this._crc.write(i),this._colorType===Me.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(new Error("Transparency chunk must be after palette"));return}if(i.length>this._palette.length){this.error(new Error("More transparent colors than palette size"));return}for(let e=0;e<i.length;e++)this._palette[e][3]=i[e];this.palette(this._palette)}this._colorType===Me.COLORTYPE_GRAYSCALE&&this.transColor([i.readUInt16BE(0)]),this._colorType===Me.COLORTYPE_COLOR&&this.transColor([i.readUInt16BE(0),i.readUInt16BE(2),i.readUInt16BE(4)]),this._handleChunkEnd()};De.prototype._handleGAMA=function(i){this.read(i,this._parseGAMA.bind(this))};De.prototype._parseGAMA=function(i){this._crc.write(i),this.gamma(i.readUInt32BE(0)/Me.GAMMA_DIVISION),this._handleChunkEnd()};De.prototype._handleIDAT=function(i){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-i,this._parseIDAT.bind(this,i))};De.prototype._parseIDAT=function(i,e){if(this._crc.write(e),this._colorType===Me.COLORTYPE_PALETTE_COLOR&&this._palette.length===0)throw new Error("Expected palette not found");this.inflateData(e);let t=i-e.length;t>0?this._handleIDAT(t):this._handleChunkEnd()};De.prototype._handleIEND=function(i){this.read(i,this._parseIEND.bind(this))};De.prototype._parseIEND=function(i){this._crc.write(i),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}});var Ka=w(jd=>{"use strict";var Ud=ja(),Aw=[function(){},function(i,e,t,r){if(r===e.length)throw new Error("Ran out of data");let n=e[r];i[t]=n,i[t+1]=n,i[t+2]=n,i[t+3]=255},function(i,e,t,r){if(r+1>=e.length)throw new Error("Ran out of data");let n=e[r];i[t]=n,i[t+1]=n,i[t+2]=n,i[t+3]=e[r+1]},function(i,e,t,r){if(r+2>=e.length)throw new Error("Ran out of data");i[t]=e[r],i[t+1]=e[r+1],i[t+2]=e[r+2],i[t+3]=255},function(i,e,t,r){if(r+3>=e.length)throw new Error("Ran out of data");i[t]=e[r],i[t+1]=e[r+1],i[t+2]=e[r+2],i[t+3]=e[r+3]}],Iw=[function(){},function(i,e,t,r){let n=e[0];i[t]=n,i[t+1]=n,i[t+2]=n,i[t+3]=r},function(i,e,t){let r=e[0];i[t]=r,i[t+1]=r,i[t+2]=r,i[t+3]=e[1]},function(i,e,t,r){i[t]=e[0],i[t+1]=e[1],i[t+2]=e[2],i[t+3]=r},function(i,e,t){i[t]=e[0],i[t+1]=e[1],i[t+2]=e[2],i[t+3]=e[3]}];function Tw(i,e){let t=[],r=0;function n(){if(r===i.length)throw new Error("Ran out of data");let s=i[r];r++;let o,a,l,c,u,f,h,p;switch(e){default:throw new Error("unrecognised depth");case 16:h=i[r],r++,t.push((s<<8)+h);break;case 4:h=s&15,p=s>>4,t.push(p,h);break;case 2:u=s&3,f=s>>2&3,h=s>>4&3,p=s>>6&3,t.push(p,h,f,u);break;case 1:o=s&1,a=s>>1&1,l=s>>2&1,c=s>>3&1,u=s>>4&1,f=s>>5&1,h=s>>6&1,p=s>>7&1,t.push(p,h,f,u,c,l,a,o);break}}return{get:function(s){for(;t.length<s;)n();let o=t.slice(0,s);return t=t.slice(s),o},resetAfterLine:function(){t.length=0},end:function(){if(r!==i.length)throw new Error("extra data found")}}}function Nw(i,e,t,r,n,s){let o=i.width,a=i.height,l=i.index;for(let c=0;c<a;c++)for(let u=0;u<o;u++){let f=t(u,c,l);Aw[r](e,n,f,s),s+=r}return s}function Bw(i,e,t,r,n,s){let o=i.width,a=i.height,l=i.index;for(let c=0;c<a;c++){for(let u=0;u<o;u++){let f=n.get(r),h=t(u,c,l);Iw[r](e,f,h,s)}n.resetAfterLine()}}jd.dataToBitMap=function(i,e){let t=e.width,r=e.height,n=e.depth,s=e.bpp,o=e.interlace,a;n!==8&&(a=Tw(i,n));let l;n<=8?l=Buffer.alloc(t*r*4):l=new Uint16Array(t*r*4);let c=Math.pow(2,n)-1,u=0,f,h;if(o)f=Ud.getImagePasses(t,r),h=Ud.getInterlaceIterator(t,r);else{let p=0;h=function(){let m=p;return p+=4,m},f=[{width:t,height:r}]}for(let p=0;p<f.length;p++)n===8?u=Nw(f[p],l,h,s,i,u):Bw(f[p],l,h,s,a,c);if(n===8){if(u!==i.length)throw new Error("extra data found")}else a.end();return l}});var za=w((PN,$d)=>{"use strict";function Pw(i,e,t,r,n){let s=0;for(let o=0;o<r;o++)for(let a=0;a<t;a++){let l=n[i[s]];if(!l)throw new Error("index "+i[s]+" not in palette");for(let c=0;c<4;c++)e[s+c]=l[c];s+=4}}function Lw(i,e,t,r,n){let s=0;for(let o=0;o<r;o++)for(let a=0;a<t;a++){let l=!1;if(n.length===1?n[0]===i[s]&&(l=!0):n[0]===i[s]&&n[1]===i[s+1]&&n[2]===i[s+2]&&(l=!0),l)for(let c=0;c<4;c++)e[s+c]=0;s+=4}}function Rw(i,e,t,r,n){let s=255,o=Math.pow(2,n)-1,a=0;for(let l=0;l<r;l++)for(let c=0;c<t;c++){for(let u=0;u<4;u++)e[a+u]=Math.floor(i[a+u]*s/o+.5);a+=4}}$d.exports=function(i,e,t=!1){let r=e.depth,n=e.width,s=e.height,o=e.colorType,a=e.transColor,l=e.palette,c=i;return o===3?Pw(i,c,n,s,l):(a&&Lw(i,c,n,s,a),r!==8&&!t&&(r===16&&(c=Buffer.alloc(n*s*4)),Rw(i,c,n,s,r))),c}});var Wd=w((LN,Hd)=>{"use strict";var Mw=require("util"),Ja=require("zlib"),Vd=Da(),Fw=Md(),qw=Ya(),Dw=Ka(),Uw=za(),Nt=Hd.exports=function(i){Vd.call(this),this._parser=new qw(i,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=i,this.writable=!0,this._parser.start()};Mw.inherits(Nt,Vd);Nt.prototype._handleError=function(i){this.emit("error",i),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0};Nt.prototype._inflateData=function(i){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=Ja.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let t=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,r=Math.max(t,Ja.Z_MIN_CHUNK);this._inflate=Ja.createInflate({chunkSize:r});let n=t,s=this.emit.bind(this,"error");this._inflate.on("error",function(a){n&&s(a)}),this._filter.on("complete",this._complete.bind(this));let o=this._filter.write.bind(this._filter);this._inflate.on("data",function(a){n&&(a.length>n&&(a=a.slice(0,n)),n-=a.length,o(a))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(i)};Nt.prototype._handleMetaData=function(i){this._metaData=i,this._bitmapInfo=Object.create(i),this._filter=new Fw(this._bitmapInfo)};Nt.prototype._handleTransColor=function(i){this._bitmapInfo.transColor=i};Nt.prototype._handlePalette=function(i){this._bitmapInfo.palette=i};Nt.prototype._simpleTransparency=function(){this._metaData.alpha=!0};Nt.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};Nt.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))};Nt.prototype._complete=function(i){if(this.errord)return;let e;try{let t=Dw.dataToBitMap(i,this._bitmapInfo);e=Uw(t,this._bitmapInfo,this._options.skipRescale),t=null}catch(t){this._handleError(t);return}this.emit("parsed",e)}});var Yd=w((RN,Gd)=>{"use strict";var pt=tr();Gd.exports=function(i,e,t,r){let n=[pt.COLORTYPE_COLOR_ALPHA,pt.COLORTYPE_ALPHA].indexOf(r.colorType)!==-1;if(r.colorType===r.inputColorType){let m=(function(){let d=new ArrayBuffer(2);return new DataView(d).setInt16(0,256,!0),new Int16Array(d)[0]!==256})();if(r.bitDepth===8||r.bitDepth===16&&m)return i}let s=r.bitDepth!==16?i:new Uint16Array(i.buffer),o=255,a=pt.COLORTYPE_TO_BPP_MAP[r.inputColorType];a===4&&!r.inputHasAlpha&&(a=3);let l=pt.COLORTYPE_TO_BPP_MAP[r.colorType];r.bitDepth===16&&(o=65535,l*=2);let c=Buffer.alloc(e*t*l),u=0,f=0,h=r.bgColor||{};h.red===void 0&&(h.red=o),h.green===void 0&&(h.green=o),h.blue===void 0&&(h.blue=o);function p(){let m,d,g,_=o;switch(r.inputColorType){case pt.COLORTYPE_COLOR_ALPHA:_=s[u+3],m=s[u],d=s[u+1],g=s[u+2];break;case pt.COLORTYPE_COLOR:m=s[u],d=s[u+1],g=s[u+2];break;case pt.COLORTYPE_ALPHA:_=s[u+1],m=s[u],d=m,g=m;break;case pt.COLORTYPE_GRAYSCALE:m=s[u],d=m,g=m;break;default:throw new Error("input color type:"+r.inputColorType+" is not supported at present")}return r.inputHasAlpha&&(n||(_/=o,m=Math.min(Math.max(Math.round((1-_)*h.red+_*m),0),o),d=Math.min(Math.max(Math.round((1-_)*h.green+_*d),0),o),g=Math.min(Math.max(Math.round((1-_)*h.blue+_*g),0),o))),{red:m,green:d,blue:g,alpha:_}}for(let m=0;m<t;m++)for(let d=0;d<e;d++){let g=p(s,u);switch(r.colorType){case pt.COLORTYPE_COLOR_ALPHA:case pt.COLORTYPE_COLOR:r.bitDepth===8?(c[f]=g.red,c[f+1]=g.green,c[f+2]=g.blue,n&&(c[f+3]=g.alpha)):(c.writeUInt16BE(g.red,f),c.writeUInt16BE(g.green,f+2),c.writeUInt16BE(g.blue,f+4),n&&c.writeUInt16BE(g.alpha,f+6));break;case pt.COLORTYPE_ALPHA:case pt.COLORTYPE_GRAYSCALE:{let _=(g.red+g.green+g.blue)/3;r.bitDepth===8?(c[f]=_,n&&(c[f+1]=g.alpha)):(c.writeUInt16BE(_,f),n&&c.writeUInt16BE(g.alpha,f+2));break}default:throw new Error("unrecognised color Type "+r.colorType)}u+=a,f+=l}return c}});var Jd=w((MN,zd)=>{"use strict";var Kd=$a();function jw(i,e,t,r,n){for(let s=0;s<t;s++)r[n+s]=i[e+s]}function $w(i,e,t){let r=0,n=e+t;for(let s=e;s<n;s++)r+=Math.abs(i[s]);return r}function Vw(i,e,t,r,n,s){for(let o=0;o<t;o++){let a=o>=s?i[e+o-s]:0,l=i[e+o]-a;r[n+o]=l}}function Hw(i,e,t,r){let n=0;for(let s=0;s<t;s++){let o=s>=r?i[e+s-r]:0,a=i[e+s]-o;n+=Math.abs(a)}return n}function Ww(i,e,t,r,n){for(let s=0;s<t;s++){let o=e>0?i[e+s-t]:0,a=i[e+s]-o;r[n+s]=a}}function Gw(i,e,t){let r=0,n=e+t;for(let s=e;s<n;s++){let o=e>0?i[s-t]:0,a=i[s]-o;r+=Math.abs(a)}return r}function Yw(i,e,t,r,n,s){for(let o=0;o<t;o++){let a=o>=s?i[e+o-s]:0,l=e>0?i[e+o-t]:0,c=i[e+o]-(a+l>>1);r[n+o]=c}}function Kw(i,e,t,r){let n=0;for(let s=0;s<t;s++){let o=s>=r?i[e+s-r]:0,a=e>0?i[e+s-t]:0,l=i[e+s]-(o+a>>1);n+=Math.abs(l)}return n}function zw(i,e,t,r,n,s){for(let o=0;o<t;o++){let a=o>=s?i[e+o-s]:0,l=e>0?i[e+o-t]:0,c=e>0&&o>=s?i[e+o-(t+s)]:0,u=i[e+o]-Kd(a,l,c);r[n+o]=u}}function Jw(i,e,t,r){let n=0;for(let s=0;s<t;s++){let o=s>=r?i[e+s-r]:0,a=e>0?i[e+s-t]:0,l=e>0&&s>=r?i[e+s-(t+r)]:0,c=i[e+s]-Kd(o,a,l);n+=Math.abs(c)}return n}var Zw={0:jw,1:Vw,2:Ww,3:Yw,4:zw},Qw={0:$w,1:Hw,2:Gw,3:Kw,4:Jw};zd.exports=function(i,e,t,r,n){let s;if(!("filterType"in r)||r.filterType===-1)s=[0,1,2,3,4];else if(typeof r.filterType=="number")s=[r.filterType];else throw new Error("unrecognised filter types");r.bitDepth===16&&(n*=2);let o=e*n,a=0,l=0,c=Buffer.alloc((o+1)*t),u=s[0];for(let f=0;f<t;f++){if(s.length>1){let h=1/0;for(let p=0;p<s.length;p++){let m=Qw[s[p]](i,l,o,n);m<h&&(u=s[p],h=m)}}c[a]=u,a++,Zw[u](i,l,o,c,a,n),a+=o,l+=o}return c}});var Za=w((FN,Zd)=>{"use strict";var ze=tr(),Xw=Ga(),ex=Yd(),tx=Jd(),ix=require("zlib"),Xt=Zd.exports=function(i){if(this._options=i,i.deflateChunkSize=i.deflateChunkSize||32*1024,i.deflateLevel=i.deflateLevel!=null?i.deflateLevel:9,i.deflateStrategy=i.deflateStrategy!=null?i.deflateStrategy:3,i.inputHasAlpha=i.inputHasAlpha!=null?i.inputHasAlpha:!0,i.deflateFactory=i.deflateFactory||ix.createDeflate,i.bitDepth=i.bitDepth||8,i.colorType=typeof i.colorType=="number"?i.colorType:ze.COLORTYPE_COLOR_ALPHA,i.inputColorType=typeof i.inputColorType=="number"?i.inputColorType:ze.COLORTYPE_COLOR_ALPHA,[ze.COLORTYPE_GRAYSCALE,ze.COLORTYPE_COLOR,ze.COLORTYPE_COLOR_ALPHA,ze.COLORTYPE_ALPHA].indexOf(i.colorType)===-1)throw new Error("option color type:"+i.colorType+" is not supported at present");if([ze.COLORTYPE_GRAYSCALE,ze.COLORTYPE_COLOR,ze.COLORTYPE_COLOR_ALPHA,ze.COLORTYPE_ALPHA].indexOf(i.inputColorType)===-1)throw new Error("option input color type:"+i.inputColorType+" is not supported at present");if(i.bitDepth!==8&&i.bitDepth!==16)throw new Error("option bit depth:"+i.bitDepth+" is not supported at present")};Xt.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};Xt.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};Xt.prototype.filterData=function(i,e,t){let r=ex(i,e,t,this._options),n=ze.COLORTYPE_TO_BPP_MAP[this._options.colorType];return tx(r,e,t,this._options,n)};Xt.prototype._packChunk=function(i,e){let t=e?e.length:0,r=Buffer.alloc(t+12);return r.writeUInt32BE(t,0),r.writeUInt32BE(i,4),e&&e.copy(r,8),r.writeInt32BE(Xw.crc32(r.slice(4,r.length-4)),r.length-4),r};Xt.prototype.packGAMA=function(i){let e=Buffer.alloc(4);return e.writeUInt32BE(Math.floor(i*ze.GAMMA_DIVISION),0),this._packChunk(ze.TYPE_gAMA,e)};Xt.prototype.packIHDR=function(i,e){let t=Buffer.alloc(13);return t.writeUInt32BE(i,0),t.writeUInt32BE(e,4),t[8]=this._options.bitDepth,t[9]=this._options.colorType,t[10]=0,t[11]=0,t[12]=0,this._packChunk(ze.TYPE_IHDR,t)};Xt.prototype.packIDAT=function(i){return this._packChunk(ze.TYPE_IDAT,i)};Xt.prototype.packIEND=function(){return this._packChunk(ze.TYPE_IEND,null)}});var tp=w((qN,ep)=>{"use strict";var rx=require("util"),Qd=require("stream"),nx=tr(),sx=Za(),Xd=ep.exports=function(i){Qd.call(this);let e=i||{};this._packer=new sx(e),this._deflate=this._packer.createDeflate(),this.readable=!0};rx.inherits(Xd,Qd);Xd.prototype.pack=function(i,e,t,r){this.emit("data",Buffer.from(nx.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,t)),r&&this.emit("data",this._packer.packGAMA(r));let n=this._packer.filterData(i,e,t);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(s){this.emit("data",this._packer.packIDAT(s))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(n)}});var ap=w((Wr,op)=>{"use strict";var ip=require("assert").ok,ir=require("zlib"),ox=require("util"),rp=require("buffer").kMaxLength;function wi(i){if(!(this instanceof wi))return new wi(i);i&&i.chunkSize<ir.Z_MIN_CHUNK&&(i.chunkSize=ir.Z_MIN_CHUNK),ir.Inflate.call(this,i),this._offset=this._offset===void 0?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,i&&i.maxLength!=null&&(this._maxLength=i.maxLength)}function ax(i){return new wi(i)}function np(i,e){e&&process.nextTick(e),i._handle&&(i._handle.close(),i._handle=null)}wi.prototype._processChunk=function(i,e,t){if(typeof t=="function")return ir.Inflate._processChunk.call(this,i,e,t);let r=this,n=i&&i.length,s=this._chunkSize-this._offset,o=this._maxLength,a=0,l=[],c=0,u;this.on("error",function(m){u=m});function f(m,d){if(r._hadError)return;let g=s-d;if(ip(g>=0,"have should not go down"),g>0){let _=r._buffer.slice(r._offset,r._offset+g);if(r._offset+=g,_.length>o&&(_=_.slice(0,o)),l.push(_),c+=_.length,o-=_.length,o===0)return!1}return(d===0||r._offset>=r._chunkSize)&&(s=r._chunkSize,r._offset=0,r._buffer=Buffer.allocUnsafe(r._chunkSize)),d===0?(a+=n-m,n=m,!0):!1}ip(this._handle,"zlib binding closed");let h;do h=this._handle.writeSync(e,i,a,n,this._buffer,this._offset,s),h=h||this._writeState;while(!this._hadError&&f(h[0],h[1]));if(this._hadError)throw u;if(c>=rp)throw np(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+rp.toString(16)+" bytes");let p=Buffer.concat(l,c);return np(this),p};ox.inherits(wi,ir.Inflate);function lx(i,e){if(typeof e=="string"&&(e=Buffer.from(e)),!(e instanceof Buffer))throw new TypeError("Not a string or buffer");let t=i._finishFlushFlag;return t==null&&(t=ir.Z_FINISH),i._processChunk(e,t)}function sp(i,e){return lx(new wi(e),i)}op.exports=Wr=sp;Wr.Inflate=wi;Wr.createInflate=ax;Wr.inflateSync=sp});var Qa=w((DN,cp)=>{"use strict";var lp=cp.exports=function(i){this._buffer=i,this._reads=[]};lp.prototype.read=function(i,e){this._reads.push({length:Math.abs(i),allowLess:i<0,func:e})};lp.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let i=this._reads[0];if(this._buffer.length&&(this._buffer.length>=i.length||i.allowLess)){this._reads.shift();let e=this._buffer;this._buffer=e.slice(i.length),i.func.call(this,e.slice(0,i.length))}else break}if(this._reads.length>0)throw new Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw new Error("unrecognised content at end of stream")}});var fp=w(up=>{"use strict";var cx=Qa(),ux=Va();up.process=function(i,e){let t=[],r=new cx(i);return new ux(e,{read:r.read.bind(r),write:function(s){t.push(s)},complete:function(){}}).start(),r.process(),Buffer.concat(t)}});var mp=w((jN,pp)=>{"use strict";var hp=!0,dp=require("zlib"),fx=ap();dp.deflateSync||(hp=!1);var hx=Qa(),dx=fp(),px=Ya(),mx=Ka(),gx=za();pp.exports=function(i,e){if(!hp)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let t;function r(x){t=x}let n;function s(x){n=x}function o(x){n.transColor=x}function a(x){n.palette=x}function l(){n.alpha=!0}let c;function u(x){c=x}let f=[];function h(x){f.push(x)}let p=new hx(i);if(new px(e,{read:p.read.bind(p),error:r,metadata:s,gamma:u,palette:a,transColor:o,inflateData:h,simpleTransparency:l}).start(),p.process(),t)throw t;let d=Buffer.concat(f);f.length=0;let g;if(n.interlace)g=dp.inflateSync(d);else{let v=((n.width*n.bpp*n.depth+7>>3)+1)*n.height;g=fx(d,{chunkSize:v,maxLength:v})}if(d=null,!g||!g.length)throw new Error("bad png - invalid inflate data response");let _=dx.process(g,n);d=null;let b=mx.dataToBitMap(_,n);_=null;let y=gx(b,n,e.skipRescale);return n.data=y,n.gamma=c||0,n}});var _p=w(($N,vp)=>{"use strict";var gp=!0,yp=require("zlib");yp.deflateSync||(gp=!1);var yx=tr(),vx=Za();vp.exports=function(i,e){if(!gp)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let t=e||{},r=new vx(t),n=[];n.push(Buffer.from(yx.PNG_SIGNATURE)),n.push(r.packIHDR(i.width,i.height)),i.gamma&&n.push(r.packGAMA(i.gamma));let s=r.filterData(i.data,i.width,i.height),o=yp.deflateSync(s,r.getDeflateOptions());if(s=null,!o||!o.length)throw new Error("bad png - invalid compressed data response");return n.push(r.packIDAT(o)),n.push(r.packIEND()),Buffer.concat(n)}});var bp=w(Xa=>{"use strict";var _x=mp(),bx=_p();Xa.read=function(i,e){return _x(i,e||{})};Xa.write=function(i,e){return bx(i,e)}});var Sp=w(xp=>{"use strict";var wx=require("util"),wp=require("stream"),xx=Wd(),Sx=tp(),Ex=bp(),Qe=xp.PNG=function(i){wp.call(this),i=i||{},this.width=i.width|0,this.height=i.height|0,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,i.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new xx(i),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(e){this.data=e,this.emit("parsed",e)}.bind(this)),this._packer=new Sx(i),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};wx.inherits(Qe,wp);Qe.sync=Ex;Qe.prototype.pack=function(){return!this.data||!this.data.length?(this.emit("error","No data provided"),this):(process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this)};Qe.prototype.parse=function(i,e){if(e){let t,r;t=function(n){this.removeListener("error",r),this.data=n,e(null,this)}.bind(this),r=function(n){this.removeListener("parsed",t),e(n,null)}.bind(this),this.once("parsed",t),this.once("error",r)}return this.end(i),this};Qe.prototype.write=function(i){return this._parser.write(i),!0};Qe.prototype.end=function(i){this._parser.end(i)};Qe.prototype._metadata=function(i){this.width=i.width,this.height=i.height,this.emit("metadata",i)};Qe.prototype._gamma=function(i){this.gamma=i};Qe.prototype._handleClose=function(){!this._parser.writable&&!this._packer.readable&&this.emit("close")};Qe.bitblt=function(i,e,t,r,n,s,o,a){if(t|=0,r|=0,n|=0,s|=0,o|=0,a|=0,t>i.width||r>i.height||t+n>i.width||r+s>i.height)throw new Error("bitblt reading outside image");if(o>e.width||a>e.height||o+n>e.width||a+s>e.height)throw new Error("bitblt writing outside image");for(let l=0;l<s;l++)i.data.copy(e.data,(a+l)*e.width+o<<2,(r+l)*i.width+t<<2,(r+l)*i.width+t+n<<2)};Qe.prototype.bitblt=function(i,e,t,r,n,s,o){return Qe.bitblt(this,i,e,t,r,n,s,o),this};Qe.adjustGamma=function(i){if(i.gamma){for(let e=0;e<i.height;e++)for(let t=0;t<i.width;t++){let r=i.width*e+t<<2;for(let n=0;n<3;n++){let s=i.data[r+n]/255;s=Math.pow(s,1/2.2/i.gamma),i.data[r+n]=Math.round(s*255)}}i.gamma=0}};Qe.prototype.adjustGamma=function(){Qe.adjustGamma(this)}});var Gr=w(tl=>{var os=class extends Error{constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},el=class extends os{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};tl.CommanderError=os;tl.InvalidArgumentError=el});var as=w(rl=>{var{InvalidArgumentError:Ox}=Gr(),il=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new Ox(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,r):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function kx(i){let e=i.name()+(i.variadic===!0?"...":"");return i.required?"<"+e+">":"["+e+"]"}rl.Argument=il;rl.humanReadableArgName=kx});var ol=w(sl=>{var{humanReadableArgName:Cx}=as(),nl=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){var t,r;this.helpWidth=(r=(t=this.helpWidth)!=null?t:e.helpWidth)!=null?r:80}visibleCommands(e){let t=e.commands.filter(n=>!n._hidden),r=e._getHelpCommand();return r&&!r._hidden&&t.push(r),this.sortSubcommands&&t.sort((n,s)=>n.name().localeCompare(s.name())),t}compareOptions(e,t){let r=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return r(e).localeCompare(r(t))}visibleOptions(e){let t=e.options.filter(n=>!n.hidden),r=e._getHelpOption();if(r&&!r.hidden){let n=r.short&&e._findOption(r.short),s=r.long&&e._findOption(r.long);!n&&!s?t.push(r):r.long&&!s?t.push(e.createOption(r.long,r.description)):r.short&&!n&&t.push(e.createOption(r.short,r.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let r=e.parent;r;r=r.parent){let n=r.options.filter(s=>!s.hidden);t.push(...n)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(r=>Cx(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let r="";for(let n=e.parent;n;n=n.parent)r=n.name()+" "+r;return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatHelp(e,t){var f;let r=t.padWidth(e,t),n=(f=t.helpWidth)!=null?f:80;function s(h,p){return t.formatItem(h,r,p,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],a=t.commandDescription(e);a.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(a),n),""]));let l=t.visibleArguments(e).map(h=>s(t.styleArgumentTerm(t.argumentTerm(h)),t.styleArgumentDescription(t.argumentDescription(h))));l.length>0&&(o=o.concat([t.styleTitle("Arguments:"),...l,""]));let c=t.visibleOptions(e).map(h=>s(t.styleOptionTerm(t.optionTerm(h)),t.styleOptionDescription(t.optionDescription(h))));if(c.length>0&&(o=o.concat([t.styleTitle("Options:"),...c,""])),t.showGlobalOptions){let h=t.visibleGlobalOptions(e).map(p=>s(t.styleOptionTerm(t.optionTerm(p)),t.styleOptionDescription(t.optionDescription(p))));h.length>0&&(o=o.concat([t.styleTitle("Global Options:"),...h,""]))}let u=t.visibleCommands(e).map(h=>s(t.styleSubcommandTerm(t.subcommandTerm(h)),t.styleSubcommandDescription(t.subcommandDescription(h))));return u.length>0&&(o=o.concat([t.styleTitle("Commands:"),...u,""])),o.join(`
|
|
17
|
-
`)}displayWidth(e){return
|
|
14
|
+
`;let l=(0,jb.parseProxyResponse)(n);n.write(`${a}\r
|
|
15
|
+
`);let{connect:c,buffered:u}=await l;if(e.emit("proxyConnect",c),this.emit("proxyConnect",c,e),c.statusCode===200)return e.once("socket",$b),t.secureEndpoint?(Vr("Upgrading socket connection to TLS"),Nh.connect({...Ph(Bh(t),"host","path","port"),socket:n})):n;n.destroy();let f=new Xn.Socket({writable:!1});return f.readable=!0,e.once("socket",h=>{Vr("Replaying proxy buffer for failed request"),(0,Fb.default)(h.listenerCount("data")>0),h.push(u),h.push(null)}),f}};es.protocols=["http","https"];gt.HttpsProxyAgent=es;function $b(i){i.resume()}function Ph(i,...e){let t={},r;for(r in i)e.includes(r)||(t[r]=i[r]);return t}});var qh=w((k2,ts)=>{var Dh=Dh||function(i){return Buffer.from(i).toString("base64")};function Hb(i){var e=this,t=Math.round,r=Math.floor,n=new Array(64),s=new Array(64),o=new Array(64),a=new Array(64),l,c,u,f,h=new Array(65535),p=new Array(65535),m=new Array(64),d=new Array(64),g=[],v=0,b=7,y=new Array(64),x=new Array(64),_=new Array(64),A=new Array(256),E=new Array(2048),C,S=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],T=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],I=[0,1,2,3,4,5,6,7,8,9,10,11],F=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],L=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],$=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],P=[0,1,2,3,4,5,6,7,8,9,10,11],M=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],H=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function W(O){for(var j=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],Y=0;Y<64;Y++){var G=r((j[Y]*O+50)/100);G<1?G=1:G>255&&(G=255),n[S[Y]]=G}for(var Z=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],Q=0;Q<64;Q++){var he=r((Z[Q]*O+50)/100);he<1?he=1:he>255&&(he=255),s[S[Q]]=he}for(var de=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Ie=0,we=0;we<8;we++)for(var B=0;B<8;B++)o[Ie]=1/(n[S[Ie]]*de[we]*de[B]*8),a[Ie]=1/(s[S[Ie]]*de[we]*de[B]*8),Ie++}function D(O,j){for(var Y=0,G=0,Z=new Array,Q=1;Q<=16;Q++){for(var he=1;he<=O[Q];he++)Z[j[G]]=[],Z[j[G]][0]=Y,Z[j[G]][1]=Q,G++,Y++;Y*=2}return Z}function Ee(){l=D(T,I),c=D($,P),u=D(F,L),f=D(M,H)}function le(){for(var O=1,j=2,Y=1;Y<=15;Y++){for(var G=O;G<j;G++)p[32767+G]=Y,h[32767+G]=[],h[32767+G][1]=Y,h[32767+G][0]=G;for(var Z=-(j-1);Z<=-O;Z++)p[32767+Z]=Y,h[32767+Z]=[],h[32767+Z][1]=Y,h[32767+Z][0]=j-1+Z;O<<=1,j<<=1}}function ie(){for(var O=0;O<256;O++)E[O]=19595*O,E[O+256>>0]=38470*O,E[O+512>>0]=7471*O+32768,E[O+768>>0]=-11059*O,E[O+1024>>0]=-21709*O,E[O+1280>>0]=32768*O+8421375,E[O+1536>>0]=-27439*O,E[O+1792>>0]=-5329*O}function re(O){for(var j=O[0],Y=O[1]-1;Y>=0;)j&1<<Y&&(v|=1<<b),Y--,b--,b<0&&(v==255?(k(255),k(0)):k(v),b=7,v=0)}function k(O){g.push(O)}function V(O){k(O>>8&255),k(O&255)}function ye(O,j){var Y,G,Z,Q,he,de,Ie,we,B=0,U,J=8,Oe=64;for(U=0;U<J;++U){Y=O[B],G=O[B+1],Z=O[B+2],Q=O[B+3],he=O[B+4],de=O[B+5],Ie=O[B+6],we=O[B+7];var X=Y+we,ae=Y-we,_e=G+Ie,K=G-Ie,pe=Z+de,Ge=Z-de,Se=Q+he,pt=Q-he,Pt=X+Se,vi=X-Se,Vi=_e+pe,Gi=_e-pe;O[B]=Pt+Vi,O[B+4]=Pt-Vi;var Nr=(Gi+vi)*.707106781;O[B+2]=vi+Nr,O[B+6]=vi-Nr,Pt=pt+Ge,Vi=Ge+K,Gi=K+ae;var Br=(Pt-Gi)*.382683433,Mn=.5411961*Pt+Br,Pr=1.306562965*Gi+Br,Lr=Vi*.707106781,Rr=ae+Lr,Mr=ae-Lr;O[B+5]=Mr+Mn,O[B+3]=Mr-Mn,O[B+1]=Rr+Pr,O[B+7]=Rr-Pr,B+=8}for(B=0,U=0;U<J;++U){Y=O[B],G=O[B+8],Z=O[B+16],Q=O[B+24],he=O[B+32],de=O[B+40],Ie=O[B+48],we=O[B+56];var Ju=Y+we,Ho=Y-we,Zu=G+Ie,Qu=G-Ie,Xu=Z+de,ef=Z-de,tf=Q+he,a_=Q-he,Fr=Ju+tf,Vo=Ju-tf,Fn=Zu+Xu,Dn=Zu-Xu;O[B]=Fr+Fn,O[B+32]=Fr-Fn;var rf=(Dn+Vo)*.707106781;O[B+16]=Vo+rf,O[B+48]=Vo-rf,Fr=a_+ef,Fn=ef+Qu,Dn=Qu+Ho;var nf=(Fr-Dn)*.382683433,sf=.5411961*Fr+nf,of=1.306562965*Dn+nf,af=Fn*.707106781,lf=Ho+af,cf=Ho-af;O[B+40]=cf+sf,O[B+24]=cf-sf,O[B+8]=lf+of,O[B+56]=lf-of,B++}var qn;for(U=0;U<Oe;++U)qn=O[U]*j[U],m[U]=qn>0?qn+.5|0:qn-.5|0;return m}function ve(){V(65504),V(16),k(74),k(70),k(73),k(70),k(0),k(1),k(1),k(0),V(1),V(1),k(0),k(0)}function ce(O){if(O){V(65505),O[0]===69&&O[1]===120&&O[2]===105&&O[3]===102?V(O.length+2):(V(O.length+5+2),k(69),k(120),k(105),k(102),k(0));for(var j=0;j<O.length;j++)k(O[j])}}function ue(O,j){V(65472),V(17),k(8),V(j),V(O),k(3),k(1),k(17),k(0),k(2),k(17),k(1),k(3),k(17),k(1)}function ne(){V(65499),V(132),k(0);for(var O=0;O<64;O++)k(n[O]);k(1);for(var j=0;j<64;j++)k(s[j])}function q(){V(65476),V(418),k(0);for(var O=0;O<16;O++)k(T[O+1]);for(var j=0;j<=11;j++)k(I[j]);k(16);for(var Y=0;Y<16;Y++)k(F[Y+1]);for(var G=0;G<=161;G++)k(L[G]);k(1);for(var Z=0;Z<16;Z++)k($[Z+1]);for(var Q=0;Q<=11;Q++)k(P[Q]);k(17);for(var he=0;he<16;he++)k(M[he+1]);for(var de=0;de<=161;de++)k(H[de])}function R(O){typeof O=="undefined"||O.constructor!==Array||O.forEach(j=>{if(typeof j=="string"){V(65534);var Y=j.length;V(Y+2);var G;for(G=0;G<Y;G++)k(j.charCodeAt(G))}})}function be(){V(65498),V(12),k(3),k(1),k(0),k(2),k(17),k(3),k(17),k(0),k(63),k(0)}function z(O,j,Y,G,Z){for(var Q=Z[0],he=Z[240],de,Ie=16,we=63,B=64,U=ye(O,j),J=0;J<B;++J)d[S[J]]=U[J];var Oe=d[0]-Y;Y=d[0],Oe==0?re(G[0]):(de=32767+Oe,re(G[p[de]]),re(h[de]));for(var X=63;X>0&&d[X]==0;X--);if(X==0)return re(Q),Y;for(var ae=1,_e;ae<=X;){for(var K=ae;d[ae]==0&&ae<=X;++ae);var pe=ae-K;if(pe>=Ie){_e=pe>>4;for(var Ge=1;Ge<=_e;++Ge)re(he);pe=pe&15}de=32767+d[ae],re(Z[(pe<<4)+p[de]]),re(h[de]),ae++}return X!=we&&re(Q),Y}function se(){for(var O=String.fromCharCode,j=0;j<256;j++)A[j]=O(j)}this.encode=function(O,j){var Y=new Date().getTime();j&&dt(j),g=new Array,v=0,b=7,V(65496),ve(),R(O.comments),ce(O.exifBuffer),ne(),ue(O.width,O.height),q(),be();var G=0,Z=0,Q=0;v=0,b=7,this.encode.displayName="_encode_";for(var he=O.data,de=O.width,Ie=O.height,we=de*4,B=de*3,U,J=0,Oe,X,ae,_e,K,pe,Ge,Se;J<Ie;){for(U=0;U<we;){for(_e=we*J+U,K=_e,pe=-1,Ge=0,Se=0;Se<64;Se++)Ge=Se>>3,pe=(Se&7)*4,K=_e+Ge*we+pe,J+Ge>=Ie&&(K-=we*(J+1+Ge-Ie)),U+pe>=we&&(K-=U+pe-we+4),Oe=he[K++],X=he[K++],ae=he[K++],y[Se]=(E[Oe]+E[X+256>>0]+E[ae+512>>0]>>16)-128,x[Se]=(E[Oe+768>>0]+E[X+1024>>0]+E[ae+1280>>0]>>16)-128,_[Se]=(E[Oe+1280>>0]+E[X+1536>>0]+E[ae+1792>>0]>>16)-128;G=z(y,o,G,l,u),Z=z(x,a,Z,c,f),Q=z(_,a,Q,c,f),U+=32}J+=8}if(b>=0){var pt=[];pt[1]=b+1,pt[0]=(1<<b+1)-1,re(pt)}if(V(65497),typeof ts=="undefined")return new Uint8Array(g);return Buffer.from(g);var Pt,vi};function dt(O){if(O<=0&&(O=1),O>100&&(O=100),C!=O){var j=0;O<50?j=Math.floor(5e3/O):j=Math.floor(200-O*2),W(j),C=O}}function Ct(){var O=new Date().getTime();i||(i=50),se(),Ee(),le(),ie(),dt(i);var j=new Date().getTime()-O}Ct()}typeof ts!="undefined"?ts.exports=Fh:typeof window!="undefined"&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].encode=Fh);function Fh(i,e){typeof e=="undefined"&&(e=50);var t=new Hb(e),r=t.encode(i,e);return{data:r,width:i.width,height:i.height}}});var jh=w((C2,Aa)=>{var Ca=(function(){"use strict";var e=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,r=799,n=3406,s=2276,o=1567,a=3784,l=5793,c=2896;function u(){}function f(b,y){for(var x=0,_=[],A,E,C=16;C>0&&!b[C-1];)C--;_.push({children:[],index:0});var S=_[0],T;for(A=0;A<C;A++){for(E=0;E<b[A];E++){for(S=_.pop(),S.children[S.index]=y[x];S.index>0;){if(_.length===0)throw new Error("Could not recreate Huffman Table");S=_.pop()}for(S.index++,_.push(S);_.length<=A;)_.push(T={children:[],index:0}),S.children[S.index]=T.children,S=T;x++}A+1<C&&(_.push(T={children:[],index:0}),S.children[S.index]=T.children,S=T)}return _[0].children}function h(b,y,x,_,A,E,C,S,T,I){var F=x.precision,L=x.samplesPerLine,$=x.scanLines,P=x.mcusPerLine,M=x.progressive,H=x.maxH,W=x.maxV,D=y,Ee=0,le=0;function ie(){if(le>0)return le--,Ee>>le&1;if(Ee=b[y++],Ee==255){var B=b[y++];if(B)throw new Error("unexpected marker: "+(Ee<<8|B).toString(16))}return le=7,Ee>>>7}function re(B){for(var U=B,J;(J=ie())!==null;){if(U=U[J],typeof U=="number")return U;if(typeof U!="object")throw new Error("invalid huffman sequence")}return null}function k(B){for(var U=0;B>0;){var J=ie();if(J===null)return;U=U<<1|J,B--}return U}function V(B){var U=k(B);return U>=1<<B-1?U:U+(-1<<B)+1}function ye(B,U){var J=re(B.huffmanTableDC),Oe=J===0?0:V(J);U[0]=B.pred+=Oe;for(var X=1;X<64;){var ae=re(B.huffmanTableAC),_e=ae&15,K=ae>>4;if(_e===0){if(K<15)break;X+=16;continue}X+=K;var pe=e[X];U[pe]=V(_e),X++}}function ve(B,U){var J=re(B.huffmanTableDC),Oe=J===0?0:V(J)<<T;U[0]=B.pred+=Oe}function ce(B,U){U[0]|=ie()<<T}var ue=0;function ne(B,U){if(ue>0){ue--;return}for(var J=E,Oe=C;J<=Oe;){var X=re(B.huffmanTableAC),ae=X&15,_e=X>>4;if(ae===0){if(_e<15){ue=k(_e)+(1<<_e)-1;break}J+=16;continue}J+=_e;var K=e[J];U[K]=V(ae)*(1<<T),J++}}var q=0,R;function be(B,U){for(var J=E,Oe=C,X=0;J<=Oe;){var ae=e[J],_e=U[ae]<0?-1:1;switch(q){case 0:var K=re(B.huffmanTableAC),pe=K&15,X=K>>4;if(pe===0)X<15?(ue=k(X)+(1<<X),q=4):(X=16,q=1);else{if(pe!==1)throw new Error("invalid ACn encoding");R=V(pe),q=X?2:3}continue;case 1:case 2:U[ae]?U[ae]+=(ie()<<T)*_e:(X--,X===0&&(q=q==2?3:0));break;case 3:U[ae]?U[ae]+=(ie()<<T)*_e:(U[ae]=R<<T,q=0);break;case 4:U[ae]&&(U[ae]+=(ie()<<T)*_e);break}J++}q===4&&(ue--,ue===0&&(q=0))}function z(B,U,J,Oe,X){var ae=J/P|0,_e=J%P,K=ae*B.v+Oe,pe=_e*B.h+X;B.blocks[K]===void 0&&I.tolerantDecoding||U(B,B.blocks[K][pe])}function se(B,U,J){var Oe=J/B.blocksPerLine|0,X=J%B.blocksPerLine;B.blocks[Oe]===void 0&&I.tolerantDecoding||U(B,B.blocks[Oe][X])}var dt=_.length,Ct,O,j,Y,G,Z;M?E===0?Z=S===0?ve:ce:Z=S===0?ne:be:Z=ye;var Q=0,he,de;dt==1?de=_[0].blocksPerLine*_[0].blocksPerColumn:de=P*x.mcusPerColumn,A||(A=de);for(var Ie,we;Q<de;){for(O=0;O<dt;O++)_[O].pred=0;if(ue=0,dt==1)for(Ct=_[0],G=0;G<A;G++)se(Ct,Z,Q),Q++;else for(G=0;G<A;G++){for(O=0;O<dt;O++)for(Ct=_[O],Ie=Ct.h,we=Ct.v,j=0;j<we;j++)for(Y=0;Y<Ie;Y++)z(Ct,Z,Q,j,Y);if(Q++,Q===de)break}if(Q===de)do{if(b[y]===255&&b[y+1]!==0)break;y+=1}while(y<b.length-2);if(le=0,he=b[y]<<8|b[y+1],he<65280)throw new Error("marker was not found");if(he>=65488&&he<=65495)y+=2;else break}return y-D}function p(b,y){var x=[],_=y.blocksPerLine,A=y.blocksPerColumn,E=_<<3,C=new Int32Array(64),S=new Uint8Array(64);function T(D,Ee,le){var ie=y.quantizationTable,re,k,V,ye,ve,ce,ue,ne,q,R=le,be;for(be=0;be<64;be++)R[be]=D[be]*ie[be];for(be=0;be<8;++be){var z=8*be;if(R[1+z]==0&&R[2+z]==0&&R[3+z]==0&&R[4+z]==0&&R[5+z]==0&&R[6+z]==0&&R[7+z]==0){q=l*R[0+z]+512>>10,R[0+z]=q,R[1+z]=q,R[2+z]=q,R[3+z]=q,R[4+z]=q,R[5+z]=q,R[6+z]=q,R[7+z]=q;continue}re=l*R[0+z]+128>>8,k=l*R[4+z]+128>>8,V=R[2+z],ye=R[6+z],ve=c*(R[1+z]-R[7+z])+128>>8,ne=c*(R[1+z]+R[7+z])+128>>8,ce=R[3+z]<<4,ue=R[5+z]<<4,q=re-k+1>>1,re=re+k+1>>1,k=q,q=V*a+ye*o+128>>8,V=V*o-ye*a+128>>8,ye=q,q=ve-ue+1>>1,ve=ve+ue+1>>1,ue=q,q=ne+ce+1>>1,ce=ne-ce+1>>1,ne=q,q=re-ye+1>>1,re=re+ye+1>>1,ye=q,q=k-V+1>>1,k=k+V+1>>1,V=q,q=ve*s+ne*n+2048>>12,ve=ve*n-ne*s+2048>>12,ne=q,q=ce*r+ue*t+2048>>12,ce=ce*t-ue*r+2048>>12,ue=q,R[0+z]=re+ne,R[7+z]=re-ne,R[1+z]=k+ue,R[6+z]=k-ue,R[2+z]=V+ce,R[5+z]=V-ce,R[3+z]=ye+ve,R[4+z]=ye-ve}for(be=0;be<8;++be){var se=be;if(R[8+se]==0&&R[16+se]==0&&R[24+se]==0&&R[32+se]==0&&R[40+se]==0&&R[48+se]==0&&R[56+se]==0){q=l*le[be+0]+8192>>14,R[0+se]=q,R[8+se]=q,R[16+se]=q,R[24+se]=q,R[32+se]=q,R[40+se]=q,R[48+se]=q,R[56+se]=q;continue}re=l*R[0+se]+2048>>12,k=l*R[32+se]+2048>>12,V=R[16+se],ye=R[48+se],ve=c*(R[8+se]-R[56+se])+2048>>12,ne=c*(R[8+se]+R[56+se])+2048>>12,ce=R[24+se],ue=R[40+se],q=re-k+1>>1,re=re+k+1>>1,k=q,q=V*a+ye*o+2048>>12,V=V*o-ye*a+2048>>12,ye=q,q=ve-ue+1>>1,ve=ve+ue+1>>1,ue=q,q=ne+ce+1>>1,ce=ne-ce+1>>1,ne=q,q=re-ye+1>>1,re=re+ye+1>>1,ye=q,q=k-V+1>>1,k=k+V+1>>1,V=q,q=ve*s+ne*n+2048>>12,ve=ve*n-ne*s+2048>>12,ne=q,q=ce*r+ue*t+2048>>12,ce=ce*t-ue*r+2048>>12,ue=q,R[0+se]=re+ne,R[56+se]=re-ne,R[8+se]=k+ue,R[48+se]=k-ue,R[16+se]=V+ce,R[40+se]=V-ce,R[24+se]=ye+ve,R[32+se]=ye-ve}for(be=0;be<64;++be){var dt=128+(R[be]+8>>4);Ee[be]=dt<0?0:dt>255?255:dt}}v(E*A*8);for(var I,F,L=0;L<A;L++){var $=L<<3;for(I=0;I<8;I++)x.push(new Uint8Array(E));for(var P=0;P<_;P++){T(y.blocks[L][P],S,C);var M=0,H=P<<3;for(F=0;F<8;F++){var W=x[$+F];for(I=0;I<8;I++)W[H+I]=S[M++]}}}return x}function m(b){return b<0?0:b>255?255:b}u.prototype={load:function(y){var x=new XMLHttpRequest;x.open("GET",y,!0),x.responseType="arraybuffer",x.onload=(function(){var _=new Uint8Array(x.response||x.mozResponseArrayBuffer);this.parse(_),this.onload&&this.onload()}).bind(this),x.send(null)},parse:function(y){var x=this.opts.maxResolutionInMP*1e3*1e3,_=0,A=y.length;function E(){var K=y[_]<<8|y[_+1];return _+=2,K}function C(){var K=E(),pe=y.subarray(_,_+K-2);return _+=pe.length,pe}function S(K){var pe=1,Ge=1,Se,pt;for(pt in K.components)K.components.hasOwnProperty(pt)&&(Se=K.components[pt],pe<Se.h&&(pe=Se.h),Ge<Se.v&&(Ge=Se.v));var Pt=Math.ceil(K.samplesPerLine/8/pe),vi=Math.ceil(K.scanLines/8/Ge);for(pt in K.components)if(K.components.hasOwnProperty(pt)){Se=K.components[pt];var Vi=Math.ceil(Math.ceil(K.samplesPerLine/8)*Se.h/pe),Gi=Math.ceil(Math.ceil(K.scanLines/8)*Se.v/Ge),Nr=Pt*Se.h,Br=vi*Se.v,Mn=Br*Nr,Pr=[];v(Mn*256);for(var Lr=0;Lr<Br;Lr++){for(var Rr=[],Mr=0;Mr<Nr;Mr++)Rr.push(new Int32Array(64));Pr.push(Rr)}Se.blocksPerLine=Vi,Se.blocksPerColumn=Gi,Se.blocks=Pr}K.maxH=pe,K.maxV=Ge,K.mcusPerLine=Pt,K.mcusPerColumn=vi}var T=null,I=null,F=null,L,$,P=[],M=[],H=[],W=[],D=E(),Ee=-1;if(this.comments=[],D!=65496)throw new Error("SOI not found");for(D=E();D!=65497;){var le,ie,re;switch(D){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var k=C();if(D===65534){var V=String.fromCharCode.apply(null,k);this.comments.push(V)}D===65504&&k[0]===74&&k[1]===70&&k[2]===73&&k[3]===70&&k[4]===0&&(T={version:{major:k[5],minor:k[6]},densityUnits:k[7],xDensity:k[8]<<8|k[9],yDensity:k[10]<<8|k[11],thumbWidth:k[12],thumbHeight:k[13],thumbData:k.subarray(14,14+3*k[12]*k[13])}),D===65505&&k[0]===69&&k[1]===120&&k[2]===105&&k[3]===102&&k[4]===0&&(this.exifBuffer=k.subarray(5,k.length)),D===65518&&k[0]===65&&k[1]===100&&k[2]===111&&k[3]===98&&k[4]===101&&k[5]===0&&(I={version:k[6],flags0:k[7]<<8|k[8],flags1:k[9]<<8|k[10],transformCode:k[11]});break;case 65499:for(var ye=E(),ve=ye+_-2;_<ve;){var ce=y[_++];v(256);var ue=new Int32Array(64);if(ce>>4===0)for(ie=0;ie<64;ie++){var ne=e[ie];ue[ne]=y[_++]}else if(ce>>4===1)for(ie=0;ie<64;ie++){var ne=e[ie];ue[ne]=E()}else throw new Error("DQT: invalid table spec");P[ce&15]=ue}break;case 65472:case 65473:case 65474:E(),L={},L.extended=D===65473,L.progressive=D===65474,L.precision=y[_++],L.scanLines=E(),L.samplesPerLine=E(),L.components={},L.componentsOrder=[];var q=L.scanLines*L.samplesPerLine;if(q>x){var R=Math.ceil((q-x)/1e6);throw new Error(`maxResolutionInMP limit exceeded by ${R}MP`)}var be=y[_++],z,se=0,dt=0;for(le=0;le<be;le++){z=y[_];var Ct=y[_+1]>>4,O=y[_+1]&15,j=y[_+2];if(Ct<=0||O<=0)throw new Error("Invalid sampling factor, expected values above 0");L.componentsOrder.push(z),L.components[z]={h:Ct,v:O,quantizationIdx:j},_+=3}S(L),M.push(L);break;case 65476:var Y=E();for(le=2;le<Y;){var G=y[_++],Z=new Uint8Array(16),Q=0;for(ie=0;ie<16;ie++,_++)Q+=Z[ie]=y[_];v(16+Q);var he=new Uint8Array(Q);for(ie=0;ie<Q;ie++,_++)he[ie]=y[_];le+=17+Q,(G>>4===0?W:H)[G&15]=f(Z,he)}break;case 65501:E(),$=E();break;case 65500:E(),E();break;case 65498:var de=E(),Ie=y[_++],we=[],B;for(le=0;le<Ie;le++){B=L.components[y[_++]];var U=y[_++];B.huffmanTableDC=W[U>>4],B.huffmanTableAC=H[U&15],we.push(B)}var J=y[_++],Oe=y[_++],X=y[_++],ae=h(y,_,L,we,$,J,Oe,X>>4,X&15,this.opts);_+=ae;break;case 65535:y[_]!==255&&_--;break;default:if(y[_-3]==255&&y[_-2]>=192&&y[_-2]<=254){_-=3;break}else if(D===224||D==225){if(Ee!==-1)throw new Error(`first unknown JPEG marker at offset ${Ee.toString(16)}, second unknown JPEG marker ${D.toString(16)} at offset ${(_-1).toString(16)}`);Ee=_-1;let K=E();if(y[_+K-2]===255){_+=K-2;break}}throw new Error("unknown JPEG marker "+D.toString(16))}D=E()}if(M.length!=1)throw new Error("only single frame JPEGs supported");for(var le=0;le<M.length;le++){var _e=M[le].components;for(var ie in _e)_e[ie].quantizationTable=P[_e[ie].quantizationIdx],delete _e[ie].quantizationIdx}this.width=L.samplesPerLine,this.height=L.scanLines,this.jfif=T,this.adobe=I,this.components=[];for(var le=0;le<L.componentsOrder.length;le++){var B=L.components[L.componentsOrder[le]];this.components.push({lines:p(L,B),scaleX:B.h/L.maxH,scaleY:B.v/L.maxV})}},getData:function(y,x){var _=this.width/y,A=this.height/x,E,C,S,T,I,F,L,$,P,M,H=0,W,D,Ee,le,ie,re,k,V,ye,ve,ce,ue=y*x*this.components.length;v(ue);var ne=new Uint8Array(ue);switch(this.components.length){case 1:for(E=this.components[0],M=0;M<x;M++)for(I=E.lines[0|M*E.scaleY*A],P=0;P<y;P++)W=I[0|P*E.scaleX*_],ne[H++]=W;break;case 2:for(E=this.components[0],C=this.components[1],M=0;M<x;M++)for(I=E.lines[0|M*E.scaleY*A],F=C.lines[0|M*C.scaleY*A],P=0;P<y;P++)W=I[0|P*E.scaleX*_],ne[H++]=W,W=F[0|P*C.scaleX*_],ne[H++]=W;break;case 3:for(ce=!0,this.adobe&&this.adobe.transformCode?ce=!0:typeof this.opts.colorTransform!="undefined"&&(ce=!!this.opts.colorTransform),E=this.components[0],C=this.components[1],S=this.components[2],M=0;M<x;M++)for(I=E.lines[0|M*E.scaleY*A],F=C.lines[0|M*C.scaleY*A],L=S.lines[0|M*S.scaleY*A],P=0;P<y;P++)ce?(W=I[0|P*E.scaleX*_],D=F[0|P*C.scaleX*_],Ee=L[0|P*S.scaleX*_],V=m(W+1.402*(Ee-128)),ye=m(W-.3441363*(D-128)-.71413636*(Ee-128)),ve=m(W+1.772*(D-128))):(V=I[0|P*E.scaleX*_],ye=F[0|P*C.scaleX*_],ve=L[0|P*S.scaleX*_]),ne[H++]=V,ne[H++]=ye,ne[H++]=ve;break;case 4:if(!this.adobe)throw new Error("Unsupported color mode (4 components)");for(ce=!1,this.adobe&&this.adobe.transformCode?ce=!0:typeof this.opts.colorTransform!="undefined"&&(ce=!!this.opts.colorTransform),E=this.components[0],C=this.components[1],S=this.components[2],T=this.components[3],M=0;M<x;M++)for(I=E.lines[0|M*E.scaleY*A],F=C.lines[0|M*C.scaleY*A],L=S.lines[0|M*S.scaleY*A],$=T.lines[0|M*T.scaleY*A],P=0;P<y;P++)ce?(W=I[0|P*E.scaleX*_],D=F[0|P*C.scaleX*_],Ee=L[0|P*S.scaleX*_],le=$[0|P*T.scaleX*_],ie=255-m(W+1.402*(Ee-128)),re=255-m(W-.3441363*(D-128)-.71413636*(Ee-128)),k=255-m(W+1.772*(D-128))):(ie=I[0|P*E.scaleX*_],re=F[0|P*C.scaleX*_],k=L[0|P*S.scaleX*_],le=$[0|P*T.scaleX*_]),ne[H++]=255-ie,ne[H++]=255-re,ne[H++]=255-k,ne[H++]=255-le;break;default:throw new Error("Unsupported color mode")}return ne},copyToImageData:function(y,x){var _=y.width,A=y.height,E=y.data,C=this.getData(_,A),S=0,T=0,I,F,L,$,P,M,H,W,D;switch(this.components.length){case 1:for(F=0;F<A;F++)for(I=0;I<_;I++)L=C[S++],E[T++]=L,E[T++]=L,E[T++]=L,x&&(E[T++]=255);break;case 3:for(F=0;F<A;F++)for(I=0;I<_;I++)H=C[S++],W=C[S++],D=C[S++],E[T++]=H,E[T++]=W,E[T++]=D,x&&(E[T++]=255);break;case 4:for(F=0;F<A;F++)for(I=0;I<_;I++)P=C[S++],M=C[S++],L=C[S++],$=C[S++],H=255-m(P*(1-$/255)+$),W=255-m(M*(1-$/255)+$),D=255-m(L*(1-$/255)+$),E[T++]=H,E[T++]=W,E[T++]=D,x&&(E[T++]=255);break;default:throw new Error("Unsupported color mode")}}};var d=0,g=0;function v(b=0){var y=d+b;if(y>g){var x=Math.ceil((y-g)/1024/1024);throw new Error(`maxMemoryUsageInMB limit exceeded by at least ${x}MB`)}d=y}return u.resetMaxMemoryUsage=function(b){d=0,g=b},u.getBytesAllocated=function(){return d},u.requestMemoryAllocation=v,u})();typeof Aa!="undefined"?Aa.exports=Uh:typeof window!="undefined"&&(window["jpeg-js"]=window["jpeg-js"]||{},window["jpeg-js"].decode=Uh);function Uh(i,e={}){var t={colorTransform:void 0,useTArray:!1,formatAsRGBA:!0,tolerantDecoding:!0,maxResolutionInMP:100,maxMemoryUsageInMB:512},r={...t,...e},n=new Uint8Array(i),s=new Ca;s.opts=r,Ca.resetMaxMemoryUsage(r.maxMemoryUsageInMB*1024*1024),s.parse(n);var o=r.formatAsRGBA?4:3,a=s.width*s.height*o;try{Ca.requestMemoryAllocation(a);var l={width:s.width,height:s.height,exifBuffer:s.exifBuffer,data:r.useTArray?new Uint8Array(a):Buffer.alloc(a)};s.comments.length>0&&(l.comments=s.comments)}catch(c){throw c instanceof RangeError?new Error("Could not allocate enough memory for the image. Required: "+a):c instanceof ReferenceError&&c.message==="Buffer is not defined"?new Error("Buffer is not globally defined in this environment. Consider setting useTArray to true"):c}return s.copyToImageData(l,r.formatAsRGBA),l}});var Hh=w((A2,$h)=>{var Vb=qh(),Gb=jh();$h.exports={encode:Vb,decode:Gb}});var Gh=w((I2,Vh)=>{"use strict";function is(){this._types=Object.create(null),this._extensions=Object.create(null);for(let i=0;i<arguments.length;i++)this.define(arguments[i]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}is.prototype.define=function(i,e){for(let t in i){let r=i[t].map(function(n){return n.toLowerCase()});t=t.toLowerCase();for(let n=0;n<r.length;n++){let s=r[n];if(s[0]!=="*"){if(!e&&s in this._types)throw new Error('Attempt to change mapping for "'+s+'" extension from "'+this._types[s]+'" to "'+t+'". Pass `force=true` to allow this, otherwise remove "'+s+'" from the list of extensions for "'+t+'".');this._types[s]=t}}if(e||!this._extensions[t]){let n=r[0];this._extensions[t]=n[0]!=="*"?n:n.substr(1)}}};is.prototype.getType=function(i){i=String(i);let e=i.replace(/^.*[/\\]/,"").toLowerCase(),t=e.replace(/^.*\./,"").toLowerCase(),r=e.length<i.length;return(t.length<e.length-1||!r)&&this._types[t]||null};is.prototype.getExtension=function(i){return i=/^\s*([^;\s]*)/.test(i)&&RegExp.$1,i&&this._extensions[i.toLowerCase()]||null};Vh.exports=is});var Yh=w((T2,Wh)=>{Wh.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}});var zh=w((N2,Kh)=>{Kh.exports={"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}});var Zh=w((B2,Jh)=>{"use strict";var Wb=Gh();Jh.exports=new Wb(Yh(),zh())});var Xh=w((P2,Qh)=>{Qh.exports=function(i,e){for(var t=[],r=0;r<i.length;r++){var n=e(i[r],r);Yb(n)?t.push.apply(t,n):t.push(n)}return t};var Yb=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"}});var nd=w((L2,rd)=>{"use strict";rd.exports=td;function td(i,e,t){i instanceof RegExp&&(i=ed(i,t)),e instanceof RegExp&&(e=ed(e,t));var r=id(i,e,t);return r&&{start:r[0],end:r[1],pre:t.slice(0,r[0]),body:t.slice(r[0]+i.length,r[1]),post:t.slice(r[1]+e.length)}}function ed(i,e){var t=e.match(i);return t?t[0]:null}td.range=id;function id(i,e,t){var r,n,s,o,a,l=t.indexOf(i),c=t.indexOf(e,l+1),u=l;if(l>=0&&c>0){if(i===e)return[l,c];for(r=[],s=t.length;u>=0&&!a;)u==l?(r.push(u),l=t.indexOf(i,u+1)):r.length==1?a=[r.pop(),c]:(n=r.pop(),n<s&&(s=n,o=c),c=t.indexOf(e,u+1)),u=l<c&&l>=0?l:c;r.length&&(a=[s,o])}return a}});var hd=w((M2,fd)=>{var R2=Xh(),sd=nd();fd.exports=Qb;var od="\0SLASH"+Math.random()+"\0",ad="\0OPEN"+Math.random()+"\0",Na="\0CLOSE"+Math.random()+"\0",ld="\0COMMA"+Math.random()+"\0",cd="\0PERIOD"+Math.random()+"\0",Kb=1e5,zb=4e6;function Ia(i){return parseInt(i,10)==i?parseInt(i,10):i.charCodeAt(0)}function Jb(i){return i.split("\\\\").join(od).split("\\{").join(ad).split("\\}").join(Na).split("\\,").join(ld).split("\\.").join(cd)}function Zb(i){return i.split(od).join("\\").split(ad).join("{").split(Na).join("}").split(ld).join(",").split(cd).join(".")}function ud(i){if(!i)return[""];var e=[],t=sd("{","}",i);if(!t)return i.split(",");var r=t.pre,n=t.body,s=t.post,o=r.split(",");o[o.length-1]+="{"+n+"}";var a=ud(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function Qb(i,e){if(!i)return[];e=e||{};var t=e.max==null?Kb:e.max,r=e.maxLength==null?zb:e.maxLength;return i.substr(0,2)==="{}"&&(i="\\{\\}"+i.substr(2)),Ta(Jb(i),t,r,!0).map(Zb)}function Xb(i){return"{"+i+"}"}function ew(i){return/^-?0\d/.test(i)}function tw(i,e){return i<=e}function iw(i,e){return i>=e}function Gr(i,e,t,r,n,s,o,a){for(var l=[],c=0,u=0;u<i.length;u++)for(var f=0;f<r.length;f++){if(l.length>=n)return l;var h=i[u]+t+r[f];if(!(o&&h.length===e[u])){if(c+h.length>s)return l;l.push(h),a.push(e[u]),c+=h.length}}return l}function rw(i,e,t,r){var n=i.split(/\.\./),s=[];if(n[0]===void 0||n[1]===void 0)return s;var o=Ia(n[0]),a=Ia(n[1]),l=Math.max(n[0].length,n[1].length),c=n.length===3&&n[2]!==void 0?Math.max(Math.abs(Ia(n[2])),1):1,u=tw,f=a<o;f&&(c*=-1,u=iw);for(var h=n.some(ew),p=0,m=o;u(m,a)&&s.length<t;m+=c){var d;if(e)d=String.fromCharCode(m),d==="\\"&&(d="");else if(d=String(m),h){var g=l-d.length;if(g>0){var v=new Array(g+1).join("0");m<0?d="-"+v+d.slice(1):d=v+d}}if(p+d.length>r)break;s.push(d),p+=d.length}return s}function Ta(i,e,t,r){for(var n=[""],s=[0],o=!1,a=!0,l;;){var c=sd("{","}",i);if(!c)return Gr(n,s,i,[""],e,t,o,[]);var u=c.pre;if(/\$$/.test(u))return Gr(n,s,i,[""],e,t,o,[]);var f=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(c.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(c.body),p=f||h,m=c.body.indexOf(",")>=0;if(!p&&!m){if(c.post.match(/,(?!,).*\}/)){i=c.pre+"{"+c.body+Na+c.post,r=!0,a=!0,o=!1,s=[];for(var d=0;d<n.length;d++)s.push(n[d].length);continue}return Gr(n,s,u+"{"+c.body+"}"+c.post,[""],e,t,o,[])}a&&(o=r&&!p,a=!1);var g;if(p)g=rw(c.body,h,e,t);else{var v=ud(c.body);if(v.length===1&&v[0]!==void 0&&(v=Ta(v[0],e,t,!1).map(Xb),v.length===1)){if(l=[],n=Gr(n,s,u+v[0],[""],e,t,o&&!c.post.length,l),s=l,!c.post.length)break;i=c.post;continue}for(var b=o&&!c.post.length&&!u,y=0;b&&y<n.length;y++)n[y].length!==s[y]&&(b=!1);g=[];var x=0;e:for(var _=0;_<v.length;_++)for(var A=Ta(v[_],e,t,!1),E=0;E<A.length;E++){var C=A[E];if(!(b&&!C)){if(g.length>=e||x+C.length>t)break e;g.push(C),x+=C.length}}}if(l=[],n=Gr(n,s,u,g,e,t,o&&!c.post.length,l),s=l,!c.post.length)break;i=c.post}return n}});var vd=w((F2,yd)=>{yd.exports=ct;ct.Minimatch=Le;var Wr=(function(){try{return require("path")}catch{}})()||{sep:"/"};ct.sep=Wr.sep;var wi=ct.GLOBSTAR=Le.GLOBSTAR={},nw=hd(),dd={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Ba="[^/]",Pa=Ba+"*?",sw="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ow="(?:(?!(?:\\/|^)\\.).)*?",pd=aw("().*{}+?[]^$\\!");function aw(i){return i.split("").reduce(function(e,t){return e[t]=!0,e},{})}var md=/\/+/;ct.filter=lw;function lw(i,e){return e=e||{},function(t,r,n){return ct(t,i,e)}}function ei(i,e){e=e||{};var t={};return Object.keys(i).forEach(function(r){t[r]=i[r]}),Object.keys(e).forEach(function(r){t[r]=e[r]}),t}ct.defaults=function(i){if(!i||typeof i!="object"||!Object.keys(i).length)return ct;var e=ct,t=function(n,s,o){return e(n,s,ei(i,o))};return t.Minimatch=function(n,s){return new e.Minimatch(n,ei(i,s))},t.Minimatch.defaults=function(n){return e.defaults(ei(i,n)).Minimatch},t.filter=function(n,s){return e.filter(n,ei(i,s))},t.defaults=function(n){return e.defaults(ei(i,n))},t.makeRe=function(n,s){return e.makeRe(n,ei(i,s))},t.braceExpand=function(n,s){return e.braceExpand(n,ei(i,s))},t.match=function(r,n,s){return e.match(r,n,ei(i,s))},t};Le.defaults=function(i){return ct.defaults(i).Minimatch};function ct(i,e,t){return ns(e),t||(t={}),!t.nocomment&&e.charAt(0)==="#"?!1:new Le(e,t).match(i)}function Le(i,e){if(!(this instanceof Le))return new Le(i,e);ns(i),e||(e={}),i=i.trim(),!e.allowWindowsEscape&&Wr.sep!=="/"&&(i=i.split(Wr.sep).join("/")),this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion!==void 0?e.maxGlobstarRecursion:200,this.set=[],this.pattern=i,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}Le.prototype.debug=function(){};Le.prototype.make=cw;function cw(){var i=this.pattern,e=this.options;if(!e.nocomment&&i.charAt(0)==="#"){this.comment=!0;return}if(!i){this.empty=!0;return}this.parseNegate();var t=this.globSet=this.braceExpand();e.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,t),t=this.globParts=t.map(function(r){return r.split(md)}),this.debug(this.pattern,t),t=t.map(function(r,n,s){return r.map(this.parse,this)},this),this.debug(this.pattern,t),t=t.filter(function(r){return r.indexOf(!1)===-1}),this.debug(this.pattern,t),this.set=t}Le.prototype.parseNegate=uw;function uw(){var i=this.pattern,e=!1,t=this.options,r=0;if(!t.nonegate){for(var n=0,s=i.length;n<s&&i.charAt(n)==="!";n++)e=!e,r++;r&&(this.pattern=i.substr(r)),this.negate=e}}ct.braceExpand=function(i,e){return gd(i,e)};Le.prototype.braceExpand=gd;function gd(i,e){return e||(this instanceof Le?e=this.options:e={}),i=typeof i=="undefined"?this.pattern:i,ns(i),e.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:nw(i)}var fw=1024*64,ns=function(i){if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>fw)throw new TypeError("pattern is too long")};Le.prototype.parse=hw;var rs={};function hw(i,e){ns(i);var t=this.options;if(i==="**")if(t.noglobstar)i="*";else return wi;if(i==="")return"";var r="",n=!!t.nocase,s=!1,o=[],a=[],l,c=!1,u=-1,f=-1,h=i.charAt(0)==="."?"":t.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",p=this;function m(){if(l){switch(l){case"*":r+=Pa,n=!0;break;case"?":r+=Ba,n=!0;break;default:r+="\\"+l;break}p.debug("clearStateChar %j %j",l,r),l=!1}}for(var d=0,g=i.length,v;d<g&&(v=i.charAt(d));d++){if(this.debug("%s %s %s %j",i,d,r,v),s&&pd[v]){r+="\\"+v,s=!1;continue}switch(v){case"/":return!1;case"\\":m(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",i,d,r,v),c){this.debug(" in class"),v==="!"&&d===f+1&&(v="^"),r+=v;continue}if(v==="*"&&l==="*")continue;p.debug("call clearStateChar %j",l),m(),l=v,t.noext&&m();continue;case"(":if(c){r+="(";continue}if(!l){r+="\\(";continue}o.push({type:l,start:d-1,reStart:r.length,open:dd[l].open,close:dd[l].close}),r+=l==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",l,r),l=!1;continue;case")":if(c||!o.length){r+="\\)";continue}m(),n=!0;var b=o.pop();r+=b.close,b.type==="!"&&a.push(b),b.reEnd=r.length;continue;case"|":if(c||!o.length||s){r+="\\|",s=!1;continue}m(),r+="|";continue;case"[":if(m(),c){r+="\\"+v;continue}c=!0,f=d,u=r.length,r+=v;continue;case"]":if(d===f+1||!c){r+="\\"+v,s=!1;continue}var y=i.substring(f+1,d);try{RegExp("["+y+"]")}catch{var x=this.parse(y,rs);r=r.substr(0,u)+"\\["+x[0]+"\\]",n=n||x[1],c=!1;continue}n=!0,c=!1,r+=v;continue;default:m(),s?s=!1:pd[v]&&!(v==="^"&&c)&&(r+="\\"),r+=v}}for(c&&(y=i.substr(f+1),x=this.parse(y,rs),r=r.substr(0,u)+"\\["+x[0],n=n||x[1]),b=o.pop();b;b=o.pop()){var _=r.slice(b.reStart+b.open.length);this.debug("setting tail",r,b),_=_.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(Ee,le,ie){return ie||(ie="\\"),le+le+ie+"|"}),this.debug(`tail=%j
|
|
16
|
+
%s`,_,_,b,r);var A=b.type==="*"?Pa:b.type==="?"?Ba:"\\"+b.type;n=!0,r=r.slice(0,b.reStart)+A+"\\("+_}m(),s&&(r+="\\\\");var E=!1;switch(r.charAt(0)){case"[":case".":case"(":E=!0}for(var C=a.length-1;C>-1;C--){var S=a[C],T=r.slice(0,S.reStart),I=r.slice(S.reStart,S.reEnd-8),F=r.slice(S.reEnd-8,S.reEnd),L=r.slice(S.reEnd);F+=L;var $=T.split("(").length-1,P=L;for(d=0;d<$;d++)P=P.replace(/\)[+*?]?/,"");L=P;var M="";L===""&&e!==rs&&(M="$");var H=T+I+L+M+F;r=H}if(r!==""&&n&&(r="(?=.)"+r),E&&(r=h+r),e===rs)return[r,n];if(!n)return pw(i);var W=t.nocase?"i":"";try{var D=new RegExp("^"+r+"$",W)}catch{return new RegExp("$.")}return D._glob=i,D._src=r,D}ct.makeRe=function(i,e){return new Le(i,e||{}).makeRe()};Le.prototype.makeRe=dw;function dw(){if(this.regexp||this.regexp===!1)return this.regexp;var i=this.set;if(!i.length)return this.regexp=!1,this.regexp;var e=this.options,t=e.noglobstar?Pa:e.dot?sw:ow,r=e.nocase?"i":"",n=i.map(function(s){return s.map(function(o){return o===wi?t:typeof o=="string"?mw(o):o._src}).join("\\/")}).join("|");n="^(?:"+n+")$",this.negate&&(n="^(?!"+n+").*$");try{this.regexp=new RegExp(n,r)}catch{this.regexp=!1}return this.regexp}ct.match=function(i,e,t){t=t||{};var r=new Le(e,t);return i=i.filter(function(n){return r.match(n)}),r.options.nonull&&!i.length&&i.push(e),i};Le.prototype.match=function(e,t){if(typeof t=="undefined"&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;var r=this.options;Wr.sep!=="/"&&(e=e.split(Wr.sep).join("/")),e=e.split(md),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var s,o;for(o=e.length-1;o>=0&&(s=e[o],!s);o--);for(o=0;o<n.length;o++){var a=n[o],l=e;r.matchBase&&a.length===1&&(l=[s]);var c=this.matchOne(l,a,t);if(c)return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate};Le.prototype.matchOne=function(i,e,t){return e.indexOf(wi)!==-1?this._matchGlobstar(i,e,t,0,0):this._matchOne(i,e,t,0,0)};Le.prototype._matchGlobstar=function(i,e,t,r,n){var s,o=-1;for(s=n;s<e.length;s++)if(e[s]===wi){o=s;break}var a=-1;for(s=e.length-1;s>=0;s--)if(e[s]===wi){a=s;break}var l=e.slice(n,o),c=t?e.slice(o+1):e.slice(o+1,a),u=t?[]:e.slice(a+1);if(l.length){var f=i.slice(r,r+l.length);if(!this._matchOne(f,l,t,0,0))return!1;r+=l.length}var h=0;if(u.length){if(u.length+r>i.length)return!1;var p=i.length-u.length;if(this._matchOne(i,u,t,p,0))h=u.length;else{if(i[i.length-1]!==""||r+u.length===i.length||(p--,!this._matchOne(i,u,t,p,0)))return!1;h=u.length+1}}if(!c.length){var m=!!h;for(s=r;s<i.length-h;s++){var d=String(i[s]);if(m=!0,d==="."||d===".."||!this.options.dot&&d.charAt(0)===".")return!1}return t||m}for(var g=[[[],0]],v=g[0],b=0,y=[0],x=0;x<c.length;x++){var _=c[x];_===wi?(y.push(b),v=[[],0],g.push(v)):(v[0].push(_),b++)}for(var A=g.length-1,E=i.length-h,C=0;C<g.length;C++)g[C][1]=E-(y[A--]+g[C][0].length);return!!this._matchGlobStarBodySections(i,g,r,0,t,0,!!h)};Le.prototype._matchGlobStarBodySections=function(i,e,t,r,n,s,o){var a=e[r];if(!a){for(var l=t;l<i.length;l++){o=!0;var c=i[l];if(c==="."||c===".."||!this.options.dot&&c.charAt(0)===".")return!1}return o}for(var u=a[0],f=a[1];t<=f;){var h=this._matchOne(i.slice(0,t+u.length),u,n,t,0);if(h&&s<this.maxGlobstarRecursion){var p=this._matchGlobStarBodySections(i,e,t+u.length,r+1,n,s+1,o);if(p!==!1)return p}var c=i[t];if(c==="."||c===".."||!this.options.dot&&c.charAt(0)===".")return!1;t++}return n||null};Le.prototype._matchOne=function(i,e,t,r,n){var s,o,a,l;for(s=r,o=n,a=i.length,l=e.length;s<a&&o<l;s++,o++){this.debug("matchOne loop");var c=e[o],u=i[s];if(this.debug(e,c,u),c===!1||c===wi)return!1;var f;if(typeof c=="string"?(f=u===c,this.debug("string match",c,u,f)):(f=u.match(c),this.debug("pattern match",c,u,f)),!f)return!1}if(s===a&&o===l)return!0;if(s===a)return t;if(o===l)return s===a-1&&i[s]==="";throw new Error("wtf?")};function pw(i){return i.replace(/\\(.)/g,"$1")}function mw(i){return i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var Ra=w((D2,bd)=>{"use strict";var _d=require("fs"),La;function gw(){try{return _d.statSync("/.dockerenv"),!0}catch{return!1}}function yw(){try{return _d.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}bd.exports=()=>(La===void 0&&(La=gw()||yw()),La)});var Sd=w((q2,Ma)=>{"use strict";var vw=require("os"),_w=require("fs"),wd=Ra(),xd=()=>{if(process.platform!=="linux")return!1;if(vw.release().toLowerCase().includes("microsoft"))return!wd();try{return _w.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!wd():!1}catch{return!1}};process.env.__IS_WSL_TEST__?Ma.exports=xd:Ma.exports=xd()});var Od=w((U2,Ed)=>{"use strict";Ed.exports=(i,e,t)=>{let r=n=>Object.defineProperty(i,e,{value:n,enumerable:!0,writable:!0});return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get(){let n=t();return r(n),n},set(n){r(n)}}),i}});var Bd=w((j2,Nd)=>{var bw=require("path"),ww=require("child_process"),{promises:Fa,constants:Td}=require("fs"),ss=Sd(),xw=Ra(),Da=Od(),kd=bw.join(__dirname,"xdg-open"),{platform:er,arch:Cd}=process,Sw=(()=>{let i="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",r=!1;try{await Fa.access(t,Td.F_OK),r=!0}catch{}if(!r)return i;let n=await Fa.readFile(t,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(n);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):i}})(),Ad=async(i,e)=>{let t;for(let r of i)try{return await e(r)}catch(n){t=n}throw t},os=async i=>{if(i={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...i},Array.isArray(i.app))return Ad(i.app,a=>os({...i,app:a}));let{name:e,arguments:t=[]}=i.app||{};if(t=[...t],Array.isArray(e))return Ad(e,a=>os({...i,app:{name:a,arguments:t}}));let r,n=[],s={};if(er==="darwin")r="open",i.wait&&n.push("--wait-apps"),i.background&&n.push("--background"),i.newInstance&&n.push("--new"),e&&n.push("-a",e);else if(er==="win32"||ss&&!xw()){let a=await Sw();r=ss?`${a}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,n.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),ss||(s.windowsVerbatimArguments=!0);let l=["Start"];i.wait&&l.push("-Wait"),e?(l.push(`"\`"${e}\`""`,"-ArgumentList"),i.target&&t.unshift(i.target)):i.target&&l.push(`"${i.target}"`),t.length>0&&(t=t.map(c=>`"\`"${c}\`""`),l.push(t.join(","))),i.target=Buffer.from(l.join(" "),"utf16le").toString("base64")}else{if(e)r=e;else{let a=!__dirname||__dirname==="/",l=!1;try{await Fa.access(kd,Td.X_OK),l=!0}catch{}r=process.versions.electron||er==="android"||a||!l?"xdg-open":kd}t.length>0&&n.push(...t),i.wait||(s.stdio="ignore",s.detached=!0)}i.target&&n.push(i.target),er==="darwin"&&t.length>0&&n.push("--args",...t);let o=ww.spawn(r,n,s);return i.wait?new Promise((a,l)=>{o.once("error",l),o.once("close",c=>{if(i.allowNonzeroExitCode&&c>0){l(new Error(`Exited with code ${c}`));return}a(o)})}):(o.unref(),o)},qa=(i,e)=>{if(typeof i!="string")throw new TypeError("Expected a `target`");return os({...e,target:i})},Ew=(i,e)=>{if(typeof i!="string")throw new TypeError("Expected a `name`");let{arguments:t=[]}=e||{};if(t!=null&&!Array.isArray(t))throw new TypeError("Expected `appArguments` as Array type");return os({...e,app:{name:i,arguments:t}})};function Id(i){if(typeof i=="string"||Array.isArray(i))return i;let{[Cd]:e}=i;if(!e)throw new Error(`${Cd} is not supported`);return e}function Ua({[er]:i},{wsl:e}){if(e&&ss)return Id(e);if(!i)throw new Error(`${er} is not supported`);return Id(i)}var as={};Da(as,"chrome",()=>Ua({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));Da(as,"firefox",()=>Ua({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Da(as,"edge",()=>Ua({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));qa.apps=as;qa.openApp=Ew;Nd.exports=qa});var ja=w(($2,Ld)=>{"use strict";var Ow=require("util"),Pd=require("stream"),It=Ld.exports=function(){Pd.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};Ow.inherits(It,Pd);It.prototype.read=function(i,e){this._reads.push({length:Math.abs(i),allowLess:i<0,func:e}),process.nextTick(function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}.bind(this))};It.prototype.write=function(i,e){if(!this.writable)return this.emit("error",new Error("Stream not writable")),!1;let t;return Buffer.isBuffer(i)?t=i:t=Buffer.from(i,e||this._encoding),this._buffers.push(t),this._buffered+=t.length,this._process(),this._reads&&this._reads.length===0&&(this._paused=!0),this.writable&&!this._paused};It.prototype.end=function(i,e){i&&this.write(i,e),this.writable=!1,this._buffers&&(this._buffers.length===0?this._end():(this._buffers.push(null),this._process()))};It.prototype.destroySoon=It.prototype.end;It.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("Unexpected end of input")),this.destroy()};It.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))};It.prototype._processReadAllowingLess=function(i){this._reads.shift();let e=this._buffers[0];e.length>i.length?(this._buffered-=i.length,this._buffers[0]=e.slice(i.length),i.func.call(this,e.slice(0,i.length))):(this._buffered-=e.length,this._buffers.shift(),i.func.call(this,e))};It.prototype._processRead=function(i){this._reads.shift();let e=0,t=0,r=Buffer.alloc(i.length);for(;e<i.length;){let n=this._buffers[t++],s=Math.min(n.length,i.length-e);n.copy(r,e,0,s),e+=s,s!==n.length&&(this._buffers[--t]=n.slice(s))}t>0&&this._buffers.splice(0,t),this._buffered-=i.length,i.func.call(this,r)};It.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let i=this._reads[0];if(i.allowLess)this._processReadAllowingLess(i);else if(this._buffered>=i.length)this._processRead(i);else break}this._buffers&&!this.writable&&this._end()}catch(i){this.emit("error",i)}}});var Ha=w($a=>{"use strict";var ti=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];$a.getImagePasses=function(i,e){let t=[],r=i%8,n=e%8,s=(i-r)/8,o=(e-n)/8;for(let a=0;a<ti.length;a++){let l=ti[a],c=s*l.x.length,u=o*l.y.length;for(let f=0;f<l.x.length&&l.x[f]<r;f++)c++;for(let f=0;f<l.y.length&&l.y[f]<n;f++)u++;c>0&&u>0&&t.push({width:c,height:u,index:a})}return t};$a.getInterlaceIterator=function(i){return function(e,t,r){let n=e%ti[r].x.length,s=(e-n)/ti[r].x.length*8+ti[r].x[n],o=t%ti[r].y.length,a=(t-o)/ti[r].y.length*8+ti[r].y[o];return s*4+a*i*4}}});var Va=w((V2,Rd)=>{"use strict";Rd.exports=function(e,t,r){let n=e+t-r,s=Math.abs(n-e),o=Math.abs(n-t),a=Math.abs(n-r);return s<=o&&s<=a?e:o<=a?t:r}});var Ga=w((G2,Fd)=>{"use strict";var kw=Ha(),Cw=Va();function Md(i,e,t){let r=i*e;return t!==8&&(r=Math.ceil(r/(8/t))),r}var tr=Fd.exports=function(i,e){let t=i.width,r=i.height,n=i.interlace,s=i.bpp,o=i.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],n){let a=kw.getImagePasses(t,r);for(let l=0;l<a.length;l++)this._images.push({byteWidth:Md(a[l].width,s,o),height:a[l].height,lineIndex:0})}else this._images.push({byteWidth:Md(t,s,o),height:r,lineIndex:0});o===8?this._xComparison=s:o===16?this._xComparison=s*2:this._xComparison=1};tr.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};tr.prototype._unFilterType1=function(i,e,t){let r=this._xComparison,n=r-1;for(let s=0;s<t;s++){let o=i[1+s],a=s>n?e[s-r]:0;e[s]=o+a}};tr.prototype._unFilterType2=function(i,e,t){let r=this._lastLine;for(let n=0;n<t;n++){let s=i[1+n],o=r?r[n]:0;e[n]=s+o}};tr.prototype._unFilterType3=function(i,e,t){let r=this._xComparison,n=r-1,s=this._lastLine;for(let o=0;o<t;o++){let a=i[1+o],l=s?s[o]:0,c=o>n?e[o-r]:0,u=Math.floor((c+l)/2);e[o]=a+u}};tr.prototype._unFilterType4=function(i,e,t){let r=this._xComparison,n=r-1,s=this._lastLine;for(let o=0;o<t;o++){let a=i[1+o],l=s?s[o]:0,c=o>n?e[o-r]:0,u=o>n&&s?s[o-r]:0,f=Cw(c,l,u);e[o]=a+f}};tr.prototype._reverseFilterLine=function(i){let e=i[0],t,r=this._images[this._imageIndex],n=r.byteWidth;if(e===0)t=i.slice(1,n+1);else switch(t=Buffer.alloc(n),e){case 1:this._unFilterType1(i,t,n);break;case 2:this._unFilterType2(i,t,n);break;case 3:this._unFilterType3(i,t,n);break;case 4:this._unFilterType4(i,t,n);break;default:throw new Error("Unrecognised filter type - "+e)}this.write(t),r.lineIndex++,r.lineIndex>=r.height?(this._lastLine=null,this._imageIndex++,r=this._images[this._imageIndex]):this._lastLine=t,r?this.read(r.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}});var Ud=w((W2,qd)=>{"use strict";var Aw=require("util"),Dd=ja(),Iw=Ga(),Tw=qd.exports=function(i){Dd.call(this);let e=[],t=this;this._filter=new Iw(i,{read:this.read.bind(this),write:function(r){e.push(r)},complete:function(){t.emit("complete",Buffer.concat(e))}}),this._filter.start()};Aw.inherits(Tw,Dd)});var ir=w((Y2,jd)=>{"use strict";jd.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}});var Ka=w((K2,$d)=>{"use strict";var Wa=[];(function(){for(let i=0;i<256;i++){let e=i;for(let t=0;t<8;t++)e&1?e=3988292384^e>>>1:e=e>>>1;Wa[i]=e}})();var Ya=$d.exports=function(){this._crc=-1};Ya.prototype.write=function(i){for(let e=0;e<i.length;e++)this._crc=Wa[(this._crc^i[e])&255]^this._crc>>>8;return!0};Ya.prototype.crc32=function(){return this._crc^-1};Ya.crc32=function(i){let e=-1;for(let t=0;t<i.length;t++)e=Wa[(e^i[t])&255]^e>>>8;return e^-1}});var za=w((z2,Hd)=>{"use strict";var Fe=ir(),Nw=Ka(),Ue=Hd.exports=function(i,e){this._options=i,i.checkCRC=i.checkCRC!==!1,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[Fe.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[Fe.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[Fe.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[Fe.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[Fe.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[Fe.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};Ue.prototype.start=function(){this.read(Fe.PNG_SIGNATURE.length,this._parseSignature.bind(this))};Ue.prototype._parseSignature=function(i){let e=Fe.PNG_SIGNATURE;for(let t=0;t<e.length;t++)if(i[t]!==e[t]){this.error(new Error("Invalid file signature"));return}this.read(8,this._parseChunkBegin.bind(this))};Ue.prototype._parseChunkBegin=function(i){let e=i.readUInt32BE(0),t=i.readUInt32BE(4),r="";for(let s=4;s<8;s++)r+=String.fromCharCode(i[s]);let n=!!(i[4]&32);if(!this._hasIHDR&&t!==Fe.TYPE_IHDR){this.error(new Error("Expected IHDR on beggining"));return}if(this._crc=new Nw,this._crc.write(Buffer.from(r)),this._chunks[t])return this._chunks[t](e);if(!n){this.error(new Error("Unsupported critical chunk type "+r));return}this.read(e+4,this._skipChunk.bind(this))};Ue.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};Ue.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};Ue.prototype._parseChunkEnd=function(i){let e=i.readInt32BE(0),t=this._crc.crc32();if(this._options.checkCRC&&t!==e){this.error(new Error("Crc error - "+e+" - "+t));return}this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))};Ue.prototype._handleIHDR=function(i){this.read(i,this._parseIHDR.bind(this))};Ue.prototype._parseIHDR=function(i){this._crc.write(i);let e=i.readUInt32BE(0),t=i.readUInt32BE(4),r=i[8],n=i[9],s=i[10],o=i[11],a=i[12];if(r!==8&&r!==4&&r!==2&&r!==1&&r!==16){this.error(new Error("Unsupported bit depth "+r));return}if(!(n in Fe.COLORTYPE_TO_BPP_MAP)){this.error(new Error("Unsupported color type"));return}if(s!==0){this.error(new Error("Unsupported compression method"));return}if(o!==0){this.error(new Error("Unsupported filter method"));return}if(a!==0&&a!==1){this.error(new Error("Unsupported interlace method"));return}this._colorType=n;let l=Fe.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:t,depth:r,interlace:!!a,palette:!!(n&Fe.COLORTYPE_PALETTE),color:!!(n&Fe.COLORTYPE_COLOR),alpha:!!(n&Fe.COLORTYPE_ALPHA),bpp:l,colorType:n}),this._handleChunkEnd()};Ue.prototype._handlePLTE=function(i){this.read(i,this._parsePLTE.bind(this))};Ue.prototype._parsePLTE=function(i){this._crc.write(i);let e=Math.floor(i.length/3);for(let t=0;t<e;t++)this._palette.push([i[t*3],i[t*3+1],i[t*3+2],255]);this.palette(this._palette),this._handleChunkEnd()};Ue.prototype._handleTRNS=function(i){this.simpleTransparency(),this.read(i,this._parseTRNS.bind(this))};Ue.prototype._parseTRNS=function(i){if(this._crc.write(i),this._colorType===Fe.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(new Error("Transparency chunk must be after palette"));return}if(i.length>this._palette.length){this.error(new Error("More transparent colors than palette size"));return}for(let e=0;e<i.length;e++)this._palette[e][3]=i[e];this.palette(this._palette)}this._colorType===Fe.COLORTYPE_GRAYSCALE&&this.transColor([i.readUInt16BE(0)]),this._colorType===Fe.COLORTYPE_COLOR&&this.transColor([i.readUInt16BE(0),i.readUInt16BE(2),i.readUInt16BE(4)]),this._handleChunkEnd()};Ue.prototype._handleGAMA=function(i){this.read(i,this._parseGAMA.bind(this))};Ue.prototype._parseGAMA=function(i){this._crc.write(i),this.gamma(i.readUInt32BE(0)/Fe.GAMMA_DIVISION),this._handleChunkEnd()};Ue.prototype._handleIDAT=function(i){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-i,this._parseIDAT.bind(this,i))};Ue.prototype._parseIDAT=function(i,e){if(this._crc.write(e),this._colorType===Fe.COLORTYPE_PALETTE_COLOR&&this._palette.length===0)throw new Error("Expected palette not found");this.inflateData(e);let t=i-e.length;t>0?this._handleIDAT(t):this._handleChunkEnd()};Ue.prototype._handleIEND=function(i){this.read(i,this._parseIEND.bind(this))};Ue.prototype._parseIEND=function(i){this._crc.write(i),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}});var Ja=w(Gd=>{"use strict";var Vd=Ha(),Bw=[function(){},function(i,e,t,r){if(r===e.length)throw new Error("Ran out of data");let n=e[r];i[t]=n,i[t+1]=n,i[t+2]=n,i[t+3]=255},function(i,e,t,r){if(r+1>=e.length)throw new Error("Ran out of data");let n=e[r];i[t]=n,i[t+1]=n,i[t+2]=n,i[t+3]=e[r+1]},function(i,e,t,r){if(r+2>=e.length)throw new Error("Ran out of data");i[t]=e[r],i[t+1]=e[r+1],i[t+2]=e[r+2],i[t+3]=255},function(i,e,t,r){if(r+3>=e.length)throw new Error("Ran out of data");i[t]=e[r],i[t+1]=e[r+1],i[t+2]=e[r+2],i[t+3]=e[r+3]}],Pw=[function(){},function(i,e,t,r){let n=e[0];i[t]=n,i[t+1]=n,i[t+2]=n,i[t+3]=r},function(i,e,t){let r=e[0];i[t]=r,i[t+1]=r,i[t+2]=r,i[t+3]=e[1]},function(i,e,t,r){i[t]=e[0],i[t+1]=e[1],i[t+2]=e[2],i[t+3]=r},function(i,e,t){i[t]=e[0],i[t+1]=e[1],i[t+2]=e[2],i[t+3]=e[3]}];function Lw(i,e){let t=[],r=0;function n(){if(r===i.length)throw new Error("Ran out of data");let s=i[r];r++;let o,a,l,c,u,f,h,p;switch(e){default:throw new Error("unrecognised depth");case 16:h=i[r],r++,t.push((s<<8)+h);break;case 4:h=s&15,p=s>>4,t.push(p,h);break;case 2:u=s&3,f=s>>2&3,h=s>>4&3,p=s>>6&3,t.push(p,h,f,u);break;case 1:o=s&1,a=s>>1&1,l=s>>2&1,c=s>>3&1,u=s>>4&1,f=s>>5&1,h=s>>6&1,p=s>>7&1,t.push(p,h,f,u,c,l,a,o);break}}return{get:function(s){for(;t.length<s;)n();let o=t.slice(0,s);return t=t.slice(s),o},resetAfterLine:function(){t.length=0},end:function(){if(r!==i.length)throw new Error("extra data found")}}}function Rw(i,e,t,r,n,s){let o=i.width,a=i.height,l=i.index;for(let c=0;c<a;c++)for(let u=0;u<o;u++){let f=t(u,c,l);Bw[r](e,n,f,s),s+=r}return s}function Mw(i,e,t,r,n,s){let o=i.width,a=i.height,l=i.index;for(let c=0;c<a;c++){for(let u=0;u<o;u++){let f=n.get(r),h=t(u,c,l);Pw[r](e,f,h,s)}n.resetAfterLine()}}Gd.dataToBitMap=function(i,e){let t=e.width,r=e.height,n=e.depth,s=e.bpp,o=e.interlace,a;n!==8&&(a=Lw(i,n));let l;n<=8?l=Buffer.alloc(t*r*4):l=new Uint16Array(t*r*4);let c=Math.pow(2,n)-1,u=0,f,h;if(o)f=Vd.getImagePasses(t,r),h=Vd.getInterlaceIterator(t,r);else{let p=0;h=function(){let m=p;return p+=4,m},f=[{width:t,height:r}]}for(let p=0;p<f.length;p++)n===8?u=Rw(f[p],l,h,s,i,u):Mw(f[p],l,h,s,a,c);if(n===8){if(u!==i.length)throw new Error("extra data found")}else a.end();return l}});var Za=w((Z2,Wd)=>{"use strict";function Fw(i,e,t,r,n){let s=0;for(let o=0;o<r;o++)for(let a=0;a<t;a++){let l=n[i[s]];if(!l)throw new Error("index "+i[s]+" not in palette");for(let c=0;c<4;c++)e[s+c]=l[c];s+=4}}function Dw(i,e,t,r,n){let s=0;for(let o=0;o<r;o++)for(let a=0;a<t;a++){let l=!1;if(n.length===1?n[0]===i[s]&&(l=!0):n[0]===i[s]&&n[1]===i[s+1]&&n[2]===i[s+2]&&(l=!0),l)for(let c=0;c<4;c++)e[s+c]=0;s+=4}}function qw(i,e,t,r,n){let s=255,o=Math.pow(2,n)-1,a=0;for(let l=0;l<r;l++)for(let c=0;c<t;c++){for(let u=0;u<4;u++)e[a+u]=Math.floor(i[a+u]*s/o+.5);a+=4}}Wd.exports=function(i,e,t=!1){let r=e.depth,n=e.width,s=e.height,o=e.colorType,a=e.transColor,l=e.palette,c=i;return o===3?Fw(i,c,n,s,l):(a&&Dw(i,c,n,s,a),r!==8&&!t&&(r===16&&(c=Buffer.alloc(n*s*4)),qw(i,c,n,s,r))),c}});var zd=w((Q2,Kd)=>{"use strict";var Uw=require("util"),Qa=require("zlib"),Yd=ja(),jw=Ud(),$w=za(),Hw=Ja(),Vw=Za(),Rt=Kd.exports=function(i){Yd.call(this),this._parser=new $w(i,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=i,this.writable=!0,this._parser.start()};Uw.inherits(Rt,Yd);Rt.prototype._handleError=function(i){this.emit("error",i),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0};Rt.prototype._inflateData=function(i){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=Qa.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let t=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,r=Math.max(t,Qa.Z_MIN_CHUNK);this._inflate=Qa.createInflate({chunkSize:r});let n=t,s=this.emit.bind(this,"error");this._inflate.on("error",function(a){n&&s(a)}),this._filter.on("complete",this._complete.bind(this));let o=this._filter.write.bind(this._filter);this._inflate.on("data",function(a){n&&(a.length>n&&(a=a.slice(0,n)),n-=a.length,o(a))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(i)};Rt.prototype._handleMetaData=function(i){this._metaData=i,this._bitmapInfo=Object.create(i),this._filter=new jw(this._bitmapInfo)};Rt.prototype._handleTransColor=function(i){this._bitmapInfo.transColor=i};Rt.prototype._handlePalette=function(i){this._bitmapInfo.palette=i};Rt.prototype._simpleTransparency=function(){this._metaData.alpha=!0};Rt.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};Rt.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))};Rt.prototype._complete=function(i){if(this.errord)return;let e;try{let t=Hw.dataToBitMap(i,this._bitmapInfo);e=Vw(t,this._bitmapInfo,this._options.skipRescale),t=null}catch(t){this._handleError(t);return}this.emit("parsed",e)}});var Zd=w((X2,Jd)=>{"use strict";var yt=ir();Jd.exports=function(i,e,t,r){let n=[yt.COLORTYPE_COLOR_ALPHA,yt.COLORTYPE_ALPHA].indexOf(r.colorType)!==-1;if(r.colorType===r.inputColorType){let m=(function(){let d=new ArrayBuffer(2);return new DataView(d).setInt16(0,256,!0),new Int16Array(d)[0]!==256})();if(r.bitDepth===8||r.bitDepth===16&&m)return i}let s=r.bitDepth!==16?i:new Uint16Array(i.buffer),o=255,a=yt.COLORTYPE_TO_BPP_MAP[r.inputColorType];a===4&&!r.inputHasAlpha&&(a=3);let l=yt.COLORTYPE_TO_BPP_MAP[r.colorType];r.bitDepth===16&&(o=65535,l*=2);let c=Buffer.alloc(e*t*l),u=0,f=0,h=r.bgColor||{};h.red===void 0&&(h.red=o),h.green===void 0&&(h.green=o),h.blue===void 0&&(h.blue=o);function p(){let m,d,g,v=o;switch(r.inputColorType){case yt.COLORTYPE_COLOR_ALPHA:v=s[u+3],m=s[u],d=s[u+1],g=s[u+2];break;case yt.COLORTYPE_COLOR:m=s[u],d=s[u+1],g=s[u+2];break;case yt.COLORTYPE_ALPHA:v=s[u+1],m=s[u],d=m,g=m;break;case yt.COLORTYPE_GRAYSCALE:m=s[u],d=m,g=m;break;default:throw new Error("input color type:"+r.inputColorType+" is not supported at present")}return r.inputHasAlpha&&(n||(v/=o,m=Math.min(Math.max(Math.round((1-v)*h.red+v*m),0),o),d=Math.min(Math.max(Math.round((1-v)*h.green+v*d),0),o),g=Math.min(Math.max(Math.round((1-v)*h.blue+v*g),0),o))),{red:m,green:d,blue:g,alpha:v}}for(let m=0;m<t;m++)for(let d=0;d<e;d++){let g=p(s,u);switch(r.colorType){case yt.COLORTYPE_COLOR_ALPHA:case yt.COLORTYPE_COLOR:r.bitDepth===8?(c[f]=g.red,c[f+1]=g.green,c[f+2]=g.blue,n&&(c[f+3]=g.alpha)):(c.writeUInt16BE(g.red,f),c.writeUInt16BE(g.green,f+2),c.writeUInt16BE(g.blue,f+4),n&&c.writeUInt16BE(g.alpha,f+6));break;case yt.COLORTYPE_ALPHA:case yt.COLORTYPE_GRAYSCALE:{let v=(g.red+g.green+g.blue)/3;r.bitDepth===8?(c[f]=v,n&&(c[f+1]=g.alpha)):(c.writeUInt16BE(v,f),n&&c.writeUInt16BE(g.alpha,f+2));break}default:throw new Error("unrecognised color Type "+r.colorType)}u+=a,f+=l}return c}});var ep=w((eN,Xd)=>{"use strict";var Qd=Va();function Gw(i,e,t,r,n){for(let s=0;s<t;s++)r[n+s]=i[e+s]}function Ww(i,e,t){let r=0,n=e+t;for(let s=e;s<n;s++)r+=Math.abs(i[s]);return r}function Yw(i,e,t,r,n,s){for(let o=0;o<t;o++){let a=o>=s?i[e+o-s]:0,l=i[e+o]-a;r[n+o]=l}}function Kw(i,e,t,r){let n=0;for(let s=0;s<t;s++){let o=s>=r?i[e+s-r]:0,a=i[e+s]-o;n+=Math.abs(a)}return n}function zw(i,e,t,r,n){for(let s=0;s<t;s++){let o=e>0?i[e+s-t]:0,a=i[e+s]-o;r[n+s]=a}}function Jw(i,e,t){let r=0,n=e+t;for(let s=e;s<n;s++){let o=e>0?i[s-t]:0,a=i[s]-o;r+=Math.abs(a)}return r}function Zw(i,e,t,r,n,s){for(let o=0;o<t;o++){let a=o>=s?i[e+o-s]:0,l=e>0?i[e+o-t]:0,c=i[e+o]-(a+l>>1);r[n+o]=c}}function Qw(i,e,t,r){let n=0;for(let s=0;s<t;s++){let o=s>=r?i[e+s-r]:0,a=e>0?i[e+s-t]:0,l=i[e+s]-(o+a>>1);n+=Math.abs(l)}return n}function Xw(i,e,t,r,n,s){for(let o=0;o<t;o++){let a=o>=s?i[e+o-s]:0,l=e>0?i[e+o-t]:0,c=e>0&&o>=s?i[e+o-(t+s)]:0,u=i[e+o]-Qd(a,l,c);r[n+o]=u}}function ex(i,e,t,r){let n=0;for(let s=0;s<t;s++){let o=s>=r?i[e+s-r]:0,a=e>0?i[e+s-t]:0,l=e>0&&s>=r?i[e+s-(t+r)]:0,c=i[e+s]-Qd(o,a,l);n+=Math.abs(c)}return n}var tx={0:Gw,1:Yw,2:zw,3:Zw,4:Xw},ix={0:Ww,1:Kw,2:Jw,3:Qw,4:ex};Xd.exports=function(i,e,t,r,n){let s;if(!("filterType"in r)||r.filterType===-1)s=[0,1,2,3,4];else if(typeof r.filterType=="number")s=[r.filterType];else throw new Error("unrecognised filter types");r.bitDepth===16&&(n*=2);let o=e*n,a=0,l=0,c=Buffer.alloc((o+1)*t),u=s[0];for(let f=0;f<t;f++){if(s.length>1){let h=1/0;for(let p=0;p<s.length;p++){let m=ix[s[p]](i,l,o,n);m<h&&(u=s[p],h=m)}}c[a]=u,a++,tx[u](i,l,o,c,a,n),a+=o,l+=o}return c}});var Xa=w((tN,tp)=>{"use strict";var Je=ir(),rx=Ka(),nx=Zd(),sx=ep(),ox=require("zlib"),ii=tp.exports=function(i){if(this._options=i,i.deflateChunkSize=i.deflateChunkSize||32*1024,i.deflateLevel=i.deflateLevel!=null?i.deflateLevel:9,i.deflateStrategy=i.deflateStrategy!=null?i.deflateStrategy:3,i.inputHasAlpha=i.inputHasAlpha!=null?i.inputHasAlpha:!0,i.deflateFactory=i.deflateFactory||ox.createDeflate,i.bitDepth=i.bitDepth||8,i.colorType=typeof i.colorType=="number"?i.colorType:Je.COLORTYPE_COLOR_ALPHA,i.inputColorType=typeof i.inputColorType=="number"?i.inputColorType:Je.COLORTYPE_COLOR_ALPHA,[Je.COLORTYPE_GRAYSCALE,Je.COLORTYPE_COLOR,Je.COLORTYPE_COLOR_ALPHA,Je.COLORTYPE_ALPHA].indexOf(i.colorType)===-1)throw new Error("option color type:"+i.colorType+" is not supported at present");if([Je.COLORTYPE_GRAYSCALE,Je.COLORTYPE_COLOR,Je.COLORTYPE_COLOR_ALPHA,Je.COLORTYPE_ALPHA].indexOf(i.inputColorType)===-1)throw new Error("option input color type:"+i.inputColorType+" is not supported at present");if(i.bitDepth!==8&&i.bitDepth!==16)throw new Error("option bit depth:"+i.bitDepth+" is not supported at present")};ii.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};ii.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};ii.prototype.filterData=function(i,e,t){let r=nx(i,e,t,this._options),n=Je.COLORTYPE_TO_BPP_MAP[this._options.colorType];return sx(r,e,t,this._options,n)};ii.prototype._packChunk=function(i,e){let t=e?e.length:0,r=Buffer.alloc(t+12);return r.writeUInt32BE(t,0),r.writeUInt32BE(i,4),e&&e.copy(r,8),r.writeInt32BE(rx.crc32(r.slice(4,r.length-4)),r.length-4),r};ii.prototype.packGAMA=function(i){let e=Buffer.alloc(4);return e.writeUInt32BE(Math.floor(i*Je.GAMMA_DIVISION),0),this._packChunk(Je.TYPE_gAMA,e)};ii.prototype.packIHDR=function(i,e){let t=Buffer.alloc(13);return t.writeUInt32BE(i,0),t.writeUInt32BE(e,4),t[8]=this._options.bitDepth,t[9]=this._options.colorType,t[10]=0,t[11]=0,t[12]=0,this._packChunk(Je.TYPE_IHDR,t)};ii.prototype.packIDAT=function(i){return this._packChunk(Je.TYPE_IDAT,i)};ii.prototype.packIEND=function(){return this._packChunk(Je.TYPE_IEND,null)}});var sp=w((iN,np)=>{"use strict";var ax=require("util"),ip=require("stream"),lx=ir(),cx=Xa(),rp=np.exports=function(i){ip.call(this);let e=i||{};this._packer=new cx(e),this._deflate=this._packer.createDeflate(),this.readable=!0};ax.inherits(rp,ip);rp.prototype.pack=function(i,e,t,r){this.emit("data",Buffer.from(lx.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,t)),r&&this.emit("data",this._packer.packGAMA(r));let n=this._packer.filterData(i,e,t);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(s){this.emit("data",this._packer.packIDAT(s))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(n)}});var fp=w((Yr,up)=>{"use strict";var op=require("assert").ok,rr=require("zlib"),ux=require("util"),ap=require("buffer").kMaxLength;function xi(i){if(!(this instanceof xi))return new xi(i);i&&i.chunkSize<rr.Z_MIN_CHUNK&&(i.chunkSize=rr.Z_MIN_CHUNK),rr.Inflate.call(this,i),this._offset=this._offset===void 0?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,i&&i.maxLength!=null&&(this._maxLength=i.maxLength)}function fx(i){return new xi(i)}function lp(i,e){e&&process.nextTick(e),i._handle&&(i._handle.close(),i._handle=null)}xi.prototype._processChunk=function(i,e,t){if(typeof t=="function")return rr.Inflate._processChunk.call(this,i,e,t);let r=this,n=i&&i.length,s=this._chunkSize-this._offset,o=this._maxLength,a=0,l=[],c=0,u;this.on("error",function(m){u=m});function f(m,d){if(r._hadError)return;let g=s-d;if(op(g>=0,"have should not go down"),g>0){let v=r._buffer.slice(r._offset,r._offset+g);if(r._offset+=g,v.length>o&&(v=v.slice(0,o)),l.push(v),c+=v.length,o-=v.length,o===0)return!1}return(d===0||r._offset>=r._chunkSize)&&(s=r._chunkSize,r._offset=0,r._buffer=Buffer.allocUnsafe(r._chunkSize)),d===0?(a+=n-m,n=m,!0):!1}op(this._handle,"zlib binding closed");let h;do h=this._handle.writeSync(e,i,a,n,this._buffer,this._offset,s),h=h||this._writeState;while(!this._hadError&&f(h[0],h[1]));if(this._hadError)throw u;if(c>=ap)throw lp(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+ap.toString(16)+" bytes");let p=Buffer.concat(l,c);return lp(this),p};ux.inherits(xi,rr.Inflate);function hx(i,e){if(typeof e=="string"&&(e=Buffer.from(e)),!(e instanceof Buffer))throw new TypeError("Not a string or buffer");let t=i._finishFlushFlag;return t==null&&(t=rr.Z_FINISH),i._processChunk(e,t)}function cp(i,e){return hx(new xi(e),i)}up.exports=Yr=cp;Yr.Inflate=xi;Yr.createInflate=fx;Yr.inflateSync=cp});var el=w((rN,dp)=>{"use strict";var hp=dp.exports=function(i){this._buffer=i,this._reads=[]};hp.prototype.read=function(i,e){this._reads.push({length:Math.abs(i),allowLess:i<0,func:e})};hp.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let i=this._reads[0];if(this._buffer.length&&(this._buffer.length>=i.length||i.allowLess)){this._reads.shift();let e=this._buffer;this._buffer=e.slice(i.length),i.func.call(this,e.slice(0,i.length))}else break}if(this._reads.length>0)throw new Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw new Error("unrecognised content at end of stream")}});var mp=w(pp=>{"use strict";var dx=el(),px=Ga();pp.process=function(i,e){let t=[],r=new dx(i);return new px(e,{read:r.read.bind(r),write:function(s){t.push(s)},complete:function(){}}).start(),r.process(),Buffer.concat(t)}});var _p=w((sN,vp)=>{"use strict";var gp=!0,yp=require("zlib"),mx=fp();yp.deflateSync||(gp=!1);var gx=el(),yx=mp(),vx=za(),_x=Ja(),bx=Za();vp.exports=function(i,e){if(!gp)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let t;function r(x){t=x}let n;function s(x){n=x}function o(x){n.transColor=x}function a(x){n.palette=x}function l(){n.alpha=!0}let c;function u(x){c=x}let f=[];function h(x){f.push(x)}let p=new gx(i);if(new vx(e,{read:p.read.bind(p),error:r,metadata:s,gamma:u,palette:a,transColor:o,inflateData:h,simpleTransparency:l}).start(),p.process(),t)throw t;let d=Buffer.concat(f);f.length=0;let g;if(n.interlace)g=yp.inflateSync(d);else{let _=((n.width*n.bpp*n.depth+7>>3)+1)*n.height;g=mx(d,{chunkSize:_,maxLength:_})}if(d=null,!g||!g.length)throw new Error("bad png - invalid inflate data response");let v=yx.process(g,n);d=null;let b=_x.dataToBitMap(v,n);v=null;let y=bx(b,n,e.skipRescale);return n.data=y,n.gamma=c||0,n}});var Sp=w((oN,xp)=>{"use strict";var bp=!0,wp=require("zlib");wp.deflateSync||(bp=!1);var wx=ir(),xx=Xa();xp.exports=function(i,e){if(!bp)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let t=e||{},r=new xx(t),n=[];n.push(Buffer.from(wx.PNG_SIGNATURE)),n.push(r.packIHDR(i.width,i.height)),i.gamma&&n.push(r.packGAMA(i.gamma));let s=r.filterData(i.data,i.width,i.height),o=wp.deflateSync(s,r.getDeflateOptions());if(s=null,!o||!o.length)throw new Error("bad png - invalid compressed data response");return n.push(r.packIDAT(o)),n.push(r.packIEND()),Buffer.concat(n)}});var Ep=w(tl=>{"use strict";var Sx=_p(),Ex=Sp();tl.read=function(i,e){return Sx(i,e||{})};tl.write=function(i,e){return Ex(i,e)}});var Cp=w(kp=>{"use strict";var Ox=require("util"),Op=require("stream"),kx=zd(),Cx=sp(),Ax=Ep(),et=kp.PNG=function(i){Op.call(this),i=i||{},this.width=i.width|0,this.height=i.height|0,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,i.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new kx(i),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(e){this.data=e,this.emit("parsed",e)}.bind(this)),this._packer=new Cx(i),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};Ox.inherits(et,Op);et.sync=Ax;et.prototype.pack=function(){return!this.data||!this.data.length?(this.emit("error","No data provided"),this):(process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this)};et.prototype.parse=function(i,e){if(e){let t,r;t=function(n){this.removeListener("error",r),this.data=n,e(null,this)}.bind(this),r=function(n){this.removeListener("parsed",t),e(n,null)}.bind(this),this.once("parsed",t),this.once("error",r)}return this.end(i),this};et.prototype.write=function(i){return this._parser.write(i),!0};et.prototype.end=function(i){this._parser.end(i)};et.prototype._metadata=function(i){this.width=i.width,this.height=i.height,this.emit("metadata",i)};et.prototype._gamma=function(i){this.gamma=i};et.prototype._handleClose=function(){!this._parser.writable&&!this._packer.readable&&this.emit("close")};et.bitblt=function(i,e,t,r,n,s,o,a){if(t|=0,r|=0,n|=0,s|=0,o|=0,a|=0,t>i.width||r>i.height||t+n>i.width||r+s>i.height)throw new Error("bitblt reading outside image");if(o>e.width||a>e.height||o+n>e.width||a+s>e.height)throw new Error("bitblt writing outside image");for(let l=0;l<s;l++)i.data.copy(e.data,(a+l)*e.width+o<<2,(r+l)*i.width+t<<2,(r+l)*i.width+t+n<<2)};et.prototype.bitblt=function(i,e,t,r,n,s,o){return et.bitblt(this,i,e,t,r,n,s,o),this};et.adjustGamma=function(i){if(i.gamma){for(let e=0;e<i.height;e++)for(let t=0;t<i.width;t++){let r=i.width*e+t<<2;for(let n=0;n<3;n++){let s=i.data[r+n]/255;s=Math.pow(s,1/2.2/i.gamma),i.data[r+n]=Math.round(s*255)}}i.gamma=0}};et.prototype.adjustGamma=function(){et.adjustGamma(this)}});var Kr=w(rl=>{var ls=class extends Error{constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},il=class extends ls{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};rl.CommanderError=ls;rl.InvalidArgumentError=il});var cs=w(sl=>{var{InvalidArgumentError:Ix}=Kr(),nl=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new Ix(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,r):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Tx(i){let e=i.name()+(i.variadic===!0?"...":"");return i.required?"<"+e+">":"["+e+"]"}sl.Argument=nl;sl.humanReadableArgName=Tx});var ll=w(al=>{var{humanReadableArgName:Nx}=cs(),ol=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){var t,r;this.helpWidth=(r=(t=this.helpWidth)!=null?t:e.helpWidth)!=null?r:80}visibleCommands(e){let t=e.commands.filter(n=>!n._hidden),r=e._getHelpCommand();return r&&!r._hidden&&t.push(r),this.sortSubcommands&&t.sort((n,s)=>n.name().localeCompare(s.name())),t}compareOptions(e,t){let r=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return r(e).localeCompare(r(t))}visibleOptions(e){let t=e.options.filter(n=>!n.hidden),r=e._getHelpOption();if(r&&!r.hidden){let n=r.short&&e._findOption(r.short),s=r.long&&e._findOption(r.long);!n&&!s?t.push(r):r.long&&!s?t.push(e.createOption(r.long,r.description)):r.short&&!n&&t.push(e.createOption(r.short,r.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let r=e.parent;r;r=r.parent){let n=r.options.filter(s=>!s.hidden);t.push(...n)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(r=>Nx(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((r,n)=>Math.max(r,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let r="";for(let n=e.parent;n;n=n.parent)r=n.name()+" "+r;return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatHelp(e,t){var f;let r=t.padWidth(e,t),n=(f=t.helpWidth)!=null?f:80;function s(h,p){return t.formatItem(h,r,p,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],a=t.commandDescription(e);a.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(a),n),""]));let l=t.visibleArguments(e).map(h=>s(t.styleArgumentTerm(t.argumentTerm(h)),t.styleArgumentDescription(t.argumentDescription(h))));l.length>0&&(o=o.concat([t.styleTitle("Arguments:"),...l,""]));let c=t.visibleOptions(e).map(h=>s(t.styleOptionTerm(t.optionTerm(h)),t.styleOptionDescription(t.optionDescription(h))));if(c.length>0&&(o=o.concat([t.styleTitle("Options:"),...c,""])),t.showGlobalOptions){let h=t.visibleGlobalOptions(e).map(p=>s(t.styleOptionTerm(t.optionTerm(p)),t.styleOptionDescription(t.optionDescription(p))));h.length>0&&(o=o.concat([t.styleTitle("Global Options:"),...h,""]))}let u=t.visibleCommands(e).map(h=>s(t.styleSubcommandTerm(t.subcommandTerm(h)),t.styleSubcommandDescription(t.subcommandDescription(h))));return u.length>0&&(o=o.concat([t.styleTitle("Commands:"),...u,""])),o.join(`
|
|
17
|
+
`)}displayWidth(e){return Ap(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,r,n){var h;let o=" ".repeat(2);if(!r)return o+e;let a=e.padEnd(t+e.length-n.displayWidth(e)),l=2,u=((h=this.helpWidth)!=null?h:80)-t-l-2,f;return u<this.minWidthToWrap||n.preformatted(r)?f=r:f=n.boxWrap(r,u).replace(/\n/g,`
|
|
18
18
|
`+" ".repeat(t+l)),o+a+" ".repeat(l)+f.replace(/\n/g,`
|
|
19
19
|
${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,s=[];return r.forEach(o=>{let a=o.match(n);if(a===null){s.push("");return}let l=[a.shift()],c=this.displayWidth(l[0]);a.forEach(u=>{let f=this.displayWidth(u);if(c+f<=t){l.push(u),c+=f;return}s.push(l.join(""));let h=u.trimStart();l=[h],c=this.displayWidth(h)}),s.push(l.join(""))}),s.join(`
|
|
20
|
-
`)}};function
|
|
20
|
+
`)}};function Ap(i){let e=/\x1b\[\d*(;\d*)*m/g;return i.replace(e,"")}al.Help=ol;al.stripColor=Ap});var hl=w(fl=>{var{InvalidArgumentError:Bx}=Kr(),cl=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let r=Px(e);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new Bx(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,r):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Ip(this.name().replace(/^no-/,"")):Ip(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},ul=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,t){let r=t.attributeName();if(!this.dualOptions.has(r))return!0;let n=this.negativeOptions.get(r).presetArg,s=n!==void 0?n:!1;return t.negate===(s===e)}};function Ip(i){return i.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Px(i){let e,t,r=/^-[^-]$/,n=/^--[^-]/,s=i.split(/[ |,]+/).concat("guard");if(r.test(s[0])&&(e=s.shift()),n.test(s[0])&&(t=s.shift()),!e&&r.test(s[0])&&(e=s.shift()),!e&&n.test(s[0])&&(e=t,t=s.shift()),s[0].startsWith("-")){let o=s[0],a=`option creation failed due to '${o}' in option flags '${i}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
|
|
21
21
|
- a short flag is a single dash and a single character
|
|
22
22
|
- either use a single dash and a single character (for a short flag)
|
|
23
23
|
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(o)?new Error(`${a}
|
|
24
24
|
- too many short flags`):n.test(o)?new Error(`${a}
|
|
25
25
|
- too many long flags`):new Error(`${a}
|
|
26
|
-
- unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${i}'.`);return{shortFlag:e,longFlag:t}}
|
|
26
|
+
- unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${i}'.`);return{shortFlag:e,longFlag:t}}fl.Option=cl;fl.DualOptions=ul});var Np=w(Tp=>{function Lx(i,e){if(Math.abs(i.length-e.length)>3)return Math.max(i.length,e.length);let t=[];for(let r=0;r<=i.length;r++)t[r]=[r];for(let r=0;r<=e.length;r++)t[0][r]=r;for(let r=1;r<=e.length;r++)for(let n=1;n<=i.length;n++){let s=1;i[n-1]===e[r-1]?s=0:s=1,t[n][r]=Math.min(t[n-1][r]+1,t[n][r-1]+1,t[n-1][r-1]+s),n>1&&r>1&&i[n-1]===e[r-2]&&i[n-2]===e[r-1]&&(t[n][r]=Math.min(t[n][r],t[n-2][r-2]+1))}return t[i.length][e.length]}function Rx(i,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=i.startsWith("--");t&&(i=i.slice(2),e=e.map(o=>o.slice(2)));let r=[],n=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=Lx(i,o),l=Math.max(i.length,o.length);(l-a)/l>s&&(a<n?(n=a,r=[o]):a===n&&r.push(o))}),r.sort((o,a)=>o.localeCompare(a)),t&&(r=r.map(o=>`--${o}`)),r.length>1?`
|
|
27
27
|
(Did you mean one of ${r.join(", ")}?)`:r.length===1?`
|
|
28
|
-
(Did you mean ${r[0]}?)`:""}
|
|
29
|
-
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new
|
|
30
|
-
Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,r){this._exitCallback&&this._exitCallback(new
|
|
31
|
-
- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=n=>[n.name()].concat(n.aliases()),r=t(e).find(n=>this._findCommand(n));if(r){let n=t(this._findCommand(r)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),r=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let n=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let l=this.getOptionValue(r);s!==null&&e.parseArg?s=this._callParseArg(e,s,l,o):s!==null&&e.variadic&&(s=e._concatValue(s,l)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(r,s,a)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;n(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;n(s,o,"env")}),this}_optionEx(e,t,r,n,s){if(typeof t=="object"&&t instanceof
|
|
32
|
-
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,r){if(
|
|
28
|
+
(Did you mean ${r[0]}?)`:""}Tp.suggestSimilar=Rx});var Rp=w(yl=>{var Mx=require("node:events").EventEmitter,dl=require("node:child_process"),Gt=require("node:path"),us=require("node:fs"),me=require("node:process"),{Argument:Fx,humanReadableArgName:Dx}=cs(),{CommanderError:pl}=Kr(),{Help:qx,stripColor:Ux}=ll(),{Option:Bp,DualOptions:jx}=hl(),{suggestSimilar:Pp}=Np(),ml=class i extends Mx{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>me.stdout.write(t),writeErr:t=>me.stderr.write(t),outputError:(t,r)=>r(t),getOutHelpWidth:()=>me.stdout.isTTY?me.stdout.columns:void 0,getErrHelpWidth:()=>me.stderr.isTTY?me.stderr.columns:void 0,getOutHasColors:()=>{var t,r,n;return(n=gl())!=null?n:me.stdout.isTTY&&((r=(t=me.stdout).hasColors)==null?void 0:r.call(t))},getErrHasColors:()=>{var t,r,n;return(n=gl())!=null?n:me.stderr.isTTY&&((r=(t=me.stderr).hasColors)==null?void 0:r.call(t))},stripColor:t=>Ux(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,r){let n=t,s=r;typeof n=="object"&&n!==null&&(s=n,n=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return n&&(l.description(n),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.hidden),l._executableFile=s.executableFile||null,a&&l.arguments(a),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),n?this:l}createCommand(e){return new i(e)}createHelp(){return Object.assign(new qx,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
29
|
+
- specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new Fx(e,t)}argument(e,t,r,n){let s=this.createArgument(e,t);return typeof r=="function"?s.default(n).argParser(r):s.default(r),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e!=null?e:"help [command]";let[,r,n]=e.match(/([^ ]+) *(.*)/),s=t!=null?t:"display help for command",o=this.createCommand(r);return o.helpOption(!1),n&&o.arguments(n),s&&o.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){var t;return((t=this._addImplicitHelpCommand)!=null?t:this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
|
|
30
|
+
Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,r){this._exitCallback&&this._exitCallback(new pl(e,t,r)),me.exit(e)}action(e){let t=r=>{let n=this.registeredArguments.length,s=r.slice(0,n);return this._storeOptionsAsProperties?s[n]=this:s[n]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new Bp(e,t)}_callParseArg(e,t,r,n){try{return e.parseArg(t,r)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${n} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let r=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${r}'
|
|
31
|
+
- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=n=>[n.name()].concat(n.aliases()),r=t(e).find(n=>this._findCommand(n));if(r){let n=t(this._findCommand(r)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${n}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),r=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let n=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let l=this.getOptionValue(r);s!==null&&e.parseArg?s=this._callParseArg(e,s,l,o):s!==null&&e.variadic&&(s=e._concatValue(s,l)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(r,s,a)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;n(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;n(s,o,"env")}),this}_optionEx(e,t,r,n,s){if(typeof t=="object"&&t instanceof Bp)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,r);if(o.makeOptionMandatory(!!e.mandatory),typeof n=="function")o.default(s).argParser(n);else if(n instanceof RegExp){let a=n;n=(l,c)=>{let u=a.exec(l);return u?u[0]:c},o.default(s).argParser(n)}else o.default(n);return this.addOption(o)}option(e,t,r,n){return this._optionEx({},e,t,r,n)}requiredOption(e,t,r,n){return this._optionEx({mandatory:!0},e,t,r,n)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,r){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(t=r.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){var n,s;if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){(n=me.versions)!=null&&n.electron&&(t.from="electron");let o=(s=me.execArgv)!=null?s:[];(o.includes("-e")||o.includes("--eval")||o.includes("-p")||o.includes("--print"))&&(t.from="eval")}e===void 0&&(e=me.argv),this.rawArgs=e.slice();let r;switch(t.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":me.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}parse(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return this._parseCommand([],r),this}async parseAsync(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return await this._parseCommand([],r),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
32
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,r){if(us.existsSync(e))return;let n=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${e}' does not exist
|
|
33
33
|
- if '${r}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
34
34
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
35
|
-
- ${n}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let r=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function s(u,f){let h=
|
|
35
|
+
- ${n}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let r=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function s(u,f){let h=Gt.resolve(u,f);if(us.existsSync(h))return h;if(n.includes(Gt.extname(f)))return;let p=n.find(m=>us.existsSync(`${h}${m}`));if(p)return`${h}${p}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=us.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=Gt.resolve(Gt.dirname(u),a)}if(a){let u=s(a,o);if(!u&&!e._executableFile&&this._scriptPath){let f=Gt.basename(this._scriptPath,Gt.extname(this._scriptPath));f!==this._name&&(u=s(a,`${f}-${e._name}`))}o=u||o}r=n.includes(Gt.extname(o));let l;me.platform!=="win32"?r?(t.unshift(o),t=Lp(me.execArgv).concat(t),l=dl.spawn(me.argv[0],t,{stdio:"inherit"})):l=dl.spawn(o,t,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),t.unshift(o),t=Lp(me.execArgv).concat(t),l=dl.spawn(me.execPath,t,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{me.on(f,()=>{l.killed===!1&&l.exitCode===null&&l.kill(f)})});let c=this._exitCallback;l.on("close",u=>{u=u!=null?u:1,c?c(new pl(u,"commander.executeSubCommandAsync","(close)")):me.exit(u)}),l.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(u.code==="EACCES")throw new Error(`'${o}' not executable`);if(!c)me.exit(1);else{let f=new pl(1,"commander.executeSubCommandAsync","(error)");f.nestedError=u,c(f)}}),this.runningCommand=l}_dispatchSubcommand(e,t,r){let n=this._findCommand(e);n||this.help({error:!0}),n._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,n,"preSubcommand"),s=this._chainOrCall(s,()=>{if(n._executableHandler)this._executeSubCommand(n,t.concat(r));else return n._parseCommand(t,r)}),s}_dispatchHelpCommand(e){var r,n,s,o;e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[(o=(s=(r=this._getHelpOption())==null?void 0:r.long)!=null?s:(n=this._getHelpOption())==null?void 0:n.short)!=null?o:"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(r,n,s)=>{let o=n;if(n!==null&&r.parseArg){let a=`error: command-argument value '${n}' is invalid for argument '${r.name()}'.`;o=this._callParseArg(r,n,s,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((r,n)=>{let s=r.defaultValue;r.variadic?n<this.args.length?(s=this.args.slice(n),r.parseArg&&(s=s.reduce((o,a)=>e(r,a,o),r.defaultValue))):s===void 0&&(s=[]):n<this.args.length&&(s=this.args[n],r.parseArg&&(s=e(r,s,r.defaultValue))),t[n]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let r=e,n=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(o=>{n.push({hookedCommand:s,callback:o})})}),t==="postAction"&&n.reverse(),n.forEach(s=>{r=this._chainOrCall(r,()=>s.callback(s.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,t,r){let n=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(s=>{n=this._chainOrCall(n,()=>s(this,t))}),n}_parseCommand(e,t){let r=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),t=r.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(s,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))n(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(r=>{let n=r.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});e.filter(r=>r.conflictsWith.length>0).forEach(r=>{let n=e.find(s=>r.conflictsWith.includes(s.attributeName()));n&&this._conflictingOption(r,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],r=[],n=t,s=e.slice();function o(l){return l.length>1&&l[0]==="-"}let a=null;for(;s.length;){let l=s.shift();if(l==="--"){n===r&&n.push(l),n.push(...s);break}if(a&&!o(l)){this.emit(`option:${a.name()}`,l);continue}if(a=null,o(l)){let c=this._findOption(l);if(c){if(c.required){let u=s.shift();u===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,u)}else if(c.optional){let u=null;s.length>0&&!o(s[0])&&(u=s.shift()),this.emit(`option:${c.name()}`,u)}else this.emit(`option:${c.name()}`);a=c.variadic?c:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let c=this._findOption(`-${l[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,l.slice(2)):(this.emit(`option:${c.name()}`),s.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let c=l.indexOf("="),u=this._findOption(l.slice(0,c));if(u&&(u.required||u.optional)){this.emit(`option:${u.name()}`,l.slice(c+1));continue}}if(o(l)&&(n=r),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&r.length===0){if(this._findCommand(l)){t.push(l),s.length>0&&r.push(...s);break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){r.push(l),s.length>0&&r.push(...s);break}}if(this._passThroughOptions){n.push(l),s.length>0&&n.push(...s);break}n.push(l)}return{operands:t,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let r=0;r<t;r++){let n=this.options[r].attributeName();e[n]=n===this._versionOptionName?this._version:this[n]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
|
|
36
36
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
37
37
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
38
|
-
`),this.outputHelp({error:!0}));let r=t||{},n=r.exitCode||1,s=r.code||"commander.error";this._exit(n,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in me.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,me.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new
|
|
39
|
-
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){var n;if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let r=(n=this.parent)==null?void 0:n._findCommand(e);if(r){let s=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(r=>
|
|
38
|
+
`),this.outputHelp({error:!0}));let r=t||{},n=r.exitCode||1,s=r.code||"commander.error";this._exit(n,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in me.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,me.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new jx(this.options),t=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&t(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(n=>!t(n)).forEach(n=>{this.setOptionValueWithSource(n,r.implied[n],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let r=o=>{let a=o.attributeName(),l=this.getOptionValue(a),c=this.options.find(f=>f.negate&&a===f.attributeName()),u=this.options.find(f=>!f.negate&&a===f.attributeName());return c&&(c.presetArg===void 0&&l===!1||c.presetArg!==void 0&&l===c.presetArg)?c:u||o},n=o=>{let a=r(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${n(e)} cannot be used with ${n(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);n=n.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=Pp(e,n)}let r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,r=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${r} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(s=>{n.push(s.name()),s.alias()&&n.push(s.alias())}),t=Pp(e,n)}let r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",r=r||"output the version number";let n=this.createOption(t,r);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
39
|
+
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){var n;if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let r=(n=this.parent)==null?void 0:n._findCommand(e);if(r){let s=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(r=>Dx(r));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=Gt.basename(e,Gt.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),r=this._getOutputContext(e);t.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let n=t.formatHelp(this,t);return r.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(e){e=e||{};let t=!!e.error,r,n,s;return t?(r=a=>this._outputConfiguration.writeErr(a),n=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(r=a=>this._outputConfiguration.writeOut(a),n=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a=>(n||(a=this._outputConfiguration.stripColor(a)),r(a)),hasColors:n,helpWidth:s}}outputHelp(e){var o;let t;typeof e=="function"&&(t=e,e=void 0);let r=this._getOutputContext(e),n={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let s=this.helpInformation({error:r.error});if(t&&(s=t(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(s),(o=this._getHelpOption())!=null&&o.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",n))}helpOption(e,t){var r;return typeof e=="boolean"?(e?this._helpOption=(r=this._helpOption)!=null?r:void 0:this._helpOption=null,this):(e=e!=null?e:"-h, --help",t=t!=null?t:"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){var r;this.outputHelp(e);let t=Number((r=me.exitCode)!=null?r:0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
40
40
|
Expecting one of '${r.join("', '")}'`);let n=`${e}Help`;return this.on(n,s=>{let o;typeof t=="function"?o=t({error:s.error,command:s.command}):o=t,o&&s.write(`${o}
|
|
41
|
-
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(n=>t.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function
|
|
42
|
-
`),this.stream.write(this.lastDraw)};
|
|
43
|
-
`)}});var Vp=w((l2,$p)=>{$p.exports=jp()});var Yp=w($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});var Hp=require("buffer"),xi={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};$t.ERRORS=xi;function Ux(i){if(!Hp.Buffer.isEncoding(i))throw new Error(xi.INVALID_ENCODING)}$t.checkEncoding=Ux;function Wp(i){return typeof i=="number"&&isFinite(i)&&Hx(i)}$t.isFiniteInteger=Wp;function Gp(i,e){if(typeof i=="number"){if(!Wp(i)||i<0)throw new Error(e?xi.INVALID_OFFSET:xi.INVALID_LENGTH)}else throw new Error(e?xi.INVALID_OFFSET_NON_NUMBER:xi.INVALID_LENGTH_NON_NUMBER)}function jx(i){Gp(i,!1)}$t.checkLengthValue=jx;function $x(i){Gp(i,!0)}$t.checkOffsetValue=$x;function Vx(i,e){if(i<0||i>e.length)throw new Error(xi.INVALID_TARGET_OFFSET)}$t.checkTargetOffset=Vx;function Hx(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i}function Wx(i){if(typeof BigInt=="undefined")throw new Error("Platform does not support JS BigInt type.");if(typeof Hp.Buffer.prototype[i]=="undefined")throw new Error(`Platform does not support Buffer.prototype.${i}.`)}$t.bigIntAndBufferInt64Check=Wx});var zp=w(vl=>{"use strict";Object.defineProperty(vl,"__esModule",{value:!0});var ee=Yp(),Kp=4096,Gx="utf8",yl=class i{constructor(e){if(this.length=0,this._encoding=Gx,this._writeOffset=0,this._readOffset=0,i.isSmartBufferOptions(e))if(e.encoding&&(ee.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(ee.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(ee.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(ee.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(Kp);else{if(typeof e!="undefined")throw new Error(ee.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(Kp)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let t=e;return t&&(t.encoding!==void 0||t.size!==void 0||t.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return ee.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return ee.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,t),this}insertInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,t)}writeInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}insertInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}writeInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}insertInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}writeInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}insertInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}writeInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}insertInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}writeBigInt64BE(e,t){return ee.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}insertBigInt64BE(e,t){return ee.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}writeBigInt64LE(e,t){return ee.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}insertBigInt64LE(e,t){return ee.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){return ee.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){return ee.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,t)}insertUInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,t)}writeUInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}insertUInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}writeUInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}insertUInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}writeUInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}insertUInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}writeUInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}insertUInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}writeBigUInt64BE(e,t){return ee.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}insertBigUInt64BE(e,t){return ee.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}writeBigUInt64LE(e,t){return ee.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}insertBigUInt64LE(e,t){return ee.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}insertFloatBE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}writeFloatLE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}insertFloatLE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}insertDoubleBE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}writeDoubleLE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}insertDoubleLE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}readString(e,t){let r;typeof e=="number"?(ee.checkLengthValue(e),r=Math.min(e,this.length-this._readOffset)):(t=e,r=this.length-this._readOffset),typeof t!="undefined"&&ee.checkEncoding(t);let n=this._buff.slice(this._readOffset,this._readOffset+r).toString(t||this._encoding);return this._readOffset+=r,n}insertString(e,t,r){return ee.checkOffsetValue(t),this._handleString(e,!0,t,r)}writeString(e,t,r){return this._handleString(e,!1,t,r)}readStringNT(e){typeof e!="undefined"&&ee.checkEncoding(e);let t=this.length;for(let n=this._readOffset;n<this.length;n++)if(this._buff[n]===0){t=n;break}let r=this._buff.slice(this._readOffset,t);return this._readOffset=t+1,r.toString(e||this._encoding)}insertStringNT(e,t,r){return ee.checkOffsetValue(t),this.insertString(e,t,r),this.insertUInt8(0,t+e.length),this}writeStringNT(e,t,r){return this.writeString(e,t,r),this.writeUInt8(0,typeof t=="number"?t+e.length:this.writeOffset),this}readBuffer(e){typeof e!="undefined"&&ee.checkLengthValue(e);let t=typeof e=="number"?e:this.length,r=Math.min(this.length,this._readOffset+t),n=this._buff.slice(this._readOffset,r);return this._readOffset=r,n}insertBuffer(e,t){return ee.checkOffsetValue(t),this._handleBuffer(e,!0,t)}writeBuffer(e,t){return this._handleBuffer(e,!1,t)}readBufferNT(){let e=this.length;for(let r=this._readOffset;r<this.length;r++)if(this._buff[r]===0){e=r;break}let t=this._buff.slice(this._readOffset,e);return this._readOffset=e+1,t}insertBufferNT(e,t){return ee.checkOffsetValue(t),this.insertBuffer(e,t),this.insertUInt8(0,t+e.length),this}writeBufferNT(e,t){return typeof t!="undefined"&&ee.checkOffsetValue(t),this.writeBuffer(e,t),this.writeUInt8(0,typeof t=="number"?t+e.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(e){ee.checkOffsetValue(e),ee.checkTargetOffset(e,this),this._readOffset=e}get writeOffset(){return this._writeOffset}set writeOffset(e){ee.checkOffsetValue(e),ee.checkTargetOffset(e,this),this._writeOffset=e}get encoding(){return this._encoding}set encoding(e){ee.checkEncoding(e),this._encoding=e}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(e){let t=typeof e=="string"?e:this._encoding;return ee.checkEncoding(t),this._buff.toString(t,0,this.length)}destroy(){return this.clear(),this}_handleString(e,t,r,n){let s=this._writeOffset,o=this._encoding;typeof r=="number"?s=r:typeof r=="string"&&(ee.checkEncoding(r),o=r),typeof n=="string"&&(ee.checkEncoding(n),o=n);let a=Buffer.byteLength(e,o);return t?this.ensureInsertable(a,s):this._ensureWriteable(a,s),this._buff.write(e,s,a,o),t?this._writeOffset+=a:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,s+a):this._writeOffset+=a,this}_handleBuffer(e,t,r){let n=typeof r=="number"?r:this._writeOffset;return t?this.ensureInsertable(e.length,n):this._ensureWriteable(e.length,n),e.copy(this._buff,n),t?this._writeOffset+=e.length:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,n+e.length):this._writeOffset+=e.length,this}ensureReadable(e,t){let r=this._readOffset;if(typeof t!="undefined"&&(ee.checkOffsetValue(t),r=t),r<0||r+e>this.length)throw new Error(ee.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,t){ee.checkOffsetValue(t),this._ensureCapacity(this.length+e),t<this.length&&this._buff.copy(this._buff,t+e,t,this._buff.length),t+e>this.length?this.length=t+e:this.length+=e}_ensureWriteable(e,t){let r=typeof t=="number"?t:this._writeOffset;this._ensureCapacity(r+e),r+e>this.length&&(this.length=r+e)}_ensureCapacity(e){let t=this._buff.length;if(e>t){let r=this._buff,n=t*3/2+1;n<e&&(n=e),this._buff=Buffer.allocUnsafe(n),r.copy(this._buff,0,0,t)}}_readNumberValue(e,t,r){this.ensureReadable(t,r);let n=e.call(this._buff,typeof r=="number"?r:this._readOffset);return typeof r=="undefined"&&(this._readOffset+=t),n}_insertNumberValue(e,t,r,n){return ee.checkOffsetValue(n),this.ensureInsertable(t,n),e.call(this._buff,r,n),this._writeOffset+=t,this}_writeNumberValue(e,t,r,n){if(typeof n=="number"){if(n<0)throw new Error(ee.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);ee.checkOffsetValue(n)}let s=typeof n=="number"?n:this._writeOffset;return this._ensureWriteable(t,s),e.call(this._buff,r,s),typeof n=="number"?this._writeOffset=Math.max(this._writeOffset,s+t):this._writeOffset+=t,this}};vl.SmartBuffer=yl});var _l=w(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.SOCKS5_NO_ACCEPTABLE_AUTH=xe.SOCKS5_CUSTOM_AUTH_END=xe.SOCKS5_CUSTOM_AUTH_START=xe.SOCKS_INCOMING_PACKET_SIZES=xe.SocksClientState=xe.Socks5Response=xe.Socks5HostType=xe.Socks5Auth=xe.Socks4Response=xe.SocksCommand=xe.ERRORS=xe.DEFAULT_TIMEOUT=void 0;var Yx=3e4;xe.DEFAULT_TIMEOUT=Yx;var Kx={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};xe.ERRORS=Kx;var zx={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:i=>i+7,Socks4Response:8};xe.SOCKS_INCOMING_PACKET_SIZES=zx;var Jp;(function(i){i[i.connect=1]="connect",i[i.bind=2]="bind",i[i.associate=3]="associate"})(Jp||(xe.SocksCommand=Jp={}));var Zp;(function(i){i[i.Granted=90]="Granted",i[i.Failed=91]="Failed",i[i.Rejected=92]="Rejected",i[i.RejectedIdent=93]="RejectedIdent"})(Zp||(xe.Socks4Response=Zp={}));var Qp;(function(i){i[i.NoAuth=0]="NoAuth",i[i.GSSApi=1]="GSSApi",i[i.UserPass=2]="UserPass"})(Qp||(xe.Socks5Auth=Qp={}));var Jx=128;xe.SOCKS5_CUSTOM_AUTH_START=Jx;var Zx=254;xe.SOCKS5_CUSTOM_AUTH_END=Zx;var Qx=255;xe.SOCKS5_NO_ACCEPTABLE_AUTH=Qx;var Xp;(function(i){i[i.Granted=0]="Granted",i[i.Failure=1]="Failure",i[i.NotAllowed=2]="NotAllowed",i[i.NetworkUnreachable=3]="NetworkUnreachable",i[i.HostUnreachable=4]="HostUnreachable",i[i.ConnectionRefused=5]="ConnectionRefused",i[i.TTLExpired=6]="TTLExpired",i[i.CommandNotSupported=7]="CommandNotSupported",i[i.AddressNotSupported=8]="AddressNotSupported"})(Xp||(xe.Socks5Response=Xp={}));var em;(function(i){i[i.IPv4=1]="IPv4",i[i.Hostname=3]="Hostname",i[i.IPv6=4]="IPv6"})(em||(xe.Socks5HostType=em={}));var tm;(function(i){i[i.Created=0]="Created",i[i.Connecting=1]="Connecting",i[i.Connected=2]="Connected",i[i.SentInitialHandshake=3]="SentInitialHandshake",i[i.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",i[i.SentAuthentication=5]="SentAuthentication",i[i.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",i[i.SentFinalHandshake=7]="SentFinalHandshake",i[i.ReceivedFinalResponse=8]="ReceivedFinalResponse",i[i.BoundWaitingForConnection=9]="BoundWaitingForConnection",i[i.Established=10]="Established",i[i.Disconnected=11]="Disconnected",i[i.Error=99]="Error"})(tm||(xe.SocksClientState=tm={}))});var wl=w(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.shuffleArray=nr.SocksClientError=void 0;var bl=class extends Error{constructor(e,t){super(e),this.options=t}};nr.SocksClientError=bl;function Xx(i){for(let e=i.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1));[i[e],i[t]]=[i[t],i[e]]}}nr.shuffleArray=Xx});var Yr=w(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.AddressError=void 0;var xl=class extends Error{constructor(e,t){super(e),this.name="AddressError",this.parseMessage=t}};cs.AddressError=xl});var us=w(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.isInSubnet=eS;ei.isCorrect=tS;ei.prefixLengthFromMask=iS;ei.numberToPaddedHex=rm;ei.stringToPaddedHex=rS;ei.testBit=nS;var im=Yr();function eS(i){return this.subnetMask<i.subnetMask?!1:this.mask(i.subnetMask)===i.mask()}function tS(i){return function(){return this.addressMinusSuffix!==this.correctForm()?!1:this.subnetMask===i&&!this.parsedSubnet?!0:this.parsedSubnet===String(this.subnetMask)}}function iS(i,e){let t=i.toString(2).padStart(e,"0");if(t.length>e)throw new im.AddressError("Invalid subnet mask.");let r=t.indexOf("0");if(r===-1)return e;if(t.slice(r).includes("1"))throw new im.AddressError("Invalid subnet mask.");return r}function rm(i){return i.toString(16).padStart(2,"0")}function rS(i){return rm(parseInt(i,10))}function nS(i,e){let{length:t}=i;if(e>t)return!1;let r=t-e;return i.substring(r,r+1)==="1"}});var Sl=w(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.RE_SUBNET_STRING=Bt.RE_ADDRESS=Bt.GROUPS=Bt.BITS=void 0;Bt.BITS=32;Bt.GROUPS=4;Bt.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;Bt.RE_SUBNET_STRING=/\/\d{1,2}$/});var El=w(Lt=>{"use strict";var sS=Lt&&Lt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),oS=Lt&&Lt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),nm=Lt&&Lt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&sS(e,i,t);return oS(e,i),e};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.Address4=void 0;var ti=nm(us()),Ue=nm(Sl()),Pt=Yr(),aS=ti.isCorrect(Ue.BITS),gt=class i{constructor(e){this.groups=Ue.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=aS,this.isInSubnet=ti.isInSubnet,this.address=e;let t=Ue.RE_SUBNET_STRING.exec(e);if(t){if(this.parsedSubnet=t[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>Ue.BITS)throw new Pt.AddressError("Invalid subnet mask.");e=e.replace(Ue.RE_SUBNET_STRING,"")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}static isValid(e){try{return new i(e),!0}catch{return!1}}parse(e){let t=e.split(".");if(!e.match(Ue.RE_ADDRESS))throw new Pt.AddressError("Invalid IPv4 address.");return t}correctForm(){return this.parsedAddress.map(e=>parseInt(e,10)).join(".")}static fromAddressAndMask(e,t){let r=ti.prefixLengthFromMask(new i(t).bigInt(),Ue.BITS);return new i(`${e}/${r}`)}static fromAddressAndWildcardMask(e,t){let r=new i(t).bigInt(),n=(BigInt(1)<<BigInt(Ue.BITS))-BigInt(1),s=r^n,o=ti.prefixLengthFromMask(s,Ue.BITS);return new i(`${e}/${o}`)}static fromWildcard(e){let t=e.split(".");if(t.length!==Ue.GROUPS)throw new Pt.AddressError("Wildcard pattern must have 4 octets");let r=-1;for(let a=0;a<t.length;a++)if(t[a]==="*")r===-1&&(r=a);else if(r!==-1)throw new Pt.AddressError("Wildcard `*` must only appear in trailing octets (e.g. `192.168.0.*`)");let n=r===-1?0:t.length-r,s=t.map(a=>a==="*"?"0":a),o=Ue.BITS-n*8;return new i(`${s.join(".")}/${o}`)}static fromHex(e){let t=e.replace(/:/g,"");if(!/^[0-9a-fA-F]{8}$/.test(t))throw new Pt.AddressError("IPv4 hex must be exactly 8 hex digits");let r=[];for(let n=0;n<8;n+=2)r.push(parseInt(t.slice(n,n+2),16));return new i(r.join("."))}static fromInteger(e){if(!Number.isInteger(e)||e<0||e>4294967295)throw new Pt.AddressError("IPv4 integer must be in the range 0 to 2**32 - 1");return i.fromHex(e.toString(16).padStart(8,"0"))}static fromArpa(e){let r=e.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new i(r)}toHex(){return this.parsedAddress.map(e=>ti.stringToPaddedHex(e)).join(":")}toArray(){return this.parsedAddress.map(e=>parseInt(e,10))}toGroup6(){let e=[],t;for(t=0;t<Ue.GROUPS;t+=2)e.push(`${ti.stringToPaddedHex(this.parsedAddress[t])}${ti.stringToPaddedHex(this.parsedAddress[t+1])}`);return e.join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(e=>ti.stringToPaddedHex(e)).join("")}`)}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(Ue.BITS-this.subnetMask)}`)}startAddress(){return i.fromBigInt(this._startAddress())}startAddressExclusive(){let e=BigInt("1");return i.fromBigInt(this._startAddress()+e)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(Ue.BITS-this.subnetMask)}`)}endAddress(){return i.fromBigInt(this._endAddress())}endAddressExclusive(){let e=BigInt("1");return i.fromBigInt(this._endAddress()-e)}subnetMaskAddress(){return i.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(Ue.BITS-this.subnetMask)}`))}wildcardMask(){return i.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(Ue.BITS-this.subnetMask)}`))}networkForm(){return`${this.startAddress().correctForm()}/${this.subnetMask}`}static fromBigInt(e){if(e<BigInt(0)||e>BigInt(0xffffffff))throw new Pt.AddressError("IPv4 BigInt must be in the range 0 to 2**32 - 1");return i.fromHex(e.toString(16).padStart(8,"0"))}static fromByteArray(e){if(e.length!==4)throw new Pt.AddressError("IPv4 addresses require exactly 4 bytes");for(let t=0;t<e.length;t++)if(!Number.isInteger(e[t])||e[t]<0||e[t]>255)throw new Pt.AddressError("All bytes must be integers between 0 and 255");return this.fromUnsignedByteArray(e)}static fromUnsignedByteArray(e){if(e.length!==4)throw new Pt.AddressError("IPv4 addresses require exactly 4 bytes");let t=e.join(".");return new i(t)}mask(e){return e===void 0&&(e=this.subnetMask),this.getBitsBase2(0,e)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}reverseForm(e){e||(e={});let t=this.correctForm().split(".").reverse().join(".");return e.omitSuffix?t:`${t}.in-addr.arpa.`}isMulticast(){return this.isInSubnet(lS)}isPrivate(){return cS.some(e=>this.isInSubnet(e))}isLoopback(){return this.isInSubnet(uS)}isLinkLocal(){return this.isInSubnet(fS)}isUnspecified(){return this.isInSubnet(hS)}isBroadcast(){return this.isInSubnet(dS)}isCGNAT(){return this.isInSubnet(pS)}binaryZeroPad(){return this._binaryZeroPad===void 0&&(this._binaryZeroPad=this.bigInt().toString(2).padStart(Ue.BITS,"0")),this._binaryZeroPad}groupForV6(){let e=this.parsedAddress;return this.address.replace(Ue.RE_ADDRESS,`<span class="hover-group group-v4 group-6">${e.slice(0,2).join(".")}</span>.<span class="hover-group group-v4 group-7">${e.slice(2,4).join(".")}</span>`)}};Lt.Address4=gt;var lS=new gt("224.0.0.0/4"),cS=[new gt("10.0.0.0/8"),new gt("172.16.0.0/12"),new gt("192.168.0.0/16")],uS=new gt("127.0.0.0/8"),fS=new gt("169.254.0.0/16"),hS=new gt("0.0.0.0/32"),dS=new gt("255.255.255.255/32"),pS=new gt("100.64.0.0/10")});var Ol=w(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.RE_URL_WITH_PORT=Ne.RE_URL=Ne.RE_ZONE_STRING=Ne.RE_SUBNET_STRING=Ne.RE_BAD_ADDRESS=Ne.RE_BAD_CHARACTERS=Ne.TYPES=Ne.SCOPES=Ne.GROUPS=Ne.BITS=void 0;Ne.BITS=128;Ne.GROUPS=8;Ne.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};Ne.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast","fc00::/7":"Unique local","2002::/16":"6to4","2001:db8::/32":"Documentation","64:ff9b::/96":"NAT64 (well-known)","64:ff9b:1::/48":"NAT64 (local-use)"};Ne.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;Ne.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;Ne.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;Ne.RE_ZONE_STRING=/%.*$/;Ne.RE_URL=/^\[{0,1}([0-9a-f:]+)\]{0,1}/;Ne.RE_URL_WITH_PORT=/\[([0-9a-f:]+)\]:([0-9]{1,5})/});var kl=w(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.escapeHtml=fs;Si.spanAllZeroes=sm;Si.spanAll=mS;Si.spanLeadingZeroes=gS;Si.simpleGroup=yS;function fs(i){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function sm(i){return fs(i).replace(/(0+)/g,'<span class="zero">$1</span>')}function mS(i,e=0){return i.split("").map((r,n)=>`<span class="digit value-${fs(r)} position-${n+e}">${sm(r)}</span>`).join("")}function om(i){return fs(i).replace(/^(0+)/,'<span class="zero">$1</span>')}function gS(i){return i.split(":").map(t=>om(t)).join(":")}function yS(i,e=0){return i.split(":").map((r,n)=>/group-v4/.test(r)?r:`<span class="hover-group group-${n+e}">${om(r)}</span>`)}});var am=w(tt=>{"use strict";var vS=tt&&tt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),_S=tt&&tt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),bS=tt&&tt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&vS(e,i,t);return _S(e,i),e};Object.defineProperty(tt,"__esModule",{value:!0});tt.ADDRESS_BOUNDARY=void 0;tt.groupPossibilities=ds;tt.padGroup=hs;tt.simpleRegularExpression=xS;tt.possibleElisions=SS;var wS=bS(Ol());function ds(i){return`(${i.join("|")})`}function hs(i){return i.length<4?`0{0,${4-i.length}}${i}`:i}tt.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function xS(i){let e=[];i.forEach((r,n)=>{parseInt(r,16)===0&&e.push(n)});let t=e.map(r=>i.map((n,s)=>{if(s===r){let o=s===0||s===wS.GROUPS-1?":":"";return ds([hs(n),o])}return hs(n)}).join(":"));return t.push(i.map(hs).join(":")),ds(t)}function SS(i,e,t){let r=e?"":":",n=t?"":":",s=[];!e&&!t&&s.push("::"),e&&t&&s.push(""),(t&&!e||!t&&e)&&s.push(":"),s.push(`${r}(:0{1,4}){1,${i-1}}`),s.push(`(0{1,4}:){1,${i-1}}${n}`),s.push(`(0{1,4}:){${i-1}}0{1,4}`);for(let o=1;o<i-1;o++)for(let a=1;a<i-o;a++)s.push(`(0{1,4}:){${a}}:(0{1,4}:){${i-a-o-1}}0{1,4}`);return ds(s)}});var hm=w(Rt=>{"use strict";var ES=Rt&&Rt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),OS=Rt&&Rt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),ys=Rt&&Rt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&ES(e,i,t);return OS(e,i),e};Object.defineProperty(Rt,"__esModule",{value:!0});Rt.Address6=void 0;var gs=ys(us()),lm=ys(Sl()),ue=ys(Ol()),Ei=ys(kl()),Vt=El(),Oi=am(),Ge=Yr(),ps=us(),kS=gs.isCorrect(ue.BITS);function ms(i){if(!i)throw new Error("Assertion failed.")}function CS(i){let e=/(\d+)(\d{3})/;for(;e.test(i);)i=i.replace(e,"$1,$2");return i}function AS(i){return i=i.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),i=i.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),i}function IS(i,e){let t=[],r=[],n;for(n=0;n<i.length;n++)n<e[0]?t.push(i[n]):n>e[1]&&r.push(i[n]);return t.concat(["compact"]).concat(r)}function cm(i){return parseInt(i,16).toString(16).padStart(4,"0")}function um(i){return i&255}var Ht=class i{constructor(e,t){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=gs.isInSubnet,this.isCorrect=kS,t===void 0?this.groups=ue.GROUPS:this.groups=t,this.address=e;let r=ue.RE_SUBNET_STRING.exec(e);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>ue.BITS)throw new Ge.AddressError("Invalid subnet mask.");e=e.replace(ue.RE_SUBNET_STRING,"")}else if(/\//.test(e))throw new Ge.AddressError("Invalid subnet mask.");let n=ue.RE_ZONE_STRING.exec(e);n&&(this.zone=n[0],e=e.replace(ue.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(e){try{return new i(e),!0}catch{return!1}}static fromBigInt(e){if(e<BigInt(0)||e>(BigInt(1)<<BigInt(ue.BITS))-BigInt(1))throw new Ge.AddressError("IPv6 BigInt must be in the range 0 to 2**128 - 1");let t=e.toString(16).padStart(32,"0"),r=[];for(let n=0;n<ue.GROUPS;n++)r.push(t.slice(n*4,(n+1)*4));return new i(r.join(":"))}static fromURL(e){let t,r=null,n;if(e.indexOf("[")!==-1&&e.indexOf("]:")!==-1){if(n=ue.RE_URL_WITH_PORT.exec(e),n===null)return{error:"failed to parse address with port",address:null,port:null};t=n[1],r=n[2]}else if(e.indexOf("/")!==-1){if(e=e.replace(/^[a-z0-9]+:\/\//,""),n=ue.RE_URL.exec(e),n===null)return{error:"failed to parse address from URL",address:null,port:null};t=n[1]}else t=e;return r?(r=parseInt(r,10),(r<0||r>65536)&&(r=null)):r=null,{address:new i(t),port:r}}static fromAddressAndMask(e,t){let r=gs.prefixLengthFromMask(new i(t).bigInt(),ue.BITS);return new i(`${e}/${r}`)}static fromAddressAndWildcardMask(e,t){let r=new i(t).bigInt(),n=(BigInt(1)<<BigInt(ue.BITS))-BigInt(1),s=r^n,o=gs.prefixLengthFromMask(s,ue.BITS);return new i(`${e}/${o}`)}static fromWildcard(e){if(e.includes("%")||e.includes("/"))throw new Ge.AddressError("Wildcard pattern must not include a zone or CIDR suffix");let t=e.split("::");if(t.length>2)throw new Ge.AddressError("Wildcard pattern cannot contain more than one '::'");let r;if(t.length===2){let l=t[0]===""?[]:t[0].split(":"),c=t[1]===""?[]:t[1].split(":"),u=ue.GROUPS-l.length-c.length;if(u<1)throw new Ge.AddressError("Wildcard pattern with '::' has too many groups");r=[...l,...new Array(u).fill("0"),...c]}else r=e.split(":");if(r.length!==ue.GROUPS)throw new Ge.AddressError("Wildcard pattern must have 8 groups");let n=-1;for(let l=0;l<r.length;l++)if(r[l]==="*")n===-1&&(n=l);else if(n!==-1)throw new Ge.AddressError("Wildcard `*` must only appear in trailing groups (e.g. `2001:db8:*:*:*:*:*:*`)");let s=n===-1?0:r.length-n,o=r.map(l=>l==="*"?"0":l),a=ue.BITS-s*16;return new i(`${o.join(":")}/${a}`)}static fromAddress4(e){let t=new Vt.Address4(e),r=ue.BITS-(lm.BITS-t.subnetMask);return new i(`::ffff:${t.correctForm()}/${r}`)}static fromArpa(e){let t=e.replace(/(\.ip6\.arpa)?\.$/,""),r=7;if(t.length!==63)throw new Ge.AddressError("Invalid 'ip6.arpa' form.");let n=t.split(".").reverse();for(let s=r;s>0;s--){let o=s*4;n.splice(o,0,":")}return t=n.join(""),new i(t)}microsoftTranscription(){return`${this.correctForm().replace(/:/g,"-")}.ipv6-literal.net`}mask(e=this.subnetMask){return this.getBitsBase2(0,e)}possibleSubnets(e=128){let t=ue.BITS-this.subnetMask,r=Math.abs(e-ue.BITS),n=t-r;return n<0?"0":CS((BigInt("2")**BigInt(n)).toString(10))}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(ue.BITS-this.subnetMask)}`)}startAddress(){return i.fromBigInt(this._startAddress())}startAddressExclusive(){let e=BigInt("1");return i.fromBigInt(this._startAddress()+e)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(ue.BITS-this.subnetMask)}`)}endAddress(){return i.fromBigInt(this._endAddress())}endAddressExclusive(){let e=BigInt("1");return i.fromBigInt(this._endAddress()-e)}subnetMaskAddress(){return i.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(ue.BITS-this.subnetMask)}`))}wildcardMask(){return i.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(ue.BITS-this.subnetMask)}`))}networkForm(){return`${this.startAddress().correctForm()}/${this.subnetMask}`}getScope(){let e=this.getType();return e==="Multicast"||e.startsWith("Multicast ")?ue.SCOPES[parseInt(this.getBits(12,16).toString(10),10)]||"Unknown":e==="Link-local unicast"||e==="Loopback"?"Link local":e==="Unspecified"?"Unknown":"Global"}getType(){for(let e=0;e<fm.length;e++){let t=fm[e];if(this.isInSubnet(t[0]))return t[1]}return"Global unicast"}getBits(e,t){return BigInt(`0b${this.getBitsBase2(e,t)}`)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}getBitsBase16(e,t){let r=t-e;if(r%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(e,t).toString(16).padStart(r/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,ue.BITS)}reverseForm(e){e||(e={});let t=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,t).reverse().join(".");return t>0?e.omitSuffix?r:`${r}.ip6.arpa.`:e.omitSuffix?"":"ip6.arpa."}correctForm(){let e,t=[],r=0,n=[];for(e=0;e<this.parsedAddress.length;e++){let a=parseInt(this.parsedAddress[e],16);a===0&&r++,a!==0&&r>0&&(r>1&&n.push([e-r,e-1]),r=0)}r>1&&n.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);let s=n.map(a=>a[1]-a[0]+1);if(n.length>0){let a=s.indexOf(Math.max(...s));t=IS(this.parsedAddress,n[a])}else t=this.parsedAddress;for(e=0;e<t.length;e++)t[e]!=="compact"&&(t[e]=parseInt(t[e],16).toString(16));let o=t.join(":");return o=o.replace(/^compact$/,"::"),o=o.replace(/(^compact)|(compact$)/,":"),o=o.replace(/compact/,""),o}binaryZeroPad(){return this._binaryZeroPad===void 0&&(this._binaryZeroPad=this.bigInt().toString(2).padStart(ue.BITS,"0")),this._binaryZeroPad}parse4in6(e){if(e.indexOf(".")===-1)return e;let t=e.split(":"),n=t.slice(-1)[0].match(lm.RE_ADDRESS);if(n){this.parsedAddress4=n[0],this.address4=new Vt.Address4(this.parsedAddress4);for(let s=0;s<this.address4.groups;s++)if(/^0[0-9]+/.test(this.address4.parsedAddress[s])){let o=this.address4.parsedAddress.map(AS).join("."),a=t.slice(0,-1).map(Ei.escapeHtml).join(":"),l=t.length>1?":":"";throw new Ge.AddressError("IPv4 addresses can't have leading zeroes.",`${a}${l}${o}`)}this.v4=!0,t[t.length-1]=this.address4.toGroup6(),e=t.join(":")}return e}parse(e){e=this.parse4in6(e);let t=e.match(ue.RE_BAD_CHARACTERS);if(t)throw new Ge.AddressError(`Bad character${t.length>1?"s":""} detected in address: ${t.join("")}`,e.replace(ue.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let r=e.match(ue.RE_BAD_ADDRESS);if(r)throw new Ge.AddressError(`Address failed regex: ${r.join("")}`,e.replace(ue.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let n=[],s=e.split("::");if(s.length===2){let o=s[0].split(":"),a=s[1].split(":");o.length===1&&o[0]===""&&(o=[]),a.length===1&&a[0]===""&&(a=[]);let l=this.groups-(o.length+a.length);if(!l)throw new Ge.AddressError("Error parsing groups");this.elidedGroups=l,this.elisionBegin=o.length,this.elisionEnd=o.length+this.elidedGroups,n=n.concat(o);for(let c=0;c<l;c++)n.push("0");n=n.concat(a)}else if(s.length===1)n=e.split(":"),this.elidedGroups=0;else throw new Ge.AddressError("Too many :: groups found");if(n=n.map(o=>parseInt(o,16).toString(16)),n.length!==this.groups)throw new Ge.AddressError("Incorrect number of groups found");return n}canonicalForm(){return this.parsedAddress.map(cm).join(":")}decimal(){return this.parsedAddress.map(e=>parseInt(e,16).toString(10).padStart(5,"0")).join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(cm).join("")}`)}to4(){let e=this.binaryZeroPad().split("");return Vt.Address4.fromHex(BigInt(`0b${e.slice(96,128).join("")}`).toString(16).padStart(8,"0"))}to4in6(){let e=this.to4(),r=new i(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),n="";return/:$/.test(r)||(n=":"),r+n+e.address}inspectTeredo(){let e=this.getBitsBase16(0,32),r=(this.getBits(80,96)^BigInt("0xffff")).toString(),n=Vt.Address4.fromHex(this.getBitsBase16(32,64)),s=this.getBits(96,128),o=Vt.Address4.fromHex((s^BigInt("0xffffffff")).toString(16).padStart(8,"0")),a=this.getBitsBase2(64,80),l=(0,ps.testBit)(a,15),c=(0,ps.testBit)(a,14),u=(0,ps.testBit)(a,8),f=(0,ps.testBit)(a,9),h=BigInt(`0b${a.slice(2,6)+a.slice(8,16)}`).toString(10);return{prefix:`${e.slice(0,4)}:${e.slice(4,8)}`,server4:n.address,client4:o.address,flags:a,coneNat:l,microsoft:{reserved:c,universalLocal:f,groupIndividual:u,nonce:h},udpPort:r}}inspect6to4(){let e=this.getBitsBase16(0,16),t=Vt.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:e.slice(0,4),gateway:t.address}}to6to4(){if(!this.is4())return null;let e=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new i(e)}static fromAddress4Nat64(e,t="64:ff9b::/96"){let r=new Vt.Address4(e),n=new i(t),s=n.subnetMask;if(s!==32&&s!==40&&s!==48&&s!==56&&s!==64&&s!==96)throw new Ge.AddressError("NAT64 prefix length must be 32, 40, 48, 56, 64, or 96");let o=n.binaryZeroPad(),a=r.binaryZeroPad(),l;if(s===96)l=o.slice(0,96)+a;else{let f=64-s;l=o.slice(0,s)+a.slice(0,f)+"00000000"+a.slice(f)+"0".repeat(56-(32-f))}let c=BigInt(`0b${l}`).toString(16).padStart(32,"0"),u=[];for(let f=0;f<8;f++)u.push(c.slice(f*4,(f+1)*4));return new i(u.join(":"))}toAddress4Nat64(e="64:ff9b::/96"){let t=new i(e),r=t.subnetMask;if(r!==32&&r!==40&&r!==48&&r!==56&&r!==64&&r!==96)throw new Ge.AddressError("NAT64 prefix length must be 32, 40, 48, 56, 64, or 96");if(!this.isInSubnet(t))return null;let n=this.binaryZeroPad(),s;if(r===96)s=n.slice(96,128);else{let a=64-r;s=n.slice(r,r+a)+n.slice(72,72+(32-a))}let o=[];for(let a=0;a<4;a++)o.push(parseInt(s.slice(a*8,(a+1)*8),2).toString());return new Vt.Address4(o.join("."))}toByteArray(){let e=this.bigInt().toString(16),r=`${"0".repeat(e.length%2)}${e}`,n=[];for(let s=0,o=r.length;s<o;s+=2)n.push(parseInt(r.substring(s,s+2),16));return n}toUnsignedByteArray(){return this.toByteArray().map(um)}static fromByteArray(e){return this.fromUnsignedByteArray(e.map(um))}static fromUnsignedByteArray(e){let t=BigInt("256"),r=BigInt("0"),n=BigInt("1");for(let s=e.length-1;s>=0;s--)r+=n*BigInt(e[s].toString(10)),n*=t;return i.fromBigInt(r)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000"}isMulticast(){let e=this.getType();return e==="Multicast"||e.startsWith("Multicast ")}is4(){return this.v4}isMapped4(){return this.isInSubnet(LS)}isTeredo(){return this.isInSubnet(TS)}is6to4(){return this.isInSubnet(NS)}isLoopback(){return this.getType()==="Loopback"}isULA(){return this.isInSubnet(BS)}isUnspecified(){return this.getType()==="Unspecified"}isDocumentation(){return this.isInSubnet(PS)}href(e){return e===void 0?e="":e=`:${e}`,`http://[${this.correctForm()}]${e}/`}link(e){e||(e={}),e.className===void 0&&(e.className=""),e.prefix===void 0&&(e.prefix="/#address="),e.v4===void 0&&(e.v4=!1);let t=this.correctForm;e.v4&&(t=this.to4in6);let r=t.call(this),n=Ei.escapeHtml(`${e.prefix}${r}`),s=Ei.escapeHtml(r);if(e.className){let o=Ei.escapeHtml(e.className);return`<a href="${n}" class="${o}">${s}</a>`}return`<a href="${n}">${s}</a>`}group(){if(this.elidedGroups===0)return Ei.simpleGroup(this.addressMinusSuffix).join(":");ms(typeof this.elidedGroups=="number"),ms(typeof this.elisionBegin=="number");let e=[],[t,r]=this.addressMinusSuffix.split("::");t.length?e.push(...Ei.simpleGroup(t)):e.push("");let n=["hover-group"];for(let s=this.elisionBegin;s<this.elisionBegin+this.elidedGroups;s++)n.push(`group-${s}`);return e.push(`<span class="${n.join(" ")}"></span>`),r.length?e.push(...Ei.simpleGroup(r,this.elisionEnd)):e.push(""),this.is4()&&(ms(this.address4 instanceof Vt.Address4),e.pop(),e.push(this.address4.groupForV6())),e.join(":")}regularExpressionString(e=!1){let t=[],r=new i(this.correctForm());if(r.elidedGroups===0)t.push((0,Oi.simpleRegularExpression)(r.parsedAddress));else if(r.elidedGroups===ue.GROUPS)t.push((0,Oi.possibleElisions)(ue.GROUPS));else{let n=r.address.split("::");n[0].length&&t.push((0,Oi.simpleRegularExpression)(n[0].split(":"))),ms(typeof r.elidedGroups=="number"),t.push((0,Oi.possibleElisions)(r.elidedGroups,n[0].length!==0,n[1].length!==0)),n[1].length&&t.push((0,Oi.simpleRegularExpression)(n[1].split(":"))),t=[t.join(":")]}return e||(t=["(?=^|",Oi.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...t,")(?=[^\\w\\:]|",Oi.ADDRESS_BOUNDARY,"|$)"]),t.join("")}regularExpression(e=!1){return new RegExp(this.regularExpressionString(e),"i")}};Rt.Address6=Ht;var fm=Object.keys(ue.TYPES).map(i=>[new Ht(i),ue.TYPES[i]]),TS=new Ht("2001::/32"),NS=new Ht("2002::/16"),BS=new Ht("fc00::/7"),PS=new Ht("2001:db8::/32"),LS=new Ht("::ffff:0:0/96")});var Cl=w(Je=>{"use strict";var RS=Je&&Je.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),MS=Je&&Je.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),FS=Je&&Je.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&RS(e,i,t);return MS(e,i),e};Object.defineProperty(Je,"__esModule",{value:!0});Je.v6=Je.AddressError=Je.Address6=Je.Address4=void 0;var qS=El();Object.defineProperty(Je,"Address4",{enumerable:!0,get:function(){return qS.Address4}});var DS=hm();Object.defineProperty(Je,"Address6",{enumerable:!0,get:function(){return DS.Address6}});var US=Yr();Object.defineProperty(Je,"AddressError",{enumerable:!0,get:function(){return US.AddressError}});var jS=FS(kl());Je.v6={helpers:jS}});var vm=w(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.ipToBuffer=yt.int32ToIpv4=yt.ipv4ToInt32=yt.validateSocksClientChainOptions=yt.validateSocksClientOptions=void 0;var Xe=wl(),je=_l(),$S=require("stream"),Al=Cl(),dm=require("net");function VS(i,e=["connect","bind","associate"]){if(!je.SocksCommand[i.command])throw new Xe.SocksClientError(je.ERRORS.InvalidSocksCommand,i);if(e.indexOf(i.command)===-1)throw new Xe.SocksClientError(je.ERRORS.InvalidSocksCommandForOperation,i);if(!mm(i.destination))throw new Xe.SocksClientError(je.ERRORS.InvalidSocksClientOptionsDestination,i);if(!gm(i.proxy))throw new Xe.SocksClientError(je.ERRORS.InvalidSocksClientOptionsProxy,i);if(pm(i.proxy,i),i.timeout&&!ym(i.timeout))throw new Xe.SocksClientError(je.ERRORS.InvalidSocksClientOptionsTimeout,i);if(i.existing_socket&&!(i.existing_socket instanceof $S.Duplex))throw new Xe.SocksClientError(je.ERRORS.InvalidSocksClientOptionsExistingSocket,i)}yt.validateSocksClientOptions=VS;function HS(i){if(i.command!=="connect")throw new Xe.SocksClientError(je.ERRORS.InvalidSocksCommandChain,i);if(!mm(i.destination))throw new Xe.SocksClientError(je.ERRORS.InvalidSocksClientOptionsDestination,i);if(!(i.proxies&&Array.isArray(i.proxies)&&i.proxies.length>=2))throw new Xe.SocksClientError(je.ERRORS.InvalidSocksClientOptionsProxiesLength,i);if(i.proxies.forEach(e=>{if(!gm(e))throw new Xe.SocksClientError(je.ERRORS.InvalidSocksClientOptionsProxy,i);pm(e,i)}),i.timeout&&!ym(i.timeout))throw new Xe.SocksClientError(je.ERRORS.InvalidSocksClientOptionsTimeout,i)}yt.validateSocksClientChainOptions=HS;function pm(i,e){if(i.custom_auth_method!==void 0){if(i.custom_auth_method<je.SOCKS5_CUSTOM_AUTH_START||i.custom_auth_method>je.SOCKS5_CUSTOM_AUTH_END)throw new Xe.SocksClientError(je.ERRORS.InvalidSocksClientOptionsCustomAuthRange,e);if(i.custom_auth_request_handler===void 0||typeof i.custom_auth_request_handler!="function")throw new Xe.SocksClientError(je.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(i.custom_auth_response_size===void 0)throw new Xe.SocksClientError(je.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(i.custom_auth_response_handler===void 0||typeof i.custom_auth_response_handler!="function")throw new Xe.SocksClientError(je.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e)}}function mm(i){return i&&typeof i.host=="string"&&Buffer.byteLength(i.host)<256&&typeof i.port=="number"&&i.port>=0&&i.port<=65535}function gm(i){return i&&(typeof i.host=="string"||typeof i.ipaddress=="string")&&typeof i.port=="number"&&i.port>=0&&i.port<=65535&&(i.type===4||i.type===5)}function ym(i){return typeof i=="number"&&i>0}function WS(i){return new Al.Address4(i).toArray().reduce((t,r)=>(t<<8)+r,0)>>>0}yt.ipv4ToInt32=WS;function GS(i){let e=i>>>24&255,t=i>>>16&255,r=i>>>8&255,n=i&255;return[e,t,r,n].join(".")}yt.int32ToIpv4=GS;function YS(i){if(dm.isIPv4(i)){let e=new Al.Address4(i);return Buffer.from(e.toArray())}else if(dm.isIPv6(i)){let e=new Al.Address6(i);return Buffer.from(e.canonicalForm().split(":").map(t=>t.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}yt.ipToBuffer=YS});var _m=w(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.ReceiveBuffer=void 0;var Il=class{constructor(e=4096){this.buffer=Buffer.allocUnsafe(e),this.offset=0,this.originalSize=e}get length(){return this.offset}append(e){if(!Buffer.isBuffer(e))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+e.length>=this.buffer.length){let t=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length)),t.copy(this.buffer)}return e.copy(this.buffer,this.offset),this.offset+=e.length}peek(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,e)}get(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let t=Buffer.allocUnsafe(e);return this.buffer.slice(0,e).copy(t),this.buffer.copyWithin(0,e,e+this.offset-e),this.offset-=e,t}};vs.ReceiveBuffer=Il});var bm=w(ii=>{"use strict";var sr=ii&&ii.__awaiter||function(i,e,t,r){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?s(u.value):n(u.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};Object.defineProperty(ii,"__esModule",{value:!0});ii.SocksClientError=ii.SocksClient=void 0;var KS=require("events"),or=require("net"),it=zp(),N=_l(),lt=vm(),zS=_m(),Nl=wl();Object.defineProperty(ii,"SocksClientError",{enumerable:!0,get:function(){return Nl.SocksClientError}});var Tl=Cl(),Bl=class i extends KS.EventEmitter{constructor(e){super(),this.options=Object.assign({},e),(0,lt.validateSocksClientOptions)(e),this.setState(N.SocksClientState.Created)}static createConnection(e,t){return new Promise((r,n)=>{try{(0,lt.validateSocksClientOptions)(e,["connect"])}catch(o){return typeof t=="function"?(t(o),r(o)):n(o)}let s=new i(e);s.connect(e.existing_socket),s.once("established",o=>{s.removeAllListeners(),typeof t=="function"&&t(null,o),r(o)}),s.once("error",o=>{s.removeAllListeners(),typeof t=="function"?(t(o),r(o)):n(o)})})}static createConnectionChain(e,t){return new Promise((r,n)=>sr(this,void 0,void 0,function*(){try{(0,lt.validateSocksClientChainOptions)(e)}catch(s){return typeof t=="function"?(t(s),r(s)):n(s)}e.randomizeChain&&(0,Nl.shuffleArray)(e.proxies);try{let s;for(let o=0;o<e.proxies.length;o++){let a=e.proxies[o],l=o===e.proxies.length-1?e.destination:{host:e.proxies[o+1].host||e.proxies[o+1].ipaddress,port:e.proxies[o+1].port},c=yield i.createConnection({command:"connect",proxy:a,destination:l,existing_socket:s});s=s||c.socket}typeof t=="function"?(t(null,{socket:s}),r({socket:s})):r({socket:s})}catch(s){typeof t=="function"?(t(s),r(s)):n(s)}}))}static createUDPFrame(e){let t=new it.SmartBuffer;return t.writeUInt16BE(0),t.writeUInt8(e.frameNumber||0),or.isIPv4(e.remoteHost.host)?(t.writeUInt8(N.Socks5HostType.IPv4),t.writeUInt32BE((0,lt.ipv4ToInt32)(e.remoteHost.host))):or.isIPv6(e.remoteHost.host)?(t.writeUInt8(N.Socks5HostType.IPv6),t.writeBuffer((0,lt.ipToBuffer)(e.remoteHost.host))):(t.writeUInt8(N.Socks5HostType.Hostname),t.writeUInt8(Buffer.byteLength(e.remoteHost.host)),t.writeString(e.remoteHost.host)),t.writeUInt16BE(e.remoteHost.port),t.writeBuffer(e.data),t.toBuffer()}static parseUDPFrame(e){let t=it.SmartBuffer.fromBuffer(e);t.readOffset=2;let r=t.readUInt8(),n=t.readUInt8(),s;n===N.Socks5HostType.IPv4?s=(0,lt.int32ToIpv4)(t.readUInt32BE()):n===N.Socks5HostType.IPv6?s=Tl.Address6.fromByteArray(Array.from(t.readBuffer(16))).canonicalForm():s=t.readString(t.readUInt8());let o=t.readUInt16BE();return{frameNumber:r,remoteHost:{host:s,port:o},data:t.readBuffer()}}setState(e){this.state!==N.SocksClientState.Error&&(this.state=e)}connect(e){this.onDataReceived=r=>this.onDataReceivedHandler(r),this.onClose=()=>this.onCloseHandler(),this.onError=r=>this.onErrorHandler(r),this.onConnect=()=>this.onConnectHandler();let t=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||N.DEFAULT_TIMEOUT);t.unref&&typeof t.unref=="function"&&t.unref(),e?this.socket=e:this.socket=new or.Socket,this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(N.SocksClientState.Connecting),this.receiveBuffer=new zS.ReceiveBuffer,e?this.socket.emit("connect"):(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null&&this.socket.setNoDelay(!!this.options.set_tcp_nodelay)),this.prependOnceListener("established",r=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let n=this.receiveBuffer.get(this.receiveBuffer.length);r.socket.emit("data",n)}r.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){this.state!==N.SocksClientState.Established&&this.state!==N.SocksClientState.BoundWaitingForConnection&&this.closeSocket(N.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){this.setState(N.SocksClientState.Connected),this.options.proxy.type===4?this.sendSocks4InitialHandshake():this.sendSocks5InitialHandshake(),this.setState(N.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e),this.processData()}processData(){for(;this.state!==N.SocksClientState.Established&&this.state!==N.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize;)if(this.state===N.SocksClientState.SentInitialHandshake)this.options.proxy.type===4?this.handleSocks4FinalHandshakeResponse():this.handleInitialSocks5HandshakeResponse();else if(this.state===N.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===N.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===N.SocksClientState.BoundWaitingForConnection)this.options.proxy.type===4?this.handleSocks4IncomingConnectionResponse():this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(N.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(N.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(e){this.state!==N.SocksClientState.Error&&(this.setState(N.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new Nl.SocksClientError(e,this.options)))}sendSocks4InitialHandshake(){let e=this.options.proxy.userId||"",t=new it.SmartBuffer;t.writeUInt8(4),t.writeUInt8(N.SocksCommand[this.options.command]),t.writeUInt16BE(this.options.destination.port),or.isIPv4(this.options.destination.host)?(t.writeBuffer((0,lt.ipToBuffer)(this.options.destination.host)),t.writeStringNT(e)):(t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(1),t.writeStringNT(e),t.writeStringNT(this.options.destination.host)),this.nextRequiredPacketBufferSize=N.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(t.toBuffer())}handleSocks4FinalHandshakeResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==N.Socks4Response.Granted)this.closeSocket(`${N.ERRORS.Socks4ProxyRejectedConnection} - (${N.Socks4Response[e[1]]})`);else if(N.SocksCommand[this.options.command]===N.SocksCommand.bind){let t=it.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,lt.int32ToIpv4)(t.readUInt32BE())};r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress),this.setState(N.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:r,socket:this.socket})}else this.setState(N.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==N.Socks4Response.Granted)this.closeSocket(`${N.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${N.Socks4Response[e[1]]})`);else{let t=it.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,lt.int32ToIpv4)(t.readUInt32BE())};this.setState(N.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}sendSocks5InitialHandshake(){let e=new it.SmartBuffer,t=[N.Socks5Auth.NoAuth];(this.options.proxy.userId||this.options.proxy.password)&&t.push(N.Socks5Auth.UserPass),this.options.proxy.custom_auth_method!==void 0&&t.push(this.options.proxy.custom_auth_method),e.writeUInt8(5),e.writeUInt8(t.length);for(let r of t)e.writeUInt8(r);this.nextRequiredPacketBufferSize=N.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(e.toBuffer()),this.setState(N.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let e=this.receiveBuffer.get(2);e[0]!==5?this.closeSocket(N.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion):e[1]===N.SOCKS5_NO_ACCEPTABLE_AUTH?this.closeSocket(N.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType):e[1]===N.Socks5Auth.NoAuth?(this.socks5ChosenAuthType=N.Socks5Auth.NoAuth,this.sendSocks5CommandRequest()):e[1]===N.Socks5Auth.UserPass?(this.socks5ChosenAuthType=N.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication()):e[1]===this.options.proxy.custom_auth_method?(this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication()):this.closeSocket(N.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let e=this.options.proxy.userId||"",t=this.options.proxy.password||"",r=new it.SmartBuffer;r.writeUInt8(1),r.writeUInt8(Buffer.byteLength(e)),r.writeString(e),r.writeUInt8(Buffer.byteLength(t)),r.writeString(t),this.nextRequiredPacketBufferSize=N.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(r.toBuffer()),this.setState(N.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return sr(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(N.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(e){return sr(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(e)})}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return sr(this,void 0,void 0,function*(){return e[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(e){return sr(this,void 0,void 0,function*(){return e[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return sr(this,void 0,void 0,function*(){this.setState(N.SocksClientState.ReceivedAuthenticationResponse);let e=!1;this.socks5ChosenAuthType===N.Socks5Auth.NoAuth?e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===N.Socks5Auth.UserPass?e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===this.options.proxy.custom_auth_method&&(e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))),e?this.sendSocks5CommandRequest():this.closeSocket(N.ERRORS.Socks5AuthenticationFailed)})}sendSocks5CommandRequest(){let e=new it.SmartBuffer;e.writeUInt8(5),e.writeUInt8(N.SocksCommand[this.options.command]),e.writeUInt8(0),or.isIPv4(this.options.destination.host)?(e.writeUInt8(N.Socks5HostType.IPv4),e.writeBuffer((0,lt.ipToBuffer)(this.options.destination.host))):or.isIPv6(this.options.destination.host)?(e.writeUInt8(N.Socks5HostType.IPv6),e.writeBuffer((0,lt.ipToBuffer)(this.options.destination.host))):(e.writeUInt8(N.Socks5HostType.Hostname),e.writeUInt8(this.options.destination.host.length),e.writeString(this.options.destination.host)),e.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(e.toBuffer()),this.setState(N.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==N.Socks5Response.Granted)this.closeSocket(`${N.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${N.Socks5Response[e[1]]}`);else{let t=e[3],r,n;if(t===N.Socks5HostType.IPv4){let s=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=it.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),r={host:(0,lt.int32ToIpv4)(n.readUInt32BE()),port:n.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===N.Socks5HostType.Hostname){let s=e[4],o=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(s);if(this.receiveBuffer.length<o){this.nextRequiredPacketBufferSize=o;return}n=it.SmartBuffer.fromBuffer(this.receiveBuffer.get(o).slice(5)),r={host:n.readString(s),port:n.readUInt16BE()}}else if(t===N.Socks5HostType.IPv6){let s=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=it.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),r={host:Tl.Address6.fromByteArray(Array.from(n.readBuffer(16))).canonicalForm(),port:n.readUInt16BE()}}this.setState(N.SocksClientState.ReceivedFinalResponse),N.SocksCommand[this.options.command]===N.SocksCommand.connect?(this.setState(N.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})):N.SocksCommand[this.options.command]===N.SocksCommand.bind?(this.setState(N.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:r,socket:this.socket})):N.SocksCommand[this.options.command]===N.SocksCommand.associate&&(this.setState(N.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket}))}}handleSocks5IncomingConnectionResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==N.Socks5Response.Granted)this.closeSocket(`${N.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${N.Socks5Response[e[1]]}`);else{let t=e[3],r,n;if(t===N.Socks5HostType.IPv4){let s=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=it.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),r={host:(0,lt.int32ToIpv4)(n.readUInt32BE()),port:n.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===N.Socks5HostType.Hostname){let s=e[4],o=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(s);if(this.receiveBuffer.length<o){this.nextRequiredPacketBufferSize=o;return}n=it.SmartBuffer.fromBuffer(this.receiveBuffer.get(o).slice(5)),r={host:n.readString(s),port:n.readUInt16BE()}}else if(t===N.Socks5HostType.IPv6){let s=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=it.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),r={host:Tl.Address6.fromByteArray(Array.from(n.readBuffer(16))).canonicalForm(),port:n.readUInt16BE()}}this.setState(N.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}};ii.SocksClient=Bl});var wm=w(ki=>{"use strict";var JS=ki&&ki.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),ZS=ki&&ki.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&JS(e,i,t)};Object.defineProperty(ki,"__esModule",{value:!0});ZS(bm(),ki)});var xm=w(vt=>{"use strict";var QS=vt&&vt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),XS=vt&&vt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),Pl=vt&&vt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&QS(e,i,t);return XS(e,i),e},e1=vt&&vt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(vt,"__esModule",{value:!0});vt.SocksProxyAgent=void 0;var t1=wm(),i1=Oa(),r1=e1(Fr()),n1=Pl(require("dns")),s1=Pl(require("net")),o1=Pl(require("tls")),a1=require("url"),_s=(0,r1.default)("socks-proxy-agent"),l1=i=>i.servername===void 0&&i.host&&!s1.isIP(i.host)?{...i,servername:i.host}:i;function c1(i){let e=!1,t=5,r=i.hostname,n=parseInt(i.port,10)||1080;switch(i.protocol.replace(":","")){case"socks4":e=!0,t=4;break;case"socks4a":t=4;break;case"socks5":e=!0,t=5;break;case"socks":t=5;break;case"socks5h":t=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${String(i.protocol)}`)}let s={host:r,port:n,type:t};return i.username&&Object.defineProperty(s,"userId",{value:decodeURIComponent(i.username),enumerable:!1}),i.password!=null&&Object.defineProperty(s,"password",{value:decodeURIComponent(i.password),enumerable:!1}),{lookup:e,proxy:s}}var bs=class extends i1.Agent{constructor(e,t){var o,a;super(t);let r=typeof e=="string"?new a1.URL(e):e,{proxy:n,lookup:s}=c1(r);this.shouldLookup=s,this.proxy=n,this.timeout=(o=t==null?void 0:t.timeout)!=null?o:null,this.socketOptions=(a=t==null?void 0:t.socketOptions)!=null?a:null}async connect(e,t){var h;let{shouldLookup:r,proxy:n,timeout:s}=this;if(!t.host)throw new Error("No `host` defined!");let{host:o}=t,{port:a,lookup:l=n1.lookup}=t;r&&(o=await new Promise((p,m)=>{l(o,{},(d,g)=>{d?m(d):p(g)})}));let c={proxy:n,destination:{host:o,port:typeof a=="number"?a:parseInt(a,10)},command:"connect",timeout:s!=null?s:void 0,socket_options:(h=this.socketOptions)!=null?h:void 0},u=p=>{e.destroy(),f.destroy(),p&&p.destroy()};_s("Creating socks proxy connection: %o",c);let{socket:f}=await t1.SocksClient.createConnection(c);if(_s("Successfully created socks proxy connection"),s!==null&&(f.setTimeout(s),f.on("timeout",()=>u())),t.secureEndpoint){_s("Upgrading socket connection to TLS");let p=o1.connect({...u1(l1(t),"host","path","port"),socket:f});return p.once("error",m=>{_s("Socket TLS error",m.message),u(p)}),p}return f}};bs.protocols=["socks","socks4","socks4a","socks5","socks5h"];vt.SocksProxyAgent=bs;function u1(i,...e){let t={},r;for(r in i)e.includes(r)||(t[r]=i[r]);return t}});var Wt=w((C2,Om)=>{"use strict";var Sm=["nodebuffer","arraybuffer","fragments"],Em=typeof Blob!="undefined";Em&&Sm.push("blob");Om.exports={BINARY_TYPES:Sm,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Em,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Kr=w((A2,ws)=>{"use strict";var{EMPTY_BUFFER:f1}=Wt(),Ll=Buffer[Symbol.species];function h1(i,e){if(i.length===0)return f1;if(i.length===1)return i[0];let t=Buffer.allocUnsafe(e),r=0;for(let n=0;n<i.length;n++){let s=i[n];t.set(s,r),r+=s.length}return r<e?new Ll(t.buffer,t.byteOffset,r):t}function km(i,e,t,r,n){for(let s=0;s<n;s++)t[r+s]=i[s]^e[s&3]}function Cm(i,e){for(let t=0;t<i.length;t++)i[t]^=e[t&3]}function d1(i){return i.length===i.buffer.byteLength?i.buffer:i.buffer.slice(i.byteOffset,i.byteOffset+i.length)}function Rl(i){if(Rl.readOnly=!0,Buffer.isBuffer(i))return i;let e;return i instanceof ArrayBuffer?e=new Ll(i):ArrayBuffer.isView(i)?e=new Ll(i.buffer,i.byteOffset,i.byteLength):(e=Buffer.from(i),Rl.readOnly=!1),e}ws.exports={concat:h1,mask:km,toArrayBuffer:d1,toBuffer:Rl,unmask:Cm};if(!process.env.WS_NO_BUFFER_UTIL)try{let i=require("bufferutil");ws.exports.mask=function(e,t,r,n,s){s<48?km(e,t,r,n,s):i.mask(e,t,r,n,s)},ws.exports.unmask=function(e,t){e.length<32?Cm(e,t):i.unmask(e,t)}}catch{}});var Tm=w((I2,Im)=>{"use strict";var Am=Symbol("kDone"),Ml=Symbol("kRun"),Fl=class{constructor(e){this[Am]=()=>{this.pending--,this[Ml]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Ml]()}[Ml](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Am])}}};Im.exports=Fl});var cr=w((T2,Lm)=>{"use strict";var zr=require("zlib"),Nm=Kr(),p1=Tm(),{kStatusCode:Bm}=Wt(),m1=Buffer[Symbol.species],g1=Buffer.from([0,0,255,255]),Ss=Symbol("permessage-deflate"),Gt=Symbol("total-length"),ar=Symbol("callback"),ri=Symbol("buffers"),lr=Symbol("error"),xs,ql=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!xs){let t=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;xs=new p1(t)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[ar];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,r=e.find(n=>!(t.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>n.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(r.server_no_context_takeover=!0),t.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(r.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?r.client_max_window_bits=t.clientMaxWindowBits:(r.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return t}normalizeParams(e){return e.forEach(t=>{Object.keys(t).forEach(r=>{let n=t[r];if(n.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(n=n[0],r==="client_max_window_bits"){if(n!==!0){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${n}`);n=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${n}`)}else if(r==="server_max_window_bits"){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${n}`);n=s}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${n}`)}else throw new Error(`Unknown parameter "${r}"`);t[r]=n})}),e}decompress(e,t,r){xs.add(n=>{this._decompress(e,t,(s,o)=>{n(),r(s,o)})})}compress(e,t,r){xs.add(n=>{this._compress(e,t,(s,o)=>{n(),r(s,o)})})}_decompress(e,t,r){let n=this._isServer?"client":"server";if(!this._inflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?zr.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=zr.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[Ss]=this,this._inflate[Gt]=0,this._inflate[ri]=[],this._inflate.on("error",v1),this._inflate.on("data",Pm)}this._inflate[ar]=r,this._inflate.write(e),t&&this._inflate.write(g1),this._inflate.flush(()=>{let s=this._inflate[lr];if(s){this._inflate.close(),this._inflate=null,r(s);return}let o=Nm.concat(this._inflate[ri],this._inflate[Gt]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Gt]=0,this._inflate[ri]=[],t&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,t,r){let n=this._isServer?"server":"client";if(!this._deflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?zr.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=zr.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[Gt]=0,this._deflate[ri]=[],this._deflate.on("data",y1)}this._deflate[ar]=r,this._deflate.write(e),this._deflate.flush(zr.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=Nm.concat(this._deflate[ri],this._deflate[Gt]);t&&(s=new m1(s.buffer,s.byteOffset,s.length-4)),this._deflate[ar]=null,this._deflate[Gt]=0,this._deflate[ri]=[],t&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),r(null,s)})}};Lm.exports=ql;function y1(i){this[ri].push(i),this[Gt]+=i.length}function Pm(i){if(this[Gt]+=i.length,this[Ss]._maxPayload<1||this[Gt]<=this[Ss]._maxPayload){this[ri].push(i);return}this[lr]=new RangeError("Max payload size exceeded"),this[lr].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[lr][Bm]=1009,this.removeListener("data",Pm),this.reset()}function v1(i){if(this[Ss]._inflate=null,this[lr]){this[ar](this[lr]);return}i[Bm]=1007,this[ar](i)}});var ur=w((N2,Es)=>{"use strict";var{isUtf8:Rm}=require("buffer"),{hasBlob:_1}=Wt(),b1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function w1(i){return i>=1e3&&i<=1014&&i!==1004&&i!==1005&&i!==1006||i>=3e3&&i<=4999}function Dl(i){let e=i.length,t=0;for(;t<e;)if((i[t]&128)===0)t++;else if((i[t]&224)===192){if(t+1===e||(i[t+1]&192)!==128||(i[t]&254)===192)return!1;t+=2}else if((i[t]&240)===224){if(t+2>=e||(i[t+1]&192)!==128||(i[t+2]&192)!==128||i[t]===224&&(i[t+1]&224)===128||i[t]===237&&(i[t+1]&224)===160)return!1;t+=3}else if((i[t]&248)===240){if(t+3>=e||(i[t+1]&192)!==128||(i[t+2]&192)!==128||(i[t+3]&192)!==128||i[t]===240&&(i[t+1]&240)===128||i[t]===244&&i[t+1]>143||i[t]>244)return!1;t+=4}else return!1;return!0}function x1(i){return _1&&typeof i=="object"&&typeof i.arrayBuffer=="function"&&typeof i.type=="string"&&typeof i.stream=="function"&&(i[Symbol.toStringTag]==="Blob"||i[Symbol.toStringTag]==="File")}Es.exports={isBlob:x1,isValidStatusCode:w1,isValidUTF8:Dl,tokenChars:b1};if(Rm)Es.exports.isValidUTF8=function(i){return i.length<24?Dl(i):Rm(i)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let i=require("utf-8-validate");Es.exports.isValidUTF8=function(e){return e.length<32?Dl(e):i(e)}}catch{}});var Hl=w((B2,$m)=>{"use strict";var{Writable:S1}=require("stream"),Mm=cr(),{BINARY_TYPES:E1,EMPTY_BUFFER:Fm,kStatusCode:O1,kWebSocket:k1}=Wt(),{concat:Ul,toArrayBuffer:C1,unmask:A1}=Kr(),{isValidStatusCode:I1,isValidUTF8:qm}=ur(),Os=Buffer[Symbol.species],_t=0,Dm=1,Um=2,jm=3,jl=4,$l=5,ks=6,Vl=class extends S1{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||E1[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[k1]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=_t}_write(e,t,r){if(this._opcode===8&&this._state==_t)return r();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){r(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new Os(r.buffer,r.byteOffset+e,r.length-e),new Os(r.buffer,r.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let r=this._buffers[0],n=t.length-e;e>=r.length?t.set(this._buffers.shift(),n):(t.set(new Uint8Array(r.buffer,r.byteOffset,e),n),this._buffers[0]=new Os(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case _t:this.getInfo(e);break;case Dm:this.getPayloadLength16(e);break;case Um:this.getPayloadLength64(e);break;case jm:this.getMask();break;case jl:this.getData(e);break;case $l:case ks:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if((t[0]&48)!==0){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(n);return}let r=(t[0]&64)===64;if(r&&!this._extensions[Mm.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(r){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(n);return}if(r){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(n);return}this._payloadLength===126?this._state=Dm:this._payloadLength===127?this._state=Um:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),r=t.readUInt32BE(0);if(r>Math.pow(2,21)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(n);return}this._payloadLength=r*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(t);return}this._masked?this._state=jm:this._state=jl}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=jl}getData(e){let t=Fm;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&A1(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=$l,this.decompress(t,e);return}if(t.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let r=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");e(r);return}this._messageLength=this._totalPayloadLength,this._fragments.push(t)}this.dataMessage(e)}decompress(e,t){this._extensions[Mm.extensionName].decompress(e,this._fin,(n,s)=>{if(n)return t(n);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(o);return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let o=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");t(o);return}this._fragments.push(s)}this.dataMessage(t),this._state===_t&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=_t;return}let t=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=Ul(r,t):this._binaryType==="arraybuffer"?n=C1(Ul(r,t)):this._binaryType==="blob"?n=new Blob(r):n=r,this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=_t):(this._state=ks,setImmediate(()=>{this.emit("message",n,!0),this._state=_t,this.startLoop(e)}))}else{let n=Ul(r,t);if(!this._skipUTF8Validation&&!qm(n)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(s);return}this._state===$l||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=_t):(this._state=ks,setImmediate(()=>{this.emit("message",n,!1),this._state=_t,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Fm),this.end();else{let r=e.readUInt16BE(0);if(!I1(r)){let s=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(s);return}let n=new Os(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!qm(n)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(s);return}this._loop=!1,this.emit("conclude",r,n),this.end()}this._state=_t;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=_t):(this._state=ks,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=_t,this.startLoop(t)}))}createError(e,t,r,n,s){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=s,o[O1]=n,o}};$m.exports=Vl});var Yl=w((L2,Wm)=>{"use strict";var{Duplex:P2}=require("stream"),{randomFillSync:T1}=require("crypto"),{types:{isUint8Array:N1}}=require("util"),Vm=cr(),{EMPTY_BUFFER:B1,kWebSocket:P1,NOOP:L1}=Wt(),{isBlob:fr,isValidStatusCode:R1}=ur(),{mask:Hm,toBuffer:Ci}=Kr(),bt=Symbol("kByteLength"),M1=Buffer.alloc(4),Cs=8*1024,Ai,hr=Cs,kt=0,F1=1,q1=2,Wl=class i{constructor(e,t,r){this._extensions=t||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=kt,this.onerror=L1,this[P1]=void 0}static frame(e,t){let r,n=!1,s=2,o=!1;t.mask&&(r=t.maskBuffer||M1,t.generateMask?t.generateMask(r):(hr===Cs&&(Ai===void 0&&(Ai=Buffer.alloc(Cs)),T1(Ai,0,Cs),hr=0),r[0]=Ai[hr++],r[1]=Ai[hr++],r[2]=Ai[hr++],r[3]=Ai[hr++]),o=(r[0]|r[1]|r[2]|r[3])===0,s=6);let a;typeof e=="string"?(!t.mask||o)&&t[bt]!==void 0?a=t[bt]:(e=Buffer.from(e),a=e.length):(a=e.length,n=t.mask&&t.readOnly&&!o);let l=a;a>=65536?(s+=8,l=127):a>125&&(s+=2,l=126);let c=Buffer.allocUnsafe(n?a+s:s);return c[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(c[0]|=64),c[1]=l,l===126?c.writeUInt16BE(a,2):l===127&&(c[2]=c[3]=0,c.writeUIntBE(a,4,6)),t.mask?(c[1]|=128,c[s-4]=r[0],c[s-3]=r[1],c[s-2]=r[2],c[s-1]=r[3],o?[c,e]:n?(Hm(e,r,c,s,a),[c]):(Hm(e,r,e,0,a),[c,e])):[c,e]}close(e,t,r,n){let s;if(e===void 0)s=B1;else{if(typeof e!="number"||!R1(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let a=Buffer.byteLength(t);if(a>123)throw new RangeError("The message must not be greater than 123 bytes");if(s=Buffer.allocUnsafe(2+a),s.writeUInt16BE(e,0),typeof t=="string")s.write(t,2);else if(N1(t))s.set(t,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let o={[bt]:s.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==kt?this.enqueue([this.dispatch,s,!1,o,n]):this.sendFrame(i.frame(s,o),n)}ping(e,t,r){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):fr(e)?(n=e.size,s=!1):(e=Ci(e),n=e.length,s=Ci.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[bt]:n,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};fr(e)?this._state!==kt?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==kt?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(i.frame(e,o),r)}pong(e,t,r){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):fr(e)?(n=e.size,s=!1):(e=Ci(e),n=e.length,s=Ci.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[bt]:n,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};fr(e)?this._state!==kt?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==kt?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(i.frame(e,o),r)}send(e,t,r){let n=this._extensions[Vm.extensionName],s=t.binary?2:1,o=t.compress,a,l;typeof e=="string"?(a=Buffer.byteLength(e),l=!1):fr(e)?(a=e.size,l=!1):(e=Ci(e),a=e.length,l=Ci.readOnly),this._firstFragment?(this._firstFragment=!1,o&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=a>=n._threshold),this._compress=o):(o=!1,s=0),t.fin&&(this._firstFragment=!0);let c={[bt]:a,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:l,rsv1:o};fr(e)?this._state!==kt?this.enqueue([this.getBlobData,e,this._compress,c,r]):this.getBlobData(e,this._compress,c,r):this._state!==kt?this.enqueue([this.dispatch,e,this._compress,c,r]):this.dispatch(e,this._compress,c,r)}getBlobData(e,t,r,n){this._bufferedBytes+=r[bt],this._state=q1,e.arrayBuffer().then(s=>{if(this._socket.destroyed){let a=new Error("The socket was closed while the blob was being read");process.nextTick(Gl,this,a,n);return}this._bufferedBytes-=r[bt];let o=Ci(s);t?this.dispatch(o,t,r,n):(this._state=kt,this.sendFrame(i.frame(o,r),n),this.dequeue())}).catch(s=>{process.nextTick(D1,this,s,n)})}dispatch(e,t,r,n){if(!t){this.sendFrame(i.frame(e,r),n);return}let s=this._extensions[Vm.extensionName];this._bufferedBytes+=r[bt],this._state=F1,s.compress(e,r.fin,(o,a)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");Gl(this,l,n);return}this._bufferedBytes-=r[bt],this._state=kt,r.readOnly=!1,this.sendFrame(i.frame(a,r),n),this.dequeue()})}dequeue(){for(;this._state===kt&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][bt],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][bt],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};Wm.exports=Wl;function Gl(i,e,t){typeof t=="function"&&t(e);for(let r=0;r<i._queue.length;r++){let n=i._queue[r],s=n[n.length-1];typeof s=="function"&&s(e)}}function D1(i,e,t){Gl(i,e,t),i.onerror(e)}});var eg=w((R2,Xm)=>{"use strict";var{kForOnEventAttribute:Jr,kListener:Kl}=Wt(),Gm=Symbol("kCode"),Ym=Symbol("kData"),Km=Symbol("kError"),zm=Symbol("kMessage"),Jm=Symbol("kReason"),dr=Symbol("kTarget"),Zm=Symbol("kType"),Qm=Symbol("kWasClean"),Yt=class{constructor(e){this[dr]=null,this[Zm]=e}get target(){return this[dr]}get type(){return this[Zm]}};Object.defineProperty(Yt.prototype,"target",{enumerable:!0});Object.defineProperty(Yt.prototype,"type",{enumerable:!0});var Ii=class extends Yt{constructor(e,t={}){super(e),this[Gm]=t.code===void 0?0:t.code,this[Jm]=t.reason===void 0?"":t.reason,this[Qm]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Gm]}get reason(){return this[Jm]}get wasClean(){return this[Qm]}};Object.defineProperty(Ii.prototype,"code",{enumerable:!0});Object.defineProperty(Ii.prototype,"reason",{enumerable:!0});Object.defineProperty(Ii.prototype,"wasClean",{enumerable:!0});var pr=class extends Yt{constructor(e,t={}){super(e),this[Km]=t.error===void 0?null:t.error,this[zm]=t.message===void 0?"":t.message}get error(){return this[Km]}get message(){return this[zm]}};Object.defineProperty(pr.prototype,"error",{enumerable:!0});Object.defineProperty(pr.prototype,"message",{enumerable:!0});var Zr=class extends Yt{constructor(e,t={}){super(e),this[Ym]=t.data===void 0?null:t.data}get data(){return this[Ym]}};Object.defineProperty(Zr.prototype,"data",{enumerable:!0});var U1={addEventListener(i,e,t={}){for(let n of this.listeners(i))if(!t[Jr]&&n[Kl]===e&&!n[Jr])return;let r;if(i==="message")r=function(s,o){let a=new Zr("message",{data:o?s:s.toString()});a[dr]=this,As(e,this,a)};else if(i==="close")r=function(s,o){let a=new Ii("close",{code:s,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[dr]=this,As(e,this,a)};else if(i==="error")r=function(s){let o=new pr("error",{error:s,message:s.message});o[dr]=this,As(e,this,o)};else if(i==="open")r=function(){let s=new Yt("open");s[dr]=this,As(e,this,s)};else return;r[Jr]=!!t[Jr],r[Kl]=e,t.once?this.once(i,r):this.on(i,r)},removeEventListener(i,e){for(let t of this.listeners(i))if(t[Kl]===e&&!t[Jr]){this.removeListener(i,t);break}}};Xm.exports={CloseEvent:Ii,ErrorEvent:pr,Event:Yt,EventTarget:U1,MessageEvent:Zr};function As(i,e,t){typeof i=="object"&&i.handleEvent?i.handleEvent.call(i,t):i.call(e,t)}});var Is=w((M2,tg)=>{"use strict";var{tokenChars:Qr}=ur();function Mt(i,e,t){i[e]===void 0?i[e]=[t]:i[e].push(t)}function j1(i){let e=Object.create(null),t=Object.create(null),r=!1,n=!1,s=!1,o,a,l=-1,c=-1,u=-1,f=0;for(;f<i.length;f++)if(c=i.charCodeAt(f),o===void 0)if(u===-1&&Qr[c]===1)l===-1&&(l=f);else if(f!==0&&(c===32||c===9))u===-1&&l!==-1&&(u=f);else if(c===59||c===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1&&(u=f);let p=i.slice(l,u);c===44?(Mt(e,p,t),t=Object.create(null)):o=p,l=u=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);else if(a===void 0)if(u===-1&&Qr[c]===1)l===-1&&(l=f);else if(c===32||c===9)u===-1&&l!==-1&&(u=f);else if(c===59||c===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1&&(u=f),Mt(t,i.slice(l,u),!0),c===44&&(Mt(e,o,t),t=Object.create(null),o=void 0),l=u=-1}else if(c===61&&l!==-1&&u===-1)a=i.slice(l,f),l=u=-1;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(n){if(Qr[c]!==1)throw new SyntaxError(`Unexpected character at index ${f}`);l===-1?l=f:r||(r=!0),n=!1}else if(s)if(Qr[c]===1)l===-1&&(l=f);else if(c===34&&l!==-1)s=!1,u=f;else if(c===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(c===34&&i.charCodeAt(f-1)===61)s=!0;else if(u===-1&&Qr[c]===1)l===-1&&(l=f);else if(l!==-1&&(c===32||c===9))u===-1&&(u=f);else if(c===59||c===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1&&(u=f);let p=i.slice(l,u);r&&(p=p.replace(/\\/g,""),r=!1),Mt(t,a,p),c===44&&(Mt(e,o,t),t=Object.create(null),o=void 0),a=void 0,l=u=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);if(l===-1||s||c===32||c===9)throw new SyntaxError("Unexpected end of input");u===-1&&(u=f);let h=i.slice(l,u);return o===void 0?Mt(e,h,t):(a===void 0?Mt(t,h,!0):r?Mt(t,a,h.replace(/\\/g,"")):Mt(t,a,h),Mt(e,o,t)),e}function $1(i){return Object.keys(i).map(e=>{let t=i[e];return Array.isArray(t)||(t=[t]),t.map(r=>[e].concat(Object.keys(r).map(n=>{let s=r[n];return Array.isArray(s)||(s=[s]),s.map(o=>o===!0?n:`${n}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}tg.exports={format:$1,parse:j1}});var Ps=w((D2,dg)=>{"use strict";var V1=require("events"),H1=require("https"),W1=require("http"),ng=require("net"),G1=require("tls"),{randomBytes:Y1,createHash:K1}=require("crypto"),{Duplex:F2,Readable:q2}=require("stream"),{URL:zl}=require("url"),ni=cr(),z1=Hl(),J1=Yl(),{isBlob:Z1}=ur(),{BINARY_TYPES:ig,CLOSE_TIMEOUT:Q1,EMPTY_BUFFER:Ts,GUID:X1,kForOnEventAttribute:Jl,kListener:eE,kStatusCode:tE,kWebSocket:$e,NOOP:sg}=Wt(),{EventTarget:{addEventListener:iE,removeEventListener:rE}}=eg(),{format:nE,parse:sE}=Is(),{toBuffer:oE}=Kr(),og=Symbol("kAborted"),Zl=[8,13],Kt=["CONNECTING","OPEN","CLOSING","CLOSED"],aE=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,ke=class i extends V1{constructor(e,t,r){super(),this._binaryType=ig[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Ts,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=i.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,t===void 0?t=[]:Array.isArray(t)||(typeof t=="object"&&t!==null?(r=t,t=[]):t=[t]),ag(this,e,t,r)):(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){ig.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,r){let n=new z1({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),s=new J1(e,this._extensions,r.generateMask);this._receiver=n,this._sender=s,this._socket=e,n[$e]=this,s[$e]=this,e[$e]=this,n.on("conclude",uE),n.on("drain",fE),n.on("error",hE),n.on("message",dE),n.on("ping",pE),n.on("pong",mE),s.onerror=gE,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",ug),e.on("data",Bs),e.on("end",fg),e.on("error",hg),this._readyState=i.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=i.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[ni.extensionName]&&this._extensions[ni.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=i.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==i.CLOSED){if(this.readyState===i.CONNECTING){ct(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===i.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=i.CLOSING,this._sender.close(e,t,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),cg(this)}}pause(){this.readyState===i.CONNECTING||this.readyState===i.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,r){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=t=void 0):typeof t=="function"&&(r=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){Ql(this,e,r);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||Ts,t,r)}pong(e,t,r){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=t=void 0):typeof t=="function"&&(r=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){Ql(this,e,r);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||Ts,t,r)}resume(){this.readyState===i.CONNECTING||this.readyState===i.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,r){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(r=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){Ql(this,e,r);return}let n={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[ni.extensionName]||(n.compress=!1),this._sender.send(e||Ts,n,r)}terminate(){if(this.readyState!==i.CLOSED){if(this.readyState===i.CONNECTING){ct(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=i.CLOSING,this._socket.destroy())}}};Object.defineProperty(ke,"CONNECTING",{enumerable:!0,value:Kt.indexOf("CONNECTING")});Object.defineProperty(ke.prototype,"CONNECTING",{enumerable:!0,value:Kt.indexOf("CONNECTING")});Object.defineProperty(ke,"OPEN",{enumerable:!0,value:Kt.indexOf("OPEN")});Object.defineProperty(ke.prototype,"OPEN",{enumerable:!0,value:Kt.indexOf("OPEN")});Object.defineProperty(ke,"CLOSING",{enumerable:!0,value:Kt.indexOf("CLOSING")});Object.defineProperty(ke.prototype,"CLOSING",{enumerable:!0,value:Kt.indexOf("CLOSING")});Object.defineProperty(ke,"CLOSED",{enumerable:!0,value:Kt.indexOf("CLOSED")});Object.defineProperty(ke.prototype,"CLOSED",{enumerable:!0,value:Kt.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(i=>{Object.defineProperty(ke.prototype,i,{enumerable:!0})});["open","error","close","message"].forEach(i=>{Object.defineProperty(ke.prototype,`on${i}`,{enumerable:!0,get(){for(let e of this.listeners(i))if(e[Jl])return e[eE];return null},set(e){for(let t of this.listeners(i))if(t[Jl]){this.removeListener(i,t);break}typeof e=="function"&&this.addEventListener(i,e,{[Jl]:!0})}})});ke.prototype.addEventListener=iE;ke.prototype.removeEventListener=rE;dg.exports=ke;function ag(i,e,t,r){let n={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:Q1,protocolVersion:Zl[1],maxBufferedChunks:1048576,maxFragments:131072,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(i._autoPong=n.autoPong,i._closeTimeout=n.closeTimeout,!Zl.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${Zl.join(", ")})`);let s;if(e instanceof zl)s=e;else try{s=new zl(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),i._url=s.href;let o=s.protocol==="wss:",a=s.protocol==="ws+unix:",l;if(s.protocol!=="ws:"&&!o&&!a?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:a&&!s.pathname?l="The URL's pathname is empty":s.hash&&(l="The URL contains a fragment identifier"),l){let d=new SyntaxError(l);if(i._redirects===0)throw d;Ns(i,d);return}let c=o?443:80,u=Y1(16).toString("base64"),f=o?H1.request:W1.request,h=new Set,p;if(n.createConnection=n.createConnection||(o?cE:lE),n.defaultPort=n.defaultPort||c,n.port=s.port||c,n.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},n.path=s.pathname+s.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(p=new ni({...n.perMessageDeflate,isServer:!1,maxPayload:n.maxPayload}),n.headers["Sec-WebSocket-Extensions"]=nE({[ni.extensionName]:p.offer()})),t.length){for(let d of t){if(typeof d!="string"||!aE.test(d)||h.has(d))throw new SyntaxError("An invalid or duplicated subprotocol was specified");h.add(d)}n.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(s.username||s.password)&&(n.auth=`${s.username}:${s.password}`),a){let d=n.path.split(":");n.socketPath=d[0],n.path=d[1]}let m;if(n.followRedirects){if(i._redirects===0){i._originalIpc=a,i._originalSecure=o,i._originalHostOrSocketPath=a?n.socketPath:s.host;let d=r&&r.headers;if(r={...r,headers:{}},d)for(let[g,_]of Object.entries(d))r.headers[g.toLowerCase()]=_}else if(i.listenerCount("redirect")===0){let d=a?i._originalIpc?n.socketPath===i._originalHostOrSocketPath:!1:i._originalIpc?!1:s.host===i._originalHostOrSocketPath;(!d||i._originalSecure&&!o)&&(delete n.headers.authorization,delete n.headers.cookie,d||delete n.headers.host,n.auth=void 0)}n.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),m=i._req=f(n),i._redirects&&i.emit("redirect",i.url,m)}else m=i._req=f(n);n.timeout&&m.on("timeout",()=>{ct(i,m,"Opening handshake has timed out")}),m.on("error",d=>{m===null||m[og]||(m=i._req=null,Ns(i,d))}),m.on("response",d=>{let g=d.headers.location,_=d.statusCode;if(g&&n.followRedirects&&_>=300&&_<400){if(++i._redirects>n.maxRedirects){ct(i,m,"Maximum redirects exceeded");return}m.abort();let b;try{b=new zl(g,e)}catch{let x=new SyntaxError(`Invalid URL: ${g}`);Ns(i,x);return}ag(i,b,t,r)}else i.emit("unexpected-response",m,d)||ct(i,m,`Unexpected server response: ${d.statusCode}`)}),m.on("upgrade",(d,g,_)=>{if(i.emit("upgrade",d),i.readyState!==ke.CONNECTING)return;m=i._req=null;let b=d.headers.upgrade;if(b===void 0||b.toLowerCase()!=="websocket"){ct(i,g,"Invalid Upgrade header");return}let y=K1("sha1").update(u+X1).digest("base64");if(d.headers["sec-websocket-accept"]!==y){ct(i,g,"Invalid Sec-WebSocket-Accept header");return}let x=d.headers["sec-websocket-protocol"],v;if(x!==void 0?h.size?h.has(x)||(v="Server sent an invalid subprotocol"):v="Server sent a subprotocol but none was requested":h.size&&(v="Server sent no subprotocol"),v){ct(i,g,v);return}x&&(i._protocol=x);let T=d.headers["sec-websocket-extensions"];if(T!==void 0){if(!p){ct(i,g,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let E;try{E=sE(T)}catch{ct(i,g,"Invalid Sec-WebSocket-Extensions header");return}let C=Object.keys(E);if(C.length!==1||C[0]!==ni.extensionName){ct(i,g,"Server indicated an extension that was not requested");return}try{p.accept(E[ni.extensionName])}catch{ct(i,g,"Invalid Sec-WebSocket-Extensions header");return}i._extensions[ni.extensionName]=p}i.setSocket(g,_,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxBufferedChunks:n.maxBufferedChunks,maxFragments:n.maxFragments,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(m,i):m.end()}function Ns(i,e){i._readyState=ke.CLOSING,i._errorEmitted=!0,i.emit("error",e),i.emitClose()}function lE(i){return i.path=i.socketPath,ng.connect(i)}function cE(i){return i.path=void 0,!i.servername&&i.servername!==""&&(i.servername=ng.isIP(i.host)?"":i.host),G1.connect(i)}function ct(i,e,t){i._readyState=ke.CLOSING;let r=new Error(t);Error.captureStackTrace(r,ct),e.setHeader?(e[og]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Ns,i,r)):(e.destroy(r),e.once("error",i.emit.bind(i,"error")),e.once("close",i.emitClose.bind(i)))}function Ql(i,e,t){if(e){let r=Z1(e)?e.size:oE(e).length;i._socket?i._sender._bufferedBytes+=r:i._bufferedAmount+=r}if(t){let r=new Error(`WebSocket is not open: readyState ${i.readyState} (${Kt[i.readyState]})`);process.nextTick(t,r)}}function uE(i,e){let t=this[$e];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=i,t._socket[$e]!==void 0&&(t._socket.removeListener("data",Bs),process.nextTick(lg,t._socket),i===1005?t.close():t.close(i,e))}function fE(){let i=this[$e];i.isPaused||i._socket.resume()}function hE(i){let e=this[$e];e._socket[$e]!==void 0&&(e._socket.removeListener("data",Bs),process.nextTick(lg,e._socket),e.close(i[tE])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",i))}function rg(){this[$e].emitClose()}function dE(i,e){this[$e].emit("message",i,e)}function pE(i){let e=this[$e];e._autoPong&&e.pong(i,!this._isServer,sg),e.emit("ping",i)}function mE(i){this[$e].emit("pong",i)}function lg(i){i.resume()}function gE(i){let e=this[$e];e.readyState!==ke.CLOSED&&(e.readyState===ke.OPEN&&(e._readyState=ke.CLOSING,cg(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",i)))}function cg(i){i._closeTimer=setTimeout(i._socket.destroy.bind(i._socket),i._closeTimeout)}function ug(){let i=this[$e];if(this.removeListener("close",ug),this.removeListener("data",Bs),this.removeListener("end",fg),i._readyState=ke.CLOSING,!this._readableState.endEmitted&&!i._closeFrameReceived&&!i._receiver._writableState.errorEmitted&&this._readableState.length!==0){let e=this.read(this._readableState.length);i._receiver.write(e)}i._receiver.end(),this[$e]=void 0,clearTimeout(i._closeTimer),i._receiver._writableState.finished||i._receiver._writableState.errorEmitted?i.emitClose():(i._receiver.on("error",rg),i._receiver.on("finish",rg))}function Bs(i){this[$e]._receiver.write(i)||this.pause()}function fg(){let i=this[$e];i._readyState=ke.CLOSING,i._receiver.end(),this.end()}function hg(){let i=this[$e];this.removeListener("error",hg),this.on("error",sg),i&&(i._readyState=ke.CLOSING,this.destroy())}});var yg=w((j2,gg)=>{"use strict";var U2=Ps(),{Duplex:yE}=require("stream");function pg(i){i.emit("close")}function vE(){!this.destroyed&&this._writableState.finished&&this.destroy()}function mg(i){this.removeListener("error",mg),this.destroy(),this.listenerCount("error")===0&&this.emit("error",i)}function _E(i,e){let t=!0,r=new yE({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return i.on("message",function(s,o){let a=!o&&r._readableState.objectMode?s.toString():s;r.push(a)||i.pause()}),i.once("error",function(s){r.destroyed||(t=!1,r.destroy(s))}),i.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(n,s){if(i.readyState===i.CLOSED){s(n),process.nextTick(pg,r);return}let o=!1;i.once("error",function(l){o=!0,s(l)}),i.once("close",function(){o||s(n),process.nextTick(pg,r)}),t&&i.terminate()},r._final=function(n){if(i.readyState===i.CONNECTING){i.once("open",function(){r._final(n)});return}i._socket!==null&&(i._socket._writableState.finished?(n(),r._readableState.endEmitted&&r.destroy()):(i._socket.once("finish",function(){n()}),i.close()))},r._read=function(){i.isPaused&&i.resume()},r._write=function(n,s,o){if(i.readyState===i.CONNECTING){i.once("open",function(){r._write(n,s,o)});return}i.send(n,o)},r.on("end",vE),r.on("error",mg),r}gg.exports=_E});var Xl=w(($2,vg)=>{"use strict";var{tokenChars:bE}=ur();function wE(i){let e=new Set,t=-1,r=-1,n=0;for(n;n<i.length;n++){let o=i.charCodeAt(n);if(r===-1&&bE[o]===1)t===-1&&(t=n);else if(n!==0&&(o===32||o===9))r===-1&&t!==-1&&(r=n);else if(o===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${n}`);r===-1&&(r=n);let a=i.slice(t,r);if(e.has(a))throw new SyntaxError(`The "${a}" subprotocol is duplicated`);e.add(a),t=r=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(t===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let s=i.slice(t,n);if(e.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return e.add(s),e}vg.exports={parse:wE}});var Og=w((H2,Eg)=>{"use strict";var xE=require("events"),Ls=require("http"),{Duplex:V2}=require("stream"),{createHash:SE}=require("crypto"),_g=Is(),Ti=cr(),EE=Xl(),OE=Ps(),{CLOSE_TIMEOUT:kE,GUID:CE,kWebSocket:AE}=Wt(),IE=/^[+/0-9A-Za-z]{22}==$/,bg=0,wg=1,Sg=2,ec=class extends xE{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1024*1024,maxFragments:128*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:kE,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:OE,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=Ls.createServer((r,n)=>{let s=Ls.STATUS_CODES[426];n.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),n.end(s)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=TE(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,s,o)=>{this.handleUpgrade(n,s,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=bg}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Sg){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(Xr,this);return}if(e&&this.once("close",e),this._state!==wg)if(this._state=wg,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(Xr,this):process.nextTick(Xr,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{Xr(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((t!==-1?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,r,n){t.on("error",xg);let s=e.headers["sec-websocket-key"],o=e.headers.upgrade,a=+e.headers["sec-websocket-version"];if(e.method!=="GET"){Ni(this,e,t,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){Ni(this,e,t,400,"Invalid Upgrade header");return}if(s===void 0||!IE.test(s)){Ni(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(a!==13&&a!==8){Ni(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){en(t,400);return}let l=e.headers["sec-websocket-protocol"],c=new Set;if(l!==void 0)try{c=EE.parse(l)}catch{Ni(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let u=e.headers["sec-websocket-extensions"],f={};if(this.options.perMessageDeflate&&u!==void 0){let h=new Ti({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let p=_g.parse(u);p[Ti.extensionName]&&(h.accept(p[Ti.extensionName]),f[Ti.extensionName]=h)}catch{Ni(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let h={origin:e.headers[`${a===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(h,(p,m,d,g)=>{if(!p)return en(t,m||401,d,g);this.completeUpgrade(f,s,c,e,t,r,n)});return}if(!this.options.verifyClient(h))return en(t,401)}this.completeUpgrade(f,s,c,e,t,r,n)}completeUpgrade(e,t,r,n,s,o,a){if(!s.readable||!s.writable)return s.destroy();if(s[AE])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>bg)return en(s,503);let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${SE("sha1").update(t+CE).digest("base64")}`],u=new this.options.WebSocket(null,void 0,this.options);if(r.size){let f=this.options.handleProtocols?this.options.handleProtocols(r,n):r.values().next().value;f&&(c.push(`Sec-WebSocket-Protocol: ${f}`),u._protocol=f)}if(e[Ti.extensionName]){let f=e[Ti.extensionName].params,h=_g.format({[Ti.extensionName]:[f]});c.push(`Sec-WebSocket-Extensions: ${h}`),u._extensions=e}this.emit("headers",c,n),s.write(c.concat(`\r
|
|
41
|
+
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(n=>t.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Lp(i){return i.map(e=>{if(!e.startsWith("--inspect"))return e;let t,r="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?n=s[3]:r=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],r=s[3],n=s[4]),t&&n!=="0"?`${t}=${r}:${parseInt(n)+1}`:e})}function gl(){if(me.env.NO_COLOR||me.env.FORCE_COLOR==="0"||me.env.FORCE_COLOR==="false")return!1;if(me.env.FORCE_COLOR||me.env.CLICOLOR_FORCE!==void 0)return!0}yl.Command=ml;yl.useColor=gl});var qp=w(vt=>{var{Argument:Mp}=cs(),{Command:vl}=Rp(),{CommanderError:$x,InvalidArgumentError:Fp}=Kr(),{Help:Hx}=ll(),{Option:Dp}=hl();vt.program=new vl;vt.createCommand=i=>new vl(i);vt.createOption=(i,e)=>new Dp(i,e);vt.createArgument=(i,e)=>new Mp(i,e);vt.Command=vl;vt.Option=Dp;vt.Argument=Mp;vt.Help=Hx;vt.CommanderError=$x;vt.InvalidArgumentError=Fp;vt.InvalidOptionArgumentError=Fp});var Gp=w((Hp,Vp)=>{Hp=Vp.exports=nr;function nr(i,e){if(this.stream=e.stream||process.stderr,typeof e=="number"){var t=e;e={},e.total=t}else{if(e=e||{},typeof i!="string")throw new Error("format required");if(typeof e.total!="number")throw new Error("total required")}this.fmt=i,this.curr=e.curr||0,this.total=e.total,this.width=e.width||this.total,this.clear=e.clear,this.chars={complete:e.complete||"=",incomplete:e.incomplete||"-",head:e.head||e.complete||"="},this.renderThrottle=e.renderThrottle!==0?e.renderThrottle||16:0,this.lastRender=-1/0,this.callback=e.callback||function(){},this.tokens={},this.lastDraw=""}nr.prototype.tick=function(i,e){if(i!==0&&(i=i||1),typeof i=="object"&&(e=i,i=1),e&&(this.tokens=e),this.curr==0&&(this.start=new Date),this.curr+=i,this.render(),this.curr>=this.total){this.render(void 0,!0),this.complete=!0,this.terminate(),this.callback(this);return}};nr.prototype.render=function(i,e){if(e=e!==void 0?e:!1,i&&(this.tokens=i),!!this.stream.isTTY){var t=Date.now(),r=t-this.lastRender;if(!(!e&&r<this.renderThrottle)){this.lastRender=t;var n=this.curr/this.total;n=Math.min(Math.max(n,0),1);var s=Math.floor(n*100),o,a,l,c=new Date-this.start,u=s==100?0:c*(this.total/this.curr-1),f=this.curr/(c/1e3),h=this.fmt.replace(":current",this.curr).replace(":total",this.total).replace(":elapsed",isNaN(c)?"0.0":(c/1e3).toFixed(1)).replace(":eta",isNaN(u)||!isFinite(u)?"0.0":(u/1e3).toFixed(1)).replace(":percent",s.toFixed(0)+"%").replace(":rate",Math.round(f)),p=Math.max(0,this.stream.columns-h.replace(":bar","").length);p&&process.platform==="win32"&&(p=p-1);var m=Math.min(this.width,p);if(l=Math.round(m*n),a=Array(Math.max(0,l+1)).join(this.chars.complete),o=Array(Math.max(0,m-l+1)).join(this.chars.incomplete),l>0&&(a=a.slice(0,-1)+this.chars.head),h=h.replace(":bar",a+o),this.tokens)for(var d in this.tokens)h=h.replace(":"+d,this.tokens[d]);this.lastDraw!==h&&(this.stream.cursorTo(0),this.stream.write(h),this.stream.clearLine(1),this.lastDraw=h)}}};nr.prototype.update=function(i,e){var t=Math.floor(i*this.total),r=t-this.curr;this.tick(r,e)};nr.prototype.interrupt=function(i){this.stream.clearLine(),this.stream.cursorTo(0),this.stream.write(i),this.stream.write(`
|
|
42
|
+
`),this.stream.write(this.lastDraw)};nr.prototype.terminate=function(){this.clear?this.stream.clearLine&&(this.stream.clearLine(),this.stream.cursorTo(0)):this.stream.write(`
|
|
43
|
+
`)}});var Yp=w((kN,Wp)=>{Wp.exports=Gp()});var Zp=w(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});var Kp=require("buffer"),Si={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};Wt.ERRORS=Si;function Vx(i){if(!Kp.Buffer.isEncoding(i))throw new Error(Si.INVALID_ENCODING)}Wt.checkEncoding=Vx;function zp(i){return typeof i=="number"&&isFinite(i)&&Kx(i)}Wt.isFiniteInteger=zp;function Jp(i,e){if(typeof i=="number"){if(!zp(i)||i<0)throw new Error(e?Si.INVALID_OFFSET:Si.INVALID_LENGTH)}else throw new Error(e?Si.INVALID_OFFSET_NON_NUMBER:Si.INVALID_LENGTH_NON_NUMBER)}function Gx(i){Jp(i,!1)}Wt.checkLengthValue=Gx;function Wx(i){Jp(i,!0)}Wt.checkOffsetValue=Wx;function Yx(i,e){if(i<0||i>e.length)throw new Error(Si.INVALID_TARGET_OFFSET)}Wt.checkTargetOffset=Yx;function Kx(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i}function zx(i){if(typeof BigInt=="undefined")throw new Error("Platform does not support JS BigInt type.");if(typeof Kp.Buffer.prototype[i]=="undefined")throw new Error(`Platform does not support Buffer.prototype.${i}.`)}Wt.bigIntAndBufferInt64Check=zx});var Xp=w(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var ee=Zp(),Qp=4096,Jx="utf8",_l=class i{constructor(e){if(this.length=0,this._encoding=Jx,this._writeOffset=0,this._readOffset=0,i.isSmartBufferOptions(e))if(e.encoding&&(ee.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(ee.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(ee.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(ee.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(Qp);else{if(typeof e!="undefined")throw new Error(ee.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(Qp)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let t=e;return t&&(t.encoding!==void 0||t.size!==void 0||t.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return ee.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return ee.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,t),this}insertInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,t)}writeInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}insertInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}writeInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}insertInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}writeInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}insertInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}writeInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}insertInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}writeBigInt64BE(e,t){return ee.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}insertBigInt64BE(e,t){return ee.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}writeBigInt64LE(e,t){return ee.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}insertBigInt64LE(e,t){return ee.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){return ee.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){return ee.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,t)}insertUInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,t)}writeUInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}insertUInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}writeUInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}insertUInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}writeUInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}insertUInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}writeUInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}insertUInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}writeBigUInt64BE(e,t){return ee.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}insertBigUInt64BE(e,t){return ee.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}writeBigUInt64LE(e,t){return ee.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}insertBigUInt64LE(e,t){return ee.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}insertFloatBE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}writeFloatLE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}insertFloatLE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}insertDoubleBE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}writeDoubleLE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}insertDoubleLE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}readString(e,t){let r;typeof e=="number"?(ee.checkLengthValue(e),r=Math.min(e,this.length-this._readOffset)):(t=e,r=this.length-this._readOffset),typeof t!="undefined"&&ee.checkEncoding(t);let n=this._buff.slice(this._readOffset,this._readOffset+r).toString(t||this._encoding);return this._readOffset+=r,n}insertString(e,t,r){return ee.checkOffsetValue(t),this._handleString(e,!0,t,r)}writeString(e,t,r){return this._handleString(e,!1,t,r)}readStringNT(e){typeof e!="undefined"&&ee.checkEncoding(e);let t=this.length;for(let n=this._readOffset;n<this.length;n++)if(this._buff[n]===0){t=n;break}let r=this._buff.slice(this._readOffset,t);return this._readOffset=t+1,r.toString(e||this._encoding)}insertStringNT(e,t,r){return ee.checkOffsetValue(t),this.insertString(e,t,r),this.insertUInt8(0,t+e.length),this}writeStringNT(e,t,r){return this.writeString(e,t,r),this.writeUInt8(0,typeof t=="number"?t+e.length:this.writeOffset),this}readBuffer(e){typeof e!="undefined"&&ee.checkLengthValue(e);let t=typeof e=="number"?e:this.length,r=Math.min(this.length,this._readOffset+t),n=this._buff.slice(this._readOffset,r);return this._readOffset=r,n}insertBuffer(e,t){return ee.checkOffsetValue(t),this._handleBuffer(e,!0,t)}writeBuffer(e,t){return this._handleBuffer(e,!1,t)}readBufferNT(){let e=this.length;for(let r=this._readOffset;r<this.length;r++)if(this._buff[r]===0){e=r;break}let t=this._buff.slice(this._readOffset,e);return this._readOffset=e+1,t}insertBufferNT(e,t){return ee.checkOffsetValue(t),this.insertBuffer(e,t),this.insertUInt8(0,t+e.length),this}writeBufferNT(e,t){return typeof t!="undefined"&&ee.checkOffsetValue(t),this.writeBuffer(e,t),this.writeUInt8(0,typeof t=="number"?t+e.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(e){ee.checkOffsetValue(e),ee.checkTargetOffset(e,this),this._readOffset=e}get writeOffset(){return this._writeOffset}set writeOffset(e){ee.checkOffsetValue(e),ee.checkTargetOffset(e,this),this._writeOffset=e}get encoding(){return this._encoding}set encoding(e){ee.checkEncoding(e),this._encoding=e}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(e){let t=typeof e=="string"?e:this._encoding;return ee.checkEncoding(t),this._buff.toString(t,0,this.length)}destroy(){return this.clear(),this}_handleString(e,t,r,n){let s=this._writeOffset,o=this._encoding;typeof r=="number"?s=r:typeof r=="string"&&(ee.checkEncoding(r),o=r),typeof n=="string"&&(ee.checkEncoding(n),o=n);let a=Buffer.byteLength(e,o);return t?this.ensureInsertable(a,s):this._ensureWriteable(a,s),this._buff.write(e,s,a,o),t?this._writeOffset+=a:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,s+a):this._writeOffset+=a,this}_handleBuffer(e,t,r){let n=typeof r=="number"?r:this._writeOffset;return t?this.ensureInsertable(e.length,n):this._ensureWriteable(e.length,n),e.copy(this._buff,n),t?this._writeOffset+=e.length:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,n+e.length):this._writeOffset+=e.length,this}ensureReadable(e,t){let r=this._readOffset;if(typeof t!="undefined"&&(ee.checkOffsetValue(t),r=t),r<0||r+e>this.length)throw new Error(ee.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,t){ee.checkOffsetValue(t),this._ensureCapacity(this.length+e),t<this.length&&this._buff.copy(this._buff,t+e,t,this._buff.length),t+e>this.length?this.length=t+e:this.length+=e}_ensureWriteable(e,t){let r=typeof t=="number"?t:this._writeOffset;this._ensureCapacity(r+e),r+e>this.length&&(this.length=r+e)}_ensureCapacity(e){let t=this._buff.length;if(e>t){let r=this._buff,n=t*3/2+1;n<e&&(n=e),this._buff=Buffer.allocUnsafe(n),r.copy(this._buff,0,0,t)}}_readNumberValue(e,t,r){this.ensureReadable(t,r);let n=e.call(this._buff,typeof r=="number"?r:this._readOffset);return typeof r=="undefined"&&(this._readOffset+=t),n}_insertNumberValue(e,t,r,n){return ee.checkOffsetValue(n),this.ensureInsertable(t,n),e.call(this._buff,r,n),this._writeOffset+=t,this}_writeNumberValue(e,t,r,n){if(typeof n=="number"){if(n<0)throw new Error(ee.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);ee.checkOffsetValue(n)}let s=typeof n=="number"?n:this._writeOffset;return this._ensureWriteable(t,s),e.call(this._buff,r,s),typeof n=="number"?this._writeOffset=Math.max(this._writeOffset,s+t):this._writeOffset+=t,this}};bl.SmartBuffer=_l});var wl=w(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.SOCKS5_NO_ACCEPTABLE_AUTH=xe.SOCKS5_CUSTOM_AUTH_END=xe.SOCKS5_CUSTOM_AUTH_START=xe.SOCKS_INCOMING_PACKET_SIZES=xe.SocksClientState=xe.Socks5Response=xe.Socks5HostType=xe.Socks5Auth=xe.Socks4Response=xe.SocksCommand=xe.ERRORS=xe.DEFAULT_TIMEOUT=void 0;var Zx=3e4;xe.DEFAULT_TIMEOUT=Zx;var Qx={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};xe.ERRORS=Qx;var Xx={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:i=>i+7,Socks4Response:8};xe.SOCKS_INCOMING_PACKET_SIZES=Xx;var em;(function(i){i[i.connect=1]="connect",i[i.bind=2]="bind",i[i.associate=3]="associate"})(em||(xe.SocksCommand=em={}));var tm;(function(i){i[i.Granted=90]="Granted",i[i.Failed=91]="Failed",i[i.Rejected=92]="Rejected",i[i.RejectedIdent=93]="RejectedIdent"})(tm||(xe.Socks4Response=tm={}));var im;(function(i){i[i.NoAuth=0]="NoAuth",i[i.GSSApi=1]="GSSApi",i[i.UserPass=2]="UserPass"})(im||(xe.Socks5Auth=im={}));var eS=128;xe.SOCKS5_CUSTOM_AUTH_START=eS;var tS=254;xe.SOCKS5_CUSTOM_AUTH_END=tS;var iS=255;xe.SOCKS5_NO_ACCEPTABLE_AUTH=iS;var rm;(function(i){i[i.Granted=0]="Granted",i[i.Failure=1]="Failure",i[i.NotAllowed=2]="NotAllowed",i[i.NetworkUnreachable=3]="NetworkUnreachable",i[i.HostUnreachable=4]="HostUnreachable",i[i.ConnectionRefused=5]="ConnectionRefused",i[i.TTLExpired=6]="TTLExpired",i[i.CommandNotSupported=7]="CommandNotSupported",i[i.AddressNotSupported=8]="AddressNotSupported"})(rm||(xe.Socks5Response=rm={}));var nm;(function(i){i[i.IPv4=1]="IPv4",i[i.Hostname=3]="Hostname",i[i.IPv6=4]="IPv6"})(nm||(xe.Socks5HostType=nm={}));var sm;(function(i){i[i.Created=0]="Created",i[i.Connecting=1]="Connecting",i[i.Connected=2]="Connected",i[i.SentInitialHandshake=3]="SentInitialHandshake",i[i.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",i[i.SentAuthentication=5]="SentAuthentication",i[i.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",i[i.SentFinalHandshake=7]="SentFinalHandshake",i[i.ReceivedFinalResponse=8]="ReceivedFinalResponse",i[i.BoundWaitingForConnection=9]="BoundWaitingForConnection",i[i.Established=10]="Established",i[i.Disconnected=11]="Disconnected",i[i.Error=99]="Error"})(sm||(xe.SocksClientState=sm={}))});var Sl=w(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.shuffleArray=sr.SocksClientError=void 0;var xl=class extends Error{constructor(e,t){super(e),this.options=t}};sr.SocksClientError=xl;function rS(i){for(let e=i.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1));[i[e],i[t]]=[i[t],i[e]]}}sr.shuffleArray=rS});var zr=w(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});fs.AddressError=void 0;var El=class extends Error{constructor(e,t){super(e),this.name="AddressError",this.parseMessage=t}};fs.AddressError=El});var hs=w(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.isInSubnet=nS;_t.isHostInSubnet=Ol;_t.isGloballyReachable=sS;_t.offsetBigInt=oS;_t.isCorrect=aS;_t.prefixLengthFromMask=lS;_t.assertByteArray=cS;_t.numberToPaddedHex=om;_t.stringToPaddedHex=uS;_t.testBit=fS;var Ei=zr();function nS(i){return this.subnetMask<i.subnetMask?!1:Ol.call(this,i)}function Ol(i){return this.mask(i.subnetMask)===i.mask()}function sS(i){let e=null;for(let t=0;t<i.length;t++){let r=i[t];r.reachable!==null&&Ol.call(this,r.subnet)&&(e===null||r.subnet.subnetMask>e.subnet.subnetMask)&&(e=r)}return e===null?!0:e.reachable}function oS(i,e,t,r){if(typeof e=="number"&&!Number.isSafeInteger(e))throw new Ei.AddressError(`${r} offset must be an integer`);if(typeof e!="number"&&typeof e!="bigint")throw new Ei.AddressError(`${r} offset must be an integer`);let n=i+BigInt(e);if(n<BigInt(0)||n>(BigInt(1)<<BigInt(t))-BigInt(1))throw new Ei.AddressError(`${r} offset leaves the address space`);return n}function aS(i){return function(){return this.addressMinusSuffix!==this.correctForm()?!1:this.subnetMask===i&&!this.parsedSubnet?!0:this.parsedSubnet===String(this.subnetMask)}}function lS(i,e){let t=i.toString(2).padStart(e,"0");if(t.length>e)throw new Ei.AddressError("Invalid subnet mask.");let r=t.indexOf("0");if(r===-1)return e;if(t.slice(r).includes("1"))throw new Ei.AddressError("Invalid subnet mask.");return r}function cS(i,e,t,r){if(i.length!==e)throw new Ei.AddressError(`${t} addresses require exactly ${e} bytes`);for(let n=0;n<i.length;n++)if(!Number.isInteger(i[n])||i[n]<r||i[n]>255)throw new Ei.AddressError(`All bytes must be integers between ${r} and 255`)}function om(i){return i.toString(16).padStart(2,"0")}function uS(i){return om(parseInt(i,10))}function fS(i,e){let{length:t}=i;if(e>t)return!1;let r=t-e;return i.substring(r,r+1)==="1"}});var kl=w(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.SPECIAL_PURPOSE=bt.RE_SUBNET_STRING=bt.RE_ADDRESS=bt.GROUPS=bt.BITS=void 0;bt.BITS=32;bt.GROUPS=4;bt.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])$/g;bt.RE_SUBNET_STRING=/\/\d{1,2}$/;bt.SPECIAL_PURPOSE=[["0.0.0.0/8","This network",!1],["0.0.0.0/32","This host on this network",!1],["10.0.0.0/8","Private-Use",!1],["100.64.0.0/10","Shared Address Space",!1],["127.0.0.0/8","Loopback",!1],["169.254.0.0/16","Link Local",!1],["172.16.0.0/12","Private-Use",!1],["192.0.0.0/24","IETF Protocol Assignments",!1],["192.0.0.0/29","IPv4 Service Continuity Prefix",!1],["192.0.0.8/32","IPv4 dummy address",!1],["192.0.0.9/32","Port Control Protocol Anycast",!0],["192.0.0.10/32","Traversal Using Relays around NAT Anycast",!0],["192.0.0.170/32","NAT64/DNS64 Discovery",!1],["192.0.0.171/32","NAT64/DNS64 Discovery",!1],["192.0.2.0/24","Documentation (TEST-NET-1)",!1],["192.31.196.0/24","AS112-v4",!0],["192.52.193.0/24","AMT",!0],["192.88.99.0/24","Deprecated (6to4 Relay Anycast)",null],["192.88.99.2/32","6a44-relay anycast address",!1],["192.168.0.0/16","Private-Use",!1],["192.175.48.0/24","Direct Delegation AS112 Service",!0],["198.18.0.0/15","Benchmarking",!1],["198.51.100.0/24","Documentation (TEST-NET-2)",!1],["203.0.113.0/24","Documentation (TEST-NET-3)",!1],["240.0.0.0/4","Reserved",!1],["255.255.255.255/32","Limited Broadcast",!1]]});var Cl=w(Mt=>{"use strict";var hS=Mt&&Mt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),dS=Mt&&Mt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),am=Mt&&Mt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&hS(e,i,t);return dS(e,i),e};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.Address4=void 0;var ut=am(hs()),Be=am(kl()),Yt=zr(),pS=ut.isCorrect(Be.BITS),je=class i{constructor(e){this.addressMinusSuffix="",this.groups=Be.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=pS,this.isInSubnet=ut.isInSubnet,this.isHostInSubnet=ut.isHostInSubnet,this.address=e;let t=Be.RE_SUBNET_STRING.exec(e);if(t){if(this.parsedSubnet=t[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>Be.BITS)throw new Yt.AddressError("Invalid subnet mask.");e=e.replace(Be.RE_SUBNET_STRING,"")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}static isValid(e){try{return new i(e),!0}catch{return!1}}parse(e){let t=e.split(".");if(t.some(r=>/^0\d/.test(r)))throw new Yt.AddressError("IPv4 addresses can't have leading zeroes.");if(!e.match(Be.RE_ADDRESS))throw new Yt.AddressError("Invalid IPv4 address.");return t}correctForm(){return this.parsedAddress.map(e=>parseInt(e,10)).join(".")}static fromAddressAndMask(e,t){let r=ut.prefixLengthFromMask(new i(t).bigInt(),Be.BITS);return new i(`${e}/${r}`)}static fromAddressAndWildcardMask(e,t){let r=new i(t).bigInt(),n=(BigInt(1)<<BigInt(Be.BITS))-BigInt(1),s=r^n,o=ut.prefixLengthFromMask(s,Be.BITS);return new i(`${e}/${o}`)}static fromWildcard(e){let t=e.split(".");if(t.length!==Be.GROUPS)throw new Yt.AddressError("Wildcard pattern must have 4 octets");let r=-1;for(let a=0;a<t.length;a++)if(t[a]==="*")r===-1&&(r=a);else if(r!==-1)throw new Yt.AddressError("Wildcard `*` must only appear in trailing octets (e.g. `192.168.0.*`)");let n=r===-1?0:t.length-r,s=t.map(a=>a==="*"?"0":a),o=Be.BITS-n*8;return new i(`${s.join(".")}/${o}`)}static fromHex(e){let t=e.replace(/:/g,"");if(!/^[0-9a-fA-F]{8}$/.test(t))throw new Yt.AddressError("IPv4 hex must be exactly 8 hex digits");let r=[];for(let n=0;n<8;n+=2)r.push(parseInt(t.slice(n,n+2),16));return new i(r.join("."))}static fromInteger(e){if(!Number.isInteger(e)||e<0||e>4294967295)throw new Yt.AddressError("IPv4 integer must be in the range 0 to 2**32 - 1");return i.fromHex(e.toString(16).padStart(8,"0"))}static fromArpa(e){let r=e.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new i(r)}toHex(){return this.parsedAddress.map(e=>ut.stringToPaddedHex(e)).join(":")}toArray(){return this.parsedAddress.map(e=>parseInt(e,10))}toGroup6(){let e=[],t;for(t=0;t<Be.GROUPS;t+=2)e.push(`${ut.stringToPaddedHex(this.parsedAddress[t])}${ut.stringToPaddedHex(this.parsedAddress[t+1])}`);return e.join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(e=>ut.stringToPaddedHex(e)).join("")}`)}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(Be.BITS-this.subnetMask)}`)}startAddress(){return i.fromBigInt(this._startAddress())}startAddressExclusive(){let e=BigInt("1");return i.fromBigInt(this._startAddress()+e)}offset(e){return i.fromBigInt(ut.offsetBigInt(this.bigInt(),e,Be.BITS,"IPv4")).withSubnetMask(this.subnetMask)}nextNetwork(){return i.fromBigInt(ut.offsetBigInt(this._endAddress(),1,Be.BITS,"IPv4")).withSubnetMask(this.subnetMask)}withSubnetMask(e){return new i(`${this.correctForm()}/${e}`)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(Be.BITS-this.subnetMask)}`)}endAddress(){return i.fromBigInt(this._endAddress())}endAddressExclusive(){let e=BigInt("1");return i.fromBigInt(this._endAddress()-e)}subnetMaskAddress(){return i.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(Be.BITS-this.subnetMask)}`))}wildcardMask(){return i.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(Be.BITS-this.subnetMask)}`))}networkForm(){return`${this.startAddress().correctForm()}/${this.subnetMask}`}static fromBigInt(e){if(e<BigInt(0)||e>BigInt(4294967295))throw new Yt.AddressError("IPv4 BigInt must be in the range 0 to 2**32 - 1");return i.fromHex(e.toString(16).padStart(8,"0"))}static fromByteArray(e){return ut.assertByteArray(e,4,"IPv4",0),this.fromUnsignedByteArray(e)}static fromUnsignedByteArray(e){if(e.length!==4)throw new Yt.AddressError("IPv4 addresses require exactly 4 bytes");let t=e.join(".");return new i(t)}mask(e){return e===void 0&&(e=this.subnetMask),this.getBitsBase2(0,e)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}reverseForm(e){e||(e={});let t=this.correctForm().split(".").reverse().join(".");return e.omitSuffix?t:`${t}.in-addr.arpa.`}isMulticast(){return this.isHostInSubnet(mS)}isPrivate(){return gS.some(e=>this.isHostInSubnet(e))}isLoopback(){return this.isHostInSubnet(yS)}isLinkLocal(){return this.isHostInSubnet(vS)}isUnspecified(){return this.isHostInSubnet(_S)}isBroadcast(){return this.isHostInSubnet(bS)}isCGNAT(){return this.isHostInSubnet(wS)}isDocumentation(){return xS.some(e=>this.isHostInSubnet(e))}isBenchmarking(){return this.isHostInSubnet(SS)}isReserved(){return this.isHostInSubnet(ES)}isGlobal(){return!this.isMulticast()&&ut.isGloballyReachable.call(this,OS)}binaryZeroPad(){return this._binaryZeroPad===void 0&&(this._binaryZeroPad=this.bigInt().toString(2).padStart(Be.BITS,"0")),this._binaryZeroPad}groupForV6(){let e=this.parsedAddress;return this.correctForm().replace(Be.RE_ADDRESS,`<span class="hover-group group-v4 group-6">${e.slice(0,2).join(".")}</span>.<span class="hover-group group-v4 group-7">${e.slice(2,4).join(".")}</span>`)}};Mt.Address4=je;var mS=new je("224.0.0.0/4"),gS=[new je("10.0.0.0/8"),new je("172.16.0.0/12"),new je("192.168.0.0/16")],yS=new je("127.0.0.0/8"),vS=new je("169.254.0.0/16"),_S=new je("0.0.0.0/32"),bS=new je("255.255.255.255/32"),wS=new je("100.64.0.0/10"),xS=[new je("192.0.2.0/24"),new je("198.51.100.0/24"),new je("203.0.113.0/24")],SS=new je("198.18.0.0/15"),ES=new je("240.0.0.0/4"),OS=Be.SPECIAL_PURPOSE.map(([i,,e])=>({subnet:new je(i),reachable:e}))});var Al=w(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.SPECIAL_PURPOSE=ke.RE_URL_WITH_PORT=ke.RE_URL=ke.RE_ZONE_STRING=ke.RE_SUBNET_STRING=ke.RE_BAD_ADDRESS=ke.RE_BAD_CHARACTERS=ke.TYPES=ke.SCOPES=ke.GROUPS=ke.BITS=void 0;ke.BITS=128;ke.GROUPS=8;ke.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};ke.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","::ffff:0:0/96":"IPv4-mapped","ff00::/8":"Multicast","fe80::/10":"Link-local unicast","fc00::/7":"Unique local","2001::/32":"Teredo","2001:2::/48":"Benchmarking","2002::/16":"6to4","2001:db8::/32":"Documentation","3fff::/20":"Documentation","100::/64":"Discard-only","fec0::/10":"Site-local unicast (deprecated)","::/96":"IPv4-compatible (deprecated)","64:ff9b::/96":"NAT64 (well-known)","64:ff9b:1::/48":"NAT64 (local-use)"};ke.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;ke.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;ke.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;ke.RE_ZONE_STRING=/%.*$/;ke.RE_URL=/^(?:\[([0-9a-f:.]+)\]|([0-9a-f:.]+))(?:[/?#].*)?$/i;ke.RE_URL_WITH_PORT=/^\[([0-9a-f:.]+)\]:([0-9]{1,5})(?:[/?#].*)?$/i;ke.SPECIAL_PURPOSE=[["::1/128","Loopback Address",!1],["::/128","Unspecified Address",!1],["::ffff:0:0/96","IPv4-mapped Address",!1],["64:ff9b::/96","IPv4-IPv6 Translat.",!0],["64:ff9b:1::/48","IPv4-IPv6 Translat.",!1],["100::/64","Discard-Only Address Block",!1],["100:0:0:1::/64","Dummy IPv6 Prefix",!1],["2001::/23","IETF Protocol Assignments",!1],["2001::/32","TEREDO",!1],["2001:1::1/128","Port Control Protocol Anycast",!0],["2001:1::2/128","Traversal Using Relays around NAT Anycast",!0],["2001:1::3/128","DNS-SD Service Registration Protocol Anycast",!0],["2001:2::/48","Benchmarking",!1],["2001:3::/32","AMT",!0],["2001:4:112::/48","AS112-v6",!0],["2001:10::/28","Deprecated (previously ORCHID)",null],["2001:20::/28","ORCHIDv2",!0],["2001:30::/28","Drone Remote ID Protocol Entity Tags (DETs) Prefix",!0],["2001:db8::/32","Documentation",!1],["2002::/16","6to4",!1],["2620:4f:8000::/48","Direct Delegation AS112 Service",!0],["3fff::/20","Documentation",!1],["5f00::/16","Segment Routing (SRv6) SIDs",!1],["fc00::/7","Unique-Local",!1],["fe80::/10","Link-Local Unicast",!1]]});var Il=w(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.escapeHtml=ds;Oi.spanAllZeroes=lm;Oi.spanAll=kS;Oi.spanLeadingZeroes=CS;Oi.simpleGroup=AS;function ds(i){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function lm(i){return ds(i).replace(/(0+)/g,'<span class="zero">$1</span>')}function kS(i,e=0){return i.split("").map((r,n)=>`<span class="digit value-${ds(r)} position-${n+e}">${lm(r)}</span>`).join("")}function cm(i){return ds(i).replace(/^(0+)/,'<span class="zero">$1</span>')}function CS(i){return i.split(":").map(t=>cm(t)).join(":")}function AS(i,e=0){return i.split(":").map((r,n)=>/group-v4/.test(r)?r:`<span class="hover-group group-${n+e}">${cm(r)}</span>`)}});var um=w(rt=>{"use strict";var IS=rt&&rt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),TS=rt&&rt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),NS=rt&&rt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&IS(e,i,t);return TS(e,i),e};Object.defineProperty(rt,"__esModule",{value:!0});rt.ADDRESS_BOUNDARY=void 0;rt.groupPossibilities=ms;rt.padGroup=ps;rt.simpleRegularExpression=PS;rt.possibleElisions=LS;var BS=NS(Al());function ms(i){return`(${i.join("|")})`}function ps(i){return i.length<4?`0{0,${4-i.length}}${i}`:i}rt.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function PS(i){let e=[];i.forEach((r,n)=>{parseInt(r,16)===0&&e.push(n)});let t=e.map(r=>i.map((n,s)=>{if(s===r){let o=s===0||s===BS.GROUPS-1?":":"";return ms([ps(n),o])}return ps(n)}).join(":"));return t.push(i.map(ps).join(":")),ms(t)}function LS(i,e,t){let r=e?"":":",n=t?"":":",s=[];!e&&!t&&s.push("::"),e&&t&&s.push(""),(t&&!e||!t&&e)&&s.push(":"),s.push(`${r}(:0{1,4}){1,${i-1}}`),s.push(`(0{1,4}:){1,${i-1}}${n}`),s.push(`(0{1,4}:){${i-1}}0{1,4}`);for(let o=1;o<i-1;o++)for(let a=1;a<i-o;a++)s.push(`(0{1,4}:){${a}}:(0{1,4}:){${i-a-o-1}}0{1,4}`);return ms(s)}});var pm=w(qt=>{"use strict";var RS=qt&&qt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),MS=qt&&qt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),vs=qt&&qt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&RS(e,i,t);return MS(e,i),e};Object.defineProperty(qt,"__esModule",{value:!0});qt.Address6=void 0;var Dt=vs(hs()),Tl=vs(kl()),te=vs(Al()),ki=vs(Il()),Ft=Cl(),Ci=um(),Ye=zr(),gs=hs(),FS=Dt.isCorrect(te.BITS);function ys(i){if(!i)throw new Error("Assertion failed.")}function DS(i){let e=/(\d+)(\d{3})/;for(;e.test(i);)i=i.replace(e,"$1,$2");return i}function qS(i){return i=i.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),i=i.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),i}function US(i,e){let t=[],r=[],n;for(n=0;n<i.length;n++)n<e[0]?t.push(i[n]):n>e[1]&&r.push(i[n]);return t.concat(["compact"]).concat(r)}function fm(i){return parseInt(i,16).toString(16).padStart(4,"0")}function hm(i){return i&255}var Ze=class i{constructor(e,t){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=Dt.isInSubnet,this.isHostInSubnet=Dt.isHostInSubnet,this.isCorrect=FS,t===void 0?this.groups=te.GROUPS:this.groups=t,this.address=e;let r=te.RE_SUBNET_STRING.exec(e);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>te.BITS)throw new Ye.AddressError("Invalid subnet mask.");e=e.replace(te.RE_SUBNET_STRING,"")}if(/\//.test(e))throw new Ye.AddressError("Invalid subnet mask.");let n=te.RE_ZONE_STRING.exec(e);n&&(this.zone=n[0],e=e.replace(te.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(e){try{return new i(e),!0}catch{return!1}}static fromBigInt(e){if(e<BigInt(0)||e>(BigInt(1)<<BigInt(te.BITS))-BigInt(1))throw new Ye.AddressError("IPv6 BigInt must be in the range 0 to 2**128 - 1");let t=e.toString(16).padStart(32,"0"),r=[];for(let n=0;n<te.GROUPS;n++)r.push(t.slice(n*4,(n+1)*4));return new i(r.join(":"))}static fromURL(e){var t;let r,n=null,s,o,a=e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"");if(a.indexOf("[")!==-1&&a.indexOf("]:")!==-1){if(o="failed to parse address with port",s=te.RE_URL_WITH_PORT.exec(a),s===null)return{error:o,address:null,port:null};r=s[1],n=s[2]}else{if(o="failed to parse address from URL",s=te.RE_URL.exec(a),s===null)return{error:o,address:null,port:null};r=(t=s[1])!==null&&t!==void 0?t:s[2]}n?(n=parseInt(n,10),(n<0||n>65535)&&(n=null)):n=null;let l;try{l=new i(r)}catch{return{error:o,address:null,port:null}}return{address:l,port:n}}static fromAddressAndMask(e,t){let r=Dt.prefixLengthFromMask(new i(t).bigInt(),te.BITS);return new i(`${e}/${r}`)}static fromAddressAndWildcardMask(e,t){let r=new i(t).bigInt(),n=(BigInt(1)<<BigInt(te.BITS))-BigInt(1),s=r^n,o=Dt.prefixLengthFromMask(s,te.BITS);return new i(`${e}/${o}`)}static fromWildcard(e){if(e.includes("%")||e.includes("/"))throw new Ye.AddressError("Wildcard pattern must not include a zone or CIDR suffix");let t=e.split("::");if(t.length>2)throw new Ye.AddressError("Wildcard pattern cannot contain more than one '::'");let r;if(t.length===2){let l=t[0]===""?[]:t[0].split(":"),c=t[1]===""?[]:t[1].split(":"),u=te.GROUPS-l.length-c.length;if(u<1)throw new Ye.AddressError("Wildcard pattern with '::' has too many groups");r=[...l,...new Array(u).fill("0"),...c]}else r=e.split(":");if(r.length!==te.GROUPS)throw new Ye.AddressError("Wildcard pattern must have 8 groups");let n=-1;for(let l=0;l<r.length;l++)if(r[l]==="*")n===-1&&(n=l);else if(n!==-1)throw new Ye.AddressError("Wildcard `*` must only appear in trailing groups (e.g. `2001:db8:*:*:*:*:*:*`)");let s=n===-1?0:r.length-n,o=r.map(l=>l==="*"?"0":l),a=te.BITS-s*16;return new i(`${o.join(":")}/${a}`)}static fromAddress4(e){let t=new Ft.Address4(e),r=te.BITS-(Tl.BITS-t.subnetMask);return new i(`::ffff:${t.correctForm()}/${r}`)}static fromArpa(e){let t=e.replace(/(\.ip6\.arpa)?\.?$/,"");if(!/^[0-9a-f](\.[0-9a-f]){0,31}$/i.test(t))throw new Ye.AddressError("Invalid 'ip6.arpa' form.");let r=t.split(".").reverse(),n=r.length*4,s=r.join("").padEnd(32,"0"),o=[];for(let a=0;a<te.GROUPS;a++)o.push(s.slice(a*4,(a+1)*4));return new i(`${o.join(":")}/${n}`)}microsoftTranscription(){return`${this.correctForm().replace(/:/g,"-")}.ipv6-literal.net`}mask(e=this.subnetMask){return this.getBitsBase2(0,e)}possibleSubnets(e=128){let t=te.BITS-this.subnetMask,r=Math.abs(e-te.BITS),n=t-r;return n<0?"0":DS((BigInt("2")**BigInt(n)).toString(10))}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(te.BITS-this.subnetMask)}`)}startAddress(){return i.fromBigInt(this._startAddress())}startAddressExclusive(){let e=BigInt("1");return i.fromBigInt(this._startAddress()+e)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(te.BITS-this.subnetMask)}`)}endAddress(){return i.fromBigInt(this._endAddress())}endAddressExclusive(){let e=BigInt("1");return i.fromBigInt(this._endAddress()-e)}offset(e){return i.fromBigInt(Dt.offsetBigInt(this.bigInt(),e,te.BITS,"IPv6")).withSubnetMask(this.subnetMask)}nextNetwork(){return i.fromBigInt(Dt.offsetBigInt(this._endAddress(),1,te.BITS,"IPv6")).withSubnetMask(this.subnetMask)}withSubnetMask(e){return new i(`${this.correctForm()}/${e}`)}subnetMaskAddress(){return i.fromBigInt(BigInt(`0b${"1".repeat(this.subnetMask)}${"0".repeat(te.BITS-this.subnetMask)}`))}wildcardMask(){return i.fromBigInt(BigInt(`0b${"0".repeat(this.subnetMask)}${"1".repeat(te.BITS-this.subnetMask)}`))}networkForm(){return`${this.startAddress().correctForm()}/${this.subnetMask}`}getScope(){let e=this.getType();return e==="Multicast"||e.startsWith("Multicast ")?te.SCOPES[parseInt(this.getBits(12,16).toString(10),10)]||"Unknown":e==="Link-local unicast"||e==="Loopback"?"Link local":e==="Unspecified"?"Unknown":"Global"}getType(){for(let e=0;e<dm.length;e++){let t=dm[e];if(this.isHostInSubnet(t[0]))return t[1]}return"Global unicast"}getBits(e,t){return BigInt(`0b${this.getBitsBase2(e,t)}`)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}getBitsBase16(e,t){let r=t-e;if(r%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(e,t).toString(16).padStart(r/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,te.BITS)}reverseForm(e){e||(e={});let t=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,t).reverse().join(".");return t>0?e.omitSuffix?r:`${r}.ip6.arpa.`:e.omitSuffix?"":"ip6.arpa."}correctForm(){let e,t=[],r=0,n=[];for(e=0;e<this.parsedAddress.length;e++){let a=parseInt(this.parsedAddress[e],16);a===0&&r++,a!==0&&r>0&&(r>1&&n.push([e-r,e-1]),r=0)}r>1&&n.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);let s=n.map(a=>a[1]-a[0]+1);if(n.length>0){let a=s.indexOf(Math.max(...s));t=US(this.parsedAddress,n[a])}else t=this.parsedAddress;for(e=0;e<t.length;e++)t[e]!=="compact"&&(t[e]=parseInt(t[e],16).toString(16));let o=t.join(":");return o=o.replace(/^compact$/,"::"),o=o.replace(/(^compact)|(compact$)/,":"),o=o.replace(/compact/,""),o}binaryZeroPad(){return this._binaryZeroPad===void 0&&(this._binaryZeroPad=this.bigInt().toString(2).padStart(te.BITS,"0")),this._binaryZeroPad}parse4in6(e){if(e.indexOf(".")===-1)return e;let t=e.split(":"),r=t.slice(-1)[0],n=r.split(".");if(n.length===Tl.GROUPS&&n.every(o=>/^\d{1,3}$/.test(o))&&n.some(o=>/^0\d/.test(o))){let o=n.map(qS).join("."),a=t.slice(0,-1).map(ki.escapeHtml).join(":"),l=t.length>1?":":"";throw new Ye.AddressError("IPv4 addresses can't have leading zeroes.",`${a}${l}${o}`)}let s=r.match(Tl.RE_ADDRESS);if(s){this.parsedAddress4=s[0];let o=this.subnetMask>=96?`/${this.subnetMask-96}`:"";this.address4=new Ft.Address4(`${this.parsedAddress4}${o}`),this.v4=!0,t[t.length-1]=this.address4.toGroup6(),e=t.join(":")}return e}parse(e){e=this.parse4in6(e);let t=e.match(te.RE_BAD_CHARACTERS);if(t)throw new Ye.AddressError(`Bad character${t.length>1?"s":""} detected in address: ${t.join("")}`,e.replace(te.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let r=e.match(te.RE_BAD_ADDRESS);if(r)throw new Ye.AddressError(`Address failed regex: ${r.join("")}`,e.replace(te.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let n=[],s=e.split("::");if(s.length===2){let o=s[0].split(":"),a=s[1].split(":");o.length===1&&o[0]===""&&(o=[]),a.length===1&&a[0]===""&&(a=[]);let l=this.groups-(o.length+a.length);if(!l)throw new Ye.AddressError("Error parsing groups");this.elidedGroups=l,this.elisionBegin=o.length,this.elisionEnd=o.length+this.elidedGroups,n=n.concat(o);for(let c=0;c<l;c++)n.push("0");n=n.concat(a)}else if(s.length===1)n=e.split(":"),this.elidedGroups=0;else throw new Ye.AddressError("Too many :: groups found");if(n=n.map(o=>parseInt(o,16).toString(16)),n.length!==this.groups)throw new Ye.AddressError("Incorrect number of groups found");return n}canonicalForm(){return this.parsedAddress.map(fm).join(":")}decimal(){return this.parsedAddress.map(e=>parseInt(e,16).toString(10).padStart(5,"0")).join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(fm).join("")}`)}to4(){let e=this.binaryZeroPad().split(""),t=BigInt(`0b${e.slice(96,128).join("")}`).toString(16).padStart(8,"0");if(this.subnetMask>=96){let r=this.subnetMask-96,n=[];for(let s=0;s<8;s+=2)n.push(parseInt(t.slice(s,s+2),16));return new Ft.Address4(`${n.join(".")}/${r}`)}return Ft.Address4.fromHex(t)}to4in6(){let e=this.to4(),r=new i(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),n="";return/:$/.test(r)||(n=":"),r+n+e.correctForm()}inspectTeredo(){let e=this.getBitsBase16(0,32),r=(this.getBits(80,96)^BigInt("0xffff")).toString(),n=Ft.Address4.fromHex(this.getBitsBase16(32,64)),s=this.getBits(96,128),o=Ft.Address4.fromHex((s^BigInt("0xffffffff")).toString(16).padStart(8,"0")),a=this.getBitsBase2(64,80),l=(0,gs.testBit)(a,15),c=(0,gs.testBit)(a,14),u=(0,gs.testBit)(a,8),f=(0,gs.testBit)(a,9),h=BigInt(`0b${a.slice(2,6)+a.slice(8,16)}`).toString(10);return{prefix:`${e.slice(0,4)}:${e.slice(4,8)}`,server4:n.address,client4:o.address,flags:a,coneNat:l,microsoft:{reserved:c,universalLocal:f,groupIndividual:u,nonce:h},udpPort:r}}inspect6to4(){let e=this.getBitsBase16(0,16),t=Ft.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:e.slice(0,4),gateway:t.address}}to6to4(){if(!this.is4())return null;let e=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new i(e)}static fromAddress4Nat64(e,t="64:ff9b::/96"){let r=new Ft.Address4(e),n=new i(t),s=n.subnetMask;if(s!==32&&s!==40&&s!==48&&s!==56&&s!==64&&s!==96)throw new Ye.AddressError("NAT64 prefix length must be 32, 40, 48, 56, 64, or 96");let o=n.binaryZeroPad(),a=r.binaryZeroPad(),l;if(s===96)l=o.slice(0,96)+a;else{let f=64-s;l=[o.slice(0,s),a.slice(0,f),"00000000",a.slice(f),"0".repeat(56-(32-f))].join("")}let c=BigInt(`0b${l}`).toString(16).padStart(32,"0"),u=[];for(let f=0;f<8;f++)u.push(c.slice(f*4,(f+1)*4));return new i(u.join(":"))}toAddress4Nat64(e="64:ff9b::/96"){let t=new i(e),r=t.subnetMask;if(r!==32&&r!==40&&r!==48&&r!==56&&r!==64&&r!==96)throw new Ye.AddressError("NAT64 prefix length must be 32, 40, 48, 56, 64, or 96");if(!this.isHostInSubnet(t))return null;let n=this.binaryZeroPad(),s;if(r===96)s=n.slice(96,128);else{let a=64-r;s=n.slice(r,r+a)+n.slice(72,72+(32-a))}let o=[];for(let a=0;a<4;a++)o.push(parseInt(s.slice(a*8,(a+1)*8),2).toString());return new Ft.Address4(o.join("."))}toByteArray(){let e=this.bigInt().toString(16).padStart(te.BITS/4,"0"),t=[];for(let r=0,n=e.length;r<n;r+=2)t.push(parseInt(e.substring(r,r+2),16));return t}toUnsignedByteArray(){return this.toByteArray().map(hm)}static fromByteArray(e){return Dt.assertByteArray(e,16,"IPv6",-128),this.fromUnsignedByteArray(e.map(hm))}static fromUnsignedByteArray(e){Dt.assertByteArray(e,16,"IPv6",0);let t=BigInt("256"),r=BigInt("0"),n=BigInt("1");for(let s=e.length-1;s>=0;s--)r+=n*BigInt(e[s].toString(10)),n*=t;return i.fromBigInt(r)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){let e=this.embeddedIPv4();return e?e.isLinkLocal():this.isHostInSubnet(VS)}isMulticast(){let e=this.embeddedIPv4();if(e)return e.isMulticast();let t=this.getType();return t==="Multicast"||t.startsWith("Multicast ")}is4(){return this.v4}isMapped4(){return this.isHostInSubnet(zS)}embeddedIPv4(){return this.isMapped4()||this.isHostInSubnet(JS)?this.to4():null}isTeredo(){return this.isHostInSubnet(jS)}is6to4(){return this.isHostInSubnet($S)}isLoopback(){let e=this.embeddedIPv4();return e?e.isLoopback():this.getType()==="Loopback"}isULA(){return this.isHostInSubnet(HS)}isPrivate(){let e=this.embeddedIPv4();return e?e.isPrivate():this.isULA()||this.isHostInSubnet(ZS)}isCGNAT(){let e=this.embeddedIPv4();return e?e.isCGNAT():!1}isBroadcast(){let e=this.embeddedIPv4();return e?e.isBroadcast():!1}isUnspecified(){let e=this.embeddedIPv4();return e?e.isUnspecified():this.getType()==="Unspecified"}isDocumentation(){return GS.some(e=>this.isHostInSubnet(e))}isBenchmarking(){let e=this.embeddedIPv4();return e?e.isBenchmarking():this.isHostInSubnet(WS)}isGlobal(){let e=this.embeddedIPv4();return e?e.isGlobal():this.isHostInSubnet(YS)&&Dt.isGloballyReachable.call(this,KS)}href(e){return e===void 0?e="":e=`:${e}`,`http://[${this.correctForm()}]${e}/`}link(e){e||(e={}),e.className===void 0&&(e.className=""),e.prefix===void 0&&(e.prefix="/#address="),e.v4===void 0&&(e.v4=!1);let t=this.correctForm;e.v4&&(t=this.to4in6);let r=t.call(this),n=ki.escapeHtml(`${e.prefix}${r}`),s=ki.escapeHtml(r);if(e.className){let o=ki.escapeHtml(e.className);return`<a href="${n}" class="${o}">${s}</a>`}return`<a href="${n}">${s}</a>`}group(){if(this.elidedGroups===0)return ki.simpleGroup(this.addressMinusSuffix).join(":");ys(typeof this.elidedGroups=="number"),ys(typeof this.elisionBegin=="number");let e=[],[t,r]=this.addressMinusSuffix.split("::");t.length?e.push(...ki.simpleGroup(t)):e.push("");let n=["hover-group"];for(let s=this.elisionBegin;s<this.elisionBegin+this.elidedGroups;s++)n.push(`group-${s}`);return e.push(`<span class="${n.join(" ")}"></span>`),r.length?e.push(...ki.simpleGroup(r,this.elisionEnd)):e.push(""),this.is4()&&(ys(this.address4 instanceof Ft.Address4),e.pop(),e.push(this.address4.groupForV6())),e.join(":")}regularExpressionString(e=!1){let t=[],r=new i(this.correctForm());if(r.elidedGroups===0)t.push((0,Ci.simpleRegularExpression)(r.parsedAddress));else if(r.elidedGroups===te.GROUPS)t.push((0,Ci.possibleElisions)(te.GROUPS));else{let n=r.address.split("::");n[0].length&&t.push((0,Ci.simpleRegularExpression)(n[0].split(":"))),ys(typeof r.elidedGroups=="number"),t.push((0,Ci.possibleElisions)(r.elidedGroups,n[0].length!==0,n[1].length!==0)),n[1].length&&t.push((0,Ci.simpleRegularExpression)(n[1].split(":"))),t=[t.join(":")]}return e||(t=["(?=^|",Ci.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...t,")(?=[^\\w\\:]|",Ci.ADDRESS_BOUNDARY,"|$)"]),t.join("")}regularExpression(e=!1){return new RegExp(this.regularExpressionString(e),"i")}};qt.Address6=Ze;var dm=Object.keys(te.TYPES).map(i=>[new Ze(i),te.TYPES[i]]),jS=new Ze("2001::/32"),$S=new Ze("2002::/16"),HS=new Ze("fc00::/7"),VS=new Ze("fe80::/10"),GS=[new Ze("2001:db8::/32"),new Ze("3fff::/20")],WS=new Ze("2001:2::/48"),YS=new Ze("2000::/3"),KS=te.SPECIAL_PURPOSE.map(([i,,e])=>({subnet:new Ze(i),reachable:e})),zS=new Ze("::ffff:0:0/96"),JS=new Ze("64:ff9b::/96"),ZS=new Ze("64:ff9b:1::/48")});var Nl=w(Qe=>{"use strict";var QS=Qe&&Qe.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),XS=Qe&&Qe.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),e1=Qe&&Qe.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&QS(e,i,t);return XS(e,i),e};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.v6=Qe.AddressError=Qe.Address6=Qe.Address4=void 0;var t1=Cl();Object.defineProperty(Qe,"Address4",{enumerable:!0,get:function(){return t1.Address4}});var i1=pm();Object.defineProperty(Qe,"Address6",{enumerable:!0,get:function(){return i1.Address6}});var r1=zr();Object.defineProperty(Qe,"AddressError",{enumerable:!0,get:function(){return r1.AddressError}});var n1=e1(Il());Qe.v6={helpers:n1}});var bm=w(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.ipToBuffer=wt.int32ToIpv4=wt.ipv4ToInt32=wt.validateSocksClientChainOptions=wt.validateSocksClientOptions=void 0;var tt=Sl(),$e=wl(),s1=require("stream"),Bl=Nl(),mm=require("net");function o1(i,e=["connect","bind","associate"]){if(!$e.SocksCommand[i.command])throw new tt.SocksClientError($e.ERRORS.InvalidSocksCommand,i);if(e.indexOf(i.command)===-1)throw new tt.SocksClientError($e.ERRORS.InvalidSocksCommandForOperation,i);if(!ym(i.destination))throw new tt.SocksClientError($e.ERRORS.InvalidSocksClientOptionsDestination,i);if(!vm(i.proxy))throw new tt.SocksClientError($e.ERRORS.InvalidSocksClientOptionsProxy,i);if(gm(i.proxy,i),i.timeout&&!_m(i.timeout))throw new tt.SocksClientError($e.ERRORS.InvalidSocksClientOptionsTimeout,i);if(i.existing_socket&&!(i.existing_socket instanceof s1.Duplex))throw new tt.SocksClientError($e.ERRORS.InvalidSocksClientOptionsExistingSocket,i)}wt.validateSocksClientOptions=o1;function a1(i){if(i.command!=="connect")throw new tt.SocksClientError($e.ERRORS.InvalidSocksCommandChain,i);if(!ym(i.destination))throw new tt.SocksClientError($e.ERRORS.InvalidSocksClientOptionsDestination,i);if(!(i.proxies&&Array.isArray(i.proxies)&&i.proxies.length>=2))throw new tt.SocksClientError($e.ERRORS.InvalidSocksClientOptionsProxiesLength,i);if(i.proxies.forEach(e=>{if(!vm(e))throw new tt.SocksClientError($e.ERRORS.InvalidSocksClientOptionsProxy,i);gm(e,i)}),i.timeout&&!_m(i.timeout))throw new tt.SocksClientError($e.ERRORS.InvalidSocksClientOptionsTimeout,i)}wt.validateSocksClientChainOptions=a1;function gm(i,e){if(i.custom_auth_method!==void 0){if(i.custom_auth_method<$e.SOCKS5_CUSTOM_AUTH_START||i.custom_auth_method>$e.SOCKS5_CUSTOM_AUTH_END)throw new tt.SocksClientError($e.ERRORS.InvalidSocksClientOptionsCustomAuthRange,e);if(i.custom_auth_request_handler===void 0||typeof i.custom_auth_request_handler!="function")throw new tt.SocksClientError($e.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(i.custom_auth_response_size===void 0)throw new tt.SocksClientError($e.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(i.custom_auth_response_handler===void 0||typeof i.custom_auth_response_handler!="function")throw new tt.SocksClientError($e.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e)}}function ym(i){return i&&typeof i.host=="string"&&Buffer.byteLength(i.host)<256&&typeof i.port=="number"&&i.port>=0&&i.port<=65535}function vm(i){return i&&(typeof i.host=="string"||typeof i.ipaddress=="string")&&typeof i.port=="number"&&i.port>=0&&i.port<=65535&&(i.type===4||i.type===5)}function _m(i){return typeof i=="number"&&i>0}function l1(i){return new Bl.Address4(i).toArray().reduce((t,r)=>(t<<8)+r,0)>>>0}wt.ipv4ToInt32=l1;function c1(i){let e=i>>>24&255,t=i>>>16&255,r=i>>>8&255,n=i&255;return[e,t,r,n].join(".")}wt.int32ToIpv4=c1;function u1(i){if(mm.isIPv4(i)){let e=new Bl.Address4(i);return Buffer.from(e.toArray())}else if(mm.isIPv6(i)){let e=new Bl.Address6(i);return Buffer.from(e.canonicalForm().split(":").map(t=>t.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}wt.ipToBuffer=u1});var wm=w(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.ReceiveBuffer=void 0;var Pl=class{constructor(e=4096){this.buffer=Buffer.allocUnsafe(e),this.offset=0,this.originalSize=e}get length(){return this.offset}append(e){if(!Buffer.isBuffer(e))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+e.length>=this.buffer.length){let t=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length)),t.copy(this.buffer)}return e.copy(this.buffer,this.offset),this.offset+=e.length}peek(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,e)}get(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let t=Buffer.allocUnsafe(e);return this.buffer.slice(0,e).copy(t),this.buffer.copyWithin(0,e,e+this.offset-e),this.offset-=e,t}};_s.ReceiveBuffer=Pl});var xm=w(ri=>{"use strict";var or=ri&&ri.__awaiter||function(i,e,t,r){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?s(u.value):n(u.value).then(a,l)}c((r=r.apply(i,e||[])).next())})};Object.defineProperty(ri,"__esModule",{value:!0});ri.SocksClientError=ri.SocksClient=void 0;var f1=require("events"),ar=require("net"),nt=Xp(),N=wl(),ft=bm(),h1=wm(),Rl=Sl();Object.defineProperty(ri,"SocksClientError",{enumerable:!0,get:function(){return Rl.SocksClientError}});var Ll=Nl(),Ml=class i extends f1.EventEmitter{constructor(e){super(),this.options=Object.assign({},e),(0,ft.validateSocksClientOptions)(e),this.setState(N.SocksClientState.Created)}static createConnection(e,t){return new Promise((r,n)=>{try{(0,ft.validateSocksClientOptions)(e,["connect"])}catch(o){return typeof t=="function"?(t(o),r(o)):n(o)}let s=new i(e);s.connect(e.existing_socket),s.once("established",o=>{s.removeAllListeners(),typeof t=="function"&&t(null,o),r(o)}),s.once("error",o=>{s.removeAllListeners(),typeof t=="function"?(t(o),r(o)):n(o)})})}static createConnectionChain(e,t){return new Promise((r,n)=>or(this,void 0,void 0,function*(){try{(0,ft.validateSocksClientChainOptions)(e)}catch(s){return typeof t=="function"?(t(s),r(s)):n(s)}e.randomizeChain&&(0,Rl.shuffleArray)(e.proxies);try{let s;for(let o=0;o<e.proxies.length;o++){let a=e.proxies[o],l=o===e.proxies.length-1?e.destination:{host:e.proxies[o+1].host||e.proxies[o+1].ipaddress,port:e.proxies[o+1].port},c=yield i.createConnection({command:"connect",proxy:a,destination:l,existing_socket:s});s=s||c.socket}typeof t=="function"?(t(null,{socket:s}),r({socket:s})):r({socket:s})}catch(s){typeof t=="function"?(t(s),r(s)):n(s)}}))}static createUDPFrame(e){let t=new nt.SmartBuffer;return t.writeUInt16BE(0),t.writeUInt8(e.frameNumber||0),ar.isIPv4(e.remoteHost.host)?(t.writeUInt8(N.Socks5HostType.IPv4),t.writeUInt32BE((0,ft.ipv4ToInt32)(e.remoteHost.host))):ar.isIPv6(e.remoteHost.host)?(t.writeUInt8(N.Socks5HostType.IPv6),t.writeBuffer((0,ft.ipToBuffer)(e.remoteHost.host))):(t.writeUInt8(N.Socks5HostType.Hostname),t.writeUInt8(Buffer.byteLength(e.remoteHost.host)),t.writeString(e.remoteHost.host)),t.writeUInt16BE(e.remoteHost.port),t.writeBuffer(e.data),t.toBuffer()}static parseUDPFrame(e){let t=nt.SmartBuffer.fromBuffer(e);t.readOffset=2;let r=t.readUInt8(),n=t.readUInt8(),s;n===N.Socks5HostType.IPv4?s=(0,ft.int32ToIpv4)(t.readUInt32BE()):n===N.Socks5HostType.IPv6?s=Ll.Address6.fromByteArray(Array.from(t.readBuffer(16))).canonicalForm():s=t.readString(t.readUInt8());let o=t.readUInt16BE();return{frameNumber:r,remoteHost:{host:s,port:o},data:t.readBuffer()}}setState(e){this.state!==N.SocksClientState.Error&&(this.state=e)}connect(e){this.onDataReceived=r=>this.onDataReceivedHandler(r),this.onClose=()=>this.onCloseHandler(),this.onError=r=>this.onErrorHandler(r),this.onConnect=()=>this.onConnectHandler();let t=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||N.DEFAULT_TIMEOUT);t.unref&&typeof t.unref=="function"&&t.unref(),e?this.socket=e:this.socket=new ar.Socket,this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(N.SocksClientState.Connecting),this.receiveBuffer=new h1.ReceiveBuffer,e?this.socket.emit("connect"):(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null&&this.socket.setNoDelay(!!this.options.set_tcp_nodelay)),this.prependOnceListener("established",r=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let n=this.receiveBuffer.get(this.receiveBuffer.length);r.socket.emit("data",n)}r.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){this.state!==N.SocksClientState.Established&&this.state!==N.SocksClientState.BoundWaitingForConnection&&this.closeSocket(N.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){this.setState(N.SocksClientState.Connected),this.options.proxy.type===4?this.sendSocks4InitialHandshake():this.sendSocks5InitialHandshake(),this.setState(N.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e),this.processData()}processData(){for(;this.state!==N.SocksClientState.Established&&this.state!==N.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize;)if(this.state===N.SocksClientState.SentInitialHandshake)this.options.proxy.type===4?this.handleSocks4FinalHandshakeResponse():this.handleInitialSocks5HandshakeResponse();else if(this.state===N.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===N.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===N.SocksClientState.BoundWaitingForConnection)this.options.proxy.type===4?this.handleSocks4IncomingConnectionResponse():this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(N.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(N.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(e){this.state!==N.SocksClientState.Error&&(this.setState(N.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new Rl.SocksClientError(e,this.options)))}sendSocks4InitialHandshake(){let e=this.options.proxy.userId||"",t=new nt.SmartBuffer;t.writeUInt8(4),t.writeUInt8(N.SocksCommand[this.options.command]),t.writeUInt16BE(this.options.destination.port),ar.isIPv4(this.options.destination.host)?(t.writeBuffer((0,ft.ipToBuffer)(this.options.destination.host)),t.writeStringNT(e)):(t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(1),t.writeStringNT(e),t.writeStringNT(this.options.destination.host)),this.nextRequiredPacketBufferSize=N.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(t.toBuffer())}handleSocks4FinalHandshakeResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==N.Socks4Response.Granted)this.closeSocket(`${N.ERRORS.Socks4ProxyRejectedConnection} - (${N.Socks4Response[e[1]]})`);else if(N.SocksCommand[this.options.command]===N.SocksCommand.bind){let t=nt.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,ft.int32ToIpv4)(t.readUInt32BE())};r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress),this.setState(N.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:r,socket:this.socket})}else this.setState(N.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==N.Socks4Response.Granted)this.closeSocket(`${N.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${N.Socks4Response[e[1]]})`);else{let t=nt.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,ft.int32ToIpv4)(t.readUInt32BE())};this.setState(N.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}sendSocks5InitialHandshake(){let e=new nt.SmartBuffer,t=[N.Socks5Auth.NoAuth];(this.options.proxy.userId||this.options.proxy.password)&&t.push(N.Socks5Auth.UserPass),this.options.proxy.custom_auth_method!==void 0&&t.push(this.options.proxy.custom_auth_method),e.writeUInt8(5),e.writeUInt8(t.length);for(let r of t)e.writeUInt8(r);this.nextRequiredPacketBufferSize=N.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(e.toBuffer()),this.setState(N.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let e=this.receiveBuffer.get(2);e[0]!==5?this.closeSocket(N.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion):e[1]===N.SOCKS5_NO_ACCEPTABLE_AUTH?this.closeSocket(N.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType):e[1]===N.Socks5Auth.NoAuth?(this.socks5ChosenAuthType=N.Socks5Auth.NoAuth,this.sendSocks5CommandRequest()):e[1]===N.Socks5Auth.UserPass?(this.socks5ChosenAuthType=N.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication()):e[1]===this.options.proxy.custom_auth_method?(this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication()):this.closeSocket(N.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let e=this.options.proxy.userId||"",t=this.options.proxy.password||"",r=new nt.SmartBuffer;r.writeUInt8(1),r.writeUInt8(Buffer.byteLength(e)),r.writeString(e),r.writeUInt8(Buffer.byteLength(t)),r.writeString(t),this.nextRequiredPacketBufferSize=N.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(r.toBuffer()),this.setState(N.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return or(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(N.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(e){return or(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(e)})}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return or(this,void 0,void 0,function*(){return e[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(e){return or(this,void 0,void 0,function*(){return e[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return or(this,void 0,void 0,function*(){this.setState(N.SocksClientState.ReceivedAuthenticationResponse);let e=!1;this.socks5ChosenAuthType===N.Socks5Auth.NoAuth?e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===N.Socks5Auth.UserPass?e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===this.options.proxy.custom_auth_method&&(e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))),e?this.sendSocks5CommandRequest():this.closeSocket(N.ERRORS.Socks5AuthenticationFailed)})}sendSocks5CommandRequest(){let e=new nt.SmartBuffer;e.writeUInt8(5),e.writeUInt8(N.SocksCommand[this.options.command]),e.writeUInt8(0),ar.isIPv4(this.options.destination.host)?(e.writeUInt8(N.Socks5HostType.IPv4),e.writeBuffer((0,ft.ipToBuffer)(this.options.destination.host))):ar.isIPv6(this.options.destination.host)?(e.writeUInt8(N.Socks5HostType.IPv6),e.writeBuffer((0,ft.ipToBuffer)(this.options.destination.host))):(e.writeUInt8(N.Socks5HostType.Hostname),e.writeUInt8(this.options.destination.host.length),e.writeString(this.options.destination.host)),e.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(e.toBuffer()),this.setState(N.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==N.Socks5Response.Granted)this.closeSocket(`${N.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${N.Socks5Response[e[1]]}`);else{let t=e[3],r,n;if(t===N.Socks5HostType.IPv4){let s=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=nt.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),r={host:(0,ft.int32ToIpv4)(n.readUInt32BE()),port:n.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===N.Socks5HostType.Hostname){let s=e[4],o=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(s);if(this.receiveBuffer.length<o){this.nextRequiredPacketBufferSize=o;return}n=nt.SmartBuffer.fromBuffer(this.receiveBuffer.get(o).slice(5)),r={host:n.readString(s),port:n.readUInt16BE()}}else if(t===N.Socks5HostType.IPv6){let s=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=nt.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),r={host:Ll.Address6.fromByteArray(Array.from(n.readBuffer(16))).canonicalForm(),port:n.readUInt16BE()}}this.setState(N.SocksClientState.ReceivedFinalResponse),N.SocksCommand[this.options.command]===N.SocksCommand.connect?(this.setState(N.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})):N.SocksCommand[this.options.command]===N.SocksCommand.bind?(this.setState(N.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:r,socket:this.socket})):N.SocksCommand[this.options.command]===N.SocksCommand.associate&&(this.setState(N.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket}))}}handleSocks5IncomingConnectionResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==N.Socks5Response.Granted)this.closeSocket(`${N.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${N.Socks5Response[e[1]]}`);else{let t=e[3],r,n;if(t===N.Socks5HostType.IPv4){let s=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=nt.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),r={host:(0,ft.int32ToIpv4)(n.readUInt32BE()),port:n.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===N.Socks5HostType.Hostname){let s=e[4],o=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(s);if(this.receiveBuffer.length<o){this.nextRequiredPacketBufferSize=o;return}n=nt.SmartBuffer.fromBuffer(this.receiveBuffer.get(o).slice(5)),r={host:n.readString(s),port:n.readUInt16BE()}}else if(t===N.Socks5HostType.IPv6){let s=N.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<s){this.nextRequiredPacketBufferSize=s;return}n=nt.SmartBuffer.fromBuffer(this.receiveBuffer.get(s).slice(4)),r={host:Ll.Address6.fromByteArray(Array.from(n.readBuffer(16))).canonicalForm(),port:n.readUInt16BE()}}this.setState(N.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}};ri.SocksClient=Ml});var Sm=w(Ai=>{"use strict";var d1=Ai&&Ai.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),p1=Ai&&Ai.__exportStar||function(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&d1(e,i,t)};Object.defineProperty(Ai,"__esModule",{value:!0});p1(xm(),Ai)});var Em=w(xt=>{"use strict";var m1=xt&&xt.__createBinding||(Object.create?(function(i,e,t,r){r===void 0&&(r=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,r,n)}):(function(i,e,t,r){r===void 0&&(r=t),i[r]=e[t]})),g1=xt&&xt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),Fl=xt&&xt.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&m1(e,i,t);return g1(e,i),e},y1=xt&&xt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(xt,"__esModule",{value:!0});xt.SocksProxyAgent=void 0;var v1=Sm(),_1=ka(),b1=y1(Dr()),w1=Fl(require("dns")),x1=Fl(require("net")),S1=Fl(require("tls")),E1=require("url"),bs=(0,b1.default)("socks-proxy-agent"),O1=i=>i.servername===void 0&&i.host&&!x1.isIP(i.host)?{...i,servername:i.host}:i;function k1(i){let e=!1,t=5,r=i.hostname,n=parseInt(i.port,10)||1080;switch(i.protocol.replace(":","")){case"socks4":e=!0,t=4;break;case"socks4a":t=4;break;case"socks5":e=!0,t=5;break;case"socks":t=5;break;case"socks5h":t=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${String(i.protocol)}`)}let s={host:r,port:n,type:t};return i.username&&Object.defineProperty(s,"userId",{value:decodeURIComponent(i.username),enumerable:!1}),i.password!=null&&Object.defineProperty(s,"password",{value:decodeURIComponent(i.password),enumerable:!1}),{lookup:e,proxy:s}}var ws=class extends _1.Agent{constructor(e,t){var o,a;super(t);let r=typeof e=="string"?new E1.URL(e):e,{proxy:n,lookup:s}=k1(r);this.shouldLookup=s,this.proxy=n,this.timeout=(o=t==null?void 0:t.timeout)!=null?o:null,this.socketOptions=(a=t==null?void 0:t.socketOptions)!=null?a:null}async connect(e,t){var h;let{shouldLookup:r,proxy:n,timeout:s}=this;if(!t.host)throw new Error("No `host` defined!");let{host:o}=t,{port:a,lookup:l=w1.lookup}=t;r&&(o=await new Promise((p,m)=>{l(o,{},(d,g)=>{d?m(d):p(g)})}));let c={proxy:n,destination:{host:o,port:typeof a=="number"?a:parseInt(a,10)},command:"connect",timeout:s!=null?s:void 0,socket_options:(h=this.socketOptions)!=null?h:void 0},u=p=>{e.destroy(),f.destroy(),p&&p.destroy()};bs("Creating socks proxy connection: %o",c);let{socket:f}=await v1.SocksClient.createConnection(c);if(bs("Successfully created socks proxy connection"),s!==null&&(f.setTimeout(s),f.on("timeout",()=>u())),t.secureEndpoint){bs("Upgrading socket connection to TLS");let p=S1.connect({...C1(O1(t),"host","path","port"),socket:f});return p.once("error",m=>{bs("Socket TLS error",m.message),u(p)}),p}return f}};ws.protocols=["socks","socks4","socks4a","socks5","socks5h"];xt.SocksProxyAgent=ws;function C1(i,...e){let t={},r;for(r in i)e.includes(r)||(t[r]=i[r]);return t}});var Kt=w((GN,Cm)=>{"use strict";var Om=["nodebuffer","arraybuffer","fragments"],km=typeof Blob!="undefined";km&&Om.push("blob");Cm.exports={BINARY_TYPES:Om,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:km,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Jr=w((WN,xs)=>{"use strict";var{EMPTY_BUFFER:A1}=Kt(),Dl=Buffer[Symbol.species];function I1(i,e){if(i.length===0)return A1;if(i.length===1)return i[0];let t=Buffer.allocUnsafe(e),r=0;for(let n=0;n<i.length;n++){let s=i[n];t.set(s,r),r+=s.length}return r<e?new Dl(t.buffer,t.byteOffset,r):t}function Am(i,e,t,r,n){for(let s=0;s<n;s++)t[r+s]=i[s]^e[s&3]}function Im(i,e){for(let t=0;t<i.length;t++)i[t]^=e[t&3]}function T1(i){return i.length===i.buffer.byteLength?i.buffer:i.buffer.slice(i.byteOffset,i.byteOffset+i.length)}function ql(i){if(ql.readOnly=!0,Buffer.isBuffer(i))return i;let e;return i instanceof ArrayBuffer?e=new Dl(i):ArrayBuffer.isView(i)?e=new Dl(i.buffer,i.byteOffset,i.byteLength):(e=Buffer.from(i),ql.readOnly=!1),e}xs.exports={concat:I1,mask:Am,toArrayBuffer:T1,toBuffer:ql,unmask:Im};if(!process.env.WS_NO_BUFFER_UTIL)try{let i=require("bufferutil");xs.exports.mask=function(e,t,r,n,s){s<48?Am(e,t,r,n,s):i.mask(e,t,r,n,s)},xs.exports.unmask=function(e,t){e.length<32?Im(e,t):i.unmask(e,t)}}catch{}});var Bm=w((YN,Nm)=>{"use strict";var Tm=Symbol("kDone"),Ul=Symbol("kRun"),jl=class{constructor(e){this[Tm]=()=>{this.pending--,this[Ul]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Ul]()}[Ul](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Tm])}}};Nm.exports=jl});var ur=w((KN,Mm)=>{"use strict";var Zr=require("zlib"),Pm=Jr(),N1=Bm(),{kStatusCode:Lm}=Kt(),B1=Buffer[Symbol.species],P1=Buffer.from([0,0,255,255]),Es=Symbol("permessage-deflate"),zt=Symbol("total-length"),lr=Symbol("callback"),ni=Symbol("buffers"),cr=Symbol("error"),Ss,$l=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!Ss){let t=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Ss=new N1(t)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[lr];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,r=e.find(n=>!(t.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>n.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(r.server_no_context_takeover=!0),t.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(r.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?r.client_max_window_bits=t.clientMaxWindowBits:(r.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return t}normalizeParams(e){return e.forEach(t=>{Object.keys(t).forEach(r=>{let n=t[r];if(n.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(n=n[0],r==="client_max_window_bits"){if(n!==!0){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${n}`);n=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${n}`)}else if(r==="server_max_window_bits"){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${n}`);n=s}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${n}`)}else throw new Error(`Unknown parameter "${r}"`);t[r]=n})}),e}decompress(e,t,r){Ss.add(n=>{this._decompress(e,t,(s,o)=>{n(),r(s,o)})})}compress(e,t,r){Ss.add(n=>{this._compress(e,t,(s,o)=>{n(),r(s,o)})})}_decompress(e,t,r){let n=this._isServer?"client":"server";if(!this._inflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?Zr.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=Zr.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[Es]=this,this._inflate[zt]=0,this._inflate[ni]=[],this._inflate.on("error",R1),this._inflate.on("data",Rm)}this._inflate[lr]=r,this._inflate.write(e),t&&this._inflate.write(P1),this._inflate.flush(()=>{let s=this._inflate[cr];if(s){this._inflate.close(),this._inflate=null,r(s);return}let o=Pm.concat(this._inflate[ni],this._inflate[zt]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[zt]=0,this._inflate[ni]=[],t&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,t,r){let n=this._isServer?"server":"client";if(!this._deflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?Zr.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=Zr.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[zt]=0,this._deflate[ni]=[],this._deflate.on("data",L1)}this._deflate[lr]=r,this._deflate.write(e),this._deflate.flush(Zr.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=Pm.concat(this._deflate[ni],this._deflate[zt]);t&&(s=new B1(s.buffer,s.byteOffset,s.length-4)),this._deflate[lr]=null,this._deflate[zt]=0,this._deflate[ni]=[],t&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),r(null,s)})}};Mm.exports=$l;function L1(i){this[ni].push(i),this[zt]+=i.length}function Rm(i){if(this[zt]+=i.length,this[Es]._maxPayload<1||this[zt]<=this[Es]._maxPayload){this[ni].push(i);return}this[cr]=new RangeError("Max payload size exceeded"),this[cr].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[cr][Lm]=1009,this.removeListener("data",Rm),this.reset()}function R1(i){if(this[Es]._inflate=null,this[cr]){this[lr](this[cr]);return}i[Lm]=1007,this[lr](i)}});var fr=w((zN,Os)=>{"use strict";var{isUtf8:Fm}=require("buffer"),{hasBlob:M1}=Kt(),F1=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function D1(i){return i>=1e3&&i<=1014&&i!==1004&&i!==1005&&i!==1006||i>=3e3&&i<=4999}function Hl(i){let e=i.length,t=0;for(;t<e;)if((i[t]&128)===0)t++;else if((i[t]&224)===192){if(t+1===e||(i[t+1]&192)!==128||(i[t]&254)===192)return!1;t+=2}else if((i[t]&240)===224){if(t+2>=e||(i[t+1]&192)!==128||(i[t+2]&192)!==128||i[t]===224&&(i[t+1]&224)===128||i[t]===237&&(i[t+1]&224)===160)return!1;t+=3}else if((i[t]&248)===240){if(t+3>=e||(i[t+1]&192)!==128||(i[t+2]&192)!==128||(i[t+3]&192)!==128||i[t]===240&&(i[t+1]&240)===128||i[t]===244&&i[t+1]>143||i[t]>244)return!1;t+=4}else return!1;return!0}function q1(i){return M1&&typeof i=="object"&&typeof i.arrayBuffer=="function"&&typeof i.type=="string"&&typeof i.stream=="function"&&(i[Symbol.toStringTag]==="Blob"||i[Symbol.toStringTag]==="File")}Os.exports={isBlob:q1,isValidStatusCode:D1,isValidUTF8:Hl,tokenChars:F1};if(Fm)Os.exports.isValidUTF8=function(i){return i.length<24?Hl(i):Fm(i)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let i=require("utf-8-validate");Os.exports.isValidUTF8=function(e){return e.length<32?Hl(e):i(e)}}catch{}});var Kl=w((JN,Vm)=>{"use strict";var{Writable:U1}=require("stream"),Dm=ur(),{BINARY_TYPES:j1,EMPTY_BUFFER:qm,kStatusCode:$1,kWebSocket:H1}=Kt(),{concat:Vl,toArrayBuffer:V1,unmask:G1}=Jr(),{isValidStatusCode:W1,isValidUTF8:Um}=fr(),ks=Buffer[Symbol.species],St=0,jm=1,$m=2,Hm=3,Gl=4,Wl=5,Cs=6,Yl=class extends U1{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||j1[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[H1]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=St}_write(e,t,r){if(this._opcode===8&&this._state==St)return r();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){r(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new ks(r.buffer,r.byteOffset+e,r.length-e),new ks(r.buffer,r.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let r=this._buffers[0],n=t.length-e;e>=r.length?t.set(this._buffers.shift(),n):(t.set(new Uint8Array(r.buffer,r.byteOffset,e),n),this._buffers[0]=new ks(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case St:this.getInfo(e);break;case jm:this.getPayloadLength16(e);break;case $m:this.getPayloadLength64(e);break;case Hm:this.getMask();break;case Gl:this.getData(e);break;case Wl:case Cs:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if((t[0]&48)!==0){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(n);return}let r=(t[0]&64)===64;if(r&&!this._extensions[Dm.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(r){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(n);return}if(r){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(n);return}this._payloadLength===126?this._state=jm:this._payloadLength===127?this._state=$m:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),r=t.readUInt32BE(0);if(r>Math.pow(2,21)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(n);return}this._payloadLength=r*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(t);return}this._masked?this._state=Hm:this._state=Gl}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Gl}getData(e){let t=qm;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&G1(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=Wl,this.decompress(t,e);return}if(t.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let r=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");e(r);return}this._messageLength=this._totalPayloadLength,this._fragments.push(t)}this.dataMessage(e)}decompress(e,t){this._extensions[Dm.extensionName].decompress(e,this._fin,(n,s)=>{if(n)return t(n);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(o);return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let o=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");t(o);return}this._fragments.push(s)}this.dataMessage(t),this._state===St&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=St;return}let t=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=Vl(r,t):this._binaryType==="arraybuffer"?n=V1(Vl(r,t)):this._binaryType==="blob"?n=new Blob(r):n=r,this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=St):(this._state=Cs,setImmediate(()=>{this.emit("message",n,!0),this._state=St,this.startLoop(e)}))}else{let n=Vl(r,t);if(!this._skipUTF8Validation&&!Um(n)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(s);return}this._state===Wl||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=St):(this._state=Cs,setImmediate(()=>{this.emit("message",n,!1),this._state=St,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,qm),this.end();else{let r=e.readUInt16BE(0);if(!W1(r)){let s=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(s);return}let n=new ks(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Um(n)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(s);return}this._loop=!1,this.emit("conclude",r,n),this.end()}this._state=St;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=St):(this._state=Cs,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=St,this.startLoop(t)}))}createError(e,t,r,n,s){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=s,o[$1]=n,o}};Vm.exports=Yl});var Zl=w((QN,Ym)=>{"use strict";var{Duplex:ZN}=require("stream"),{randomFillSync:Y1}=require("crypto"),{types:{isUint8Array:K1}}=require("util"),Gm=ur(),{EMPTY_BUFFER:z1,kWebSocket:J1,NOOP:Z1}=Kt(),{isBlob:hr,isValidStatusCode:Q1}=fr(),{mask:Wm,toBuffer:Ii}=Jr(),Et=Symbol("kByteLength"),X1=Buffer.alloc(4),As=8*1024,Ti,dr=As,Tt=0,eE=1,tE=2,zl=class i{constructor(e,t,r){this._extensions=t||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=Tt,this.onerror=Z1,this[J1]=void 0}static frame(e,t){let r,n=!1,s=2,o=!1;t.mask&&(r=t.maskBuffer||X1,t.generateMask?t.generateMask(r):(dr===As&&(Ti===void 0&&(Ti=Buffer.alloc(As)),Y1(Ti,0,As),dr=0),r[0]=Ti[dr++],r[1]=Ti[dr++],r[2]=Ti[dr++],r[3]=Ti[dr++]),o=(r[0]|r[1]|r[2]|r[3])===0,s=6);let a;typeof e=="string"?(!t.mask||o)&&t[Et]!==void 0?a=t[Et]:(e=Buffer.from(e),a=e.length):(a=e.length,n=t.mask&&t.readOnly&&!o);let l=a;a>=65536?(s+=8,l=127):a>125&&(s+=2,l=126);let c=Buffer.allocUnsafe(n?a+s:s);return c[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(c[0]|=64),c[1]=l,l===126?c.writeUInt16BE(a,2):l===127&&(c[2]=c[3]=0,c.writeUIntBE(a,4,6)),t.mask?(c[1]|=128,c[s-4]=r[0],c[s-3]=r[1],c[s-2]=r[2],c[s-1]=r[3],o?[c,e]:n?(Wm(e,r,c,s,a),[c]):(Wm(e,r,e,0,a),[c,e])):[c,e]}close(e,t,r,n){let s;if(e===void 0)s=z1;else{if(typeof e!="number"||!Q1(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let a=Buffer.byteLength(t);if(a>123)throw new RangeError("The message must not be greater than 123 bytes");if(s=Buffer.allocUnsafe(2+a),s.writeUInt16BE(e,0),typeof t=="string")s.write(t,2);else if(K1(t))s.set(t,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let o={[Et]:s.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==Tt?this.enqueue([this.dispatch,s,!1,o,n]):this.sendFrame(i.frame(s,o),n)}ping(e,t,r){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):hr(e)?(n=e.size,s=!1):(e=Ii(e),n=e.length,s=Ii.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[Et]:n,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};hr(e)?this._state!==Tt?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==Tt?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(i.frame(e,o),r)}pong(e,t,r){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):hr(e)?(n=e.size,s=!1):(e=Ii(e),n=e.length,s=Ii.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[Et]:n,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};hr(e)?this._state!==Tt?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==Tt?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(i.frame(e,o),r)}send(e,t,r){let n=this._extensions[Gm.extensionName],s=t.binary?2:1,o=t.compress,a,l;typeof e=="string"?(a=Buffer.byteLength(e),l=!1):hr(e)?(a=e.size,l=!1):(e=Ii(e),a=e.length,l=Ii.readOnly),this._firstFragment?(this._firstFragment=!1,o&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=a>=n._threshold),this._compress=o):(o=!1,s=0),t.fin&&(this._firstFragment=!0);let c={[Et]:a,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:l,rsv1:o};hr(e)?this._state!==Tt?this.enqueue([this.getBlobData,e,this._compress,c,r]):this.getBlobData(e,this._compress,c,r):this._state!==Tt?this.enqueue([this.dispatch,e,this._compress,c,r]):this.dispatch(e,this._compress,c,r)}getBlobData(e,t,r,n){this._bufferedBytes+=r[Et],this._state=tE,e.arrayBuffer().then(s=>{if(this._socket.destroyed){let a=new Error("The socket was closed while the blob was being read");process.nextTick(Jl,this,a,n);return}this._bufferedBytes-=r[Et];let o=Ii(s);t?this.dispatch(o,t,r,n):(this._state=Tt,this.sendFrame(i.frame(o,r),n),this.dequeue())}).catch(s=>{process.nextTick(iE,this,s,n)})}dispatch(e,t,r,n){if(!t){this.sendFrame(i.frame(e,r),n);return}let s=this._extensions[Gm.extensionName];this._bufferedBytes+=r[Et],this._state=eE,s.compress(e,r.fin,(o,a)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");Jl(this,l,n);return}this._bufferedBytes-=r[Et],this._state=Tt,r.readOnly=!1,this.sendFrame(i.frame(a,r),n),this.dequeue()})}dequeue(){for(;this._state===Tt&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][Et],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][Et],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};Ym.exports=zl;function Jl(i,e,t){typeof t=="function"&&t(e);for(let r=0;r<i._queue.length;r++){let n=i._queue[r],s=n[n.length-1];typeof s=="function"&&s(e)}}function iE(i,e,t){Jl(i,e,t),i.onerror(e)}});var ig=w((XN,tg)=>{"use strict";var{kForOnEventAttribute:Qr,kListener:Ql}=Kt(),Km=Symbol("kCode"),zm=Symbol("kData"),Jm=Symbol("kError"),Zm=Symbol("kMessage"),Qm=Symbol("kReason"),pr=Symbol("kTarget"),Xm=Symbol("kType"),eg=Symbol("kWasClean"),Jt=class{constructor(e){this[pr]=null,this[Xm]=e}get target(){return this[pr]}get type(){return this[Xm]}};Object.defineProperty(Jt.prototype,"target",{enumerable:!0});Object.defineProperty(Jt.prototype,"type",{enumerable:!0});var Ni=class extends Jt{constructor(e,t={}){super(e),this[Km]=t.code===void 0?0:t.code,this[Qm]=t.reason===void 0?"":t.reason,this[eg]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Km]}get reason(){return this[Qm]}get wasClean(){return this[eg]}};Object.defineProperty(Ni.prototype,"code",{enumerable:!0});Object.defineProperty(Ni.prototype,"reason",{enumerable:!0});Object.defineProperty(Ni.prototype,"wasClean",{enumerable:!0});var mr=class extends Jt{constructor(e,t={}){super(e),this[Jm]=t.error===void 0?null:t.error,this[Zm]=t.message===void 0?"":t.message}get error(){return this[Jm]}get message(){return this[Zm]}};Object.defineProperty(mr.prototype,"error",{enumerable:!0});Object.defineProperty(mr.prototype,"message",{enumerable:!0});var Xr=class extends Jt{constructor(e,t={}){super(e),this[zm]=t.data===void 0?null:t.data}get data(){return this[zm]}};Object.defineProperty(Xr.prototype,"data",{enumerable:!0});var rE={addEventListener(i,e,t={}){for(let n of this.listeners(i))if(!t[Qr]&&n[Ql]===e&&!n[Qr])return;let r;if(i==="message")r=function(s,o){let a=new Xr("message",{data:o?s:s.toString()});a[pr]=this,Is(e,this,a)};else if(i==="close")r=function(s,o){let a=new Ni("close",{code:s,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[pr]=this,Is(e,this,a)};else if(i==="error")r=function(s){let o=new mr("error",{error:s,message:s.message});o[pr]=this,Is(e,this,o)};else if(i==="open")r=function(){let s=new Jt("open");s[pr]=this,Is(e,this,s)};else return;r[Qr]=!!t[Qr],r[Ql]=e,t.once?this.once(i,r):this.on(i,r)},removeEventListener(i,e){for(let t of this.listeners(i))if(t[Ql]===e&&!t[Qr]){this.removeListener(i,t);break}}};tg.exports={CloseEvent:Ni,ErrorEvent:mr,Event:Jt,EventTarget:rE,MessageEvent:Xr};function Is(i,e,t){typeof i=="object"&&i.handleEvent?i.handleEvent.call(i,t):i.call(e,t)}});var Ts=w((eB,rg)=>{"use strict";var{tokenChars:en}=fr();function Ut(i,e,t){i[e]===void 0?i[e]=[t]:i[e].push(t)}function nE(i){let e=Object.create(null),t=Object.create(null),r=!1,n=!1,s=!1,o,a,l=-1,c=-1,u=-1,f=0;for(;f<i.length;f++)if(c=i.charCodeAt(f),o===void 0)if(u===-1&&en[c]===1)l===-1&&(l=f);else if(f!==0&&(c===32||c===9))u===-1&&l!==-1&&(u=f);else if(c===59||c===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1&&(u=f);let p=i.slice(l,u);c===44?(Ut(e,p,t),t=Object.create(null)):o=p,l=u=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);else if(a===void 0)if(u===-1&&en[c]===1)l===-1&&(l=f);else if(c===32||c===9)u===-1&&l!==-1&&(u=f);else if(c===59||c===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1&&(u=f),Ut(t,i.slice(l,u),!0),c===44&&(Ut(e,o,t),t=Object.create(null),o=void 0),l=u=-1}else if(c===61&&l!==-1&&u===-1)a=i.slice(l,f),l=u=-1;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(n){if(en[c]!==1)throw new SyntaxError(`Unexpected character at index ${f}`);l===-1?l=f:r||(r=!0),n=!1}else if(s)if(en[c]===1)l===-1&&(l=f);else if(c===34&&l!==-1)s=!1,u=f;else if(c===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(c===34&&i.charCodeAt(f-1)===61)s=!0;else if(u===-1&&en[c]===1)l===-1&&(l=f);else if(l!==-1&&(c===32||c===9))u===-1&&(u=f);else if(c===59||c===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1&&(u=f);let p=i.slice(l,u);r&&(p=p.replace(/\\/g,""),r=!1),Ut(t,a,p),c===44&&(Ut(e,o,t),t=Object.create(null),o=void 0),a=void 0,l=u=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);if(l===-1||s||c===32||c===9)throw new SyntaxError("Unexpected end of input");u===-1&&(u=f);let h=i.slice(l,u);return o===void 0?Ut(e,h,t):(a===void 0?Ut(t,h,!0):r?Ut(t,a,h.replace(/\\/g,"")):Ut(t,a,h),Ut(e,o,t)),e}function sE(i){return Object.keys(i).map(e=>{let t=i[e];return Array.isArray(t)||(t=[t]),t.map(r=>[e].concat(Object.keys(r).map(n=>{let s=r[n];return Array.isArray(s)||(s=[s]),s.map(o=>o===!0?n:`${n}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}rg.exports={format:sE,parse:nE}});var Ls=w((rB,mg)=>{"use strict";var oE=require("events"),aE=require("https"),lE=require("http"),og=require("net"),cE=require("tls"),{randomBytes:uE,createHash:fE}=require("crypto"),{Duplex:tB,Readable:iB}=require("stream"),{URL:Xl}=require("url"),si=ur(),hE=Kl(),dE=Zl(),{isBlob:pE}=fr(),{BINARY_TYPES:ng,CLOSE_TIMEOUT:mE,EMPTY_BUFFER:Ns,GUID:gE,kForOnEventAttribute:ec,kListener:yE,kStatusCode:vE,kWebSocket:He,NOOP:ag}=Kt(),{EventTarget:{addEventListener:_E,removeEventListener:bE}}=ig(),{format:wE,parse:xE}=Ts(),{toBuffer:SE}=Jr(),lg=Symbol("kAborted"),tc=[8,13],Zt=["CONNECTING","OPEN","CLOSING","CLOSED"],EE=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,Ce=class i extends oE{constructor(e,t,r){super(),this._binaryType=ng[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Ns,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=i.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,t===void 0?t=[]:Array.isArray(t)||(typeof t=="object"&&t!==null?(r=t,t=[]):t=[t]),cg(this,e,t,r)):(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){ng.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,r){let n=new hE({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),s=new dE(e,this._extensions,r.generateMask);this._receiver=n,this._sender=s,this._socket=e,n[He]=this,s[He]=this,e[He]=this,n.on("conclude",CE),n.on("drain",AE),n.on("error",IE),n.on("message",TE),n.on("ping",NE),n.on("pong",BE),s.onerror=PE,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",hg),e.on("data",Ps),e.on("end",dg),e.on("error",pg),this._readyState=i.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=i.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[si.extensionName]&&this._extensions[si.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=i.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==i.CLOSED){if(this.readyState===i.CONNECTING){ht(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===i.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=i.CLOSING,this._sender.close(e,t,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),fg(this)}}pause(){this.readyState===i.CONNECTING||this.readyState===i.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,r){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=t=void 0):typeof t=="function"&&(r=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){ic(this,e,r);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||Ns,t,r)}pong(e,t,r){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=t=void 0):typeof t=="function"&&(r=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){ic(this,e,r);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||Ns,t,r)}resume(){this.readyState===i.CONNECTING||this.readyState===i.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,r){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(r=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==i.OPEN){ic(this,e,r);return}let n={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[si.extensionName]||(n.compress=!1),this._sender.send(e||Ns,n,r)}terminate(){if(this.readyState!==i.CLOSED){if(this.readyState===i.CONNECTING){ht(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=i.CLOSING,this._socket.destroy())}}};Object.defineProperty(Ce,"CONNECTING",{enumerable:!0,value:Zt.indexOf("CONNECTING")});Object.defineProperty(Ce.prototype,"CONNECTING",{enumerable:!0,value:Zt.indexOf("CONNECTING")});Object.defineProperty(Ce,"OPEN",{enumerable:!0,value:Zt.indexOf("OPEN")});Object.defineProperty(Ce.prototype,"OPEN",{enumerable:!0,value:Zt.indexOf("OPEN")});Object.defineProperty(Ce,"CLOSING",{enumerable:!0,value:Zt.indexOf("CLOSING")});Object.defineProperty(Ce.prototype,"CLOSING",{enumerable:!0,value:Zt.indexOf("CLOSING")});Object.defineProperty(Ce,"CLOSED",{enumerable:!0,value:Zt.indexOf("CLOSED")});Object.defineProperty(Ce.prototype,"CLOSED",{enumerable:!0,value:Zt.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(i=>{Object.defineProperty(Ce.prototype,i,{enumerable:!0})});["open","error","close","message"].forEach(i=>{Object.defineProperty(Ce.prototype,`on${i}`,{enumerable:!0,get(){for(let e of this.listeners(i))if(e[ec])return e[yE];return null},set(e){for(let t of this.listeners(i))if(t[ec]){this.removeListener(i,t);break}typeof e=="function"&&this.addEventListener(i,e,{[ec]:!0})}})});Ce.prototype.addEventListener=_E;Ce.prototype.removeEventListener=bE;mg.exports=Ce;function cg(i,e,t,r){let n={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:mE,protocolVersion:tc[1],maxBufferedChunks:1048576,maxFragments:131072,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(i._autoPong=n.autoPong,i._closeTimeout=n.closeTimeout,!tc.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${tc.join(", ")})`);let s;if(e instanceof Xl)s=e;else try{s=new Xl(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),i._url=s.href;let o=s.protocol==="wss:",a=s.protocol==="ws+unix:",l;if(s.protocol!=="ws:"&&!o&&!a?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:a&&!s.pathname?l="The URL's pathname is empty":s.hash&&(l="The URL contains a fragment identifier"),l){let d=new SyntaxError(l);if(i._redirects===0)throw d;Bs(i,d);return}let c=o?443:80,u=uE(16).toString("base64"),f=o?aE.request:lE.request,h=new Set,p;if(n.createConnection=n.createConnection||(o?kE:OE),n.defaultPort=n.defaultPort||c,n.port=s.port||c,n.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},n.path=s.pathname+s.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(p=new si({...n.perMessageDeflate,isServer:!1,maxPayload:n.maxPayload}),n.headers["Sec-WebSocket-Extensions"]=wE({[si.extensionName]:p.offer()})),t.length){for(let d of t){if(typeof d!="string"||!EE.test(d)||h.has(d))throw new SyntaxError("An invalid or duplicated subprotocol was specified");h.add(d)}n.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(s.username||s.password)&&(n.auth=`${s.username}:${s.password}`),a){let d=n.path.split(":");n.socketPath=d[0],n.path=d[1]}let m;if(n.followRedirects){if(i._redirects===0){i._originalIpc=a,i._originalSecure=o,i._originalHostOrSocketPath=a?n.socketPath:s.host;let d=r&&r.headers;if(r={...r,headers:{}},d)for(let[g,v]of Object.entries(d))r.headers[g.toLowerCase()]=v}else if(i.listenerCount("redirect")===0){let d=a?i._originalIpc?n.socketPath===i._originalHostOrSocketPath:!1:i._originalIpc?!1:s.host===i._originalHostOrSocketPath;(!d||i._originalSecure&&!o)&&(delete n.headers.authorization,delete n.headers.cookie,d||delete n.headers.host,n.auth=void 0)}n.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),m=i._req=f(n),i._redirects&&i.emit("redirect",i.url,m)}else m=i._req=f(n);n.timeout&&m.on("timeout",()=>{ht(i,m,"Opening handshake has timed out")}),m.on("error",d=>{m===null||m[lg]||(m=i._req=null,Bs(i,d))}),m.on("response",d=>{let g=d.headers.location,v=d.statusCode;if(g&&n.followRedirects&&v>=300&&v<400){if(++i._redirects>n.maxRedirects){ht(i,m,"Maximum redirects exceeded");return}m.abort();let b;try{b=new Xl(g,e)}catch{let x=new SyntaxError(`Invalid URL: ${g}`);Bs(i,x);return}cg(i,b,t,r)}else i.emit("unexpected-response",m,d)||ht(i,m,`Unexpected server response: ${d.statusCode}`)}),m.on("upgrade",(d,g,v)=>{if(i.emit("upgrade",d),i.readyState!==Ce.CONNECTING)return;m=i._req=null;let b=d.headers.upgrade;if(b===void 0||b.toLowerCase()!=="websocket"){ht(i,g,"Invalid Upgrade header");return}let y=fE("sha1").update(u+gE).digest("base64");if(d.headers["sec-websocket-accept"]!==y){ht(i,g,"Invalid Sec-WebSocket-Accept header");return}let x=d.headers["sec-websocket-protocol"],_;if(x!==void 0?h.size?h.has(x)||(_="Server sent an invalid subprotocol"):_="Server sent a subprotocol but none was requested":h.size&&(_="Server sent no subprotocol"),_){ht(i,g,_);return}x&&(i._protocol=x);let A=d.headers["sec-websocket-extensions"];if(A!==void 0){if(!p){ht(i,g,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let E;try{E=xE(A)}catch{ht(i,g,"Invalid Sec-WebSocket-Extensions header");return}let C=Object.keys(E);if(C.length!==1||C[0]!==si.extensionName){ht(i,g,"Server indicated an extension that was not requested");return}try{p.accept(E[si.extensionName])}catch{ht(i,g,"Invalid Sec-WebSocket-Extensions header");return}i._extensions[si.extensionName]=p}i.setSocket(g,v,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxBufferedChunks:n.maxBufferedChunks,maxFragments:n.maxFragments,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(m,i):m.end()}function Bs(i,e){i._readyState=Ce.CLOSING,i._errorEmitted=!0,i.emit("error",e),i.emitClose()}function OE(i){return i.path=i.socketPath,og.connect(i)}function kE(i){return i.path=void 0,!i.servername&&i.servername!==""&&(i.servername=og.isIP(i.host)?"":i.host),cE.connect(i)}function ht(i,e,t){i._readyState=Ce.CLOSING;let r=new Error(t);Error.captureStackTrace(r,ht),e.setHeader?(e[lg]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Bs,i,r)):(e.destroy(r),e.once("error",i.emit.bind(i,"error")),e.once("close",i.emitClose.bind(i)))}function ic(i,e,t){if(e){let r=pE(e)?e.size:SE(e).length;i._socket?i._sender._bufferedBytes+=r:i._bufferedAmount+=r}if(t){let r=new Error(`WebSocket is not open: readyState ${i.readyState} (${Zt[i.readyState]})`);process.nextTick(t,r)}}function CE(i,e){let t=this[He];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=i,t._socket[He]!==void 0&&(t._socket.removeListener("data",Ps),process.nextTick(ug,t._socket),i===1005?t.close():t.close(i,e))}function AE(){let i=this[He];i.isPaused||i._socket.resume()}function IE(i){let e=this[He];e._socket[He]!==void 0&&(e._socket.removeListener("data",Ps),process.nextTick(ug,e._socket),e.close(i[vE])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",i))}function sg(){this[He].emitClose()}function TE(i,e){this[He].emit("message",i,e)}function NE(i){let e=this[He];e._autoPong&&e.pong(i,!this._isServer,ag),e.emit("ping",i)}function BE(i){this[He].emit("pong",i)}function ug(i){i.resume()}function PE(i){let e=this[He];e.readyState!==Ce.CLOSED&&(e.readyState===Ce.OPEN&&(e._readyState=Ce.CLOSING,fg(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",i)))}function fg(i){i._closeTimer=setTimeout(i._socket.destroy.bind(i._socket),i._closeTimeout)}function hg(){let i=this[He];if(this.removeListener("close",hg),this.removeListener("data",Ps),this.removeListener("end",dg),i._readyState=Ce.CLOSING,!this._readableState.endEmitted&&!i._closeFrameReceived&&!i._receiver._writableState.errorEmitted&&this._readableState.length!==0){let e=this.read(this._readableState.length);i._receiver.write(e)}i._receiver.end(),this[He]=void 0,clearTimeout(i._closeTimer),i._receiver._writableState.finished||i._receiver._writableState.errorEmitted?i.emitClose():(i._receiver.on("error",sg),i._receiver.on("finish",sg))}function Ps(i){this[He]._receiver.write(i)||this.pause()}function dg(){let i=this[He];i._readyState=Ce.CLOSING,i._receiver.end(),this.end()}function pg(){let i=this[He];this.removeListener("error",pg),this.on("error",ag),i&&(i._readyState=Ce.CLOSING,this.destroy())}});var _g=w((sB,vg)=>{"use strict";var nB=Ls(),{Duplex:LE}=require("stream");function gg(i){i.emit("close")}function RE(){!this.destroyed&&this._writableState.finished&&this.destroy()}function yg(i){this.removeListener("error",yg),this.destroy(),this.listenerCount("error")===0&&this.emit("error",i)}function ME(i,e){let t=!0,r=new LE({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return i.on("message",function(s,o){let a=!o&&r._readableState.objectMode?s.toString():s;r.push(a)||i.pause()}),i.once("error",function(s){r.destroyed||(t=!1,r.destroy(s))}),i.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(n,s){if(i.readyState===i.CLOSED){s(n),process.nextTick(gg,r);return}let o=!1;i.once("error",function(l){o=!0,s(l)}),i.once("close",function(){o||s(n),process.nextTick(gg,r)}),t&&i.terminate()},r._final=function(n){if(i.readyState===i.CONNECTING){i.once("open",function(){r._final(n)});return}i._socket!==null&&(i._socket._writableState.finished?(n(),r._readableState.endEmitted&&r.destroy()):(i._socket.once("finish",function(){n()}),i.close()))},r._read=function(){i.isPaused&&i.resume()},r._write=function(n,s,o){if(i.readyState===i.CONNECTING){i.once("open",function(){r._write(n,s,o)});return}i.send(n,o)},r.on("end",RE),r.on("error",yg),r}vg.exports=ME});var rc=w((oB,bg)=>{"use strict";var{tokenChars:FE}=fr();function DE(i){let e=new Set,t=-1,r=-1,n=0;for(n;n<i.length;n++){let o=i.charCodeAt(n);if(r===-1&&FE[o]===1)t===-1&&(t=n);else if(n!==0&&(o===32||o===9))r===-1&&t!==-1&&(r=n);else if(o===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${n}`);r===-1&&(r=n);let a=i.slice(t,r);if(e.has(a))throw new SyntaxError(`The "${a}" subprotocol is duplicated`);e.add(a),t=r=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(t===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let s=i.slice(t,n);if(e.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return e.add(s),e}bg.exports={parse:DE}});var Cg=w((lB,kg)=>{"use strict";var qE=require("events"),Rs=require("http"),{Duplex:aB}=require("stream"),{createHash:UE}=require("crypto"),wg=Ts(),Bi=ur(),jE=rc(),$E=Ls(),{CLOSE_TIMEOUT:HE,GUID:VE,kWebSocket:GE}=Kt(),WE=/^[+/0-9A-Za-z]{22}==$/,xg=0,Sg=1,Og=2,nc=class extends qE{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1024*1024,maxFragments:128*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:HE,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:$E,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=Rs.createServer((r,n)=>{let s=Rs.STATUS_CODES[426];n.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),n.end(s)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=YE(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,s,o)=>{this.handleUpgrade(n,s,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=xg}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Og){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(tn,this);return}if(e&&this.once("close",e),this._state!==Sg)if(this._state=Sg,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(tn,this):process.nextTick(tn,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{tn(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((t!==-1?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,r,n){t.on("error",Eg);let s=e.headers["sec-websocket-key"],o=e.headers.upgrade,a=+e.headers["sec-websocket-version"];if(e.method!=="GET"){Pi(this,e,t,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){Pi(this,e,t,400,"Invalid Upgrade header");return}if(s===void 0||!WE.test(s)){Pi(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(a!==13&&a!==8){Pi(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){rn(t,400);return}let l=e.headers["sec-websocket-protocol"],c=new Set;if(l!==void 0)try{c=jE.parse(l)}catch{Pi(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let u=e.headers["sec-websocket-extensions"],f={};if(this.options.perMessageDeflate&&u!==void 0){let h=new Bi({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let p=wg.parse(u);p[Bi.extensionName]&&(h.accept(p[Bi.extensionName]),f[Bi.extensionName]=h)}catch{Pi(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let h={origin:e.headers[`${a===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(h,(p,m,d,g)=>{if(!p)return rn(t,m||401,d,g);this.completeUpgrade(f,s,c,e,t,r,n)});return}if(!this.options.verifyClient(h))return rn(t,401)}this.completeUpgrade(f,s,c,e,t,r,n)}completeUpgrade(e,t,r,n,s,o,a){if(!s.readable||!s.writable)return s.destroy();if(s[GE])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>xg)return rn(s,503);let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${UE("sha1").update(t+VE).digest("base64")}`],u=new this.options.WebSocket(null,void 0,this.options);if(r.size){let f=this.options.handleProtocols?this.options.handleProtocols(r,n):r.values().next().value;f&&(c.push(`Sec-WebSocket-Protocol: ${f}`),u._protocol=f)}if(e[Bi.extensionName]){let f=e[Bi.extensionName].params,h=wg.format({[Bi.extensionName]:[f]});c.push(`Sec-WebSocket-Extensions: ${h}`),u._extensions=e}this.emit("headers",c,n),s.write(c.concat(`\r
|
|
44
44
|
`).join(`\r
|
|
45
|
-
`)),s.removeListener("error",
|
|
45
|
+
`)),s.removeListener("error",Eg),u.setSocket(s,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(u),u.on("close",()=>{this.clients.delete(u),this._shouldEmitClose&&!this.clients.size&&process.nextTick(tn,this)})),a(u,n)}};kg.exports=nc;function YE(i,e){for(let t of Object.keys(e))i.on(t,e[t]);return function(){for(let r of Object.keys(e))i.removeListener(r,e[r])}}function tn(i){i._state=Og,i.emit("close")}function Eg(){this.destroy()}function rn(i,e,t,r){t=t||Rs.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...r},i.once("finish",i.destroy),i.end(`HTTP/1.1 ${e} ${Rs.STATUS_CODES[e]}\r
|
|
46
46
|
`+Object.keys(r).map(n=>`${n}: ${r[n]}`).join(`\r
|
|
47
47
|
`)+`\r
|
|
48
48
|
\r
|
|
49
|
-
`+t)}function
|
|
50
|
-
`)}};
|
|
51
|
-
`)?
|
|
49
|
+
`+t)}function Pi(i,e,t,r,n,s){if(i.listenerCount("wsClientError")){let o=new Error(n);Error.captureStackTrace(o,Pi),i.emit("wsClientError",o,t,e)}else rn(t,r,n,s)}});var fe=w(Ke=>{"use strict";var lc=Symbol.for("yaml.alias"),Tg=Symbol.for("yaml.document"),Ms=Symbol.for("yaml.map"),Ng=Symbol.for("yaml.pair"),cc=Symbol.for("yaml.scalar"),Fs=Symbol.for("yaml.seq"),Qt=Symbol.for("yaml.node.type"),QE=i=>!!i&&typeof i=="object"&&i[Qt]===lc,XE=i=>!!i&&typeof i=="object"&&i[Qt]===Tg,eO=i=>!!i&&typeof i=="object"&&i[Qt]===Ms,tO=i=>!!i&&typeof i=="object"&&i[Qt]===Ng,Bg=i=>!!i&&typeof i=="object"&&i[Qt]===cc,iO=i=>!!i&&typeof i=="object"&&i[Qt]===Fs;function Pg(i){if(i&&typeof i=="object")switch(i[Qt]){case Ms:case Fs:return!0}return!1}function rO(i){if(i&&typeof i=="object")switch(i[Qt]){case lc:case Ms:case cc:case Fs:return!0}return!1}var nO=i=>(Bg(i)||Pg(i))&&!!i.anchor;Ke.ALIAS=lc;Ke.DOC=Tg;Ke.MAP=Ms;Ke.NODE_TYPE=Qt;Ke.PAIR=Ng;Ke.SCALAR=cc;Ke.SEQ=Fs;Ke.hasAnchor=nO;Ke.isAlias=QE;Ke.isCollection=Pg;Ke.isDocument=XE;Ke.isMap=eO;Ke.isNode=rO;Ke.isPair=tO;Ke.isScalar=Bg;Ke.isSeq=iO});var nn=w(uc=>{"use strict";var De=fe(),st=Symbol("break visit"),Lg=Symbol("skip children"),jt=Symbol("remove node");function Ds(i,e){let t=Rg(e);De.isDocument(i)?gr(null,i.contents,t,Object.freeze([i]))===jt&&(i.contents=null):gr(null,i,t,Object.freeze([]))}Ds.BREAK=st;Ds.SKIP=Lg;Ds.REMOVE=jt;function gr(i,e,t,r){let n=Mg(i,e,t,r);if(De.isNode(n)||De.isPair(n))return Fg(i,r,n),gr(i,n,t,r);if(typeof n!="symbol"){if(De.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){let o=gr(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===st)return st;o===jt&&(e.items.splice(s,1),s-=1)}}}else if(De.isPair(e)){r=Object.freeze(r.concat(e));let s=gr("key",e.key,t,r);if(s===st)return st;s===jt&&(e.key=null);let o=gr("value",e.value,t,r);if(o===st)return st;o===jt&&(e.value=null)}}return n}async function qs(i,e){let t=Rg(e);De.isDocument(i)?await yr(null,i.contents,t,Object.freeze([i]))===jt&&(i.contents=null):await yr(null,i,t,Object.freeze([]))}qs.BREAK=st;qs.SKIP=Lg;qs.REMOVE=jt;async function yr(i,e,t,r){let n=await Mg(i,e,t,r);if(De.isNode(n)||De.isPair(n))return Fg(i,r,n),yr(i,n,t,r);if(typeof n!="symbol"){if(De.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s<e.items.length;++s){let o=await yr(s,e.items[s],t,r);if(typeof o=="number")s=o-1;else{if(o===st)return st;o===jt&&(e.items.splice(s,1),s-=1)}}}else if(De.isPair(e)){r=Object.freeze(r.concat(e));let s=await yr("key",e.key,t,r);if(s===st)return st;s===jt&&(e.key=null);let o=await yr("value",e.value,t,r);if(o===st)return st;o===jt&&(e.value=null)}}return n}function Rg(i){return typeof i=="object"&&(i.Collection||i.Node||i.Value)?Object.assign({Alias:i.Node,Map:i.Node,Scalar:i.Node,Seq:i.Node},i.Value&&{Map:i.Value,Scalar:i.Value,Seq:i.Value},i.Collection&&{Map:i.Collection,Seq:i.Collection},i):i}function Mg(i,e,t,r){var n,s,o,a,l;if(typeof t=="function")return t(i,e,r);if(De.isMap(e))return(n=t.Map)==null?void 0:n.call(t,i,e,r);if(De.isSeq(e))return(s=t.Seq)==null?void 0:s.call(t,i,e,r);if(De.isPair(e))return(o=t.Pair)==null?void 0:o.call(t,i,e,r);if(De.isScalar(e))return(a=t.Scalar)==null?void 0:a.call(t,i,e,r);if(De.isAlias(e))return(l=t.Alias)==null?void 0:l.call(t,i,e,r)}function Fg(i,e,t){let r=e[e.length-1];if(De.isCollection(r))r.items[i]=t;else if(De.isPair(r))i==="key"?r.key=t:r.value=t;else if(De.isDocument(r))r.contents=t;else{let n=De.isAlias(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}uc.visit=Ds;uc.visitAsync=qs});var fc=w(qg=>{"use strict";var Dg=fe(),sO=nn(),oO={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},aO=i=>i.replace(/[!,[\]{}]/g,e=>oO[e]),sn=class i{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},i.defaultYaml,e),this.tags=Object.assign({},i.defaultTags,t)}clone(){let e=new i(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new i(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:i.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},i.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:i.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},i.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(r.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let o=/^\d+\.\d+$/.test(s);return t(6,`Unsupported YAML version ${s}`,o),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);let s=this.tags[r];if(s)try{return s+decodeURIComponent(n)}catch(o){return t(String(o)),null}return r==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+aO(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),n;if(e&&r.length>0&&Dg.isNode(e.contents)){let s={};sO.visit(e.contents,(o,a)=>{Dg.isNode(a)&&a.tag&&(s[a.tag]=!0)}),n=Object.keys(s)}else n=[];for(let[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||n.some(a=>a.startsWith(o)))&&t.push(`%TAG ${s} ${o}`);return t.join(`
|
|
50
|
+
`)}};sn.defaultYaml={explicit:!1,version:"1.2"};sn.defaultTags={"!!":"tag:yaml.org,2002:"};qg.Directives=sn});var Us=w(on=>{"use strict";var Ug=fe(),lO=nn();function cO(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(t)}return!0}function jg(i){let e=new Set;return lO.visit(i,{Value(t,r){r.anchor&&e.add(r.anchor)}}),e}function $g(i,e){for(let t=1;;++t){let r=`${i}${t}`;if(!e.has(r))return r}}function uO(i,e){let t=[],r=new Map,n=null;return{onAnchor:s=>{t.push(s),n!=null||(n=jg(i));let o=$g(e,n);return n.add(o),o},setAnchors:()=>{for(let s of t){let o=r.get(s);if(typeof o=="object"&&o.anchor&&(Ug.isScalar(o.node)||Ug.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}on.anchorIsValid=cO;on.anchorNames=jg;on.createNodeAnchors=uO;on.findNewAnchor=$g});var hc=w(Hg=>{"use strict";function an(i,e,t,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let n=0,s=r.length;n<s;++n){let o=r[n],a=an(i,r,String(n),o);a===void 0?delete r[n]:a!==o&&(r[n]=a)}else if(r instanceof Map)for(let n of Array.from(r.keys())){let s=r.get(n),o=an(i,r,n,s);o===void 0?r.delete(n):o!==s&&r.set(n,o)}else if(r instanceof Set)for(let n of Array.from(r)){let s=an(i,r,n,n);s===void 0?r.delete(n):s!==n&&(r.delete(n),r.add(s))}else for(let[n,s]of Object.entries(r)){let o=an(i,r,n,s);o===void 0?delete r[n]:o!==s&&(r[n]=o)}return i.call(e,t,r)}Hg.applyReviver=an});var oi=w(Gg=>{"use strict";var fO=fe();function Vg(i,e,t){if(Array.isArray(i))return i.map((r,n)=>Vg(r,String(n),t));if(i&&typeof i.toJSON=="function"){if(!t||!fO.hasAnchor(i))return i.toJSON(e,t);let r={aliasCount:0,count:1,res:void 0};t.anchors.set(i,r),t.onCreate=s=>{r.res=s,delete t.onCreate};let n=i.toJSON(e,t);return t.onCreate&&t.onCreate(n),n}return typeof i=="bigint"&&!(t!=null&&t.keep)?Number(i):i}Gg.toJS=Vg});var js=w(Yg=>{"use strict";var hO=hc(),Wg=fe(),dO=oi(),dc=class{constructor(e){Object.defineProperty(this,Wg.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:s}={}){if(!Wg.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=dO.toJS(this,"",o);if(typeof n=="function")for(let{count:l,res:c}of o.anchors.values())n(c,l);return typeof s=="function"?hO.applyReviver(s,{"":a},"",a):a}};Yg.NodeBase=dc});var ln=w(Kg=>{"use strict";var pO=Us(),mO=nn(),vr=fe(),gO=js(),yO=oi(),pc=class extends gO.NodeBase{constructor(e){super(vr.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let r;t!=null&&t.aliasResolveCache?r=t.aliasResolveCache:(r=[],mO.visit(e,{Node:(s,o)=>{(vr.isAlias(o)||vr.hasAnchor(o))&&r.push(o)}}),t&&(t.aliasResolveCache=r));let n;for(let s of r){if(s===this)break;s.anchor===this.source&&(n=s)}return n}toJSON(e,t){if(!t)return{source:this.source};let{anchors:r,doc:n,maxAliasCount:s}=t,o=this.resolve(n,t);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(yO.toJS(o,null,t),a=r.get(o)),(a==null?void 0:a.res)===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=$s(n,o,r)),a.count*a.aliasCount>s)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,r){let n=`*${this.source}`;if(e){if(pO.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${n} `}return n}};function $s(i,e,t){if(vr.isAlias(e)){let r=e.resolve(i),n=t&&r&&t.get(r);return n?n.count*n.aliasCount:0}else if(vr.isCollection(e)){let r=0;for(let n of e.items){let s=$s(i,n,t);s>r&&(r=s)}return r}else if(vr.isPair(e)){let r=$s(i,e.key,t),n=$s(i,e.value,t);return Math.max(r,n)}return 1}Kg.Alias=pc});var Re=w(mc=>{"use strict";var vO=fe(),_O=js(),bO=oi(),wO=i=>!i||typeof i!="function"&&typeof i!="object",ai=class extends _O.NodeBase{constructor(e){super(vO.SCALAR),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:bO.toJS(this.value,e,t)}toString(){return String(this.value)}};ai.BLOCK_FOLDED="BLOCK_FOLDED";ai.BLOCK_LITERAL="BLOCK_LITERAL";ai.PLAIN="PLAIN";ai.QUOTE_DOUBLE="QUOTE_DOUBLE";ai.QUOTE_SINGLE="QUOTE_SINGLE";mc.Scalar=ai;mc.isScalarValue=wO});var cn=w(Jg=>{"use strict";var xO=ln(),Li=fe(),zg=Re(),SO="tag:yaml.org,2002:";function EO(i,e,t){var r;if(e){let n=t.filter(o=>o.tag===e),s=(r=n.find(o=>!o.format))!=null?r:n[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return t.find(n=>{var s;return((s=n.identify)==null?void 0:s.call(n,i))&&!n.format})}function OO(i,e,t){var f,h,p,m;if(Li.isDocument(i)&&(i=i.contents),Li.isNode(i))return i;if(Li.isPair(i)){let d=(h=(f=t.schema[Li.MAP]).createNode)==null?void 0:h.call(f,t.schema,null,t);return d.items.push(i),d}(i instanceof String||i instanceof Number||i instanceof Boolean||typeof BigInt!="undefined"&&i instanceof BigInt)&&(i=i.valueOf());let{aliasDuplicateObjects:r,onAnchor:n,onTagObj:s,schema:o,sourceObjects:a}=t,l;if(r&&i&&typeof i=="object"){if(l=a.get(i),l)return(p=l.anchor)!=null||(l.anchor=n(i)),new xO.Alias(l.anchor);l={anchor:null,node:null},a.set(i,l)}e!=null&&e.startsWith("!!")&&(e=SO+e.slice(2));let c=EO(i,e,o.tags);if(!c){if(i&&typeof i.toJSON=="function"&&(i=i.toJSON()),!i||typeof i!="object"){let d=new zg.Scalar(i);return l&&(l.node=d),d}c=i instanceof Map?o[Li.MAP]:Symbol.iterator in Object(i)?o[Li.SEQ]:o[Li.MAP]}s&&(s(c),delete t.onTagObj);let u=c!=null&&c.createNode?c.createNode(t.schema,i,t):typeof((m=c==null?void 0:c.nodeClass)==null?void 0:m.from)=="function"?c.nodeClass.from(t.schema,i,t):new zg.Scalar(i);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}Jg.createNode=OO});var Vs=w(Hs=>{"use strict";var kO=cn(),$t=fe(),CO=js();function gc(i,e,t){let r=t;for(let n=e.length-1;n>=0;--n){let s=e[n];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return kO.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:i,sourceObjects:new Map})}var Zg=i=>i==null||typeof i=="object"&&!!i[Symbol.iterator]().next().done,yc=class extends CO.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(r=>$t.isNode(r)||$t.isPair(r)?r.clone(e):r),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Zg(e))this.add(t);else{let[r,...n]=e,s=this.get(r,!0);if($t.isCollection(s))s.addIn(n,t);else if(s===void 0&&this.schema)this.set(r,gc(this.schema,n,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}deleteIn(e){let[t,...r]=e;if(r.length===0)return this.delete(t);let n=this.get(t,!0);if($t.isCollection(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){let[r,...n]=e,s=this.get(r,!0);return n.length===0?!t&&$t.isScalar(s)?s.value:s:$t.isCollection(s)?s.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!$t.isPair(t))return!1;let r=t.value;return r==null||e&&$t.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[t,...r]=e;if(r.length===0)return this.has(t);let n=this.get(t,!0);return $t.isCollection(n)?n.hasIn(r):!1}setIn(e,t){let[r,...n]=e;if(n.length===0)this.set(r,t);else{let s=this.get(r,!0);if($t.isCollection(s))s.setIn(n,t);else if(s===void 0&&this.schema)this.set(r,gc(this.schema,n,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}};Hs.Collection=yc;Hs.collectionFromPath=gc;Hs.isEmptyPath=Zg});var un=w(Gs=>{"use strict";var AO=i=>i.replace(/^(?!$)(?: $)?/gm,"#");function vc(i,e){return/^\n+$/.test(i)?i.substring(1):e?i.replace(/^(?! *$)/gm,e):i}var IO=(i,e,t)=>i.endsWith(`
|
|
51
|
+
`)?vc(t,e):t.includes(`
|
|
52
52
|
`)?`
|
|
53
|
-
`+
|
|
54
|
-
`)t===
|
|
53
|
+
`+vc(t,e):(i.endsWith(" ")?"":" ")+t;Gs.indentComment=vc;Gs.lineComment=IO;Gs.stringifyComment=AO});var Xg=w(fn=>{"use strict";var TO="flow",_c="block",Ws="quoted";function NO(i,e,t="flow",{indentAtStart:r,lineWidth:n=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!n||n<0)return i;n<s&&(s=0);let l=Math.max(1+s,1+n-e.length);if(i.length<=l)return i;let c=[],u={},f=n-e.length;typeof r=="number"&&(r>n-Math.max(2,s)?c.push(0):f=n-r);let h,p,m=!1,d=-1,g=-1,v=-1;t===_c&&(d=Qg(i,d,e.length),d!==-1&&(f=d+l));for(let y;y=i[d+=1];){if(t===Ws&&y==="\\"){switch(g=d,i[d+1]){case"x":d+=3;break;case"u":d+=5;break;case"U":d+=9;break;default:d+=1}v=d}if(y===`
|
|
54
|
+
`)t===_c&&(d=Qg(i,d,e.length)),f=d+e.length+l,h=void 0;else{if(y===" "&&p&&p!==" "&&p!==`
|
|
55
55
|
`&&p!==" "){let x=i[d+1];x&&x!==" "&&x!==`
|
|
56
|
-
`&&x!==" "&&(h=d)}if(d>=f)if(h)c.push(h),f=h+l,h=void 0;else if(t===Ws){for(;p===" "||p===" ";)p=y,y=i[d+=1],m=!0;let x=d>
|
|
57
|
-
${e}${i.slice(0,
|
|
58
|
-
${e}${i.slice(x+1,
|
|
59
|
-
`);r=e,n=e+1,s=i[n]}return r}
|
|
60
|
-
`){if(s-o>r)return!0;if(o=s+1,n-o<=r)return!1}return!0}function
|
|
56
|
+
`&&x!==" "&&(h=d)}if(d>=f)if(h)c.push(h),f=h+l,h=void 0;else if(t===Ws){for(;p===" "||p===" ";)p=y,y=i[d+=1],m=!0;let x=d>v+1?d-2:g-1;if(u[x])return i;c.push(x),u[x]=!0,f=x+l,h=void 0}else m=!0}p=y}if(m&&a&&a(),c.length===0)return i;o&&o();let b=i.slice(0,c[0]);for(let y=0;y<c.length;++y){let x=c[y],_=c[y+1]||i.length;x===0?b=`
|
|
57
|
+
${e}${i.slice(0,_)}`:(t===Ws&&u[x]&&(b+=`${i[x]}\\`),b+=`
|
|
58
|
+
${e}${i.slice(x+1,_)}`)}return b}function Qg(i,e,t){let r=e,n=e+1,s=i[n];for(;s===" "||s===" ";)if(e<n+t)s=i[++e];else{do s=i[++e];while(s&&s!==`
|
|
59
|
+
`);r=e,n=e+1,s=i[n]}return r}fn.FOLD_BLOCK=_c;fn.FOLD_FLOW=TO;fn.FOLD_QUOTED=Ws;fn.foldFlowLines=NO});var dn=w(e0=>{"use strict";var Nt=Re(),li=Xg(),Ks=(i,e)=>({indentAtStart:e?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),zs=i=>/^(%|---|\.\.\.)/m.test(i);function BO(i,e,t){if(!e||e<0)return!1;let r=e-t,n=i.length;if(n<=r)return!1;for(let s=0,o=0;s<n;++s)if(i[s]===`
|
|
60
|
+
`){if(s-o>r)return!0;if(o=s+1,n-o<=r)return!1}return!0}function hn(i,e){let t=JSON.stringify(i);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:r}=e,n=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(zs(i)?" ":""),o="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{o+=t.slice(a,l);let u=t.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||t[l+2]==='"'||t.length<n)l+=1;else{for(o+=t.slice(a,l)+`
|
|
61
61
|
|
|
62
62
|
`;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)o+=`
|
|
63
|
-
`,l+=2;o+=s,t[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+t.slice(a):t,r?o:
|
|
64
|
-
`)||/[ \t]\n|\n[ \t]/.test(i))return
|
|
65
|
-
${t}`)+"'";return e.implicitKey?r:
|
|
63
|
+
`,l+=2;o+=s,t[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+t.slice(a):t,r?o:li.foldFlowLines(o,s,li.FOLD_QUOTED,Ks(e,!1))}function bc(i,e){if(e.options.singleQuote===!1||e.implicitKey&&i.includes(`
|
|
64
|
+
`)||/[ \t]\n|\n[ \t]/.test(i))return hn(i,e);let t=e.indent||(zs(i)?" ":""),r="'"+i.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
65
|
+
${t}`)+"'";return e.implicitKey?r:li.foldFlowLines(r,t,li.FOLD_FLOW,Ks(e,!1))}function _r(i,e){let{singleQuote:t}=e.options,r;if(t===!1)r=hn;else{let n=i.includes('"'),s=i.includes("'");n&&!s?r=bc:s&&!n?r=hn:r=t?bc:hn}return r(i,e)}var wc;try{wc=new RegExp(`(^|(?<!
|
|
66
66
|
))
|
|
67
67
|
+(?!
|
|
68
|
-
|$)`,"g")}catch{
|
|
68
|
+
|$)`,"g")}catch{wc=/\n+(?!\n|$)/g}function Ys({comment:i,type:e,value:t},r,n,s){let{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\n[\t ]+$/.test(t))return _r(t,r);let c=r.indent||(r.forceBlockIndent||zs(t)?" ":""),u=o==="literal"?!0:o==="folded"||e===Nt.Scalar.BLOCK_FOLDED?!1:e===Nt.Scalar.BLOCK_LITERAL?!0:!BO(t,l,c.length);if(!t)return u?`|
|
|
69
69
|
`:`>
|
|
70
|
-
`;let f,h;for(h=t.length;h>0;--h){let
|
|
71
|
-
`&&
|
|
70
|
+
`;let f,h;for(h=t.length;h>0;--h){let _=t[h-1];if(_!==`
|
|
71
|
+
`&&_!==" "&&_!==" ")break}let p=t.substring(h),m=p.indexOf(`
|
|
72
72
|
`);m===-1?f="-":t===p||m!==p.length-1?(f="+",s&&s()):f="",p&&(t=t.slice(0,-p.length),p[p.length-1]===`
|
|
73
|
-
`&&(p=p.slice(0,-1)),p=p.replace(
|
|
74
|
-
`)
|
|
75
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),
|
|
73
|
+
`&&(p=p.slice(0,-1)),p=p.replace(wc,`$&${c}`));let d=!1,g,v=-1;for(g=0;g<t.length;++g){let _=t[g];if(_===" ")d=!0;else if(_===`
|
|
74
|
+
`)v=g;else break}let b=t.substring(0,v<g?v+1:g);b&&(t=t.substring(b.length),b=b.replace(/\n+/g,`$&${c}`));let x=(d?c?"2":"1":"")+f;if(i&&(x+=" "+a(i.replace(/ ?[\r\n]+/g," ")),n&&n()),!u){let _=t.replace(/\n+/g,`
|
|
75
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),A=!1,E=Ks(r,!0);o!=="folded"&&e!==Nt.Scalar.BLOCK_FOLDED&&(E.onOverflow=()=>{A=!0});let C=li.foldFlowLines(`${b}${_}${p}`,c,li.FOLD_BLOCK,E);if(!A)return`>${x}
|
|
76
76
|
${c}${C}`}return t=t.replace(/\n+/g,`$&${c}`),`|${x}
|
|
77
|
-
${c}${b}${t}${p}`}function
|
|
78
|
-
`)||u&&/[[\]{},]/.test(s))return
|
|
79
|
-
`)?
|
|
80
|
-
`))return
|
|
81
|
-
${l}`);if(o){let h=d=>{var g;return d.default&&d.tag!=="tag:yaml.org,2002:str"&&((g=d.test)==null?void 0:g.test(f))},{compat:p,tags:m}=e.doc.schema;if(m.some(h)||p!=null&&p.some(h))return
|
|
82
|
-
${e.indent}${a}`:a}
|
|
83
|
-
${a}:`):(g=`${g}:`,h&&(g+=
|
|
84
|
-
`:"",b){let S=c(b);
|
|
85
|
-
${
|
|
86
|
-
`&&y&&(
|
|
77
|
+
${c}${b}${t}${p}`}function PO(i,e,t,r){let{type:n,value:s}=i,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&s.includes(`
|
|
78
|
+
`)||u&&/[[\]{},]/.test(s))return _r(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||u||!s.includes(`
|
|
79
|
+
`)?_r(s,e):Ys(i,e,t,r);if(!a&&!u&&n!==Nt.Scalar.PLAIN&&s.includes(`
|
|
80
|
+
`))return Ys(i,e,t,r);if(zs(s)){if(l==="")return e.forceBlockIndent=!0,Ys(i,e,t,r);if(a&&l===c)return _r(s,e)}let f=s.replace(/\n+/g,`$&
|
|
81
|
+
${l}`);if(o){let h=d=>{var g;return d.default&&d.tag!=="tag:yaml.org,2002:str"&&((g=d.test)==null?void 0:g.test(f))},{compat:p,tags:m}=e.doc.schema;if(m.some(h)||p!=null&&p.some(h))return _r(s,e)}return a?f:li.foldFlowLines(f,l,li.FOLD_FLOW,Ks(e,!1))}function LO(i,e,t,r){let{implicitKey:n,inFlow:s}=e,o=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)}),{type:a}=i;a!==Nt.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=Nt.Scalar.QUOTE_DOUBLE);let l=u=>{switch(u){case Nt.Scalar.BLOCK_FOLDED:case Nt.Scalar.BLOCK_LITERAL:return n||s?_r(o.value,e):Ys(o,e,t,r);case Nt.Scalar.QUOTE_DOUBLE:return hn(o.value,e);case Nt.Scalar.QUOTE_SINGLE:return bc(o.value,e);case Nt.Scalar.PLAIN:return PO(o,e,t,r);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,h=n&&u||f;if(c=l(h),c===null)throw new Error(`Unsupported default string type ${h}`)}return c}e0.stringifyString=LO});var pn=w(xc=>{"use strict";var RO=Us(),ci=fe(),MO=un(),FO=dn();function DO(i,e){let t=Object.assign({blockQuote:!0,commentString:MO.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},i.schema.toStringOptions,e),r;switch(t.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:i,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:r,options:t}}function qO(i,e){var n,s,o,a;if(e.tag){let l=i.filter(c=>c.tag===e.tag);if(l.length>0)return(n=l.find(c=>c.format===e.format))!=null?n:l[0]}let t,r;if(ci.isScalar(e)){r=e.value;let l=i.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,r)});if(l.length>1){let c=l.filter(u=>u.test);c.length>0&&(l=c)}t=(s=l.find(c=>c.format===e.format))!=null?s:l.find(c=>!c.format)}else r=e,t=i.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!t){let l=(a=(o=r==null?void 0:r.constructor)==null?void 0:o.name)!=null?a:r===null?"null":typeof r;throw new Error(`Tag not resolved for ${l} value`)}return t}function UO(i,e,{anchors:t,doc:r}){var a;if(!r.directives)return"";let n=[],s=(ci.isScalar(i)||ci.isCollection(i))&&i.anchor;s&&RO.anchorIsValid(s)&&(t.add(s),n.push(`&${s}`));let o=(a=i.tag)!=null?a:e.default?null:e.tag;return o&&n.push(r.directives.tagString(o)),n.join(" ")}function jO(i,e,t,r){var l,c;if(ci.isPair(i))return i.toString(e,t,r);if(ci.isAlias(i)){if(e.doc.directives)return i.toString(e);if((l=e.resolvedAliases)!=null&&l.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(i):e.resolvedAliases=new Set([i]),i=i.resolve(e.doc)}let n,s=ci.isNode(i)?i:e.doc.createNode(i,{onTagObj:u=>n=u});n!=null||(n=qO(e.doc.schema.tags,s));let o=UO(s,n,e);o.length>0&&(e.indentAtStart=((c=e.indentAtStart)!=null?c:0)+o.length+1);let a=typeof n.stringify=="function"?n.stringify(s,e,t,r):ci.isScalar(s)?FO.stringifyString(s,e,t,r):s.toString(e,t,r);return o?ci.isScalar(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
|
82
|
+
${e.indent}${a}`:a}xc.createStringifyContext=DO;xc.stringify=jO});var n0=w(r0=>{"use strict";var Xt=fe(),t0=Re(),i0=pn(),mn=un();function $O({key:i,value:e},t,r,n){var E,C;let{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=t,h=Xt.isNode(i)&&i.comment||null;if(f){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(Xt.isCollection(i)||!Xt.isNode(i)&&typeof i=="object"){let S="With simple keys, collection cannot be used as a key value";throw new Error(S)}}let p=!f&&(!i||h&&e==null&&!t.inFlow||Xt.isCollection(i)||(Xt.isScalar(i)?i.type===t0.Scalar.BLOCK_FOLDED||i.type===t0.Scalar.BLOCK_LITERAL:typeof i=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!p&&(f||!s),indent:a+l});let m=!1,d=!1,g=i0.stringify(i,t,()=>m=!0,()=>d=!0);if(!p&&!t.inFlow&&g.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(t.inFlow){if(s||e==null)return m&&r&&r(),g===""?"?":p?`? ${g}`:g}else if(s&&!f||e==null&&p)return g=`? ${g}`,h&&!m?g+=mn.lineComment(g,t.indent,c(h)):d&&n&&n(),g;m&&(h=null),p?(h&&(g+=mn.lineComment(g,t.indent,c(h))),g=`? ${g}
|
|
83
|
+
${a}:`):(g=`${g}:`,h&&(g+=mn.lineComment(g,t.indent,c(h))));let v,b,y;Xt.isNode(e)?(v=!!e.spaceBefore,b=e.commentBefore,y=e.comment):(v=!1,b=null,y=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!p&&!h&&Xt.isScalar(e)&&(t.indentAtStart=g.length+1),d=!1,!u&&l.length>=2&&!t.inFlow&&!p&&Xt.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let x=!1,_=i0.stringify(e,t,()=>x=!0,()=>d=!0),A=" ";if(h||v||b){if(A=v?`
|
|
84
|
+
`:"",b){let S=c(b);A+=`
|
|
85
|
+
${mn.indentComment(S,t.indent)}`}_===""&&!t.inFlow?A===`
|
|
86
|
+
`&&y&&(A=`
|
|
87
87
|
|
|
88
|
-
`):
|
|
89
|
-
${t.indent}`}else if(!p&&
|
|
90
|
-
`),
|
|
91
|
-
${t.indent}`)}}else(
|
|
92
|
-
`)&&(
|
|
88
|
+
`):A+=`
|
|
89
|
+
${t.indent}`}else if(!p&&Xt.isCollection(e)){let S=_[0],T=_.indexOf(`
|
|
90
|
+
`),I=T!==-1,F=(C=(E=t.inFlow)!=null?E:e.flow)!=null?C:e.items.length===0;if(I||!F){let L=!1;if(I&&(S==="&"||S==="!")){let $=_.indexOf(" ");S==="&"&&$!==-1&&$<T&&_[$+1]==="!"&&($=_.indexOf(" ",$+1)),($===-1||T<$)&&(L=!0)}L||(A=`
|
|
91
|
+
${t.indent}`)}}else(_===""||_[0]===`
|
|
92
|
+
`)&&(A="");return g+=A+_,t.inFlow?x&&r&&r():y&&!x?g+=mn.lineComment(g,t.indent,c(y)):d&&n&&n(),g}r0.stringifyPair=$O});var Ec=w(Sc=>{"use strict";var s0=require("process");function HO(i,...e){i==="debug"&&console.log(...e)}function VO(i,e){(i==="debug"||i==="warn")&&(typeof s0.emitWarning=="function"?s0.emitWarning(e):console.warn(e))}Sc.debug=HO;Sc.warn=VO});var Xs=w(Qs=>{"use strict";var gn=fe(),o0=Re(),Js="<<",Zs={identify:i=>i===Js||typeof i=="symbol"&&i.description===Js,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new o0.Scalar(Symbol(Js)),{addToJSMap:a0}),stringify:()=>Js},GO=(i,e)=>(Zs.identify(e)||gn.isScalar(e)&&(!e.type||e.type===o0.Scalar.PLAIN)&&Zs.identify(e.value))&&(i==null?void 0:i.doc.schema.tags.some(t=>t.tag===Zs.tag&&t.default));function a0(i,e,t){if(t=i&&gn.isAlias(t)?t.resolve(i.doc):t,gn.isSeq(t))for(let r of t.items)Oc(i,e,r);else if(Array.isArray(t))for(let r of t)Oc(i,e,r);else Oc(i,e,t)}function Oc(i,e,t){let r=i&&gn.isAlias(t)?t.resolve(i.doc):t;if(!gn.isMap(r))throw new Error("Merge sources must be maps or map aliases");let n=r.toJSON(null,i,Map);for(let[s,o]of n)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}Qs.addMergeToJSMap=a0;Qs.isMergeKey=GO;Qs.merge=Zs});var Cc=w(u0=>{"use strict";var WO=Ec(),l0=Xs(),YO=pn(),c0=fe(),kc=oi();function KO(i,e,{key:t,value:r}){if(c0.isNode(t)&&t.addToJSMap)t.addToJSMap(i,e,r);else if(l0.isMergeKey(i,t))l0.addMergeToJSMap(i,e,r);else{let n=kc.toJS(t,"",i);if(e instanceof Map)e.set(n,kc.toJS(r,n,i));else if(e instanceof Set)e.add(n);else{let s=zO(t,n,i),o=kc.toJS(r,s,i);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function zO(i,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(c0.isNode(i)&&(t!=null&&t.doc)){let r=YO.createStringifyContext(t.doc,{});r.anchors=new Set;for(let s of t.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;let n=i.toString(r);if(!t.mapKeyWarned){let s=JSON.stringify(n);s.length>40&&(s=s.substring(0,36)+'..."'),WO.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return n}return JSON.stringify(e)}u0.addPairToJSMap=KO});var ui=w(Ac=>{"use strict";var f0=cn(),JO=n0(),ZO=Cc(),eo=fe();function QO(i,e,t){let r=f0.createNode(i,void 0,t),n=f0.createNode(e,void 0,t);return new to(r,n)}var to=class i{constructor(e,t=null){Object.defineProperty(this,eo.NODE_TYPE,{value:eo.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return eo.isNode(t)&&(t=t.clone(e)),eo.isNode(r)&&(r=r.clone(e)),new i(t,r)}toJSON(e,t){let r=t!=null&&t.mapAsMap?new Map:{};return ZO.addPairToJSMap(t,r,this)}toString(e,t,r){return e!=null&&e.doc?JO.stringifyPair(this,e,t,r):JSON.stringify(this)}};Ac.Pair=to;Ac.createPair=QO});var Ic=w(d0=>{"use strict";var Ri=fe(),h0=pn(),io=un();function XO(i,e,t){var s;return(((s=e.inFlow)!=null?s:i.flow)?tk:ek)(i,e,t)}function ek({comment:i,items:e},t,{blockItemPrefix:r,flowChars:n,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=t,u=Object.assign({},t,{indent:s,type:null}),f=!1,h=[];for(let m=0;m<e.length;++m){let d=e[m],g=null;if(Ri.isNode(d))!f&&d.spaceBefore&&h.push(""),ro(t,h,d.commentBefore,f),d.comment&&(g=d.comment);else if(Ri.isPair(d)){let b=Ri.isNode(d.key)?d.key:null;b&&(!f&&b.spaceBefore&&h.push(""),ro(t,h,b.commentBefore,f))}f=!1;let v=h0.stringify(d,u,()=>g=null,()=>f=!0);g&&(v+=io.lineComment(v,s,c(g))),f&&g&&(f=!1),h.push(r+v)}let p;if(h.length===0)p=n.start+n.end;else{p=h[0];for(let m=1;m<h.length;++m){let d=h[m];p+=d?`
|
|
93
93
|
${l}${d}`:`
|
|
94
94
|
`}}return i?(p+=`
|
|
95
|
-
`+
|
|
96
|
-
`)),m<i.length-1?
|
|
95
|
+
`+io.indentComment(c(i),l),a&&a()):f&&o&&o(),p}function tk({items:i},e,{flowChars:t,itemIndent:r}){let{indent:n,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;let l=Object.assign({},e,{indent:r,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let m=0;m<i.length;++m){let d=i[m],g=null;if(Ri.isNode(d))d.spaceBefore&&f.push(""),ro(e,f,d.commentBefore,!1),d.comment&&(g=d.comment);else if(Ri.isPair(d)){let b=Ri.isNode(d.key)?d.key:null;b&&(b.spaceBefore&&f.push(""),ro(e,f,b.commentBefore,!1),b.comment&&(c=!0));let y=Ri.isNode(d.value)?d.value:null;y?(y.comment&&(g=y.comment),y.commentBefore&&(c=!0)):d.value==null&&(b!=null&&b.comment)&&(g=b.comment)}g&&(c=!0);let v=h0.stringify(d,l,()=>g=null);c||(c=f.length>u||v.includes(`
|
|
96
|
+
`)),m<i.length-1?v+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=f.reduce((b,y)=>b+y.length+2,2)+(v.length+2)>e.options.lineWidth)),c&&(v+=",")),g&&(v+=io.lineComment(v,r,a(g))),f.push(v),u=f.length}let{start:h,end:p}=t;if(f.length===0)return h+p;if(!c){let m=f.reduce((d,g)=>d+g.length+2,2);c=e.options.lineWidth>0&&m>e.options.lineWidth}if(c){let m=h;for(let d of f)m+=d?`
|
|
97
97
|
${s}${n}${d}`:`
|
|
98
98
|
`;return`${m}
|
|
99
|
-
${n}${p}`}else return`${h}${o}${f.join(" ")}${o}${p}`}function
|
|
100
|
-
`:" ")}return
|
|
99
|
+
${n}${p}`}else return`${h}${o}${f.join(" ")}${o}${p}`}function ro({indent:i,options:{commentString:e}},t,r,n){if(r&&n&&(r=r.replace(/^\n+/,"")),r){let s=io.indentComment(e(r),i);t.push(s.trimStart())}}d0.stringifyCollection=XO});var hi=w(Nc=>{"use strict";var ik=Ic(),rk=Cc(),nk=Vs(),fi=fe(),no=ui(),sk=Re();function yn(i,e){let t=fi.isScalar(e)?e.value:e;for(let r of i)if(fi.isPair(r)&&(r.key===e||r.key===t||fi.isScalar(r.key)&&r.key.value===t))return r}var Tc=class extends nk.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(fi.MAP,e),this.items=[]}static from(e,t,r){let{keepUndefined:n,replacer:s}=r,o=new this(e),a=(l,c)=>{if(typeof s=="function")c=s.call(t,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||n)&&o.items.push(no.createPair(l,c,r))};if(t instanceof Map)for(let[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){var o;let r;fi.isPair(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new no.Pair(e,e==null?void 0:e.value):r=new no.Pair(e.key,e.value);let n=yn(this.items,r.key),s=(o=this.schema)==null?void 0:o.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);fi.isScalar(n.value)&&sk.isScalarValue(r.value)?n.value.value=r.value:n.value=r.value}else if(s){let a=this.items.findIndex(l=>s(r,l)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(e){let t=yn(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){var s;let r=yn(this.items,e),n=r==null?void 0:r.value;return(s=!t&&fi.isScalar(n)?n.value:n)!=null?s:void 0}has(e){return!!yn(this.items,e)}set(e,t){this.add(new no.Pair(e,t),!0)}toJSON(e,t,r){let n=r?new r:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(n);for(let s of this.items)rk.addPairToJSMap(t,n,s);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(let n of this.items)if(!fi.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ik.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}};Nc.YAMLMap=Tc;Nc.findPair=yn});var br=w(m0=>{"use strict";var ok=fe(),p0=hi(),ak={collection:"map",default:!0,nodeClass:p0.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(i,e){return ok.isMap(i)||e("Expected a mapping for this tag"),i},createNode:(i,e,t)=>p0.YAMLMap.from(i,e,t)};m0.map=ak});var di=w(g0=>{"use strict";var lk=cn(),ck=Ic(),uk=Vs(),oo=fe(),fk=Re(),hk=oi(),Bc=class extends uk.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(oo.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=so(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let r=so(e);if(typeof r!="number")return;let n=this.items[r];return!t&&oo.isScalar(n)?n.value:n}has(e){let t=so(e);return typeof t=="number"&&t<this.items.length}set(e,t){let r=so(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[r];oo.isScalar(n)&&fk.isScalarValue(t)?n.value=t:this.items[r]=t}toJSON(e,t){let r=[];t!=null&&t.onCreate&&t.onCreate(r);let n=0;for(let s of this.items)r.push(hk.toJS(s,String(n++),t));return r}toString(e,t,r){return e?ck.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){let{replacer:n}=r,s=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof n=="function"){let l=t instanceof Set?a:String(o++);a=n.call(t,l,a)}s.items.push(lk.createNode(a,void 0,r))}}return s}};function so(i){let e=oo.isScalar(i)?i.value:i;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}g0.YAMLSeq=Bc});var wr=w(v0=>{"use strict";var dk=fe(),y0=di(),pk={collection:"seq",default:!0,nodeClass:y0.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(i,e){return dk.isSeq(i)||e("Expected a sequence for this tag"),i},createNode:(i,e,t)=>y0.YAMLSeq.from(i,e,t)};v0.seq=pk});var vn=w(_0=>{"use strict";var mk=dn(),gk={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,e,t,r){return e=Object.assign({actualString:!0},e),mk.stringifyString(i,e,t,r)}};_0.string=gk});var ao=w(x0=>{"use strict";var b0=Re(),w0={identify:i=>i==null,createNode:()=>new b0.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new b0.Scalar(null),stringify:({source:i},e)=>typeof i=="string"&&w0.test.test(i)?i:e.options.nullStr};x0.nullTag=w0});var Pc=w(E0=>{"use strict";var yk=Re(),S0={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new yk.Scalar(i[0]==="t"||i[0]==="T"),stringify({source:i,value:e},t){if(i&&S0.test.test(i)){let r=i[0]==="t"||i[0]==="T";if(e===r)return i}return e?t.options.trueStr:t.options.falseStr}};E0.boolTag=S0});var xr=w(O0=>{"use strict";function vk({format:i,minFractionDigits:e,tag:t,value:r}){if(typeof r=="bigint")return String(r);let n=typeof r=="number"?r:Number(r);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let s=Object.is(r,-0)?"-0":JSON.stringify(r);if(!i&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}O0.stringifyNumber=vk});var Rc=w(lo=>{"use strict";var _k=Re(),Lc=xr(),bk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Lc.stringifyNumber},wk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i),stringify(i){let e=Number(i.value);return isFinite(e)?e.toExponential():Lc.stringifyNumber(i)}},xk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(i){let e=new _k.Scalar(parseFloat(i)),t=i.indexOf(".");return t!==-1&&i[i.length-1]==="0"&&(e.minFractionDigits=i.length-t-1),e},stringify:Lc.stringifyNumber};lo.float=xk;lo.floatExp=wk;lo.floatNaN=bk});var Fc=w(uo=>{"use strict";var k0=xr(),co=i=>typeof i=="bigint"||Number.isInteger(i),Mc=(i,e,t,{intAsBigInt:r})=>r?BigInt(i):parseInt(i.substring(e),t);function C0(i,e,t){let{value:r}=i;return co(r)&&r>=0?t+r.toString(e):k0.stringifyNumber(i)}var Sk={identify:i=>co(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(i,e,t)=>Mc(i,2,8,t),stringify:i=>C0(i,8,"0o")},Ek={identify:co,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(i,e,t)=>Mc(i,0,10,t),stringify:k0.stringifyNumber},Ok={identify:i=>co(i)&&i>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(i,e,t)=>Mc(i,2,16,t),stringify:i=>C0(i,16,"0x")};uo.int=Ek;uo.intHex=Ok;uo.intOct=Sk});var I0=w(A0=>{"use strict";var kk=br(),Ck=ao(),Ak=wr(),Ik=vn(),Tk=Pc(),Dc=Rc(),qc=Fc(),Nk=[kk.map,Ak.seq,Ik.string,Ck.nullTag,Tk.boolTag,qc.intOct,qc.int,qc.intHex,Dc.floatNaN,Dc.floatExp,Dc.float];A0.schema=Nk});var B0=w(N0=>{"use strict";var Bk=Re(),Pk=br(),Lk=wr();function T0(i){return typeof i=="bigint"||Number.isInteger(i)}var fo=({value:i})=>JSON.stringify(i),Rk=[{identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify:fo},{identify:i=>i==null,createNode:()=>new Bk.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:fo},{identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:i=>i==="true",stringify:fo},{identify:T0,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(i,e,{intAsBigInt:t})=>t?BigInt(i):parseInt(i,10),stringify:({value:i})=>T0(i)?i.toString():JSON.stringify(i)},{identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:i=>parseFloat(i),stringify:fo}],Mk={default:!0,tag:"",test:/^/,resolve(i,e){return e(`Unresolved plain scalar ${JSON.stringify(i)}`),i}},Fk=[Pk.map,Lk.seq].concat(Rk,Mk);N0.schema=Fk});var jc=w(P0=>{"use strict";var _n=require("buffer"),Uc=Re(),Dk=dn(),qk={identify:i=>i instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(i,e){if(typeof _n.Buffer=="function")return _n.Buffer.from(i,"base64");if(typeof atob=="function"){let t=atob(i.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let n=0;n<t.length;++n)r[n]=t.charCodeAt(n);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),i},stringify({comment:i,type:e,value:t},r,n,s){if(!t)return"";let o=t,a;if(typeof _n.Buffer=="function")a=o instanceof _n.Buffer?o.toString("base64"):_n.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e!=null||(e=Uc.Scalar.BLOCK_LITERAL),e!==Uc.Scalar.QUOTE_DOUBLE){let l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),c=Math.ceil(a.length/l),u=new Array(c);for(let f=0,h=0;f<c;++f,h+=l)u[f]=a.substr(h,l);a=u.join(e===Uc.Scalar.BLOCK_LITERAL?`
|
|
100
|
+
`:" ")}return Dk.stringifyString({comment:i,type:e,value:a},r,n,s)}};P0.binary=qk});var mo=w(po=>{"use strict";var ho=fe(),$c=ui(),Uk=Re(),jk=di();function L0(i,e){var t;if(ho.isSeq(i))for(let r=0;r<i.items.length;++r){let n=i.items[r];if(!ho.isPair(n)){if(ho.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let s=n.items[0]||new $c.Pair(new Uk.Scalar(null));if(n.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${n.commentBefore}
|
|
101
101
|
${s.key.commentBefore}`:n.commentBefore),n.comment){let o=(t=s.value)!=null?t:s.key;o.comment=o.comment?`${n.comment}
|
|
102
|
-
${o.comment}`:n.comment}n=s}i.items[r]=fo.isPair(n)?n:new qc.Pair(n)}}else e("Expected a sequence for this tag");return i}function P0(i,e,t){let{replacer:r}=t,n=new Ek.YAMLSeq(i);n.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;n.items.push(qc.createPair(a,l,t))}return n}var Ok={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:B0,createNode:P0};ho.createPairs=P0;ho.pairs=Ok;ho.resolvePairs=B0});var jc=w(Uc=>{"use strict";var L0=fe(),Dc=si(),vn=fi(),kk=hi(),R0=po(),Li=class i extends kk.YAMLSeq{constructor(){super(),this.add=vn.YAMLMap.prototype.add.bind(this),this.delete=vn.YAMLMap.prototype.delete.bind(this),this.get=vn.YAMLMap.prototype.get.bind(this),this.has=vn.YAMLMap.prototype.has.bind(this),this.set=vn.YAMLMap.prototype.set.bind(this),this.tag=i.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;t!=null&&t.onCreate&&t.onCreate(r);for(let n of this.items){let s,o;if(L0.isPair(n)?(s=Dc.toJS(n.key,"",t),o=Dc.toJS(n.value,s,t)):s=Dc.toJS(n,"",t),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,t,r){let n=R0.createPairs(e,t,r),s=new this;return s.items=n.items,s}};Li.tag="tag:yaml.org,2002:omap";var Ck={collection:"seq",identify:i=>i instanceof Map,nodeClass:Li,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,e){let t=R0.resolvePairs(i,e),r=[];for(let{key:n}of t.items)L0.isScalar(n)&&(r.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):r.push(n.value));return Object.assign(new Li,t)},createNode:(i,e,t)=>Li.from(i,e,t)};Uc.YAMLOMap=Li;Uc.omap=Ck});var U0=w($c=>{"use strict";var M0=Le();function F0({value:i,source:e},t){return e&&(i?q0:D0).test.test(e)?e:i?t.options.trueStr:t.options.falseStr}var q0={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new M0.Scalar(!0),stringify:F0},D0={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new M0.Scalar(!1),stringify:F0};$c.falseTag=D0;$c.trueTag=q0});var j0=w(mo=>{"use strict";var Ak=Le(),Vc=wr(),Ik={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Vc.stringifyNumber},Tk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){let e=Number(i.value);return isFinite(e)?e.toExponential():Vc.stringifyNumber(i)}},Nk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){let e=new Ak.Scalar(parseFloat(i.replace(/_/g,""))),t=i.indexOf(".");if(t!==-1){let r=i.substring(t+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Vc.stringifyNumber};mo.float=Nk;mo.floatExp=Tk;mo.floatNaN=Ik});var V0=w(bn=>{"use strict";var $0=wr(),_n=i=>typeof i=="bigint"||Number.isInteger(i);function go(i,e,t,{intAsBigInt:r}){let n=i[0];if((n==="-"||n==="+")&&(e+=1),i=i.substring(e).replace(/_/g,""),r){switch(t){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}let o=BigInt(i);return n==="-"?BigInt(-1)*o:o}let s=parseInt(i,t);return n==="-"?-1*s:s}function Hc(i,e,t){let{value:r}=i;if(_n(r)){let n=r.toString(e);return r<0?"-"+t+n.substr(1):t+n}return $0.stringifyNumber(i)}var Bk={identify:_n,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,e,t)=>go(i,2,2,t),stringify:i=>Hc(i,2,"0b")},Pk={identify:_n,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,e,t)=>go(i,1,8,t),stringify:i=>Hc(i,8,"0")},Lk={identify:_n,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,e,t)=>go(i,0,10,t),stringify:$0.stringifyNumber},Rk={identify:_n,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,e,t)=>go(i,2,16,t),stringify:i=>Hc(i,16,"0x")};bn.int=Lk;bn.intBin=Bk;bn.intHex=Rk;bn.intOct=Pk});var Gc=w(Wc=>{"use strict";var _o=fe(),yo=ci(),vo=fi(),Ri=class i extends vo.YAMLMap{constructor(e){super(e),this.tag=i.tag}add(e){let t;_o.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new yo.Pair(e.key,null):t=new yo.Pair(e,null),vo.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let r=vo.findPair(this.items,e);return!t&&_o.isPair(r)?_o.isScalar(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=vo.findPair(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new yo.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){let{replacer:n}=r,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof n=="function"&&(o=n.call(t,o,o)),s.items.push(yo.createPair(o,null,r));return s}};Ri.tag="tag:yaml.org,2002:set";var Mk={collection:"map",identify:i=>i instanceof Set,nodeClass:Ri,default:!1,tag:"tag:yaml.org,2002:set",createNode:(i,e,t)=>Ri.from(i,e,t),resolve(i,e){if(_o.isMap(i)){if(i.hasAllNullValues(!0))return Object.assign(new Ri,i);e("Set items must all have null values")}else e("Expected a mapping for this tag");return i}};Wc.YAMLSet=Ri;Wc.set=Mk});var Kc=w(bo=>{"use strict";var Fk=wr();function Yc(i,e){let t=i[0],r=t==="-"||t==="+"?i.substring(1):i,n=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*n(60)+n(a),n(0));return t==="-"?n(-1)*s:s}function H0(i){let{value:e}=i,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Fk.stringifyNumber(i);let r="";e<0&&(r="-",e*=t(-1));let n=t(60),s=[e%n];return e<60?s.unshift(0):(e=(e-s[0])/n,s.unshift(e%n),e>=60&&(e=(e-s[0])/n,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var qk={identify:i=>typeof i=="bigint"||Number.isInteger(i),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(i,e,{intAsBigInt:t})=>Yc(i,t),stringify:H0},Dk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:i=>Yc(i,!1),stringify:H0},W0={identify:i=>i instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(i){let e=i.match(W0.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,r,n,s,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,r-1,n,s||0,o||0,a||0,l),u=e[8];if(u&&u!=="Z"){let f=Yc(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:i})=>{var e;return(e=i==null?void 0:i.toISOString().replace(/(T00:00:00)?\.000Z$/,""))!=null?e:""}};bo.floatTime=Dk;bo.intTime=qk;bo.timestamp=W0});var K0=w(Y0=>{"use strict";var Uk=_r(),jk=oo(),$k=br(),Vk=gn(),Hk=Fc(),G0=U0(),zc=j0(),wo=V0(),Wk=Qs(),Gk=jc(),Yk=po(),Kk=Gc(),Jc=Kc(),zk=[Uk.map,$k.seq,Vk.string,jk.nullTag,G0.trueTag,G0.falseTag,wo.intBin,wo.intOct,wo.int,wo.intHex,zc.floatNaN,zc.floatExp,zc.float,Hk.binary,Wk.merge,Gk.omap,Yk.pairs,Kk.set,Jc.intTime,Jc.floatTime,Jc.timestamp];Y0.schema=zk});var ny=w(Xc=>{"use strict";var Q0=_r(),Jk=oo(),X0=br(),Zk=gn(),Qk=Ic(),Zc=Nc(),Qc=Pc(),Xk=C0(),eC=T0(),ey=Fc(),wn=Qs(),ty=jc(),iy=po(),z0=K0(),ry=Gc(),xo=Kc(),J0=new Map([["core",Xk.schema],["failsafe",[Q0.map,X0.seq,Zk.string]],["json",eC.schema],["yaml11",z0.schema],["yaml-1.1",z0.schema]]),Z0={binary:ey.binary,bool:Qk.boolTag,float:Zc.float,floatExp:Zc.floatExp,floatNaN:Zc.floatNaN,floatTime:xo.floatTime,int:Qc.int,intHex:Qc.intHex,intOct:Qc.intOct,intTime:xo.intTime,map:Q0.map,merge:wn.merge,null:Jk.nullTag,omap:ty.omap,pairs:iy.pairs,seq:X0.seq,set:ry.set,timestamp:xo.timestamp},tC={"tag:yaml.org,2002:binary":ey.binary,"tag:yaml.org,2002:merge":wn.merge,"tag:yaml.org,2002:omap":ty.omap,"tag:yaml.org,2002:pairs":iy.pairs,"tag:yaml.org,2002:set":ry.set,"tag:yaml.org,2002:timestamp":xo.timestamp};function iC(i,e,t){let r=J0.get(e);if(r&&!i)return t&&!r.includes(wn.merge)?r.concat(wn.merge):r.slice();let n=r;if(!n)if(Array.isArray(i))n=[];else{let s=Array.from(J0.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(i))for(let s of i)n=n.concat(s);else typeof i=="function"&&(n=i(n.slice()));return t&&(n=n.concat(wn.merge)),n.reduce((s,o)=>{let a=typeof o=="string"?Z0[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(Z0).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return s.includes(a)||s.push(a),s},[])}Xc.coreKnownTags=tC;Xc.getTags=iC});var iu=w(sy=>{"use strict";var eu=fe(),rC=_r(),nC=br(),sC=gn(),So=ny(),oC=(i,e)=>i.key<e.key?-1:i.key>e.key?1:0,tu=class i{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?So.getTags(e,"compat"):e?So.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=n?So.coreKnownTags:{},this.tags=So.getTags(t,this.name,r),this.toStringOptions=a!=null?a:null,Object.defineProperty(this,eu.MAP,{value:rC.map}),Object.defineProperty(this,eu.SCALAR,{value:sC.string}),Object.defineProperty(this,eu.SEQ,{value:nC.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?oC:null}clone(){let e=Object.create(i.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};sy.Schema=tu});var ay=w(oy=>{"use strict";var aC=fe(),ru=hn(),xn=ln();function lC(i,e){var l;let t=[],r=e.directives===!0;if(e.directives!==!1&&i.directives){let c=i.directives.toString(i);c?(t.push(c),r=!0):i.directives.docStart&&(r=!0)}r&&t.push("---");let n=ru.createStringifyContext(i,e),{commentString:s}=n.options;if(i.commentBefore){t.length!==1&&t.unshift("");let c=s(i.commentBefore);t.unshift(xn.indentComment(c,""))}let o=!1,a=null;if(i.contents){if(aC.isNode(i.contents)){if(i.contents.spaceBefore&&r&&t.push(""),i.contents.commentBefore){let f=s(i.contents.commentBefore);t.push(xn.indentComment(f,""))}n.forceBlockIndent=!!i.comment,a=i.contents.comment}let c=a?void 0:()=>o=!0,u=ru.stringify(i.contents,n,()=>a=null,c);a&&(u+=xn.lineComment(u,"",s(a))),(u[0]==="|"||u[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${u}`:t.push(u)}else t.push(ru.stringify(i.contents,n));if((l=i.directives)!=null&&l.docEnd)if(i.comment){let c=s(i.comment);c.includes(`
|
|
103
|
-
`)?(t.push("..."),t.push(
|
|
102
|
+
${o.comment}`:n.comment}n=s}i.items[r]=ho.isPair(n)?n:new $c.Pair(n)}}else e("Expected a sequence for this tag");return i}function R0(i,e,t){let{replacer:r}=t,n=new jk.YAMLSeq(i);n.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;n.items.push($c.createPair(a,l,t))}return n}var $k={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:L0,createNode:R0};po.createPairs=R0;po.pairs=$k;po.resolvePairs=L0});var Gc=w(Vc=>{"use strict";var M0=fe(),Hc=oi(),bn=hi(),Hk=di(),F0=mo(),Mi=class i extends Hk.YAMLSeq{constructor(){super(),this.add=bn.YAMLMap.prototype.add.bind(this),this.delete=bn.YAMLMap.prototype.delete.bind(this),this.get=bn.YAMLMap.prototype.get.bind(this),this.has=bn.YAMLMap.prototype.has.bind(this),this.set=bn.YAMLMap.prototype.set.bind(this),this.tag=i.tag}toJSON(e,t){if(!t)return super.toJSON(e);let r=new Map;t!=null&&t.onCreate&&t.onCreate(r);for(let n of this.items){let s,o;if(M0.isPair(n)?(s=Hc.toJS(n.key,"",t),o=Hc.toJS(n.value,s,t)):s=Hc.toJS(n,"",t),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,t,r){let n=F0.createPairs(e,t,r),s=new this;return s.items=n.items,s}};Mi.tag="tag:yaml.org,2002:omap";var Vk={collection:"seq",identify:i=>i instanceof Map,nodeClass:Mi,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,e){let t=F0.resolvePairs(i,e),r=[];for(let{key:n}of t.items)M0.isScalar(n)&&(r.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):r.push(n.value));return Object.assign(new Mi,t)},createNode:(i,e,t)=>Mi.from(i,e,t)};Vc.YAMLOMap=Mi;Vc.omap=Vk});var $0=w(Wc=>{"use strict";var D0=Re();function q0({value:i,source:e},t){return e&&(i?U0:j0).test.test(e)?e:i?t.options.trueStr:t.options.falseStr}var U0={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new D0.Scalar(!0),stringify:q0},j0={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new D0.Scalar(!1),stringify:q0};Wc.falseTag=j0;Wc.trueTag=U0});var H0=w(go=>{"use strict";var Gk=Re(),Yc=xr(),Wk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Yc.stringifyNumber},Yk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){let e=Number(i.value);return isFinite(e)?e.toExponential():Yc.stringifyNumber(i)}},Kk={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){let e=new Gk.Scalar(parseFloat(i.replace(/_/g,""))),t=i.indexOf(".");if(t!==-1){let r=i.substring(t+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Yc.stringifyNumber};go.float=Kk;go.floatExp=Yk;go.floatNaN=Wk});var G0=w(xn=>{"use strict";var V0=xr(),wn=i=>typeof i=="bigint"||Number.isInteger(i);function yo(i,e,t,{intAsBigInt:r}){let n=i[0];if((n==="-"||n==="+")&&(e+=1),i=i.substring(e).replace(/_/g,""),r){switch(t){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}let o=BigInt(i);return n==="-"?BigInt(-1)*o:o}let s=parseInt(i,t);return n==="-"?-1*s:s}function Kc(i,e,t){let{value:r}=i;if(wn(r)){let n=r.toString(e);return r<0?"-"+t+n.substr(1):t+n}return V0.stringifyNumber(i)}var zk={identify:wn,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,e,t)=>yo(i,2,2,t),stringify:i=>Kc(i,2,"0b")},Jk={identify:wn,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,e,t)=>yo(i,1,8,t),stringify:i=>Kc(i,8,"0")},Zk={identify:wn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,e,t)=>yo(i,0,10,t),stringify:V0.stringifyNumber},Qk={identify:wn,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,e,t)=>yo(i,2,16,t),stringify:i=>Kc(i,16,"0x")};xn.int=Zk;xn.intBin=zk;xn.intHex=Qk;xn.intOct=Jk});var Jc=w(zc=>{"use strict";var bo=fe(),vo=ui(),_o=hi(),Fi=class i extends _o.YAMLMap{constructor(e){super(e),this.tag=i.tag}add(e){let t;bo.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new vo.Pair(e.key,null):t=new vo.Pair(e,null),_o.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let r=_o.findPair(this.items,e);return!t&&bo.isPair(r)?bo.isScalar(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=_o.findPair(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new vo.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){let{replacer:n}=r,s=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof n=="function"&&(o=n.call(t,o,o)),s.items.push(vo.createPair(o,null,r));return s}};Fi.tag="tag:yaml.org,2002:set";var Xk={collection:"map",identify:i=>i instanceof Set,nodeClass:Fi,default:!1,tag:"tag:yaml.org,2002:set",createNode:(i,e,t)=>Fi.from(i,e,t),resolve(i,e){if(bo.isMap(i)){if(i.hasAllNullValues(!0))return Object.assign(new Fi,i);e("Set items must all have null values")}else e("Expected a mapping for this tag");return i}};zc.YAMLSet=Fi;zc.set=Xk});var Qc=w(wo=>{"use strict";var eC=xr();function Zc(i,e){let t=i[0],r=t==="-"||t==="+"?i.substring(1):i,n=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*n(60)+n(a),n(0));return t==="-"?n(-1)*s:s}function W0(i){let{value:e}=i,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return eC.stringifyNumber(i);let r="";e<0&&(r="-",e*=t(-1));let n=t(60),s=[e%n];return e<60?s.unshift(0):(e=(e-s[0])/n,s.unshift(e%n),e>=60&&(e=(e-s[0])/n,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var tC={identify:i=>typeof i=="bigint"||Number.isInteger(i),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(i,e,{intAsBigInt:t})=>Zc(i,t),stringify:W0},iC={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:i=>Zc(i,!1),stringify:W0},Y0={identify:i=>i instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(i){let e=i.match(Y0.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,r,n,s,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,r-1,n,s||0,o||0,a||0,l),u=e[8];if(u&&u!=="Z"){let f=Zc(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:i})=>{var e;return(e=i==null?void 0:i.toISOString().replace(/(T00:00:00)?\.000Z$/,""))!=null?e:""}};wo.floatTime=iC;wo.intTime=tC;wo.timestamp=Y0});var J0=w(z0=>{"use strict";var rC=br(),nC=ao(),sC=wr(),oC=vn(),aC=jc(),K0=$0(),Xc=H0(),xo=G0(),lC=Xs(),cC=Gc(),uC=mo(),fC=Jc(),eu=Qc(),hC=[rC.map,sC.seq,oC.string,nC.nullTag,K0.trueTag,K0.falseTag,xo.intBin,xo.intOct,xo.int,xo.intHex,Xc.floatNaN,Xc.floatExp,Xc.float,aC.binary,lC.merge,cC.omap,uC.pairs,fC.set,eu.intTime,eu.floatTime,eu.timestamp];z0.schema=hC});var oy=w(ru=>{"use strict";var ey=br(),dC=ao(),ty=wr(),pC=vn(),mC=Pc(),tu=Rc(),iu=Fc(),gC=I0(),yC=B0(),iy=jc(),Sn=Xs(),ry=Gc(),ny=mo(),Z0=J0(),sy=Jc(),So=Qc(),Q0=new Map([["core",gC.schema],["failsafe",[ey.map,ty.seq,pC.string]],["json",yC.schema],["yaml11",Z0.schema],["yaml-1.1",Z0.schema]]),X0={binary:iy.binary,bool:mC.boolTag,float:tu.float,floatExp:tu.floatExp,floatNaN:tu.floatNaN,floatTime:So.floatTime,int:iu.int,intHex:iu.intHex,intOct:iu.intOct,intTime:So.intTime,map:ey.map,merge:Sn.merge,null:dC.nullTag,omap:ry.omap,pairs:ny.pairs,seq:ty.seq,set:sy.set,timestamp:So.timestamp},vC={"tag:yaml.org,2002:binary":iy.binary,"tag:yaml.org,2002:merge":Sn.merge,"tag:yaml.org,2002:omap":ry.omap,"tag:yaml.org,2002:pairs":ny.pairs,"tag:yaml.org,2002:set":sy.set,"tag:yaml.org,2002:timestamp":So.timestamp};function _C(i,e,t){let r=Q0.get(e);if(r&&!i)return t&&!r.includes(Sn.merge)?r.concat(Sn.merge):r.slice();let n=r;if(!n)if(Array.isArray(i))n=[];else{let s=Array.from(Q0.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(i))for(let s of i)n=n.concat(s);else typeof i=="function"&&(n=i(n.slice()));return t&&(n=n.concat(Sn.merge)),n.reduce((s,o)=>{let a=typeof o=="string"?X0[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(X0).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return s.includes(a)||s.push(a),s},[])}ru.coreKnownTags=vC;ru.getTags=_C});var ou=w(ay=>{"use strict";var nu=fe(),bC=br(),wC=wr(),xC=vn(),Eo=oy(),SC=(i,e)=>i.key<e.key?-1:i.key>e.key?1:0,su=class i{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Eo.getTags(e,"compat"):e?Eo.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=n?Eo.coreKnownTags:{},this.tags=Eo.getTags(t,this.name,r),this.toStringOptions=a!=null?a:null,Object.defineProperty(this,nu.MAP,{value:bC.map}),Object.defineProperty(this,nu.SCALAR,{value:xC.string}),Object.defineProperty(this,nu.SEQ,{value:wC.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?SC:null}clone(){let e=Object.create(i.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};ay.Schema=su});var cy=w(ly=>{"use strict";var EC=fe(),au=pn(),En=un();function OC(i,e){var l;let t=[],r=e.directives===!0;if(e.directives!==!1&&i.directives){let c=i.directives.toString(i);c?(t.push(c),r=!0):i.directives.docStart&&(r=!0)}r&&t.push("---");let n=au.createStringifyContext(i,e),{commentString:s}=n.options;if(i.commentBefore){t.length!==1&&t.unshift("");let c=s(i.commentBefore);t.unshift(En.indentComment(c,""))}let o=!1,a=null;if(i.contents){if(EC.isNode(i.contents)){if(i.contents.spaceBefore&&r&&t.push(""),i.contents.commentBefore){let f=s(i.contents.commentBefore);t.push(En.indentComment(f,""))}n.forceBlockIndent=!!i.comment,a=i.contents.comment}let c=a?void 0:()=>o=!0,u=au.stringify(i.contents,n,()=>a=null,c);a&&(u+=En.lineComment(u,"",s(a))),(u[0]==="|"||u[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${u}`:t.push(u)}else t.push(au.stringify(i.contents,n));if((l=i.directives)!=null&&l.docEnd)if(i.comment){let c=s(i.comment);c.includes(`
|
|
103
|
+
`)?(t.push("..."),t.push(En.indentComment(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=i.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(En.indentComment(s(c),"")))}return t.join(`
|
|
104
104
|
`)+`
|
|
105
|
-
`}
|
|
105
|
+
`}ly.stringifyDocument=OC});var On=w(uy=>{"use strict";var kC=ln(),Sr=Vs(),Ot=fe(),CC=ui(),AC=oi(),IC=ou(),TC=cy(),lu=Us(),NC=hc(),BC=cn(),cu=fc(),uu=class i{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ot.NODE_TYPE,{value:Ot.DOC});let n=null;typeof t=="function"||Array.isArray(t)?n=t:r===void 0&&t&&(r=t,t=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new cu.Directives({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,n,r)}clone(){let e=Object.create(i.prototype,{[Ot.NODE_TYPE]:{value:Ot.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Ot.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Er(this.contents)&&this.contents.add(e)}addIn(e,t){Er(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let r=lu.anchorNames(this);e.anchor=!t||r.has(t)?lu.findNewAnchor(t||"a",r):t}return new kC.Alias(e.anchor)}createNode(e,t,r){let n;if(typeof t=="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){let g=b=>typeof b=="number"||b instanceof String||b instanceof Number,v=t.filter(g).map(String);v.length>0&&(t=t.concat(v)),n=t}else r===void 0&&t&&(r=t,t=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=r!=null?r:{},{onAnchor:f,setAnchors:h,sourceObjects:p}=lu.createNodeAnchors(this,o||"a"),m={aliasDuplicateObjects:s!=null?s:!0,keepUndefined:l!=null?l:!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:p},d=BC.createNode(e,u,m);return a&&Ot.isCollection(d)&&(d.flow=!0),h(),d}createPair(e,t,r={}){let n=this.createNode(e,null,r),s=this.createNode(t,null,r);return new CC.Pair(n,s)}delete(e){return Er(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Sr.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):Er(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Ot.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Sr.isEmptyPath(e)?!t&&Ot.isScalar(this.contents)?this.contents.value:this.contents:Ot.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Ot.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Sr.isEmptyPath(e)?this.contents!==void 0:Ot.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Sr.collectionFromPath(this.schema,[e],t):Er(this.contents)&&this.contents.set(e,t)}setIn(e,t){Sr.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=Sr.collectionFromPath(this.schema,Array.from(e),t):Er(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new cu.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new cu.Directives({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new IC.Schema(Object.assign(r,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=AC.toJS(this.contents,t!=null?t:"",a);if(typeof s=="function")for(let{count:c,res:u}of a.anchors.values())s(u,c);return typeof o=="function"?NC.applyReviver(o,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return TC.stringifyDocument(this,e)}};function Er(i){if(Ot.isCollection(i))return!0;throw new Error("Expected a YAML collection as document contents")}uy.Document=uu});var An=w(Cn=>{"use strict";var kn=class extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}},fu=class extends kn{constructor(e,t,r){super("YAMLParseError",e,t,r)}},hu=class extends kn{constructor(e,t,r){super("YAMLWarning",e,t,r)}},PC=(i,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));let{line:r,col:n}=t.linePos[0];t.message+=` at line ${r}, column ${n}`;let s=n-1,o=i.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){let a=Math.min(s-39,o.length-79);o="\u2026"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(o.substring(0,s))){let a=i.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
|
|
106
106
|
`),o=a+o}if(/[^ ]/.test(o)){let a=1,l=t.linePos[1];(l==null?void 0:l.line)===r&&l.col>n&&(a=Math.max(1,Math.min(l.col-n,80-s)));let c=" ".repeat(s)+"^".repeat(a);t.message+=`:
|
|
107
107
|
|
|
108
108
|
${o}
|
|
109
109
|
${c}
|
|
110
|
-
`}};
|
|
111
|
-
`))return!0;if(i.end){for(let e of i.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of i.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(
|
|
112
|
-
`+
|
|
113
|
-
`+
|
|
114
|
-
`+S.comment:c.comment=S.comment),f=S.end;continue}!o&&t.options.strict&&
|
|
115
|
-
`+I
|
|
116
|
-
`+
|
|
117
|
-
`+y.comment:c.comment=y.comment),c.range=[r.offset,d,y.offset]}else c.range=[r.offset,d,d];return c}
|
|
118
|
-
`.repeat(Math.max(1,o.length-1)):"",g=r+n.length;return e.source&&(g+=e.source.length),{value:d,type:s,comment:n.comment,range:[r,g,g]}}let l=e.indent+n.indent,c=e.offset+n.length,u=0;for(let d=0;d<a;++d){let[g,
|
|
119
|
-
`;for(let d=u;d<a;++d){let[g,
|
|
120
|
-
`):g.length>l||
|
|
110
|
+
`}};Cn.YAMLError=kn;Cn.YAMLParseError=fu;Cn.YAMLWarning=hu;Cn.prettifyError=PC});var In=w(fy=>{"use strict";function LC(i,{flow:e,indicator:t,next:r,offset:n,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",h="",p=!1,m=!1,d=null,g=null,v=null,b=null,y=null,x=null,_=null;for(let C of i)switch(m&&(C.type!=="space"&&C.type!=="newline"&&C.type!=="comma"&&s(C.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),d&&(c&&C.type!=="comment"&&C.type!=="newline"&&s(d,"TAB_AS_INDENT","Tabs are not allowed as indentation"),d=null),C.type){case"space":!e&&(t!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&C.source.includes(" ")&&(d=C),u=!0;break;case"comment":{u||s(C,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let S=C.source.substring(1)||" ";f?f+=h+S:f=S,h="",c=!1;break}case"newline":c?f?f+=C.source:(!x||t!=="seq-item-ind")&&(l=!0):h+=C.source,c=!0,p=!0,(g||v)&&(b=C),u=!0;break;case"anchor":g&&s(C,"MULTIPLE_ANCHORS","A node can have at most one anchor"),C.source.endsWith(":")&&s(C.offset+C.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=C,_!=null||(_=C.offset),c=!1,u=!1,m=!0;break;case"tag":{v&&s(C,"MULTIPLE_TAGS","A node can have at most one tag"),v=C,_!=null||(_=C.offset),c=!1,u=!1,m=!0;break}case t:(g||v)&&s(C,"BAD_PROP_ORDER",`Anchors and tags must be after the ${C.source} indicator`),x&&s(C,"UNEXPECTED_TOKEN",`Unexpected ${C.source} in ${e!=null?e:"collection"}`),x=C,c=t==="seq-item-ind"||t==="explicit-key-ind",u=!1;break;case"comma":if(e){y&&s(C,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),y=C,c=!1,u=!1;break}default:s(C,"UNEXPECTED_TOKEN",`Unexpected ${C.type} token`),c=!1,u=!1}let A=i[i.length-1],E=A?A.offset+A.source.length:n;return m&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),d&&(c&&d.indent<=o||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&s(d,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:y,found:x,spaceBefore:l,comment:f,hasNewline:p,anchor:g,tag:v,newlineAfterProp:b,end:E,start:_!=null?_:E}}fy.resolveProps=LC});var Oo=w(hy=>{"use strict";function du(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(`
|
|
111
|
+
`))return!0;if(i.end){for(let e of i.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of i.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(du(e.key)||du(e.value))return!0}return!1;default:return!0}}hy.containsNewline=du});var pu=w(dy=>{"use strict";var RC=Oo();function MC(i,e,t){if((e==null?void 0:e.type)==="flow-collection"){let r=e.end[0];r.indent===i&&(r.source==="]"||r.source==="}")&&RC.containsNewline(e)&&t(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}dy.flowIndentCheck=MC});var mu=w(my=>{"use strict";var py=fe();function FC(i,e,t){let{uniqueKeys:r}=i.options;if(r===!1)return!1;let n=typeof r=="function"?r:(s,o)=>s===o||py.isScalar(s)&&py.isScalar(o)&&s.value===o.value;return e.some(s=>n(s.key,t))}my.mapIncludes=FC});var wy=w(by=>{"use strict";var gy=ui(),DC=hi(),yy=In(),qC=Oo(),vy=pu(),UC=mu(),_y="All mapping items must start at the same column";function jC({composeNode:i,composeEmptyNode:e},t,r,n,s){var u,f;let o=(u=s==null?void 0:s.nodeClass)!=null?u:DC.YAMLMap,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let l=r.offset,c=null;for(let h of r.items){let{start:p,key:m,sep:d,value:g}=h,v=yy.resolveProps(p,{indicator:"explicit-key-ind",next:m!=null?m:d==null?void 0:d[0],offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0}),b=!v.found;if(b){if(m&&(m.type==="block-seq"?n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==r.indent&&n(l,"BAD_INDENT",_y)),!v.anchor&&!v.tag&&!d){c=v.end,v.comment&&(a.comment?a.comment+=`
|
|
112
|
+
`+v.comment:a.comment=v.comment);continue}(v.newlineAfterProp||qC.containsNewline(m))&&n(m!=null?m:p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((f=v.found)==null?void 0:f.indent)!==r.indent&&n(l,"BAD_INDENT",_y);t.atKey=!0;let y=v.end,x=m?i(t,m,v,n):e(t,y,p,null,v,n);t.schema.compat&&vy.flowIndentCheck(r.indent,m,n),t.atKey=!1,UC.mapIncludes(t,a.items,x)&&n(y,"DUPLICATE_KEY","Map keys must be unique");let _=yy.resolveProps(d!=null?d:[],{indicator:"map-value-ind",next:g,offset:x.range[2],onError:n,parentIndent:r.indent,startOnNewline:!m||m.type==="block-scalar"});if(l=_.end,_.found){b&&((g==null?void 0:g.type)==="block-map"&&!_.hasNewline&&n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&v.start<_.found.offset-1024&&n(x.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let A=g?i(t,g,_,n):e(t,l,d,null,_,n);t.schema.compat&&vy.flowIndentCheck(r.indent,g,n),l=A.range[2];let E=new gy.Pair(x,A);t.options.keepSourceTokens&&(E.srcToken=h),a.items.push(E)}else{b&&n(x.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),_.comment&&(x.comment?x.comment+=`
|
|
113
|
+
`+_.comment:x.comment=_.comment);let A=new gy.Pair(x);t.options.keepSourceTokens&&(A.srcToken=h),a.items.push(A)}}return c&&c<l&&n(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,l,c!=null?c:l],a}by.resolveBlockMap=jC});var Sy=w(xy=>{"use strict";var $C=di(),HC=In(),VC=pu();function GC({composeNode:i,composeEmptyNode:e},t,r,n,s){var u;let o=(u=s==null?void 0:s.nodeClass)!=null?u:$C.YAMLSeq,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=r.offset,c=null;for(let{start:f,value:h}of r.items){let p=HC.resolveProps(f,{indicator:"seq-item-ind",next:h,offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||h)(h==null?void 0:h.type)==="block-seq"?n(p.end,"BAD_INDENT","All sequence items must start at the same column"):n(l,"MISSING_CHAR","Sequence item without - indicator");else{c=p.end,p.comment&&(a.comment=p.comment);continue}let m=h?i(t,h,p,n):e(t,p.end,f,null,p,n);t.schema.compat&&VC.flowIndentCheck(r.indent,h,n),l=m.range[2],a.items.push(m)}return a.range=[r.offset,l,c!=null?c:l],a}xy.resolveBlockSeq=GC});var Or=w(Ey=>{"use strict";function WC(i,e,t,r){let n="";if(i){let s=!1,o="";for(let a of i){let{source:l,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{t&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";n?n+=o+u:n=u,o="";break}case"newline":n&&(o+=l),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:n,offset:e}}Ey.resolveEnd=WC});var Ay=w(Cy=>{"use strict";var YC=fe(),KC=ui(),Oy=hi(),zC=di(),JC=Or(),ky=In(),ZC=Oo(),QC=mu(),gu="Block collections are not allowed within flow collections",yu=i=>i&&(i.type==="block-map"||i.type==="block-seq");function XC({composeNode:i,composeEmptyNode:e},t,r,n,s){var g,v,b;let o=r.start.source==="{",a=o?"flow map":"flow sequence",l=(g=s==null?void 0:s.nodeClass)!=null?g:o?Oy.YAMLMap:zC.YAMLSeq,c=new l(t.schema);c.flow=!0;let u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=r.offset+r.start.source.length;for(let y=0;y<r.items.length;++y){let x=r.items[y],{start:_,key:A,sep:E,value:C}=x,S=ky.resolveProps(_,{flow:a,indicator:"explicit-key-ind",next:A!=null?A:E==null?void 0:E[0],offset:f,onError:n,parentIndent:r.indent,startOnNewline:!1});if(!S.found){if(!S.anchor&&!S.tag&&!E&&!C){y===0&&S.comma?n(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):y<r.items.length-1&&n(S.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),S.comment&&(c.comment?c.comment+=`
|
|
114
|
+
`+S.comment:c.comment=S.comment),f=S.end;continue}!o&&t.options.strict&&ZC.containsNewline(A)&&n(A,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(y===0)S.comma&&n(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(S.comma||n(S.start,"MISSING_CHAR",`Missing , between ${a} items`),S.comment){let T="";e:for(let I of _)switch(I.type){case"comma":case"space":break;case"comment":T=I.source.substring(1);break e;default:break e}if(T){let I=c.items[c.items.length-1];YC.isPair(I)&&(I=(v=I.value)!=null?v:I.key),I.comment?I.comment+=`
|
|
115
|
+
`+T:I.comment=T,S.comment=S.comment.substring(T.length+1)}}if(!o&&!E&&!S.found){let T=C?i(t,C,S,n):e(t,S.end,E,null,S,n);c.items.push(T),f=T.range[2],yu(C)&&n(T.range,"BLOCK_IN_FLOW",gu)}else{t.atKey=!0;let T=S.end,I=A?i(t,A,S,n):e(t,T,_,null,S,n);yu(A)&&n(I.range,"BLOCK_IN_FLOW",gu),t.atKey=!1;let F=ky.resolveProps(E!=null?E:[],{flow:a,indicator:"map-value-ind",next:C,offset:I.range[2],onError:n,parentIndent:r.indent,startOnNewline:!1});if(F.found){if(!o&&!S.found&&t.options.strict){if(E)for(let P of E){if(P===F.found)break;if(P.type==="newline"){n(P,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}S.start<F.found.offset-1024&&n(F.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else C&&("source"in C&&((b=C.source)==null?void 0:b[0])===":"?n(C,"MISSING_CHAR",`Missing space after : in ${a}`):n(F.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let L=C?i(t,C,F,n):F.found?e(t,F.end,E,null,F,n):null;L?yu(C)&&n(L.range,"BLOCK_IN_FLOW",gu):F.comment&&(I.comment?I.comment+=`
|
|
116
|
+
`+F.comment:I.comment=F.comment);let $=new KC.Pair(I,L);if(t.options.keepSourceTokens&&($.srcToken=x),o){let P=c;QC.mapIncludes(t,P.items,I)&&n(T,"DUPLICATE_KEY","Map keys must be unique"),P.items.push($)}else{let P=new Oy.YAMLMap(t.schema);P.flow=!0,P.items.push($);let M=(L!=null?L:I).range;P.range=[I.range[0],M[1],M[2]],c.items.push(P)}f=L?L.range[2]:F.end}}let h=o?"}":"]",[p,...m]=r.end,d=f;if((p==null?void 0:p.source)===h)d=p.offset+p.source.length;else{let y=a[0].toUpperCase()+a.substring(1),x=u?`${y} must end with a ${h}`:`${y} in block collection must be sufficiently indented and end with a ${h}`;n(f,u?"MISSING_CHAR":"BAD_INDENT",x),p&&p.source.length!==1&&m.unshift(p)}if(m.length>0){let y=JC.resolveEnd(m,d,t.options.strict,n);y.comment&&(c.comment?c.comment+=`
|
|
117
|
+
`+y.comment:c.comment=y.comment),c.range=[r.offset,d,y.offset]}else c.range=[r.offset,d,d];return c}Cy.resolveFlowCollection=XC});var Ty=w(Iy=>{"use strict";var eA=fe(),tA=Re(),iA=hi(),rA=di(),nA=wy(),sA=Sy(),oA=Ay();function vu(i,e,t,r,n,s){let o=t.type==="block-map"?nA.resolveBlockMap(i,e,t,r,s):t.type==="block-seq"?sA.resolveBlockSeq(i,e,t,r,s):oA.resolveFlowCollection(i,e,t,r,s),a=o.constructor;return n==="!"||n===a.tagName?(o.tag=a.tagName,o):(n&&(o.tag=n),o)}function aA(i,e,t,r,n){var h,p,m;let s=r.tag,o=s?e.directives.tagName(s.source,d=>n(s,"TAG_RESOLVE_FAILED",d)):null;if(t.type==="block-seq"){let{anchor:d,newlineAfterProp:g}=r,v=d&&s?d.offset>s.offset?d:s:d!=null?d:s;v&&(!g||g.offset<v.offset)&&n(v,"MISSING_CHAR","Missing newline after block sequence props")}let a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!s||!o||o==="!"||o===iA.YAMLMap.tagName&&a==="map"||o===rA.YAMLSeq.tagName&&a==="seq")return vu(i,e,t,n,o);let l=e.schema.tags.find(d=>d.tag===o&&d.collection===a);if(!l){let d=e.schema.knownTags[o];if((d==null?void 0:d.collection)===a)e.schema.tags.push(Object.assign({},d,{default:!1})),l=d;else return d?n(s,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${(h=d.collection)!=null?h:"scalar"}`,!0):n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),vu(i,e,t,n,o)}let c=vu(i,e,t,n,o,l),u=(m=(p=l.resolve)==null?void 0:p.call(l,c,d=>n(s,"TAG_RESOLVE_FAILED",d),e.options))!=null?m:c,f=eA.isNode(u)?u:new tA.Scalar(u);return f.range=c.range,f.tag=o,l!=null&&l.format&&(f.format=l.format),f}Iy.composeCollection=aA});var bu=w(Ny=>{"use strict";var _u=Re();function lA(i,e,t){let r=e.offset,n=cA(e,i.options.strict,t);if(!n)return{value:"",type:null,comment:"",range:[r,r,r]};let s=n.mode===">"?_u.Scalar.BLOCK_FOLDED:_u.Scalar.BLOCK_LITERAL,o=e.source?uA(e.source):[],a=o.length;for(let d=o.length-1;d>=0;--d){let g=o[d][1];if(g===""||g==="\r")a=d;else break}if(a===0){let d=n.chomp==="+"&&o.length>0?`
|
|
118
|
+
`.repeat(Math.max(1,o.length-1)):"",g=r+n.length;return e.source&&(g+=e.source.length),{value:d,type:s,comment:n.comment,range:[r,g,g]}}let l=e.indent+n.indent,c=e.offset+n.length,u=0;for(let d=0;d<a;++d){let[g,v]=o[d];if(v===""||v==="\r")n.indent===0&&g.length>l&&(l=g.length);else{g.length<l&&t(c+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(l=g.length),u=d,l===0&&!i.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=g.length+v.length+1}for(let d=o.length-1;d>=a;--d)o[d][0].length>l&&(a=d+1);let f="",h="",p=!1;for(let d=0;d<u;++d)f+=o[d][0].slice(l)+`
|
|
119
|
+
`;for(let d=u;d<a;++d){let[g,v]=o[d];c+=g.length+v.length+1;let b=v[v.length-1]==="\r";if(b&&(v=v.slice(0,-1)),v&&g.length<l){let x=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;t(c-v.length-(b?2:1),"BAD_INDENT",x),g=""}s===_u.Scalar.BLOCK_LITERAL?(f+=h+g.slice(l)+v,h=`
|
|
120
|
+
`):g.length>l||v[0]===" "?(h===" "?h=`
|
|
121
121
|
`:!p&&h===`
|
|
122
122
|
`&&(h=`
|
|
123
123
|
|
|
124
|
-
`),f+=h+g.slice(l)+
|
|
125
|
-
`,p=!0):
|
|
124
|
+
`),f+=h+g.slice(l)+v,h=`
|
|
125
|
+
`,p=!0):v===""?h===`
|
|
126
126
|
`?f+=`
|
|
127
127
|
`:h=`
|
|
128
|
-
`:(f+=h+
|
|
128
|
+
`:(f+=h+v,h=" ",p=!1)}switch(n.chomp){case"-":break;case"+":for(let d=a;d<o.length;++d)f+=`
|
|
129
129
|
`+o[d][0].slice(l);f[f.length-1]!==`
|
|
130
130
|
`&&(f+=`
|
|
131
131
|
`);break;default:f+=`
|
|
132
|
-
`}let m=r+n.length+e.source.length;return{value:f,type:s,comment:n.comment,range:[r,m,m]}}function
|
|
132
|
+
`}let m=r+n.length+e.source.length;return{value:f,type:s,comment:n.comment,range:[r,m,m]}}function cA({offset:i,props:e},t,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],s=n[0],o=0,a="",l=-1;for(let h=1;h<n.length;++h){let p=n[h];if(!a&&(p==="-"||p==="+"))a=p;else{let m=Number(p);!o&&m?o=m:l===-1&&(l=i+h)}}l!==-1&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let c=!1,u="",f=n.length;for(let h=1;h<e.length;++h){let p=e[h];switch(p.type){case"space":c=!0;case"newline":f+=p.source.length;break;case"comment":t&&!c&&r(p,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=p.source.length,u=p.source.substring(1);break;case"error":r(p,"UNEXPECTED_TOKEN",p.message),f+=p.source.length;break;default:{let m=`Unexpected token in block scalar header: ${p.type}`;r(p,"UNEXPECTED_TOKEN",m);let d=p.source;d&&typeof d=="string"&&(f+=d.length)}}}return{mode:s,indent:o,chomp:a,comment:u,length:f}}function uA(i){let e=i.split(/\n( *)/),t=e[0],r=t.match(/^( *)/),s=[r!=null&&r[1]?[r[1],t.slice(r[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)s.push([e[o],e[o+1]]);return s}Ny.resolveBlockScalar=lA});var xu=w(Py=>{"use strict";var wu=Re(),fA=Or();function hA(i,e,t){let{offset:r,type:n,source:s,end:o}=i,a,l,c=(h,p,m)=>t(r+h,p,m);switch(n){case"scalar":a=wu.Scalar.PLAIN,l=dA(s,c);break;case"single-quoted-scalar":a=wu.Scalar.QUOTE_SINGLE,l=pA(s,c);break;case"double-quoted-scalar":a=wu.Scalar.QUOTE_DOUBLE,l=mA(s,c);break;default:return t(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}let u=r+s.length,f=fA.resolveEnd(o,u,e,t);return{value:l,type:a,comment:f.comment,range:[r,u,f.offset]}}function dA(i,e){let t="";switch(i[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${i[0]}`;break}case"@":case"`":{t=`reserved character ${i[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),By(i)}function pA(i,e){return(i[i.length-1]!=="'"||i.length===1)&&e(i.length,"MISSING_CHAR","Missing closing 'quote"),By(i.slice(1,-1)).replace(/''/g,"'")}function By(i){var l;let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
133
133
|
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
134
134
|
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(i);if(!r)return i;let n=r[1],s=" ",o=e.lastIndex;for(t.lastIndex=o;r=t.exec(i);)r[1]===""?s===`
|
|
135
135
|
`?n+=s:s=`
|
|
136
|
-
`:(n+=s+r[1],s=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(i),n+s+((l=r==null?void 0:r[1])!=null?l:"")}function
|
|
136
|
+
`:(n+=s+r[1],s=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(i),n+s+((l=r==null?void 0:r[1])!=null?l:"")}function mA(i,e){let t="";for(let r=1;r<i.length-1;++r){let n=i[r];if(!(n==="\r"&&i[r+1]===`
|
|
137
137
|
`))if(n===`
|
|
138
|
-
`){let{fold:s,offset:o}=
|
|
138
|
+
`){let{fold:s,offset:o}=gA(i,r);t+=s,r=o}else if(n==="\\"){let s=i[++r],o=yA[s];if(o)t+=o;else if(s===`
|
|
139
139
|
`)for(s=i[r+1];s===" "||s===" ";)s=i[++r+1];else if(s==="\r"&&i[r+1]===`
|
|
140
|
-
`)for(s=i[++r+1];s===" "||s===" ";)s=i[++r+1];else if(s==="x"||s==="u"||s==="U"){let a={x:2,u:4,U:8}[s];t+=
|
|
140
|
+
`)for(s=i[++r+1];s===" "||s===" ";)s=i[++r+1];else if(s==="x"||s==="u"||s==="U"){let a={x:2,u:4,U:8}[s];t+=vA(i,r+1,a,e),r+=a}else{let a=i.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(n===" "||n===" "){let s=r,o=i[r+1];for(;o===" "||o===" ";)o=i[++r+1];o!==`
|
|
141
141
|
`&&!(o==="\r"&&i[r+2]===`
|
|
142
|
-
`)&&(t+=r>s?i.slice(s,r+1):n)}else t+=n}return(i[i.length-1]!=='"'||i.length===1)&&e(i.length,"MISSING_CHAR",'Missing closing "quote'),t}function
|
|
142
|
+
`)&&(t+=r>s?i.slice(s,r+1):n)}else t+=n}return(i[i.length-1]!=='"'||i.length===1)&&e(i.length,"MISSING_CHAR",'Missing closing "quote'),t}function gA(i,e){let t="",r=i[e+1];for(;(r===" "||r===" "||r===`
|
|
143
143
|
`||r==="\r")&&!(r==="\r"&&i[e+2]!==`
|
|
144
144
|
`);)r===`
|
|
145
145
|
`&&(t+=`
|
|
146
|
-
`),e+=1,r=i[e+1];return t||(t=" "),{fold:t,offset:e}}var
|
|
147
|
-
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function
|
|
146
|
+
`),e+=1,r=i[e+1];return t||(t=" "),{fold:t,offset:e}}var yA={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
147
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function vA(i,e,t,r){let n=i.substr(e,t),o=n.length===t&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;if(isNaN(o)){let a=i.substr(e-2,t+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}Py.resolveFlowScalar=hA});var My=w(Ry=>{"use strict";var Di=fe(),Ly=Re(),_A=bu(),bA=xu();function wA(i,e,t,r){let{value:n,type:s,comment:o,range:a}=e.type==="block-scalar"?_A.resolveBlockScalar(i,e,r):bA.resolveFlowScalar(e,i.options.strict,r),l=t?i.directives.tagName(t.source,f=>r(t,"TAG_RESOLVE_FAILED",f)):null,c;i.options.stringKeys&&i.atKey?c=i.schema[Di.SCALAR]:l?c=xA(i.schema,n,l,t,r):e.type==="scalar"?c=SA(i,n,e,r):c=i.schema[Di.SCALAR];let u;try{let f=c.resolve(n,h=>r(t!=null?t:e,"TAG_RESOLVE_FAILED",h),i.options);u=Di.isScalar(f)?f:new Ly.Scalar(f)}catch(f){let h=f instanceof Error?f.message:String(f);r(t!=null?t:e,"TAG_RESOLVE_FAILED",h),u=new Ly.Scalar(n)}return u.range=a,u.source=n,s&&(u.type=s),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function xA(i,e,t,r,n){var a;if(t==="!")return i[Di.SCALAR];let s=[];for(let l of i.tags)if(!l.collection&&l.tag===t)if(l.default&&l.test)s.push(l);else return l;for(let l of s)if((a=l.test)!=null&&a.test(e))return l;let o=i.knownTags[t];return o&&!o.collection?(i.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(n(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),i[Di.SCALAR])}function SA({atKey:i,directives:e,schema:t},r,n,s){var a;let o=t.tags.find(l=>{var c;return(l.default===!0||i&&l.default==="key")&&((c=l.test)==null?void 0:c.test(r))})||t[Di.SCALAR];if(t.compat){let l=(a=t.compat.find(c=>{var u;return c.default&&((u=c.test)==null?void 0:u.test(r))}))!=null?a:t[Di.SCALAR];if(o.tag!==l.tag){let c=e.tagString(o.tag),u=e.tagString(l.tag),f=`Value may be parsed as either ${c} or ${u}`;s(n,"TAG_RESOLVE_FAILED",f,!0)}}return o}Ry.composeScalar=wA});var Dy=w(Fy=>{"use strict";function EA(i,e,t){if(e){t!=null||(t=e.length);for(let r=t-1;r>=0;--r){let n=e[r];switch(n.type){case"space":case"comment":case"newline":i-=n.source.length;continue}for(n=e[++r];(n==null?void 0:n.type)==="space";)i+=n.source.length,n=e[++r];break}}return i}Fy.emptyScalarPosition=EA});var jy=w(Eu=>{"use strict";var OA=ln(),kA=fe(),CA=Ty(),qy=My(),AA=Or(),IA=Dy(),TA={composeNode:Uy,composeEmptyNode:Su};function Uy(i,e,t,r){let n=i.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=t,c,u=!0;switch(e.type){case"alias":c=NA(i,e,r),(a||l)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=qy.composeScalar(i,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=CA.composeCollection(TA,i,e,t,r),a&&(c.anchor=a.source.substring(1))}catch(f){let h=f instanceof Error?f.message:String(f);r(e,"RESOURCE_EXHAUSTION",h)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),u=!1}}return c!=null||(c=Su(i,e.offset,void 0,null,t,r)),a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&i.options.stringKeys&&(!kA.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l!=null?l:e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),i.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Su(i,e,t,r,{spaceBefore:n,comment:s,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:IA.emptyScalarPosition(e,t,r),indent:-1,source:""},f=qy.composeScalar(i,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=l),f}function NA({options:i},{offset:e,source:t,end:r},n){let s=new OA.Alias(t.substring(1));s.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&n(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,a=AA.resolveEnd(r,o,i.strict,n);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}Eu.composeEmptyNode=Su;Eu.composeNode=Uy});var Vy=w(Hy=>{"use strict";var BA=On(),$y=jy(),PA=Or(),LA=In();function RA(i,e,{offset:t,start:r,value:n,end:s},o){let a=Object.assign({_directives:e},i),l=new BA.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=LA.resolveProps(r,{indicator:"doc-start",next:n!=null?n:s==null?void 0:s[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=n?$y.composeNode(c,n,u,o):$y.composeEmptyNode(c,u.end,r,null,u,o);let f=l.contents.range[2],h=PA.resolveEnd(s,f,!1,o);return h.comment&&(l.comment=h.comment),l.range=[t,f,h.offset],l}Hy.composeDoc=RA});var ku=w(Yy=>{"use strict";var MA=require("process"),FA=fc(),DA=On(),Tn=An(),Gy=fe(),qA=Vy(),UA=Or();function Nn(i){if(typeof i=="number")return[i,i+1];if(Array.isArray(i))return i.length===2?i:[i[0],i[1]];let{offset:e,source:t}=i;return[e,e+(typeof t=="string"?t.length:1)]}function Wy(i){var n;let e="",t=!1,r=!1;for(let s=0;s<i.length;++s){let o=i[s];switch(o[0]){case"#":e+=(e===""?"":r?`
|
|
148
148
|
|
|
149
149
|
`:`
|
|
150
|
-
`)+(o.substring(1)||" "),t=!0,r=!1;break;case"%":((n=i[s+1])==null?void 0:n[0])!=="#"&&(s+=1),t=!1;break;default:t||(r=!0),t=!1}}return{comment:e,afterEmptyLine:r}}var
|
|
151
|
-
${r}`:r;else if(n||e.directives.docStart||!s)e.commentBefore=r;else if(
|
|
150
|
+
`)+(o.substring(1)||" "),t=!0,r=!1;break;case"%":((n=i[s+1])==null?void 0:n[0])!=="#"&&(s+=1),t=!1;break;default:t||(r=!0),t=!1}}return{comment:e,afterEmptyLine:r}}var Ou=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,n,s)=>{let o=Nn(t);s?this.warnings.push(new Tn.YAMLWarning(o,r,n)):this.errors.push(new Tn.YAMLParseError(o,r,n))},this.directives=new FA.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:n}=Wy(this.prelude);if(r){let s=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
151
|
+
${r}`:r;else if(n||e.directives.docStart||!s)e.commentBefore=r;else if(Gy.isCollection(s)&&!s.flow&&s.items.length>0){let o=s.items[0];Gy.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${r}
|
|
152
152
|
${a}`:r}else{let o=s.commentBefore;s.commentBefore=o?`${r}
|
|
153
|
-
${o}`:r}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:
|
|
154
|
-
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new
|
|
153
|
+
${o}`:r}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Wy(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let n of e)yield*this.next(n);yield*this.end(t,r)}*next(e){switch(MA.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,r,n)=>{let s=Nn(e);s[0]+=t,this.onError(s,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=qA.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Tn.YAMLParseError(Nn(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new Tn.YAMLParseError(Nn(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let t=UA.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
|
|
154
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Tn.YAMLParseError(Nn(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=Object.assign({_directives:this.directives},this.options),n=new DA.Document(void 0,r);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}};Yy.Composer=Ou});var Jy=w(ko=>{"use strict";var jA=bu(),$A=xu(),HA=An(),Ky=dn();function VA(i,e=!0,t){if(i){let r=(n,s,o)=>{let a=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(t)t(a,s,o);else throw new HA.YAMLParseError([a,a+1],s,o)};switch(i.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return $A.resolveFlowScalar(i,e,r);case"block-scalar":return jA.resolveBlockScalar({options:{strict:e}},i,r)}}return null}function GA(i,e){var c;let{implicitKey:t=!1,indent:r,inFlow:n=!1,offset:s=-1,type:o="PLAIN"}=e,a=Ky.stringifyString({type:o,value:i},{implicitKey:t,indent:r>0?" ".repeat(r):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),l=(c=e.end)!=null?c:[{type:"newline",offset:-1,indent:r,source:`
|
|
155
155
|
`}];switch(a[0]){case"|":case">":{let u=a.indexOf(`
|
|
156
156
|
`),f=a.substring(0,u),h=a.substring(u+1)+`
|
|
157
|
-
`,p=[{type:"block-scalar-header",offset:s,indent:r,source:f}];return
|
|
158
|
-
`}),{type:"block-scalar",offset:s,indent:r,props:p,source:h}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:l};default:return{type:"scalar",offset:s,indent:r,source:a,end:l}}}function
|
|
157
|
+
`,p=[{type:"block-scalar-header",offset:s,indent:r,source:f}];return zy(p,l)||p.push({type:"newline",offset:-1,indent:r,source:`
|
|
158
|
+
`}),{type:"block-scalar",offset:s,indent:r,props:p,source:h}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:l};default:return{type:"scalar",offset:s,indent:r,source:a,end:l}}}function WA(i,e,t={}){let{afterKey:r=!1,implicitKey:n=!1,inFlow:s=!1,type:o}=t,a="indent"in i?i.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(i.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=i.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=Ky.stringifyString({type:o,value:e},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":YA(i,l);break;case'"':Cu(i,l,"double-quoted-scalar");break;case"'":Cu(i,l,"single-quoted-scalar");break;default:Cu(i,l,"scalar")}}function YA(i,e){let t=e.indexOf(`
|
|
159
159
|
`),r=e.substring(0,t),n=e.substring(t+1)+`
|
|
160
|
-
`;if(i.type==="block-scalar"){let s=i.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,i.source=n}else{let{offset:s}=i,o="indent"in i?i.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];
|
|
161
|
-
`});for(let l of Object.keys(i))l!=="type"&&l!=="offset"&&delete i[l];Object.assign(i,{type:"block-scalar",indent:o,props:a,source:n})}}function
|
|
162
|
-
`};delete i.items,Object.assign(i,{type:t,source:e,end:[n]});break}default:{let r="indent"in i?i.indent:-1,n="end"in i&&Array.isArray(i.end)?i.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(i))s!=="type"&&s!=="offset"&&delete i[s];Object.assign(i,{type:t,indent:r,source:e,end:n})}}}
|
|
160
|
+
`;if(i.type==="block-scalar"){let s=i.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,i.source=n}else{let{offset:s}=i,o="indent"in i?i.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];zy(a,"end"in i?i.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
|
|
161
|
+
`});for(let l of Object.keys(i))l!=="type"&&l!=="offset"&&delete i[l];Object.assign(i,{type:"block-scalar",indent:o,props:a,source:n})}}function zy(i,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":i.push(t);break;case"newline":return i.push(t),!0}return!1}function Cu(i,e,t){switch(i.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":i.type=t,i.source=e;break;case"block-scalar":{let r=i.props.slice(1),n=e.length;i.props[0].type==="block-scalar-header"&&(n-=i.props[0].source.length);for(let s of r)s.offset+=n;delete i.props,Object.assign(i,{type:t,source:e,end:r});break}case"block-map":case"block-seq":{let n={type:"newline",offset:i.offset+e.length,indent:i.indent,source:`
|
|
162
|
+
`};delete i.items,Object.assign(i,{type:t,source:e,end:[n]});break}default:{let r="indent"in i?i.indent:-1,n="end"in i&&Array.isArray(i.end)?i.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(i))s!=="type"&&s!=="offset"&&delete i[s];Object.assign(i,{type:t,indent:r,source:e,end:n})}}}ko.createScalarToken=GA;ko.resolveAsScalar=VA;ko.setScalarValue=WA});var Qy=w(Zy=>{"use strict";var KA=i=>"type"in i?Ao(i):Co(i);function Ao(i){switch(i.type){case"block-scalar":{let e="";for(let t of i.props)e+=Ao(t);return e+i.source}case"block-map":case"block-seq":{let e="";for(let t of i.items)e+=Co(t);return e}case"flow-collection":{let e=i.start.source;for(let t of i.items)e+=Co(t);for(let t of i.end)e+=t.source;return e}case"document":{let e=Co(i);if(i.end)for(let t of i.end)e+=t.source;return e}default:{let e=i.source;if("end"in i&&i.end)for(let t of i.end)e+=t.source;return e}}}function Co({start:i,key:e,sep:t,value:r}){let n="";for(let s of i)n+=s.source;if(e&&(n+=Ao(e)),t)for(let s of t)n+=s.source;return r&&(n+=Ao(r)),n}Zy.stringify=KA});var iv=w(tv=>{"use strict";var Au=Symbol("break visit"),zA=Symbol("skip children"),Xy=Symbol("remove item");function qi(i,e){"type"in i&&i.type==="document"&&(i={start:i.start,value:i.value}),ev(Object.freeze([]),i,e)}qi.BREAK=Au;qi.SKIP=zA;qi.REMOVE=Xy;qi.itemAtPath=(i,e)=>{let t=i;for(let[r,n]of e){let s=t==null?void 0:t[r];if(s&&"items"in s)t=s.items[n];else return}return t};qi.parentCollection=(i,e)=>{let t=qi.itemAtPath(i,e.slice(0,-1)),r=e[e.length-1][0],n=t==null?void 0:t[r];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function ev(i,e,t){let r=t(e,i);if(typeof r=="symbol")return r;for(let n of["key","value"]){let s=e[n];if(s&&"items"in s){for(let o=0;o<s.items.length;++o){let a=ev(Object.freeze(i.concat([[n,o]])),s.items[o],t);if(typeof a=="number")o=a-1;else{if(a===Au)return Au;a===Xy&&(s.items.splice(o,1),o-=1)}}typeof r=="function"&&n==="key"&&(r=r(e,i))}}return typeof r=="function"?r(e,i):r}tv.visit=qi});var Io=w(ot=>{"use strict";var Iu=Jy(),JA=Qy(),ZA=iv(),Tu="\uFEFF",Nu="",Bu="",Pu="",QA=i=>!!i&&"items"in i,XA=i=>!!i&&(i.type==="scalar"||i.type==="single-quoted-scalar"||i.type==="double-quoted-scalar"||i.type==="block-scalar");function eI(i){switch(i){case Tu:return"<BOM>";case Nu:return"<DOC>";case Bu:return"<FLOW_END>";case Pu:return"<SCALAR>";default:return JSON.stringify(i)}}function tI(i){switch(i){case Tu:return"byte-order-mark";case Nu:return"doc-mode";case Bu:return"flow-error-end";case Pu:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
163
163
|
`:case`\r
|
|
164
|
-
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(i[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}
|
|
165
|
-
`:case"\r":case" ":return!0;default:return!1}}var
|
|
166
|
-
\r `),
|
|
164
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(i[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}ot.createScalarToken=Iu.createScalarToken;ot.resolveAsScalar=Iu.resolveAsScalar;ot.setScalarValue=Iu.setScalarValue;ot.stringify=JA.stringify;ot.visit=ZA.visit;ot.BOM=Tu;ot.DOCUMENT=Nu;ot.FLOW_END=Bu;ot.SCALAR=Pu;ot.isCollection=QA;ot.isScalar=XA;ot.prettyToken=eI;ot.tokenType=tI});var Mu=w(nv=>{"use strict";var Bn=Io();function Bt(i){switch(i){case void 0:case" ":case`
|
|
165
|
+
`:case"\r":case" ":return!0;default:return!1}}var rv=new Set("0123456789ABCDEFabcdef"),iI=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),To=new Set(",[]{}"),rI=new Set(` ,[]{}
|
|
166
|
+
\r `),Lu=i=>!i||rI.has(i),Ru=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){var n;if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=(n=this.next)!=null?n:"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
167
167
|
`?!0:t==="\r"?this.buffer[e+1]===`
|
|
168
168
|
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;t===" ";)t=this.buffer[++r+e];if(t==="\r"){let n=this.buffer[r+e+1];if(n===`
|
|
169
169
|
`||!n&&!this.atEnd)return e+r+1}return t===`
|
|
170
|
-
`||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&
|
|
171
|
-
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===
|
|
170
|
+
`||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&Bt(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
171
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Bn.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,r=e.indexOf("#");for(;r!==-1;){let s=e[r-1];if(s===" "||s===" "){t=r-1;break}else r=e.indexOf("#",r+1)}for(;;){let s=e[t-1];if(s===" "||s===" ")t-=1;else break}let n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Bn.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&Bt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Bt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Bt(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Lu),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&n[0]!=="#"||r===0&&(n.startsWith("---")||n.startsWith("..."))&&Bt(n[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield Bn.FLOW_END,yield*this.parseLineStart();let s=0;for(;n[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),n[s]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Lu),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||Bt(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let s=0;for(;this.buffer[t-1-s]==="\\";)s+=1;if(s%2===0)break;t=this.buffer.indexOf('"',t+1)}let r=this.buffer.substring(0,t),n=r.indexOf(`
|
|
172
172
|
`,this.pos);if(n!==-1){for(;n!==-1;){let s=this.continueScalar(n+1);if(s===-1)break;n=r.indexOf(`
|
|
173
|
-
`,s)}n!==-1&&(t=n-(r[n-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>
|
|
173
|
+
`,s)}n!==-1&&(t=n-(r[n-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>Bt(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":t+=1;break;case`
|
|
174
174
|
`:e=s,t=0;break;case"\r":{let o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|
175
175
|
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
|
|
176
176
|
`,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(r=this.buffer[n];r===" ";)r=this.buffer[++n];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
177
177
|
`;)r=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);let a=s;for(;o===" ";)o=this.buffer[--s];if(o===`
|
|
178
|
-
`&&s>=this.pos&&s+1+t>a)e=s;else break}while(!0);return yield
|
|
178
|
+
`&&s>=this.pos&&s+1+t>a)e=s;else break}while(!0);return yield Bn.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,r=this.pos-1,n;for(;n=this.buffer[++r];)if(n===":"){let s=this.buffer[r+1];if(Bt(s)||e&&To.has(s))break;t=r}else if(Bt(n)){let s=this.buffer[r+1];if(n==="\r"&&(s===`
|
|
179
179
|
`?(r+=1,n=`
|
|
180
|
-
`,s=this.buffer[r+1]):t=r),s==="#"||e&&
|
|
181
|
-
`){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&
|
|
180
|
+
`,s=this.buffer[r+1]):t=r),s==="#"||e&&To.has(s))break;if(n===`
|
|
181
|
+
`){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&To.has(n))break;t=r}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield Bn.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Lu))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,t=this.charAt(1);if(Bt(t)||e&&To.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!Bt(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(iI.has(t))t=this.buffer[++e];else if(t==="%"&&rv.has(this.buffer[e+1])&&rv.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
182
182
|
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
183
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r===" ");let n=t-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=t),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};
|
|
183
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r===" ");let n=t-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=t),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};nv.Lexer=Ru});var Du=w(sv=>{"use strict";var Fu=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){let s=t+r>>1;this.lineStarts[s]<e?t=s+1:r=s}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}};sv.LineCounter=Fu});var Uu=w(uv=>{"use strict";var nI=require("process"),ov=Io(),sI=Mu();function pi(i,e){for(let t=0;t<i.length;++t)if(i[t].type===e)return!0;return!1}function av(i){for(let e=0;e<i.length;++e)switch(i[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function cv(i){switch(i==null?void 0:i.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function No(i){var e;switch(i.type){case"document":return i.start;case"block-map":{let t=i.items[i.items.length-1];return(e=t.sep)!=null?e:t.start}case"block-seq":return i.items[i.items.length-1].start;default:return[]}}function kr(i){var t;if(i.length===0)return[];let e=i.length;e:for(;--e>=0;)switch(i[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=i[++e])==null?void 0:t.type)==="space";);return i.splice(e,i.length)}function lv(i){if(i.start.type==="flow-seq-start")for(let e of i.items)e.sep&&!e.value&&!pi(e.start,"explicit-key-ind")&&!pi(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,cv(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}var qu=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new sI.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,nI.env.LOG_TOKENS&&console.log("|",ov.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ov.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&(e==null?void 0:e.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e!=null?e:this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let r=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in r?r.indent:0:t.type==="flow-collection"&&r.type==="document"&&(t.indent=0),t.type==="flow-collection"&&lv(t),r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{let n=r.items[r.items.length-1];if(n.value){r.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=r.items[r.items.length-1];n.value?r.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{let n=r.items[r.items.length-1];!n||n.value?r.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&av(n.start)===-1&&(t.indent===0||n.start.every(s=>s.type!=="comment"||s.indent<t.indent))&&(r.type==="document"?r.end=n.start:r.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{av(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=No(this.peek(2)),r=kr(t),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
|
|
184
184
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
185
|
-
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",o=[];if(s&&t.sep&&!t.value){let a=[];for(let l=0;l<t.sep.length;++l){let c=t.sep[l];switch(c.type){case"newline":a.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=t.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":s||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):s||t.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(
|
|
185
|
+
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,s=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",o=[];if(s&&t.sep&&!t.value){let a=[];for(let l=0;l<t.sep.length;++l){let c=t.sep[l];switch(c.type){case"newline":a.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=t.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":s||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):s||t.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(pi(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(cv(t.key)&&!pi(t.sep,"newline")){let a=kr(t.start),l=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:l,sep:c}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(pi(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let a=kr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):pi(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);s||t.value?(e.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(a):(Object.assign(t,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!t.explicitKey&&t.sep&&!pi(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:o});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,t.start),s.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||pi(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while((r==null?void 0:r.type)==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let n=No(r),s=kr(n);lv(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
|
|
186
186
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
187
|
-
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=To(e),r=Or(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=To(e),r=Or(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};lv.Parser=Ru});var dv=w(Bn=>{"use strict";var cv=xu(),VA=Sn(),Nn=kn(),HA=bc(),WA=fe(),GA=Lu(),uv=Mu();function fv(i){let e=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||e&&new GA.LineCounter||null,prettyErrors:e}}function YA(i,e={}){let{lineCounter:t,prettyErrors:r}=fv(e),n=new uv.Parser(t==null?void 0:t.addNewLine),s=new cv.Composer(e),o=Array.from(s.compose(n.parse(i)));if(r&&t)for(let a of o)a.errors.forEach(Nn.prettifyError(i,t)),a.warnings.forEach(Nn.prettifyError(i,t));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function hv(i,e={}){let{lineCounter:t,prettyErrors:r}=fv(e),n=new uv.Parser(t==null?void 0:t.addNewLine),s=new cv.Composer(e),o=null;for(let a of s.compose(n.parse(i),!0,i.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Nn.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&t&&(o.errors.forEach(Nn.prettifyError(i,t)),o.warnings.forEach(Nn.prettifyError(i,t))),o}function KA(i,e,t){let r;typeof e=="function"?r=e:t===void 0&&e&&typeof e=="object"&&(t=e);let n=hv(i,t);if(!n)return null;if(n.warnings.forEach(s=>HA.warn(n.options.logLevel,s)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:r},t))}function zA(i,e,t){var n;let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let s=Math.round(t);t=s<1?void 0:s>8?{indent:8}:{indent:s}}if(i===void 0){let{keepUndefined:s}=(n=t!=null?t:e)!=null?n:{};if(!s)return}return WA.isDocument(i)&&!r?i.toString(t):new VA.Document(i,r,t).toString(t)}Bn.parse=KA;Bn.parseAllDocuments=YA;Bn.parseDocument=hv;Bn.stringify=zA});var mv=w(ge=>{"use strict";var JA=xu(),ZA=Sn(),QA=iu(),Fu=kn(),XA=on(),pi=fe(),eI=ci(),tI=Le(),iI=fi(),rI=hi(),nI=Ao(),sI=Bu(),oI=Lu(),aI=Mu(),No=dv(),pv=tn();ge.Composer=JA.Composer;ge.Document=ZA.Document;ge.Schema=QA.Schema;ge.YAMLError=Fu.YAMLError;ge.YAMLParseError=Fu.YAMLParseError;ge.YAMLWarning=Fu.YAMLWarning;ge.Alias=XA.Alias;ge.isAlias=pi.isAlias;ge.isCollection=pi.isCollection;ge.isDocument=pi.isDocument;ge.isMap=pi.isMap;ge.isNode=pi.isNode;ge.isPair=pi.isPair;ge.isScalar=pi.isScalar;ge.isSeq=pi.isSeq;ge.Pair=eI.Pair;ge.Scalar=tI.Scalar;ge.YAMLMap=iI.YAMLMap;ge.YAMLSeq=rI.YAMLSeq;ge.CST=nI;ge.Lexer=sI.Lexer;ge.LineCounter=oI.LineCounter;ge.Parser=aI.Parser;ge.parse=No.parse;ge.parseAllDocuments=No.parseAllDocuments;ge.parseDocument=No.parseDocument;ge.stringify=No.stringify;ge.visit=pv.visit;ge.visitAsync=pv.visitAsync});var yv=w((uP,gv)=>{var mi=require("constants"),lI=process.cwd,Bo=null,cI=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Bo||(Bo=lI.call(process)),Bo};try{process.cwd()}catch{}typeof process.chdir=="function"&&(qu=process.chdir,process.chdir=function(i){Bo=null,qu.call(process,i)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,qu));var qu;gv.exports=uI;function uI(i){mi.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(i),i.lutimes||t(i),i.chown=s(i.chown),i.fchown=s(i.fchown),i.lchown=s(i.lchown),i.chmod=r(i.chmod),i.fchmod=r(i.fchmod),i.lchmod=r(i.lchmod),i.chownSync=o(i.chownSync),i.fchownSync=o(i.fchownSync),i.lchownSync=o(i.lchownSync),i.chmodSync=n(i.chmodSync),i.fchmodSync=n(i.fchmodSync),i.lchmodSync=n(i.lchmodSync),i.stat=a(i.stat),i.fstat=a(i.fstat),i.lstat=a(i.lstat),i.statSync=l(i.statSync),i.fstatSync=l(i.fstatSync),i.lstatSync=l(i.lstatSync),i.chmod&&!i.lchmod&&(i.lchmod=function(u,f,h){h&&process.nextTick(h)},i.lchmodSync=function(){}),i.chown&&!i.lchown&&(i.lchown=function(u,f,h,p){p&&process.nextTick(p)},i.lchownSync=function(){}),cI==="win32"&&(i.rename=typeof i.rename!="function"?i.rename:(function(u){function f(h,p,m){var d=Date.now(),g=0;u(h,p,function _(b){if(b&&(b.code==="EACCES"||b.code==="EPERM")&&Date.now()-d<6e4){setTimeout(function(){i.stat(p,function(y,x){y&&y.code==="ENOENT"?u(h,p,_):m(b)})},g),g<100&&(g+=10);return}m&&m(b)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f})(i.rename)),i.read=typeof i.read!="function"?i.read:(function(u){function f(h,p,m,d,g,_){var b;if(_&&typeof _=="function"){var y=0;b=function(x,v,T){if(x&&x.code==="EAGAIN"&&y<10)return y++,u.call(i,h,p,m,d,g,b);_.apply(this,arguments)}}return u.call(i,h,p,m,d,g,b)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f})(i.read),i.readSync=typeof i.readSync!="function"?i.readSync:(function(u){return function(f,h,p,m,d){for(var g=0;;)try{return u.call(i,f,h,p,m,d)}catch(_){if(_.code==="EAGAIN"&&g<10){g++;continue}throw _}}})(i.readSync);function e(u){u.lchmod=function(f,h,p){u.open(f,mi.O_WRONLY|mi.O_SYMLINK,h,function(m,d){if(m){p&&p(m);return}u.fchmod(d,h,function(g){u.close(d,function(_){p&&p(g||_)})})})},u.lchmodSync=function(f,h){var p=u.openSync(f,mi.O_WRONLY|mi.O_SYMLINK,h),m=!0,d;try{d=u.fchmodSync(p,h),m=!1}finally{if(m)try{u.closeSync(p)}catch{}else u.closeSync(p)}return d}}function t(u){mi.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(f,h,p,m){u.open(f,mi.O_SYMLINK,function(d,g){if(d){m&&m(d);return}u.futimes(g,h,p,function(_){u.close(g,function(b){m&&m(_||b)})})})},u.lutimesSync=function(f,h,p){var m=u.openSync(f,mi.O_SYMLINK),d,g=!0;try{d=u.futimesSync(m,h,p),g=!1}finally{if(g)try{u.closeSync(m)}catch{}else u.closeSync(m)}return d}):u.futimes&&(u.lutimes=function(f,h,p,m){m&&process.nextTick(m)},u.lutimesSync=function(){})}function r(u){return u&&function(f,h,p){return u.call(i,f,h,function(m){c(m)&&(m=null),p&&p.apply(this,arguments)})}}function n(u){return u&&function(f,h){try{return u.call(i,f,h)}catch(p){if(!c(p))throw p}}}function s(u){return u&&function(f,h,p,m){return u.call(i,f,h,p,function(d){c(d)&&(d=null),m&&m.apply(this,arguments)})}}function o(u){return u&&function(f,h,p){try{return u.call(i,f,h,p)}catch(m){if(!c(m))throw m}}}function a(u){return u&&function(f,h,p){typeof h=="function"&&(p=h,h=null);function m(d,g){g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),p&&p.apply(this,arguments)}return h?u.call(i,f,h,m):u.call(i,f,m)}}function l(u){return u&&function(f,h){var p=h?u.call(i,f,h):u.call(i,f);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function c(u){if(!u||u.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var bv=w((fP,_v)=>{var vv=require("stream").Stream;_v.exports=fI;function fI(i){return{ReadStream:e,WriteStream:t};function e(r,n){if(!(this instanceof e))return new e(r,n);vv.call(this);var s=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,n=n||{};for(var o=Object.keys(n),a=0,l=o.length;a<l;a++){var c=o[a];this[c]=n[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}i.open(this.path,this.flags,this.mode,function(u,f){if(u){s.emit("error",u),s.readable=!1;return}s.fd=f,s.emit("open",f),s._read()})}function t(r,n){if(!(this instanceof t))return new t(r,n);vv.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var s=Object.keys(n),o=0,a=s.length;o<a;o++){var l=s[o];this[l]=n[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=i.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var xv=w((hP,wv)=>{"use strict";wv.exports=dI;var hI=Object.getPrototypeOf||function(i){return i.__proto__};function dI(i){if(i===null||typeof i!="object")return i;if(i instanceof Object)var e={__proto__:hI(i)};else var e=Object.create(null);return Object.getOwnPropertyNames(i).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}),e}});var kv=w((dP,ju)=>{var Ie=require("fs"),pI=yv(),mI=bv(),gI=xv(),Po=require("util"),Ke,Ro;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Ke=Symbol.for("graceful-fs.queue"),Ro=Symbol.for("graceful-fs.previous")):(Ke="___graceful-fs.queue",Ro="___graceful-fs.previous");function yI(){}function Ov(i,e){Object.defineProperty(i,Ke,{get:function(){return e}})}var qi=yI;Po.debuglog?qi=Po.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(qi=function(){var i=Po.format.apply(Po,arguments);i="GFS4: "+i.split(/\n/).join(`
|
|
188
|
-
GFS4: `),console.error(i)});Ie[Ke]||(Sv=global[Ke]||[],Ov(Ie,Sv),Ie.close=(function(i){function e(t,r){return i.call(Ie,t,function(n){n||Ev(),typeof r=="function"&&r.apply(this,arguments)})}return Object.defineProperty(e,Ro,{value:i}),e})(Ie.close),Ie.closeSync=(function(i){function e(t){i.apply(Ie,arguments),Ev()}return Object.defineProperty(e,Ro,{value:i}),e})(Ie.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){qi(Ie[Ke]),require("assert").equal(Ie[Ke].length,0)}));var Sv;global[Ke]||Ov(global,Ie[Ke]);ju.exports=Du(gI(Ie));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Ie.__patched&&(ju.exports=Du(Ie),Ie.__patched=!0);function Du(i){pI(i),i.gracefulify=Du,i.createReadStream=v,i.createWriteStream=T;var e=i.readFile;i.readFile=t;function t(S,I,A){return typeof I=="function"&&(A=I,I=null),M(S,I,A);function M(L,$,P,F){return e(L,$,function(V){V&&(V.code==="EMFILE"||V.code==="ENFILE")?kr([M,[L,$,P],V,F||Date.now(),Date.now()]):typeof P=="function"&&P.apply(this,arguments)})}}var r=i.writeFile;i.writeFile=n;function n(S,I,A,M){return typeof A=="function"&&(M=A,A=null),L(S,I,A,M);function L($,P,F,V,G){return r($,P,F,function(q){q&&(q.code==="EMFILE"||q.code==="ENFILE")?kr([L,[$,P,F,V],q,G||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments)})}}var s=i.appendFile;s&&(i.appendFile=o);function o(S,I,A,M){return typeof A=="function"&&(M=A,A=null),L(S,I,A,M);function L($,P,F,V,G){return s($,P,F,function(q){q&&(q.code==="EMFILE"||q.code==="ENFILE")?kr([L,[$,P,F,V],q,G||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments)})}}var a=i.copyFile;a&&(i.copyFile=l);function l(S,I,A,M){return typeof A=="function"&&(M=A,A=0),L(S,I,A,M);function L($,P,F,V,G){return a($,P,F,function(q){q&&(q.code==="EMFILE"||q.code==="ENFILE")?kr([L,[$,P,F,V],q,G||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments)})}}var c=i.readdir;i.readdir=f;var u=/^v[0-5]\./;function f(S,I,A){typeof I=="function"&&(A=I,I=null);var M=u.test(process.version)?function(P,F,V,G){return c(P,L(P,F,V,G))}:function(P,F,V,G){return c(P,F,L(P,F,V,G))};return M(S,I,A);function L($,P,F,V){return function(G,q){G&&(G.code==="EMFILE"||G.code==="ENFILE")?kr([M,[$,P,F],G,V||Date.now(),Date.now()]):(q&&q.sort&&q.sort(),typeof F=="function"&&F.call(this,G,q))}}}if(process.version.substr(0,4)==="v0.8"){var h=mI(i);_=h.ReadStream,y=h.WriteStream}var p=i.ReadStream;p&&(_.prototype=Object.create(p.prototype),_.prototype.open=b);var m=i.WriteStream;m&&(y.prototype=Object.create(m.prototype),y.prototype.open=x),Object.defineProperty(i,"ReadStream",{get:function(){return _},set:function(S){_=S},enumerable:!0,configurable:!0}),Object.defineProperty(i,"WriteStream",{get:function(){return y},set:function(S){y=S},enumerable:!0,configurable:!0});var d=_;Object.defineProperty(i,"FileReadStream",{get:function(){return d},set:function(S){d=S},enumerable:!0,configurable:!0});var g=y;Object.defineProperty(i,"FileWriteStream",{get:function(){return g},set:function(S){g=S},enumerable:!0,configurable:!0});function _(S,I){return this instanceof _?(p.apply(this,arguments),this):_.apply(Object.create(_.prototype),arguments)}function b(){var S=this;C(S.path,S.flags,S.mode,function(I,A){I?(S.autoClose&&S.destroy(),S.emit("error",I)):(S.fd=A,S.emit("open",A),S.read())})}function y(S,I){return this instanceof y?(m.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}function x(){var S=this;C(S.path,S.flags,S.mode,function(I,A){I?(S.destroy(),S.emit("error",I)):(S.fd=A,S.emit("open",A))})}function v(S,I){return new i.ReadStream(S,I)}function T(S,I){return new i.WriteStream(S,I)}var E=i.open;i.open=C;function C(S,I,A,M){return typeof A=="function"&&(M=A,A=null),L(S,I,A,M);function L($,P,F,V,G){return E($,P,F,function(q,Ee){q&&(q.code==="EMFILE"||q.code==="ENFILE")?kr([L,[$,P,F,V],q,G||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments)})}}return i}function kr(i){qi("ENQUEUE",i[0].name,i[1]),Ie[Ke].push(i),Uu()}var Lo;function Ev(){for(var i=Date.now(),e=0;e<Ie[Ke].length;++e)Ie[Ke][e].length>2&&(Ie[Ke][e][3]=i,Ie[Ke][e][4]=i);Uu()}function Uu(){if(clearTimeout(Lo),Lo=void 0,Ie[Ke].length!==0){var i=Ie[Ke].shift(),e=i[0],t=i[1],r=i[2],n=i[3],s=i[4];if(n===void 0)qi("RETRY",e.name,t),e.apply(null,t);else if(Date.now()-n>=6e4){qi("TIMEOUT",e.name,t);var o=t.pop();typeof o=="function"&&o.call(null,r)}else{var a=Date.now()-s,l=Math.max(s-n,1),c=Math.min(l*1.2,100);a>=c?(qi("RETRY",e.name,t),e.apply(null,t.concat([n]))):Ie[Ke].push(i)}Lo===void 0&&(Lo=setTimeout(Uu,0))}}});var Av=w((pP,Cv)=>{function xt(i,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(i)),this._timeouts=i,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}Cv.exports=xt;xt.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};xt.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};xt.prototype.retry=function(i){if(this._timeout&&clearTimeout(this._timeout),!i)return!1;var e=new Date().getTime();if(i&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(i);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),t=this._timeouts.shift();else return!1;var r=this,n=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t);return this._options.unref&&n.unref(),!0};xt.prototype.attempt=function(i,e){this._fn=i,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};xt.prototype.try=function(i){console.log("Using RetryOperation.try() is deprecated"),this.attempt(i)};xt.prototype.start=function(i){console.log("Using RetryOperation.start() is deprecated"),this.attempt(i)};xt.prototype.start=xt.prototype.try;xt.prototype.errors=function(){return this._errors};xt.prototype.attempts=function(){return this._attempts};xt.prototype.mainError=function(){if(this._errors.length===0)return null;for(var i={},e=null,t=0,r=0;r<this._errors.length;r++){var n=this._errors[r],s=n.message,o=(i[s]||0)+1;i[s]=o,o>=t&&(e=n,t=o)}return e}});var Iv=w(Di=>{var vI=Av();Di.operation=function(i){var e=Di.timeouts(i);return new vI(e,{forever:i&&i.forever,unref:i&&i.unref,maxRetryTime:i&&i.maxRetryTime})};Di.timeouts=function(i){if(i instanceof Array)return[].concat(i);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in i)e[t]=i[t];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],n=0;n<e.retries;n++)r.push(this.createTimeout(n,e));return i&&i.forever&&!r.length&&r.push(this.createTimeout(n,e)),r.sort(function(s,o){return s-o}),r};Di.createTimeout=function(i,e){var t=e.randomize?Math.random()+1:1,r=Math.round(t*e.minTimeout*Math.pow(e.factor,i));return r=Math.min(r,e.maxTimeout),r};Di.wrap=function(i,e,t){if(e instanceof Array&&(t=e,e=null),!t){t=[];for(var r in i)typeof i[r]=="function"&&t.push(r)}for(var n=0;n<t.length;n++){var s=t[n],o=i[s];i[s]=function(l){var c=Di.operation(e),u=Array.prototype.slice.call(arguments,1),f=u.pop();u.push(function(h){c.retry(h)||(h&&(arguments[0]=c.mainError()),f.apply(this,arguments))}),c.attempt(function(){l.apply(i,u)})}.bind(i,o),i[s].options=e}}});var Nv=w((gP,Tv)=>{Tv.exports=Iv()});var Bv=w((yP,Mo)=>{Mo.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Mo.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Mo.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Fv=w((vP,Ir)=>{var Ce=global.process,Ui=function(i){return i&&typeof i=="object"&&typeof i.removeListener=="function"&&typeof i.emit=="function"&&typeof i.reallyExit=="function"&&typeof i.listeners=="function"&&typeof i.kill=="function"&&typeof i.pid=="number"&&typeof i.on=="function"};Ui(Ce)?(Pv=require("assert"),Cr=Bv(),Lv=/^win/i.test(Ce.platform),Pn=require("events"),typeof Pn!="function"&&(Pn=Pn.EventEmitter),Ce.__signal_exit_emitter__?Ve=Ce.__signal_exit_emitter__:(Ve=Ce.__signal_exit_emitter__=new Pn,Ve.count=0,Ve.emitted={}),Ve.infinite||(Ve.setMaxListeners(1/0),Ve.infinite=!0),Ir.exports=function(i,e){if(!Ui(global.process))return function(){};Pv.equal(typeof i,"function","a callback must be provided for exit handler"),Ar===!1&&$u();var t="exit";e&&e.alwaysLast&&(t="afterexit");var r=function(){Ve.removeListener(t,i),Ve.listeners("exit").length===0&&Ve.listeners("afterexit").length===0&&Fo()};return Ve.on(t,i),r},Fo=function(){!Ar||!Ui(global.process)||(Ar=!1,Cr.forEach(function(e){try{Ce.removeListener(e,qo[e])}catch{}}),Ce.emit=Do,Ce.reallyExit=Vu,Ve.count-=1)},Ir.exports.unload=Fo,ji=function(e,t,r){Ve.emitted[e]||(Ve.emitted[e]=!0,Ve.emit(e,t,r))},qo={},Cr.forEach(function(i){qo[i]=function(){if(Ui(global.process)){var t=Ce.listeners(i);t.length===Ve.count&&(Fo(),ji("exit",null,i),ji("afterexit",null,i),Lv&&i==="SIGHUP"&&(i="SIGINT"),Ce.kill(Ce.pid,i))}}}),Ir.exports.signals=function(){return Cr},Ar=!1,$u=function(){Ar||!Ui(global.process)||(Ar=!0,Ve.count+=1,Cr=Cr.filter(function(e){try{return Ce.on(e,qo[e]),!0}catch{return!1}}),Ce.emit=Mv,Ce.reallyExit=Rv)},Ir.exports.load=$u,Vu=Ce.reallyExit,Rv=function(e){Ui(global.process)&&(Ce.exitCode=e||0,ji("exit",Ce.exitCode,null),ji("afterexit",Ce.exitCode,null),Vu.call(Ce,Ce.exitCode))},Do=Ce.emit,Mv=function(e,t){if(e==="exit"&&Ui(global.process)){t!==void 0&&(Ce.exitCode=t);var r=Do.apply(this,arguments);return ji("exit",Ce.exitCode,null),ji("afterexit",Ce.exitCode,null),r}else return Do.apply(this,arguments)}):Ir.exports=function(){return function(){}};var Pv,Cr,Lv,Pn,Ve,Fo,ji,qo,Ar,$u,Vu,Rv,Do,Mv});var Wv=w((_P,Hv)=>{"use strict";var _I=require("path"),jv=kv(),bI=Nv(),wI=Fv(),gi={},qv=Symbol();function xI(i,e,t){let r=e[qv];if(r)return e.stat(i,(s,o)=>{if(s)return t(s);t(null,o.mtime,r)});let n=new Date(Math.ceil(Date.now()/1e3)*1e3+5);e.utimes(i,n,n,s=>{if(s)return t(s);e.stat(i,(o,a)=>{if(o)return t(o);let l=a.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(e,qv,{value:l}),t(null,a.mtime,l)})})}function SI(i){let e=Date.now();return i==="s"&&(e=Math.ceil(e/1e3)*1e3),new Date(e)}function jo(i,e){return e.lockfilePath||`${i}.lock`}function $v(i,e,t){if(!e.realpath)return t(null,_I.resolve(i));e.fs.realpath(i,t)}function Wu(i,e,t){let r=jo(i,e);e.fs.mkdir(r,n=>{if(!n)return xI(r,e.fs,(s,o,a)=>{if(s)return e.fs.rmdir(r,()=>{}),t(s);t(null,o,a)});if(n.code!=="EEXIST")return t(n);if(e.stale<=0)return t(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:i}));e.fs.stat(r,(s,o)=>{if(s)return s.code==="ENOENT"?Wu(i,{...e,stale:0},t):t(s);if(!EI(o,e))return t(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:i}));Vv(i,e,a=>{if(a)return t(a);Wu(i,{...e,stale:0},t)})})})}function EI(i,e){return i.mtime.getTime()<Date.now()-e.stale}function Vv(i,e,t){e.fs.rmdir(jo(i,e),r=>{if(r&&r.code!=="ENOENT")return t(r);t()})}function Uo(i,e){let t=gi[i];t.updateTimeout||(t.updateDelay=t.updateDelay||e.update,t.updateTimeout=setTimeout(()=>{t.updateTimeout=null,e.fs.stat(t.lockfilePath,(r,n)=>{let s=t.lastUpdate+e.stale<Date.now();if(r)return r.code==="ENOENT"||s?Hu(i,t,Object.assign(r,{code:"ECOMPROMISED"})):(t.updateDelay=1e3,Uo(i,e));if(!(t.mtime.getTime()===n.mtime.getTime()))return Hu(i,t,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let a=SI(t.mtimePrecision);e.fs.utimes(t.lockfilePath,a,a,l=>{let c=t.lastUpdate+e.stale<Date.now();if(!t.released){if(l)return l.code==="ENOENT"||c?Hu(i,t,Object.assign(l,{code:"ECOMPROMISED"})):(t.updateDelay=1e3,Uo(i,e));t.mtime=a,t.lastUpdate=Date.now(),t.updateDelay=null,Uo(i,e)}})})},t.updateDelay),t.updateTimeout.unref&&t.updateTimeout.unref())}function Hu(i,e,t){e.released=!0,e.updateTimeout&&clearTimeout(e.updateTimeout),gi[i]===e&&delete gi[i],e.options.onCompromised(t)}function OI(i,e,t){e={stale:1e4,update:null,realpath:!0,retries:0,fs:jv,onCompromised:r=>{throw r},...e},e.retries=e.retries||0,e.retries=typeof e.retries=="number"?{retries:e.retries}:e.retries,e.stale=Math.max(e.stale||0,2e3),e.update=e.update==null?e.stale/2:e.update||0,e.update=Math.max(Math.min(e.update,e.stale/2),1e3),$v(i,e,(r,n)=>{if(r)return t(r);let s=bI.operation(e.retries);s.attempt(()=>{Wu(n,e,(o,a,l)=>{if(s.retry(o))return;if(o)return t(s.mainError());let c=gi[n]={lockfilePath:jo(n,e),mtime:a,mtimePrecision:l,options:e,lastUpdate:Date.now()};Uo(n,e),t(null,u=>{if(c.released)return u&&u(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));kI(n,{...e,realpath:!1},u)})})})})}function kI(i,e,t){e={fs:jv,realpath:!0,...e},$v(i,e,(r,n)=>{if(r)return t(r);let s=gi[n];if(!s)return t(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));s.updateTimeout&&clearTimeout(s.updateTimeout),s.released=!0,delete gi[n],Vv(n,e,t)})}function Dv(i){return(...e)=>new Promise((t,r)=>{e.push((n,s)=>{n?r(n):t(s)}),i(...e)})}var Uv=!1;function CI(){Uv||(Uv=!0,wI(()=>{for(let i in gi){let e=gi[i].options;try{e.fs.rmdirSync(jo(i,e))}catch{}}}))}Hv.exports.lock=async(i,e)=>{CI();let t=await Dv(OI)(i,e);return Dv(t)}});var HI={};of(HI,{HttpsProxyAgent:()=>i_.HttpsProxyAgent,PNG:()=>r_.PNG,ProgramOption:()=>qp,SocksProxyAgent:()=>n_.SocksProxyAgent,colors:()=>AI,debug:()=>II,diff:()=>TI,dotenv:()=>NI,getProxyForUrl:()=>t_.getProxyForUrl,jpegjs:()=>BI,lockfile:()=>LI,mime:()=>RI,minimatch:()=>MI,open:()=>FI,program:()=>Fp,progress:()=>qI,ws:()=>DI,wsReceiver:()=>jI,wsSender:()=>$I,wsServer:()=>UI,yaml:()=>VI});module.exports=f_(HI);var Gv=Te(Rf()),Yv=Te(Fr());var ba={};of(ba,{Diff:()=>Be,FILE_HEADERS_ONLY:()=>lh,INCLUDE_HEADERS:()=>va,OMIT_HEADERS:()=>ch,applyPatch:()=>ga,applyPatches:()=>ah,arrayDiff:()=>da,canonicalize:()=>Ur,characterDiff:()=>zo,convertChangesToDMP:()=>fh,convertChangesToXML:()=>hh,createPatch:()=>uh,createTwoFilesPatch:()=>_a,cssDiff:()=>ca,diffArrays:()=>rh,diffChars:()=>Yf,diffCss:()=>th,diffJson:()=>ih,diffLines:()=>Dr,diffSentences:()=>eh,diffTrimmedLines:()=>Xf,diffWords:()=>Zf,diffWordsWithSpace:()=>ra,formatPatch:()=>$r,jsonDiff:()=>fa,lineDiff:()=>Yn,parsePatch:()=>jr,reversePatch:()=>ya,sentenceDiff:()=>aa,structuredPatch:()=>Kn,wordDiff:()=>ta,wordsWithSpaceDiff:()=>ia});var Be=class{diff(e,t,r={}){let n;typeof r=="function"?(n=r,r={}):"callback"in r&&(n=r.callback);let s=this.castInput(e,r),o=this.castInput(t,r),a=this.removeEmpty(this.tokenize(s,r)),l=this.removeEmpty(this.tokenize(o,r));return this.diffWithOptionsObj(a,l,r,n)}diffWithOptionsObj(e,t,r,n){var s;let o=b=>{if(b=this.postProcess(b,r),n){setTimeout(function(){n(b)},0);return}else return b},a=t.length,l=e.length,c=1,u=a+l;r.maxEditLength!=null&&(u=Math.min(u,r.maxEditLength));let f=(s=r.timeout)!==null&&s!==void 0?s:1/0,h=Date.now()+f,p=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(p[0],t,e,0,r);if(p[0].oldPos+1>=l&&m+1>=a)return o(this.buildValues(p[0].lastComponent,t,e));let d=-1/0,g=1/0,_=()=>{for(let b=Math.max(d,-c);b<=Math.min(g,c);b+=2){let y,x=p[b-1],v=p[b+1];x&&(p[b-1]=void 0);let T=!1;if(v){let C=v.oldPos-b;T=v&&0<=C&&C<a}let E=x&&x.oldPos+1<l;if(!T&&!E){p[b]=void 0;continue}if(!E||T&&x.oldPos<v.oldPos?y=this.addToPath(v,!0,!1,0,r):y=this.addToPath(x,!1,!0,1,r),m=this.extractCommon(y,t,e,b,r),y.oldPos+1>=l&&m+1>=a)return o(this.buildValues(y.lastComponent,t,e))||!0;p[b]=y,y.oldPos+1>=l&&(g=Math.min(g,b-1)),m+1>=a&&(d=Math.max(d,b+1))}c++};if(n)(function b(){setTimeout(function(){if(c>u||Date.now()>h)return n(void 0);_()||b()},0)})();else for(;c<=u&&Date.now()<=h;){let b=_();if(b)return b}}addToPath(e,t,r,n,s){let o=e.lastComponent;return o&&!s.oneChangePerToken&&o.added===t&&o.removed===r?{oldPos:e.oldPos+n,lastComponent:{count:o.count+1,added:t,removed:r,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:t,removed:r,previousComponent:o}}}extractCommon(e,t,r,n,s){let o=t.length,a=r.length,l=e.oldPos,c=l-n,u=0;for(;c+1<o&&l+1<a&&this.equals(r[l+1],t[c+1],s);)c++,l++,u++,s.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return u&&!s.oneChangePerToken&&(e.lastComponent={count:u,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=l,c}equals(e,t,r){return r.comparator?r.comparator(e,t):e===t||!!r.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,r){let n=[],s;for(;e;)n.push(e),s=e.previousComponent,delete e.previousComponent,e=s;n.reverse();let o=n.length,a=0,l=0,c=0;for(;a<o;a++){let u=n[a];if(u.removed)u.value=this.join(r.slice(c,c+u.count)),c+=u.count;else{if(!u.added&&this.useLongestToken){let f=t.slice(l,l+u.count);f=f.map(function(h,p){let m=r[c+p];return m.length>h.length?m:h}),u.value=this.join(f)}else u.value=this.join(t.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}return n}};var Ko=class extends Be{},zo=new Ko;function Yf(i,e,t){return zo.diff(i,e,t)}function Jo(i,e){let t;for(t=0;t<i.length&&t<e.length;t++)if(i[t]!=e[t])return i.slice(0,t);return i.slice(0,t)}function Zo(i,e){let t;if(!i||!e||i[i.length-1]!=e[e.length-1])return"";for(t=0;t<i.length&&t<e.length;t++)if(i[i.length-(t+1)]!=e[e.length-(t+1)])return i.slice(-t);return i.slice(-t)}function Hn(i,e,t){if(i.slice(0,e.length)!=e)throw Error(`string ${JSON.stringify(i)} doesn't start with prefix ${JSON.stringify(e)}; this is a bug`);return t+i.slice(e.length)}function Wn(i,e,t){if(!e)return i+t;if(i.slice(-e.length)!=e)throw Error(`string ${JSON.stringify(i)} doesn't end with suffix ${JSON.stringify(e)}; this is a bug`);return i.slice(0,-e.length)+t}function Ki(i,e){return Hn(i,e,"")}function qr(i,e){return Wn(i,e,"")}function Qo(i,e){return e.slice(0,K_(i,e))}function K_(i,e){let t=0;i.length>e.length&&(t=i.length-e.length);let r=e.length;i.length<e.length&&(r=i.length);let n=Array(r),s=0;n[0]=0;for(let o=1;o<r;o++){for(e[o]==e[s]?n[o]=n[s]:n[o]=s;s>0&&e[o]!=e[s];)s=n[s];e[o]==e[s]&&s++}s=0;for(let o=t;o<i.length;o++){for(;s>0&&i[o]!=e[s];)s=n[s];i[o]==e[s]&&s++}return s}function Kf(i){return i.includes(`\r
|
|
187
|
+
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=No(e),r=kr(t);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=No(e),r=kr(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};uv.Parser=qu});var mv=w(Ln=>{"use strict";var fv=ku(),oI=On(),Pn=An(),aI=Ec(),lI=fe(),cI=Du(),hv=Uu();function dv(i){let e=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||e&&new cI.LineCounter||null,prettyErrors:e}}function uI(i,e={}){let{lineCounter:t,prettyErrors:r}=dv(e),n=new hv.Parser(t==null?void 0:t.addNewLine),s=new fv.Composer(e),o=Array.from(s.compose(n.parse(i)));if(r&&t)for(let a of o)a.errors.forEach(Pn.prettifyError(i,t)),a.warnings.forEach(Pn.prettifyError(i,t));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function pv(i,e={}){let{lineCounter:t,prettyErrors:r}=dv(e),n=new hv.Parser(t==null?void 0:t.addNewLine),s=new fv.Composer(e),o=null;for(let a of s.compose(n.parse(i),!0,i.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Pn.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&t&&(o.errors.forEach(Pn.prettifyError(i,t)),o.warnings.forEach(Pn.prettifyError(i,t))),o}function fI(i,e,t){let r;typeof e=="function"?r=e:t===void 0&&e&&typeof e=="object"&&(t=e);let n=pv(i,t);if(!n)return null;if(n.warnings.forEach(s=>aI.warn(n.options.logLevel,s)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:r},t))}function hI(i,e,t){var n;let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let s=Math.round(t);t=s<1?void 0:s>8?{indent:8}:{indent:s}}if(i===void 0){let{keepUndefined:s}=(n=t!=null?t:e)!=null?n:{};if(!s)return}return lI.isDocument(i)&&!r?i.toString(t):new oI.Document(i,r,t).toString(t)}Ln.parse=fI;Ln.parseAllDocuments=uI;Ln.parseDocument=pv;Ln.stringify=hI});var yv=w(ge=>{"use strict";var dI=ku(),pI=On(),mI=ou(),ju=An(),gI=ln(),mi=fe(),yI=ui(),vI=Re(),_I=hi(),bI=di(),wI=Io(),xI=Mu(),SI=Du(),EI=Uu(),Bo=mv(),gv=nn();ge.Composer=dI.Composer;ge.Document=pI.Document;ge.Schema=mI.Schema;ge.YAMLError=ju.YAMLError;ge.YAMLParseError=ju.YAMLParseError;ge.YAMLWarning=ju.YAMLWarning;ge.Alias=gI.Alias;ge.isAlias=mi.isAlias;ge.isCollection=mi.isCollection;ge.isDocument=mi.isDocument;ge.isMap=mi.isMap;ge.isNode=mi.isNode;ge.isPair=mi.isPair;ge.isScalar=mi.isScalar;ge.isSeq=mi.isSeq;ge.Pair=yI.Pair;ge.Scalar=vI.Scalar;ge.YAMLMap=_I.YAMLMap;ge.YAMLSeq=bI.YAMLSeq;ge.CST=wI;ge.Lexer=xI.Lexer;ge.LineCounter=SI.LineCounter;ge.Parser=EI.Parser;ge.parse=Bo.parse;ge.parseAllDocuments=Bo.parseAllDocuments;ge.parseDocument=Bo.parseDocument;ge.stringify=Bo.stringify;ge.visit=gv.visit;ge.visitAsync=gv.visitAsync});var _v=w((AP,vv)=>{var gi=require("constants"),OI=process.cwd,Po=null,kI=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Po||(Po=OI.call(process)),Po};try{process.cwd()}catch{}typeof process.chdir=="function"&&($u=process.chdir,process.chdir=function(i){Po=null,$u.call(process,i)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,$u));var $u;vv.exports=CI;function CI(i){gi.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(i),i.lutimes||t(i),i.chown=s(i.chown),i.fchown=s(i.fchown),i.lchown=s(i.lchown),i.chmod=r(i.chmod),i.fchmod=r(i.fchmod),i.lchmod=r(i.lchmod),i.chownSync=o(i.chownSync),i.fchownSync=o(i.fchownSync),i.lchownSync=o(i.lchownSync),i.chmodSync=n(i.chmodSync),i.fchmodSync=n(i.fchmodSync),i.lchmodSync=n(i.lchmodSync),i.stat=a(i.stat),i.fstat=a(i.fstat),i.lstat=a(i.lstat),i.statSync=l(i.statSync),i.fstatSync=l(i.fstatSync),i.lstatSync=l(i.lstatSync),i.chmod&&!i.lchmod&&(i.lchmod=function(u,f,h){h&&process.nextTick(h)},i.lchmodSync=function(){}),i.chown&&!i.lchown&&(i.lchown=function(u,f,h,p){p&&process.nextTick(p)},i.lchownSync=function(){}),kI==="win32"&&(i.rename=typeof i.rename!="function"?i.rename:(function(u){function f(h,p,m){var d=Date.now(),g=0;u(h,p,function v(b){if(b&&(b.code==="EACCES"||b.code==="EPERM")&&Date.now()-d<6e4){setTimeout(function(){i.stat(p,function(y,x){y&&y.code==="ENOENT"?u(h,p,v):m(b)})},g),g<100&&(g+=10);return}m&&m(b)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f})(i.rename)),i.read=typeof i.read!="function"?i.read:(function(u){function f(h,p,m,d,g,v){var b;if(v&&typeof v=="function"){var y=0;b=function(x,_,A){if(x&&x.code==="EAGAIN"&&y<10)return y++,u.call(i,h,p,m,d,g,b);v.apply(this,arguments)}}return u.call(i,h,p,m,d,g,b)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f})(i.read),i.readSync=typeof i.readSync!="function"?i.readSync:(function(u){return function(f,h,p,m,d){for(var g=0;;)try{return u.call(i,f,h,p,m,d)}catch(v){if(v.code==="EAGAIN"&&g<10){g++;continue}throw v}}})(i.readSync);function e(u){u.lchmod=function(f,h,p){u.open(f,gi.O_WRONLY|gi.O_SYMLINK,h,function(m,d){if(m){p&&p(m);return}u.fchmod(d,h,function(g){u.close(d,function(v){p&&p(g||v)})})})},u.lchmodSync=function(f,h){var p=u.openSync(f,gi.O_WRONLY|gi.O_SYMLINK,h),m=!0,d;try{d=u.fchmodSync(p,h),m=!1}finally{if(m)try{u.closeSync(p)}catch{}else u.closeSync(p)}return d}}function t(u){gi.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(f,h,p,m){u.open(f,gi.O_SYMLINK,function(d,g){if(d){m&&m(d);return}u.futimes(g,h,p,function(v){u.close(g,function(b){m&&m(v||b)})})})},u.lutimesSync=function(f,h,p){var m=u.openSync(f,gi.O_SYMLINK),d,g=!0;try{d=u.futimesSync(m,h,p),g=!1}finally{if(g)try{u.closeSync(m)}catch{}else u.closeSync(m)}return d}):u.futimes&&(u.lutimes=function(f,h,p,m){m&&process.nextTick(m)},u.lutimesSync=function(){})}function r(u){return u&&function(f,h,p){return u.call(i,f,h,function(m){c(m)&&(m=null),p&&p.apply(this,arguments)})}}function n(u){return u&&function(f,h){try{return u.call(i,f,h)}catch(p){if(!c(p))throw p}}}function s(u){return u&&function(f,h,p,m){return u.call(i,f,h,p,function(d){c(d)&&(d=null),m&&m.apply(this,arguments)})}}function o(u){return u&&function(f,h,p){try{return u.call(i,f,h,p)}catch(m){if(!c(m))throw m}}}function a(u){return u&&function(f,h,p){typeof h=="function"&&(p=h,h=null);function m(d,g){g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),p&&p.apply(this,arguments)}return h?u.call(i,f,h,m):u.call(i,f,m)}}function l(u){return u&&function(f,h){var p=h?u.call(i,f,h):u.call(i,f);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function c(u){if(!u||u.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var xv=w((IP,wv)=>{var bv=require("stream").Stream;wv.exports=AI;function AI(i){return{ReadStream:e,WriteStream:t};function e(r,n){if(!(this instanceof e))return new e(r,n);bv.call(this);var s=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,n=n||{};for(var o=Object.keys(n),a=0,l=o.length;a<l;a++){var c=o[a];this[c]=n[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}i.open(this.path,this.flags,this.mode,function(u,f){if(u){s.emit("error",u),s.readable=!1;return}s.fd=f,s.emit("open",f),s._read()})}function t(r,n){if(!(this instanceof t))return new t(r,n);bv.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var s=Object.keys(n),o=0,a=s.length;o<a;o++){var l=s[o];this[l]=n[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=i.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var Ev=w((TP,Sv)=>{"use strict";Sv.exports=TI;var II=Object.getPrototypeOf||function(i){return i.__proto__};function TI(i){if(i===null||typeof i!="object")return i;if(i instanceof Object)var e={__proto__:II(i)};else var e=Object.create(null);return Object.getOwnPropertyNames(i).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}),e}});var Av=w((NP,Gu)=>{var Te=require("fs"),NI=_v(),BI=xv(),PI=Ev(),Lo=require("util"),ze,Mo;typeof Symbol=="function"&&typeof Symbol.for=="function"?(ze=Symbol.for("graceful-fs.queue"),Mo=Symbol.for("graceful-fs.previous")):(ze="___graceful-fs.queue",Mo="___graceful-fs.previous");function LI(){}function Cv(i,e){Object.defineProperty(i,ze,{get:function(){return e}})}var Ui=LI;Lo.debuglog?Ui=Lo.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Ui=function(){var i=Lo.format.apply(Lo,arguments);i="GFS4: "+i.split(/\n/).join(`
|
|
188
|
+
GFS4: `),console.error(i)});Te[ze]||(Ov=global[ze]||[],Cv(Te,Ov),Te.close=(function(i){function e(t,r){return i.call(Te,t,function(n){n||kv(),typeof r=="function"&&r.apply(this,arguments)})}return Object.defineProperty(e,Mo,{value:i}),e})(Te.close),Te.closeSync=(function(i){function e(t){i.apply(Te,arguments),kv()}return Object.defineProperty(e,Mo,{value:i}),e})(Te.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Ui(Te[ze]),require("assert").equal(Te[ze].length,0)}));var Ov;global[ze]||Cv(global,Te[ze]);Gu.exports=Hu(PI(Te));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Te.__patched&&(Gu.exports=Hu(Te),Te.__patched=!0);function Hu(i){NI(i),i.gracefulify=Hu,i.createReadStream=_,i.createWriteStream=A;var e=i.readFile;i.readFile=t;function t(S,T,I){return typeof T=="function"&&(I=T,T=null),F(S,T,I);function F(L,$,P,M){return e(L,$,function(H){H&&(H.code==="EMFILE"||H.code==="ENFILE")?Cr([F,[L,$,P],H,M||Date.now(),Date.now()]):typeof P=="function"&&P.apply(this,arguments)})}}var r=i.writeFile;i.writeFile=n;function n(S,T,I,F){return typeof I=="function"&&(F=I,I=null),L(S,T,I,F);function L($,P,M,H,W){return r($,P,M,function(D){D&&(D.code==="EMFILE"||D.code==="ENFILE")?Cr([L,[$,P,M,H],D,W||Date.now(),Date.now()]):typeof H=="function"&&H.apply(this,arguments)})}}var s=i.appendFile;s&&(i.appendFile=o);function o(S,T,I,F){return typeof I=="function"&&(F=I,I=null),L(S,T,I,F);function L($,P,M,H,W){return s($,P,M,function(D){D&&(D.code==="EMFILE"||D.code==="ENFILE")?Cr([L,[$,P,M,H],D,W||Date.now(),Date.now()]):typeof H=="function"&&H.apply(this,arguments)})}}var a=i.copyFile;a&&(i.copyFile=l);function l(S,T,I,F){return typeof I=="function"&&(F=I,I=0),L(S,T,I,F);function L($,P,M,H,W){return a($,P,M,function(D){D&&(D.code==="EMFILE"||D.code==="ENFILE")?Cr([L,[$,P,M,H],D,W||Date.now(),Date.now()]):typeof H=="function"&&H.apply(this,arguments)})}}var c=i.readdir;i.readdir=f;var u=/^v[0-5]\./;function f(S,T,I){typeof T=="function"&&(I=T,T=null);var F=u.test(process.version)?function(P,M,H,W){return c(P,L(P,M,H,W))}:function(P,M,H,W){return c(P,M,L(P,M,H,W))};return F(S,T,I);function L($,P,M,H){return function(W,D){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Cr([F,[$,P,M],W,H||Date.now(),Date.now()]):(D&&D.sort&&D.sort(),typeof M=="function"&&M.call(this,W,D))}}}if(process.version.substr(0,4)==="v0.8"){var h=BI(i);v=h.ReadStream,y=h.WriteStream}var p=i.ReadStream;p&&(v.prototype=Object.create(p.prototype),v.prototype.open=b);var m=i.WriteStream;m&&(y.prototype=Object.create(m.prototype),y.prototype.open=x),Object.defineProperty(i,"ReadStream",{get:function(){return v},set:function(S){v=S},enumerable:!0,configurable:!0}),Object.defineProperty(i,"WriteStream",{get:function(){return y},set:function(S){y=S},enumerable:!0,configurable:!0});var d=v;Object.defineProperty(i,"FileReadStream",{get:function(){return d},set:function(S){d=S},enumerable:!0,configurable:!0});var g=y;Object.defineProperty(i,"FileWriteStream",{get:function(){return g},set:function(S){g=S},enumerable:!0,configurable:!0});function v(S,T){return this instanceof v?(p.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}function b(){var S=this;C(S.path,S.flags,S.mode,function(T,I){T?(S.autoClose&&S.destroy(),S.emit("error",T)):(S.fd=I,S.emit("open",I),S.read())})}function y(S,T){return this instanceof y?(m.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}function x(){var S=this;C(S.path,S.flags,S.mode,function(T,I){T?(S.destroy(),S.emit("error",T)):(S.fd=I,S.emit("open",I))})}function _(S,T){return new i.ReadStream(S,T)}function A(S,T){return new i.WriteStream(S,T)}var E=i.open;i.open=C;function C(S,T,I,F){return typeof I=="function"&&(F=I,I=null),L(S,T,I,F);function L($,P,M,H,W){return E($,P,M,function(D,Ee){D&&(D.code==="EMFILE"||D.code==="ENFILE")?Cr([L,[$,P,M,H],D,W||Date.now(),Date.now()]):typeof H=="function"&&H.apply(this,arguments)})}}return i}function Cr(i){Ui("ENQUEUE",i[0].name,i[1]),Te[ze].push(i),Vu()}var Ro;function kv(){for(var i=Date.now(),e=0;e<Te[ze].length;++e)Te[ze][e].length>2&&(Te[ze][e][3]=i,Te[ze][e][4]=i);Vu()}function Vu(){if(clearTimeout(Ro),Ro=void 0,Te[ze].length!==0){var i=Te[ze].shift(),e=i[0],t=i[1],r=i[2],n=i[3],s=i[4];if(n===void 0)Ui("RETRY",e.name,t),e.apply(null,t);else if(Date.now()-n>=6e4){Ui("TIMEOUT",e.name,t);var o=t.pop();typeof o=="function"&&o.call(null,r)}else{var a=Date.now()-s,l=Math.max(s-n,1),c=Math.min(l*1.2,100);a>=c?(Ui("RETRY",e.name,t),e.apply(null,t.concat([n]))):Te[ze].push(i)}Ro===void 0&&(Ro=setTimeout(Vu,0))}}});var Tv=w((BP,Iv)=>{function kt(i,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(i)),this._timeouts=i,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}Iv.exports=kt;kt.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};kt.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};kt.prototype.retry=function(i){if(this._timeout&&clearTimeout(this._timeout),!i)return!1;var e=new Date().getTime();if(i&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(i);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),t=this._timeouts.shift();else return!1;var r=this,n=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t);return this._options.unref&&n.unref(),!0};kt.prototype.attempt=function(i,e){this._fn=i,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};kt.prototype.try=function(i){console.log("Using RetryOperation.try() is deprecated"),this.attempt(i)};kt.prototype.start=function(i){console.log("Using RetryOperation.start() is deprecated"),this.attempt(i)};kt.prototype.start=kt.prototype.try;kt.prototype.errors=function(){return this._errors};kt.prototype.attempts=function(){return this._attempts};kt.prototype.mainError=function(){if(this._errors.length===0)return null;for(var i={},e=null,t=0,r=0;r<this._errors.length;r++){var n=this._errors[r],s=n.message,o=(i[s]||0)+1;i[s]=o,o>=t&&(e=n,t=o)}return e}});var Nv=w(ji=>{var RI=Tv();ji.operation=function(i){var e=ji.timeouts(i);return new RI(e,{forever:i&&i.forever,unref:i&&i.unref,maxRetryTime:i&&i.maxRetryTime})};ji.timeouts=function(i){if(i instanceof Array)return[].concat(i);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in i)e[t]=i[t];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],n=0;n<e.retries;n++)r.push(this.createTimeout(n,e));return i&&i.forever&&!r.length&&r.push(this.createTimeout(n,e)),r.sort(function(s,o){return s-o}),r};ji.createTimeout=function(i,e){var t=e.randomize?Math.random()+1:1,r=Math.round(t*e.minTimeout*Math.pow(e.factor,i));return r=Math.min(r,e.maxTimeout),r};ji.wrap=function(i,e,t){if(e instanceof Array&&(t=e,e=null),!t){t=[];for(var r in i)typeof i[r]=="function"&&t.push(r)}for(var n=0;n<t.length;n++){var s=t[n],o=i[s];i[s]=function(l){var c=ji.operation(e),u=Array.prototype.slice.call(arguments,1),f=u.pop();u.push(function(h){c.retry(h)||(h&&(arguments[0]=c.mainError()),f.apply(this,arguments))}),c.attempt(function(){l.apply(i,u)})}.bind(i,o),i[s].options=e}}});var Pv=w((LP,Bv)=>{Bv.exports=Nv()});var Lv=w((RP,Fo)=>{Fo.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Fo.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Fo.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var qv=w((MP,Tr)=>{var Ae=global.process,$i=function(i){return i&&typeof i=="object"&&typeof i.removeListener=="function"&&typeof i.emit=="function"&&typeof i.reallyExit=="function"&&typeof i.listeners=="function"&&typeof i.kill=="function"&&typeof i.pid=="number"&&typeof i.on=="function"};$i(Ae)?(Rv=require("assert"),Ar=Lv(),Mv=/^win/i.test(Ae.platform),Rn=require("events"),typeof Rn!="function"&&(Rn=Rn.EventEmitter),Ae.__signal_exit_emitter__?Ve=Ae.__signal_exit_emitter__:(Ve=Ae.__signal_exit_emitter__=new Rn,Ve.count=0,Ve.emitted={}),Ve.infinite||(Ve.setMaxListeners(1/0),Ve.infinite=!0),Tr.exports=function(i,e){if(!$i(global.process))return function(){};Rv.equal(typeof i,"function","a callback must be provided for exit handler"),Ir===!1&&Wu();var t="exit";e&&e.alwaysLast&&(t="afterexit");var r=function(){Ve.removeListener(t,i),Ve.listeners("exit").length===0&&Ve.listeners("afterexit").length===0&&Do()};return Ve.on(t,i),r},Do=function(){!Ir||!$i(global.process)||(Ir=!1,Ar.forEach(function(e){try{Ae.removeListener(e,qo[e])}catch{}}),Ae.emit=Uo,Ae.reallyExit=Yu,Ve.count-=1)},Tr.exports.unload=Do,Hi=function(e,t,r){Ve.emitted[e]||(Ve.emitted[e]=!0,Ve.emit(e,t,r))},qo={},Ar.forEach(function(i){qo[i]=function(){if($i(global.process)){var t=Ae.listeners(i);t.length===Ve.count&&(Do(),Hi("exit",null,i),Hi("afterexit",null,i),Mv&&i==="SIGHUP"&&(i="SIGINT"),Ae.kill(Ae.pid,i))}}}),Tr.exports.signals=function(){return Ar},Ir=!1,Wu=function(){Ir||!$i(global.process)||(Ir=!0,Ve.count+=1,Ar=Ar.filter(function(e){try{return Ae.on(e,qo[e]),!0}catch{return!1}}),Ae.emit=Dv,Ae.reallyExit=Fv)},Tr.exports.load=Wu,Yu=Ae.reallyExit,Fv=function(e){$i(global.process)&&(Ae.exitCode=e||0,Hi("exit",Ae.exitCode,null),Hi("afterexit",Ae.exitCode,null),Yu.call(Ae,Ae.exitCode))},Uo=Ae.emit,Dv=function(e,t){if(e==="exit"&&$i(global.process)){t!==void 0&&(Ae.exitCode=t);var r=Uo.apply(this,arguments);return Hi("exit",Ae.exitCode,null),Hi("afterexit",Ae.exitCode,null),r}else return Uo.apply(this,arguments)}):Tr.exports=function(){return function(){}};var Rv,Ar,Mv,Rn,Ve,Do,Hi,qo,Ir,Wu,Yu,Fv,Uo,Dv});var Yv=w((FP,Wv)=>{"use strict";var MI=require("path"),Hv=Av(),FI=Pv(),DI=qv(),yi={},Uv=Symbol();function qI(i,e,t){let r=e[Uv];if(r)return e.stat(i,(s,o)=>{if(s)return t(s);t(null,o.mtime,r)});let n=new Date(Math.ceil(Date.now()/1e3)*1e3+5);e.utimes(i,n,n,s=>{if(s)return t(s);e.stat(i,(o,a)=>{if(o)return t(o);let l=a.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(e,Uv,{value:l}),t(null,a.mtime,l)})})}function UI(i){let e=Date.now();return i==="s"&&(e=Math.ceil(e/1e3)*1e3),new Date(e)}function $o(i,e){return e.lockfilePath||`${i}.lock`}function Vv(i,e,t){if(!e.realpath)return t(null,MI.resolve(i));e.fs.realpath(i,t)}function zu(i,e,t){let r=$o(i,e);e.fs.mkdir(r,n=>{if(!n)return qI(r,e.fs,(s,o,a)=>{if(s)return e.fs.rmdir(r,()=>{}),t(s);t(null,o,a)});if(n.code!=="EEXIST")return t(n);if(e.stale<=0)return t(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:i}));e.fs.stat(r,(s,o)=>{if(s)return s.code==="ENOENT"?zu(i,{...e,stale:0},t):t(s);if(!jI(o,e))return t(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:i}));Gv(i,e,a=>{if(a)return t(a);zu(i,{...e,stale:0},t)})})})}function jI(i,e){return i.mtime.getTime()<Date.now()-e.stale}function Gv(i,e,t){e.fs.rmdir($o(i,e),r=>{if(r&&r.code!=="ENOENT")return t(r);t()})}function jo(i,e){let t=yi[i];t.updateTimeout||(t.updateDelay=t.updateDelay||e.update,t.updateTimeout=setTimeout(()=>{t.updateTimeout=null,e.fs.stat(t.lockfilePath,(r,n)=>{let s=t.lastUpdate+e.stale<Date.now();if(r)return r.code==="ENOENT"||s?Ku(i,t,Object.assign(r,{code:"ECOMPROMISED"})):(t.updateDelay=1e3,jo(i,e));if(!(t.mtime.getTime()===n.mtime.getTime()))return Ku(i,t,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let a=UI(t.mtimePrecision);e.fs.utimes(t.lockfilePath,a,a,l=>{let c=t.lastUpdate+e.stale<Date.now();if(!t.released){if(l)return l.code==="ENOENT"||c?Ku(i,t,Object.assign(l,{code:"ECOMPROMISED"})):(t.updateDelay=1e3,jo(i,e));t.mtime=a,t.lastUpdate=Date.now(),t.updateDelay=null,jo(i,e)}})})},t.updateDelay),t.updateTimeout.unref&&t.updateTimeout.unref())}function Ku(i,e,t){e.released=!0,e.updateTimeout&&clearTimeout(e.updateTimeout),yi[i]===e&&delete yi[i],e.options.onCompromised(t)}function $I(i,e,t){e={stale:1e4,update:null,realpath:!0,retries:0,fs:Hv,onCompromised:r=>{throw r},...e},e.retries=e.retries||0,e.retries=typeof e.retries=="number"?{retries:e.retries}:e.retries,e.stale=Math.max(e.stale||0,2e3),e.update=e.update==null?e.stale/2:e.update||0,e.update=Math.max(Math.min(e.update,e.stale/2),1e3),Vv(i,e,(r,n)=>{if(r)return t(r);let s=FI.operation(e.retries);s.attempt(()=>{zu(n,e,(o,a,l)=>{if(s.retry(o))return;if(o)return t(s.mainError());let c=yi[n]={lockfilePath:$o(n,e),mtime:a,mtimePrecision:l,options:e,lastUpdate:Date.now()};jo(n,e),t(null,u=>{if(c.released)return u&&u(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));HI(n,{...e,realpath:!1},u)})})})})}function HI(i,e,t){e={fs:Hv,realpath:!0,...e},Vv(i,e,(r,n)=>{if(r)return t(r);let s=yi[n];if(!s)return t(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));s.updateTimeout&&clearTimeout(s.updateTimeout),s.released=!0,delete yi[n],Gv(n,e,t)})}function jv(i){return(...e)=>new Promise((t,r)=>{e.push((n,s)=>{n?r(n):t(s)}),i(...e)})}var $v=!1;function VI(){$v||($v=!0,DI(()=>{for(let i in yi){let e=yi[i].options;try{e.fs.rmdirSync($o(i,e))}catch{}}}))}Wv.exports.lock=async(i,e)=>{VI();let t=await jv($I)(i,e);return jv(t)}});var aT={};uf(aT,{HttpsProxyAgent:()=>n_.HttpsProxyAgent,PNG:()=>s_.PNG,ProgramOption:()=>$p,SocksProxyAgent:()=>o_.SocksProxyAgent,colors:()=>GI,debug:()=>WI,diff:()=>YI,dotenv:()=>KI,getProxyForUrl:()=>r_.getProxyForUrl,jpegjs:()=>zI,lockfile:()=>ZI,mime:()=>QI,minimatch:()=>XI,open:()=>eT,program:()=>jp,progress:()=>tT,ws:()=>iT,wsReceiver:()=>nT,wsSender:()=>sT,wsServer:()=>rT,yaml:()=>oT});module.exports=d_(aT);var Kv=Ne(qf()),zv=Ne(Dr());var wa={};uf(wa,{Diff:()=>Pe,FILE_HEADERS_ONLY:()=>hh,INCLUDE_HEADERS:()=>_a,OMIT_HEADERS:()=>dh,applyPatch:()=>ya,applyPatches:()=>fh,arrayDiff:()=>pa,canonicalize:()=>jr,characterDiff:()=>Jo,convertChangesToDMP:()=>mh,convertChangesToXML:()=>gh,createPatch:()=>ph,createTwoFilesPatch:()=>ba,cssDiff:()=>ua,diffArrays:()=>ah,diffChars:()=>Zf,diffCss:()=>sh,diffJson:()=>oh,diffLines:()=>Ur,diffSentences:()=>nh,diffTrimmedLines:()=>rh,diffWords:()=>th,diffWordsWithSpace:()=>na,formatPatch:()=>Hr,jsonDiff:()=>ha,lineDiff:()=>zn,parsePatch:()=>$r,reversePatch:()=>va,sentenceDiff:()=>la,structuredPatch:()=>Jn,wordDiff:()=>ia,wordsWithSpaceDiff:()=>ra});var Pe=class{diff(e,t,r={}){let n;typeof r=="function"?(n=r,r={}):"callback"in r&&(n=r.callback);let s=this.castInput(e,r),o=this.castInput(t,r),a=this.removeEmpty(this.tokenize(s,r)),l=this.removeEmpty(this.tokenize(o,r));return this.diffWithOptionsObj(a,l,r,n)}diffWithOptionsObj(e,t,r,n){var s;let o=b=>{if(b=this.postProcess(b,r),n){setTimeout(function(){n(b)},0);return}else return b},a=t.length,l=e.length,c=1,u=a+l;r.maxEditLength!=null&&(u=Math.min(u,r.maxEditLength));let f=(s=r.timeout)!==null&&s!==void 0?s:1/0,h=Date.now()+f,p=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(p[0],t,e,0,r);if(p[0].oldPos+1>=l&&m+1>=a)return o(this.buildValues(p[0].lastComponent,t,e));let d=-1/0,g=1/0,v=()=>{for(let b=Math.max(d,-c);b<=Math.min(g,c);b+=2){let y,x=p[b-1],_=p[b+1];x&&(p[b-1]=void 0);let A=!1;if(_){let C=_.oldPos-b;A=_&&0<=C&&C<a}let E=x&&x.oldPos+1<l;if(!A&&!E){p[b]=void 0;continue}if(!E||A&&x.oldPos<_.oldPos?y=this.addToPath(_,!0,!1,0,r):y=this.addToPath(x,!1,!0,1,r),m=this.extractCommon(y,t,e,b,r),y.oldPos+1>=l&&m+1>=a)return o(this.buildValues(y.lastComponent,t,e))||!0;p[b]=y,y.oldPos+1>=l&&(g=Math.min(g,b-1)),m+1>=a&&(d=Math.max(d,b+1))}c++};if(n)(function b(){setTimeout(function(){if(c>u||Date.now()>h)return n(void 0);v()||b()},0)})();else for(;c<=u&&Date.now()<=h;){let b=v();if(b)return b}}addToPath(e,t,r,n,s){let o=e.lastComponent;return o&&!s.oneChangePerToken&&o.added===t&&o.removed===r?{oldPos:e.oldPos+n,lastComponent:{count:o.count+1,added:t,removed:r,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:t,removed:r,previousComponent:o}}}extractCommon(e,t,r,n,s){let o=t.length,a=r.length,l=e.oldPos,c=l-n,u=0;for(;c+1<o&&l+1<a&&this.equals(r[l+1],t[c+1],s);)c++,l++,u++,s.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return u&&!s.oneChangePerToken&&(e.lastComponent={count:u,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=l,c}equals(e,t,r){return r.comparator?r.comparator(e,t):e===t||!!r.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,r){let n=[],s;for(;e;)n.push(e),s=e.previousComponent,delete e.previousComponent,e=s;n.reverse();let o=n.length,a=0,l=0,c=0;for(;a<o;a++){let u=n[a];if(u.removed)u.value=this.join(r.slice(c,c+u.count)),c+=u.count;else{if(!u.added&&this.useLongestToken){let f=t.slice(l,l+u.count);f=f.map(function(h,p){let m=r[c+p];return m.length>h.length?m:h}),u.value=this.join(f)}else u.value=this.join(t.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}return n}};var zo=class extends Pe{},Jo=new zo;function Zf(i,e,t){return Jo.diff(i,e,t)}function Zo(i,e){let t;for(t=0;t<i.length&&t<e.length;t++)if(i[t]!=e[t])return i.slice(0,t);return i.slice(0,t)}function Qo(i,e){let t;if(!i||!e||i[i.length-1]!=e[e.length-1])return"";for(t=0;t<i.length&&t<e.length;t++)if(i[i.length-(t+1)]!=e[e.length-(t+1)])return i.slice(-t);return i.slice(-t)}function Wn(i,e,t){if(i.slice(0,e.length)!=e)throw Error(`string ${JSON.stringify(i)} doesn't start with prefix ${JSON.stringify(e)}; this is a bug`);return t+i.slice(e.length)}function Yn(i,e,t){if(!e)return i+t;if(i.slice(-e.length)!=e)throw Error(`string ${JSON.stringify(i)} doesn't end with suffix ${JSON.stringify(e)}; this is a bug`);return i.slice(0,-e.length)+t}function Ji(i,e){return Wn(i,e,"")}function qr(i,e){return Yn(i,e,"")}function Xo(i,e){return e.slice(0,J_(i,e))}function J_(i,e){let t=0;i.length>e.length&&(t=i.length-e.length);let r=e.length;i.length<e.length&&(r=i.length);let n=Array(r),s=0;n[0]=0;for(let o=1;o<r;o++){for(e[o]==e[s]?n[o]=n[s]:n[o]=s;s>0&&e[o]!=e[s];)s=n[s];e[o]==e[s]&&s++}s=0;for(let o=t;o<i.length;o++){for(;s>0&&i[o]!=e[s];)s=n[s];i[o]==e[s]&&s++}return s}function Qf(i){return i.includes(`\r
|
|
189
189
|
`)&&!i.startsWith(`
|
|
190
|
-
`)&&!i.match(/[^\r]\n/)}function
|
|
190
|
+
`)&&!i.match(/[^\r]\n/)}function Xf(i){return!i.includes(`\r
|
|
191
191
|
`)&&i.includes(`
|
|
192
|
-
`)}function
|
|
192
|
+
`)}function Zi(i){let e;for(e=i.length-1;e>=0&&i[e].match(/\s/);e--);return i.substring(e+1)}function Ht(i){let e=i.match(/^\s*/);return e?e[0]:""}var Kn="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",Z_=new RegExp(`[${Kn}]+|\\s+|[^${Kn}]`,"ug"),ea=class extends Pe{equals(e,t,r){return r.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let r;if(t.intlSegmenter){let o=t.intlSegmenter;if(o.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=[];for(let a of Array.from(o.segment(e))){let l=a.segment;r.length&&/\s/.test(r[r.length-1])&&/\s/.test(l)?r[r.length-1]+=l:r.push(l)}}else r=e.match(Z_)||[];let n=[],s=null;return r.forEach(o=>{/\s/.test(o)?s==null?n.push(o):n.push(n.pop()+o):s!=null&&/\s/.test(s)?n[n.length-1]==s?n.push(n.pop()+o):n.push(s+o):n.push(o),s=o}),n}join(e){return e.map((t,r)=>r==0?t:t.replace(/^\s+/,"")).join("")}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let r=null,n=null,s=null;return e.forEach(o=>{o.added?n=o:o.removed?s=o:((n||s)&&eh(r,s,n,o),r=o,n=null,s=null)}),(n||s)&&eh(r,s,n,null),e}},ia=new ea;function th(i,e,t){return(t==null?void 0:t.ignoreWhitespace)!=null&&!t.ignoreWhitespace?na(i,e,t):ia.diff(i,e,t)}function eh(i,e,t,r){if(e&&t){let n=Ht(e.value),s=Zi(e.value),o=Ht(t.value),a=Zi(t.value);if(i){let l=Zo(n,o);i.value=Yn(i.value,o,l),e.value=Ji(e.value,l),t.value=Ji(t.value,l)}if(r){let l=Qo(s,a);r.value=Wn(r.value,a,l),e.value=qr(e.value,l),t.value=qr(t.value,l)}}else if(t){if(i){let n=Ht(t.value);t.value=t.value.substring(n.length)}if(r){let n=Ht(r.value);r.value=r.value.substring(n.length)}}else if(i&&r){let n=Ht(r.value),s=Ht(e.value),o=Zi(e.value),a=Zo(n,s);e.value=Ji(e.value,a);let l=Qo(Ji(n,a),o);e.value=qr(e.value,l),r.value=Wn(r.value,n,l),i.value=Yn(i.value,n,n.slice(0,n.length-l.length))}else if(r){let n=Ht(r.value),s=Zi(e.value),o=Xo(s,n);e.value=qr(e.value,o)}else if(i){let n=Zi(i.value),s=Ht(e.value),o=Xo(n,s);e.value=Ji(e.value,o)}}var ta=class extends Pe{tokenize(e){let t=new RegExp(`(\\r?\\n)|[${Kn}]+|[^\\S\\n\\r]+|[^${Kn}]`,"ug");return e.match(t)||[]}},ra=new ta;function na(i,e,t){return ra.diff(i,e,t)}function ih(i,e){if(typeof i=="function")e.callback=i;else if(i)for(let t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e}var sa=class extends Pe{constructor(){super(...arguments),this.tokenize=oa}equals(e,t,r){return r.ignoreWhitespace?((!r.newlineIsToken||!e.includes(`
|
|
193
193
|
`))&&(e=e.trim()),(!r.newlineIsToken||!t.includes(`
|
|
194
194
|
`))&&(t=t.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(e.endsWith(`
|
|
195
195
|
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
196
|
-
`)&&(t=t.slice(0,-1))),super.equals(e,t,r)}},
|
|
197
|
-
`));let t=[],r=i.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let n=0;n<r.length;n++){let s=r[n];n%2&&!e.newlineIsToken?t[t.length-1]+=s:t.push(s)}return t}function
|
|
198
|
-
`),n=e.hunks,s=t.compareLine||((m,d,g,
|
|
199
|
-
`)}function
|
|
200
|
-
`)?b.lines[y]=b.lines[y].slice(0,-1):(b.lines.splice(y+1,0,"\"),y++);return{oldFileName:i,newFileName:e,oldHeader:n,newHeader:s,hunks:h}}}function
|
|
196
|
+
`)&&(t=t.slice(0,-1))),super.equals(e,t,r)}},zn=new sa;function Ur(i,e,t){return zn.diff(i,e,t)}function rh(i,e,t){return t=ih(t,{ignoreWhitespace:!0}),zn.diff(i,e,t)}function oa(i,e){e.stripTrailingCr&&(i=i.replace(/\r\n/g,`
|
|
197
|
+
`));let t=[],r=i.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let n=0;n<r.length;n++){let s=r[n];n%2&&!e.newlineIsToken?t[t.length-1]+=s:t.push(s)}return t}function Q_(i){return i=="."||i=="!"||i=="?"}var aa=class extends Pe{tokenize(e){var t;let r=[],n=0;for(let s=0;s<e.length;s++){if(s==e.length-1){r.push(e.slice(n));break}if(Q_(e[s])&&e[s+1].match(/\s/)){for(r.push(e.slice(n,s+1)),s=n=s+1;!((t=e[s+1])===null||t===void 0)&&t.match(/\s/);)s++;r.push(e.slice(n,s+1)),n=s+1}}return r}},la=new aa;function nh(i,e,t){return la.diff(i,e,t)}var ca=class extends Pe{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},ua=new ca;function sh(i,e,t){return ua.diff(i,e,t)}var fa=class extends Pe{constructor(){super(...arguments),this.tokenize=oa}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:r,stringifyReplacer:n=(s,o)=>typeof o=="undefined"?r:o}=t;return typeof e=="string"?e:JSON.stringify(jr(e,null,null,n),null," ")}equals(e,t,r){return super.equals(e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"),r)}},ha=new fa;function oh(i,e,t){return ha.diff(i,e,t)}function jr(i,e,t,r,n){e=e||[],t=t||[],r&&(i=r(n===void 0?"":n,i));let s;for(s=0;s<e.length;s+=1)if(e[s]===i)return t[s];let o;if(Object.prototype.toString.call(i)==="[object Array]"){for(e.push(i),o=new Array(i.length),t.push(o),s=0;s<i.length;s+=1)o[s]=jr(i[s],e,t,r,String(s));return e.pop(),t.pop(),o}if(i&&i.toJSON&&(i=i.toJSON()),typeof i=="object"&&i!==null){e.push(i),o={},t.push(o);let a=[],l;for(l in i)Object.prototype.hasOwnProperty.call(i,l)&&a.push(l);for(a.sort(),s=0;s<a.length;s+=1)l=a[s],o[l]=jr(i[l],e,t,r,l);e.pop(),t.pop()}else o=i;return o}var da=class extends Pe{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},pa=new da;function ah(i,e,t){return pa.diff(i,e,t)}function ma(i){return Array.isArray(i)?i.map(e=>ma(e)):Object.assign(Object.assign({},i),{hunks:i.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map((t,r)=>{var n;return t.startsWith("\\")||t.endsWith("\r")||!((n=e.lines[r+1])===null||n===void 0)&&n.startsWith("\\")?t:t+"\r"})}))})}function ga(i){return Array.isArray(i)?i.map(e=>ga(e)):Object.assign(Object.assign({},i),{hunks:i.hunks.map(e=>Object.assign(Object.assign({},e),{lines:e.lines.map(t=>t.endsWith("\r")?t.substring(0,t.length-1):t)}))})}function lh(i){return Array.isArray(i)||(i=[i]),!i.some(e=>e.hunks.some(t=>t.lines.some(r=>!r.startsWith("\\")&&r.endsWith("\r"))))}function ch(i){return Array.isArray(i)||(i=[i]),i.some(e=>e.hunks.some(t=>t.lines.some(r=>r.endsWith("\r"))))&&i.every(e=>e.hunks.every(t=>t.lines.every((r,n)=>{var s;return r.startsWith("\\")||r.endsWith("\r")||((s=t.lines[n+1])===null||s===void 0?void 0:s.startsWith("\\"))})))}function $r(i){let e=i.split(/\n/),t=[],r=0;function n(){let a={};for(t.push(a);r<e.length;){let l=e[r];if(/^(---|\+\+\+|@@)\s/.test(l))break;let c=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(l);c&&(a.index=l.substring(c[0].length).trim()),r++}for(s(a),s(a),a.hunks=[];r<e.length;){let l=e[r];if(/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(l))break;if(/^@@/.test(l))a.hunks.push(o());else{if(l)throw new Error("Unknown line "+(r+1)+" "+JSON.stringify(l));r++}}}function s(a){let l=/^(---|\+\+\+)\s+/.exec(e[r]);if(l){let c=l[1],u=e[r].substring(3).trim().split(" ",2),f=(u[1]||"").trim(),h=u[0].replace(/\\\\/g,"\\");h.startsWith('"')&&h.endsWith('"')&&(h=h.substr(1,h.length-2)),c==="---"?(a.oldFileName=h,a.oldHeader=f):(a.newFileName=h,a.newHeader=f),r++}}function o(){var a;let l=r,c=e[r++],u=c.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),f={oldStart:+u[1],oldLines:typeof u[2]=="undefined"?1:+u[2],newStart:+u[3],newLines:typeof u[4]=="undefined"?1:+u[4],lines:[]};f.oldLines===0&&(f.oldStart+=1),f.newLines===0&&(f.newStart+=1);let h=0,p=0;for(;r<e.length&&(p<f.oldLines||h<f.newLines||!((a=e[r])===null||a===void 0)&&a.startsWith("\\"));r++){let m=e[r].length==0&&r!=e.length-1?" ":e[r][0];if(m==="+"||m==="-"||m===" "||m==="\\")f.lines.push(e[r]),m==="+"?h++:m==="-"?p++:m===" "&&(h++,p++);else throw new Error(`Hunk at line ${l+1} contained invalid line ${e[r]}`)}if(!h&&f.newLines===1&&(f.newLines=0),!p&&f.oldLines===1&&(f.oldLines=0),h!==f.newLines)throw new Error("Added line count did not match for hunk at line "+(l+1));if(p!==f.oldLines)throw new Error("Removed line count did not match for hunk at line "+(l+1));return f}for(;r<e.length;)n();return t}function uh(i,e,t){let r=!0,n=!1,s=!1,o=1;return function a(){if(r&&!s){if(n?o++:r=!1,i+o<=t)return i+o;s=!0}if(!n)return s||(r=!0),e<=i-o?i-o++:(n=!0,a())}}function ya(i,e,t={}){let r;if(typeof e=="string"?r=$r(e):Array.isArray(e)?r=e:r=[e],r.length>1)throw new Error("applyPatch only works with a single input.");return X_(i,r[0],t)}function X_(i,e,t={}){(t.autoConvertLineEndings||t.autoConvertLineEndings==null)&&(Qf(i)&&lh(e)?e=ma(e):Xf(i)&&ch(e)&&(e=ga(e)));let r=i.split(`
|
|
198
|
+
`),n=e.hunks,s=t.compareLine||((m,d,g,v)=>d===v),o=t.fuzzFactor||0,a=0;if(o<0||!Number.isInteger(o))throw new Error("fuzzFactor must be a non-negative integer");if(!n.length)return i;let l="",c=!1,u=!1;for(let m=0;m<n[n.length-1].lines.length;m++){let d=n[n.length-1].lines[m];d[0]=="\\"&&(l[0]=="+"?c=!0:l[0]=="-"&&(u=!0)),l=d}if(c){if(u){if(!o&&r[r.length-1]=="")return!1}else if(r[r.length-1]=="")r.pop();else if(!o)return!1}else if(u){if(r[r.length-1]!="")r.push("");else if(!o)return!1}function f(m,d,g,v=0,b=!0,y=[],x=0){let _=0,A=!1;for(;v<m.length;v++){let E=m[v],C=E.length>0?E[0]:" ",S=E.length>0?E.substr(1):E;if(C==="-")if(s(d+1,r[d],C,S))d++,_=0;else return!g||r[d]==null?null:(y[x]=r[d],f(m,d+1,g-1,v,!1,y,x+1));if(C==="+"){if(!b)return null;y[x]=S,x++,_=0,A=!0}if(C===" ")if(_++,y[x]=r[d],s(d+1,r[d],C,S))x++,b=!0,A=!1,d++;else return A||!g?null:r[d]&&(f(m,d+1,g-1,v+1,!1,y,x+1)||f(m,d+1,g-1,v,!1,y,x+1))||f(m,d,g-1,v+1,!1,y,x)}return x-=_,d-=_,y.length=x,{patchedLines:y,oldLineLastI:d-1}}let h=[],p=0;for(let m=0;m<n.length;m++){let d=n[m],g,v=r.length-d.oldLines+o,b;for(let y=0;y<=o;y++){b=d.oldStart+p-1;let x=uh(b,a,v);for(;b!==void 0&&(g=f(d.lines,b,y),!g);b=x());if(g)break}if(!g)return!1;for(let y=a;y<b;y++)h.push(r[y]);for(let y=0;y<g.patchedLines.length;y++){let x=g.patchedLines[y];h.push(x)}a=g.oldLineLastI+1,p=b+1-d.oldStart}for(let m=a;m<r.length;m++)h.push(r[m]);return h.join(`
|
|
199
|
+
`)}function fh(i,e){let t=typeof i=="string"?$r(i):i,r=0;function n(){let s=t[r++];if(!s)return e.complete();e.loadFile(s,function(o,a){if(o)return e.complete(o);let l=ya(a,s,e);e.patched(s,l,function(c){if(c)return e.complete(c);n()})})}n()}function va(i){return Array.isArray(i)?i.map(e=>va(e)).reverse():Object.assign(Object.assign({},i),{oldFileName:i.newFileName,oldHeader:i.newHeader,newFileName:i.oldFileName,newHeader:i.oldHeader,hunks:i.hunks.map(e=>({oldLines:e.newLines,oldStart:e.newStart,newLines:e.oldLines,newStart:e.oldStart,lines:e.lines.map(t=>t.startsWith("-")?`+${t.slice(1)}`:t.startsWith("+")?`-${t.slice(1)}`:t)}))})}var _a={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0},hh={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},dh={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1};function Jn(i,e,t,r,n,s,o){let a;o?typeof o=="function"?a={callback:o}:a=o:a={},typeof a.context=="undefined"&&(a.context=4);let l=a.context;if(a.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(a.callback){let{callback:u}=a;Ur(t,r,Object.assign(Object.assign({},a),{callback:f=>{let h=c(f);u(h)}}))}else return c(Ur(t,r,a));function c(u){if(!u)return;u.push({value:"",lines:[]});function f(b){return b.map(function(y){return" "+y})}let h=[],p=0,m=0,d=[],g=1,v=1;for(let b=0;b<u.length;b++){let y=u[b],x=y.lines||eb(y.value);if(y.lines=x,y.added||y.removed){if(!p){let _=u[b-1];p=g,m=v,_&&(d=l>0?f(_.lines.slice(-l)):[],p-=d.length,m-=d.length)}for(let _ of x)d.push((y.added?"+":"-")+_);y.added?v+=x.length:g+=x.length}else{if(p)if(x.length<=l*2&&b<u.length-2)for(let _ of f(x))d.push(_);else{let _=Math.min(x.length,l);for(let E of f(x.slice(0,_)))d.push(E);let A={oldStart:p,oldLines:g-p+_,newStart:m,newLines:v-m+_,lines:d};h.push(A),p=0,m=0,d=[]}g+=x.length,v+=x.length}}for(let b of h)for(let y=0;y<b.lines.length;y++)b.lines[y].endsWith(`
|
|
200
|
+
`)?b.lines[y]=b.lines[y].slice(0,-1):(b.lines.splice(y+1,0,"\"),y++);return{oldFileName:i,newFileName:e,oldHeader:n,newHeader:s,hunks:h}}}function Hr(i,e){if(e||(e=_a),Array.isArray(i)){if(i.length>1&&!e.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return i.map(r=>Hr(r,e)).join(`
|
|
201
201
|
`)}let t=[];e.includeIndex&&i.oldFileName==i.newFileName&&t.push("Index: "+i.oldFileName),e.includeUnderline&&t.push("==================================================================="),e.includeFileHeaders&&(t.push("--- "+i.oldFileName+(typeof i.oldHeader=="undefined"?"":" "+i.oldHeader)),t.push("+++ "+i.newFileName+(typeof i.newHeader=="undefined"?"":" "+i.newHeader)));for(let r=0;r<i.hunks.length;r++){let n=i.hunks[r];n.oldLines===0&&(n.oldStart-=1),n.newLines===0&&(n.newStart-=1),t.push("@@ -"+n.oldStart+","+n.oldLines+" +"+n.newStart+","+n.newLines+" @@");for(let s of n.lines)t.push(s)}return t.join(`
|
|
202
202
|
`)+`
|
|
203
|
-
`}function
|
|
203
|
+
`}function ba(i,e,t,r,n,s,o){if(typeof o=="function"&&(o={callback:o}),o!=null&&o.callback){let{callback:a}=o;Jn(i,e,t,r,n,s,Object.assign(Object.assign({},o),{callback:l=>{a(l?Hr(l,o.headerOptions):void 0)}}))}else{let a=Jn(i,e,t,r,n,s,o);return a?Hr(a,o==null?void 0:o.headerOptions):void 0}}function ph(i,e,t,r,n,s){return ba(i,i,e,t,r,n,s)}function eb(i){let e=i.endsWith(`
|
|
204
204
|
`),t=i.split(`
|
|
205
205
|
`).map(r=>r+`
|
|
206
|
-
`);return e?t.pop():t.push(t.pop().slice(0,-1)),t}function
|
|
206
|
+
`);return e?t.pop():t.push(t.pop().slice(0,-1)),t}function mh(i){let e=[],t,r;for(let n=0;n<i.length;n++)t=i[n],t.added?r=1:t.removed?r=-1:r=0,e.push([r,t.value]);return e}function gh(i){let e=[];for(let t=0;t<i.length;t++){let r=i[t];r.added?e.push("<ins>"):r.removed&&e.push("<del>"),e.push(tb(r.value)),r.added?e.push("</ins>"):r.removed&&e.push("</del>")}return e.join("")}function tb(i){let e=i;return e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=e.replace(/"/g,"""),e}var Jv=Ne(wh()),r_=Ne(Sh()),n_=Ne(Mh()),Zv=Ne(Hh()),Qv=Ne(Zh()),Xv=Ne(vd()),e_=Ne(Bd()),s_=Ne(Cp());var Up=Ne(qp(),1),{program:jp,createCommand:gN,createArgument:yN,createOption:vN,CommanderError:_N,InvalidArgumentError:bN,InvalidOptionArgumentError:wN,Command:xN,Argument:SN,Option:$p,Help:EN}=Up.default;var t_=Ne(Yp()),o_=Ne(Em());var KE=Ne(_g(),1),zE=Ne(Ts(),1),JE=Ne(ur(),1),sc=Ne(Kl(),1),oc=Ne(Zl(),1),ZE=Ne(rc(),1),Ag=Ne(Ls(),1),ac=Ne(Cg(),1);var Ig=Ag.default;var i_=Ne(yv()),GI=Kv.default,WI=zv.default,YI=wa,KI=Jv.default,zI=Zv.default,JI=Yv(),ZI=JI,QI=Qv.default,XI=Xv.default,eT=e_.default,tT=t_.default,iT=Ig,rT=ac.default,nT=sc.default,sT=oc.default,oT=i_.default;0&&(module.exports={HttpsProxyAgent,PNG,ProgramOption,SocksProxyAgent,colors,debug,diff,dotenv,getProxyForUrl,jpegjs,lockfile,mime,minimatch,open,program,progress,ws,wsReceiver,wsSender,wsServer,yaml});
|
|
207
207
|
/*! Bundled license information:
|
|
208
208
|
|
|
209
209
|
progress/lib/node-progress.js:
|