From f775c1a3d5beb962e81823bfc1829ee81b8d6f5a Mon Sep 17 00:00:00 2001 From: lokesh Date: Mon, 2 Sep 2024 11:58:48 +0530 Subject: [PATCH 01/10] feat: SIGINT-2132 project sierra initial version --- .gitlab-ci-template.yml | 4 +- README.md | 14 +- overview.md | 12 +- synopsys-task/dist/index.js | 5362 ++++++++--------- synopsys-task/dist/index.js.map | 2 +- synopsys-task/dist/lib.json | 49 +- synopsys-task/dist/lib1.json | 51 +- synopsys-task/package.json | 2 +- synopsys-task/src/main.ts | 28 +- .../src/synopsys-task/application-constant.ts | 477 +- .../src/synopsys-task/azure-service-client.ts | 4 +- .../{synopsys-bridge.ts => bridge.ts} | 144 +- .../src/synopsys-task/diagnostics.ts | 2 + .../src/synopsys-task/download-tool.ts | 6 +- .../src/synopsys-task/enum/BuildStatus.ts | 2 + .../src/synopsys-task/enum/ErrorCodes.ts | 10 +- synopsys-task/src/synopsys-task/input.ts | 299 +- .../src/synopsys-task/model/azure.ts | 2 + .../src/synopsys-task/model/blackduck.ts | 11 +- .../src/synopsys-task/model/coverity.ts | 3 +- .../model/download-file-response.ts | 2 + .../src/synopsys-task/model/input-data.ts | 2 + .../src/synopsys-task/model/polaris.ts | 13 +- .../src/synopsys-task/model/reports.ts | 2 + synopsys-task/src/synopsys-task/model/srm.ts | 9 +- .../src/synopsys-task/tools-parameter.ts | 216 +- synopsys-task/src/synopsys-task/utility.ts | 18 +- synopsys-task/src/synopsys-task/validator.ts | 15 +- synopsys-task/task.json | 136 +- synopsys-task/test/integration/_suite.ts | 2 +- .../integration/blackduck-scan-failure.ts | 14 +- .../integration/blackduck-scan-success.ts | 12 +- .../test/integration/coverity-scan-failure.ts | 18 +- .../test/integration/coverity-scan-success.ts | 16 +- .../test/integration/polaris-scan-failure.ts | 8 +- .../test/integration/polaris-scan-success.ts | 10 +- synopsys-task/test/unit/main.spec.ts | 94 +- .../azure-service-client.spec.ts | 2 + .../unit/synopsys-task/diagnostics.spec.ts | 9 +- .../synopsys-bridge-platform.spec.ts | 28 +- .../synopsys-task/synopsys-bridge.spec.ts | 362 +- .../test/unit/synopsys-task/toolTests.spec.ts | 4 +- .../synopsys-task/tools-parameter.spec.ts | 366 +- .../test/unit/synopsys-task/utiltity.spec.ts | 4 +- .../test/unit/synopsys-task/validator.spec.ts | 37 +- vss-extension-dev.json | 2 +- vss-extension.json | 12 +- 47 files changed, 3900 insertions(+), 3997 deletions(-) rename synopsys-task/src/synopsys-task/{synopsys-bridge.ts => bridge.ts} (80%) diff --git a/.gitlab-ci-template.yml b/.gitlab-ci-template.yml index fa049efc..ceb05ffa 100644 --- a/.gitlab-ci-template.yml +++ b/.gitlab-ci-template.yml @@ -32,14 +32,14 @@ paths: - .m2/ script: - - cd synopsys-task + - cd blackduck-task - npm ci - npm run format && npm run lint && npm run build && npm run package .unit_test_and_coverage: image: gcr.io/snps-polaris-ops-prod/ember_cli:3.28.5-node_16.14 script: - - cd synopsys-task + - cd blackduck-task - npm ci - npm test coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/ diff --git a/README.md b/README.md index cd7e2e03..c8ff73f6 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -# Synopsys Security Scan for Azure DevOps +# Black Duck Security Scan for Azure DevOps -Synopsys Security Scan Extension for Azure DevOps enables you to configure your Azure pipeline to run Synopsys security testing and take action on the results. -Synopsys Security Scan leverages Synopsys Bridge, allowing you to run tests for several Synopsys products from the command line. +BlackDuck Security Scan Extension for Azure DevOps enables you to configure your Azure pipeline to run BlackDuck security testing and take action on the results. +BlackDuck Security Scan leverages Bridge CLI, allowing you to run tests for several BlackDuck products from the command line. -To use Synopsys Security Scan, please follow the steps below: +To use Black Duck Security Scan, please follow the steps below: 1. Configure Azure DevOps as described in the [Azure Prerequisites](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_azure-prerequisites.html) page. -2. Install and configure Synopsys Security Scan for the Synopsys product you are using.
+2. Install and configure BlackDuck Security Scan for the Black Duck product you are using.
[Polaris](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_azure-with-polaris.html)
[Black Duck](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_azure-with-blackduck.html)
[Coverity](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_azure-with-coverity.html)
3. For additional configuration options, visit the [Additional Azure Configuration](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_additional-azure-parameters.html) page. -As an alternative to Synopsys Action, you also have the option to use Synopsys Bridge CLI.
-Detailed documentation for Synopsys Bridge CLI can be found [here](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_overview.html). +As an alternative to Black Duck Security Scan, you also have the option to use Bridge CLI.
+Detailed documentation for Bridge CLI can be found [here](https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_overview.html). diff --git a/overview.md b/overview.md index e41aa0b1..5eba9c28 100644 --- a/overview.md +++ b/overview.md @@ -1,16 +1,16 @@ -# Synopsys Security Scan for Azure DevOps +# BlackDuck Security Scan for Azure DevOps -Synopsys Security Scan Extension for Azure DevOps enables you to configure your Azure pipeline to run Synopsys security testing and take action on the results. -Synopsys Security Scan leverages Synopsys Bridge, allowing you to run tests for several Synopsys products from the command line. +BlackDuck Security Scan Extension for Azure DevOps enables you to configure your Azure pipeline to run BlackDuck security testing and take action on the results. +BlackDuck Security Scan leverages Bridge-CLI, allowing you to run tests for several BlackDuck products from the command line. -Synopsys Security Scan supports Azure integration with the following Synopsys security testing solutions: +BlackDuck Security Scan supports Azure integration with the following BlackDuck security testing solutions: - **Polaris**, a SaaS-based solution offering SAST, SCA and Managed Services in a single unified platform - **Coverity**, using our thin client and cloud-based deployment model - **Black Duck Hub**, supporting either on-premises or hosted instances -**Note**: Synopsys Security Scan requires appropriate licenses for all Synopsys application used. +**Note**: BlackDuck Security Scan requires appropriate licenses for all BlackDuck application used. -Synopsys solution functionality is invoked directly by Synopsys Bridge, and indirectly by the Synopsys Security Scan, which downloads Synopsys Bridge and calls the respective adapters to run corresponding scans. +BlackDuck solution functionality is invoked directly by Bridge-CLI, and indirectly by the BlackDuck Security Scan, which downloads Bridge-CLI and calls the respective adapters to run corresponding scans. Documentation - https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_synopsys-security-scan-for-azure-devops.html diff --git a/synopsys-task/dist/index.js b/synopsys-task/dist/index.js index 2583072a..a2dfcad2 100644 --- a/synopsys-task/dist/index.js +++ b/synopsys-task/dist/index.js @@ -6,6 +6,7 @@ require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap "use strict"; +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -41,7 +42,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getStatusFromError = exports.getExitMessage = exports.run = void 0; const utility_1 = __nccwpck_require__(837); -const synopsys_bridge_1 = __nccwpck_require__(403); +const bridge_1 = __nccwpck_require__(4942); const taskLib = __importStar(__nccwpck_require__(347)); const task_1 = __nccwpck_require__(347); const constants = __importStar(__nccwpck_require__(3051)); @@ -51,27 +52,27 @@ const diagnostics_1 = __nccwpck_require__(2926); const ErrorCodes_1 = __nccwpck_require__(4487); function run() { return __awaiter(this, void 0, void 0, function* () { - console.log("Synopsys Task started..."); + console.log("Black Duck Security Scan Task started..."); const tempDir = (0, utility_1.getTempDir)(); taskLib.debug(`tempDir: ${tempDir}`); const workSpaceDir = (0, utility_1.getWorkSpaceDirectory)(); taskLib.debug(`workSpaceDir: ${workSpaceDir}`); let azurePrResponse; try { - const sb = new synopsys_bridge_1.SynopsysBridge(); + const bridge = new bridge_1.Bridge(); (0, input_1.showLogForDeprecatedInputs)(); // Prepare tool commands - const command = yield sb.prepareCommand(tempDir); + const command = yield bridge.prepareCommand(tempDir); let bridgePath = ""; if (!inputs.ENABLE_NETWORK_AIRGAP) { - bridgePath = yield sb.downloadAndExtractBridge(tempDir); + bridgePath = yield bridge.downloadAndExtractBridge(tempDir); } else { - console.log("Network air gap is enabled, skipping synopsys-bridge download."); - bridgePath = yield sb.getSynopsysBridgePath(); + console.log("Network air gap is enabled, skipping Bridge CLI download."); + bridgePath = yield bridge.getBridgePath(); } // Execute prepared commands - const result = yield sb.executeBridgeCommand(bridgePath, (0, utility_1.getWorkSpaceDirectory)(), command); + const result = yield bridge.executeBridgeCommand(bridgePath, (0, utility_1.getWorkSpaceDirectory)(), command); // The statement set the exit code in the 'status' variable which can be used in the YAML file if ((0, utility_1.parseToBoolean)(inputs.RETURN_STATUS)) { console.log(`##vso[task.setvariable variable=status;isoutput=true]${result}`); @@ -81,10 +82,10 @@ function run() { throw error; } finally { - if ((0, utility_1.parseToBoolean)(inputs.BLACKDUCK_REPORTS_SARIF_CREATE)) { + if ((0, utility_1.parseToBoolean)(inputs.BLACKDUCK_SCA_REPORTS_SARIF_CREATE)) { if (!utility_1.IS_PR_EVENT) { - console.log("BLACKDUCK_REPORTS_SARIF_CREATE is enabled"); - (0, diagnostics_1.uploadSarifResultAsArtifact)(constants.DEFAULT_BLACKDUCK_SARIF_GENERATOR_DIRECTORY, inputs.BLACKDUCK_REPORTS_SARIF_FILE_PATH); + console.log("BLACKDUCK_SCA_REPORTS_SARIF_CREATE is enabled"); + (0, diagnostics_1.uploadSarifResultAsArtifact)(constants.DEFAULT_BLACKDUCK_SARIF_GENERATOR_DIRECTORY, inputs.BLACKDUCK_SCA_REPORTS_SARIF_FILE_PATH); } } if ((0, utility_1.parseToBoolean)(inputs.POLARIS_REPORTS_SARIF_CREATE)) { @@ -97,7 +98,7 @@ function run() { (0, diagnostics_1.uploadDiagnostics)(workSpaceDir); } } - console.log("Synopsys Task workflow execution completed"); + console.log("Black Duck Security Scan completed"); }); } exports.run = run; @@ -159,113 +160,58 @@ run().catch((error) => { "use strict"; +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BRIDGE_POLARIS_REPORTS_SARIF_SEVERITIES_KEY = exports.POLARIS_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_FILE_PATH_KEY = exports.BRIDGE_POLARIS_REPORTS_SARIF_FILE_PATH_KEY = exports.POLARIS_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_CREATE_KEY = exports.BRIDGE_POLARIS_REPORTS_SARIF_CREATE_KEY = exports.POLARIS_PR_COMMENT_SEVERITIES_KEY_CLASSIC_EDITOR = exports.POLARIS_PR_COMMENT_SEVERITIES_KEY = exports.BRIDGE_POLARIS_PR_COMMENT_SEVERITIES_KEY = exports.POLARIS_PR_COMMENT_ENABLED_KEY_CLASSIC_EDITOR = exports.POLARIS_PR_COMMENT_ENABLED_KEY = exports.BRIDGE_POLARIS_PR_COMMENT_ENABLED_KEY = exports.POLARIS_BRANCH_PARENT_NAME_KEY_CLASSIC_EDITOR = exports.POLARIS_BRANCH_PARENT_NAME_KEY = exports.POLARIS_BRANCH_NAME_KEY_CLASSIC_EDITOR = exports.POLARIS_BRANCH_NAME_KEY = exports.BRIDGE_POLARIS_BRANCH_NAME_KEY = exports.POLARIS_TRIAGE_KEY_CLASSIC_EDITOR = exports.POLARIS_TRIAGE_KEY = exports.BRIDGE_POLARIS_TRIAGE_KEY = exports.POLARIS_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR = exports.POLARIS_ASSESSMENT_TYPES_KEY = exports.BRIDGE_POLARIS_ASSESSMENT_TYPES_KEY = exports.POLARIS_PROJECT_NAME_KEY_CLASSIC_EDITOR = exports.POLARIS_PROJECT_NAME_KEY = exports.BRIDGE_POLARIS_PROJECT_NAME_KEY = exports.POLARIS_APPLICATION_NAME_KEY_CLASSIC_EDITOR = exports.POLARIS_APPLICATION_NAME_KEY = exports.BRIDGE_POLARIS_APPLICATION_NAME_KEY = exports.POLARIS_ACCESS_TOKEN_KEY_CLASSIC_EDITOR = exports.POLARIS_ACCESS_TOKEN_KEY = exports.BRIDGE_POLARIS_ACCESS_TOKEN_KEY = exports.POLARIS_SERVER_URL_KEY_CLASSIC_EDITOR = exports.POLARIS_SERVER_URL_KEY = exports.BRIDGE_POLARIS_SERVER_URL_KEY = exports.SCAN_TYPE_KEY = exports.AZURE_TOKEN_KEY_CLASSIC_EDITOR = exports.AZURE_TOKEN_KEY = exports.SRM_KEY = exports.BLACKDUCK_KEY = exports.COVERITY_KEY = exports.POLARIS_KEY = exports.APPLICATION_NAME = exports.SYNOPSYS_BRIDGE_ZIP_FILE_NAME = exports.SYNOPSYS_BRIDGE_EXECUTABLE_MAC_LINUX = exports.SYNOPSYS_BRIDGE_EXECUTABLE_WINDOWS = exports.SYNOPSYS_BRIDGE_DEFAULT_PATH_LINUX = exports.SYNOPSYS_BRIDGE_DEFAULT_PATH_WINDOWS = exports.SYNOPSYS_BRIDGE_DEFAULT_PATH_MAC = void 0; -exports.BRIDGE_COVERITY_VERSION_KEY = exports.COVERITY_LOCAL_KEY_CLASSIC_EDITOR = exports.COVERITY_LOCAL_KEY = exports.BRIDGE_COVERITY_LOCAL_KEY = exports.COVERITY_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = exports.COVERITY_PRCOMMENT_ENABLED_KEY = exports.COVERITY_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = exports.BRIDGE_COVERITY_AUTOMATION_PRCOMMENT_KEY = exports.COVERITY_POLICY_VIEW_KEY_CLASSIC_EDITOR = exports.COVERITY_POLICY_VIEW_KEY = exports.BRIDGE_COVERITY_POLICY_VIEW_KEY = exports.COVERITY_EXECUTION_PATH_KEY_CLASSIC_EDITOR = exports.COVERITY_EXECUTION_PATH_KEY = exports.COVERITY_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = exports.COVERITY_INSTALL_DIRECTORY_KEY = exports.BRIDGE_COVERITY_INSTALL_DIRECTORY_KEY = exports.COVERITY_STREAM_NAME_KEY_CLASSIC_EDITOR = exports.COVERITY_STREAM_NAME_KEY = exports.BRIDGE_COVERITY_STREAM_NAME_KEY = exports.COVERITY_PROJECT_NAME_KEY_CLASSIC_EDITOR = exports.COVERITY_PROJECT_NAME_KEY = exports.BRIDGE_COVERITY_PROJECT_NAME_KEY = exports.COVERITY_PASSPHRASE_KEY_CLASSIC_EDITOR = exports.COVERITY_PASSPHRASE_KEY = exports.BRIDGE_COVERITY_USER_PASSWORD_KEY = exports.COVERITY_USER_KEY_CLASSIC_EDITOR = exports.COVERITY_USER_KEY = exports.BRIDGE_COVERITY_USER_NAME_KEY = exports.COVERITY_URL_KEY_CLASSIC_EDITOR = exports.COVERITY_URL_KEY = exports.BRIDGE_COVERITY_URL_KEY = exports.PROJECT_SOURCE_EXCLUDES_KEY_CLASSIC_EDITOR = exports.PROJECT_SOURCE_EXCLUDES_KEY = exports.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY_CLASSIC_EDITOR = exports.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY = exports.PROJECT_SOURCE_ARCHIVE_KEY_CLASSIC_EDITOR = exports.PROJECT_SOURCE_ARCHIVE_KEY = exports.POLARIS_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = exports.POLARIS_TEST_SCA_TYPE_KEY_CLASSIC_EDITOR = exports.POLARIS_TEST_SCA_TYPE_KEY = exports.POLARIS_ASSESSMENT_MODE_KEY_CLASSIC_EDITOR = exports.POLARIS_ASSESSMENT_MODE_KEY = exports.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY = exports.BRIDGE_POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY = exports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = exports.BRIDGE_POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = exports.POLARIS_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_SEVERITIES_KEY = void 0; -exports.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY = exports.BRIDGE_BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY = exports.BLACKDUCK_FIXPR_MAXCOUNT_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_FIXPR_MAXCOUNT_KEY = exports.BRIDGE_BLACKDUCK_FIXPR_MAXCOUNT_KEY = exports.BLACKDUCK_FIXPR_ENABLED_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_FIXPR_ENABLED_KEY = exports.BRIDGE_BLACKDUCK_FIXPR_ENABLED_KEY = exports.BLACKDUCK_AUTOMATION_FIXPR_KEY = exports.BLACKDUCK_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_PRCOMMENT_ENABLED_KEY = exports.BRIDGE_BLACKDUCK_AUTOMATION_PRCOMMENT_KEY = exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY = exports.BRIDGE_BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY = exports.BLACKDUCK_SCAN_FULL_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCAN_FULL_KEY = exports.BRIDGE_BLACKDUCK_SCAN_FULL_KEY = exports.BLACKDUCK_EXECUTION_PATH_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_EXECUTION_PATH_KEY = exports.BLACKDUCK_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_INSTALL_DIRECTORY_KEY = exports.BRIDGE_BLACKDUCK_INSTALL_DIRECTORY_KEY = exports.BLACKDUCK_TOKEN_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_TOKEN_KEY = exports.BRIDGE_BLACKDUCK_API_TOKEN_KEY = exports.BLACKDUCK_URL_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_URL_KEY = exports.BRIDGE_BLACKDUCK_URL_KEY = exports.SPACE = exports.EXIT_CODE_MAP = exports.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM = exports.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.COVERITY_ARGS_KEY_CLASSIC_EDITOR = exports.COVERITY_ARGS_KEY = exports.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM = exports.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR = exports.COVERITY_CONFIG_PATH_KEY = exports.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM = exports.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR = exports.COVERITY_CLEAN_COMMAND_KEY = exports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM = exports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR = exports.COVERITY_BUILD_COMMAND_KEY = exports.COVERITY_VERSION_KEY_CLASSIC_EDITOR = exports.COVERITY_VERSION_KEY = void 0; -exports.NETWORK_AIRGAP_KEY = exports.BRIDGE_NETWORK_AIRGAP_KEY = exports.INCLUDE_DIAGNOSTICS_KEY_CLASSIC_EDITOR = exports.INCLUDE_DIAGNOSTICS_KEY = exports.SRM_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = exports.SRM_BRANCH_PARENT_KEY_CLASSIC_EDITOR = exports.SRM_BRANCH_PARENT_KEY = exports.SRM_BRANCH_NAME_KEY_CLASSIC_EDITOR = exports.SRM_BRANCH_NAME_KEY = exports.SRM_PROJECT_ID_KEY_CLASSIC_EDITOR = exports.SRM_PROJECT_ID_KEY = exports.SRM_PROJECT_NAME_KEY_CLASSIC_EDITOR = exports.SRM_PROJECT_NAME_KEY = exports.SRM_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR = exports.SRM_ASSESSMENT_TYPES_KEY = exports.SRM_APIKEY_KEY_CLASSIC_EDITOR = exports.SRM_APIKEY_KEY = exports.SRM_URL_KEY_CLASSIC_EDITOR = exports.SRM_URL_KEY = exports.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM = exports.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_ARGS_KEY = exports.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM = exports.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_CONFIG_PATH_KEY = exports.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR_FOR_SRM = exports.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SEARCH_DEPTH_KEY = exports.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = exports.BRIDGE_BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES = exports.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY = exports.BRIDGE_BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY = exports.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY = exports.BRIDGE_BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY = exports.BLACKDUCK_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_REPORTS_SARIF_CREATE_KEY = exports.BRIDGE_BLACKDUCK_REPORTS_SARIF_CREATE_KEY = exports.BLACKDUCK_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY = exports.BRIDGE_BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY = exports.BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY = exports.BRIDGE_BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY = void 0; -exports.SYNOPSYS_SECURITY_SCAN_AZURE_DEVOPS_DOCS_URL = exports.DEFAULT_AZURE_API_URL = exports.MIN_SUPPORTED_SYNOPSYS_BRIDGE_MAC_ARM_VERSION = exports.MAC_INTEL_PLATFORM = exports.MAC_ARM_PLATFORM = exports.LINUX_PLATFORM = exports.WINDOWS_PLATFORM = exports.NON_RETRY_HTTP_CODES = exports.RETRY_COUNT = exports.RETRY_DELAY_IN_MILLISECONDS = exports.SARIF_UPLOAD_FOLDER_ARTIFACT_NAME = exports.DEFAULT_POLARIS_SARIF_GENERATOR_DIRECTORY = exports.DEFAULT_BLACKDUCK_SARIF_GENERATOR_DIRECTORY = exports.SARIF_DEFAULT_FILE_NAME = exports.BRIDGE_LOCAL_DIRECTORY = exports.UPLOAD_FOLDER_ARTIFACT_NAME = exports.PROJECT_DIRECTORY_KEY = exports.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = exports.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY = exports.MARK_BUILD_STATUS_KEY_CLASSIC_EDITOR = exports.MARK_BUILD_STATUS_KEY = exports.RETURN_STATUS_KEY = exports.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY_CLASSIC_EDITOR = exports.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY = exports.BRIDGE_DOWNLOAD_VERSION_KEY = exports.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY_CLASSIC_EDITOR = exports.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY = exports.BRIDGE_DOWNLOAD_URL_KEY = exports.NETWORK_AIRGAP_KEY_CLASSIC_EDITOR = void 0; +exports.PROJECT_SOURCE_ARCHIVE_KEY = exports.POLARIS_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = exports.POLARIS_TEST_SCA_TYPE_KEY_CLASSIC_EDITOR = exports.POLARIS_TEST_SCA_TYPE_KEY = exports.POLARIS_ASSESSMENT_MODE_KEY_CLASSIC_EDITOR = exports.POLARIS_ASSESSMENT_MODE_KEY = exports.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY = exports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = exports.POLARIS_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_SEVERITIES_KEY = exports.POLARIS_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_FILE_PATH_KEY = exports.POLARIS_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_CREATE_KEY = exports.POLARIS_PR_COMMENT_SEVERITIES_KEY_CLASSIC_EDITOR = exports.POLARIS_PR_COMMENT_SEVERITIES_KEY = exports.POLARIS_PR_COMMENT_ENABLED_KEY_CLASSIC_EDITOR = exports.POLARIS_PR_COMMENT_ENABLED_KEY = exports.POLARIS_BRANCH_PARENT_NAME_KEY_CLASSIC_EDITOR = exports.POLARIS_BRANCH_PARENT_NAME_KEY = exports.POLARIS_BRANCH_NAME_KEY_CLASSIC_EDITOR = exports.POLARIS_BRANCH_NAME_KEY = exports.POLARIS_TRIAGE_KEY_CLASSIC_EDITOR = exports.POLARIS_TRIAGE_KEY = exports.POLARIS_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR = exports.POLARIS_ASSESSMENT_TYPES_KEY = exports.POLARIS_PROJECT_NAME_KEY_CLASSIC_EDITOR = exports.POLARIS_PROJECT_NAME_KEY = exports.POLARIS_APPLICATION_NAME_KEY_CLASSIC_EDITOR = exports.POLARIS_APPLICATION_NAME_KEY = exports.POLARIS_ACCESS_TOKEN_KEY_CLASSIC_EDITOR = exports.POLARIS_ACCESS_TOKEN_KEY = exports.POLARIS_SERVER_URL_KEY_CLASSIC_EDITOR = exports.POLARIS_SERVER_URL_KEY = exports.SCAN_TYPE_KEY = exports.AZURE_TOKEN_KEY_CLASSIC_EDITOR = exports.AZURE_TOKEN_KEY = exports.SRM_KEY = exports.BLACKDUCK_KEY = exports.COVERITY_KEY = exports.POLARIS_KEY = exports.APPLICATION_NAME = exports.BRIDGE_CLI_ZIP_FILE_NAME = exports.BRIDGE_CLI_EXECUTABLE_MAC_LINUX = exports.BRIDGE_CLI_EXECUTABLE_WINDOWS = exports.BRIDGE_CLI_DEFAULT_PATH_LINUX = exports.BRIDGE_CLI_DEFAULT_PATH_WINDOWS = exports.BRIDGE_CLI_DEFAULT_PATH_MAC = void 0; +exports.BLACKDUCK_TOKEN_KEY = exports.BLACKDUCK_SCA_URL_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_URL_KEY = exports.BLACKDUCK_URL_KEY = exports.SPACE = exports.EXIT_CODE_MAP = exports.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM = exports.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.COVERITY_ARGS_KEY_CLASSIC_EDITOR = exports.COVERITY_ARGS_KEY = exports.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM = exports.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR = exports.COVERITY_CONFIG_PATH_KEY = exports.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM = exports.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR = exports.COVERITY_CLEAN_COMMAND_KEY = exports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM = exports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR = exports.COVERITY_BUILD_COMMAND_KEY = exports.COVERITY_VERSION_KEY_CLASSIC_EDITOR = exports.COVERITY_VERSION_KEY = exports.COVERITY_LOCAL_KEY_CLASSIC_EDITOR = exports.COVERITY_LOCAL_KEY = exports.COVERITY_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = exports.COVERITY_PRCOMMENT_ENABLED_KEY = exports.COVERITY_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = exports.COVERITY_POLICY_VIEW_KEY_CLASSIC_EDITOR = exports.COVERITY_POLICY_VIEW_KEY = exports.COVERITY_EXECUTION_PATH_KEY_CLASSIC_EDITOR = exports.COVERITY_EXECUTION_PATH_KEY = exports.COVERITY_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = exports.COVERITY_INSTALL_DIRECTORY_KEY = exports.COVERITY_STREAM_NAME_KEY_CLASSIC_EDITOR = exports.COVERITY_STREAM_NAME_KEY = exports.COVERITY_PROJECT_NAME_KEY_CLASSIC_EDITOR = exports.COVERITY_PROJECT_NAME_KEY = exports.COVERITY_PASSPHRASE_KEY_CLASSIC_EDITOR = exports.COVERITY_PASSPHRASE_KEY = exports.COVERITY_USER_KEY_CLASSIC_EDITOR = exports.COVERITY_USER_KEY = exports.COVERITY_URL_KEY_CLASSIC_EDITOR = exports.COVERITY_URL_KEY = exports.PROJECT_SOURCE_EXCLUDES_KEY_CLASSIC_EDITOR = exports.PROJECT_SOURCE_EXCLUDES_KEY = exports.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY_CLASSIC_EDITOR = exports.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY = exports.PROJECT_SOURCE_ARCHIVE_KEY_CLASSIC_EDITOR = void 0; +exports.DETECT_DEPTH_KEY_CLASSIC_EDITOR_FOR_SRM = exports.DETECT_DEPTH_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.DETECT_DEPTH_KEY_CLASSIC_EDITOR = exports.DETECT_SEARCH_DEPTH_KEY = exports.BLACKDUCK_SEARCH_DEPTH_KEY = exports.BLACKDUCK_SCA_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = exports.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = exports.BLACKDUCK_SCA_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_REPORTS_SARIF_SEVERITIES_KEY = exports.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY = exports.BLACKDUCK_SCA_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_REPORTS_SARIF_FILE_PATH_KEY = exports.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY = exports.BLACKDUCK_SCA_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_REPORTS_SARIF_CREATE_KEY = exports.BLACKDUCK_REPORTS_SARIF_CREATE_KEY = exports.BLACKDUCK_SCA_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_FIX_PR_UPGRADE_GUIDANCE_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_FIX_PR_UPGRADE_GUIDANCE_KEY = exports.BLACKDUCK_FIX_PR_UPGRADE_GUIDANCE_KEY = exports.BLACKDUCK_SCA_FIX_PR_FILTER_SEVERITIES_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_FIX_PR_FILTER_SEVERITIES_KEY = exports.BLACKDUCK_FIX_PR_FILTER_SEVERITIES_KEY = exports.BLACKDUCK_SCA_FIX_PR_CREATE_SINGLE_PR_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_FIX_PR_CREATE_SINGLE_PR_KEY = exports.BLACKDUCK_FIX_PR_CREATE_SINGLE_PR_KEY = exports.BLACKDUCK_SCA_FIX_PR_MAX_COUNT_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_FIX_PR_MAX_COUNT_KEY = exports.BLACKDUCK_FIX_PR_MAX_COUNT_KEY = exports.BLACKDUCK_SCA_FIX_PR_ENABLED_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_FIX_PR_ENABLED_KEY = exports.BLACKDUCK_FIX_PR_ENABLED_KEY = exports.BLACKDUCK_SCA_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_PRCOMMENT_ENABLED_KEY = exports.BLACKDUCK_PRCOMMENT_ENABLED_KEY = exports.BLACKDUCK_SCA_SCAN_FAILURE_SEVERITIES_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_SCAN_FAILURE_SEVERITIES_KEY = exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY = exports.DETECT_SCAN_FULL_KEY_CLASSIC_EDITOR = exports.DETECT_SCAN_FULL_KEY = exports.BLACKDUCK_SCAN_FULL_KEY = exports.DETECT_EXECUTION_PATH_KEY_CLASSIC_EDITOR = exports.DETECT_EXECUTION_PATH_KEY = exports.BLACKDUCK_EXECUTION_PATH_KEY = exports.DETECT_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = exports.DETECT_INSTALL_DIRECTORY_KEY = exports.BLACKDUCK_INSTALL_DIRECTORY_KEY = exports.BLACKDUCK_SCA_TOKEN_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCA_TOKEN_KEY = void 0; +exports.RETRY_DELAY_IN_MILLISECONDS = exports.SARIF_UPLOAD_FOLDER_ARTIFACT_NAME = exports.DEFAULT_POLARIS_SARIF_GENERATOR_DIRECTORY = exports.DEFAULT_BLACKDUCK_SARIF_GENERATOR_DIRECTORY = exports.SARIF_DEFAULT_FILE_NAME = exports.BRIDGE_LOCAL_DIRECTORY = exports.UPLOAD_FOLDER_ARTIFACT_NAME = exports.PROJECT_DIRECTORY_KEY = exports.BRIDGE_CLI_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = exports.BRIDGE_CLI_INSTALL_DIRECTORY_KEY = exports.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY = exports.MARK_BUILD_STATUS_KEY_CLASSIC_EDITOR = exports.MARK_BUILD_STATUS_KEY = exports.RETURN_STATUS_KEY = exports.BRIDGE_CLI_DOWNLOAD_VERSION_KEY_CLASSIC_EDITOR = exports.BRIDGE_CLI_DOWNLOAD_VERSION_KEY = exports.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY = exports.BRIDGE_CLI_DOWNLOAD_URL_KEY_CLASSIC_EDITOR = exports.BRIDGE_CLI_DOWNLOAD_URL_KEY = exports.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY = exports.NETWORK_AIRGAP_KEY_CLASSIC_EDITOR = exports.NETWORK_AIRGAP_KEY = exports.BRIDGE_NETWORK_AIRGAP_KEY = exports.INCLUDE_DIAGNOSTICS_KEY_CLASSIC_EDITOR = exports.INCLUDE_DIAGNOSTICS_KEY = exports.SRM_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = exports.SRM_BRANCH_PARENT_KEY_CLASSIC_EDITOR = exports.SRM_BRANCH_PARENT_KEY = exports.SRM_BRANCH_NAME_KEY_CLASSIC_EDITOR = exports.SRM_BRANCH_NAME_KEY = exports.SRM_PROJECT_ID_KEY_CLASSIC_EDITOR = exports.SRM_PROJECT_ID_KEY = exports.SRM_PROJECT_NAME_KEY_CLASSIC_EDITOR = exports.SRM_PROJECT_NAME_KEY = exports.SRM_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR = exports.SRM_ASSESSMENT_TYPES_KEY = exports.SRM_APIKEY_KEY_CLASSIC_EDITOR = exports.SRM_APIKEY_KEY = exports.SRM_URL_KEY_CLASSIC_EDITOR = exports.SRM_URL_KEY = exports.DETECT_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM = exports.DETECT_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.DETECT_ARGS_KEY_CLASSIC_EDITOR = exports.DETECT_ARGS_KEY = exports.BLACKDUCK_ARGS_KEY = exports.DETECT_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM = exports.DETECT_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.DETECT_CONFIG_PATH_KEY_CLASSIC_EDITOR = exports.DETECT_CONFIG_PATH_KEY = exports.BLACKDUCK_CONFIG_PATH_KEY = void 0; +exports.BLACKDUCK_SECURITY_SCAN_AZURE_DEVOPS_DOCS_URL = exports.DEFAULT_AZURE_API_URL = exports.MIN_SUPPORTED_BRIDGE_CLI_MAC_ARM_VERSION = exports.MAC_INTEL_PLATFORM = exports.MAC_ARM_PLATFORM = exports.LINUX_PLATFORM = exports.WINDOWS_PLATFORM = exports.NON_RETRY_HTTP_CODES = exports.RETRY_COUNT = void 0; const ErrorCodes_1 = __nccwpck_require__(4487); -exports.SYNOPSYS_BRIDGE_DEFAULT_PATH_MAC = "/synopsys-bridge"; //Path will be in home -exports.SYNOPSYS_BRIDGE_DEFAULT_PATH_WINDOWS = "\\synopsys-bridge"; -exports.SYNOPSYS_BRIDGE_DEFAULT_PATH_LINUX = "/synopsys-bridge"; -exports.SYNOPSYS_BRIDGE_EXECUTABLE_WINDOWS = "synopsys-bridge.exe"; -exports.SYNOPSYS_BRIDGE_EXECUTABLE_MAC_LINUX = "synopsys-bridge"; -exports.SYNOPSYS_BRIDGE_ZIP_FILE_NAME = "synopsys-bridge.zip"; -exports.APPLICATION_NAME = "synopsys-extension"; +exports.BRIDGE_CLI_DEFAULT_PATH_MAC = "/bridge-cli"; //Path will be in home +exports.BRIDGE_CLI_DEFAULT_PATH_WINDOWS = "\\bridge-cli"; +exports.BRIDGE_CLI_DEFAULT_PATH_LINUX = "/bridge-cli"; +exports.BRIDGE_CLI_EXECUTABLE_WINDOWS = "bridge-cli.exe"; +exports.BRIDGE_CLI_EXECUTABLE_MAC_LINUX = "bridge-cli"; +exports.BRIDGE_CLI_ZIP_FILE_NAME = "bridge-cli.zip"; +exports.APPLICATION_NAME = "blackduck-extension"; // Scan Types exports.POLARIS_KEY = "polaris"; exports.COVERITY_KEY = "coverity"; exports.BLACKDUCK_KEY = "blackduck"; exports.SRM_KEY = "srm"; exports.AZURE_TOKEN_KEY = "azure_token"; -exports.AZURE_TOKEN_KEY_CLASSIC_EDITOR = "azure_token"; +exports.AZURE_TOKEN_KEY_CLASSIC_EDITOR = "azureToken"; exports.SCAN_TYPE_KEY = "scanType"; // Polaris -/** - * @deprecated Use polaris_server_url instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_SERVER_URL_KEY = "bridge_polaris_serverUrl"; exports.POLARIS_SERVER_URL_KEY = "polaris_server_url"; -exports.POLARIS_SERVER_URL_KEY_CLASSIC_EDITOR = "bridge_polaris_serverUrl"; -/** - * @deprecated Use polaris_access_token instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_ACCESS_TOKEN_KEY = "bridge_polaris_accessToken"; +exports.POLARIS_SERVER_URL_KEY_CLASSIC_EDITOR = "polarisServerUrl"; exports.POLARIS_ACCESS_TOKEN_KEY = "polaris_access_token"; -exports.POLARIS_ACCESS_TOKEN_KEY_CLASSIC_EDITOR = "bridge_polaris_accessToken"; -/** - * @deprecated Use polaris_application_name instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_APPLICATION_NAME_KEY = "bridge_polaris_application_name"; +exports.POLARIS_ACCESS_TOKEN_KEY_CLASSIC_EDITOR = "polarisAccessToken"; exports.POLARIS_APPLICATION_NAME_KEY = "polaris_application_name"; -exports.POLARIS_APPLICATION_NAME_KEY_CLASSIC_EDITOR = "bridge_polaris_application_name"; -/** - * @deprecated Use polaris_project_name instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_PROJECT_NAME_KEY = "bridge_polaris_project_name"; +exports.POLARIS_APPLICATION_NAME_KEY_CLASSIC_EDITOR = "polarisApplicationName"; exports.POLARIS_PROJECT_NAME_KEY = "polaris_project_name"; -exports.POLARIS_PROJECT_NAME_KEY_CLASSIC_EDITOR = "bridge_polaris_project_name"; -/** - * @deprecated Use polaris_assessment_types instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_ASSESSMENT_TYPES_KEY = "bridge_polaris_assessment_types"; +exports.POLARIS_PROJECT_NAME_KEY_CLASSIC_EDITOR = "polarisProjectName"; exports.POLARIS_ASSESSMENT_TYPES_KEY = "polaris_assessment_types"; -exports.POLARIS_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR = "bridge_polaris_assessment_types"; -/** - * @deprecated Use polaris_triage instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_TRIAGE_KEY = "bridge_polaris_triage"; +exports.POLARIS_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR = "polarisAssessmentTypes"; exports.POLARIS_TRIAGE_KEY = "polaris_triage"; -exports.POLARIS_TRIAGE_KEY_CLASSIC_EDITOR = "bridge_polaris_triage"; -/** - * @deprecated Use polaris_branch_name instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_BRANCH_NAME_KEY = "bridge_polaris_branch_name"; +exports.POLARIS_TRIAGE_KEY_CLASSIC_EDITOR = "polarisTriage"; exports.POLARIS_BRANCH_NAME_KEY = "polaris_branch_name"; -exports.POLARIS_BRANCH_NAME_KEY_CLASSIC_EDITOR = "bridge_polaris_branch_name"; +exports.POLARIS_BRANCH_NAME_KEY_CLASSIC_EDITOR = "polarisBranchName"; exports.POLARIS_BRANCH_PARENT_NAME_KEY = "polaris_branch_parent_name"; exports.POLARIS_BRANCH_PARENT_NAME_KEY_CLASSIC_EDITOR = "polarisBranchParentName"; -/** - * @deprecated Use polaris_prComment_enabled instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_PR_COMMENT_ENABLED_KEY = "bridge_polaris_prcomment_enabled"; exports.POLARIS_PR_COMMENT_ENABLED_KEY = "polaris_prComment_enabled"; -exports.POLARIS_PR_COMMENT_ENABLED_KEY_CLASSIC_EDITOR = "polarisPRCommentEnabled"; -/** - * @deprecated Use polaris_prComment_severities instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_PR_COMMENT_SEVERITIES_KEY = "bridge_polaris_prcomment_severities"; +exports.POLARIS_PR_COMMENT_ENABLED_KEY_CLASSIC_EDITOR = "polarisPrCommentEnabled"; exports.POLARIS_PR_COMMENT_SEVERITIES_KEY = "polaris_prComment_severities"; -exports.POLARIS_PR_COMMENT_SEVERITIES_KEY_CLASSIC_EDITOR = "polarisPRCommentSeverities"; -/** - * @deprecated Use polaris_reports_sarif_create instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_REPORTS_SARIF_CREATE_KEY = "bridge_polaris_reports_sarif_create"; +exports.POLARIS_PR_COMMENT_SEVERITIES_KEY_CLASSIC_EDITOR = "polarisPrCommentSeverities"; exports.POLARIS_REPORTS_SARIF_CREATE_KEY = "polaris_reports_sarif_create"; exports.POLARIS_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR = "polarisReportsSarifCreate"; -/** - * @deprecated Use polaris_reports_sarif_file_path instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_REPORTS_SARIF_FILE_PATH_KEY = "bridge_polaris_reports_sarif_file_path"; exports.POLARIS_REPORTS_SARIF_FILE_PATH_KEY = "polaris_reports_sarif_file_path"; exports.POLARIS_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR = "polarisReportsSarifFilePath"; -/** - * @deprecated Use polaris_reports_sarif_severities instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_REPORTS_SARIF_SEVERITIES_KEY = "bridge_polaris_reports_sarif_severities"; exports.POLARIS_REPORTS_SARIF_SEVERITIES_KEY = "polaris_reports_sarif_severities"; exports.POLARIS_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR = "polarisReportsSarifSeverities"; -/** - * @deprecated Use polaris_reports_sarif_groupSCAIssues instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = "bridge_polaris_reports_sarif_groupSCAIssues"; exports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = "polaris_reports_sarif_groupSCAIssues"; exports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR = "polarisReportsSarifGroupSCAIssues"; -/** - * @deprecated Use polaris_reports_sarif_issue_types instead. This can be removed in future release. - */ -exports.BRIDGE_POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY = "bridge_polaris_reports_sarif_issue_types"; exports.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY = "polaris_reports_sarif_issue_types"; exports.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY_CLASSIC_EDITOR = "polarisReportsSarifIssueTypes"; exports.POLARIS_ASSESSMENT_MODE_KEY = "polaris_assessment_mode"; @@ -280,69 +226,29 @@ exports.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY_CLASSIC_EDITOR = "projectSourcePre exports.PROJECT_SOURCE_EXCLUDES_KEY = "project_source_excludes"; exports.PROJECT_SOURCE_EXCLUDES_KEY_CLASSIC_EDITOR = "projectSourceExcludes"; // Coverity -/** - * @deprecated Use coverity_url instead. This can be removed in future release. - */ -exports.BRIDGE_COVERITY_URL_KEY = "bridge_coverity_connect_url"; exports.COVERITY_URL_KEY = "coverity_url"; -exports.COVERITY_URL_KEY_CLASSIC_EDITOR = "bridge_coverity_connect_url"; -/** - * @deprecated Use coverity_user instead. This can be removed in future release. - */ -exports.BRIDGE_COVERITY_USER_NAME_KEY = "bridge_coverity_connect_user_name"; +exports.COVERITY_URL_KEY_CLASSIC_EDITOR = "coverityUrl"; exports.COVERITY_USER_KEY = "coverity_user"; -exports.COVERITY_USER_KEY_CLASSIC_EDITOR = "bridge_coverity_connect_user_name"; -/** - * @deprecated Use coverity_passphrase instead. This can be removed in future release. - */ -exports.BRIDGE_COVERITY_USER_PASSWORD_KEY = "bridge_coverity_connect_user_password"; +exports.COVERITY_USER_KEY_CLASSIC_EDITOR = "coverityUser"; exports.COVERITY_PASSPHRASE_KEY = "coverity_passphrase"; -exports.COVERITY_PASSPHRASE_KEY_CLASSIC_EDITOR = "bridge_coverity_connect_user_password"; -/** - * @deprecated Use coverity_project_name instead. This can be removed in future release. - */ -exports.BRIDGE_COVERITY_PROJECT_NAME_KEY = "bridge_coverity_connect_project_name"; +exports.COVERITY_PASSPHRASE_KEY_CLASSIC_EDITOR = "coverityUserPassword"; exports.COVERITY_PROJECT_NAME_KEY = "coverity_project_name"; -exports.COVERITY_PROJECT_NAME_KEY_CLASSIC_EDITOR = "bridge_coverity_connect_project_name"; -/** - * @deprecated Use coverity_stream_name instead. This can be removed in future release. - */ -exports.BRIDGE_COVERITY_STREAM_NAME_KEY = "bridge_coverity_connect_stream_name"; +exports.COVERITY_PROJECT_NAME_KEY_CLASSIC_EDITOR = "coverityProjectName"; exports.COVERITY_STREAM_NAME_KEY = "coverity_stream_name"; -exports.COVERITY_STREAM_NAME_KEY_CLASSIC_EDITOR = "bridge_coverity_connect_stream_name"; -/** - * @deprecated Use coverity_install_directory instead. This can be removed in future release. - */ -exports.BRIDGE_COVERITY_INSTALL_DIRECTORY_KEY = "bridge_coverity_install_directory"; +exports.COVERITY_STREAM_NAME_KEY_CLASSIC_EDITOR = "coverityStreamName"; exports.COVERITY_INSTALL_DIRECTORY_KEY = "coverity_install_directory"; -exports.COVERITY_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = "bridge_coverity_install_directory"; +exports.COVERITY_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = "coverityInstallDirectory"; exports.COVERITY_EXECUTION_PATH_KEY = "coverity_execution_path"; exports.COVERITY_EXECUTION_PATH_KEY_CLASSIC_EDITOR = "coverityExecutionPath"; -/** - * @deprecated Use coverity_policy_view instead. This can be removed in future release. - */ -exports.BRIDGE_COVERITY_POLICY_VIEW_KEY = "bridge_coverity_connect_policy_view"; exports.COVERITY_POLICY_VIEW_KEY = "coverity_policy_view"; -exports.COVERITY_POLICY_VIEW_KEY_CLASSIC_EDITOR = "bridge_coverity_connect_policy_view"; -/** - * @deprecated Use coverity_prComment_enabled instead. This can be removed in future release. - */ -exports.BRIDGE_COVERITY_AUTOMATION_PRCOMMENT_KEY = "bridge_coverity_automation_prcomment"; +exports.COVERITY_POLICY_VIEW_KEY_CLASSIC_EDITOR = "coverityPolicyView"; exports.COVERITY_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = "coverityProjectDirectory"; exports.COVERITY_PRCOMMENT_ENABLED_KEY = "coverity_prComment_enabled"; -exports.COVERITY_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = "bridge_coverity_automation_prcomment"; -/** - * @deprecated Use coverity_local instead. This can be removed in future release. - */ -exports.BRIDGE_COVERITY_LOCAL_KEY = "bridge_coverity_local"; +exports.COVERITY_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = "coverityAutomationPrComment"; exports.COVERITY_LOCAL_KEY = "coverity_local"; -exports.COVERITY_LOCAL_KEY_CLASSIC_EDITOR = "bridge_coverity_local"; -/** - * @deprecated Use coverity_version instead. This can be removed in future release. - */ -exports.BRIDGE_COVERITY_VERSION_KEY = "bridge_coverity_version"; +exports.COVERITY_LOCAL_KEY_CLASSIC_EDITOR = "coverityLocal"; exports.COVERITY_VERSION_KEY = "coverity_version"; -exports.COVERITY_VERSION_KEY_CLASSIC_EDITOR = "bridge_coverity_version"; +exports.COVERITY_VERSION_KEY_CLASSIC_EDITOR = "coverityVersion"; exports.COVERITY_BUILD_COMMAND_KEY = "coverity_build_command"; exports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR = "coverityBuildCommand"; exports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS = "coverityBuildCommandForPolaris"; @@ -405,7 +311,7 @@ exports.EXIT_CODE_MAP = new Map([ ], [ ErrorCodes_1.ErrorCode.INVALID_BLACKDUCK_FAILURE_SEVERITIES.toString(), - "Invalid value for blackduck_scan_failure_severities", + "Invalid value for blackducksca_scan_failure_severities", ], [ ErrorCodes_1.ErrorCode.INVALID_BLACKDUCK_FIXPR_MAXCOUNT.toString(), @@ -416,36 +322,36 @@ exports.EXIT_CODE_MAP = new Map([ "Missing boolean value for blackduck_scan_full", ], [ - ErrorCodes_1.ErrorCode.INVALID_SYNOPSYS_BRIDGE_URL.toString(), - "Provided Synopsys Bridge URL is not valid for the configured platform runner", + ErrorCodes_1.ErrorCode.INVALID_BRIDGE_CLI_URL.toString(), + "Provided Bridge CLI URL is not valid for the configured platform runner", ], [ - ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_URL_CANNOT_BE_EMPTY.toString(), - "Provided Synopsys Bridge URL cannot be empty", + ErrorCodes_1.ErrorCode.BRIDGE_CLI_URL_CANNOT_BE_EMPTY.toString(), + "Provided Bridge CLI URL cannot be empty", ], [ ErrorCodes_1.ErrorCode.INVALID_URL.toString(), "Invalid URL (Invalid Synopysys Bridge Download URL)", ], [ - ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_VERSION_NOT_FOUND.toString(), - "Provided Synopsys Bridge version not found in artifactory", + ErrorCodes_1.ErrorCode.BRIDGE_CLI_VERSION_NOT_FOUND.toString(), + "Provided Bridge CLI version not found in artifactory", ], [ - ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_DOWNLOAD_FAILED.toString(), - "Synopsys bridge download has been failed", + ErrorCodes_1.ErrorCode.BRIDGE_CLI_DOWNLOAD_FAILED.toString(), + "Bridge CLI download has been failed", ], [ ErrorCodes_1.ErrorCode.BRIDGE_INSTALL_DIRECTORY_NOT_EXIST.toString(), - "Synopsys Bridge Install Directory does not exist", + "Bridge CLI Install Directory does not exist", ], [ ErrorCodes_1.ErrorCode.DEFAULT_DIRECTORY_NOT_FOUND.toString(), - "Synopsys Bridge default directory does not exist", + "Bridge CLI default directory does not exist", ], [ ErrorCodes_1.ErrorCode.BRIDGE_EXECUTABLE_NOT_FOUND.toString(), - "Synopsys Bridge executable file could not be found at executable Bridge path", + "Bridge CLI executable file could not be found at executable Bridge path", ], [ ErrorCodes_1.ErrorCode.WORKSPACE_DIRECTORY_NOT_FOUND.toString(), @@ -453,11 +359,11 @@ exports.EXIT_CODE_MAP = new Map([ ], [ ErrorCodes_1.ErrorCode.FILE_DOES_NOT_EXIST.toString(), - "File (Synopsys Bridge zip) does not exist", + "File (Bridge CLI zip) does not exist", ], [ ErrorCodes_1.ErrorCode.NO_DESTINATION_DIRECTORY.toString(), - "No destination directory found for unzipping Synopsys Bridge", + "No destination directory found for unzipping Bridge CLI", ], [ ErrorCodes_1.ErrorCode.FAILED_TO_GET_PULL_REQUEST_INFO_FROM_SOURCE_BRANCH.toString(), @@ -477,11 +383,11 @@ exports.EXIT_CODE_MAP = new Map([ ], [ ErrorCodes_1.ErrorCode.DOWNLOAD_FAILED_WITH_HTTP_STATUS_CODE.toString(), - "Failed to download synopsys-bridge zip from specified URL. HTTP status code: ", + "Failed to download Bridge CLI zip from specified URL. HTTP status code: ", ], [ ErrorCodes_1.ErrorCode.CONTENT_LENGTH_MISMATCH.toString(), - "Content-Length of synopsys-bridge in the artifactory did not match downloaded file size", + "Content-Length of Bridge CLI in the artifactory did not match downloaded file size", ], [ ErrorCodes_1.ErrorCode.UNDEFINED_ERROR_FROM_EXTENSION.toString(), @@ -491,114 +397,126 @@ exports.EXIT_CODE_MAP = new Map([ exports.SPACE = " "; // Blackduck /** - * @deprecated Use blackduck_url instead. This can be removed in future release. + * @deprecated Use blackducksca_url instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_URL_KEY = "bridge_blackduck_url"; -exports.BLACKDUCK_URL_KEY = "blackduck_url"; -exports.BLACKDUCK_URL_KEY_CLASSIC_EDITOR = "bridge_blackduck_url"; +exports.BLACKDUCK_URL_KEY = "blackduck_url"; // old key +exports.BLACKDUCK_SCA_URL_KEY = "blackducksca_url"; // new key +exports.BLACKDUCK_SCA_URL_KEY_CLASSIC_EDITOR = "blackduckScaUrl"; // classic editor key /** - * @deprecated Use blackduck_token instead. This can be removed in future release. + * @deprecated Use BLACKDUCK_SCA_TOKEN_KEY instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_API_TOKEN_KEY = "bridge_blackduck_token"; exports.BLACKDUCK_TOKEN_KEY = "blackduck_token"; -exports.BLACKDUCK_TOKEN_KEY_CLASSIC_EDITOR = "bridge_blackduck_token"; +exports.BLACKDUCK_SCA_TOKEN_KEY = "blackducksca_token"; +exports.BLACKDUCK_SCA_TOKEN_KEY_CLASSIC_EDITOR = "blackduckScaToken"; /** - * @deprecated Use blackduck_install_directory instead. This can be removed in future release. + * @deprecated Use detect_install_directory instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_INSTALL_DIRECTORY_KEY = "bridge_blackduck_install_directory"; exports.BLACKDUCK_INSTALL_DIRECTORY_KEY = "blackduck_install_directory"; -exports.BLACKDUCK_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = "bridge_blackduck_install_directory"; +exports.DETECT_INSTALL_DIRECTORY_KEY = "detect_install_directory"; +exports.DETECT_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = "detectInstallDirectory"; +/** + * @deprecated Use detect_execution_path instead. This can be removed in future release. + */ exports.BLACKDUCK_EXECUTION_PATH_KEY = "blackduck_execution_path"; -exports.BLACKDUCK_EXECUTION_PATH_KEY_CLASSIC_EDITOR = "blackduckExecutionPath"; +exports.DETECT_EXECUTION_PATH_KEY = "detect_execution_path"; +exports.DETECT_EXECUTION_PATH_KEY_CLASSIC_EDITOR = "detectExecutionPath"; /** - * @deprecated Use blackduck_scan_full instead. This can be removed in future release. + * @deprecated Use detect_scan_full instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_SCAN_FULL_KEY = "bridge_blackduck_scan_full"; exports.BLACKDUCK_SCAN_FULL_KEY = "blackduck_scan_full"; -exports.BLACKDUCK_SCAN_FULL_KEY_CLASSIC_EDITOR = "bridge_blackduck_scan_full"; +exports.DETECT_SCAN_FULL_KEY = "detect_scan_full"; +exports.DETECT_SCAN_FULL_KEY_CLASSIC_EDITOR = "detectScanFull"; /** - * @deprecated Use blackduck_scan_failure_severities instead. This can be removed in future release. + * @deprecated Use blackducksca_scan_failure_severities instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY = "bridge_blackduck_scan_failure_severities"; exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY = "blackduck_scan_failure_severities"; -exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY_CLASSIC_EDITOR = "bridge_blackduck_scan_failure_severities"; +exports.BLACKDUCK_SCA_SCAN_FAILURE_SEVERITIES_KEY = "blackducksca_scan_failure_severities"; +exports.BLACKDUCK_SCA_SCAN_FAILURE_SEVERITIES_KEY_CLASSIC_EDITOR = "blackduckScaScaScanFailureSeverities"; /** - * @deprecated Use blackduck_prComment_enabled instead. This can be removed in future release. + * @deprecated Use blackducksca_prComment_enabled instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_AUTOMATION_PRCOMMENT_KEY = "bridge_blackduck_automation_prcomment"; exports.BLACKDUCK_PRCOMMENT_ENABLED_KEY = "blackduck_prComment_enabled"; -exports.BLACKDUCK_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = "bridge_blackduck_automation_prcomment"; -/** - * @deprecated Use blackduck_fixpr_enabled instead. This can be removed in future release. - */ -exports.BLACKDUCK_AUTOMATION_FIXPR_KEY = "bridge_blackduck_automation_fixpr"; +exports.BLACKDUCK_SCA_PRCOMMENT_ENABLED_KEY = "blackducksca_prComment_enabled"; +exports.BLACKDUCK_SCA_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = "blackduckScaAutomationPrComment"; /** - * @deprecated Use blackduck_fixpr_enabled instead. This can be removed in future release. + * @deprecated Use blackducksca_fixpr_enabled instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_FIXPR_ENABLED_KEY = "bridge_blackduck_fixpr_enabled"; -exports.BLACKDUCK_FIXPR_ENABLED_KEY = "blackduck_fixpr_enabled"; -exports.BLACKDUCK_FIXPR_ENABLED_KEY_CLASSIC_EDITOR = "bridge_blackduck_fixpr_enabled"; +exports.BLACKDUCK_FIX_PR_ENABLED_KEY = "blackduck_fixpr_enabled"; +exports.BLACKDUCK_SCA_FIX_PR_ENABLED_KEY = "blackducksca_fixpr_enabled"; +exports.BLACKDUCK_SCA_FIX_PR_ENABLED_KEY_CLASSIC_EDITOR = "blackduckScaFixPrEnabled"; /** - * @deprecated Use blackduck_fixpr_maxCount instead. This can be removed in future release. + * @deprecated Use blackducksca_fixpr_maxCount instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_FIXPR_MAXCOUNT_KEY = "bridge_blackduck_fixpr_maxCount"; -exports.BLACKDUCK_FIXPR_MAXCOUNT_KEY = "blackduck_fixpr_maxCount"; -exports.BLACKDUCK_FIXPR_MAXCOUNT_KEY_CLASSIC_EDITOR = "bridge_blackduck_fixpr_maxCount"; +exports.BLACKDUCK_FIX_PR_MAX_COUNT_KEY = "blackduck_fixpr_maxCount"; +exports.BLACKDUCK_SCA_FIX_PR_MAX_COUNT_KEY = "blackducksca_fixpr_maxCount"; +exports.BLACKDUCK_SCA_FIX_PR_MAX_COUNT_KEY_CLASSIC_EDITOR = "blackduckScaFixPrMaxCount"; /** - * @deprecated Use blackduck_fixpr_createSinglePR instead. This can be removed in future release. + * @deprecated Use blackducksca_fixpr_createSinglePR instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY = "bridge_blackduck_fixpr_createSinglePR"; -exports.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY = "blackduck_fixpr_createSinglePR"; -exports.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY_CLASSIC_EDITOR = "blackduckFixPRCreateSinglePR"; +exports.BLACKDUCK_FIX_PR_CREATE_SINGLE_PR_KEY = "blackduck_fixpr_createSinglePR"; +exports.BLACKDUCK_SCA_FIX_PR_CREATE_SINGLE_PR_KEY = "blackducksca_fixpr_createSinglePR"; +exports.BLACKDUCK_SCA_FIX_PR_CREATE_SINGLE_PR_KEY_CLASSIC_EDITOR = "blackduckScaFixPRCreateSinglePR"; /** - * @deprecated Use blackduck_fixpr_filter_severities instead. This can be removed in future release. + * @deprecated Use blackducksca_fixpr_filter_severities instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY = "bridge_blackduck_fixpr_filter_severities"; -exports.BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY = "blackduck_fixpr_filter_severities"; -exports.BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY_CLASSIC_EDITOR = "bridge_blackduck_fixpr_filter_severities"; +exports.BLACKDUCK_FIX_PR_FILTER_SEVERITIES_KEY = "blackduck_fixpr_filter_severities"; +exports.BLACKDUCK_SCA_FIX_PR_FILTER_SEVERITIES_KEY = "blackducksca_fixpr_filter_severities"; +exports.BLACKDUCK_SCA_FIX_PR_FILTER_SEVERITIES_KEY_CLASSIC_EDITOR = "blackduckScaFixPrFilterSeverities"; /** - * @deprecated Use blackduck_fixpr_useUpgradeGuidance instead. This can be removed in future release. + * @deprecated Use blackducksca_fixpr_useUpgradeGuidance instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY = "bridge_blackduck_fixpr_useUpgradeGuidance"; -exports.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY = "blackduck_fixpr_useUpgradeGuidance"; -exports.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY_CLASSIC_EDITOR = "bridge_blackduck_fixpr_useUpgradeGuidance"; -exports.BLACKDUCK_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = "blackduckProjectDirectory"; +exports.BLACKDUCK_FIX_PR_UPGRADE_GUIDANCE_KEY = "blackduck_fixpr_useUpgradeGuidance"; +exports.BLACKDUCK_SCA_FIX_PR_UPGRADE_GUIDANCE_KEY = "blackducksca_fixpr_useUpgradeGuidance"; +exports.BLACKDUCK_SCA_FIX_PR_UPGRADE_GUIDANCE_KEY_CLASSIC_EDITOR = "blackduckScaFixPrUseUpgradeGuidance"; +exports.BLACKDUCK_SCA_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = "blackduckScaProjectDirectory"; /** - * @deprecated Use blackduck_reports_sarif_create instead. This can be removed in future release. + * @deprecated Use blackducksca_reports_sarif_create instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_REPORTS_SARIF_CREATE_KEY = "bridge_blackduck_reports_sarif_create"; exports.BLACKDUCK_REPORTS_SARIF_CREATE_KEY = "blackduck_reports_sarif_create"; -exports.BLACKDUCK_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR = "blackduckReportsSarifCreate"; +exports.BLACKDUCK_SCA_REPORTS_SARIF_CREATE_KEY = "blackducksca_reports_sarif_create"; +exports.BLACKDUCK_SCA_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR = "blackduckScaReportsSarifCreate"; /** - * @deprecated Use blackduck_reports_sarif_file_path instead. This can be removed in future release. + * @deprecated Use blackducksca_reports_sarif_file_path instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY = "bridge_blackduck_reports_sarif_file_path"; exports.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY = "blackduck_reports_sarif_file_path"; -exports.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR = "blackduckReportsSarifFilePath"; +exports.BLACKDUCK_SCA_REPORTS_SARIF_FILE_PATH_KEY = "blackducksca_reports_sarif_file_path"; +exports.BLACKDUCK_SCA_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR = "blackduckScaReportsSarifFilePath"; /** - * @deprecated Use blackduck_reports_sarif_severities instead. This can be removed in future release. + * @deprecated Use blackducksca_reports_sarif_severities instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY = "bridge_blackduck_reports_sarif_severities"; exports.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY = "blackduck_reports_sarif_severities"; -exports.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR = "blackduckReportsSarifSeverities"; +exports.BLACKDUCK_SCA_REPORTS_SARIF_SEVERITIES_KEY = "blackducksca_reports_sarif_severities"; +exports.BLACKDUCK_SCA_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR = "blackduckScaReportsSarifSeverities"; /** - * @deprecated Use blackduck_reports_sarif_groupSCAIssues instead. This can be removed in future release. + * @deprecated Use blackducksca_reports_sarif_groupSCAIssues instead. This can be removed in future release. */ -exports.BRIDGE_BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES = "bridge_blackduck_reports_sarif_groupSCAIssues"; exports.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = "blackduck_reports_sarif_groupSCAIssues"; -exports.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR = "blackduckReportsSarifGroupSCAIssues"; +exports.BLACKDUCK_SCA_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = "blackducksca_reports_sarif_groupSCAIssues"; +exports.BLACKDUCK_SCA_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR = "blackduckScaReportsSarifGroupSCAIssues"; +/** + * @deprecated Use detect_search_depth instead. This can be removed in future release. + */ exports.BLACKDUCK_SEARCH_DEPTH_KEY = "blackduck_search_depth"; -exports.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR = "blackduckSearchDepth"; -exports.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR_FOR_POLARIS = "blackduckSearchDepthForPolaris"; -exports.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR_FOR_SRM = "blackduckSearchDepthForSrm"; +exports.DETECT_SEARCH_DEPTH_KEY = "detect_search_depth"; +exports.DETECT_DEPTH_KEY_CLASSIC_EDITOR = "detectSearchDepth"; +exports.DETECT_DEPTH_KEY_CLASSIC_EDITOR_FOR_POLARIS = "detectSearchDepthForPolaris"; +exports.DETECT_DEPTH_KEY_CLASSIC_EDITOR_FOR_SRM = "detectSearchDepthForSrm"; +/** + * @deprecated Use detect_config_path instead. This can be removed in future release. + */ exports.BLACKDUCK_CONFIG_PATH_KEY = "blackduck_config_path"; -exports.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR = "blackduckConfigPath"; -exports.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS = "blackduckConfigPathForPolaris"; -exports.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM = "blackduckConfigPathForSrm"; +exports.DETECT_CONFIG_PATH_KEY = "detect_config_path"; +exports.DETECT_CONFIG_PATH_KEY_CLASSIC_EDITOR = "detectConfigPath"; +exports.DETECT_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS = "detectConfigPathForPolaris"; +exports.DETECT_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM = "detectConfigPathForSrm"; +/** + * @deprecated Use detect_args instead. This can be removed in future release. + */ exports.BLACKDUCK_ARGS_KEY = "blackduck_args"; -exports.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR = "blackduckArgs"; -exports.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS = "blackduckArgsForPolaris"; -exports.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM = "blackduckArgsForSrm"; +exports.DETECT_ARGS_KEY = "detect_args"; +exports.DETECT_ARGS_KEY_CLASSIC_EDITOR = "detectArgs"; +exports.DETECT_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS = "detectArgsForPolaris"; +exports.DETECT_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM = "detectArgsForSrm"; //SRM exports.SRM_URL_KEY = "srm_url"; exports.SRM_URL_KEY_CLASSIC_EDITOR = "srmUrl"; @@ -616,33 +534,37 @@ exports.SRM_BRANCH_PARENT_KEY = "srm_branch_parent"; exports.SRM_BRANCH_PARENT_KEY_CLASSIC_EDITOR = "srmBranchParent"; exports.SRM_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = "srmProjectDirectory"; exports.INCLUDE_DIAGNOSTICS_KEY = "include_diagnostics"; -exports.INCLUDE_DIAGNOSTICS_KEY_CLASSIC_EDITOR = "include_diagnostics"; +exports.INCLUDE_DIAGNOSTICS_KEY_CLASSIC_EDITOR = "includeDiagnostics"; /** * @deprecated Use network_airgap instead. This can be removed in future release. */ exports.BRIDGE_NETWORK_AIRGAP_KEY = "bridge_network_airgap"; exports.NETWORK_AIRGAP_KEY = "network_airgap"; -exports.NETWORK_AIRGAP_KEY_CLASSIC_EDITOR = "bridge_network_airgap"; +exports.NETWORK_AIRGAP_KEY_CLASSIC_EDITOR = "networkAirgap"; /** - * @deprecated Use synopsys_bridge_download_url instead. This can be removed in future release. + * @deprecated Use bridgecli_download_url instead. This can be removed in future release. */ -exports.BRIDGE_DOWNLOAD_URL_KEY = "bridge_download_url"; exports.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY = "synopsys_bridge_download_url"; -exports.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY_CLASSIC_EDITOR = "bridge_download_url"; +exports.BRIDGE_CLI_DOWNLOAD_URL_KEY = "bridgecli_download_url"; +exports.BRIDGE_CLI_DOWNLOAD_URL_KEY_CLASSIC_EDITOR = "bridgeCliDownloadUrl"; /** - * @deprecated Use synopsys_bridge_download_version instead. This can be removed in future release. + * @deprecated Use bridgecli_download_version instead. This can be removed in future release. */ -exports.BRIDGE_DOWNLOAD_VERSION_KEY = "bridge_download_version"; exports.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY = "synopsys_bridge_download_version"; -exports.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY_CLASSIC_EDITOR = "bridge_download_version"; +exports.BRIDGE_CLI_DOWNLOAD_VERSION_KEY = "bridgecli_download_version"; +exports.BRIDGE_CLI_DOWNLOAD_VERSION_KEY_CLASSIC_EDITOR = "bridgeCliDownloadVersion"; exports.RETURN_STATUS_KEY = "return_status"; //export const RETURN_STATUS_KEY_CLASSIC_EDITOR = "returnStatus"; exports.MARK_BUILD_STATUS_KEY = "mark_build_status"; exports.MARK_BUILD_STATUS_KEY_CLASSIC_EDITOR = "markBuildStatus"; +/** + * @deprecated Use bridgecli_install_directory instead. This can be removed in future release. + */ exports.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY = "synopsys_bridge_install_directory"; -exports.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = "synopsys_bridge_path"; +exports.BRIDGE_CLI_INSTALL_DIRECTORY_KEY = "bridgecli_install_directory"; +exports.BRIDGE_CLI_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = "bridgeCliInstallDirectory"; exports.PROJECT_DIRECTORY_KEY = "project_directory"; -exports.UPLOAD_FOLDER_ARTIFACT_NAME = "synopsys_bridge_diagnostics"; +exports.UPLOAD_FOLDER_ARTIFACT_NAME = "bridge_cli_diagnostics"; exports.BRIDGE_LOCAL_DIRECTORY = ".bridge"; exports.SARIF_DEFAULT_FILE_NAME = "report.sarif.json"; exports.DEFAULT_BLACKDUCK_SARIF_GENERATOR_DIRECTORY = "Blackduck SARIF Generator"; @@ -655,9 +577,9 @@ exports.WINDOWS_PLATFORM = "win64"; exports.LINUX_PLATFORM = "linux64"; exports.MAC_ARM_PLATFORM = "macos_arm"; exports.MAC_INTEL_PLATFORM = "macosx"; -exports.MIN_SUPPORTED_SYNOPSYS_BRIDGE_MAC_ARM_VERSION = "2.1.0"; +exports.MIN_SUPPORTED_BRIDGE_CLI_MAC_ARM_VERSION = "2.1.0"; exports.DEFAULT_AZURE_API_URL = "https://dev.azure.com"; -exports.SYNOPSYS_SECURITY_SCAN_AZURE_DEVOPS_DOCS_URL = "https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_synopsys-security-scan-for-azure-devops.html"; +exports.BLACKDUCK_SECURITY_SCAN_AZURE_DEVOPS_DOCS_URL = "https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_synopsys-security-scan-for-azure-devops.html"; /***/ }), @@ -667,6 +589,7 @@ exports.SYNOPSYS_SECURITY_SCAN_AZURE_DEVOPS_DOCS_URL = "https://sig-product-docs "use strict"; +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -721,7 +644,7 @@ class SynopsysAzureService { taskLib.debug(`Azure check pull request API: ${endpoint}`); const token = ":".concat(azureData.user.token); const encodedToken = Buffer.from(token, "utf8").toString("base64"); - const httpClient = new HttpClient_1.HttpClient("synopsys-azure-service"); + const httpClient = new HttpClient_1.HttpClient("blackduck-azure-service"); const httpResponse = yield httpClient.get(endpoint, { Authorization: "Basic ".concat(encodedToken), Accept: "application/json", @@ -754,70 +677,7 @@ exports.SynopsysAzureService = SynopsysAzureService; /***/ }), -/***/ 2926: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.uploadSarifResultAsArtifact = exports.uploadDiagnostics = void 0; -const taskLib = __importStar(__nccwpck_require__(347)); -const constants = __importStar(__nccwpck_require__(3051)); -const path = __importStar(__nccwpck_require__(1017)); -const utility_1 = __nccwpck_require__(837); -function uploadDiagnostics(workspaceDir) { - const uploadArtifactPath = path.join(workspaceDir, constants.BRIDGE_LOCAL_DIRECTORY); - let isBridgeDirectoryExists = false; - isBridgeDirectoryExists = taskLib.exist(uploadArtifactPath); - if (isBridgeDirectoryExists) { - taskLib.uploadArtifact(constants.UPLOAD_FOLDER_ARTIFACT_NAME, uploadArtifactPath, constants.UPLOAD_FOLDER_ARTIFACT_NAME); - } -} -exports.uploadDiagnostics = uploadDiagnostics; -function uploadSarifResultAsArtifact(defaultSarifReportDirectory, userSarifFilePath) { - const sarifFilePath = userSarifFilePath - ? userSarifFilePath - : (0, utility_1.getDefaultSarifReportPath)(defaultSarifReportDirectory, true); - let isSarifReportDirectoryExists = false; - isSarifReportDirectoryExists = taskLib.exist(sarifFilePath); - if (isSarifReportDirectoryExists) { - console.log(`Uploading SARIF report as artifact from: ${sarifFilePath}`); - taskLib.uploadArtifact(constants.SARIF_UPLOAD_FOLDER_ARTIFACT_NAME, sarifFilePath, constants.SARIF_UPLOAD_FOLDER_ARTIFACT_NAME); - console.log("Upload SARIF report successfully in the artifact"); - } - else { - console.log(`Uploading SARIF report as artifact failed as file path not found at: ${sarifFilePath}`); - } -} -exports.uploadSarifResultAsArtifact = uploadSarifResultAsArtifact; - - -/***/ }), - -/***/ 9510: +/***/ 4942: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -854,532 +714,511 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports._getFileSizeOnDisk = exports.downloadTool = exports.debug = void 0; -const httpm = __importStar(__nccwpck_require__(5538)); +exports.Bridge = void 0; const path = __importStar(__nccwpck_require__(1017)); -const fs = __importStar(__nccwpck_require__(7147)); -const tl = __importStar(__nccwpck_require__(347)); +const taskLib = __importStar(__nccwpck_require__(347)); +const HttpClient_1 = __nccwpck_require__(5538); +const tools_parameter_1 = __nccwpck_require__(6233); +const utility_1 = __nccwpck_require__(837); +const validator_1 = __nccwpck_require__(6717); const constants = __importStar(__nccwpck_require__(3051)); +const inputs = __importStar(__nccwpck_require__(7533)); +const utility_2 = __nccwpck_require__(837); +const fs_1 = __nccwpck_require__(7147); +const dom_parser_1 = __importDefault(__nccwpck_require__(9592)); +const input_1 = __nccwpck_require__(7533); +const application_constant_1 = __nccwpck_require__(3051); +const os_1 = __importDefault(__nccwpck_require__(2037)); +const semver_1 = __importDefault(__nccwpck_require__(1383)); const ErrorCodes_1 = __nccwpck_require__(4487); -const userAgent = "SynopsysSecurityScan"; -const requestOptions = { - // ignoreSslError: true, - proxy: tl.getHttpProxyConfiguration(), - cert: tl.getHttpCertConfiguration(), - allowRedirects: true, - allowRetries: true, -}; -function debug(message) { - tl.debug(message); -} -exports.debug = debug; -/** - * Download a tool from an url and stream it into a file - * - * @param url url of tool to download - * @param fileName optional fileName. Should typically not use (will be a guid for reliability). Can pass fileName with an absolute path. - * @param handlers optional handlers array. Auth handlers to pass to the HttpClient for the tool download. - * @param additionalHeaders optional custom HTTP headers. This is passed to the REST client that downloads the tool. - */ -function downloadTool(url, fileName, handlers, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - // check if it's an absolute path already - let destPath; - if (path.isAbsolute(fileName)) { - destPath = fileName; +class Bridge { + constructor() { + this.bridgeExecutablePath = ""; + this.bridgeArtifactoryURL = + "https://sig-repo.synopsys.com/artifactory/bds-integrations-release/com/synopsys/integration/bridge-cli"; + this.bridgeUrlPattern = this.bridgeArtifactoryURL.concat("/$version/bridge-cli-$version-$platform.zip"); + this.bridgeUrlLatestPattern = this.bridgeArtifactoryURL.concat("/latest/bridge-cli-$platform.zip"); + } + extractBridge(fileInfo) { + return __awaiter(this, void 0, void 0, function* () { + const extractZippedFilePath = inputs.BRIDGE_CLI_INSTALL_DIRECTORY_KEY || this.getBridgeDefaultPath(); + // Clear the existing bridge, if available + if (taskLib.exist(extractZippedFilePath)) { + yield taskLib.rmRF(extractZippedFilePath); } - else { - destPath = path.join(_getAgentTemp(), fileName); + yield (0, utility_2.extractZipped)(fileInfo.filePath, extractZippedFilePath); + return Promise.resolve(extractZippedFilePath); + }); + } + executeBridgeCommand(executablePath, workspace, command) { + return __awaiter(this, void 0, void 0, function* () { + taskLib.debug("extractedPath: ".concat(executablePath)); + const executableBridgePath = yield this.setBridgeExecutablePath(executablePath); + if (!taskLib.exist(executableBridgePath)) { + throw new Error("Bridge CLI executable file could not be found at " + .concat(executableBridgePath) + .concat(constants.SPACE) + .concat(ErrorCodes_1.ErrorCode.BRIDGE_EXECUTABLE_NOT_FOUND.toString())); } try { - const http = new httpm.HttpClient(userAgent, handlers, requestOptions); - tl.debug(fileName); - // make sure that the folder exists - tl.mkdirP(path.dirname(destPath)); - tl.debug(tl.loc("TOOL_LIB_Downloading", url)); - tl.debug("destination " + destPath); - if (fs.existsSync(destPath)) { - tl.debug("Destination file path already exists"); - _deleteFile(destPath); - } - const response = yield http.get(url, additionalHeaders); - if (response.message.statusCode != 200) { - tl.debug(`Failed to download "${fileName}" from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); - reject(new Error("Failed to download synopsys-bridge zip from specified URL. HTTP status code: " - .concat(String(response.message.statusCode)) + return yield taskLib.exec(executableBridgePath, command, { + cwd: workspace, + }); + } + catch (errorObject) { + taskLib.debug("errorObject:" + errorObject); + throw errorObject; + } + }); + } + prepareCommand(tempDir) { + return __awaiter(this, void 0, void 0, function* () { + try { + let formattedCommand = ""; + const invalidParams = (0, validator_1.validateScanTypes)(); + if (invalidParams.length === 4) { + return Promise.reject(new Error("Requires at least one scan type: (" + .concat(constants.POLARIS_SERVER_URL_KEY) + .concat(",") + .concat(constants.COVERITY_URL_KEY) + .concat(",") + .concat(constants.BLACKDUCK_URL_KEY) + .concat(",") + .concat(constants.SRM_URL_KEY) + .concat(")") .concat(constants.SPACE) - .concat(ErrorCodes_1.ErrorCode.DOWNLOAD_FAILED_WITH_HTTP_STATUS_CODE.toString()))); + .concat(ErrorCodes_1.ErrorCode.MISSING_AT_LEAST_ONE_SCAN_TYPE.toString()))); } - const downloadedContentLength = _getContentLengthOfDownloadedFile(response); - if (!isNaN(downloadedContentLength)) { - tl.debug(`Content-Length of downloaded file: ${downloadedContentLength}`); + let classicEditorErrors = []; + let polarisErrors = []; + let coverityErrors = []; + let blackduckErrors = []; + let srmErrors = []; + if (input_1.SCAN_TYPE.length > 0) { + // To support single scan using Classic Editor + [formattedCommand, classicEditorErrors] = + yield this.formatCommandForClassicEditor(formattedCommand, tempDir); } else { - tl.debug(`Content-Length header missing`); + // To support multi-scan using YAML + [formattedCommand, polarisErrors] = yield this.preparePolarisCommand(formattedCommand, tempDir); + [formattedCommand, coverityErrors] = yield this.prepareBlackduckCommand(formattedCommand, tempDir); + [formattedCommand, blackduckErrors] = yield this.prepareCoverityCommand(formattedCommand, tempDir); + [formattedCommand, srmErrors] = yield this.prepareSrmCommand(formattedCommand, tempDir); } - tl.debug("creating stream"); - const file = fs.createWriteStream(destPath); - file - .on("open", () => __awaiter(this, void 0, void 0, function* () { - try { - response.message - .on("error", (err) => { - file.end(); - reject(err); - }) - .pipe(file); - } - catch (err) { - reject(err); - } - })) - .on("error", (err) => { - file.end(); - reject(err); - }) - .on("close", () => { - let fileSizeInBytes; - try { - fileSizeInBytes = _getFileSizeOnDisk(destPath); - } - catch (err) { - const error = err; - fileSizeInBytes = NaN; - tl.warning(`Unable to check file size of ${destPath} due to error: ${error.message}`); - } - if (!isNaN(fileSizeInBytes)) { - tl.debug(`Downloaded file size: ${fileSizeInBytes} bytes`); - } - else { - tl.debug(`File size on disk was not found`); - } - if (!isNaN(downloadedContentLength) && - !isNaN(fileSizeInBytes) && - fileSizeInBytes !== downloadedContentLength) { - const errMsg = `Content-Length (${downloadedContentLength} bytes) did not match downloaded file size (${fileSizeInBytes} bytes).`; - tl.warning(errMsg); - reject(errMsg - .concat(constants.SPACE) - .concat(ErrorCodes_1.ErrorCode.CONTENT_LENGTH_MISMATCH.toString())); - } - resolve(destPath); - }); + let validationErrors = []; + validationErrors = validationErrors.concat(polarisErrors, coverityErrors, blackduckErrors, srmErrors, classicEditorErrors); + if (formattedCommand.length === 0) { + return Promise.reject(new Error(validationErrors.join(","))); + } + if (validationErrors.length > 0) { + console.log(new Error(validationErrors.join(","))); + } + if ((0, utility_2.parseToBoolean)(inputs.INCLUDE_DIAGNOSTICS)) { + formattedCommand = formattedCommand + .concat(tools_parameter_1.BridgeToolsParameter.SPACE) + .concat(tools_parameter_1.BridgeToolsParameter.DIAGNOSTICS_OPTION); + } + console.log("Formatted command is - ".concat(formattedCommand)); + return Promise.resolve(formattedCommand); } - catch (error) { - _deleteFile(destPath); - throw error; + catch (e) { + const errorObject = e; + taskLib.debug(errorObject.stack === undefined ? "" : errorObject.stack.toString()); + return Promise.reject(errorObject); } - })); - }); -} -exports.downloadTool = downloadTool; -/** - * Gets size of downloaded file from "Content-Length" header - * - * @param response response for request to get the file - * @returns number if the 'content-length' is not empty, otherwise NaN - */ -function _getContentLengthOfDownloadedFile(response) { - const contentLengthHeader = response.message.headers["content-length"]; - return parseInt(contentLengthHeader); -} -/** - * Gets size of file saved to disk - * - * @param filePath the path to the file, saved to the disk - * @returns size of file saved to disk - */ -function _getFileSizeOnDisk(filePath) { - return fs.statSync(filePath).size; -} -exports._getFileSizeOnDisk = _getFileSizeOnDisk; -function _getAgentTemp() { - tl.assertAgent("2.115.0"); - const tempDirectory = tl.getVariable("Agent.TempDirectory"); - if (!tempDirectory) { - throw new Error("Agent.TempDirectory is not set" - .concat(constants.SPACE) - .concat(ErrorCodes_1.ErrorCode.AGENT_TEMP_DIRECTORY_NOT_SET.toString())); + }); } - return tempDirectory; -} -function _deleteFile(filePath) { - try { - if (fs.existsSync(filePath)) { - fs.rmSync(filePath); - tl.debug(`Removed unfinished downloaded file`); - } + formatCommandForClassicEditor(formattedCommand, tempDir) { + return __awaiter(this, void 0, void 0, function* () { + let errors = []; + if (input_1.SCAN_TYPE == "polaris") { + [formattedCommand, errors] = yield this.preparePolarisCommand(formattedCommand, tempDir); + } + else if (input_1.SCAN_TYPE == "blackduck") { + [formattedCommand, errors] = yield this.prepareBlackduckCommand(formattedCommand, tempDir); + } + else if (input_1.SCAN_TYPE == "coverity") { + [formattedCommand, errors] = yield this.prepareCoverityCommand(formattedCommand, tempDir); + } + else if (input_1.SCAN_TYPE == "srm") { + [formattedCommand, errors] = yield this.prepareSrmCommand(formattedCommand, tempDir); + } + return [formattedCommand, errors]; + }); } - catch (err) { - tl.debug(`Failed to delete '${filePath}'. ${err}`); + prepareSrmCommand(formattedCommand, tempDir) { + return __awaiter(this, void 0, void 0, function* () { + const srmErrors = (0, validator_1.validateSrmInputs)(); + if (srmErrors.length === 0 && inputs.SRM_URL) { + const commandFormatter = new tools_parameter_1.BridgeToolsParameter(tempDir); + formattedCommand = formattedCommand.concat(yield commandFormatter.getFormattedCommandForSrm()); + } + return [formattedCommand, srmErrors]; + }); } -} - - -/***/ }), - -/***/ 3825: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BuildStatus = void 0; -var BuildStatus; -(function (BuildStatus) { - BuildStatus["Failed"] = "Failed"; - BuildStatus["SucceededWithIssues"] = "SucceededWithIssues"; - BuildStatus["Succeeded"] = "Succeeded"; -})(BuildStatus = exports.BuildStatus || (exports.BuildStatus = {})); - - -/***/ }), - -/***/ 4487: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ErrorCode = void 0; -var ErrorCode; -(function (ErrorCode) { - ErrorCode[ErrorCode["SUCCESSFULLY_COMPLETED"] = 0] = "SUCCESSFULLY_COMPLETED"; - ErrorCode[ErrorCode["UNDEFINED_ERROR_FROM_BRIDGE"] = 1] = "UNDEFINED_ERROR_FROM_BRIDGE"; - ErrorCode[ErrorCode["ADAPTER_ERROR"] = 2] = "ADAPTER_ERROR"; - ErrorCode[ErrorCode["BRIDGE_SHUTDOWN_FAILURE"] = 3] = "BRIDGE_SHUTDOWN_FAILURE"; - ErrorCode[ErrorCode["BRIDGE_BREAK_ENABLED"] = 8] = "BRIDGE_BREAK_ENABLED"; - ErrorCode[ErrorCode["BRIDGE_INITIALIZATION_FAILED"] = 9] = "BRIDGE_INITIALIZATION_FAILED"; - // The list of ADO extension related error codes begins below - ErrorCode[ErrorCode["MISSING_AT_LEAST_ONE_SCAN_TYPE"] = 101] = "MISSING_AT_LEAST_ONE_SCAN_TYPE"; - ErrorCode[ErrorCode["MISSING_REQUIRED_PARAMETERS"] = 102] = "MISSING_REQUIRED_PARAMETERS"; - ErrorCode[ErrorCode["AGENT_TEMP_DIRECTORY_NOT_SET"] = 103] = "AGENT_TEMP_DIRECTORY_NOT_SET"; - ErrorCode[ErrorCode["BLACKDUCK_FIXPR_MAX_COUNT_NOT_APPLICABLE"] = 104] = "BLACKDUCK_FIXPR_MAX_COUNT_NOT_APPLICABLE"; - ErrorCode[ErrorCode["INVALID_POLARIS_ASSESSMENT_TYPES"] = 105] = "INVALID_POLARIS_ASSESSMENT_TYPES"; - ErrorCode[ErrorCode["INVALID_BLACKDUCK_FAILURE_SEVERITIES"] = 106] = "INVALID_BLACKDUCK_FAILURE_SEVERITIES"; - ErrorCode[ErrorCode["INVALID_BLACKDUCK_FIXPR_MAXCOUNT"] = 107] = "INVALID_BLACKDUCK_FIXPR_MAXCOUNT"; - ErrorCode[ErrorCode["MISSING_BOOLEAN_VALUE"] = 108] = "MISSING_BOOLEAN_VALUE"; - ErrorCode[ErrorCode["INVALID_SYNOPSYS_BRIDGE_URL"] = 109] = "INVALID_SYNOPSYS_BRIDGE_URL"; - ErrorCode[ErrorCode["SYNOPSYS_BRIDGE_URL_CANNOT_BE_EMPTY"] = 110] = "SYNOPSYS_BRIDGE_URL_CANNOT_BE_EMPTY"; - ErrorCode[ErrorCode["INVALID_URL"] = 111] = "INVALID_URL"; - ErrorCode[ErrorCode["SYNOPSYS_BRIDGE_VERSION_NOT_FOUND"] = 112] = "SYNOPSYS_BRIDGE_VERSION_NOT_FOUND"; - ErrorCode[ErrorCode["SYNOPSYS_BRIDGE_DOWNLOAD_FAILED"] = 113] = "SYNOPSYS_BRIDGE_DOWNLOAD_FAILED"; - ErrorCode[ErrorCode["BRIDGE_INSTALL_DIRECTORY_NOT_EXIST"] = 114] = "BRIDGE_INSTALL_DIRECTORY_NOT_EXIST"; - ErrorCode[ErrorCode["DEFAULT_DIRECTORY_NOT_FOUND"] = 115] = "DEFAULT_DIRECTORY_NOT_FOUND"; - ErrorCode[ErrorCode["BRIDGE_EXECUTABLE_NOT_FOUND"] = 116] = "BRIDGE_EXECUTABLE_NOT_FOUND"; - ErrorCode[ErrorCode["WORKSPACE_DIRECTORY_NOT_FOUND"] = 117] = "WORKSPACE_DIRECTORY_NOT_FOUND"; - ErrorCode[ErrorCode["FILE_DOES_NOT_EXIST"] = 118] = "FILE_DOES_NOT_EXIST"; - ErrorCode[ErrorCode["NO_DESTINATION_DIRECTORY"] = 119] = "NO_DESTINATION_DIRECTORY"; - ErrorCode[ErrorCode["FAILED_TO_GET_PULL_REQUEST_INFO_FROM_SOURCE_BRANCH"] = 120] = "FAILED_TO_GET_PULL_REQUEST_INFO_FROM_SOURCE_BRANCH"; - ErrorCode[ErrorCode["MISSING_AZURE_TOKEN"] = 121] = "MISSING_AZURE_TOKEN"; - ErrorCode[ErrorCode["INVALID_COVERITY_INSTALL_DIRECTORY"] = 122] = "INVALID_COVERITY_INSTALL_DIRECTORY"; - ErrorCode[ErrorCode["REQUIRED_COVERITY_STREAM_NAME_FOR_MANUAL_TRIGGER"] = 123] = "REQUIRED_COVERITY_STREAM_NAME_FOR_MANUAL_TRIGGER"; - ErrorCode[ErrorCode["DOWNLOAD_FAILED_WITH_HTTP_STATUS_CODE"] = 124] = "DOWNLOAD_FAILED_WITH_HTTP_STATUS_CODE"; - ErrorCode[ErrorCode["CONTENT_LENGTH_MISMATCH"] = 125] = "CONTENT_LENGTH_MISMATCH"; - ErrorCode[ErrorCode["UNDEFINED_ERROR_FROM_EXTENSION"] = 999] = "UNDEFINED_ERROR_FROM_EXTENSION"; - ErrorCode[ErrorCode["INVALID_SRM_ASSESSMENT_TYPES"] = 126] = "INVALID_SRM_ASSESSMENT_TYPES"; -})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {})); - - -/***/ }), - -/***/ 7533: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; + preparePolarisCommand(formattedCommand, tempDir) { + return __awaiter(this, void 0, void 0, function* () { + // validating and preparing command for polaris + const polarisErrors = (0, validator_1.validatePolarisInputs)(); + const commandFormatter = new tools_parameter_1.BridgeToolsParameter(tempDir); + if (polarisErrors.length === 0 && inputs.POLARIS_SERVER_URL) { + formattedCommand = formattedCommand.concat(yield commandFormatter.getFormattedCommandForPolaris()); + } + return [formattedCommand, polarisErrors]; + }); } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var _a, _b; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.COVERITY_ARGS = exports.COVERITY_CONFIG_PATH = exports.COVERITY_CLEAN_COMMAND = exports.COVERITY_BUILD_COMMAND = exports.COVERITY_PROJECT_DIRECTORY = exports.COVERITY_VERSION = exports.COVERITY_AUTOMATION_PRCOMMENT = exports.COVERITY_LOCAL = exports.COVERITY_POLICY_VIEW = exports.COVERITY_EXECUTION_PATH = exports.COVERITY_INSTALL_DIRECTORY = exports.COVERITY_STREAM_NAME = exports.COVERITY_PROJECT_NAME = exports.COVERITY_USER_PASSWORD = exports.COVERITY_USER = exports.COVERITY_URL = exports.POLARIS_REPORTS_SARIF_ISSUE_TYPES = exports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES = exports.POLARIS_REPORTS_SARIF_SEVERITIES = exports.POLARIS_REPORTS_SARIF_FILE_PATH = exports.POLARIS_REPORTS_SARIF_CREATE = exports.POLARIS_PR_COMMENT_SEVERITIES = exports.POLARIS_PR_COMMENT_ENABLED = exports.PROJECT_SOURCE_EXCLUDES = exports.PROJECT_SOURCE_PRESERVE_SYM_LINKS = exports.PROJECT_SOURCE_ARCHIVE = exports.POLARIS_PROJECT_DIRECTORY = exports.POLARIS_ASSESSMENT_MODE = exports.POLARIS_TEST_SCA_TYPE = exports.POLARIS_BRANCH_PARENT_NAME = exports.POLARIS_BRANCH_NAME = exports.POLARIS_TRIAGE = exports.POLARIS_ASSESSMENT_TYPES = exports.POLARIS_PROJECT_NAME = exports.POLARIS_APPLICATION_NAME = exports.POLARIS_ACCESS_TOKEN = exports.POLARIS_SERVER_URL = exports.SCAN_TYPE = exports.AZURE_TOKEN = exports.INCLUDE_DIAGNOSTICS = exports.BRIDGE_DOWNLOAD_VERSION = exports.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY = exports.ENABLE_NETWORK_AIRGAP = exports.BRIDGE_DOWNLOAD_URL = exports.showLogForDeprecatedInputs = exports.getDelimitedInput = exports.getPathInput = exports.getBoolInput = exports.getArbitraryInputs = exports.getInput = void 0; -exports.MARK_BUILD_STATUS = exports.RETURN_STATUS = exports.SRM_PROJECT_DIRECTORY = exports.SRM_BRANCH_PARENT = exports.SRM_BRANCH_NAME = exports.SRM_PROJECT_ID = exports.SRM_PROJECT_NAME = exports.SRM_ASSESSMENT_TYPES = exports.SRM_APIKEY = exports.SRM_URL = exports.BLACKDUCK_ARGS = exports.BLACKDUCK_CONFIG_PATH = exports.BLACKDUCK_SEARCH_DEPTH = exports.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES = exports.BLACKDUCK_REPORTS_SARIF_SEVERITIES = exports.BLACKDUCK_PROJECT_DIRECTORY = exports.BLACKDUCK_REPORTS_SARIF_FILE_PATH = exports.BLACKDUCK_REPORTS_SARIF_CREATE = exports.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE = exports.BLACKDUCK_FIXPR_FILTER_SEVERITIES = exports.BLACKDUCK_FIXPR_CREATE_SINGLE_PR = exports.BLACKDUCK_FIXPR_MAXCOUNT = exports.BLACKDUCK_AUTOMATION_PRCOMMENT = exports.BLACKDUCK_FIXPR_ENABLED = exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES = exports.BLACKDUCK_SCAN_FULL = exports.BLACKDUCK_EXECUTION_PATH = exports.BLACKDUCK_INSTALL_DIRECTORY = exports.BLACKDUCK_API_TOKEN = exports.BLACKDUCK_URL = void 0; -const taskLib = __importStar(__nccwpck_require__(347)); -const constants = __importStar(__nccwpck_require__(3051)); -const polaris_1 = __nccwpck_require__(9073); -const deprecatedInputs = []; -function getInput(newKey, classicEditorKey, deprecatedKey) { - const newInput = taskLib.getInput(newKey); - if (newInput) { - return newInput === null || newInput === void 0 ? void 0 : newInput.trim(); + prepareCoverityCommand(formattedCommand, tempDir) { + return __awaiter(this, void 0, void 0, function* () { + // validating and preparing command for coverity + const coverityErrors = (0, validator_1.validateCoverityInputs)(); + if (coverityErrors.length === 0 && inputs.COVERITY_URL) { + const coverityCommandFormatter = new tools_parameter_1.BridgeToolsParameter(tempDir); + formattedCommand = formattedCommand.concat(yield coverityCommandFormatter.getFormattedCommandForCoverity()); + } + return [formattedCommand, coverityErrors]; + }); } - let deprecatedInput; - if (deprecatedKey) { - deprecatedInput = taskLib.getInput(deprecatedKey); - if (deprecatedInput) { - deprecatedInputs.push(deprecatedKey); - return deprecatedInput === null || deprecatedInput === void 0 ? void 0 : deprecatedInput.trim(); - } + prepareBlackduckCommand(formattedCommand, tempDir) { + return __awaiter(this, void 0, void 0, function* () { + const blackduckErrors = (0, validator_1.validateBlackDuckInputs)(); + if (blackduckErrors.length === 0 && inputs.BLACKDUCK_SCA_URL) { + const blackDuckCommandFormatter = new tools_parameter_1.BridgeToolsParameter(tempDir); + formattedCommand = formattedCommand.concat(yield blackDuckCommandFormatter.getFormattedCommandForBlackduck()); + } + return [formattedCommand, blackduckErrors]; + }); } - const classEditorInput = taskLib.getInput(classicEditorKey); - if (classEditorInput) { - return classEditorInput === null || classEditorInput === void 0 ? void 0 : classEditorInput.trim(); + validateBridgeVersion(version) { + return __awaiter(this, void 0, void 0, function* () { + const versions = yield this.getAllAvailableBridgeVersions(); + return Promise.resolve(versions.indexOf(version.trim()) !== -1); + }); } - return ""; -} -exports.getInput = getInput; -function getArbitraryInputs(yamlKey, classicEditorKey, classicEditorKeyForPolaris, classicEditorKeyForSrm) { - const scanType = taskLib.getInput(constants.SCAN_TYPE_KEY); - if (classicEditorKeyForPolaris.length > 0 && scanType == "polaris") { - return taskLib.getInput(classicEditorKeyForPolaris); + downloadAndExtractBridge(tempDir) { + return __awaiter(this, void 0, void 0, function* () { + try { + const bridgeUrl = yield this.getBridgeUrl(); + if (bridgeUrl != "" && bridgeUrl != null) { + const downloadBridge = yield (0, utility_2.getRemoteFile)(tempDir, bridgeUrl); + console.info("Download of Bridge CLI completed"); + // Extracting bridge + return yield this.extractBridge(downloadBridge); + } + if (inputs.BRIDGE_CLI_DOWNLOAD_VERSION && + (yield this.checkIfBridgeVersionExists(inputs.BRIDGE_CLI_DOWNLOAD_VERSION))) { + return Promise.resolve(this.bridgeExecutablePath); + } + return this.bridgeExecutablePath; + } + catch (e) { + const errorObject = e.message; + if (errorObject.includes("404") || + errorObject.toLowerCase().includes("invalid url")) { + return Promise.reject(new Error("Provided Bridge CLI url is not valid for the configured " + .concat(process.platform, " runner") + .concat(constants.SPACE) + .concat(ErrorCodes_1.ErrorCode.INVALID_BRIDGE_CLI_URL.toString()))); + } + else if (errorObject.toLowerCase().includes("empty")) { + return Promise.reject(new Error("Provided Bridge CLI URL cannot be empty" + .concat(constants.SPACE) + .concat(ErrorCodes_1.ErrorCode.BRIDGE_CLI_URL_CANNOT_BE_EMPTY.toString()))); + } + else { + return Promise.reject(new Error(errorObject)); + } + } + }); + } + getBridgeUrl() { + return __awaiter(this, void 0, void 0, function* () { + let bridgeUrl; + let version = ""; + if (inputs.BRIDGE_CLI_DOWNLOAD_URL) { + bridgeUrl = inputs.BRIDGE_CLI_DOWNLOAD_URL; + if (!(0, validator_1.validateBridgeUrl)(inputs.BRIDGE_CLI_DOWNLOAD_URL)) { + return Promise.reject(new Error("Invalid URL" + .concat(constants.SPACE) + .concat(ErrorCodes_1.ErrorCode.INVALID_URL.toString()))); + } + // To check whether bridge already exists with same version mentioned in bridge url + const versionsArray = bridgeUrl.match(".*bridge-cli-([0-9.]*).*"); + if (versionsArray) { + version = versionsArray[1]; + if (!version) { + const regex = /\w*(bridge-cli-(win64|linux64|macosx|macos_arm).zip)/; + version = yield this.getBridgeVersionFromLatestURL(bridgeUrl.replace(regex, "versions.txt")); + } + } + } + else if (inputs.BRIDGE_CLI_DOWNLOAD_VERSION) { + if (yield this.validateBridgeVersion(inputs.BRIDGE_CLI_DOWNLOAD_VERSION)) { + bridgeUrl = this.getVersionUrl(inputs.BRIDGE_CLI_DOWNLOAD_VERSION.trim()).trim(); + version = inputs.BRIDGE_CLI_DOWNLOAD_VERSION; + } + else { + return Promise.reject(new Error("Provided Bridge CLI version not found in artifactory" + .concat(constants.SPACE) + .concat(ErrorCodes_1.ErrorCode.BRIDGE_CLI_VERSION_NOT_FOUND.toString()))); + } + } + else { + taskLib.debug("Checking for latest version of Bridge CLI to download and configure"); + version = yield this.getBridgeVersionFromLatestURL(this.bridgeArtifactoryURL.concat("/latest/versions.txt")); + bridgeUrl = this.getLatestVersionUrl(); + } + if (version != "") { + if (yield this.checkIfBridgeVersionExists(version)) { + console.log("Skipping download as same Bridge CLI version found"); + return Promise.resolve(""); + } + } + console.info("Downloading and configuring Bridge CLI"); + console.info("Bridge CLI URL is - ".concat(bridgeUrl)); + return bridgeUrl; + }); + } + checkIfBridgeVersionExists(bridgeVersion) { + return __awaiter(this, void 0, void 0, function* () { + this.bridgeExecutablePath = yield this.getBridgePath(); + const osName = process.platform; + let versionFilePath; + if (osName === "win32") { + versionFilePath = this.bridgeExecutablePath.concat("\\versions.txt"); + } + else { + versionFilePath = this.bridgeExecutablePath.concat("/versions.txt"); + } + if (taskLib.exist(versionFilePath) && this.bridgeExecutablePath) { + taskLib.debug("Bridge CLI executable found at ".concat(this.bridgeExecutablePath)); + taskLib.debug("Version file found at ".concat(this.bridgeExecutablePath)); + if (yield this.checkIfVersionExists(bridgeVersion, versionFilePath)) { + return Promise.resolve(true); + } + } + else { + taskLib.debug("Bridge CLI version file could not be found at ".concat(this.bridgeExecutablePath)); + } + return Promise.resolve(false); + }); + } + getAllAvailableBridgeVersions() { + return __awaiter(this, void 0, void 0, function* () { + let htmlResponse = ""; + const httpClient = new HttpClient_1.HttpClient("blackduck-task"); + let retryCountLocal = application_constant_1.RETRY_COUNT; + let httpResponse; + let retryDelay = application_constant_1.RETRY_DELAY_IN_MILLISECONDS; + const versionArray = []; + do { + httpResponse = yield httpClient.get(this.bridgeArtifactoryURL, { + Accept: "text/html", + }); + if (!application_constant_1.NON_RETRY_HTTP_CODES.has(Number(httpResponse.message.statusCode))) { + retryDelay = yield this.retrySleepHelper("Getting all available bridge versions has been failed, Retries left: ", retryCountLocal, retryDelay); + retryCountLocal--; + } + else { + retryCountLocal = 0; + htmlResponse = yield httpResponse.readBody(); + const domParser = new dom_parser_1.default(); + const doms = domParser.parseFromString(htmlResponse); + const elems = doms.getElementsByTagName("a"); //querySelectorAll('a') + if (elems != null) { + for (const el of elems) { + const content = el.textContent; + if (content != null) { + const v = content.match("^[0-9]+.[0-9]+.[0-9]+"); + if (v != null && v.length === 1) { + versionArray.push(v[0]); + } + } + } + } + } + if (retryCountLocal === 0 && !(versionArray.length > 0)) { + taskLib.warning("Unable to retrieve the Bridge CLI Versions from Artifactory"); + } + } while (retryCountLocal > 0); + return versionArray; + }); } - else if (classicEditorKeyForSrm.length > 0 && scanType == "srm") { - return taskLib.getInput(classicEditorKeyForSrm); + checkIfVersionExists(bridgeVersion, bridgeVersionFilePath) { + return __awaiter(this, void 0, void 0, function* () { + try { + const contents = (0, fs_1.readFileSync)(bridgeVersionFilePath, "utf-8"); + return contents.includes("Bridge CLI Package: ".concat(bridgeVersion)); + } + catch (e) { + console.info("Error reading version file content: ".concat(e.message)); + } + return false; + }); } - else if (classicEditorKey.length > 0 && - (scanType == "coverity" || scanType == "blackduck")) { - return taskLib.getInput(classicEditorKey); + getBridgeVersionFromLatestURL(latestVersionsUrl) { + return __awaiter(this, void 0, void 0, function* () { + try { + const httpClient = new HttpClient_1.HttpClient(""); + let retryCountLocal = application_constant_1.RETRY_COUNT; + let retryDelay = application_constant_1.RETRY_DELAY_IN_MILLISECONDS; + let httpResponse; + do { + httpResponse = yield httpClient.get(latestVersionsUrl, { + Accept: "text/html", + }); + if (!application_constant_1.NON_RETRY_HTTP_CODES.has(Number(httpResponse.message.statusCode))) { + retryDelay = yield this.retrySleepHelper("Getting latest Bridge CLI versions has been failed, Retries left: ", retryCountLocal, retryDelay); + retryCountLocal--; + } + else if (httpResponse.message.statusCode === 200) { + retryCountLocal = 0; + const htmlResponse = (yield httpResponse.readBody()).trim(); + const lines = htmlResponse.split("\n"); + for (const line of lines) { + if (line.includes("Bridge CLI Package")) { + return line.split(":")[1].trim(); + } + } + } + if (retryCountLocal == 0) { + taskLib.warning("Unable to retrieve the most recent version from Artifactory URL"); + } + } while (retryCountLocal > 0); + } + catch (e) { + taskLib.debug("Error reading version file content: ".concat(e.message)); + } + return ""; + }); } - return taskLib.getInput(yamlKey); -} -exports.getArbitraryInputs = getArbitraryInputs; -function getBoolInput(newKey, classicEditorKey, deprecatedKey) { - let deprecatedInput; - if (deprecatedKey) { - deprecatedInput = taskLib.getBoolInput(deprecatedKey); - if (deprecatedInput) { - deprecatedInputs.push(deprecatedKey); + getBridgeDefaultPath() { + let bridgeDefaultPath = ""; + const osName = process.platform; + if (osName === "darwin") { + bridgeDefaultPath = path.join(process.env["HOME"], constants.BRIDGE_CLI_DEFAULT_PATH_MAC); } - } - return (taskLib.getBoolInput(newKey) || - deprecatedInput || - taskLib.getBoolInput(classicEditorKey)); -} -exports.getBoolInput = getBoolInput; -function getPathInput(newKey, classicEditorKey, deprecatedKey) { - var _a, _b; - let deprecatedInput; - if (deprecatedKey) { - deprecatedInput = taskLib.getPathInput(deprecatedKey); - if (deprecatedInput) { - deprecatedInputs.push(deprecatedKey); + else if (osName === "linux") { + bridgeDefaultPath = path.join(process.env["HOME"], constants.BRIDGE_CLI_DEFAULT_PATH_LINUX); } - } - return (((_a = taskLib.getPathInput(newKey)) === null || _a === void 0 ? void 0 : _a.trim()) || - (deprecatedInput === null || deprecatedInput === void 0 ? void 0 : deprecatedInput.trim()) || - ((_b = taskLib.getPathInput(classicEditorKey)) === null || _b === void 0 ? void 0 : _b.trim()) || - ""); -} -exports.getPathInput = getPathInput; -function getDelimitedInput(newKey, classicEditorKey, deprecatedKey) { - const newKeyInput = taskLib.getDelimitedInput(newKey, ","); - const classicEditorInput = taskLib.getDelimitedInput(classicEditorKey, ","); - let deprecatedInput = []; - if (deprecatedKey) { - deprecatedInput = taskLib.getDelimitedInput(deprecatedKey, ","); - if (deprecatedInput.length > 0) { - deprecatedInputs.push(deprecatedKey); + else if (osName === "win32") { + bridgeDefaultPath = path.join(process.env["USERPROFILE"], constants.BRIDGE_CLI_DEFAULT_PATH_WINDOWS); } + taskLib.debug("bridgeDefaultPath:" + bridgeDefaultPath); + return bridgeDefaultPath; } - return ((newKeyInput.length > 0 && newKeyInput) || - (deprecatedInput.length > 0 && deprecatedInput) || - (classicEditorInput.length > 0 && classicEditorInput) || - []); -} -exports.getDelimitedInput = getDelimitedInput; -function showLogForDeprecatedInputs() { - if (deprecatedInputs.length > 0) { - console.log(`[${deprecatedInputs.join(",")}] is/are deprecated for YAML. Check documentation for new parameters: ${constants.SYNOPSYS_SECURITY_SCAN_AZURE_DEVOPS_DOCS_URL}`); + // Get bridge version url + getVersionUrl(version) { + const osName = process.platform; + let bridgeDownloadUrl = this.bridgeUrlPattern.replace("$version", version); + bridgeDownloadUrl = bridgeDownloadUrl.replace("$version", version); + if (osName === "darwin") { + const isValidVersionForARM = semver_1.default.gte(version, constants.MIN_SUPPORTED_BRIDGE_CLI_MAC_ARM_VERSION); + let osSuffix = constants.MAC_INTEL_PLATFORM; + if (isValidVersionForARM) { + const cpuInfo = os_1.default.cpus(); + taskLib.debug(`cpuInfo :: ${JSON.stringify(cpuInfo)}`); + const isIntel = cpuInfo[0].model.includes("Intel"); + osSuffix = isIntel + ? constants.MAC_INTEL_PLATFORM + : constants.MAC_ARM_PLATFORM; + } + bridgeDownloadUrl = bridgeDownloadUrl.replace("$platform", osSuffix); + } + else if (osName === "linux") { + bridgeDownloadUrl = bridgeDownloadUrl.replace("$platform", constants.LINUX_PLATFORM); + } + else if (osName === "win32") { + bridgeDownloadUrl = bridgeDownloadUrl.replace("$platform", constants.WINDOWS_PLATFORM); + } + return bridgeDownloadUrl; } -} -exports.showLogForDeprecatedInputs = showLogForDeprecatedInputs; -function getInputForPolarisAssessmentMode() { - var _a, _b, _c; - return (((_a = taskLib.getInput(constants.POLARIS_ASSESSMENT_MODE_KEY)) === null || _a === void 0 ? void 0 : _a.trim()) || - (((_b = taskLib - .getInput(constants.POLARIS_ASSESSMENT_MODE_KEY_CLASSIC_EDITOR)) === null || _b === void 0 ? void 0 : _b.trim()) === polaris_1.POLARIS_ASSESSMENT_MODES.CI - ? polaris_1.POLARIS_ASSESSMENT_MODES.CI - : ((_c = taskLib - .getInput(constants.POLARIS_ASSESSMENT_MODE_KEY_CLASSIC_EDITOR)) === null || _c === void 0 ? void 0 : _c.trim()) === polaris_1.POLARIS_ASSESSMENT_MODES.SOURCEUPLOAD - ? polaris_1.POLARIS_ASSESSMENT_MODES.SOURCE_UPLOAD - : "")); -} -//Bridge download url -exports.BRIDGE_DOWNLOAD_URL = getInput(constants.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY, constants.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY_CLASSIC_EDITOR, constants.BRIDGE_DOWNLOAD_URL_KEY); -exports.ENABLE_NETWORK_AIRGAP = getBoolInput(constants.NETWORK_AIRGAP_KEY, constants.NETWORK_AIRGAP_KEY_CLASSIC_EDITOR, constants.BRIDGE_NETWORK_AIRGAP_KEY); -exports.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY = getPathInput(constants.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY, constants.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR, null); -exports.BRIDGE_DOWNLOAD_VERSION = getInput(constants.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY, constants.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY_CLASSIC_EDITOR, constants.BRIDGE_DOWNLOAD_VERSION_KEY); -exports.INCLUDE_DIAGNOSTICS = getInput(constants.INCLUDE_DIAGNOSTICS_KEY, constants.INCLUDE_DIAGNOSTICS_KEY_CLASSIC_EDITOR, null); -exports.AZURE_TOKEN = getInput(constants.AZURE_TOKEN_KEY, constants.AZURE_TOKEN_KEY_CLASSIC_EDITOR, null); -exports.SCAN_TYPE = ((_a = taskLib.getInput(constants.SCAN_TYPE_KEY)) === null || _a === void 0 ? void 0 : _a.trim()) || ""; -// Polaris related inputs -exports.POLARIS_SERVER_URL = getInput(constants.POLARIS_SERVER_URL_KEY, constants.POLARIS_SERVER_URL_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_SERVER_URL_KEY); -exports.POLARIS_ACCESS_TOKEN = getInput(constants.POLARIS_ACCESS_TOKEN_KEY, constants.POLARIS_ACCESS_TOKEN_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_ACCESS_TOKEN_KEY); -exports.POLARIS_APPLICATION_NAME = getInput(constants.POLARIS_APPLICATION_NAME_KEY, constants.POLARIS_APPLICATION_NAME_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_APPLICATION_NAME_KEY); -exports.POLARIS_PROJECT_NAME = getInput(constants.POLARIS_PROJECT_NAME_KEY, constants.POLARIS_PROJECT_NAME_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_PROJECT_NAME_KEY); -exports.POLARIS_ASSESSMENT_TYPES = getDelimitedInput(constants.POLARIS_ASSESSMENT_TYPES_KEY, constants.POLARIS_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_ASSESSMENT_TYPES_KEY); -exports.POLARIS_TRIAGE = getInput(constants.POLARIS_TRIAGE_KEY, constants.POLARIS_TRIAGE_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_TRIAGE_KEY); -exports.POLARIS_BRANCH_NAME = getInput(constants.POLARIS_BRANCH_NAME_KEY, constants.POLARIS_BRANCH_NAME_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_BRANCH_NAME_KEY); -exports.POLARIS_BRANCH_PARENT_NAME = getInput(constants.POLARIS_BRANCH_PARENT_NAME_KEY, constants.POLARIS_BRANCH_PARENT_NAME_KEY_CLASSIC_EDITOR, null); -exports.POLARIS_TEST_SCA_TYPE = getInput(constants.POLARIS_TEST_SCA_TYPE_KEY, constants.POLARIS_TEST_SCA_TYPE_KEY_CLASSIC_EDITOR, null); -exports.POLARIS_ASSESSMENT_MODE = getInputForPolarisAssessmentMode(); -exports.POLARIS_PROJECT_DIRECTORY = getInput(constants.PROJECT_DIRECTORY_KEY, constants.POLARIS_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR, null); -exports.PROJECT_SOURCE_ARCHIVE = getInput(constants.PROJECT_SOURCE_ARCHIVE_KEY, constants.PROJECT_SOURCE_ARCHIVE_KEY_CLASSIC_EDITOR, null); -exports.PROJECT_SOURCE_PRESERVE_SYM_LINKS = getInput(constants.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY, constants.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY_CLASSIC_EDITOR, null); -exports.PROJECT_SOURCE_EXCLUDES = getDelimitedInput(constants.PROJECT_SOURCE_EXCLUDES_KEY, constants.PROJECT_SOURCE_EXCLUDES_KEY_CLASSIC_EDITOR, null); -exports.POLARIS_PR_COMMENT_ENABLED = getInput(constants.POLARIS_PR_COMMENT_ENABLED_KEY, constants.POLARIS_PR_COMMENT_ENABLED_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_PR_COMMENT_ENABLED_KEY); -exports.POLARIS_PR_COMMENT_SEVERITIES = getDelimitedInput(constants.POLARIS_PR_COMMENT_SEVERITIES_KEY, constants.POLARIS_PR_COMMENT_SEVERITIES_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_PR_COMMENT_SEVERITIES_KEY); -exports.POLARIS_REPORTS_SARIF_CREATE = getInput(constants.POLARIS_REPORTS_SARIF_CREATE_KEY, constants.POLARIS_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_REPORTS_SARIF_CREATE_KEY); -exports.POLARIS_REPORTS_SARIF_FILE_PATH = getInput(constants.POLARIS_REPORTS_SARIF_FILE_PATH_KEY, constants.POLARIS_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_REPORTS_SARIF_FILE_PATH_KEY); -exports.POLARIS_REPORTS_SARIF_SEVERITIES = getDelimitedInput(constants.POLARIS_REPORTS_SARIF_SEVERITIES_KEY, constants.POLARIS_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_REPORTS_SARIF_SEVERITIES_KEY); -exports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES = getInput(constants.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY, constants.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY); -exports.POLARIS_REPORTS_SARIF_ISSUE_TYPES = getDelimitedInput(constants.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY, constants.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY); -// Coverity related inputs -exports.COVERITY_URL = getInput(constants.COVERITY_URL_KEY, constants.COVERITY_URL_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_URL_KEY); -exports.COVERITY_USER = getInput(constants.COVERITY_USER_KEY, constants.COVERITY_USER_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_USER_NAME_KEY); -exports.COVERITY_USER_PASSWORD = getInput(constants.COVERITY_PASSPHRASE_KEY, constants.COVERITY_PASSPHRASE_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_USER_PASSWORD_KEY); -exports.COVERITY_PROJECT_NAME = getInput(constants.COVERITY_PROJECT_NAME_KEY, constants.COVERITY_PROJECT_NAME_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_PROJECT_NAME_KEY); -exports.COVERITY_STREAM_NAME = getInput(constants.COVERITY_STREAM_NAME_KEY, constants.COVERITY_STREAM_NAME_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_STREAM_NAME_KEY); -exports.COVERITY_INSTALL_DIRECTORY = getPathInput(constants.COVERITY_INSTALL_DIRECTORY_KEY, constants.COVERITY_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_INSTALL_DIRECTORY_KEY); -exports.COVERITY_EXECUTION_PATH = getPathInput(constants.COVERITY_EXECUTION_PATH_KEY, constants.COVERITY_EXECUTION_PATH_KEY_CLASSIC_EDITOR, null); -exports.COVERITY_POLICY_VIEW = getInput(constants.COVERITY_POLICY_VIEW_KEY, constants.COVERITY_POLICY_VIEW_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_POLICY_VIEW_KEY); -exports.COVERITY_LOCAL = getInput(constants.COVERITY_LOCAL_KEY, constants.COVERITY_LOCAL_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_LOCAL_KEY); -exports.COVERITY_AUTOMATION_PRCOMMENT = getBoolInput(constants.COVERITY_PRCOMMENT_ENABLED_KEY, constants.COVERITY_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_AUTOMATION_PRCOMMENT_KEY); -exports.COVERITY_VERSION = getInput(constants.COVERITY_VERSION_KEY, constants.COVERITY_VERSION_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_VERSION_KEY); -exports.COVERITY_PROJECT_DIRECTORY = getInput(constants.PROJECT_DIRECTORY_KEY, constants.COVERITY_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR, null); -exports.COVERITY_BUILD_COMMAND = getArbitraryInputs(constants.COVERITY_BUILD_COMMAND_KEY, constants.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR, constants.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM); -exports.COVERITY_CLEAN_COMMAND = getArbitraryInputs(constants.COVERITY_CLEAN_COMMAND_KEY, constants.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR, constants.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM); -exports.COVERITY_CONFIG_PATH = getArbitraryInputs(constants.COVERITY_CONFIG_PATH_KEY, constants.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR, constants.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM); -exports.COVERITY_ARGS = getArbitraryInputs(constants.COVERITY_ARGS_KEY, constants.COVERITY_ARGS_KEY_CLASSIC_EDITOR, constants.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM); -// Blackduck related inputs -exports.BLACKDUCK_URL = getInput(constants.BLACKDUCK_URL_KEY, constants.BLACKDUCK_URL_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_URL_KEY); -exports.BLACKDUCK_API_TOKEN = getInput(constants.BLACKDUCK_TOKEN_KEY, constants.BLACKDUCK_TOKEN_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_API_TOKEN_KEY); -exports.BLACKDUCK_INSTALL_DIRECTORY = getPathInput(constants.BLACKDUCK_INSTALL_DIRECTORY_KEY, constants.BLACKDUCK_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_INSTALL_DIRECTORY_KEY); -exports.BLACKDUCK_EXECUTION_PATH = getPathInput(constants.BLACKDUCK_EXECUTION_PATH_KEY, constants.BLACKDUCK_EXECUTION_PATH_KEY_CLASSIC_EDITOR, null); -exports.BLACKDUCK_SCAN_FULL = getInput(constants.BLACKDUCK_SCAN_FULL_KEY, constants.BLACKDUCK_SCAN_FULL_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_SCAN_FULL_KEY); -exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES = getDelimitedInput(constants.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY, constants.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY); -/** - * @deprecated BLACKDUCK_AUTOMATION_FIXPR is deprecated. - */ -const BLACKDUCK_AUTOMATION_FIXPR = taskLib.getInput(constants.BLACKDUCK_AUTOMATION_FIXPR_KEY); -if (BLACKDUCK_AUTOMATION_FIXPR) { - deprecatedInputs.push(constants.BLACKDUCK_AUTOMATION_FIXPR_KEY); -} -exports.BLACKDUCK_FIXPR_ENABLED = getBoolInput(constants.BLACKDUCK_FIXPR_ENABLED_KEY, constants.BLACKDUCK_FIXPR_ENABLED_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_FIXPR_ENABLED_KEY) || - (BLACKDUCK_AUTOMATION_FIXPR === null || BLACKDUCK_AUTOMATION_FIXPR === void 0 ? void 0 : BLACKDUCK_AUTOMATION_FIXPR.trim()) || - ""; -exports.BLACKDUCK_AUTOMATION_PRCOMMENT = getBoolInput(constants.BLACKDUCK_PRCOMMENT_ENABLED_KEY, constants.BLACKDUCK_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_AUTOMATION_PRCOMMENT_KEY); -exports.BLACKDUCK_FIXPR_MAXCOUNT = getInput(constants.BLACKDUCK_FIXPR_MAXCOUNT_KEY, constants.BLACKDUCK_FIXPR_MAXCOUNT_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_FIXPR_MAXCOUNT_KEY); -exports.BLACKDUCK_FIXPR_CREATE_SINGLE_PR = getInput(constants.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY, constants.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY); -exports.BLACKDUCK_FIXPR_FILTER_SEVERITIES = getDelimitedInput(constants.BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY, constants.BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY); -exports.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE = getDelimitedInput(constants.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY, constants.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY); -exports.BLACKDUCK_REPORTS_SARIF_CREATE = getInput(constants.BLACKDUCK_REPORTS_SARIF_CREATE_KEY, constants.BLACKDUCK_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_REPORTS_SARIF_CREATE_KEY); -exports.BLACKDUCK_REPORTS_SARIF_FILE_PATH = getInput(constants.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY, constants.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY); -exports.BLACKDUCK_PROJECT_DIRECTORY = getInput(constants.PROJECT_DIRECTORY_KEY, constants.BLACKDUCK_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR, null); -exports.BLACKDUCK_REPORTS_SARIF_SEVERITIES = getDelimitedInput(constants.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY, constants.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY); -exports.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES = getInput(constants.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY, constants.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES); -exports.BLACKDUCK_SEARCH_DEPTH = getArbitraryInputs(constants.BLACKDUCK_SEARCH_DEPTH_KEY, constants.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR_FOR_SRM); -exports.BLACKDUCK_CONFIG_PATH = getArbitraryInputs(constants.BLACKDUCK_CONFIG_PATH_KEY, constants.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM); -exports.BLACKDUCK_ARGS = getArbitraryInputs(constants.BLACKDUCK_ARGS_KEY, constants.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM); -//SRM inputs -exports.SRM_URL = getInput(constants.SRM_URL_KEY, constants.SRM_URL_KEY_CLASSIC_EDITOR, null); -exports.SRM_APIKEY = getInput(constants.SRM_APIKEY_KEY, constants.SRM_APIKEY_KEY_CLASSIC_EDITOR, null); -exports.SRM_ASSESSMENT_TYPES = getDelimitedInput(constants.SRM_ASSESSMENT_TYPES_KEY, constants.SRM_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR, null); -exports.SRM_PROJECT_NAME = getInput(constants.SRM_PROJECT_NAME_KEY, constants.SRM_PROJECT_NAME_KEY_CLASSIC_EDITOR, null); -exports.SRM_PROJECT_ID = getInput(constants.SRM_PROJECT_ID_KEY, constants.SRM_PROJECT_ID_KEY_CLASSIC_EDITOR, null); -exports.SRM_BRANCH_NAME = getInput(constants.SRM_BRANCH_NAME_KEY, constants.SRM_BRANCH_NAME_KEY_CLASSIC_EDITOR, null); -exports.SRM_BRANCH_PARENT = getInput(constants.SRM_BRANCH_PARENT_KEY, constants.SRM_BRANCH_PARENT_KEY_CLASSIC_EDITOR, null); -exports.SRM_PROJECT_DIRECTORY = getInput(constants.PROJECT_DIRECTORY_KEY, constants.SRM_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR, null); -exports.RETURN_STATUS = ((_b = taskLib.getInput(constants.RETURN_STATUS_KEY)) === null || _b === void 0 ? void 0 : _b.trim()) || "true"; -exports.MARK_BUILD_STATUS = getInput(constants.MARK_BUILD_STATUS_KEY, constants.MARK_BUILD_STATUS_KEY_CLASSIC_EDITOR, null); - - -/***/ }), - -/***/ 3655: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.AZURE_BUILD_REASON = exports.AZURE_ENVIRONMENT_VARIABLES = void 0; -exports.AZURE_ENVIRONMENT_VARIABLES = { - AZURE_ORGANIZATION: "System.TeamFoundationCollectionUri", - AZURE_PROJECT: "System.TeamProject", - AZURE_REPOSITORY: "Build.Repository.Name", - AZURE_SOURCE_BRANCH: "Build.SourceBranch", - AZURE_PULL_REQUEST_NUMBER: "System.PullRequest.PullRequestId", - AZURE_PULL_REQUEST_TARGET_BRANCH: "System.PullRequest.TargetBranch", - AZURE_BUILD_REASON: "Build.Reason", - AZURE_PULL_REQUEST_SOURCE_BRANCH: "System.PullRequest.SourceBranch", -}; -var AZURE_BUILD_REASON; -(function (AZURE_BUILD_REASON) { - AZURE_BUILD_REASON["PULL_REQUEST"] = "PullRequest"; - AZURE_BUILD_REASON["MANUAL"] = "Manual"; -})(AZURE_BUILD_REASON = exports.AZURE_BUILD_REASON || (exports.AZURE_BUILD_REASON = {})); - - -/***/ }), - -/***/ 5467: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES = void 0; -var BLACKDUCK_SCAN_FAILURE_SEVERITIES; -(function (BLACKDUCK_SCAN_FAILURE_SEVERITIES) { - BLACKDUCK_SCAN_FAILURE_SEVERITIES["ALL"] = "ALL"; - BLACKDUCK_SCAN_FAILURE_SEVERITIES["NONE"] = "NONE"; - BLACKDUCK_SCAN_FAILURE_SEVERITIES["BLOCKER"] = "BLOCKER"; - BLACKDUCK_SCAN_FAILURE_SEVERITIES["CRITICAL"] = "CRITICAL"; - BLACKDUCK_SCAN_FAILURE_SEVERITIES["MAJOR"] = "MAJOR"; - BLACKDUCK_SCAN_FAILURE_SEVERITIES["MINOR"] = "MINOR"; - BLACKDUCK_SCAN_FAILURE_SEVERITIES["OK"] = "OK"; - BLACKDUCK_SCAN_FAILURE_SEVERITIES["TRIVIAL"] = "TRIVIAL"; - BLACKDUCK_SCAN_FAILURE_SEVERITIES["UNSPECIFIED"] = "UNSPECIFIED"; -})(BLACKDUCK_SCAN_FAILURE_SEVERITIES = exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES || (exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES = {})); - - -/***/ }), - -/***/ 9073: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.POLARIS_ASSESSMENT_MODES = void 0; -var POLARIS_ASSESSMENT_MODES; -(function (POLARIS_ASSESSMENT_MODES) { - POLARIS_ASSESSMENT_MODES["CI"] = "CI"; - POLARIS_ASSESSMENT_MODES["SOURCE_UPLOAD"] = "SOURCE_UPLOAD"; - POLARIS_ASSESSMENT_MODES["SOURCEUPLOAD"] = "SOURCEUPLOAD"; -})(POLARIS_ASSESSMENT_MODES = exports.POLARIS_ASSESSMENT_MODES || (exports.POLARIS_ASSESSMENT_MODES = {})); + getLatestVersionUrl() { + const osName = process.platform; + let bridgeDownloadUrl = this.bridgeUrlLatestPattern; + if (osName === "darwin") { + const cpuInfo = os_1.default.cpus(); + taskLib.debug(`cpuInfo :: ${JSON.stringify(cpuInfo)}`); + const isIntel = cpuInfo[0].model.includes("Intel"); + const osSuffix = isIntel + ? constants.MAC_INTEL_PLATFORM + : constants.MAC_ARM_PLATFORM; + bridgeDownloadUrl = bridgeDownloadUrl.replace("$platform", osSuffix); + } + else if (osName === "linux") { + bridgeDownloadUrl = bridgeDownloadUrl.replace("$platform", constants.LINUX_PLATFORM); + } + else if (osName === "win32") { + bridgeDownloadUrl = bridgeDownloadUrl.replace("$platform", constants.WINDOWS_PLATFORM); + } + return bridgeDownloadUrl; + } + setBridgeExecutablePath(filePath) { + return __awaiter(this, void 0, void 0, function* () { + if (process.platform === "win32") { + this.bridgeExecutablePath = path.join(filePath, constants.BRIDGE_CLI_EXECUTABLE_WINDOWS); + } + else if (process.platform === "darwin" || process.platform === "linux") { + this.bridgeExecutablePath = path.join(filePath, constants.BRIDGE_CLI_EXECUTABLE_MAC_LINUX); + } + return this.bridgeExecutablePath; + }); + } + //contains executable path with extension file + getBridgePath() { + return __awaiter(this, void 0, void 0, function* () { + let bridgeDirectoryPath = this.getBridgeDefaultPath(); + if (input_1.BRIDGE_CLI_INSTALL_DIRECTORY_KEY) { + bridgeDirectoryPath = input_1.BRIDGE_CLI_INSTALL_DIRECTORY_KEY; + console.info("Looking for bridge in Bridge CLI Install Directory"); + if (!taskLib.exist(bridgeDirectoryPath)) { + throw new Error("Bridge CLI Install Directory does not exist" + .concat(constants.SPACE) + .concat(ErrorCodes_1.ErrorCode.BRIDGE_INSTALL_DIRECTORY_NOT_EXIST.toString())); + } + } + else { + console.info("Looking for Bridge CLI in default path"); + if (input_1.ENABLE_NETWORK_AIRGAP && this.getBridgeDefaultPath()) { + if (!taskLib.exist(this.getBridgeDefaultPath())) { + throw new Error("Bridge CLI default directory does not exist" + .concat(constants.SPACE) + .concat(ErrorCodes_1.ErrorCode.DEFAULT_DIRECTORY_NOT_FOUND.toString())); + } + } + } + return bridgeDirectoryPath; + }); + } + retrySleepHelper(message, retryCountLocal, retryDelay) { + return __awaiter(this, void 0, void 0, function* () { + console.info(message + .concat(String(retryCountLocal)) + .concat(", Waiting: ") + .concat(String(retryDelay / 1000)) + .concat(" Seconds")); + yield (0, utility_1.sleep)(retryDelay); + // Delayed exponentially starting from 15 seconds + retryDelay = retryDelay * 2; + return retryDelay; + }); + } +} +exports.Bridge = Bridge; /***/ }), -/***/ 403: +/***/ 2926: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -1403,511 +1242,593 @@ var __importStar = (this && this.__importStar) || function (mod) { __setModuleDefault(result, mod); return result; }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SynopsysBridge = void 0; -const path = __importStar(__nccwpck_require__(1017)); +exports.uploadSarifResultAsArtifact = exports.uploadDiagnostics = void 0; const taskLib = __importStar(__nccwpck_require__(347)); -const HttpClient_1 = __nccwpck_require__(5538); -const tools_parameter_1 = __nccwpck_require__(6233); -const utility_1 = __nccwpck_require__(837); -const validator_1 = __nccwpck_require__(6717); const constants = __importStar(__nccwpck_require__(3051)); -const inputs = __importStar(__nccwpck_require__(7533)); -const utility_2 = __nccwpck_require__(837); -const fs_1 = __nccwpck_require__(7147); -const dom_parser_1 = __importDefault(__nccwpck_require__(9592)); -const input_1 = __nccwpck_require__(7533); -const application_constant_1 = __nccwpck_require__(3051); -const os_1 = __importDefault(__nccwpck_require__(2037)); -const semver_1 = __importDefault(__nccwpck_require__(1383)); -const ErrorCodes_1 = __nccwpck_require__(4487); -class SynopsysBridge { - constructor() { - this.bridgeExecutablePath = ""; - this.bridgeArtifactoryURL = - "https://sig-repo.synopsys.com/artifactory/bds-integrations-release/com/synopsys/integration/synopsys-bridge"; - this.bridgeUrlPattern = this.bridgeArtifactoryURL.concat("/$version/synopsys-bridge-$version-$platform.zip"); - this.bridgeUrlLatestPattern = this.bridgeArtifactoryURL.concat("/latest/synopsys-bridge-$platform.zip"); - } - extractBridge(fileInfo) { - return __awaiter(this, void 0, void 0, function* () { - const extractZippedFilePath = inputs.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY || - this.getBridgeDefaultPath(); - // Clear the existing bridge, if available - if (taskLib.exist(extractZippedFilePath)) { - yield taskLib.rmRF(extractZippedFilePath); - } - yield (0, utility_2.extractZipped)(fileInfo.filePath, extractZippedFilePath); - return Promise.resolve(extractZippedFilePath); - }); - } - executeBridgeCommand(executablePath, workspace, command) { - return __awaiter(this, void 0, void 0, function* () { - taskLib.debug("extractedPath: ".concat(executablePath)); - const executableBridgePath = yield this.setBridgeExecutablePath(executablePath); - if (!taskLib.exist(executableBridgePath)) { - throw new Error("Synopsys Bridge executable file could not be found at " - .concat(executableBridgePath) - .concat(constants.SPACE) - .concat(ErrorCodes_1.ErrorCode.BRIDGE_EXECUTABLE_NOT_FOUND.toString())); - } - try { - return yield taskLib.exec(executableBridgePath, command, { - cwd: workspace, - }); - } - catch (errorObject) { - taskLib.debug("errorObject:" + errorObject); - throw errorObject; - } - }); - } - prepareCommand(tempDir) { - return __awaiter(this, void 0, void 0, function* () { - try { - let formattedCommand = ""; - const invalidParams = (0, validator_1.validateScanTypes)(); - if (invalidParams.length === 4) { - return Promise.reject(new Error("Requires at least one scan type: (" - .concat(constants.POLARIS_SERVER_URL_KEY) - .concat(",") - .concat(constants.COVERITY_URL_KEY) - .concat(",") - .concat(constants.BLACKDUCK_URL_KEY) - .concat(",") - .concat(constants.SRM_URL_KEY) - .concat(")") - .concat(constants.SPACE) - .concat(ErrorCodes_1.ErrorCode.MISSING_AT_LEAST_ONE_SCAN_TYPE.toString()))); - } - let classicEditorErrors = []; - let polarisErrors = []; - let coverityErrors = []; - let blackduckErrors = []; - let srmErrors = []; - if (input_1.SCAN_TYPE.length > 0) { - // To support single scan using Classic Editor - [formattedCommand, classicEditorErrors] = - yield this.formatCommandForClassicEditor(formattedCommand, tempDir); - } - else { - // To support multi-scan using YAML - [formattedCommand, polarisErrors] = yield this.preparePolarisCommand(formattedCommand, tempDir); - [formattedCommand, coverityErrors] = yield this.prepareBlackduckCommand(formattedCommand, tempDir); - [formattedCommand, blackduckErrors] = yield this.prepareCoverityCommand(formattedCommand, tempDir); - [formattedCommand, srmErrors] = yield this.prepareSrmCommand(formattedCommand, tempDir); - } - let validationErrors = []; - validationErrors = validationErrors.concat(polarisErrors, coverityErrors, blackduckErrors, srmErrors, classicEditorErrors); - if (formattedCommand.length === 0) { - return Promise.reject(new Error(validationErrors.join(","))); - } - if (validationErrors.length > 0) { - console.log(new Error(validationErrors.join(","))); - } - if ((0, utility_2.parseToBoolean)(inputs.INCLUDE_DIAGNOSTICS)) { - formattedCommand = formattedCommand - .concat(tools_parameter_1.SynopsysToolsParameter.SPACE) - .concat(tools_parameter_1.SynopsysToolsParameter.DIAGNOSTICS_OPTION); - } - console.log("Formatted command is - ".concat(formattedCommand)); - return Promise.resolve(formattedCommand); - } - catch (e) { - const errorObject = e; - taskLib.debug(errorObject.stack === undefined ? "" : errorObject.stack.toString()); - return Promise.reject(errorObject); - } - }); +const path = __importStar(__nccwpck_require__(1017)); +const utility_1 = __nccwpck_require__(837); +function uploadDiagnostics(workspaceDir) { + const uploadArtifactPath = path.join(workspaceDir, constants.BRIDGE_LOCAL_DIRECTORY); + let isBridgeDirectoryExists = false; + isBridgeDirectoryExists = taskLib.exist(uploadArtifactPath); + if (isBridgeDirectoryExists) { + taskLib.uploadArtifact(constants.UPLOAD_FOLDER_ARTIFACT_NAME, uploadArtifactPath, constants.UPLOAD_FOLDER_ARTIFACT_NAME); } - formatCommandForClassicEditor(formattedCommand, tempDir) { - return __awaiter(this, void 0, void 0, function* () { - let errors = []; - if (input_1.SCAN_TYPE == "polaris") { - [formattedCommand, errors] = yield this.preparePolarisCommand(formattedCommand, tempDir); - } - else if (input_1.SCAN_TYPE == "blackduck") { - [formattedCommand, errors] = yield this.prepareBlackduckCommand(formattedCommand, tempDir); - } - else if (input_1.SCAN_TYPE == "coverity") { - [formattedCommand, errors] = yield this.prepareCoverityCommand(formattedCommand, tempDir); - } - else if (input_1.SCAN_TYPE == "srm") { - [formattedCommand, errors] = yield this.prepareSrmCommand(formattedCommand, tempDir); - } - return [formattedCommand, errors]; - }); +} +exports.uploadDiagnostics = uploadDiagnostics; +function uploadSarifResultAsArtifact(defaultSarifReportDirectory, userSarifFilePath) { + const sarifFilePath = userSarifFilePath + ? userSarifFilePath + : (0, utility_1.getDefaultSarifReportPath)(defaultSarifReportDirectory, true); + let isSarifReportDirectoryExists = false; + isSarifReportDirectoryExists = taskLib.exist(sarifFilePath); + if (isSarifReportDirectoryExists) { + console.log(`Uploading SARIF report as artifact from: ${sarifFilePath}`); + taskLib.uploadArtifact(constants.SARIF_UPLOAD_FOLDER_ARTIFACT_NAME, sarifFilePath, constants.SARIF_UPLOAD_FOLDER_ARTIFACT_NAME); + console.log("Upload SARIF report successfully in the artifact"); } - prepareSrmCommand(formattedCommand, tempDir) { - return __awaiter(this, void 0, void 0, function* () { - const srmErrors = (0, validator_1.validateSrmInputs)(); - if (srmErrors.length === 0 && inputs.SRM_URL) { - const commandFormatter = new tools_parameter_1.SynopsysToolsParameter(tempDir); - formattedCommand = formattedCommand.concat(yield commandFormatter.getFormattedCommandForSrm()); - } - return [formattedCommand, srmErrors]; - }); + else { + console.log(`Uploading SARIF report as artifact failed as file path not found at: ${sarifFilePath}`); } - preparePolarisCommand(formattedCommand, tempDir) { - return __awaiter(this, void 0, void 0, function* () { - // validating and preparing command for polaris - const polarisErrors = (0, validator_1.validatePolarisInputs)(); - const commandFormatter = new tools_parameter_1.SynopsysToolsParameter(tempDir); - if (polarisErrors.length === 0 && inputs.POLARIS_SERVER_URL) { - formattedCommand = formattedCommand.concat(yield commandFormatter.getFormattedCommandForPolaris()); - } - return [formattedCommand, polarisErrors]; - }); +} +exports.uploadSarifResultAsArtifact = uploadSarifResultAsArtifact; + + +/***/ }), + +/***/ 9510: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; } - prepareCoverityCommand(formattedCommand, tempDir) { - return __awaiter(this, void 0, void 0, function* () { - // validating and preparing command for coverity - const coverityErrors = (0, validator_1.validateCoverityInputs)(); - if (coverityErrors.length === 0 && inputs.COVERITY_URL) { - const coverityCommandFormatter = new tools_parameter_1.SynopsysToolsParameter(tempDir); - formattedCommand = formattedCommand.concat(yield coverityCommandFormatter.getFormattedCommandForCoverity()); + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports._getFileSizeOnDisk = exports.downloadTool = exports.debug = void 0; +const httpm = __importStar(__nccwpck_require__(5538)); +const path = __importStar(__nccwpck_require__(1017)); +const fs = __importStar(__nccwpck_require__(7147)); +const tl = __importStar(__nccwpck_require__(347)); +const constants = __importStar(__nccwpck_require__(3051)); +const ErrorCodes_1 = __nccwpck_require__(4487); +const userAgent = "BlackDuckSecurityScan"; +const requestOptions = { + // ignoreSslError: true, + proxy: tl.getHttpProxyConfiguration(), + cert: tl.getHttpCertConfiguration(), + allowRedirects: true, + allowRetries: true, +}; +function debug(message) { + tl.debug(message); +} +exports.debug = debug; +/** + * Download a tool from an url and stream it into a file + * + * @param url url of tool to download + * @param fileName optional fileName. Should typically not use (will be a guid for reliability). Can pass fileName with an absolute path. + * @param handlers optional handlers array. Auth handlers to pass to the HttpClient for the tool download. + * @param additionalHeaders optional custom HTTP headers. This is passed to the REST client that downloads the tool. + */ +function downloadTool(url, fileName, handlers, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + // check if it's an absolute path already + let destPath; + if (path.isAbsolute(fileName)) { + destPath = fileName; } - return [formattedCommand, coverityErrors]; - }); - } - prepareBlackduckCommand(formattedCommand, tempDir) { - return __awaiter(this, void 0, void 0, function* () { - const blackduckErrors = (0, validator_1.validateBlackDuckInputs)(); - if (blackduckErrors.length === 0 && inputs.BLACKDUCK_URL) { - const blackDuckCommandFormatter = new tools_parameter_1.SynopsysToolsParameter(tempDir); - formattedCommand = formattedCommand.concat(yield blackDuckCommandFormatter.getFormattedCommandForBlackduck()); + else { + destPath = path.join(_getAgentTemp(), fileName); } - return [formattedCommand, blackduckErrors]; - }); - } - validateBridgeVersion(version) { - return __awaiter(this, void 0, void 0, function* () { - const versions = yield this.getAllAvailableBridgeVersions(); - return Promise.resolve(versions.indexOf(version.trim()) !== -1); - }); - } - downloadAndExtractBridge(tempDir) { - return __awaiter(this, void 0, void 0, function* () { try { - const bridgeUrl = yield this.getBridgeUrl(); - if (bridgeUrl != "" && bridgeUrl != null) { - const downloadBridge = yield (0, utility_2.getRemoteFile)(tempDir, bridgeUrl); - console.info("Download of Synopsys Bridge completed"); - // Extracting bridge - return yield this.extractBridge(downloadBridge); - } - if (inputs.BRIDGE_DOWNLOAD_VERSION && - (yield this.checkIfSynopsysBridgeVersionExists(inputs.BRIDGE_DOWNLOAD_VERSION))) { - return Promise.resolve(this.bridgeExecutablePath); + const http = new httpm.HttpClient(userAgent, handlers, requestOptions); + tl.debug(fileName); + // make sure that the folder exists + tl.mkdirP(path.dirname(destPath)); + tl.debug(tl.loc("TOOL_LIB_Downloading", url)); + tl.debug("destination " + destPath); + if (fs.existsSync(destPath)) { + tl.debug("Destination file path already exists"); + _deleteFile(destPath); } - return this.bridgeExecutablePath; - } - catch (e) { - const errorObject = e.message; - if (errorObject.includes("404") || - errorObject.toLowerCase().includes("invalid url")) { - return Promise.reject(new Error("Provided Synopsys Bridge url is not valid for the configured " - .concat(process.platform, " runner") + const response = yield http.get(url, additionalHeaders); + if (response.message.statusCode != 200) { + tl.debug(`Failed to download "${fileName}" from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + reject(new Error("Failed to download Bridge CLI zip from specified URL. HTTP status code: " + .concat(String(response.message.statusCode)) .concat(constants.SPACE) - .concat(ErrorCodes_1.ErrorCode.INVALID_SYNOPSYS_BRIDGE_URL.toString()))); + .concat(ErrorCodes_1.ErrorCode.DOWNLOAD_FAILED_WITH_HTTP_STATUS_CODE.toString()))); } - else if (errorObject.toLowerCase().includes("empty")) { - return Promise.reject(new Error("Provided Synopsys Bridge URL cannot be empty" - .concat(constants.SPACE) - .concat(ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_URL_CANNOT_BE_EMPTY.toString()))); + const downloadedContentLength = _getContentLengthOfDownloadedFile(response); + if (!isNaN(downloadedContentLength)) { + tl.debug(`Content-Length of downloaded file: ${downloadedContentLength}`); } else { - return Promise.reject(new Error(errorObject)); - } - } - }); - } - getBridgeUrl() { - return __awaiter(this, void 0, void 0, function* () { - let bridgeUrl; - let version = ""; - if (inputs.BRIDGE_DOWNLOAD_URL) { - bridgeUrl = inputs.BRIDGE_DOWNLOAD_URL; - if (!(0, validator_1.validateBridgeUrl)(inputs.BRIDGE_DOWNLOAD_URL)) { - return Promise.reject(new Error("Invalid URL" - .concat(constants.SPACE) - .concat(ErrorCodes_1.ErrorCode.INVALID_URL.toString()))); + tl.debug(`Content-Length header missing`); } - // To check whether bridge already exists with same version mentioned in bridge url - const versionsArray = bridgeUrl.match(".*synopsys-bridge-([0-9.]*).*"); - if (versionsArray) { - version = versionsArray[1]; - if (!version) { - const regex = /\w*(synopsys-bridge-(win64|linux64|macosx|macos_arm).zip)/; - version = yield this.getSynopsysBridgeVersionFromLatestURL(bridgeUrl.replace(regex, "versions.txt")); + tl.debug("creating stream"); + const file = fs.createWriteStream(destPath); + file + .on("open", () => __awaiter(this, void 0, void 0, function* () { + try { + response.message + .on("error", (err) => { + file.end(); + reject(err); + }) + .pipe(file); } - } - } - else if (inputs.BRIDGE_DOWNLOAD_VERSION) { - if (yield this.validateBridgeVersion(inputs.BRIDGE_DOWNLOAD_VERSION)) { - bridgeUrl = this.getVersionUrl(inputs.BRIDGE_DOWNLOAD_VERSION.trim()).trim(); - version = inputs.BRIDGE_DOWNLOAD_VERSION; - } - else { - return Promise.reject(new Error("Provided Synopsys Bridge version not found in artifactory" - .concat(constants.SPACE) - .concat(ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_VERSION_NOT_FOUND.toString()))); - } - } - else { - taskLib.debug("Checking for latest version of Synopsys Bridge to download and configure"); - version = yield this.getSynopsysBridgeVersionFromLatestURL(this.bridgeArtifactoryURL.concat("/latest/versions.txt")); - bridgeUrl = this.getLatestVersionUrl(); - } - if (version != "") { - if (yield this.checkIfSynopsysBridgeVersionExists(version)) { - console.log("Skipping download as same Synopsys Bridge version found"); - return Promise.resolve(""); - } - } - console.info("Downloading and configuring Synopsys Bridge"); - console.info("Synopsys Bridge URL is - ".concat(bridgeUrl)); - return bridgeUrl; - }); - } - checkIfSynopsysBridgeVersionExists(bridgeVersion) { - return __awaiter(this, void 0, void 0, function* () { - this.bridgeExecutablePath = yield this.getSynopsysBridgePath(); - const osName = process.platform; - let versionFilePath; - if (osName === "win32") { - versionFilePath = this.bridgeExecutablePath.concat("\\versions.txt"); - } - else { - versionFilePath = this.bridgeExecutablePath.concat("/versions.txt"); - } - if (taskLib.exist(versionFilePath) && this.bridgeExecutablePath) { - taskLib.debug("Synopsys Bridge executable found at ".concat(this.bridgeExecutablePath)); - taskLib.debug("Version file found at ".concat(this.bridgeExecutablePath)); - if (yield this.checkIfVersionExists(bridgeVersion, versionFilePath)) { - return Promise.resolve(true); - } - } - else { - taskLib.debug("Synopsys Bridge version file could not be found at ".concat(this.bridgeExecutablePath)); - } - return Promise.resolve(false); - }); - } - getAllAvailableBridgeVersions() { - return __awaiter(this, void 0, void 0, function* () { - let htmlResponse = ""; - const httpClient = new HttpClient_1.HttpClient("synopsys-task"); - let retryCountLocal = application_constant_1.RETRY_COUNT; - let httpResponse; - let retryDelay = application_constant_1.RETRY_DELAY_IN_MILLISECONDS; - const versionArray = []; - do { - httpResponse = yield httpClient.get(this.bridgeArtifactoryURL, { - Accept: "text/html", - }); - if (!application_constant_1.NON_RETRY_HTTP_CODES.has(Number(httpResponse.message.statusCode))) { - retryDelay = yield this.retrySleepHelper("Getting all available bridge versions has been failed, Retries left: ", retryCountLocal, retryDelay); - retryCountLocal--; - } - else { - retryCountLocal = 0; - htmlResponse = yield httpResponse.readBody(); - const domParser = new dom_parser_1.default(); - const doms = domParser.parseFromString(htmlResponse); - const elems = doms.getElementsByTagName("a"); //querySelectorAll('a') - if (elems != null) { - for (const el of elems) { - const content = el.textContent; - if (content != null) { - const v = content.match("^[0-9]+.[0-9]+.[0-9]+"); - if (v != null && v.length === 1) { - versionArray.push(v[0]); - } - } - } + catch (err) { + reject(err); } - } - if (retryCountLocal === 0 && !(versionArray.length > 0)) { - taskLib.warning("Unable to retrieve the Synopsys Bridge Versions from Artifactory"); - } - } while (retryCountLocal > 0); - return versionArray; - }); - } - checkIfVersionExists(bridgeVersion, bridgeVersionFilePath) { - return __awaiter(this, void 0, void 0, function* () { - try { - const contents = (0, fs_1.readFileSync)(bridgeVersionFilePath, "utf-8"); - return contents.includes("Synopsys Bridge Package: ".concat(bridgeVersion)); - } - catch (e) { - console.info("Error reading version file content: ".concat(e.message)); - } - return false; - }); - } - getSynopsysBridgeVersionFromLatestURL(latestVersionsUrl) { - return __awaiter(this, void 0, void 0, function* () { - try { - const httpClient = new HttpClient_1.HttpClient(""); - let retryCountLocal = application_constant_1.RETRY_COUNT; - let retryDelay = application_constant_1.RETRY_DELAY_IN_MILLISECONDS; - let httpResponse; - do { - httpResponse = yield httpClient.get(latestVersionsUrl, { - Accept: "text/html", - }); - if (!application_constant_1.NON_RETRY_HTTP_CODES.has(Number(httpResponse.message.statusCode))) { - retryDelay = yield this.retrySleepHelper("Getting latest Synopsys Bridge versions has been failed, Retries left: ", retryCountLocal, retryDelay); - retryCountLocal--; + })) + .on("error", (err) => { + file.end(); + reject(err); + }) + .on("close", () => { + let fileSizeInBytes; + try { + fileSizeInBytes = _getFileSizeOnDisk(destPath); } - else if (httpResponse.message.statusCode === 200) { - retryCountLocal = 0; - const htmlResponse = (yield httpResponse.readBody()).trim(); - const lines = htmlResponse.split("\n"); - for (const line of lines) { - if (line.includes("Synopsys Bridge Package")) { - return line.split(":")[1].trim(); - } - } + catch (err) { + const error = err; + fileSizeInBytes = NaN; + tl.warning(`Unable to check file size of ${destPath} due to error: ${error.message}`); } - if (retryCountLocal == 0) { - taskLib.warning("Unable to retrieve the most recent version from Artifactory URL"); + if (!isNaN(fileSizeInBytes)) { + tl.debug(`Downloaded file size: ${fileSizeInBytes} bytes`); } - } while (retryCountLocal > 0); + else { + tl.debug(`File size on disk was not found`); + } + if (!isNaN(downloadedContentLength) && + !isNaN(fileSizeInBytes) && + fileSizeInBytes !== downloadedContentLength) { + const errMsg = `Content-Length (${downloadedContentLength} bytes) did not match downloaded file size (${fileSizeInBytes} bytes).`; + tl.warning(errMsg); + reject(errMsg + .concat(constants.SPACE) + .concat(ErrorCodes_1.ErrorCode.CONTENT_LENGTH_MISMATCH.toString())); + } + resolve(destPath); + }); } - catch (e) { - taskLib.debug("Error reading version file content: ".concat(e.message)); + catch (error) { + _deleteFile(destPath); + throw error; } - return ""; - }); + })); + }); +} +exports.downloadTool = downloadTool; +/** + * Gets size of downloaded file from "Content-Length" header + * + * @param response response for request to get the file + * @returns number if the 'content-length' is not empty, otherwise NaN + */ +function _getContentLengthOfDownloadedFile(response) { + const contentLengthHeader = response.message.headers["content-length"]; + return parseInt(contentLengthHeader); +} +/** + * Gets size of file saved to disk + * + * @param filePath the path to the file, saved to the disk + * @returns size of file saved to disk + */ +function _getFileSizeOnDisk(filePath) { + return fs.statSync(filePath).size; +} +exports._getFileSizeOnDisk = _getFileSizeOnDisk; +function _getAgentTemp() { + tl.assertAgent("2.115.0"); + const tempDirectory = tl.getVariable("Agent.TempDirectory"); + if (!tempDirectory) { + throw new Error("Agent.TempDirectory is not set" + .concat(constants.SPACE) + .concat(ErrorCodes_1.ErrorCode.AGENT_TEMP_DIRECTORY_NOT_SET.toString())); } - getBridgeDefaultPath() { - let bridgeDefaultPath = ""; - const osName = process.platform; - if (osName === "darwin") { - bridgeDefaultPath = path.join(process.env["HOME"], constants.SYNOPSYS_BRIDGE_DEFAULT_PATH_MAC); - } - else if (osName === "linux") { - bridgeDefaultPath = path.join(process.env["HOME"], constants.SYNOPSYS_BRIDGE_DEFAULT_PATH_LINUX); - } - else if (osName === "win32") { - bridgeDefaultPath = path.join(process.env["USERPROFILE"], constants.SYNOPSYS_BRIDGE_DEFAULT_PATH_WINDOWS); + return tempDirectory; +} +function _deleteFile(filePath) { + try { + if (fs.existsSync(filePath)) { + fs.rmSync(filePath); + tl.debug(`Removed unfinished downloaded file`); } - taskLib.debug("bridgeDefaultPath:" + bridgeDefaultPath); - return bridgeDefaultPath; } - // Get bridge version url - getVersionUrl(version) { - const osName = process.platform; - let bridgeDownloadUrl = this.bridgeUrlPattern.replace("$version", version); - bridgeDownloadUrl = bridgeDownloadUrl.replace("$version", version); - if (osName === "darwin") { - const isValidVersionForARM = semver_1.default.gte(version, constants.MIN_SUPPORTED_SYNOPSYS_BRIDGE_MAC_ARM_VERSION); - let osSuffix = constants.MAC_INTEL_PLATFORM; - if (isValidVersionForARM) { - const cpuInfo = os_1.default.cpus(); - taskLib.debug(`cpuInfo :: ${JSON.stringify(cpuInfo)}`); - const isIntel = cpuInfo[0].model.includes("Intel"); - osSuffix = isIntel - ? constants.MAC_INTEL_PLATFORM - : constants.MAC_ARM_PLATFORM; - } - bridgeDownloadUrl = bridgeDownloadUrl.replace("$platform", osSuffix); - } - else if (osName === "linux") { - bridgeDownloadUrl = bridgeDownloadUrl.replace("$platform", constants.LINUX_PLATFORM); - } - else if (osName === "win32") { - bridgeDownloadUrl = bridgeDownloadUrl.replace("$platform", constants.WINDOWS_PLATFORM); - } - return bridgeDownloadUrl; + catch (err) { + tl.debug(`Failed to delete '${filePath}'. ${err}`); } - getLatestVersionUrl() { - const osName = process.platform; - let bridgeDownloadUrl = this.bridgeUrlLatestPattern; - if (osName === "darwin") { - const cpuInfo = os_1.default.cpus(); - taskLib.debug(`cpuInfo :: ${JSON.stringify(cpuInfo)}`); - const isIntel = cpuInfo[0].model.includes("Intel"); - const osSuffix = isIntel - ? constants.MAC_INTEL_PLATFORM - : constants.MAC_ARM_PLATFORM; - bridgeDownloadUrl = bridgeDownloadUrl.replace("$platform", osSuffix); - } - else if (osName === "linux") { - bridgeDownloadUrl = bridgeDownloadUrl.replace("$platform", constants.LINUX_PLATFORM); +} + + +/***/ }), + +/***/ 3825: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BuildStatus = void 0; +var BuildStatus; +(function (BuildStatus) { + BuildStatus["Failed"] = "Failed"; + BuildStatus["SucceededWithIssues"] = "SucceededWithIssues"; + BuildStatus["Succeeded"] = "Succeeded"; +})(BuildStatus = exports.BuildStatus || (exports.BuildStatus = {})); + + +/***/ }), + +/***/ 4487: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ErrorCode = void 0; +var ErrorCode; +(function (ErrorCode) { + ErrorCode[ErrorCode["SUCCESSFULLY_COMPLETED"] = 0] = "SUCCESSFULLY_COMPLETED"; + ErrorCode[ErrorCode["UNDEFINED_ERROR_FROM_BRIDGE"] = 1] = "UNDEFINED_ERROR_FROM_BRIDGE"; + ErrorCode[ErrorCode["ADAPTER_ERROR"] = 2] = "ADAPTER_ERROR"; + ErrorCode[ErrorCode["BRIDGE_SHUTDOWN_FAILURE"] = 3] = "BRIDGE_SHUTDOWN_FAILURE"; + ErrorCode[ErrorCode["BRIDGE_BREAK_ENABLED"] = 8] = "BRIDGE_BREAK_ENABLED"; + ErrorCode[ErrorCode["BRIDGE_INITIALIZATION_FAILED"] = 9] = "BRIDGE_INITIALIZATION_FAILED"; + // The list of ADO extension related error codes begins below + ErrorCode[ErrorCode["MISSING_AT_LEAST_ONE_SCAN_TYPE"] = 101] = "MISSING_AT_LEAST_ONE_SCAN_TYPE"; + ErrorCode[ErrorCode["MISSING_REQUIRED_PARAMETERS"] = 102] = "MISSING_REQUIRED_PARAMETERS"; + ErrorCode[ErrorCode["AGENT_TEMP_DIRECTORY_NOT_SET"] = 103] = "AGENT_TEMP_DIRECTORY_NOT_SET"; + ErrorCode[ErrorCode["BLACKDUCK_FIXPR_MAX_COUNT_NOT_APPLICABLE"] = 104] = "BLACKDUCK_FIXPR_MAX_COUNT_NOT_APPLICABLE"; + ErrorCode[ErrorCode["INVALID_POLARIS_ASSESSMENT_TYPES"] = 105] = "INVALID_POLARIS_ASSESSMENT_TYPES"; + ErrorCode[ErrorCode["INVALID_BLACKDUCK_FAILURE_SEVERITIES"] = 106] = "INVALID_BLACKDUCK_FAILURE_SEVERITIES"; + ErrorCode[ErrorCode["INVALID_BLACKDUCK_FIXPR_MAXCOUNT"] = 107] = "INVALID_BLACKDUCK_FIXPR_MAXCOUNT"; + ErrorCode[ErrorCode["MISSING_BOOLEAN_VALUE"] = 108] = "MISSING_BOOLEAN_VALUE"; + ErrorCode[ErrorCode["INVALID_BRIDGE_CLI_URL"] = 109] = "INVALID_BRIDGE_CLI_URL"; + ErrorCode[ErrorCode["BRIDGE_CLI_URL_CANNOT_BE_EMPTY"] = 110] = "BRIDGE_CLI_URL_CANNOT_BE_EMPTY"; + ErrorCode[ErrorCode["INVALID_URL"] = 111] = "INVALID_URL"; + ErrorCode[ErrorCode["BRIDGE_CLI_VERSION_NOT_FOUND"] = 112] = "BRIDGE_CLI_VERSION_NOT_FOUND"; + ErrorCode[ErrorCode["BRIDGE_CLI_DOWNLOAD_FAILED"] = 113] = "BRIDGE_CLI_DOWNLOAD_FAILED"; + ErrorCode[ErrorCode["BRIDGE_INSTALL_DIRECTORY_NOT_EXIST"] = 114] = "BRIDGE_INSTALL_DIRECTORY_NOT_EXIST"; + ErrorCode[ErrorCode["DEFAULT_DIRECTORY_NOT_FOUND"] = 115] = "DEFAULT_DIRECTORY_NOT_FOUND"; + ErrorCode[ErrorCode["BRIDGE_EXECUTABLE_NOT_FOUND"] = 116] = "BRIDGE_EXECUTABLE_NOT_FOUND"; + ErrorCode[ErrorCode["WORKSPACE_DIRECTORY_NOT_FOUND"] = 117] = "WORKSPACE_DIRECTORY_NOT_FOUND"; + ErrorCode[ErrorCode["FILE_DOES_NOT_EXIST"] = 118] = "FILE_DOES_NOT_EXIST"; + ErrorCode[ErrorCode["NO_DESTINATION_DIRECTORY"] = 119] = "NO_DESTINATION_DIRECTORY"; + ErrorCode[ErrorCode["FAILED_TO_GET_PULL_REQUEST_INFO_FROM_SOURCE_BRANCH"] = 120] = "FAILED_TO_GET_PULL_REQUEST_INFO_FROM_SOURCE_BRANCH"; + ErrorCode[ErrorCode["MISSING_AZURE_TOKEN"] = 121] = "MISSING_AZURE_TOKEN"; + ErrorCode[ErrorCode["INVALID_COVERITY_INSTALL_DIRECTORY"] = 122] = "INVALID_COVERITY_INSTALL_DIRECTORY"; + ErrorCode[ErrorCode["REQUIRED_COVERITY_STREAM_NAME_FOR_MANUAL_TRIGGER"] = 123] = "REQUIRED_COVERITY_STREAM_NAME_FOR_MANUAL_TRIGGER"; + ErrorCode[ErrorCode["DOWNLOAD_FAILED_WITH_HTTP_STATUS_CODE"] = 124] = "DOWNLOAD_FAILED_WITH_HTTP_STATUS_CODE"; + ErrorCode[ErrorCode["CONTENT_LENGTH_MISMATCH"] = 125] = "CONTENT_LENGTH_MISMATCH"; + ErrorCode[ErrorCode["UNDEFINED_ERROR_FROM_EXTENSION"] = 999] = "UNDEFINED_ERROR_FROM_EXTENSION"; + ErrorCode[ErrorCode["INVALID_SRM_ASSESSMENT_TYPES"] = 126] = "INVALID_SRM_ASSESSMENT_TYPES"; +})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {})); + + +/***/ }), + +/***/ 7533: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var _a, _b; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.COVERITY_ARGS = exports.COVERITY_CONFIG_PATH = exports.COVERITY_CLEAN_COMMAND = exports.COVERITY_BUILD_COMMAND = exports.COVERITY_PROJECT_DIRECTORY = exports.COVERITY_VERSION = exports.COVERITY_AUTOMATION_PRCOMMENT = exports.COVERITY_LOCAL = exports.COVERITY_POLICY_VIEW = exports.COVERITY_EXECUTION_PATH = exports.COVERITY_INSTALL_DIRECTORY = exports.COVERITY_STREAM_NAME = exports.COVERITY_PROJECT_NAME = exports.COVERITY_USER_PASSWORD = exports.COVERITY_USER = exports.COVERITY_URL = exports.POLARIS_REPORTS_SARIF_ISSUE_TYPES = exports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES = exports.POLARIS_REPORTS_SARIF_SEVERITIES = exports.POLARIS_REPORTS_SARIF_FILE_PATH = exports.POLARIS_REPORTS_SARIF_CREATE = exports.POLARIS_PR_COMMENT_SEVERITIES = exports.POLARIS_PR_COMMENT_ENABLED = exports.PROJECT_SOURCE_EXCLUDES = exports.PROJECT_SOURCE_PRESERVE_SYM_LINKS = exports.PROJECT_SOURCE_ARCHIVE = exports.POLARIS_PROJECT_DIRECTORY = exports.POLARIS_ASSESSMENT_MODE = exports.POLARIS_TEST_SCA_TYPE = exports.POLARIS_BRANCH_PARENT_NAME = exports.POLARIS_BRANCH_NAME = exports.POLARIS_TRIAGE = exports.POLARIS_ASSESSMENT_TYPES = exports.POLARIS_PROJECT_NAME = exports.POLARIS_APPLICATION_NAME = exports.POLARIS_ACCESS_TOKEN = exports.POLARIS_SERVER_URL = exports.SCAN_TYPE = exports.AZURE_TOKEN = exports.INCLUDE_DIAGNOSTICS = exports.BRIDGE_CLI_DOWNLOAD_VERSION = exports.BRIDGE_CLI_INSTALL_DIRECTORY_KEY = exports.ENABLE_NETWORK_AIRGAP = exports.BRIDGE_CLI_DOWNLOAD_URL = exports.showLogForDeprecatedInputs = exports.getDelimitedInput = exports.getPathInput = exports.getBoolInput = exports.getArbitraryInputs = exports.getInput = void 0; +exports.MARK_BUILD_STATUS = exports.RETURN_STATUS = exports.SRM_PROJECT_DIRECTORY = exports.SRM_BRANCH_PARENT = exports.SRM_BRANCH_NAME = exports.SRM_PROJECT_ID = exports.SRM_PROJECT_NAME = exports.SRM_ASSESSMENT_TYPES = exports.SRM_APIKEY = exports.SRM_URL = exports.DETECT_ARGS = exports.DETECT_CONFIG_PATH = exports.DETECT_SEARCH_DEPTH = exports.BLACKDUCK_SCA_REPORTS_SARIF_GROUP_SCA_ISSUES = exports.BLACKDUCK_SCA_REPORTS_SARIF_SEVERITIES = exports.BLACKDUCK_SCA_PROJECT_DIRECTORY = exports.BLACKDUCK_SCA_REPORTS_SARIF_FILE_PATH = exports.BLACKDUCK_SCA_REPORTS_SARIF_CREATE = exports.BLACKDUCK_SCA_FIX_PR_UPGRADE_GUIDANCE = exports.BLACKDUCK_SCA_FIX_PR_FILTER_SEVERITIES = exports.BLACKDUCK_SCA_FIX_PR_CREATE_SINGLE_PR = exports.BLACKDUCK_SCA_FIX_PR_MAX_COUNT = exports.BLACKDUCK_SCA_AUTOMATION_PR_COMMENT = exports.BLACKDUCK_SCA_FIX_PR_ENABLED = exports.BLACKDUCK_SCA_SCAN_FAILURE_SEVERITIES = exports.DETECT_SCAN_FULL = exports.DETECT_EXECUTION_PATH = exports.DETECT_INSTALL_DIRECTORY = exports.BLACKDUCK_SCA_API_TOKEN = exports.BLACKDUCK_SCA_URL = void 0; +const taskLib = __importStar(__nccwpck_require__(347)); +const constants = __importStar(__nccwpck_require__(3051)); +const polaris_1 = __nccwpck_require__(9073); +const deprecatedInputs = []; +function getInput(newKey, classicEditorKey, deprecatedKey) { + const newInput = taskLib.getInput(newKey); + if (newInput) { + return newInput === null || newInput === void 0 ? void 0 : newInput.trim(); + } + let deprecatedInput; + if (deprecatedKey) { + deprecatedInput = taskLib.getInput(deprecatedKey); + if (deprecatedInput) { + deprecatedInputs.push(deprecatedKey); + return deprecatedInput === null || deprecatedInput === void 0 ? void 0 : deprecatedInput.trim(); } - else if (osName === "win32") { - bridgeDownloadUrl = bridgeDownloadUrl.replace("$platform", constants.WINDOWS_PLATFORM); + } + const classEditorInput = taskLib.getInput(classicEditorKey); + if (classEditorInput) { + return classEditorInput === null || classEditorInput === void 0 ? void 0 : classEditorInput.trim(); + } + return ""; +} +exports.getInput = getInput; +function getArbitraryInputs(yamlKey, classicEditorKey, classicEditorKeyForPolaris, classicEditorKeyForSrm, deprecatedKey) { + const scanType = taskLib.getInput(constants.SCAN_TYPE_KEY); + if (classicEditorKeyForPolaris.length > 0 && scanType == "polaris") { + return taskLib.getInput(classicEditorKeyForPolaris); + } + else if (classicEditorKeyForSrm.length > 0 && scanType == "srm") { + return taskLib.getInput(classicEditorKeyForSrm); + } + else if (classicEditorKey.length > 0 && + (scanType == "coverity" || scanType == "blackduck")) { + return taskLib.getInput(classicEditorKey); + } + return getInput(yamlKey, classicEditorKey, deprecatedKey); +} +exports.getArbitraryInputs = getArbitraryInputs; +function getBoolInput(newKey, classicEditorKey, deprecatedKey) { + let deprecatedInput; + if (deprecatedKey) { + deprecatedInput = taskLib.getBoolInput(deprecatedKey); + if (deprecatedInput) { + deprecatedInputs.push(deprecatedKey); } - return bridgeDownloadUrl; } - setBridgeExecutablePath(filePath) { - return __awaiter(this, void 0, void 0, function* () { - if (process.platform === "win32") { - this.bridgeExecutablePath = path.join(filePath, constants.SYNOPSYS_BRIDGE_EXECUTABLE_WINDOWS); - } - else if (process.platform === "darwin" || process.platform === "linux") { - this.bridgeExecutablePath = path.join(filePath, constants.SYNOPSYS_BRIDGE_EXECUTABLE_MAC_LINUX); - } - return this.bridgeExecutablePath; - }); + return (taskLib.getBoolInput(newKey) || + deprecatedInput || + taskLib.getBoolInput(classicEditorKey)); +} +exports.getBoolInput = getBoolInput; +function getPathInput(newKey, classicEditorKey, deprecatedKey) { + var _a, _b; + let deprecatedInput; + if (deprecatedKey) { + deprecatedInput = taskLib.getPathInput(deprecatedKey); + if (deprecatedInput) { + deprecatedInputs.push(deprecatedKey); + } } - //contains executable path with extension file - getSynopsysBridgePath() { - return __awaiter(this, void 0, void 0, function* () { - let synopsysBridgeDirectoryPath = this.getBridgeDefaultPath(); - if (input_1.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY) { - synopsysBridgeDirectoryPath = input_1.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY; - console.info("Looking for synopsys bridge in Synopsys Bridge Install Directory"); - if (!taskLib.exist(synopsysBridgeDirectoryPath)) { - throw new Error("Synopsys Bridge Install Directory does not exist" - .concat(constants.SPACE) - .concat(ErrorCodes_1.ErrorCode.BRIDGE_INSTALL_DIRECTORY_NOT_EXIST.toString())); - } - } - else { - console.info("Looking for synopsys bridge in default path"); - if (input_1.ENABLE_NETWORK_AIRGAP && this.getBridgeDefaultPath()) { - if (!taskLib.exist(this.getBridgeDefaultPath())) { - throw new Error("Synopsys Bridge default directory does not exist" - .concat(constants.SPACE) - .concat(ErrorCodes_1.ErrorCode.DEFAULT_DIRECTORY_NOT_FOUND.toString())); - } - } - } - return synopsysBridgeDirectoryPath; - }); + return (((_a = taskLib.getPathInput(newKey)) === null || _a === void 0 ? void 0 : _a.trim()) || + (deprecatedInput === null || deprecatedInput === void 0 ? void 0 : deprecatedInput.trim()) || + ((_b = taskLib.getPathInput(classicEditorKey)) === null || _b === void 0 ? void 0 : _b.trim()) || + ""); +} +exports.getPathInput = getPathInput; +function getDelimitedInput(newKey, classicEditorKey, deprecatedKey) { + const newKeyInput = taskLib.getDelimitedInput(newKey, ","); + const classicEditorInput = taskLib.getDelimitedInput(classicEditorKey, ","); + let deprecatedInput = []; + if (deprecatedKey) { + deprecatedInput = taskLib.getDelimitedInput(deprecatedKey, ","); + if (deprecatedInput.length > 0) { + deprecatedInputs.push(deprecatedKey); + } } - retrySleepHelper(message, retryCountLocal, retryDelay) { - return __awaiter(this, void 0, void 0, function* () { - console.info(message - .concat(String(retryCountLocal)) - .concat(", Waiting: ") - .concat(String(retryDelay / 1000)) - .concat(" Seconds")); - yield (0, utility_1.sleep)(retryDelay); - // Delayed exponentially starting from 15 seconds - retryDelay = retryDelay * 2; - return retryDelay; - }); + return ((newKeyInput.length > 0 && newKeyInput) || + (deprecatedInput.length > 0 && deprecatedInput) || + (classicEditorInput.length > 0 && classicEditorInput) || + []); +} +exports.getDelimitedInput = getDelimitedInput; +function showLogForDeprecatedInputs() { + if (deprecatedInputs.length > 0) { + console.log(`[${deprecatedInputs.join(",")}] is/are deprecated for YAML. Check documentation for new parameters: ${constants.BLACKDUCK_SECURITY_SCAN_AZURE_DEVOPS_DOCS_URL}`); } } -exports.SynopsysBridge = SynopsysBridge; +exports.showLogForDeprecatedInputs = showLogForDeprecatedInputs; +function getInputForPolarisAssessmentMode() { + var _a, _b, _c; + return (((_a = taskLib.getInput(constants.POLARIS_ASSESSMENT_MODE_KEY)) === null || _a === void 0 ? void 0 : _a.trim()) || + (((_b = taskLib + .getInput(constants.POLARIS_ASSESSMENT_MODE_KEY_CLASSIC_EDITOR)) === null || _b === void 0 ? void 0 : _b.trim()) === polaris_1.POLARIS_ASSESSMENT_MODES.CI + ? polaris_1.POLARIS_ASSESSMENT_MODES.CI + : ((_c = taskLib + .getInput(constants.POLARIS_ASSESSMENT_MODE_KEY_CLASSIC_EDITOR)) === null || _c === void 0 ? void 0 : _c.trim()) === polaris_1.POLARIS_ASSESSMENT_MODES.SOURCEUPLOAD + ? polaris_1.POLARIS_ASSESSMENT_MODES.SOURCE_UPLOAD + : "")); +} +//Bridge download url +exports.BRIDGE_CLI_DOWNLOAD_URL = getInput(constants.BRIDGE_CLI_DOWNLOAD_URL_KEY, constants.BRIDGE_CLI_DOWNLOAD_URL_KEY_CLASSIC_EDITOR, constants.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY); +exports.ENABLE_NETWORK_AIRGAP = getBoolInput(constants.NETWORK_AIRGAP_KEY, constants.NETWORK_AIRGAP_KEY_CLASSIC_EDITOR, constants.BRIDGE_NETWORK_AIRGAP_KEY); +exports.BRIDGE_CLI_INSTALL_DIRECTORY_KEY = getPathInput(constants.BRIDGE_CLI_INSTALL_DIRECTORY_KEY, constants.BRIDGE_CLI_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR, constants.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY); +exports.BRIDGE_CLI_DOWNLOAD_VERSION = getInput(constants.BRIDGE_CLI_DOWNLOAD_VERSION_KEY, constants.BRIDGE_CLI_DOWNLOAD_VERSION_KEY_CLASSIC_EDITOR, constants.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY); +exports.INCLUDE_DIAGNOSTICS = getInput(constants.INCLUDE_DIAGNOSTICS_KEY, constants.INCLUDE_DIAGNOSTICS_KEY_CLASSIC_EDITOR, null); +exports.AZURE_TOKEN = getInput(constants.AZURE_TOKEN_KEY, constants.AZURE_TOKEN_KEY_CLASSIC_EDITOR, null); +exports.SCAN_TYPE = ((_a = taskLib.getInput(constants.SCAN_TYPE_KEY)) === null || _a === void 0 ? void 0 : _a.trim()) || ""; +// Polaris related inputs +exports.POLARIS_SERVER_URL = getInput(constants.POLARIS_SERVER_URL_KEY, constants.POLARIS_SERVER_URL_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_ACCESS_TOKEN = getInput(constants.POLARIS_ACCESS_TOKEN_KEY, constants.POLARIS_ACCESS_TOKEN_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_APPLICATION_NAME = getInput(constants.POLARIS_APPLICATION_NAME_KEY, constants.POLARIS_APPLICATION_NAME_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_PROJECT_NAME = getInput(constants.POLARIS_PROJECT_NAME_KEY, constants.POLARIS_PROJECT_NAME_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_ASSESSMENT_TYPES = getDelimitedInput(constants.POLARIS_ASSESSMENT_TYPES_KEY, constants.POLARIS_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_TRIAGE = getInput(constants.POLARIS_TRIAGE_KEY, constants.POLARIS_TRIAGE_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_BRANCH_NAME = getInput(constants.POLARIS_BRANCH_NAME_KEY, constants.POLARIS_BRANCH_NAME_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_BRANCH_PARENT_NAME = getInput(constants.POLARIS_BRANCH_PARENT_NAME_KEY, constants.POLARIS_BRANCH_PARENT_NAME_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_TEST_SCA_TYPE = getInput(constants.POLARIS_TEST_SCA_TYPE_KEY, constants.POLARIS_TEST_SCA_TYPE_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_ASSESSMENT_MODE = getInputForPolarisAssessmentMode(); +exports.POLARIS_PROJECT_DIRECTORY = getInput(constants.PROJECT_DIRECTORY_KEY, constants.POLARIS_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR, null); +exports.PROJECT_SOURCE_ARCHIVE = getInput(constants.PROJECT_SOURCE_ARCHIVE_KEY, constants.PROJECT_SOURCE_ARCHIVE_KEY_CLASSIC_EDITOR, null); +exports.PROJECT_SOURCE_PRESERVE_SYM_LINKS = getInput(constants.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY, constants.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY_CLASSIC_EDITOR, null); +exports.PROJECT_SOURCE_EXCLUDES = getDelimitedInput(constants.PROJECT_SOURCE_EXCLUDES_KEY, constants.PROJECT_SOURCE_EXCLUDES_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_PR_COMMENT_ENABLED = getInput(constants.POLARIS_PR_COMMENT_ENABLED_KEY, constants.POLARIS_PR_COMMENT_ENABLED_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_PR_COMMENT_SEVERITIES = getDelimitedInput(constants.POLARIS_PR_COMMENT_SEVERITIES_KEY, constants.POLARIS_PR_COMMENT_SEVERITIES_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_REPORTS_SARIF_CREATE = getInput(constants.POLARIS_REPORTS_SARIF_CREATE_KEY, constants.POLARIS_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_REPORTS_SARIF_FILE_PATH = getInput(constants.POLARIS_REPORTS_SARIF_FILE_PATH_KEY, constants.POLARIS_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_REPORTS_SARIF_SEVERITIES = getDelimitedInput(constants.POLARIS_REPORTS_SARIF_SEVERITIES_KEY, constants.POLARIS_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES = getInput(constants.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY, constants.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR, null); +exports.POLARIS_REPORTS_SARIF_ISSUE_TYPES = getDelimitedInput(constants.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY, constants.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY_CLASSIC_EDITOR, null); +// Coverity related inputs +exports.COVERITY_URL = getInput(constants.COVERITY_URL_KEY, constants.COVERITY_URL_KEY_CLASSIC_EDITOR, null); +exports.COVERITY_USER = getInput(constants.COVERITY_USER_KEY, constants.COVERITY_USER_KEY_CLASSIC_EDITOR, null); +exports.COVERITY_USER_PASSWORD = getInput(constants.COVERITY_PASSPHRASE_KEY, constants.COVERITY_PASSPHRASE_KEY_CLASSIC_EDITOR, null); +exports.COVERITY_PROJECT_NAME = getInput(constants.COVERITY_PROJECT_NAME_KEY, constants.COVERITY_PROJECT_NAME_KEY_CLASSIC_EDITOR, null); +exports.COVERITY_STREAM_NAME = getInput(constants.COVERITY_STREAM_NAME_KEY, constants.COVERITY_STREAM_NAME_KEY_CLASSIC_EDITOR, null); +exports.COVERITY_INSTALL_DIRECTORY = getPathInput(constants.COVERITY_INSTALL_DIRECTORY_KEY, constants.COVERITY_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR, null); +exports.COVERITY_EXECUTION_PATH = getPathInput(constants.COVERITY_EXECUTION_PATH_KEY, constants.COVERITY_EXECUTION_PATH_KEY_CLASSIC_EDITOR, null); +exports.COVERITY_POLICY_VIEW = getInput(constants.COVERITY_POLICY_VIEW_KEY, constants.COVERITY_POLICY_VIEW_KEY_CLASSIC_EDITOR, null); +exports.COVERITY_LOCAL = getInput(constants.COVERITY_LOCAL_KEY, constants.COVERITY_LOCAL_KEY_CLASSIC_EDITOR, null); +exports.COVERITY_AUTOMATION_PRCOMMENT = getBoolInput(constants.COVERITY_PRCOMMENT_ENABLED_KEY, constants.COVERITY_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR, null); +exports.COVERITY_VERSION = getInput(constants.COVERITY_VERSION_KEY, constants.COVERITY_VERSION_KEY_CLASSIC_EDITOR, null); +exports.COVERITY_PROJECT_DIRECTORY = getInput(constants.PROJECT_DIRECTORY_KEY, constants.COVERITY_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR, null); +exports.COVERITY_BUILD_COMMAND = getArbitraryInputs(constants.COVERITY_BUILD_COMMAND_KEY, constants.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR, constants.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM, null); +exports.COVERITY_CLEAN_COMMAND = getArbitraryInputs(constants.COVERITY_CLEAN_COMMAND_KEY, constants.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR, constants.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM, null); +exports.COVERITY_CONFIG_PATH = getArbitraryInputs(constants.COVERITY_CONFIG_PATH_KEY, constants.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR, constants.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM, null); +exports.COVERITY_ARGS = getArbitraryInputs(constants.COVERITY_ARGS_KEY, constants.COVERITY_ARGS_KEY_CLASSIC_EDITOR, constants.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM, null); +// Blackduck related inputs +exports.BLACKDUCK_SCA_URL = getInput(constants.BLACKDUCK_SCA_URL_KEY, constants.BLACKDUCK_SCA_URL_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_URL_KEY); +exports.BLACKDUCK_SCA_API_TOKEN = getInput(constants.BLACKDUCK_SCA_TOKEN_KEY, constants.BLACKDUCK_SCA_TOKEN_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_TOKEN_KEY); +exports.DETECT_INSTALL_DIRECTORY = getPathInput(constants.DETECT_INSTALL_DIRECTORY_KEY, constants.DETECT_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_INSTALL_DIRECTORY_KEY); +exports.DETECT_EXECUTION_PATH = getPathInput(constants.DETECT_EXECUTION_PATH_KEY, constants.DETECT_EXECUTION_PATH_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_EXECUTION_PATH_KEY); +exports.DETECT_SCAN_FULL = getInput(constants.DETECT_SCAN_FULL_KEY, constants.DETECT_SCAN_FULL_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_SCAN_FULL_KEY); +exports.BLACKDUCK_SCA_SCAN_FAILURE_SEVERITIES = getDelimitedInput(constants.BLACKDUCK_SCA_SCAN_FAILURE_SEVERITIES_KEY, constants.BLACKDUCK_SCA_SCAN_FAILURE_SEVERITIES_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY); +exports.BLACKDUCK_SCA_FIX_PR_ENABLED = getBoolInput(constants.BLACKDUCK_SCA_FIX_PR_ENABLED_KEY, constants.BLACKDUCK_SCA_FIX_PR_ENABLED_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_FIX_PR_ENABLED_KEY); +exports.BLACKDUCK_SCA_AUTOMATION_PR_COMMENT = getBoolInput(constants.BLACKDUCK_SCA_PRCOMMENT_ENABLED_KEY, constants.BLACKDUCK_SCA_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_PRCOMMENT_ENABLED_KEY); +exports.BLACKDUCK_SCA_FIX_PR_MAX_COUNT = getInput(constants.BLACKDUCK_SCA_FIX_PR_MAX_COUNT_KEY, constants.BLACKDUCK_SCA_FIX_PR_MAX_COUNT_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_FIX_PR_MAX_COUNT_KEY); +exports.BLACKDUCK_SCA_FIX_PR_CREATE_SINGLE_PR = getInput(constants.BLACKDUCK_SCA_FIX_PR_CREATE_SINGLE_PR_KEY, constants.BLACKDUCK_SCA_FIX_PR_CREATE_SINGLE_PR_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_FIX_PR_CREATE_SINGLE_PR_KEY); +exports.BLACKDUCK_SCA_FIX_PR_FILTER_SEVERITIES = getDelimitedInput(constants.BLACKDUCK_SCA_FIX_PR_FILTER_SEVERITIES_KEY, constants.BLACKDUCK_SCA_FIX_PR_FILTER_SEVERITIES_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_FIX_PR_FILTER_SEVERITIES_KEY); +exports.BLACKDUCK_SCA_FIX_PR_UPGRADE_GUIDANCE = getDelimitedInput(constants.BLACKDUCK_SCA_FIX_PR_UPGRADE_GUIDANCE_KEY, constants.BLACKDUCK_SCA_FIX_PR_UPGRADE_GUIDANCE_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_FIX_PR_UPGRADE_GUIDANCE_KEY); +exports.BLACKDUCK_SCA_REPORTS_SARIF_CREATE = getInput(constants.BLACKDUCK_SCA_REPORTS_SARIF_CREATE_KEY, constants.BLACKDUCK_SCA_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_REPORTS_SARIF_CREATE_KEY); +exports.BLACKDUCK_SCA_REPORTS_SARIF_FILE_PATH = getInput(constants.BLACKDUCK_SCA_REPORTS_SARIF_FILE_PATH_KEY, constants.BLACKDUCK_SCA_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY); +exports.BLACKDUCK_SCA_PROJECT_DIRECTORY = getInput(constants.PROJECT_DIRECTORY_KEY, constants.BLACKDUCK_SCA_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR, null); +exports.BLACKDUCK_SCA_REPORTS_SARIF_SEVERITIES = getDelimitedInput(constants.BLACKDUCK_SCA_REPORTS_SARIF_SEVERITIES_KEY, constants.BLACKDUCK_SCA_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY); +exports.BLACKDUCK_SCA_REPORTS_SARIF_GROUP_SCA_ISSUES = getInput(constants.BLACKDUCK_SCA_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY, constants.BLACKDUCK_SCA_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY); +exports.DETECT_SEARCH_DEPTH = getArbitraryInputs(constants.DETECT_SEARCH_DEPTH_KEY, constants.DETECT_DEPTH_KEY_CLASSIC_EDITOR, constants.DETECT_DEPTH_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.DETECT_DEPTH_KEY_CLASSIC_EDITOR_FOR_SRM, constants.BLACKDUCK_SEARCH_DEPTH_KEY); +exports.DETECT_CONFIG_PATH = getArbitraryInputs(constants.DETECT_CONFIG_PATH_KEY, constants.DETECT_CONFIG_PATH_KEY_CLASSIC_EDITOR, constants.DETECT_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.DETECT_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM, constants.BLACKDUCK_CONFIG_PATH_KEY); +exports.DETECT_ARGS = getArbitraryInputs(constants.DETECT_ARGS_KEY, constants.DETECT_ARGS_KEY_CLASSIC_EDITOR, constants.DETECT_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.DETECT_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM, constants.BLACKDUCK_ARGS_KEY); +//SRM inputs +exports.SRM_URL = getInput(constants.SRM_URL_KEY, constants.SRM_URL_KEY_CLASSIC_EDITOR, null); +exports.SRM_APIKEY = getInput(constants.SRM_APIKEY_KEY, constants.SRM_APIKEY_KEY_CLASSIC_EDITOR, null); +exports.SRM_ASSESSMENT_TYPES = getDelimitedInput(constants.SRM_ASSESSMENT_TYPES_KEY, constants.SRM_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR, null); +exports.SRM_PROJECT_NAME = getInput(constants.SRM_PROJECT_NAME_KEY, constants.SRM_PROJECT_NAME_KEY_CLASSIC_EDITOR, null); +exports.SRM_PROJECT_ID = getInput(constants.SRM_PROJECT_ID_KEY, constants.SRM_PROJECT_ID_KEY_CLASSIC_EDITOR, null); +exports.SRM_BRANCH_NAME = getInput(constants.SRM_BRANCH_NAME_KEY, constants.SRM_BRANCH_NAME_KEY_CLASSIC_EDITOR, null); +exports.SRM_BRANCH_PARENT = getInput(constants.SRM_BRANCH_PARENT_KEY, constants.SRM_BRANCH_PARENT_KEY_CLASSIC_EDITOR, null); +exports.SRM_PROJECT_DIRECTORY = getInput(constants.PROJECT_DIRECTORY_KEY, constants.SRM_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR, null); +exports.RETURN_STATUS = ((_b = taskLib.getInput(constants.RETURN_STATUS_KEY)) === null || _b === void 0 ? void 0 : _b.trim()) || "true"; +exports.MARK_BUILD_STATUS = getInput(constants.MARK_BUILD_STATUS_KEY, constants.MARK_BUILD_STATUS_KEY_CLASSIC_EDITOR, null); + + +/***/ }), + +/***/ 3655: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AZURE_BUILD_REASON = exports.AZURE_ENVIRONMENT_VARIABLES = void 0; +exports.AZURE_ENVIRONMENT_VARIABLES = { + AZURE_ORGANIZATION: "System.TeamFoundationCollectionUri", + AZURE_PROJECT: "System.TeamProject", + AZURE_REPOSITORY: "Build.Repository.Name", + AZURE_SOURCE_BRANCH: "Build.SourceBranch", + AZURE_PULL_REQUEST_NUMBER: "System.PullRequest.PullRequestId", + AZURE_PULL_REQUEST_TARGET_BRANCH: "System.PullRequest.TargetBranch", + AZURE_BUILD_REASON: "Build.Reason", + AZURE_PULL_REQUEST_SOURCE_BRANCH: "System.PullRequest.SourceBranch", +}; +var AZURE_BUILD_REASON; +(function (AZURE_BUILD_REASON) { + AZURE_BUILD_REASON["PULL_REQUEST"] = "PullRequest"; + AZURE_BUILD_REASON["MANUAL"] = "Manual"; +})(AZURE_BUILD_REASON = exports.AZURE_BUILD_REASON || (exports.AZURE_BUILD_REASON = {})); + + +/***/ }), + +/***/ 5467: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES = void 0; +var BLACKDUCK_SCAN_FAILURE_SEVERITIES; +(function (BLACKDUCK_SCAN_FAILURE_SEVERITIES) { + BLACKDUCK_SCAN_FAILURE_SEVERITIES["ALL"] = "ALL"; + BLACKDUCK_SCAN_FAILURE_SEVERITIES["NONE"] = "NONE"; + BLACKDUCK_SCAN_FAILURE_SEVERITIES["BLOCKER"] = "BLOCKER"; + BLACKDUCK_SCAN_FAILURE_SEVERITIES["CRITICAL"] = "CRITICAL"; + BLACKDUCK_SCAN_FAILURE_SEVERITIES["MAJOR"] = "MAJOR"; + BLACKDUCK_SCAN_FAILURE_SEVERITIES["MINOR"] = "MINOR"; + BLACKDUCK_SCAN_FAILURE_SEVERITIES["OK"] = "OK"; + BLACKDUCK_SCAN_FAILURE_SEVERITIES["TRIVIAL"] = "TRIVIAL"; + BLACKDUCK_SCAN_FAILURE_SEVERITIES["UNSPECIFIED"] = "UNSPECIFIED"; +})(BLACKDUCK_SCAN_FAILURE_SEVERITIES = exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES || (exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES = {})); + + +/***/ }), + +/***/ 9073: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.POLARIS_ASSESSMENT_MODES = void 0; +var POLARIS_ASSESSMENT_MODES; +(function (POLARIS_ASSESSMENT_MODES) { + POLARIS_ASSESSMENT_MODES["CI"] = "CI"; + POLARIS_ASSESSMENT_MODES["SOURCE_UPLOAD"] = "SOURCE_UPLOAD"; + POLARIS_ASSESSMENT_MODES["SOURCEUPLOAD"] = "SOURCEUPLOAD"; +})(POLARIS_ASSESSMENT_MODES = exports.POLARIS_ASSESSMENT_MODES || (exports.POLARIS_ASSESSMENT_MODES = {})); /***/ }), @@ -1917,6 +1838,7 @@ exports.SynopsysBridge = SynopsysBridge; "use strict"; +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -1953,7 +1875,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SynopsysToolsParameter = void 0; +exports.BridgeToolsParameter = void 0; const path_1 = __importDefault(__nccwpck_require__(1017)); const inputs = __importStar(__nccwpck_require__(7533)); const input_1 = __nccwpck_require__(7533); @@ -1966,7 +1888,7 @@ const utility_1 = __nccwpck_require__(837); const url = __importStar(__nccwpck_require__(7310)); const azure_service_client_1 = __nccwpck_require__(5601); const ErrorCodes_1 = __nccwpck_require__(4487); -class SynopsysToolsParameter { +class BridgeToolsParameter { constructor(tempDir) { this.tempDir = tempDir; } @@ -2057,7 +1979,7 @@ class SynopsysToolsParameter { } // Set Coverity or Blackduck Arbitrary Arguments polData.data.coverity = this.setCoverityArbitraryArgs(); - polData.data.blackduck = this.setBlackDuckArbitraryArgs(); + polData.data.detect = this.setBlackDuckDetectArgs(); const azureData = this.getAzureRepoInfo(); const isPrCommentEnabled = (0, utility_1.parseToBoolean)(inputs.POLARIS_PR_COMMENT_ENABLED); const azurePrResponse = yield this.updateAzurePrNumberForManualTriggerFlow(azureData, isPrCommentEnabled); @@ -2091,58 +2013,57 @@ class SynopsysToolsParameter { // Remove empty data from json object polData = (0, utility_1.filterEmptyData)(polData); const inputJson = JSON.stringify(polData); - let stateFilePath = path_1.default.join(this.tempDir, SynopsysToolsParameter.POLARIS_STATE_FILE_NAME); + let stateFilePath = path_1.default.join(this.tempDir, BridgeToolsParameter.POLARIS_STATE_FILE_NAME); taskLib.writeFile(stateFilePath, inputJson); // Wrap the file path with double quotes, to make it work with directory path with space as well stateFilePath = '"'.concat(stateFilePath).concat('"'); taskLib.debug("Generated state json file at - ".concat(stateFilePath)); - command = SynopsysToolsParameter.STAGE_OPTION.concat(SynopsysToolsParameter.SPACE) - .concat(SynopsysToolsParameter.POLARIS_STAGE) - .concat(SynopsysToolsParameter.SPACE) - .concat(SynopsysToolsParameter.INPUT_OPTION) - .concat(SynopsysToolsParameter.SPACE) + command = BridgeToolsParameter.STAGE_OPTION.concat(BridgeToolsParameter.SPACE) + .concat(BridgeToolsParameter.POLARIS_STAGE) + .concat(BridgeToolsParameter.SPACE) + .concat(BridgeToolsParameter.INPUT_OPTION) + .concat(BridgeToolsParameter.SPACE) .concat(stateFilePath) - .concat(SynopsysToolsParameter.SPACE); + .concat(BridgeToolsParameter.SPACE); return command; }); } getFormattedCommandForBlackduck() { return __awaiter(this, void 0, void 0, function* () { - const failureSeverities = inputs.BLACKDUCK_SCAN_FAILURE_SEVERITIES; + const failureSeverities = inputs.BLACKDUCK_SCA_SCAN_FAILURE_SEVERITIES; let command = ""; let blackduckData = { data: { - blackduck: { - url: inputs.BLACKDUCK_URL, - token: inputs.BLACKDUCK_API_TOKEN, + blackducksca: { + url: inputs.BLACKDUCK_SCA_URL, + token: inputs.BLACKDUCK_SCA_API_TOKEN, }, }, }; - if (inputs.BLACKDUCK_PROJECT_DIRECTORY) { + if (inputs.BLACKDUCK_SCA_PROJECT_DIRECTORY) { blackduckData.data.project = { - directory: inputs.BLACKDUCK_PROJECT_DIRECTORY, + directory: inputs.BLACKDUCK_SCA_PROJECT_DIRECTORY, }; } - if (inputs.BLACKDUCK_INSTALL_DIRECTORY) { - blackduckData.data.blackduck.install = { - directory: inputs.BLACKDUCK_INSTALL_DIRECTORY, + if (inputs.DETECT_INSTALL_DIRECTORY) { + blackduckData.data.detect = { + install: { directory: inputs.DETECT_INSTALL_DIRECTORY }, }; } - if (inputs.BLACKDUCK_SCAN_FULL) { - if (inputs.BLACKDUCK_SCAN_FULL.toLowerCase() === "true" || - inputs.BLACKDUCK_SCAN_FULL.toLowerCase() === "false") { - const scanFullValue = inputs.BLACKDUCK_SCAN_FULL.toLowerCase() === "true"; - blackduckData.data.blackduck.scan = { full: scanFullValue }; + if (inputs.DETECT_SCAN_FULL) { + if (inputs.DETECT_SCAN_FULL.toLowerCase() === "true" || + inputs.DETECT_SCAN_FULL.toLowerCase() === "false") { + const scanFullValue = inputs.DETECT_SCAN_FULL.toLowerCase() === "true"; + blackduckData.data.blackducksca.scan = { full: scanFullValue }; } else { throw new Error("Missing boolean value for " - .concat(constants.BLACKDUCK_SCAN_FULL_KEY) + .concat(constants.DETECT_SCAN_FULL_KEY) .concat(constants.SPACE) .concat(ErrorCodes_1.ErrorCode.MISSING_BOOLEAN_VALUE.toString())); } } - // Set arbitrary (To support both BlackDuck and Polaris) - blackduckData.data.blackduck = Object.assign({}, this.setBlackDuckArbitraryArgs(), blackduckData.data.blackduck); + blackduckData.data.detect = Object.assign({}, this.setBlackDuckDetectArgs(), blackduckData.data.detect); if (failureSeverities && failureSeverities.length > 0) { (0, validator_1.validateBlackduckFailureSeverities)(failureSeverities); const failureSeverityEnums = []; @@ -2153,7 +2074,7 @@ class SynopsysToolsParameter { for (const failureSeverity of failureSeverities) { if (values.indexOf(failureSeverity) == -1) { throw new Error("Invalid value for " - .concat(constants.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY) + .concat(constants.BLACKDUCK_SCA_SCAN_FAILURE_SEVERITIES_KEY) .concat(constants.SPACE) .concat(ErrorCodes_1.ErrorCode.INVALID_BLACKDUCK_FAILURE_SEVERITIES.toString())); } @@ -2161,20 +2082,20 @@ class SynopsysToolsParameter { failureSeverityEnums.push(blackduck_1.BLACKDUCK_SCAN_FAILURE_SEVERITIES[failureSeverity]); } } - if (blackduckData.data.blackduck.scan) { - blackduckData.data.blackduck.scan.failure = { + if (blackduckData.data.blackducksca.scan) { + blackduckData.data.blackducksca.scan.failure = { severities: failureSeverityEnums, }; } else { - blackduckData.data.blackduck.scan = { + blackduckData.data.blackducksca.scan = { failure: { severities: failureSeverityEnums }, }; } } const azureData = this.getAzureRepoInfo(); - const isPrCommentEnabled = (0, utility_1.parseToBoolean)(inputs.BLACKDUCK_AUTOMATION_PRCOMMENT); - const isFixPrEnabled = (0, utility_1.parseToBoolean)(inputs.BLACKDUCK_FIXPR_ENABLED); + const isPrCommentEnabled = (0, utility_1.parseToBoolean)(inputs.BLACKDUCK_SCA_AUTOMATION_PR_COMMENT); + const isFixPrEnabled = (0, utility_1.parseToBoolean)(inputs.BLACKDUCK_SCA_FIX_PR_ENABLED); const azurePrResponse = yield this.updateAzurePrNumberForManualTriggerFlow(azureData, isPrCommentEnabled || isFixPrEnabled); const isPullRequest = (0, utility_1.isPullRequestEvent)(azurePrResponse); // Check and put environment variable for fix pull request @@ -2184,7 +2105,7 @@ class SynopsysToolsParameter { } else { console.log("Black Duck Fix PR is enabled"); - blackduckData.data.blackduck.fixpr = this.setBlackDuckFixPrInputs(); + blackduckData.data.blackducksca.fixpr = this.setBlackDuckFixPrInputs(); blackduckData.data.azure = azureData; } } @@ -2196,16 +2117,16 @@ class SynopsysToolsParameter { console.info("BlackDuck PR comment is enabled"); blackduckData.data.azure = azureData; blackduckData.data.environment = this.setEnvironmentScanPullData(); - blackduckData.data.blackduck.automation = { prcomment: true }; + blackduckData.data.blackducksca.automation = { prcomment: true }; blackduckData.data; } } if ((0, utility_1.parseToBoolean)(inputs.ENABLE_NETWORK_AIRGAP)) { blackduckData.data.network = { airGap: true }; } - if ((0, utility_1.parseToBoolean)(inputs.BLACKDUCK_REPORTS_SARIF_CREATE)) { + if ((0, utility_1.parseToBoolean)(inputs.BLACKDUCK_SCA_REPORTS_SARIF_CREATE)) { if (!isPullRequest) { - blackduckData.data.blackduck.reports = + blackduckData.data.blackducksca.reports = this.setSarifReportsInputsForBlackduck(); } else { @@ -2215,18 +2136,18 @@ class SynopsysToolsParameter { // Remove empty data from json object blackduckData = (0, utility_1.filterEmptyData)(blackduckData); const inputJson = JSON.stringify(blackduckData); - let stateFilePath = path_1.default.join(this.tempDir, SynopsysToolsParameter.BD_STATE_FILE_NAME); + let stateFilePath = path_1.default.join(this.tempDir, BridgeToolsParameter.BD_STATE_FILE_NAME); taskLib.writeFile(stateFilePath, inputJson); // Wrap the file path with double quotes, to make it work with directory path with space as well stateFilePath = '"'.concat(stateFilePath).concat('"'); taskLib.debug("Generated state json file at - ".concat(stateFilePath)); - command = SynopsysToolsParameter.STAGE_OPTION.concat(SynopsysToolsParameter.SPACE) - .concat(SynopsysToolsParameter.BLACKDUCK_STAGE) - .concat(SynopsysToolsParameter.SPACE) - .concat(SynopsysToolsParameter.INPUT_OPTION) - .concat(SynopsysToolsParameter.SPACE) + command = BridgeToolsParameter.STAGE_OPTION.concat(BridgeToolsParameter.SPACE) + .concat(BridgeToolsParameter.BLACKDUCK_STAGE) + .concat(BridgeToolsParameter.SPACE) + .concat(BridgeToolsParameter.INPUT_OPTION) + .concat(BridgeToolsParameter.SPACE) .concat(stateFilePath) - .concat(SynopsysToolsParameter.SPACE); + .concat(BridgeToolsParameter.SPACE); return command; }); } @@ -2331,52 +2252,52 @@ class SynopsysToolsParameter { // Remove empty data from json object covData = (0, utility_1.filterEmptyData)(covData); const inputJson = JSON.stringify(covData); - let stateFilePath = path_1.default.join(this.tempDir, SynopsysToolsParameter.COVERITY_STATE_FILE_NAME); + let stateFilePath = path_1.default.join(this.tempDir, BridgeToolsParameter.COVERITY_STATE_FILE_NAME); taskLib.writeFile(stateFilePath, inputJson); // Wrap the file path with double quotes, to make it work with directory path with space as well stateFilePath = '"'.concat(stateFilePath).concat('"'); taskLib.debug("Generated state json file at - ".concat(stateFilePath)); - command = SynopsysToolsParameter.STAGE_OPTION.concat(SynopsysToolsParameter.SPACE) - .concat(SynopsysToolsParameter.COVERITY_STAGE) - .concat(SynopsysToolsParameter.SPACE) - .concat(SynopsysToolsParameter.INPUT_OPTION) - .concat(SynopsysToolsParameter.SPACE) + command = BridgeToolsParameter.STAGE_OPTION.concat(BridgeToolsParameter.SPACE) + .concat(BridgeToolsParameter.COVERITY_STAGE) + .concat(BridgeToolsParameter.SPACE) + .concat(BridgeToolsParameter.INPUT_OPTION) + .concat(BridgeToolsParameter.SPACE) .concat(stateFilePath) - .concat(SynopsysToolsParameter.SPACE); + .concat(BridgeToolsParameter.SPACE); return command; }); } setBlackDuckFixPrInputs() { - if (inputs.BLACKDUCK_FIXPR_MAXCOUNT && - isNaN(Number(inputs.BLACKDUCK_FIXPR_MAXCOUNT))) { + if (inputs.BLACKDUCK_SCA_FIX_PR_MAX_COUNT && + isNaN(Number(inputs.BLACKDUCK_SCA_FIX_PR_MAX_COUNT))) { throw new Error("Invalid value for " - .concat(constants.BLACKDUCK_FIXPR_MAXCOUNT_KEY) + .concat(constants.BLACKDUCK_FIX_PR_MAX_COUNT_KEY) .concat(constants.SPACE) .concat(ErrorCodes_1.ErrorCode.INVALID_BLACKDUCK_FIXPR_MAXCOUNT.toString())); } - const createSinglePr = (0, utility_1.parseToBoolean)(inputs.BLACKDUCK_FIXPR_CREATE_SINGLE_PR); - if (createSinglePr && inputs.BLACKDUCK_FIXPR_MAXCOUNT) { - throw new Error(constants.BLACKDUCK_FIXPR_MAXCOUNT_KEY.concat(" is not applicable with ") - .concat(constants.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY) + const createSinglePr = (0, utility_1.parseToBoolean)(inputs.BLACKDUCK_SCA_FIX_PR_CREATE_SINGLE_PR); + if (createSinglePr && inputs.BLACKDUCK_SCA_FIX_PR_MAX_COUNT) { + throw new Error(constants.BLACKDUCK_FIX_PR_MAX_COUNT_KEY.concat(" is not applicable with ") + .concat(constants.BLACKDUCK_FIX_PR_CREATE_SINGLE_PR_KEY) .concat(constants.SPACE) .concat(ErrorCodes_1.ErrorCode.BLACKDUCK_FIXPR_MAX_COUNT_NOT_APPLICABLE.toString())); } const blackDuckFixPrData = {}; blackDuckFixPrData.enabled = true; blackDuckFixPrData.createSinglePR = createSinglePr; - if (inputs.BLACKDUCK_FIXPR_MAXCOUNT && !createSinglePr) { - blackDuckFixPrData.maxCount = Number(inputs.BLACKDUCK_FIXPR_MAXCOUNT); + if (inputs.BLACKDUCK_SCA_FIX_PR_MAX_COUNT && !createSinglePr) { + blackDuckFixPrData.maxCount = Number(inputs.BLACKDUCK_SCA_FIX_PR_MAX_COUNT); } - if (inputs.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE && - inputs.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE.length > 0) { + if (inputs.BLACKDUCK_SCA_FIX_PR_UPGRADE_GUIDANCE && + inputs.BLACKDUCK_SCA_FIX_PR_UPGRADE_GUIDANCE.length > 0) { blackDuckFixPrData.useUpgradeGuidance = - inputs.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE; + inputs.BLACKDUCK_SCA_FIX_PR_UPGRADE_GUIDANCE; } const fixPRFilterSeverities = []; - if (inputs.BLACKDUCK_FIXPR_FILTER_SEVERITIES && - inputs.BLACKDUCK_FIXPR_FILTER_SEVERITIES != null && - inputs.BLACKDUCK_FIXPR_FILTER_SEVERITIES.length > 0) { - for (const fixPrSeverity of inputs.BLACKDUCK_FIXPR_FILTER_SEVERITIES) { + if (inputs.BLACKDUCK_SCA_FIX_PR_FILTER_SEVERITIES && + inputs.BLACKDUCK_SCA_FIX_PR_FILTER_SEVERITIES != null && + inputs.BLACKDUCK_SCA_FIX_PR_FILTER_SEVERITIES.length > 0) { + for (const fixPrSeverity of inputs.BLACKDUCK_SCA_FIX_PR_FILTER_SEVERITIES) { if (fixPrSeverity != null && fixPrSeverity.trim() !== "") { fixPRFilterSeverities.push(fixPrSeverity.trim()); } @@ -2431,10 +2352,10 @@ class SynopsysToolsParameter { name: azureRepositoryName, }; } - if (inputs.BLACKDUCK_EXECUTION_PATH) { - srmData.data.blackduck = { + if (inputs.DETECT_EXECUTION_PATH) { + srmData.data.detect = { execution: { - path: inputs.BLACKDUCK_EXECUTION_PATH, + path: inputs.DETECT_EXECUTION_PATH, }, }; } @@ -2452,28 +2373,28 @@ class SynopsysToolsParameter { } // Set Coverity or Blackduck Arbitrary Arguments const coverityArgs = this.setCoverityArbitraryArgs(); - const blackduckArgs = this.setBlackDuckArbitraryArgs(); + const blackduckArgs = this.setBlackDuckDetectArgs(); if (Object.keys(coverityArgs).length > 0) { srmData.data.coverity = Object.assign(Object.assign({}, srmData.data.coverity), coverityArgs); } if (Object.keys(blackduckArgs).length > 0) { - srmData.data.blackduck = Object.assign(Object.assign({}, srmData.data.blackduck), blackduckArgs); + srmData.data.detect = blackduckArgs; } // Remove empty data from json object srmData = (0, utility_1.filterEmptyData)(srmData); const inputJson = JSON.stringify(srmData); - let stateFilePath = path_1.default.join(this.tempDir, SynopsysToolsParameter.SRM_STATE_FILE_NAME); + let stateFilePath = path_1.default.join(this.tempDir, BridgeToolsParameter.SRM_STATE_FILE_NAME); taskLib.writeFile(stateFilePath, inputJson); // Wrap the file path with double quotes, to make it work with directory path with space as well stateFilePath = '"'.concat(stateFilePath).concat('"'); taskLib.debug("Generated state json file at - ".concat(stateFilePath)); - command = SynopsysToolsParameter.STAGE_OPTION.concat(SynopsysToolsParameter.SPACE) - .concat(SynopsysToolsParameter.SRM_STAGE) - .concat(SynopsysToolsParameter.SPACE) - .concat(SynopsysToolsParameter.INPUT_OPTION) - .concat(SynopsysToolsParameter.SPACE) + command = BridgeToolsParameter.STAGE_OPTION.concat(BridgeToolsParameter.SPACE) + .concat(BridgeToolsParameter.SRM_STAGE) + .concat(BridgeToolsParameter.SPACE) + .concat(BridgeToolsParameter.INPUT_OPTION) + .concat(BridgeToolsParameter.SPACE) .concat(stateFilePath) - .concat(SynopsysToolsParameter.SPACE); + .concat(BridgeToolsParameter.SPACE); return command; }); } @@ -2585,23 +2506,24 @@ class SynopsysToolsParameter { create: true, }, }; - if (inputs.BLACKDUCK_URL && inputs.BLACKDUCK_REPORTS_SARIF_FILE_PATH) { + if (inputs.BLACKDUCK_SCA_URL && + inputs.BLACKDUCK_SCA_REPORTS_SARIF_FILE_PATH) { reportData.sarif.file = { - path: inputs.BLACKDUCK_REPORTS_SARIF_FILE_PATH, + path: inputs.BLACKDUCK_SCA_REPORTS_SARIF_FILE_PATH, }; } const sarifReportFilterSeverities = []; - if (inputs.BLACKDUCK_URL && - inputs.BLACKDUCK_REPORTS_SARIF_SEVERITIES && - inputs.BLACKDUCK_REPORTS_SARIF_SEVERITIES.length > 0) { - const sarifSeverities = inputs.BLACKDUCK_REPORTS_SARIF_SEVERITIES.filter((severity) => severity && severity.trim() !== "").map((severity) => severity.trim()); + if (inputs.BLACKDUCK_SCA_URL && + inputs.BLACKDUCK_SCA_REPORTS_SARIF_SEVERITIES && + inputs.BLACKDUCK_SCA_REPORTS_SARIF_SEVERITIES.length > 0) { + const sarifSeverities = inputs.BLACKDUCK_SCA_REPORTS_SARIF_SEVERITIES.filter((severity) => severity && severity.trim() !== "").map((severity) => severity.trim()); sarifReportFilterSeverities.push(...sarifSeverities); } if (sarifReportFilterSeverities.length > 0) { reportData.sarif.severities = sarifReportFilterSeverities; } - const groupSCAIssues = inputs.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES; - if (inputs.BLACKDUCK_URL && (0, utility_1.isBoolean)(groupSCAIssues)) { + const groupSCAIssues = inputs.BLACKDUCK_SCA_REPORTS_SARIF_GROUP_SCA_ISSUES; + if (inputs.BLACKDUCK_SCA_URL && (0, utility_1.isBoolean)(groupSCAIssues)) { if (groupSCAIssues !== undefined) { reportData.sarif.groupSCAIssues = JSON.parse(groupSCAIssues); } @@ -2674,38 +2596,38 @@ class SynopsysToolsParameter { } return covData.data; } - setBlackDuckArbitraryArgs() { + setBlackDuckDetectArgs() { const blackduckData = { data: {} }; - if (inputs.BLACKDUCK_SEARCH_DEPTH && - Number.isInteger(parseInt(inputs.BLACKDUCK_SEARCH_DEPTH))) { + if (inputs.DETECT_SEARCH_DEPTH && + Number.isInteger(parseInt(inputs.DETECT_SEARCH_DEPTH))) { blackduckData.data.search = { - depth: parseInt(inputs.BLACKDUCK_SEARCH_DEPTH), + depth: parseInt(inputs.DETECT_SEARCH_DEPTH), }; } - if (inputs.BLACKDUCK_CONFIG_PATH) { + if (inputs.DETECT_CONFIG_PATH) { blackduckData.data.config = { - path: inputs.BLACKDUCK_CONFIG_PATH, + path: inputs.DETECT_CONFIG_PATH, }; } - if (inputs.BLACKDUCK_ARGS) { - blackduckData.data.args = inputs.BLACKDUCK_ARGS; + if (inputs.DETECT_ARGS) { + blackduckData.data.args = inputs.DETECT_ARGS; } return blackduckData.data; } } -SynopsysToolsParameter.STAGE_OPTION = "--stage"; -SynopsysToolsParameter.BLACKDUCK_STAGE = "blackduck"; -SynopsysToolsParameter.BD_STATE_FILE_NAME = "bd_input.json"; -SynopsysToolsParameter.INPUT_OPTION = "--input"; -SynopsysToolsParameter.POLARIS_STAGE = "polaris"; -SynopsysToolsParameter.POLARIS_STATE_FILE_NAME = "polaris_input.json"; -SynopsysToolsParameter.SPACE = " "; -SynopsysToolsParameter.COVERITY_STATE_FILE_NAME = "coverity_input.json"; -SynopsysToolsParameter.COVERITY_STAGE = "connect"; -SynopsysToolsParameter.DIAGNOSTICS_OPTION = "--diagnostics"; -SynopsysToolsParameter.SRM_STAGE = "srm"; -SynopsysToolsParameter.SRM_STATE_FILE_NAME = "srm_input.json"; -exports.SynopsysToolsParameter = SynopsysToolsParameter; +BridgeToolsParameter.STAGE_OPTION = "--stage"; +BridgeToolsParameter.BLACKDUCK_STAGE = "blackduck"; +BridgeToolsParameter.BD_STATE_FILE_NAME = "bd_input.json"; +BridgeToolsParameter.INPUT_OPTION = "--input"; +BridgeToolsParameter.POLARIS_STAGE = "polaris"; +BridgeToolsParameter.POLARIS_STATE_FILE_NAME = "polaris_input.json"; +BridgeToolsParameter.SPACE = " "; +BridgeToolsParameter.COVERITY_STATE_FILE_NAME = "coverity_input.json"; +BridgeToolsParameter.COVERITY_STAGE = "connect"; +BridgeToolsParameter.DIAGNOSTICS_OPTION = "--diagnostics"; +BridgeToolsParameter.SRM_STAGE = "srm"; +BridgeToolsParameter.SRM_STATE_FILE_NAME = "srm_input.json"; +exports.BridgeToolsParameter = BridgeToolsParameter; /***/ }), @@ -2715,6 +2637,7 @@ exports.SynopsysToolsParameter = SynopsysToolsParameter; "use strict"; +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -2802,12 +2725,12 @@ function getRemoteFile(destFilePath, url) { if (url == null || url.length === 0) { return Promise.reject(new Error("URL cannot be empty" .concat(constants.SPACE) - .concat(ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_URL_CANNOT_BE_EMPTY.toString()))); + .concat(ErrorCodes_1.ErrorCode.BRIDGE_CLI_URL_CANNOT_BE_EMPTY.toString()))); } let fileNameFromUrl = ""; if (taskLib.stats(destFilePath).isDirectory()) { fileNameFromUrl = url.substring(url.lastIndexOf("/") + 1); - destFilePath = path_1.default.join(destFilePath, fileNameFromUrl || application_constant_1.SYNOPSYS_BRIDGE_ZIP_FILE_NAME); + destFilePath = path_1.default.join(destFilePath, fileNameFromUrl || application_constant_1.BRIDGE_CLI_ZIP_FILE_NAME); } let retryCountLocal = application_constant_1.RETRY_COUNT; let retryDelay = application_constant_1.RETRY_DELAY_IN_MILLISECONDS; @@ -2826,7 +2749,7 @@ function getRemoteFile(destFilePath, url) { } if (!application_constant_1.NON_RETRY_HTTP_CODES.has(Number(getStatusCode(error.message))) || error.message.includes("did not match downloaded file size")) { - console.info("Synopsys Bridge download has been failed, Retries left: " + console.info("Bridge CLI download has been failed, Retries left: " .concat(String(retryCountLocal)) .concat(", Waiting: ") .concat(String(retryDelay / 1000)) @@ -2840,9 +2763,9 @@ function getRemoteFile(destFilePath, url) { } } } while (retryCountLocal >= 0); - return Promise.reject("Synopsys bridge download has been failed" + return Promise.reject("Bridge CLI download has been failed" .concat(constants.SPACE) - .concat(ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_DOWNLOAD_FAILED.toString())); + .concat(ErrorCodes_1.ErrorCode.BRIDGE_CLI_DOWNLOAD_FAILED.toString())); }); } exports.getRemoteFile = getRemoteFile; @@ -2923,7 +2846,7 @@ function extractBranchName(branchName) { } exports.extractBranchName = extractBranchName; // This function extracts the status code from a given error message string. -// Example: "Failed to download synopsys-bridge zip from specified URL. HTTP status code: 502 124", +// Example: "Failed to download Bridge CLI zip from specified URL. HTTP status code: 502 124", // The function will return the HTTP status code. For the above example: 502 function getStatusCode(str) { const words = str.split(" "); @@ -2961,6 +2884,7 @@ exports.getMappedTaskResult = getMappedTaskResult; "use strict"; +// Copyright (c) 2024 Black Duck Software Inc. All rights reserved worldwide. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); @@ -2993,7 +2917,7 @@ const ErrorCodes_1 = __nccwpck_require__(4487); function validateScanTypes() { const paramsMap = new Map(); paramsMap.set(constants.POLARIS_SERVER_URL_KEY, inputs.POLARIS_SERVER_URL); - paramsMap.set(constants.BLACKDUCK_URL_KEY, inputs.BLACKDUCK_URL); + paramsMap.set(constants.BLACKDUCK_SCA_URL_KEY, inputs.BLACKDUCK_SCA_URL); paramsMap.set(constants.COVERITY_URL_KEY, inputs.COVERITY_URL); paramsMap.set(constants.SRM_URL_KEY, inputs.SRM_URL); return isNullOrEmpty(paramsMap); @@ -3079,7 +3003,7 @@ function validateCoverityInstallDirectoryParam(installDir) { exports.validateCoverityInstallDirectoryParam = validateCoverityInstallDirectoryParam; function validateBlackduckFailureSeverities(severities) { if (severities == null || severities.length === 0) { - taskLib.error("Provided value is not valid - BLACKDUCK_SCAN_FAILURE_SEVERITIES" + taskLib.error("Provided value is not valid - BLACKDUCK_SCA_SCAN_FAILURE_SEVERITIES" .concat(constants.SPACE) .concat(ErrorCodes_1.ErrorCode.INVALID_BLACKDUCK_FAILURE_SEVERITIES.toString())); return false; @@ -3089,10 +3013,10 @@ function validateBlackduckFailureSeverities(severities) { exports.validateBlackduckFailureSeverities = validateBlackduckFailureSeverities; function validateBlackDuckInputs() { let errors = []; - if (inputs.BLACKDUCK_URL) { + if (inputs.BLACKDUCK_SCA_URL) { const paramsMap = new Map(); - paramsMap.set(constants.BLACKDUCK_URL_KEY, inputs.BLACKDUCK_URL); - paramsMap.set(constants.BLACKDUCK_TOKEN_KEY, inputs.BLACKDUCK_API_TOKEN); + paramsMap.set(constants.BLACKDUCK_URL_KEY, inputs.BLACKDUCK_SCA_URL); + paramsMap.set(constants.BLACKDUCK_TOKEN_KEY, inputs.BLACKDUCK_SCA_API_TOKEN); errors = validateParameters(paramsMap, constants.BLACKDUCK_KEY); } return errors; @@ -3290,8 +3214,8 @@ function _loc(key) { } if (!_libResourceFileLoaded) { // merge loc strings from azure-pipelines-task-lib. - var libResourceFile = __nccwpck_require__.ab + "lib.json"; - var libLocStrs = _loadLocStrings(__nccwpck_require__.ab + "lib.json", _resourceCulture); + var libResourceFile = __nccwpck_require__.ab + "lib1.json"; + var libLocStrs = _loadLocStrings(__nccwpck_require__.ab + "lib1.json", _resourceCulture); for (var libKey in libLocStrs) { //cache azure-pipelines-task-lib loc string _locStringCache[libKey] = libLocStrs[libKey]; @@ -10335,720 +10259,720 @@ function prerelease (version, options) { return (parsed && parsed.prerelease.length) ? parsed.prerelease : null } -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} +exports.intersects = intersects +function intersects (r1, r2, options) { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} + +exports.coerce = coerce +function coerce (version) { + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + var match = version.match(safeRe[COERCE]) + + if (match == null) { + return null + } + + return parse(match[1] + + '.' + (match[2] || '0') + + '.' + (match[3] || '0')) +} + + +/***/ }), + +/***/ 1513: +/***/ ((module) => { + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([ + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]] + ]).join(''); +} + +module.exports = bytesToUuid; + + +/***/ }), + +/***/ 9984: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = __nccwpck_require__(6113); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; + + +/***/ }), + +/***/ 4758: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } +var rng = __nccwpck_require__(9984); +var bytesToUuid = __nccwpck_require__(1513); - if (typeof version !== 'string') { - return null +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; } + options = options || {}; - var match = version.match(safeRe[COERCE]) + var rnds = options.random || (options.rng || rng)(); - if (match == null) { - return null + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } } - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) + return buf || bytesToUuid(rnds); } +module.exports = v4; + /***/ }), -/***/ 1513: -/***/ ((module) => { +/***/ 3681: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.scrape = exports.extractZip = exports.extractTar = exports.extract7z = exports.cacheFile = exports.cacheDir = exports.downloadToolWithRetries = exports.downloadTool = exports.findLocalToolVersions = exports.findLocalTool = exports.evaluateVersions = exports.cleanVersion = exports.isExplicitVersion = exports.prependPath = exports.debug = void 0; +const httpm = __nccwpck_require__(5538); +const path = __nccwpck_require__(1017); +const os = __nccwpck_require__(2037); +const process = __nccwpck_require__(7282); +const fs = __nccwpck_require__(7147); +const semver = __nccwpck_require__(9184); +const tl = __nccwpck_require__(347); +const cmp = __nccwpck_require__(2568); +const uuidV4 = __nccwpck_require__(4758); +let pkg = __nccwpck_require__(9099); +let userAgent = 'vsts-task-installer/' + pkg.version; +let requestOptions = { + // ignoreSslError: true, + proxy: tl.getHttpProxyConfiguration(), + cert: tl.getHttpCertConfiguration(), + allowRedirects: true, + allowRetries: true, + maxRetries: 2 +}; +tl.setResourcePath(__nccwpck_require__.ab + "lib.json"); +function debug(message) { + tl.debug(message); +} +exports.debug = debug; +function prependPath(toolPath) { + tl.assertAgent('2.115.0'); + if (!toolPath) { + throw new Error('Parameter toolPath must not be null or empty'); + } + else if (!tl.exist(toolPath) || !tl.stats(toolPath).isDirectory()) { + throw new Error('Directory does not exist: ' + toolPath); + } + // todo: add a test for path + console.log(tl.loc('TOOL_LIB_PrependPath', toolPath)); + let newPath = toolPath + path.delimiter + process.env['PATH']; + tl.debug('new Path: ' + newPath); + process.env['PATH'] = newPath; + // instruct the agent to set this path on future tasks + console.log('##vso[task.prependpath]' + toolPath); +} +exports.prependPath = prependPath; +function delay(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} +//----------------------------- +// Version Functions +//----------------------------- /** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + * Checks if a version spec is an explicit version (e.g. 1.0.1 or v1.0.1) + * As opposed to a version spec like 1.x + * + * @param versionSpec */ -var byteToHex = []; -for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); +function isExplicitVersion(versionSpec) { + let c = semver.clean(versionSpec); + tl.debug('isExplicit: ' + c); + let valid = semver.valid(c) != null; + tl.debug('explicit? ' + valid); + return valid; +} +exports.isExplicitVersion = isExplicitVersion; +/** + * Returns cleaned (removed leading/trailing whitespace, remove '=v' prefix) + * and parsed version, or null if version is invalid. + */ +function cleanVersion(version) { + tl.debug('cleaning: ' + version); + return semver.clean(version); +} +exports.cleanVersion = cleanVersion; +/** + * evaluates a list of versions and returns the latest version matching the version spec + * + * @param versions an array of versions to evaluate + * @param versionSpec a version spec (e.g. 1.x) + */ +function evaluateVersions(versions, versionSpec) { + let version; + tl.debug('evaluating ' + versions.length + ' versions'); + versions = versions.sort(cmp); + for (let i = versions.length - 1; i >= 0; i--) { + let potential = versions[i]; + let satisfied = semver.satisfies(potential, versionSpec); + if (satisfied) { + version = potential; + break; + } + } + if (version) { + tl.debug('matched: ' + version); + } + else { + tl.debug('match not found'); + } + return version; +} +exports.evaluateVersions = evaluateVersions; +//----------------------------- +// Local Tool Cache Functions +//----------------------------- +/** + * finds the path to a tool in the local installed tool cache + * + * @param toolName name of the tool + * @param versionSpec version of the tool + * @param arch optional arch. defaults to arch of computer + */ +function findLocalTool(toolName, versionSpec, arch) { + if (!toolName) { + throw new Error('toolName parameter is required'); + } + if (!versionSpec) { + throw new Error('versionSpec parameter is required'); + } + arch = arch || os.arch(); + // attempt to resolve an explicit version + if (!isExplicitVersion(versionSpec)) { + let localVersions = findLocalToolVersions(toolName, arch); + let match = evaluateVersions(localVersions, versionSpec); + versionSpec = match; + } + // check for the explicit version in the cache + let toolPath; + if (versionSpec) { + versionSpec = semver.clean(versionSpec); + let cacheRoot = _getCacheRoot(); + let cachePath = path.join(cacheRoot, toolName, versionSpec, arch); + tl.debug('checking cache: ' + cachePath); + if (tl.exist(cachePath) && tl.exist(`${cachePath}.complete`)) { + console.log(tl.loc('TOOL_LIB_FoundInCache', toolName, versionSpec, arch)); + toolPath = cachePath; + } + else { + tl.debug('not found'); + } + } + return toolPath; +} +exports.findLocalTool = findLocalTool; +/** + * Retrieves the versions of a tool that is intalled in the local tool cache + * + * @param toolName name of the tool + * @param arch optional arch. defaults to arch of computer + */ +function findLocalToolVersions(toolName, arch) { + let versions = []; + arch = arch || os.arch(); + let toolPath = path.join(_getCacheRoot(), toolName); + if (tl.exist(toolPath)) { + let children = tl.ls('', [toolPath]); + children.forEach((child) => { + if (isExplicitVersion(child)) { + let fullPath = path.join(toolPath, child, arch); + if (tl.exist(fullPath) && tl.exist(`${fullPath}.complete`)) { + versions.push(child); + } + } + }); + } + return versions; +} +exports.findLocalToolVersions = findLocalToolVersions; +//--------------------- +// Download Functions +//--------------------- +// +// TODO: keep extension intact +// +/** + * Download a tool from an url and stream it into a file + * + * @param url url of tool to download + * @param fileName optional fileName. Should typically not use (will be a guid for reliability). Can pass fileName with an absolute path. + * @param handlers optional handlers array. Auth handlers to pass to the HttpClient for the tool download. + * @param additionalHeaders optional custom HTTP headers. This is passed to the REST client that downloads the tool. + */ +function downloadTool(url, fileName, handlers, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + try { + handlers = handlers || null; + let http = new httpm.HttpClient(userAgent, handlers, requestOptions); + tl.debug(fileName); + fileName = fileName || uuidV4(); + // check if it's an absolute path already + var destPath; + if (path.isAbsolute(fileName)) { + destPath = fileName; + } + else { + destPath = path.join(_getAgentTemp(), fileName); + } + // make sure that the folder exists + tl.mkdirP(path.dirname(destPath)); + console.log(tl.loc('TOOL_LIB_Downloading', url.replace(/sig=[^&]*/, "sig=-REDACTED-"))); + tl.debug('destination ' + destPath); + if (fs.existsSync(destPath)) { + throw new Error("Destination file path already exists"); + } + tl.debug('downloading'); + let response = yield http.get(url, additionalHeaders); + if (response.message.statusCode != 200) { + let err = new Error('Unexpected HTTP response: ' + response.message.statusCode); + err['httpStatusCode'] = response.message.statusCode; + tl.debug(`Failed to download "${fileName}" from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + throw err; + } + let downloadedContentLength = _getContentLengthOfDownloadedFile(response); + if (!isNaN(downloadedContentLength)) { + tl.debug(`Content-Length of downloaded file: ${downloadedContentLength}`); + } + else { + tl.debug(`Content-Length header missing`); + } + tl.debug('creating stream'); + const file = fs.createWriteStream(destPath); + file + .on('open', (fd) => __awaiter(this, void 0, void 0, function* () { + try { + response.message + .on('error', (err) => { + file.end(); + reject(err); + }) + .on('aborted', () => { + // this block is for Node10 compatibility since it doesn't emit 'error' event after 'aborted' one + file.end(); + reject(new Error('Aborted')); + }) + .pipe(file); + } + catch (err) { + reject(err); + } + })) + .on('close', () => { + tl.debug('download complete'); + let fileSizeInBytes; + try { + fileSizeInBytes = _getFileSizeOnDisk(destPath); + } + catch (err) { + fileSizeInBytes = NaN; + tl.warning(`Unable to check file size of ${destPath} due to error: ${err.Message}`); + } + if (!isNaN(fileSizeInBytes)) { + tl.debug(`Downloaded file size: ${fileSizeInBytes} bytes`); + } + else { + tl.debug(`File size on disk was not found`); + } + if (!isNaN(downloadedContentLength) && + !isNaN(fileSizeInBytes) && + fileSizeInBytes !== downloadedContentLength) { + tl.warning(`Content-Length (${downloadedContentLength} bytes) did not match downloaded file size (${fileSizeInBytes} bytes).`); + } + resolve(destPath); + }) + .on('error', (err) => { + file.end(); + reject(err); + }); + } + catch (error) { + reject(error); + } + })); + }); +} +exports.downloadTool = downloadTool; +function downloadToolWithRetries(url, fileName, handlers, additionalHeaders, maxAttempts = 3, retryInterval = 500) { + return __awaiter(this, void 0, void 0, function* () { + let attempt = 1; + let destinationPath = ''; + while (attempt <= maxAttempts && destinationPath == '') { + try { + destinationPath = yield downloadTool(url, fileName, handlers, additionalHeaders); + } + catch (err) { + if (attempt === maxAttempts) + throw err; + const attemptInterval = attempt * retryInterval; + // Error will be shown in downloadTool. + tl.debug(`Attempt ${attempt} failed. Retrying after ${attemptInterval} ms`); + yield delay(attemptInterval); + attempt++; + } + } + return destinationPath; + }); +} +exports.downloadToolWithRetries = downloadToolWithRetries; +//--------------------- +// Size functions +//--------------------- +/** + * Gets size of downloaded file from "Content-Length" header + * + * @param response response for request to get the file + * @returns number if the 'content-length' is not empty, otherwise NaN + */ +function _getContentLengthOfDownloadedFile(response) { + let contentLengthHeader = response.message.headers['content-length']; + let parsedContentLength = parseInt(contentLengthHeader); + return parsedContentLength; +} +/** + * Gets size of file saved to disk + * + * @param filePath the path to the file, saved to the disk + * @returns size of file saved to disk + */ +function _getFileSizeOnDisk(filePath) { + let fileStats = fs.statSync(filePath); + let fileSizeInBytes = fileStats.size; + return fileSizeInBytes; +} +//--------------------- +// Install Functions +//--------------------- +function _createToolPath(tool, version, arch) { + // todo: add test for clean + let folderPath = path.join(_getCacheRoot(), tool, semver.clean(version), arch); + tl.debug('destination ' + folderPath); + let markerPath = `${folderPath}.complete`; + tl.rmRF(folderPath); + tl.rmRF(markerPath); + tl.mkdirP(folderPath); + return folderPath; +} +function _completeToolPath(tool, version, arch) { + let folderPath = path.join(_getCacheRoot(), tool, semver.clean(version), arch); + let markerPath = `${folderPath}.complete`; + tl.writeFile(markerPath, ''); + tl.debug('finished caching tool'); +} +/** + * Caches a directory and installs it into the tool cacheDir + * + * @param sourceDir the directory to cache into tools + * @param tool tool name + * @param version version of the tool. semver format + * @param arch architecture of the tool. Optional. Defaults to machine architecture + */ +function cacheDir(sourceDir, tool, version, arch) { + return __awaiter(this, void 0, void 0, function* () { + version = semver.clean(version); + arch = arch || os.arch(); + console.log(tl.loc('TOOL_LIB_CachingTool', tool, version, arch)); + tl.debug('source dir: ' + sourceDir); + if (!tl.stats(sourceDir).isDirectory()) { + throw new Error('sourceDir is not a directory'); + } + // create the tool dir + let destPath = _createToolPath(tool, version, arch); + // copy each child item. do not move. move can fail on Windows + // due to anti-virus software having an open handle on a file. + for (let itemName of fs.readdirSync(sourceDir)) { + let s = path.join(sourceDir, itemName); + tl.cp(s, destPath + '/', '-r'); + } + // write .complete + _completeToolPath(tool, version, arch); + return destPath; + }); +} +exports.cacheDir = cacheDir; +/** + * Caches a downloaded file (GUID) and installs it + * into the tool cache with a given targetName + * + * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid. + * @param targetFile the name of the file name in the tools directory + * @param tool tool name + * @param version version of the tool. semver format + * @param arch architecture of the tool. Optional. Defaults to machine architecture + */ +function cacheFile(sourceFile, targetFile, tool, version, arch) { + return __awaiter(this, void 0, void 0, function* () { + version = semver.clean(version); + arch = arch || os.arch(); + console.log(tl.loc('TOOL_LIB_CachingTool', tool, version, arch)); + tl.debug('source file:' + sourceFile); + if (!tl.stats(sourceFile).isFile()) { + throw new Error('sourceFile is not a file'); + } + // create the tool dir + let destFolder = _createToolPath(tool, version, arch); + // copy instead of move. move can fail on Windows due to + // anti-virus software having an open handle on a file. + let destPath = path.join(destFolder, targetFile); + tl.debug('destination file' + destPath); + tl.cp(sourceFile, destPath); + // write .complete + _completeToolPath(tool, version, arch); + return destFolder; + }); +} +exports.cacheFile = cacheFile; +//--------------------- +// Extract Functions +//--------------------- +/** + * Extract a .7z file + * + * @param file path to the .7z file + * @param dest destination directory. Optional. + * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this + * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will + * gracefully handle long paths. By default 7z.exe is used because it is a very small program and is + * bundled with the tool lib. However it does not support long paths. 7z.exe is the reduced command line + * interface, it is smaller than the full command line interface, and it does support long paths. At the + * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website. + * Be sure to check the current license agreement. If 7z.exe is bundled with your task, then the path + * to 7z.exe can be pass to this function. + * @param overwriteDest Overwrite files in destination catalog. Optional. + * @returns path to the destination directory + */ +function extract7z(file, dest, _7zPath, overwriteDest) { + return __awaiter(this, void 0, void 0, function* () { + if (process.platform != 'win32') { + throw new Error('extract7z() not supported on current OS'); + } + if (!file) { + throw new Error("parameter 'file' is required"); + } + console.log(tl.loc('TOOL_LIB_ExtractingArchive')); + dest = _createExtractFolder(dest); + let originalCwd = process.cwd(); + try { + process.chdir(dest); + if (_7zPath) { + // extract + const _7z = tl.tool(_7zPath); + if (overwriteDest) { + _7z.arg('-aoa'); + } + _7z.arg('x') // eXtract files with full paths + .arg('-bb1') // -bb[0-3] : set output log level + .arg('-bd') // disable progress indicator + .arg('-sccUTF-8') // set charset for for console input/output + .arg(file); + yield _7z.exec(); + } + else { + // extract + let escapedScript = path.join(__dirname, 'Invoke-7zdec.ps1').replace(/'/g, "''").replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines + let escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); + let escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); + const overrideDestDirectory = overwriteDest ? 1 : 0; + const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}' -OverrideDestDirectory ${overrideDestDirectory}`; + let powershellPath = tl.which('powershell', true); + let powershell = tl.tool(powershellPath) + .line('-NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command') + .arg(command); + powershell.on('stdout', (buffer) => { + process.stdout.write(buffer); + }); + powershell.on('stderr', (buffer) => { + process.stderr.write(buffer); + }); + yield powershell.exec({ silent: true }); + } + } + finally { + process.chdir(originalCwd); + } + return dest; + }); +} +exports.extract7z = extract7z; +/** + * installs a tool from a tar by extracting the tar and installing it into the tool cache + * + * @param file file path of the tar + * @param tool name of tool in the tool cache + * @param version version of the tool + * @param arch arch of the tool. optional. defaults to the arch of the machine + * @param options IExtractOptions + * @param destination destination directory. optional. + */ +function extractTar(file, destination) { + return __awaiter(this, void 0, void 0, function* () { + // mkdir -p node/4.7.0/x64 + // tar xzC ./node/4.7.0/x64 -f node-v4.7.0-darwin-x64.tar.gz --strip-components 1 + console.log(tl.loc('TOOL_LIB_ExtractingArchive')); + let dest = _createExtractFolder(destination); + let tr = tl.tool('tar'); + tr.arg(['xC', dest, '-f', file]); + yield tr.exec(); + return dest; + }); +} +exports.extractTar = extractTar; +function extractZip(file, destination) { + return __awaiter(this, void 0, void 0, function* () { + if (!file) { + throw new Error("parameter 'file' is required"); + } + console.log(tl.loc('TOOL_LIB_ExtractingArchive')); + let dest = _createExtractFolder(destination); + if (process.platform == 'win32') { + // build the powershell command + let escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines + let escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); + let command = `$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}')`; + // change the console output code page to UTF-8. + // TODO: FIX WHICH: let chcpPath = tl.which('chcp.com', true); + let chcpPath = path.join(process.env.windir, "system32", "chcp.com"); + yield tl.exec(chcpPath, '65001'); + // run powershell + let powershell = tl.tool('powershell') + .line('-NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command') + .arg(command); + yield powershell.exec(); + } + else { + let unzip = tl.tool('unzip') + .arg(file); + yield unzip.exec({ cwd: dest }); + } + return dest; + }); +} +exports.extractZip = extractZip; +function _createExtractFolder(dest) { + if (!dest) { + // create a temp dir + dest = path.join(_getAgentTemp(), uuidV4()); + } + tl.mkdirP(dest); + return dest; +} +//--------------------- +// Query Functions +//--------------------- +// default input will be >= LTS version. drop label different than value. +// v4 (LTS) would have a value of 4.x +// option to always download? (not cache), TTL? +/** + * Scrape a web page for versions by regex + * + * @param url url to scrape + * @param regex regex to use for version matches + * @param handlers optional handlers array. Auth handlers to pass to the HttpClient for the tool download. + */ +function scrape(url, regex, handlers) { + return __awaiter(this, void 0, void 0, function* () { + handlers = handlers || null; + let http = new httpm.HttpClient(userAgent, handlers, requestOptions); + let output = yield (yield http.get(url)).readBody(); + let matches = output.match(regex); + let seen = {}; + let versions = []; + for (let i = 0; i < matches.length; i++) { + let ver = semver.clean(matches[i]); + if (!seen.hasOwnProperty(ver)) { + seen[ver] = true; + versions.push(ver); + } + } + return versions; + }); } - -function bytesToUuid(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - return ([ - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]] - ]).join(''); +exports.scrape = scrape; +function _getCacheRoot() { + tl.assertAgent('2.115.0'); + let cacheRoot = tl.getVariable('Agent.ToolsDirectory'); + if (!cacheRoot) { + throw new Error('Agent.ToolsDirectory is not set'); + } + return cacheRoot; } - -module.exports = bytesToUuid; - - -/***/ }), - -/***/ 9984: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Unique ID creation requires a high quality random # generator. In node.js -// this is pretty straight-forward - we use the crypto API. - -var crypto = __nccwpck_require__(6113); - -module.exports = function nodeRNG() { - return crypto.randomBytes(16); -}; - - -/***/ }), - -/***/ 4758: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var rng = __nccwpck_require__(9984); -var bytesToUuid = __nccwpck_require__(1513); - -function v4(options, buf, offset) { - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; +function _getAgentTemp() { + tl.assertAgent('2.115.0'); + let tempDirectory = tl.getVariable('Agent.TempDirectory'); + if (!tempDirectory) { + throw new Error('Agent.TempDirectory is not set'); } - } - - return buf || bytesToUuid(rnds); + return tempDirectory; } -module.exports = v4; - - -/***/ }), - -/***/ 3681: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.scrape = exports.extractZip = exports.extractTar = exports.extract7z = exports.cacheFile = exports.cacheDir = exports.downloadToolWithRetries = exports.downloadTool = exports.findLocalToolVersions = exports.findLocalTool = exports.evaluateVersions = exports.cleanVersion = exports.isExplicitVersion = exports.prependPath = exports.debug = void 0; -const httpm = __nccwpck_require__(5538); -const path = __nccwpck_require__(1017); -const os = __nccwpck_require__(2037); -const process = __nccwpck_require__(7282); -const fs = __nccwpck_require__(7147); -const semver = __nccwpck_require__(9184); -const tl = __nccwpck_require__(347); -const cmp = __nccwpck_require__(2568); -const uuidV4 = __nccwpck_require__(4758); -let pkg = __nccwpck_require__(9099); -let userAgent = 'vsts-task-installer/' + pkg.version; -let requestOptions = { - // ignoreSslError: true, - proxy: tl.getHttpProxyConfiguration(), - cert: tl.getHttpCertConfiguration(), - allowRedirects: true, - allowRetries: true, - maxRetries: 2 -}; -tl.setResourcePath(__nccwpck_require__.ab + "lib1.json"); -function debug(message) { - tl.debug(message); -} -exports.debug = debug; -function prependPath(toolPath) { - tl.assertAgent('2.115.0'); - if (!toolPath) { - throw new Error('Parameter toolPath must not be null or empty'); - } - else if (!tl.exist(toolPath) || !tl.stats(toolPath).isDirectory()) { - throw new Error('Directory does not exist: ' + toolPath); - } - // todo: add a test for path - console.log(tl.loc('TOOL_LIB_PrependPath', toolPath)); - let newPath = toolPath + path.delimiter + process.env['PATH']; - tl.debug('new Path: ' + newPath); - process.env['PATH'] = newPath; - // instruct the agent to set this path on future tasks - console.log('##vso[task.prependpath]' + toolPath); -} -exports.prependPath = prependPath; -function delay(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); -} -//----------------------------- -// Version Functions -//----------------------------- -/** - * Checks if a version spec is an explicit version (e.g. 1.0.1 or v1.0.1) - * As opposed to a version spec like 1.x - * - * @param versionSpec - */ -function isExplicitVersion(versionSpec) { - let c = semver.clean(versionSpec); - tl.debug('isExplicit: ' + c); - let valid = semver.valid(c) != null; - tl.debug('explicit? ' + valid); - return valid; -} -exports.isExplicitVersion = isExplicitVersion; -/** - * Returns cleaned (removed leading/trailing whitespace, remove '=v' prefix) - * and parsed version, or null if version is invalid. - */ -function cleanVersion(version) { - tl.debug('cleaning: ' + version); - return semver.clean(version); -} -exports.cleanVersion = cleanVersion; -/** - * evaluates a list of versions and returns the latest version matching the version spec - * - * @param versions an array of versions to evaluate - * @param versionSpec a version spec (e.g. 1.x) - */ -function evaluateVersions(versions, versionSpec) { - let version; - tl.debug('evaluating ' + versions.length + ' versions'); - versions = versions.sort(cmp); - for (let i = versions.length - 1; i >= 0; i--) { - let potential = versions[i]; - let satisfied = semver.satisfies(potential, versionSpec); - if (satisfied) { - version = potential; - break; - } - } - if (version) { - tl.debug('matched: ' + version); - } - else { - tl.debug('match not found'); - } - return version; -} -exports.evaluateVersions = evaluateVersions; -//----------------------------- -// Local Tool Cache Functions -//----------------------------- -/** - * finds the path to a tool in the local installed tool cache - * - * @param toolName name of the tool - * @param versionSpec version of the tool - * @param arch optional arch. defaults to arch of computer - */ -function findLocalTool(toolName, versionSpec, arch) { - if (!toolName) { - throw new Error('toolName parameter is required'); - } - if (!versionSpec) { - throw new Error('versionSpec parameter is required'); - } - arch = arch || os.arch(); - // attempt to resolve an explicit version - if (!isExplicitVersion(versionSpec)) { - let localVersions = findLocalToolVersions(toolName, arch); - let match = evaluateVersions(localVersions, versionSpec); - versionSpec = match; - } - // check for the explicit version in the cache - let toolPath; - if (versionSpec) { - versionSpec = semver.clean(versionSpec); - let cacheRoot = _getCacheRoot(); - let cachePath = path.join(cacheRoot, toolName, versionSpec, arch); - tl.debug('checking cache: ' + cachePath); - if (tl.exist(cachePath) && tl.exist(`${cachePath}.complete`)) { - console.log(tl.loc('TOOL_LIB_FoundInCache', toolName, versionSpec, arch)); - toolPath = cachePath; - } - else { - tl.debug('not found'); - } - } - return toolPath; -} -exports.findLocalTool = findLocalTool; -/** - * Retrieves the versions of a tool that is intalled in the local tool cache - * - * @param toolName name of the tool - * @param arch optional arch. defaults to arch of computer - */ -function findLocalToolVersions(toolName, arch) { - let versions = []; - arch = arch || os.arch(); - let toolPath = path.join(_getCacheRoot(), toolName); - if (tl.exist(toolPath)) { - let children = tl.ls('', [toolPath]); - children.forEach((child) => { - if (isExplicitVersion(child)) { - let fullPath = path.join(toolPath, child, arch); - if (tl.exist(fullPath) && tl.exist(`${fullPath}.complete`)) { - versions.push(child); - } - } - }); - } - return versions; -} -exports.findLocalToolVersions = findLocalToolVersions; -//--------------------- -// Download Functions -//--------------------- -// -// TODO: keep extension intact -// -/** - * Download a tool from an url and stream it into a file - * - * @param url url of tool to download - * @param fileName optional fileName. Should typically not use (will be a guid for reliability). Can pass fileName with an absolute path. - * @param handlers optional handlers array. Auth handlers to pass to the HttpClient for the tool download. - * @param additionalHeaders optional custom HTTP headers. This is passed to the REST client that downloads the tool. - */ -function downloadTool(url, fileName, handlers, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - try { - handlers = handlers || null; - let http = new httpm.HttpClient(userAgent, handlers, requestOptions); - tl.debug(fileName); - fileName = fileName || uuidV4(); - // check if it's an absolute path already - var destPath; - if (path.isAbsolute(fileName)) { - destPath = fileName; - } - else { - destPath = path.join(_getAgentTemp(), fileName); - } - // make sure that the folder exists - tl.mkdirP(path.dirname(destPath)); - console.log(tl.loc('TOOL_LIB_Downloading', url.replace(/sig=[^&]*/, "sig=-REDACTED-"))); - tl.debug('destination ' + destPath); - if (fs.existsSync(destPath)) { - throw new Error("Destination file path already exists"); - } - tl.debug('downloading'); - let response = yield http.get(url, additionalHeaders); - if (response.message.statusCode != 200) { - let err = new Error('Unexpected HTTP response: ' + response.message.statusCode); - err['httpStatusCode'] = response.message.statusCode; - tl.debug(`Failed to download "${fileName}" from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); - throw err; - } - let downloadedContentLength = _getContentLengthOfDownloadedFile(response); - if (!isNaN(downloadedContentLength)) { - tl.debug(`Content-Length of downloaded file: ${downloadedContentLength}`); - } - else { - tl.debug(`Content-Length header missing`); - } - tl.debug('creating stream'); - const file = fs.createWriteStream(destPath); - file - .on('open', (fd) => __awaiter(this, void 0, void 0, function* () { - try { - response.message - .on('error', (err) => { - file.end(); - reject(err); - }) - .on('aborted', () => { - // this block is for Node10 compatibility since it doesn't emit 'error' event after 'aborted' one - file.end(); - reject(new Error('Aborted')); - }) - .pipe(file); - } - catch (err) { - reject(err); - } - })) - .on('close', () => { - tl.debug('download complete'); - let fileSizeInBytes; - try { - fileSizeInBytes = _getFileSizeOnDisk(destPath); - } - catch (err) { - fileSizeInBytes = NaN; - tl.warning(`Unable to check file size of ${destPath} due to error: ${err.Message}`); - } - if (!isNaN(fileSizeInBytes)) { - tl.debug(`Downloaded file size: ${fileSizeInBytes} bytes`); - } - else { - tl.debug(`File size on disk was not found`); - } - if (!isNaN(downloadedContentLength) && - !isNaN(fileSizeInBytes) && - fileSizeInBytes !== downloadedContentLength) { - tl.warning(`Content-Length (${downloadedContentLength} bytes) did not match downloaded file size (${fileSizeInBytes} bytes).`); - } - resolve(destPath); - }) - .on('error', (err) => { - file.end(); - reject(err); - }); - } - catch (error) { - reject(error); - } - })); - }); -} -exports.downloadTool = downloadTool; -function downloadToolWithRetries(url, fileName, handlers, additionalHeaders, maxAttempts = 3, retryInterval = 500) { - return __awaiter(this, void 0, void 0, function* () { - let attempt = 1; - let destinationPath = ''; - while (attempt <= maxAttempts && destinationPath == '') { - try { - destinationPath = yield downloadTool(url, fileName, handlers, additionalHeaders); - } - catch (err) { - if (attempt === maxAttempts) - throw err; - const attemptInterval = attempt * retryInterval; - // Error will be shown in downloadTool. - tl.debug(`Attempt ${attempt} failed. Retrying after ${attemptInterval} ms`); - yield delay(attemptInterval); - attempt++; - } - } - return destinationPath; - }); -} -exports.downloadToolWithRetries = downloadToolWithRetries; -//--------------------- -// Size functions -//--------------------- -/** - * Gets size of downloaded file from "Content-Length" header - * - * @param response response for request to get the file - * @returns number if the 'content-length' is not empty, otherwise NaN - */ -function _getContentLengthOfDownloadedFile(response) { - let contentLengthHeader = response.message.headers['content-length']; - let parsedContentLength = parseInt(contentLengthHeader); - return parsedContentLength; -} -/** - * Gets size of file saved to disk - * - * @param filePath the path to the file, saved to the disk - * @returns size of file saved to disk - */ -function _getFileSizeOnDisk(filePath) { - let fileStats = fs.statSync(filePath); - let fileSizeInBytes = fileStats.size; - return fileSizeInBytes; -} -//--------------------- -// Install Functions -//--------------------- -function _createToolPath(tool, version, arch) { - // todo: add test for clean - let folderPath = path.join(_getCacheRoot(), tool, semver.clean(version), arch); - tl.debug('destination ' + folderPath); - let markerPath = `${folderPath}.complete`; - tl.rmRF(folderPath); - tl.rmRF(markerPath); - tl.mkdirP(folderPath); - return folderPath; -} -function _completeToolPath(tool, version, arch) { - let folderPath = path.join(_getCacheRoot(), tool, semver.clean(version), arch); - let markerPath = `${folderPath}.complete`; - tl.writeFile(markerPath, ''); - tl.debug('finished caching tool'); -} -/** - * Caches a directory and installs it into the tool cacheDir - * - * @param sourceDir the directory to cache into tools - * @param tool tool name - * @param version version of the tool. semver format - * @param arch architecture of the tool. Optional. Defaults to machine architecture - */ -function cacheDir(sourceDir, tool, version, arch) { - return __awaiter(this, void 0, void 0, function* () { - version = semver.clean(version); - arch = arch || os.arch(); - console.log(tl.loc('TOOL_LIB_CachingTool', tool, version, arch)); - tl.debug('source dir: ' + sourceDir); - if (!tl.stats(sourceDir).isDirectory()) { - throw new Error('sourceDir is not a directory'); - } - // create the tool dir - let destPath = _createToolPath(tool, version, arch); - // copy each child item. do not move. move can fail on Windows - // due to anti-virus software having an open handle on a file. - for (let itemName of fs.readdirSync(sourceDir)) { - let s = path.join(sourceDir, itemName); - tl.cp(s, destPath + '/', '-r'); - } - // write .complete - _completeToolPath(tool, version, arch); - return destPath; - }); -} -exports.cacheDir = cacheDir; -/** - * Caches a downloaded file (GUID) and installs it - * into the tool cache with a given targetName - * - * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid. - * @param targetFile the name of the file name in the tools directory - * @param tool tool name - * @param version version of the tool. semver format - * @param arch architecture of the tool. Optional. Defaults to machine architecture - */ -function cacheFile(sourceFile, targetFile, tool, version, arch) { - return __awaiter(this, void 0, void 0, function* () { - version = semver.clean(version); - arch = arch || os.arch(); - console.log(tl.loc('TOOL_LIB_CachingTool', tool, version, arch)); - tl.debug('source file:' + sourceFile); - if (!tl.stats(sourceFile).isFile()) { - throw new Error('sourceFile is not a file'); - } - // create the tool dir - let destFolder = _createToolPath(tool, version, arch); - // copy instead of move. move can fail on Windows due to - // anti-virus software having an open handle on a file. - let destPath = path.join(destFolder, targetFile); - tl.debug('destination file' + destPath); - tl.cp(sourceFile, destPath); - // write .complete - _completeToolPath(tool, version, arch); - return destFolder; - }); -} -exports.cacheFile = cacheFile; -//--------------------- -// Extract Functions -//--------------------- -/** - * Extract a .7z file - * - * @param file path to the .7z file - * @param dest destination directory. Optional. - * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this - * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will - * gracefully handle long paths. By default 7z.exe is used because it is a very small program and is - * bundled with the tool lib. However it does not support long paths. 7z.exe is the reduced command line - * interface, it is smaller than the full command line interface, and it does support long paths. At the - * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website. - * Be sure to check the current license agreement. If 7z.exe is bundled with your task, then the path - * to 7z.exe can be pass to this function. - * @param overwriteDest Overwrite files in destination catalog. Optional. - * @returns path to the destination directory - */ -function extract7z(file, dest, _7zPath, overwriteDest) { - return __awaiter(this, void 0, void 0, function* () { - if (process.platform != 'win32') { - throw new Error('extract7z() not supported on current OS'); - } - if (!file) { - throw new Error("parameter 'file' is required"); - } - console.log(tl.loc('TOOL_LIB_ExtractingArchive')); - dest = _createExtractFolder(dest); - let originalCwd = process.cwd(); - try { - process.chdir(dest); - if (_7zPath) { - // extract - const _7z = tl.tool(_7zPath); - if (overwriteDest) { - _7z.arg('-aoa'); - } - _7z.arg('x') // eXtract files with full paths - .arg('-bb1') // -bb[0-3] : set output log level - .arg('-bd') // disable progress indicator - .arg('-sccUTF-8') // set charset for for console input/output - .arg(file); - yield _7z.exec(); - } - else { - // extract - let escapedScript = path.join(__dirname, 'Invoke-7zdec.ps1').replace(/'/g, "''").replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines - let escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); - let escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); - const overrideDestDirectory = overwriteDest ? 1 : 0; - const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}' -OverrideDestDirectory ${overrideDestDirectory}`; - let powershellPath = tl.which('powershell', true); - let powershell = tl.tool(powershellPath) - .line('-NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command') - .arg(command); - powershell.on('stdout', (buffer) => { - process.stdout.write(buffer); - }); - powershell.on('stderr', (buffer) => { - process.stderr.write(buffer); - }); - yield powershell.exec({ silent: true }); - } - } - finally { - process.chdir(originalCwd); - } - return dest; - }); -} -exports.extract7z = extract7z; -/** - * installs a tool from a tar by extracting the tar and installing it into the tool cache - * - * @param file file path of the tar - * @param tool name of tool in the tool cache - * @param version version of the tool - * @param arch arch of the tool. optional. defaults to the arch of the machine - * @param options IExtractOptions - * @param destination destination directory. optional. - */ -function extractTar(file, destination) { - return __awaiter(this, void 0, void 0, function* () { - // mkdir -p node/4.7.0/x64 - // tar xzC ./node/4.7.0/x64 -f node-v4.7.0-darwin-x64.tar.gz --strip-components 1 - console.log(tl.loc('TOOL_LIB_ExtractingArchive')); - let dest = _createExtractFolder(destination); - let tr = tl.tool('tar'); - tr.arg(['xC', dest, '-f', file]); - yield tr.exec(); - return dest; - }); -} -exports.extractTar = extractTar; -function extractZip(file, destination) { - return __awaiter(this, void 0, void 0, function* () { - if (!file) { - throw new Error("parameter 'file' is required"); - } - console.log(tl.loc('TOOL_LIB_ExtractingArchive')); - let dest = _createExtractFolder(destination); - if (process.platform == 'win32') { - // build the powershell command - let escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines - let escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ''); - let command = `$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}')`; - // change the console output code page to UTF-8. - // TODO: FIX WHICH: let chcpPath = tl.which('chcp.com', true); - let chcpPath = path.join(process.env.windir, "system32", "chcp.com"); - yield tl.exec(chcpPath, '65001'); - // run powershell - let powershell = tl.tool('powershell') - .line('-NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command') - .arg(command); - yield powershell.exec(); - } - else { - let unzip = tl.tool('unzip') - .arg(file); - yield unzip.exec({ cwd: dest }); - } - return dest; - }); -} -exports.extractZip = extractZip; -function _createExtractFolder(dest) { - if (!dest) { - // create a temp dir - dest = path.join(_getAgentTemp(), uuidV4()); - } - tl.mkdirP(dest); - return dest; -} -//--------------------- -// Query Functions -//--------------------- -// default input will be >= LTS version. drop label different than value. -// v4 (LTS) would have a value of 4.x -// option to always download? (not cache), TTL? -/** - * Scrape a web page for versions by regex - * - * @param url url to scrape - * @param regex regex to use for version matches - * @param handlers optional handlers array. Auth handlers to pass to the HttpClient for the tool download. - */ -function scrape(url, regex, handlers) { - return __awaiter(this, void 0, void 0, function* () { - handlers = handlers || null; - let http = new httpm.HttpClient(userAgent, handlers, requestOptions); - let output = yield (yield http.get(url)).readBody(); - let matches = output.match(regex); - let seen = {}; - let versions = []; - for (let i = 0; i < matches.length; i++) { - let ver = semver.clean(matches[i]); - if (!seen.hasOwnProperty(ver)) { - seen[ver] = true; - versions.push(ver); - } - } - return versions; - }); -} -exports.scrape = scrape; -function _getCacheRoot() { - tl.assertAgent('2.115.0'); - let cacheRoot = tl.getVariable('Agent.ToolsDirectory'); - if (!cacheRoot) { - throw new Error('Agent.ToolsDirectory is not set'); - } - return cacheRoot; -} -function _getAgentTemp() { - tl.assertAgent('2.115.0'); - let tempDirectory = tl.getVariable('Agent.TempDirectory'); - if (!tempDirectory) { - throw new Error('Agent.TempDirectory is not set'); - } - return tempDirectory; -} - /***/ }), @@ -26908,508 +26832,508 @@ exports.debug = debug; // for test /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const url = __nccwpck_require__(7310); -const http = __nccwpck_require__(3685); -const https = __nccwpck_require__(5687); -const util = __nccwpck_require__(9470); -let fs; -let tunnel; -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); -const HttpRedirectCodes = [HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect]; -const HttpResponseRetryCodes = [HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout]; -const NetworkRetryErrors = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED']; -const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const chunks = []; - const encodingCharset = util.obtainContentCharset(this); - // Extract Encoding from header: 'content-encoding' - // Match `gzip`, `gzip, deflate` variations of GZIP encoding - const contentEncoding = this.message.headers['content-encoding'] || ''; - const isGzippedEncoded = new RegExp('(gzip$)|(gzip, *deflate)').test(contentEncoding); - this.message.on('data', function (data) { - const chunk = (typeof data === 'string') ? Buffer.from(data, encodingCharset) : data; - chunks.push(chunk); - }).on('end', function () { - return __awaiter(this, void 0, void 0, function* () { - const buffer = Buffer.concat(chunks); - if (isGzippedEncoded) { // Process GZipped Response Body HERE - const gunzippedBody = yield util.decompressGzippedContent(buffer, encodingCharset); - resolve(gunzippedBody); - } - else { - resolve(buffer.toString(encodingCharset)); - } - }); - }).on('error', function (err) { - reject(err); - }); - })); - } -} -exports.HttpClientResponse = HttpClientResponse; -function isHttps(requestUrl) { - let parsedUrl = url.parse(requestUrl); - return parsedUrl.protocol === 'https:'; -} -exports.isHttps = isHttps; -var EnvironmentVariables; -(function (EnvironmentVariables) { - EnvironmentVariables["HTTP_PROXY"] = "HTTP_PROXY"; - EnvironmentVariables["HTTPS_PROXY"] = "HTTPS_PROXY"; - EnvironmentVariables["NO_PROXY"] = "NO_PROXY"; -})(EnvironmentVariables || (EnvironmentVariables = {})); -class HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - let no_proxy = process.env[EnvironmentVariables.NO_PROXY]; - if (no_proxy) { - this._httpProxyBypassHosts = []; - no_proxy.split(',').forEach(bypass => { - this._httpProxyBypassHosts.push(util.buildProxyBypassRegexFromEnv(bypass)); - }); - } - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - this._httpProxy = requestOptions.proxy; - if (requestOptions.proxy && requestOptions.proxy.proxyBypassHosts) { - this._httpProxyBypassHosts = []; - requestOptions.proxy.proxyBypassHosts.forEach(bypass => { - this._httpProxyBypassHosts.push(new RegExp(bypass, 'i')); - }); - } - this._certConfig = requestOptions.cert; - if (this._certConfig) { - // If using cert, need fs - fs = __nccwpck_require__(7147); - // cache the cert content into memory, so we don't have to read it from disk every time - if (this._certConfig.caFile && fs.existsSync(this._certConfig.caFile)) { - this._ca = fs.readFileSync(this._certConfig.caFile, 'utf8'); - } - if (this._certConfig.certFile && fs.existsSync(this._certConfig.certFile)) { - this._cert = fs.readFileSync(this._certConfig.certFile, 'utf8'); - } - if (this._certConfig.keyFile && fs.existsSync(this._certConfig.keyFile)) { - this._key = fs.readFileSync(this._certConfig.keyFile, 'utf8'); - } - } - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - } - get(requestUrl, additionalHeaders) { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - } - del(requestUrl, additionalHeaders) { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - } - post(requestUrl, data, additionalHeaders) { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - } - patch(requestUrl, data, additionalHeaders) { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - } - put(requestUrl, data, additionalHeaders) { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - } - head(requestUrl, additionalHeaders) { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return this.request(verb, requestUrl, stream, additionalHeaders); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - let parsedUrl = url.parse(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - let maxTries = (this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - while (numTries < maxTries) { - try { - response = yield this.requestRaw(info, data); - } - catch (err) { - numTries++; - if (err && err.code && NetworkRetryErrors.indexOf(err.code) > -1 && numTries < maxTries) { - yield this._performExponentialBackoff(numTries); - continue; - } - throw err; - } - // Check if it's an authentication challenge - if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (let i = 0; i < this.handlers.length; i++) { - if (this.handlers[i].canHandleAuthentication(response)) { - authenticationHandler = this.handlers[i]; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 - && this._allowRedirects - && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - let parsedRedirectUrl = url.parse(redirectUrl); - if (parsedUrl.protocol == 'https:' && parsedUrl.protocol != parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return new Promise((resolve, reject) => { - let callbackForResult = function (err, res) { - if (err) { - reject(err); - } - resolve(res); - }; - this.requestRawWithCallback(info, data, callbackForResult); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - let socket; - if (typeof (data) === 'string') { - info.options.headers["Content-Length"] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - let handleResult = (err, res) => { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - }; - let req = info.httpModule.request(info.options, (msg) => { - let res = new HttpClientResponse(msg); - handleResult(null, res); - }); - req.on('socket', (sock) => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.destroy(); - } - handleResult(new Error('Request timeout: ' + info.options.path), null); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err, null); - }); - if (data && typeof (data) === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof (data) !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; - info.options.path = (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.timeout = (this.requestOptions && this.requestOptions.socketTimeout) || this._socketTimeout; - this._socketTimeout = info.options.timeout; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers["user-agent"] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers && !this._isPresigned(url.format(requestUrl))) { - this.handlers.forEach((handler) => { - handler.prepareRequest(info.options); - }); - } - return info; - } - _isPresigned(requestUrl) { - if (this.requestOptions && this.requestOptions.presignedUrlPatterns) { - const patterns = this.requestOptions.presignedUrlPatterns; - for (let i = 0; i < patterns.length; i++) { - if (requestUrl.match(patterns[i])) { - return true; - } - } - } - return false; - } - _mergeHeaders(headers) { - const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); - } - return lowercaseKeys(headers || {}); - } - _getAgent(parsedUrl) { - let agent; - let proxy = this._getProxy(parsedUrl); - let useProxy = proxy.proxyUrl && proxy.proxyUrl.hostname && !this._isMatchInBypassProxyList(parsedUrl); - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (this._keepAlive && !useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (!!agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (!!this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - if (useProxy) { - // If using proxy, need tunnel - if (!tunnel) { - tunnel = __nccwpck_require__(4294); - } - const agentOptions = { - maxSockets: maxSockets, - keepAlive: this._keepAlive, - proxy: { - proxyAuth: proxy.proxyAuth, - host: proxy.proxyUrl.hostname, - port: proxy.proxyUrl.port - }, - }; - let tunnelAgent; - const overHttps = proxy.proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (this._keepAlive && !agent) { - const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - // if not using private agent and tunnel agent isn't setup then use global agent - if (!agent) { - agent = usingSsl ? https.globalAgent : http.globalAgent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false }); - } - if (usingSsl && this._certConfig) { - agent.options = Object.assign(agent.options || {}, { ca: this._ca, cert: this._cert, key: this._key, passphrase: this._certConfig.passphrase }); - } - return agent; - } - _getProxy(parsedUrl) { - let usingSsl = parsedUrl.protocol === 'https:'; - let proxyConfig = this._httpProxy; - // fallback to http_proxy and https_proxy env - let https_proxy = process.env[EnvironmentVariables.HTTPS_PROXY]; - let http_proxy = process.env[EnvironmentVariables.HTTP_PROXY]; - if (!proxyConfig) { - if (https_proxy && usingSsl) { - proxyConfig = { - proxyUrl: https_proxy - }; - } - else if (http_proxy) { - proxyConfig = { - proxyUrl: http_proxy - }; - } - } - let proxyUrl; - let proxyAuth; - if (proxyConfig) { - if (proxyConfig.proxyUrl.length > 0) { - proxyUrl = url.parse(proxyConfig.proxyUrl); - } - if (proxyConfig.proxyUsername || proxyConfig.proxyPassword) { - proxyAuth = proxyConfig.proxyUsername + ":" + proxyConfig.proxyPassword; - } - } - return { proxyUrl: proxyUrl, proxyAuth: proxyAuth }; - } - _isMatchInBypassProxyList(parsedUrl) { - if (!this._httpProxyBypassHosts) { - return false; - } - let bypass = false; - this._httpProxyBypassHosts.forEach(bypassHost => { - if (bypassHost.test(parsedUrl.href)) { - bypass = true; - } - }); - return bypass; - } - _performExponentialBackoff(retryNumber) { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - } -} -exports.HttpClient = HttpClient; + +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const url = __nccwpck_require__(7310); +const http = __nccwpck_require__(3685); +const https = __nccwpck_require__(5687); +const util = __nccwpck_require__(9470); +let fs; +let tunnel; +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +const HttpRedirectCodes = [HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect]; +const HttpResponseRetryCodes = [HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout]; +const NetworkRetryErrors = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED']; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const chunks = []; + const encodingCharset = util.obtainContentCharset(this); + // Extract Encoding from header: 'content-encoding' + // Match `gzip`, `gzip, deflate` variations of GZIP encoding + const contentEncoding = this.message.headers['content-encoding'] || ''; + const isGzippedEncoded = new RegExp('(gzip$)|(gzip, *deflate)').test(contentEncoding); + this.message.on('data', function (data) { + const chunk = (typeof data === 'string') ? Buffer.from(data, encodingCharset) : data; + chunks.push(chunk); + }).on('end', function () { + return __awaiter(this, void 0, void 0, function* () { + const buffer = Buffer.concat(chunks); + if (isGzippedEncoded) { // Process GZipped Response Body HERE + const gunzippedBody = yield util.decompressGzippedContent(buffer, encodingCharset); + resolve(gunzippedBody); + } + else { + resolve(buffer.toString(encodingCharset)); + } + }); + }).on('error', function (err) { + reject(err); + }); + })); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + let parsedUrl = url.parse(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +var EnvironmentVariables; +(function (EnvironmentVariables) { + EnvironmentVariables["HTTP_PROXY"] = "HTTP_PROXY"; + EnvironmentVariables["HTTPS_PROXY"] = "HTTPS_PROXY"; + EnvironmentVariables["NO_PROXY"] = "NO_PROXY"; +})(EnvironmentVariables || (EnvironmentVariables = {})); +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + let no_proxy = process.env[EnvironmentVariables.NO_PROXY]; + if (no_proxy) { + this._httpProxyBypassHosts = []; + no_proxy.split(',').forEach(bypass => { + this._httpProxyBypassHosts.push(util.buildProxyBypassRegexFromEnv(bypass)); + }); + } + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + this._httpProxy = requestOptions.proxy; + if (requestOptions.proxy && requestOptions.proxy.proxyBypassHosts) { + this._httpProxyBypassHosts = []; + requestOptions.proxy.proxyBypassHosts.forEach(bypass => { + this._httpProxyBypassHosts.push(new RegExp(bypass, 'i')); + }); + } + this._certConfig = requestOptions.cert; + if (this._certConfig) { + // If using cert, need fs + fs = __nccwpck_require__(7147); + // cache the cert content into memory, so we don't have to read it from disk every time + if (this._certConfig.caFile && fs.existsSync(this._certConfig.caFile)) { + this._ca = fs.readFileSync(this._certConfig.caFile, 'utf8'); + } + if (this._certConfig.certFile && fs.existsSync(this._certConfig.certFile)) { + this._cert = fs.readFileSync(this._certConfig.certFile, 'utf8'); + } + if (this._certConfig.keyFile && fs.existsSync(this._certConfig.keyFile)) { + this._key = fs.readFileSync(this._certConfig.keyFile, 'utf8'); + } + } + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + } + get(requestUrl, additionalHeaders) { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + } + del(requestUrl, additionalHeaders) { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + } + post(requestUrl, data, additionalHeaders) { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + } + patch(requestUrl, data, additionalHeaders) { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + } + put(requestUrl, data, additionalHeaders) { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + } + head(requestUrl, additionalHeaders) { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return this.request(verb, requestUrl, stream, additionalHeaders); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error("Client has already been disposed."); + } + let parsedUrl = url.parse(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + let maxTries = (this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + while (numTries < maxTries) { + try { + response = yield this.requestRaw(info, data); + } + catch (err) { + numTries++; + if (err && err.code && NetworkRetryErrors.indexOf(err.code) > -1 && numTries < maxTries) { + yield this._performExponentialBackoff(numTries); + continue; + } + throw err; + } + // Check if it's an authentication challenge + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (let i = 0; i < this.handlers.length; i++) { + if (this.handlers[i].canHandleAuthentication(response)) { + authenticationHandler = this.handlers[i]; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 + && this._allowRedirects + && redirectsRemaining > 0) { + const redirectUrl = response.message.headers["location"]; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + let parsedRedirectUrl = url.parse(redirectUrl); + if (parsedUrl.protocol == 'https:' && parsedUrl.protocol != parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { + throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + yield response.readBody(); + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return new Promise((resolve, reject) => { + let callbackForResult = function (err, res) { + if (err) { + reject(err); + } + resolve(res); + }; + this.requestRawWithCallback(info, data, callbackForResult); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + let socket; + if (typeof (data) === 'string') { + info.options.headers["Content-Length"] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + let handleResult = (err, res) => { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + }; + let req = info.httpModule.request(info.options, (msg) => { + let res = new HttpClientResponse(msg); + handleResult(null, res); + }); + req.on('socket', (sock) => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.destroy(); + } + handleResult(new Error('Request timeout: ' + info.options.path), null); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err, null); + }); + if (data && typeof (data) === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof (data) !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort; + info.options.path = (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.timeout = (this.requestOptions && this.requestOptions.socketTimeout) || this._socketTimeout; + this._socketTimeout = info.options.timeout; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers["user-agent"] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers && !this._isPresigned(url.format(requestUrl))) { + this.handlers.forEach((handler) => { + handler.prepareRequest(info.options); + }); + } + return info; + } + _isPresigned(requestUrl) { + if (this.requestOptions && this.requestOptions.presignedUrlPatterns) { + const patterns = this.requestOptions.presignedUrlPatterns; + for (let i = 0; i < patterns.length; i++) { + if (requestUrl.match(patterns[i])) { + return true; + } + } + } + return false; + } + _mergeHeaders(headers) { + const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); + } + return lowercaseKeys(headers || {}); + } + _getAgent(parsedUrl) { + let agent; + let proxy = this._getProxy(parsedUrl); + let useProxy = proxy.proxyUrl && proxy.proxyUrl.hostname && !this._isMatchInBypassProxyList(parsedUrl); + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (!!agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (!!this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + if (useProxy) { + // If using proxy, need tunnel + if (!tunnel) { + tunnel = __nccwpck_require__(4294); + } + const agentOptions = { + maxSockets: maxSockets, + keepAlive: this._keepAlive, + proxy: { + proxyAuth: proxy.proxyAuth, + host: proxy.proxyUrl.hostname, + port: proxy.proxyUrl.port + }, + }; + let tunnelAgent; + const overHttps = proxy.proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false }); + } + if (usingSsl && this._certConfig) { + agent.options = Object.assign(agent.options || {}, { ca: this._ca, cert: this._cert, key: this._key, passphrase: this._certConfig.passphrase }); + } + return agent; + } + _getProxy(parsedUrl) { + let usingSsl = parsedUrl.protocol === 'https:'; + let proxyConfig = this._httpProxy; + // fallback to http_proxy and https_proxy env + let https_proxy = process.env[EnvironmentVariables.HTTPS_PROXY]; + let http_proxy = process.env[EnvironmentVariables.HTTP_PROXY]; + if (!proxyConfig) { + if (https_proxy && usingSsl) { + proxyConfig = { + proxyUrl: https_proxy + }; + } + else if (http_proxy) { + proxyConfig = { + proxyUrl: http_proxy + }; + } + } + let proxyUrl; + let proxyAuth; + if (proxyConfig) { + if (proxyConfig.proxyUrl.length > 0) { + proxyUrl = url.parse(proxyConfig.proxyUrl); + } + if (proxyConfig.proxyUsername || proxyConfig.proxyPassword) { + proxyAuth = proxyConfig.proxyUsername + ":" + proxyConfig.proxyPassword; + } + } + return { proxyUrl: proxyUrl, proxyAuth: proxyAuth }; + } + _isMatchInBypassProxyList(parsedUrl) { + if (!this._httpProxyBypassHosts) { + return false; + } + let bypass = false; + this._httpProxyBypassHosts.forEach(bypassHost => { + if (bypassHost.test(parsedUrl.href)) { + bypass = true; + } + }); + return bypass; + } + _performExponentialBackoff(retryNumber) { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + } +} +exports.HttpClient = HttpClient; /***/ }), @@ -27418,149 +27342,149 @@ exports.HttpClient = HttpClient; /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; - -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -const qs = __nccwpck_require__(2760); -const url = __nccwpck_require__(7310); -const path = __nccwpck_require__(1017); -const zlib = __nccwpck_require__(9796); -/** - * creates an url from a request url and optional base url (http://server:8080) - * @param {string} resource - a fully qualified url or relative path - * @param {string} baseUrl - an optional baseUrl (http://server:8080) - * @param {IRequestOptions} options - an optional options object, could include QueryParameters e.g. - * @return {string} - resultant url - */ -function getUrl(resource, baseUrl, queryParams) { - const pathApi = path.posix || path; - let requestUrl = ''; - if (!baseUrl) { - requestUrl = resource; - } - else if (!resource) { - requestUrl = baseUrl; - } - else { - const base = url.parse(baseUrl); - const resultantUrl = url.parse(resource); - // resource (specific per request) elements take priority - resultantUrl.protocol = resultantUrl.protocol || base.protocol; - resultantUrl.auth = resultantUrl.auth || base.auth; - resultantUrl.host = resultantUrl.host || base.host; - resultantUrl.pathname = pathApi.resolve(base.pathname, resultantUrl.pathname); - if (!resultantUrl.pathname.endsWith('/') && resource.endsWith('/')) { - resultantUrl.pathname += '/'; - } - requestUrl = url.format(resultantUrl); - } - return queryParams ? - getUrlWithParsedQueryParams(requestUrl, queryParams) : - requestUrl; -} -exports.getUrl = getUrl; -/** - * - * @param {string} requestUrl - * @param {IRequestQueryParams} queryParams - * @return {string} - Request's URL with Query Parameters appended/parsed. - */ -function getUrlWithParsedQueryParams(requestUrl, queryParams) { - const url = requestUrl.replace(/\?$/g, ''); // Clean any extra end-of-string "?" character - const parsedQueryParams = qs.stringify(queryParams.params, buildParamsStringifyOptions(queryParams)); - return `${url}${parsedQueryParams}`; -} -/** - * Build options for QueryParams Stringifying. - * - * @param {IRequestQueryParams} queryParams - * @return {object} - */ -function buildParamsStringifyOptions(queryParams) { - let options = { - addQueryPrefix: true, - delimiter: (queryParams.options || {}).separator || '&', - allowDots: (queryParams.options || {}).shouldAllowDots || false, - arrayFormat: (queryParams.options || {}).arrayFormat || 'repeat', - encodeValuesOnly: (queryParams.options || {}).shouldOnlyEncodeValues || true - }; - return options; -} -/** - * Decompress/Decode gzip encoded JSON - * Using Node.js built-in zlib module - * - * @param {Buffer} buffer - * @param {string} charset? - optional; defaults to 'utf-8' - * @return {Promise} - */ -function decompressGzippedContent(buffer, charset) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - zlib.gunzip(buffer, function (error, buffer) { - if (error) { - reject(error); - } - else { - resolve(buffer.toString(charset || 'utf-8')); - } - }); - })); - }); -} -exports.decompressGzippedContent = decompressGzippedContent; -/** - * Builds a RegExp to test urls against for deciding - * wether to bypass proxy from an entry of the - * environment variable setting NO_PROXY - * - * @param {string} bypass - * @return {RegExp} - */ -function buildProxyBypassRegexFromEnv(bypass) { - try { - // We need to keep this around for back-compat purposes - return new RegExp(bypass, 'i'); - } - catch (err) { - if (err instanceof SyntaxError && (bypass || "").startsWith("*")) { - let wildcardEscaped = bypass.replace('*', '(.*)'); - return new RegExp(wildcardEscaped, 'i'); - } - throw err; - } -} -exports.buildProxyBypassRegexFromEnv = buildProxyBypassRegexFromEnv; -/** - * Obtain Response's Content Charset. - * Through inspecting `content-type` response header. - * It Returns 'utf-8' if NO charset specified/matched. - * - * @param {IHttpClientResponse} response - * @return {string} - Content Encoding Charset; Default=utf-8 - */ -function obtainContentCharset(response) { - // Find the charset, if specified. - // Search for the `charset=CHARSET` string, not including `;,\r\n` - // Example: content-type: 'application/json;charset=utf-8' - // |__ matches would be ['charset=utf-8', 'utf-8', index: 18, input: 'application/json; charset=utf-8'] - // |_____ matches[1] would have the charset :tada: , in our example it's utf-8 - // However, if the matches Array was empty or no charset found, 'utf-8' would be returned by default. - const nodeSupportedEncodings = ['ascii', 'utf8', 'utf16le', 'ucs2', 'base64', 'binary', 'hex']; - const contentType = response.message.headers['content-type'] || ''; - const matches = contentType.match(/charset=([^;,\r\n]+)/i); - return (matches && matches[1] && nodeSupportedEncodings.indexOf(matches[1]) != -1) ? matches[1] : 'utf-8'; -} -exports.obtainContentCharset = obtainContentCharset; + +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const qs = __nccwpck_require__(2760); +const url = __nccwpck_require__(7310); +const path = __nccwpck_require__(1017); +const zlib = __nccwpck_require__(9796); +/** + * creates an url from a request url and optional base url (http://server:8080) + * @param {string} resource - a fully qualified url or relative path + * @param {string} baseUrl - an optional baseUrl (http://server:8080) + * @param {IRequestOptions} options - an optional options object, could include QueryParameters e.g. + * @return {string} - resultant url + */ +function getUrl(resource, baseUrl, queryParams) { + const pathApi = path.posix || path; + let requestUrl = ''; + if (!baseUrl) { + requestUrl = resource; + } + else if (!resource) { + requestUrl = baseUrl; + } + else { + const base = url.parse(baseUrl); + const resultantUrl = url.parse(resource); + // resource (specific per request) elements take priority + resultantUrl.protocol = resultantUrl.protocol || base.protocol; + resultantUrl.auth = resultantUrl.auth || base.auth; + resultantUrl.host = resultantUrl.host || base.host; + resultantUrl.pathname = pathApi.resolve(base.pathname, resultantUrl.pathname); + if (!resultantUrl.pathname.endsWith('/') && resource.endsWith('/')) { + resultantUrl.pathname += '/'; + } + requestUrl = url.format(resultantUrl); + } + return queryParams ? + getUrlWithParsedQueryParams(requestUrl, queryParams) : + requestUrl; +} +exports.getUrl = getUrl; +/** + * + * @param {string} requestUrl + * @param {IRequestQueryParams} queryParams + * @return {string} - Request's URL with Query Parameters appended/parsed. + */ +function getUrlWithParsedQueryParams(requestUrl, queryParams) { + const url = requestUrl.replace(/\?$/g, ''); // Clean any extra end-of-string "?" character + const parsedQueryParams = qs.stringify(queryParams.params, buildParamsStringifyOptions(queryParams)); + return `${url}${parsedQueryParams}`; +} +/** + * Build options for QueryParams Stringifying. + * + * @param {IRequestQueryParams} queryParams + * @return {object} + */ +function buildParamsStringifyOptions(queryParams) { + let options = { + addQueryPrefix: true, + delimiter: (queryParams.options || {}).separator || '&', + allowDots: (queryParams.options || {}).shouldAllowDots || false, + arrayFormat: (queryParams.options || {}).arrayFormat || 'repeat', + encodeValuesOnly: (queryParams.options || {}).shouldOnlyEncodeValues || true + }; + return options; +} +/** + * Decompress/Decode gzip encoded JSON + * Using Node.js built-in zlib module + * + * @param {Buffer} buffer + * @param {string} charset? - optional; defaults to 'utf-8' + * @return {Promise} + */ +function decompressGzippedContent(buffer, charset) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + zlib.gunzip(buffer, function (error, buffer) { + if (error) { + reject(error); + } + else { + resolve(buffer.toString(charset || 'utf-8')); + } + }); + })); + }); +} +exports.decompressGzippedContent = decompressGzippedContent; +/** + * Builds a RegExp to test urls against for deciding + * wether to bypass proxy from an entry of the + * environment variable setting NO_PROXY + * + * @param {string} bypass + * @return {RegExp} + */ +function buildProxyBypassRegexFromEnv(bypass) { + try { + // We need to keep this around for back-compat purposes + return new RegExp(bypass, 'i'); + } + catch (err) { + if (err instanceof SyntaxError && (bypass || "").startsWith("*")) { + let wildcardEscaped = bypass.replace('*', '(.*)'); + return new RegExp(wildcardEscaped, 'i'); + } + throw err; + } +} +exports.buildProxyBypassRegexFromEnv = buildProxyBypassRegexFromEnv; +/** + * Obtain Response's Content Charset. + * Through inspecting `content-type` response header. + * It Returns 'utf-8' if NO charset specified/matched. + * + * @param {IHttpClientResponse} response + * @return {string} - Content Encoding Charset; Default=utf-8 + */ +function obtainContentCharset(response) { + // Find the charset, if specified. + // Search for the `charset=CHARSET` string, not including `;,\r\n` + // Example: content-type: 'application/json;charset=utf-8' + // |__ matches would be ['charset=utf-8', 'utf-8', index: 18, input: 'application/json; charset=utf-8'] + // |_____ matches[1] would have the charset :tada: , in our example it's utf-8 + // However, if the matches Array was empty or no charset found, 'utf-8' would be returned by default. + const nodeSupportedEncodings = ['ascii', 'utf8', 'utf16le', 'ucs2', 'base64', 'binary', 'hex']; + const contentType = response.message.headers['content-type'] || ''; + const matches = contentType.match(/charset=([^;,\r\n]+)/i); + return (matches && matches[1] && nodeSupportedEncodings.indexOf(matches[1]) != -1) ? matches[1] : 'utf-8'; +} +exports.obtainContentCharset = obtainContentCharset; /***/ }), diff --git a/synopsys-task/dist/index.js.map b/synopsys-task/dist/index.js.map index 0e119ce0..6ea509f7 100644 --- a/synopsys-task/dist/index.js.map +++ b/synopsys-task/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrJA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACp/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACp/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACv8BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACp/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;;;;;;;;;;;;;;;;;;;;;AAqBA;;;;;;;;;;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACZA;AACA;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACl7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACreA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACv7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACngBA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAgCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3hEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7SA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClBA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnNA;AACA;AACA;AACA;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA;;;;;;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACndA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACdA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrHA;;;;;;;;ACAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3HA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzaA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AChCA;AACA;AACA;AACA;AACA;;;;ACJA;AACA;;;;AEDA;AACA;AACA;AACA","sources":["../webpack://synopsys-task/./lib/main.js","../webpack://synopsys-task/./lib/synopsys-task/application-constant.js","../webpack://synopsys-task/./lib/synopsys-task/azure-service-client.js","../webpack://synopsys-task/./lib/synopsys-task/diagnostics.js","../webpack://synopsys-task/./lib/synopsys-task/download-tool.js","../webpack://synopsys-task/./lib/synopsys-task/enum/BuildStatus.js","../webpack://synopsys-task/./lib/synopsys-task/enum/ErrorCodes.js","../webpack://synopsys-task/./lib/synopsys-task/input.js","../webpack://synopsys-task/./lib/synopsys-task/model/azure.js","../webpack://synopsys-task/./lib/synopsys-task/model/blackduck.js","../webpack://synopsys-task/./lib/synopsys-task/model/polaris.js","../webpack://synopsys-task/./lib/synopsys-task/synopsys-bridge.js","../webpack://synopsys-task/./lib/synopsys-task/tools-parameter.js","../webpack://synopsys-task/./lib/synopsys-task/utility.js","../webpack://synopsys-task/./lib/synopsys-task/validator.js","../webpack://synopsys-task/./node_modules/azure-pipelines-task-lib/internal.js","../webpack://synopsys-task/./node_modules/azure-pipelines-task-lib/node_modules/semver/semver.js","../webpack://synopsys-task/./node_modules/azure-pipelines-task-lib/node_modules/uuid/lib/bytesToUuid.js","../webpack://synopsys-task/./node_modules/azure-pipelines-task-lib/node_modules/uuid/lib/rng.js","../webpack://synopsys-task/./node_modules/azure-pipelines-task-lib/node_modules/uuid/v4.js","../webpack://synopsys-task/./node_modules/azure-pipelines-task-lib/task.js","../webpack://synopsys-task/./node_modules/azure-pipelines-task-lib/taskcommand.js","../webpack://synopsys-task/./node_modules/azure-pipelines-task-lib/toolrunner.js","../webpack://synopsys-task/./node_modules/azure-pipelines-task-lib/vault.js","../webpack://synopsys-task/./node_modules/azure-pipelines-tool-lib/node_modules/semver/semver.js","../webpack://synopsys-task/./node_modules/azure-pipelines-tool-lib/node_modules/uuid/lib/bytesToUuid.js","../webpack://synopsys-task/./node_modules/azure-pipelines-tool-lib/node_modules/uuid/lib/rng.js","../webpack://synopsys-task/./node_modules/azure-pipelines-tool-lib/node_modules/uuid/v4.js","../webpack://synopsys-task/./node_modules/azure-pipelines-tool-lib/tool.js","../webpack://synopsys-task/./node_modules/balanced-match/index.js","../webpack://synopsys-task/./node_modules/brace-expansion/index.js","../webpack://synopsys-task/./node_modules/call-bind/callBound.js","../webpack://synopsys-task/./node_modules/call-bind/index.js","../webpack://synopsys-task/./node_modules/concat-map/index.js","../webpack://synopsys-task/./node_modules/dom-parser/index.js","../webpack://synopsys-task/./node_modules/dom-parser/lib/Dom.js","../webpack://synopsys-task/./node_modules/dom-parser/lib/DomParser.js","../webpack://synopsys-task/./node_modules/dom-parser/lib/Node.js","../webpack://synopsys-task/./node_modules/fs.realpath/index.js","../webpack://synopsys-task/./node_modules/fs.realpath/old.js","../webpack://synopsys-task/./node_modules/function-bind/implementation.js","../webpack://synopsys-task/./node_modules/function-bind/index.js","../webpack://synopsys-task/./node_modules/get-intrinsic/index.js","../webpack://synopsys-task/./node_modules/glob/common.js","../webpack://synopsys-task/./node_modules/glob/glob.js","../webpack://synopsys-task/./node_modules/glob/node_modules/minimatch/minimatch.js","../webpack://synopsys-task/./node_modules/glob/sync.js","../webpack://synopsys-task/./node_modules/has-symbols/index.js","../webpack://synopsys-task/./node_modules/has-symbols/shams.js","../webpack://synopsys-task/./node_modules/has/src/index.js","../webpack://synopsys-task/./node_modules/inflight/inflight.js","../webpack://synopsys-task/./node_modules/inherits/inherits.js","../webpack://synopsys-task/./node_modules/inherits/inherits_browser.js","../webpack://synopsys-task/./node_modules/lru-cache/index.js","../webpack://synopsys-task/./node_modules/minimatch/minimatch.js","../webpack://synopsys-task/./node_modules/object-inspect/index.js","../webpack://synopsys-task/./node_modules/object-inspect/util.inspect.js","../webpack://synopsys-task/./node_modules/once/once.js","../webpack://synopsys-task/./node_modules/path-is-absolute/index.js","../webpack://synopsys-task/./node_modules/q/q.js","../webpack://synopsys-task/./node_modules/qs/lib/formats.js","../webpack://synopsys-task/./node_modules/qs/lib/index.js","../webpack://synopsys-task/./node_modules/qs/lib/parse.js","../webpack://synopsys-task/./node_modules/qs/lib/stringify.js","../webpack://synopsys-task/./node_modules/qs/lib/utils.js","../webpack://synopsys-task/./node_modules/semver-compare/index.js","../webpack://synopsys-task/./node_modules/semver/classes/comparator.js","../webpack://synopsys-task/./node_modules/semver/classes/range.js","../webpack://synopsys-task/./node_modules/semver/classes/semver.js","../webpack://synopsys-task/./node_modules/semver/functions/clean.js","../webpack://synopsys-task/./node_modules/semver/functions/cmp.js","../webpack://synopsys-task/./node_modules/semver/functions/coerce.js","../webpack://synopsys-task/./node_modules/semver/functions/compare-build.js","../webpack://synopsys-task/./node_modules/semver/functions/compare-loose.js","../webpack://synopsys-task/./node_modules/semver/functions/compare.js","../webpack://synopsys-task/./node_modules/semver/functions/diff.js","../webpack://synopsys-task/./node_modules/semver/functions/eq.js","../webpack://synopsys-task/./node_modules/semver/functions/gt.js","../webpack://synopsys-task/./node_modules/semver/functions/gte.js","../webpack://synopsys-task/./node_modules/semver/functions/inc.js","../webpack://synopsys-task/./node_modules/semver/functions/lt.js","../webpack://synopsys-task/./node_modules/semver/functions/lte.js","../webpack://synopsys-task/./node_modules/semver/functions/major.js","../webpack://synopsys-task/./node_modules/semver/functions/minor.js","../webpack://synopsys-task/./node_modules/semver/functions/neq.js","../webpack://synopsys-task/./node_modules/semver/functions/parse.js","../webpack://synopsys-task/./node_modules/semver/functions/patch.js","../webpack://synopsys-task/./node_modules/semver/functions/prerelease.js","../webpack://synopsys-task/./node_modules/semver/functions/rcompare.js","../webpack://synopsys-task/./node_modules/semver/functions/rsort.js","../webpack://synopsys-task/./node_modules/semver/functions/satisfies.js","../webpack://synopsys-task/./node_modules/semver/functions/sort.js","../webpack://synopsys-task/./node_modules/semver/functions/valid.js","../webpack://synopsys-task/./node_modules/semver/index.js","../webpack://synopsys-task/./node_modules/semver/internal/constants.js","../webpack://synopsys-task/./node_modules/semver/internal/debug.js","../webpack://synopsys-task/./node_modules/semver/internal/identifiers.js","../webpack://synopsys-task/./node_modules/semver/internal/parse-options.js","../webpack://synopsys-task/./node_modules/semver/internal/re.js","../webpack://synopsys-task/./node_modules/semver/ranges/gtr.js","../webpack://synopsys-task/./node_modules/semver/ranges/intersects.js","../webpack://synopsys-task/./node_modules/semver/ranges/ltr.js","../webpack://synopsys-task/./node_modules/semver/ranges/max-satisfying.js","../webpack://synopsys-task/./node_modules/semver/ranges/min-satisfying.js","../webpack://synopsys-task/./node_modules/semver/ranges/min-version.js","../webpack://synopsys-task/./node_modules/semver/ranges/outside.js","../webpack://synopsys-task/./node_modules/semver/ranges/simplify.js","../webpack://synopsys-task/./node_modules/semver/ranges/subset.js","../webpack://synopsys-task/./node_modules/semver/ranges/to-comparators.js","../webpack://synopsys-task/./node_modules/semver/ranges/valid.js","../webpack://synopsys-task/./node_modules/shelljs/commands.js","../webpack://synopsys-task/./node_modules/shelljs/shell.js","../webpack://synopsys-task/./node_modules/shelljs/src/cat.js","../webpack://synopsys-task/./node_modules/shelljs/src/cd.js","../webpack://synopsys-task/./node_modules/shelljs/src/chmod.js","../webpack://synopsys-task/./node_modules/shelljs/src/common.js","../webpack://synopsys-task/./node_modules/shelljs/src/cp.js","../webpack://synopsys-task/./node_modules/shelljs/src/dirs.js","../webpack://synopsys-task/./node_modules/shelljs/src/echo.js","../webpack://synopsys-task/./node_modules/shelljs/src/error.js","../webpack://synopsys-task/./node_modules/shelljs/src/exec-child.js","../webpack://synopsys-task/./node_modules/shelljs/src/exec.js","../webpack://synopsys-task/./node_modules/shelljs/src/find.js","../webpack://synopsys-task/./node_modules/shelljs/src/grep.js","../webpack://synopsys-task/./node_modules/shelljs/src/head.js","../webpack://synopsys-task/./node_modules/shelljs/src/ln.js","../webpack://synopsys-task/./node_modules/shelljs/src/ls.js","../webpack://synopsys-task/./node_modules/shelljs/src/mkdir.js","../webpack://synopsys-task/./node_modules/shelljs/src/mv.js","../webpack://synopsys-task/./node_modules/shelljs/src/popd.js","../webpack://synopsys-task/./node_modules/shelljs/src/pushd.js","../webpack://synopsys-task/./node_modules/shelljs/src/pwd.js","../webpack://synopsys-task/./node_modules/shelljs/src/rm.js","../webpack://synopsys-task/./node_modules/shelljs/src/sed.js","../webpack://synopsys-task/./node_modules/shelljs/src/set.js","../webpack://synopsys-task/./node_modules/shelljs/src/sort.js","../webpack://synopsys-task/./node_modules/shelljs/src/tail.js","../webpack://synopsys-task/./node_modules/shelljs/src/tempdir.js","../webpack://synopsys-task/./node_modules/shelljs/src/test.js","../webpack://synopsys-task/./node_modules/shelljs/src/to.js","../webpack://synopsys-task/./node_modules/shelljs/src/toEnd.js","../webpack://synopsys-task/./node_modules/shelljs/src/touch.js","../webpack://synopsys-task/./node_modules/shelljs/src/uniq.js","../webpack://synopsys-task/./node_modules/shelljs/src/which.js","../webpack://synopsys-task/./node_modules/side-channel/index.js","../webpack://synopsys-task/./node_modules/tunnel/index.js","../webpack://synopsys-task/./node_modules/tunnel/lib/tunnel.js","../webpack://synopsys-task/./node_modules/typed-rest-client/HttpClient.js","../webpack://synopsys-task/./node_modules/typed-rest-client/Util.js","../webpack://synopsys-task/./node_modules/wrappy/wrappy.js","../webpack://synopsys-task/./node_modules/yallist/iterator.js","../webpack://synopsys-task/./node_modules/yallist/yallist.js","../webpack://synopsys-task/external node-commonjs \"assert\"","../webpack://synopsys-task/external node-commonjs \"child_process\"","../webpack://synopsys-task/external node-commonjs \"crypto\"","../webpack://synopsys-task/external node-commonjs \"events\"","../webpack://synopsys-task/external node-commonjs \"fs\"","../webpack://synopsys-task/external node-commonjs \"http\"","../webpack://synopsys-task/external node-commonjs \"https\"","../webpack://synopsys-task/external node-commonjs \"net\"","../webpack://synopsys-task/external node-commonjs \"os\"","../webpack://synopsys-task/external node-commonjs \"path\"","../webpack://synopsys-task/external node-commonjs \"process\"","../webpack://synopsys-task/external node-commonjs \"tls\"","../webpack://synopsys-task/external node-commonjs \"url\"","../webpack://synopsys-task/external node-commonjs \"util\"","../webpack://synopsys-task/external node-commonjs \"zlib\"","../webpack://synopsys-task/webpack/bootstrap","../webpack://synopsys-task/webpack/runtime/node module decorator","../webpack://synopsys-task/webpack/runtime/compat","../webpack://synopsys-task/webpack/before-startup","../webpack://synopsys-task/webpack/startup","../webpack://synopsys-task/webpack/after-startup"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getStatusFromError = exports.getExitMessage = exports.run = void 0;\nconst utility_1 = require(\"./synopsys-task/utility\");\nconst synopsys_bridge_1 = require(\"./synopsys-task/synopsys-bridge\");\nconst taskLib = __importStar(require(\"azure-pipelines-task-lib/task\"));\nconst task_1 = require(\"azure-pipelines-task-lib/task\");\nconst constants = __importStar(require(\"./synopsys-task/application-constant\"));\nconst inputs = __importStar(require(\"./synopsys-task/input\"));\nconst input_1 = require(\"./synopsys-task/input\");\nconst diagnostics_1 = require(\"./synopsys-task/diagnostics\");\nconst ErrorCodes_1 = require(\"./synopsys-task/enum/ErrorCodes\");\nfunction run() {\n return __awaiter(this, void 0, void 0, function* () {\n console.log(\"Synopsys Task started...\");\n const tempDir = (0, utility_1.getTempDir)();\n taskLib.debug(`tempDir: ${tempDir}`);\n const workSpaceDir = (0, utility_1.getWorkSpaceDirectory)();\n taskLib.debug(`workSpaceDir: ${workSpaceDir}`);\n let azurePrResponse;\n try {\n const sb = new synopsys_bridge_1.SynopsysBridge();\n (0, input_1.showLogForDeprecatedInputs)();\n // Prepare tool commands\n const command = yield sb.prepareCommand(tempDir);\n let bridgePath = \"\";\n if (!inputs.ENABLE_NETWORK_AIRGAP) {\n bridgePath = yield sb.downloadAndExtractBridge(tempDir);\n }\n else {\n console.log(\"Network air gap is enabled, skipping synopsys-bridge download.\");\n bridgePath = yield sb.getSynopsysBridgePath();\n }\n // Execute prepared commands\n const result = yield sb.executeBridgeCommand(bridgePath, (0, utility_1.getWorkSpaceDirectory)(), command);\n // The statement set the exit code in the 'status' variable which can be used in the YAML file\n if ((0, utility_1.parseToBoolean)(inputs.RETURN_STATUS)) {\n console.log(`##vso[task.setvariable variable=status;isoutput=true]${result}`);\n }\n }\n catch (error) {\n throw error;\n }\n finally {\n if ((0, utility_1.parseToBoolean)(inputs.BLACKDUCK_REPORTS_SARIF_CREATE)) {\n if (!utility_1.IS_PR_EVENT) {\n console.log(\"BLACKDUCK_REPORTS_SARIF_CREATE is enabled\");\n (0, diagnostics_1.uploadSarifResultAsArtifact)(constants.DEFAULT_BLACKDUCK_SARIF_GENERATOR_DIRECTORY, inputs.BLACKDUCK_REPORTS_SARIF_FILE_PATH);\n }\n }\n if ((0, utility_1.parseToBoolean)(inputs.POLARIS_REPORTS_SARIF_CREATE)) {\n if (!utility_1.IS_PR_EVENT) {\n console.log(\"POLARIS_REPORTS_SARIF_CREATE is enabled\");\n (0, diagnostics_1.uploadSarifResultAsArtifact)(constants.DEFAULT_POLARIS_SARIF_GENERATOR_DIRECTORY, inputs.POLARIS_REPORTS_SARIF_FILE_PATH);\n }\n }\n if ((0, utility_1.parseToBoolean)(inputs.INCLUDE_DIAGNOSTICS)) {\n (0, diagnostics_1.uploadDiagnostics)(workSpaceDir);\n }\n }\n console.log(\"Synopsys Task workflow execution completed\");\n });\n}\nexports.run = run;\nfunction getExitMessage(message, exitCode) {\n return constants.EXIT_CODE_MAP.has(exitCode)\n ? \"Exit Code: \" + exitCode + \" - \" + constants.EXIT_CODE_MAP.get(exitCode)\n : \"Exit Code: \" +\n ErrorCodes_1.ErrorCode.UNDEFINED_ERROR_FROM_EXTENSION.toString() +\n \" - \" +\n \"Undefined error from extension: \" +\n message;\n}\nexports.getExitMessage = getExitMessage;\nfunction getStatusFromError(errorObject) {\n return errorObject.message.trim().split(\" \").pop() || \"\";\n}\nexports.getStatusFromError = getStatusFromError;\nfunction markBuildStatusIfIssuesArePresent(status, taskResult, errorMessage) {\n const exitMessage = getExitMessage(errorMessage, status);\n if (status == ErrorCodes_1.ErrorCode.BRIDGE_BREAK_ENABLED.toString()) {\n console.log(errorMessage);\n if (taskResult === task_1.TaskResult.Succeeded) {\n console.log(exitMessage);\n }\n console.log(`Marking the build ${task_1.TaskResult[taskResult]} as configured in the task`);\n taskLib.setResult(taskResult, exitMessage);\n }\n else {\n const ignoreMessageForBuildStatus = `Marking build status ${task_1.TaskResult[taskResult]} is ignored since exit code is: ${status}`;\n taskLib.error(errorMessage);\n console.log(ignoreMessageForBuildStatus);\n taskLib.setResult(taskLib.TaskResult.Failed, \"Workflow failed! \".concat(exitMessage));\n }\n}\nrun().catch((error) => {\n if (error.message != undefined) {\n const isReturnStatusEnabled = (0, utility_1.parseToBoolean)(inputs.RETURN_STATUS);\n const status = getStatusFromError(error);\n // The statement set the exit code in the 'status' variable which can be used in the YAML file\n if (isReturnStatusEnabled) {\n console.log(`##vso[task.setvariable variable=status;isoutput=true]${status}`);\n }\n const taskResult = (0, utility_1.getMappedTaskResult)(inputs.MARK_BUILD_STATUS);\n if (taskResult !== undefined && taskResult !== task_1.TaskResult.Failed) {\n markBuildStatusIfIssuesArePresent(status, taskResult, error.message);\n }\n else {\n taskLib.error(error.message);\n taskLib.setResult(taskLib.TaskResult.Failed, \"Workflow failed! \".concat(getExitMessage(error.message, status)));\n }\n }\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BRIDGE_POLARIS_REPORTS_SARIF_SEVERITIES_KEY = exports.POLARIS_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_FILE_PATH_KEY = exports.BRIDGE_POLARIS_REPORTS_SARIF_FILE_PATH_KEY = exports.POLARIS_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_CREATE_KEY = exports.BRIDGE_POLARIS_REPORTS_SARIF_CREATE_KEY = exports.POLARIS_PR_COMMENT_SEVERITIES_KEY_CLASSIC_EDITOR = exports.POLARIS_PR_COMMENT_SEVERITIES_KEY = exports.BRIDGE_POLARIS_PR_COMMENT_SEVERITIES_KEY = exports.POLARIS_PR_COMMENT_ENABLED_KEY_CLASSIC_EDITOR = exports.POLARIS_PR_COMMENT_ENABLED_KEY = exports.BRIDGE_POLARIS_PR_COMMENT_ENABLED_KEY = exports.POLARIS_BRANCH_PARENT_NAME_KEY_CLASSIC_EDITOR = exports.POLARIS_BRANCH_PARENT_NAME_KEY = exports.POLARIS_BRANCH_NAME_KEY_CLASSIC_EDITOR = exports.POLARIS_BRANCH_NAME_KEY = exports.BRIDGE_POLARIS_BRANCH_NAME_KEY = exports.POLARIS_TRIAGE_KEY_CLASSIC_EDITOR = exports.POLARIS_TRIAGE_KEY = exports.BRIDGE_POLARIS_TRIAGE_KEY = exports.POLARIS_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR = exports.POLARIS_ASSESSMENT_TYPES_KEY = exports.BRIDGE_POLARIS_ASSESSMENT_TYPES_KEY = exports.POLARIS_PROJECT_NAME_KEY_CLASSIC_EDITOR = exports.POLARIS_PROJECT_NAME_KEY = exports.BRIDGE_POLARIS_PROJECT_NAME_KEY = exports.POLARIS_APPLICATION_NAME_KEY_CLASSIC_EDITOR = exports.POLARIS_APPLICATION_NAME_KEY = exports.BRIDGE_POLARIS_APPLICATION_NAME_KEY = exports.POLARIS_ACCESS_TOKEN_KEY_CLASSIC_EDITOR = exports.POLARIS_ACCESS_TOKEN_KEY = exports.BRIDGE_POLARIS_ACCESS_TOKEN_KEY = exports.POLARIS_SERVER_URL_KEY_CLASSIC_EDITOR = exports.POLARIS_SERVER_URL_KEY = exports.BRIDGE_POLARIS_SERVER_URL_KEY = exports.SCAN_TYPE_KEY = exports.AZURE_TOKEN_KEY_CLASSIC_EDITOR = exports.AZURE_TOKEN_KEY = exports.SRM_KEY = exports.BLACKDUCK_KEY = exports.COVERITY_KEY = exports.POLARIS_KEY = exports.APPLICATION_NAME = exports.SYNOPSYS_BRIDGE_ZIP_FILE_NAME = exports.SYNOPSYS_BRIDGE_EXECUTABLE_MAC_LINUX = exports.SYNOPSYS_BRIDGE_EXECUTABLE_WINDOWS = exports.SYNOPSYS_BRIDGE_DEFAULT_PATH_LINUX = exports.SYNOPSYS_BRIDGE_DEFAULT_PATH_WINDOWS = exports.SYNOPSYS_BRIDGE_DEFAULT_PATH_MAC = void 0;\nexports.BRIDGE_COVERITY_VERSION_KEY = exports.COVERITY_LOCAL_KEY_CLASSIC_EDITOR = exports.COVERITY_LOCAL_KEY = exports.BRIDGE_COVERITY_LOCAL_KEY = exports.COVERITY_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = exports.COVERITY_PRCOMMENT_ENABLED_KEY = exports.COVERITY_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = exports.BRIDGE_COVERITY_AUTOMATION_PRCOMMENT_KEY = exports.COVERITY_POLICY_VIEW_KEY_CLASSIC_EDITOR = exports.COVERITY_POLICY_VIEW_KEY = exports.BRIDGE_COVERITY_POLICY_VIEW_KEY = exports.COVERITY_EXECUTION_PATH_KEY_CLASSIC_EDITOR = exports.COVERITY_EXECUTION_PATH_KEY = exports.COVERITY_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = exports.COVERITY_INSTALL_DIRECTORY_KEY = exports.BRIDGE_COVERITY_INSTALL_DIRECTORY_KEY = exports.COVERITY_STREAM_NAME_KEY_CLASSIC_EDITOR = exports.COVERITY_STREAM_NAME_KEY = exports.BRIDGE_COVERITY_STREAM_NAME_KEY = exports.COVERITY_PROJECT_NAME_KEY_CLASSIC_EDITOR = exports.COVERITY_PROJECT_NAME_KEY = exports.BRIDGE_COVERITY_PROJECT_NAME_KEY = exports.COVERITY_PASSPHRASE_KEY_CLASSIC_EDITOR = exports.COVERITY_PASSPHRASE_KEY = exports.BRIDGE_COVERITY_USER_PASSWORD_KEY = exports.COVERITY_USER_KEY_CLASSIC_EDITOR = exports.COVERITY_USER_KEY = exports.BRIDGE_COVERITY_USER_NAME_KEY = exports.COVERITY_URL_KEY_CLASSIC_EDITOR = exports.COVERITY_URL_KEY = exports.BRIDGE_COVERITY_URL_KEY = exports.PROJECT_SOURCE_EXCLUDES_KEY_CLASSIC_EDITOR = exports.PROJECT_SOURCE_EXCLUDES_KEY = exports.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY_CLASSIC_EDITOR = exports.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY = exports.PROJECT_SOURCE_ARCHIVE_KEY_CLASSIC_EDITOR = exports.PROJECT_SOURCE_ARCHIVE_KEY = exports.POLARIS_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = exports.POLARIS_TEST_SCA_TYPE_KEY_CLASSIC_EDITOR = exports.POLARIS_TEST_SCA_TYPE_KEY = exports.POLARIS_ASSESSMENT_MODE_KEY_CLASSIC_EDITOR = exports.POLARIS_ASSESSMENT_MODE_KEY = exports.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY = exports.BRIDGE_POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY = exports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = exports.BRIDGE_POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = exports.POLARIS_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR = exports.POLARIS_REPORTS_SARIF_SEVERITIES_KEY = void 0;\nexports.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY = exports.BRIDGE_BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY = exports.BLACKDUCK_FIXPR_MAXCOUNT_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_FIXPR_MAXCOUNT_KEY = exports.BRIDGE_BLACKDUCK_FIXPR_MAXCOUNT_KEY = exports.BLACKDUCK_FIXPR_ENABLED_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_FIXPR_ENABLED_KEY = exports.BRIDGE_BLACKDUCK_FIXPR_ENABLED_KEY = exports.BLACKDUCK_AUTOMATION_FIXPR_KEY = exports.BLACKDUCK_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_PRCOMMENT_ENABLED_KEY = exports.BRIDGE_BLACKDUCK_AUTOMATION_PRCOMMENT_KEY = exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY = exports.BRIDGE_BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY = exports.BLACKDUCK_SCAN_FULL_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SCAN_FULL_KEY = exports.BRIDGE_BLACKDUCK_SCAN_FULL_KEY = exports.BLACKDUCK_EXECUTION_PATH_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_EXECUTION_PATH_KEY = exports.BLACKDUCK_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_INSTALL_DIRECTORY_KEY = exports.BRIDGE_BLACKDUCK_INSTALL_DIRECTORY_KEY = exports.BLACKDUCK_TOKEN_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_TOKEN_KEY = exports.BRIDGE_BLACKDUCK_API_TOKEN_KEY = exports.BLACKDUCK_URL_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_URL_KEY = exports.BRIDGE_BLACKDUCK_URL_KEY = exports.SPACE = exports.EXIT_CODE_MAP = exports.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM = exports.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.COVERITY_ARGS_KEY_CLASSIC_EDITOR = exports.COVERITY_ARGS_KEY = exports.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM = exports.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR = exports.COVERITY_CONFIG_PATH_KEY = exports.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM = exports.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR = exports.COVERITY_CLEAN_COMMAND_KEY = exports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM = exports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR = exports.COVERITY_BUILD_COMMAND_KEY = exports.COVERITY_VERSION_KEY_CLASSIC_EDITOR = exports.COVERITY_VERSION_KEY = void 0;\nexports.NETWORK_AIRGAP_KEY = exports.BRIDGE_NETWORK_AIRGAP_KEY = exports.INCLUDE_DIAGNOSTICS_KEY_CLASSIC_EDITOR = exports.INCLUDE_DIAGNOSTICS_KEY = exports.SRM_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = exports.SRM_BRANCH_PARENT_KEY_CLASSIC_EDITOR = exports.SRM_BRANCH_PARENT_KEY = exports.SRM_BRANCH_NAME_KEY_CLASSIC_EDITOR = exports.SRM_BRANCH_NAME_KEY = exports.SRM_PROJECT_ID_KEY_CLASSIC_EDITOR = exports.SRM_PROJECT_ID_KEY = exports.SRM_PROJECT_NAME_KEY_CLASSIC_EDITOR = exports.SRM_PROJECT_NAME_KEY = exports.SRM_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR = exports.SRM_ASSESSMENT_TYPES_KEY = exports.SRM_APIKEY_KEY_CLASSIC_EDITOR = exports.SRM_APIKEY_KEY = exports.SRM_URL_KEY_CLASSIC_EDITOR = exports.SRM_URL_KEY = exports.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM = exports.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_ARGS_KEY = exports.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM = exports.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_CONFIG_PATH_KEY = exports.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR_FOR_SRM = exports.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR_FOR_POLARIS = exports.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_SEARCH_DEPTH_KEY = exports.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = exports.BRIDGE_BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES = exports.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY = exports.BRIDGE_BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY = exports.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY = exports.BRIDGE_BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY = exports.BLACKDUCK_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_REPORTS_SARIF_CREATE_KEY = exports.BRIDGE_BLACKDUCK_REPORTS_SARIF_CREATE_KEY = exports.BLACKDUCK_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY = exports.BRIDGE_BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY = exports.BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY_CLASSIC_EDITOR = exports.BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY = exports.BRIDGE_BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY = void 0;\nexports.SYNOPSYS_SECURITY_SCAN_AZURE_DEVOPS_DOCS_URL = exports.DEFAULT_AZURE_API_URL = exports.MIN_SUPPORTED_SYNOPSYS_BRIDGE_MAC_ARM_VERSION = exports.MAC_INTEL_PLATFORM = exports.MAC_ARM_PLATFORM = exports.LINUX_PLATFORM = exports.WINDOWS_PLATFORM = exports.NON_RETRY_HTTP_CODES = exports.RETRY_COUNT = exports.RETRY_DELAY_IN_MILLISECONDS = exports.SARIF_UPLOAD_FOLDER_ARTIFACT_NAME = exports.DEFAULT_POLARIS_SARIF_GENERATOR_DIRECTORY = exports.DEFAULT_BLACKDUCK_SARIF_GENERATOR_DIRECTORY = exports.SARIF_DEFAULT_FILE_NAME = exports.BRIDGE_LOCAL_DIRECTORY = exports.UPLOAD_FOLDER_ARTIFACT_NAME = exports.PROJECT_DIRECTORY_KEY = exports.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = exports.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY = exports.MARK_BUILD_STATUS_KEY_CLASSIC_EDITOR = exports.MARK_BUILD_STATUS_KEY = exports.RETURN_STATUS_KEY = exports.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY_CLASSIC_EDITOR = exports.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY = exports.BRIDGE_DOWNLOAD_VERSION_KEY = exports.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY_CLASSIC_EDITOR = exports.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY = exports.BRIDGE_DOWNLOAD_URL_KEY = exports.NETWORK_AIRGAP_KEY_CLASSIC_EDITOR = void 0;\nconst ErrorCodes_1 = require(\"./enum/ErrorCodes\");\nexports.SYNOPSYS_BRIDGE_DEFAULT_PATH_MAC = \"/synopsys-bridge\"; //Path will be in home\nexports.SYNOPSYS_BRIDGE_DEFAULT_PATH_WINDOWS = \"\\\\synopsys-bridge\";\nexports.SYNOPSYS_BRIDGE_DEFAULT_PATH_LINUX = \"/synopsys-bridge\";\nexports.SYNOPSYS_BRIDGE_EXECUTABLE_WINDOWS = \"synopsys-bridge.exe\";\nexports.SYNOPSYS_BRIDGE_EXECUTABLE_MAC_LINUX = \"synopsys-bridge\";\nexports.SYNOPSYS_BRIDGE_ZIP_FILE_NAME = \"synopsys-bridge.zip\";\nexports.APPLICATION_NAME = \"synopsys-extension\";\n// Scan Types\nexports.POLARIS_KEY = \"polaris\";\nexports.COVERITY_KEY = \"coverity\";\nexports.BLACKDUCK_KEY = \"blackduck\";\nexports.SRM_KEY = \"srm\";\nexports.AZURE_TOKEN_KEY = \"azure_token\";\nexports.AZURE_TOKEN_KEY_CLASSIC_EDITOR = \"azure_token\";\nexports.SCAN_TYPE_KEY = \"scanType\";\n// Polaris\n/**\n * @deprecated Use polaris_server_url instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_SERVER_URL_KEY = \"bridge_polaris_serverUrl\";\nexports.POLARIS_SERVER_URL_KEY = \"polaris_server_url\";\nexports.POLARIS_SERVER_URL_KEY_CLASSIC_EDITOR = \"bridge_polaris_serverUrl\";\n/**\n * @deprecated Use polaris_access_token instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_ACCESS_TOKEN_KEY = \"bridge_polaris_accessToken\";\nexports.POLARIS_ACCESS_TOKEN_KEY = \"polaris_access_token\";\nexports.POLARIS_ACCESS_TOKEN_KEY_CLASSIC_EDITOR = \"bridge_polaris_accessToken\";\n/**\n * @deprecated Use polaris_application_name instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_APPLICATION_NAME_KEY = \"bridge_polaris_application_name\";\nexports.POLARIS_APPLICATION_NAME_KEY = \"polaris_application_name\";\nexports.POLARIS_APPLICATION_NAME_KEY_CLASSIC_EDITOR = \"bridge_polaris_application_name\";\n/**\n * @deprecated Use polaris_project_name instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_PROJECT_NAME_KEY = \"bridge_polaris_project_name\";\nexports.POLARIS_PROJECT_NAME_KEY = \"polaris_project_name\";\nexports.POLARIS_PROJECT_NAME_KEY_CLASSIC_EDITOR = \"bridge_polaris_project_name\";\n/**\n * @deprecated Use polaris_assessment_types instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_ASSESSMENT_TYPES_KEY = \"bridge_polaris_assessment_types\";\nexports.POLARIS_ASSESSMENT_TYPES_KEY = \"polaris_assessment_types\";\nexports.POLARIS_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR = \"bridge_polaris_assessment_types\";\n/**\n * @deprecated Use polaris_triage instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_TRIAGE_KEY = \"bridge_polaris_triage\";\nexports.POLARIS_TRIAGE_KEY = \"polaris_triage\";\nexports.POLARIS_TRIAGE_KEY_CLASSIC_EDITOR = \"bridge_polaris_triage\";\n/**\n * @deprecated Use polaris_branch_name instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_BRANCH_NAME_KEY = \"bridge_polaris_branch_name\";\nexports.POLARIS_BRANCH_NAME_KEY = \"polaris_branch_name\";\nexports.POLARIS_BRANCH_NAME_KEY_CLASSIC_EDITOR = \"bridge_polaris_branch_name\";\nexports.POLARIS_BRANCH_PARENT_NAME_KEY = \"polaris_branch_parent_name\";\nexports.POLARIS_BRANCH_PARENT_NAME_KEY_CLASSIC_EDITOR = \"polarisBranchParentName\";\n/**\n * @deprecated Use polaris_prComment_enabled instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_PR_COMMENT_ENABLED_KEY = \"bridge_polaris_prcomment_enabled\";\nexports.POLARIS_PR_COMMENT_ENABLED_KEY = \"polaris_prComment_enabled\";\nexports.POLARIS_PR_COMMENT_ENABLED_KEY_CLASSIC_EDITOR = \"polarisPRCommentEnabled\";\n/**\n * @deprecated Use polaris_prComment_severities instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_PR_COMMENT_SEVERITIES_KEY = \"bridge_polaris_prcomment_severities\";\nexports.POLARIS_PR_COMMENT_SEVERITIES_KEY = \"polaris_prComment_severities\";\nexports.POLARIS_PR_COMMENT_SEVERITIES_KEY_CLASSIC_EDITOR = \"polarisPRCommentSeverities\";\n/**\n * @deprecated Use polaris_reports_sarif_create instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_REPORTS_SARIF_CREATE_KEY = \"bridge_polaris_reports_sarif_create\";\nexports.POLARIS_REPORTS_SARIF_CREATE_KEY = \"polaris_reports_sarif_create\";\nexports.POLARIS_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR = \"polarisReportsSarifCreate\";\n/**\n * @deprecated Use polaris_reports_sarif_file_path instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_REPORTS_SARIF_FILE_PATH_KEY = \"bridge_polaris_reports_sarif_file_path\";\nexports.POLARIS_REPORTS_SARIF_FILE_PATH_KEY = \"polaris_reports_sarif_file_path\";\nexports.POLARIS_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR = \"polarisReportsSarifFilePath\";\n/**\n * @deprecated Use polaris_reports_sarif_severities instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_REPORTS_SARIF_SEVERITIES_KEY = \"bridge_polaris_reports_sarif_severities\";\nexports.POLARIS_REPORTS_SARIF_SEVERITIES_KEY = \"polaris_reports_sarif_severities\";\nexports.POLARIS_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR = \"polarisReportsSarifSeverities\";\n/**\n * @deprecated Use polaris_reports_sarif_groupSCAIssues instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = \"bridge_polaris_reports_sarif_groupSCAIssues\";\nexports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = \"polaris_reports_sarif_groupSCAIssues\";\nexports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR = \"polarisReportsSarifGroupSCAIssues\";\n/**\n * @deprecated Use polaris_reports_sarif_issue_types instead. This can be removed in future release.\n */\nexports.BRIDGE_POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY = \"bridge_polaris_reports_sarif_issue_types\";\nexports.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY = \"polaris_reports_sarif_issue_types\";\nexports.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY_CLASSIC_EDITOR = \"polarisReportsSarifIssueTypes\";\nexports.POLARIS_ASSESSMENT_MODE_KEY = \"polaris_assessment_mode\";\nexports.POLARIS_ASSESSMENT_MODE_KEY_CLASSIC_EDITOR = \"polarisAssessmentMode\";\nexports.POLARIS_TEST_SCA_TYPE_KEY = \"polaris_test_sca_type\";\nexports.POLARIS_TEST_SCA_TYPE_KEY_CLASSIC_EDITOR = \"polarisTestScaType\";\nexports.POLARIS_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = \"polarisProjectDirectory\";\nexports.PROJECT_SOURCE_ARCHIVE_KEY = \"project_source_archive\";\nexports.PROJECT_SOURCE_ARCHIVE_KEY_CLASSIC_EDITOR = \"projectSourceArchive\";\nexports.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY = \"project_source_preserveSymLinks\";\nexports.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY_CLASSIC_EDITOR = \"projectSourcePreserveSymLinks\";\nexports.PROJECT_SOURCE_EXCLUDES_KEY = \"project_source_excludes\";\nexports.PROJECT_SOURCE_EXCLUDES_KEY_CLASSIC_EDITOR = \"projectSourceExcludes\";\n// Coverity\n/**\n * @deprecated Use coverity_url instead. This can be removed in future release.\n */\nexports.BRIDGE_COVERITY_URL_KEY = \"bridge_coverity_connect_url\";\nexports.COVERITY_URL_KEY = \"coverity_url\";\nexports.COVERITY_URL_KEY_CLASSIC_EDITOR = \"bridge_coverity_connect_url\";\n/**\n * @deprecated Use coverity_user instead. This can be removed in future release.\n */\nexports.BRIDGE_COVERITY_USER_NAME_KEY = \"bridge_coverity_connect_user_name\";\nexports.COVERITY_USER_KEY = \"coverity_user\";\nexports.COVERITY_USER_KEY_CLASSIC_EDITOR = \"bridge_coverity_connect_user_name\";\n/**\n * @deprecated Use coverity_passphrase instead. This can be removed in future release.\n */\nexports.BRIDGE_COVERITY_USER_PASSWORD_KEY = \"bridge_coverity_connect_user_password\";\nexports.COVERITY_PASSPHRASE_KEY = \"coverity_passphrase\";\nexports.COVERITY_PASSPHRASE_KEY_CLASSIC_EDITOR = \"bridge_coverity_connect_user_password\";\n/**\n * @deprecated Use coverity_project_name instead. This can be removed in future release.\n */\nexports.BRIDGE_COVERITY_PROJECT_NAME_KEY = \"bridge_coverity_connect_project_name\";\nexports.COVERITY_PROJECT_NAME_KEY = \"coverity_project_name\";\nexports.COVERITY_PROJECT_NAME_KEY_CLASSIC_EDITOR = \"bridge_coverity_connect_project_name\";\n/**\n * @deprecated Use coverity_stream_name instead. This can be removed in future release.\n */\nexports.BRIDGE_COVERITY_STREAM_NAME_KEY = \"bridge_coverity_connect_stream_name\";\nexports.COVERITY_STREAM_NAME_KEY = \"coverity_stream_name\";\nexports.COVERITY_STREAM_NAME_KEY_CLASSIC_EDITOR = \"bridge_coverity_connect_stream_name\";\n/**\n * @deprecated Use coverity_install_directory instead. This can be removed in future release.\n */\nexports.BRIDGE_COVERITY_INSTALL_DIRECTORY_KEY = \"bridge_coverity_install_directory\";\nexports.COVERITY_INSTALL_DIRECTORY_KEY = \"coverity_install_directory\";\nexports.COVERITY_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = \"bridge_coverity_install_directory\";\nexports.COVERITY_EXECUTION_PATH_KEY = \"coverity_execution_path\";\nexports.COVERITY_EXECUTION_PATH_KEY_CLASSIC_EDITOR = \"coverityExecutionPath\";\n/**\n * @deprecated Use coverity_policy_view instead. This can be removed in future release.\n */\nexports.BRIDGE_COVERITY_POLICY_VIEW_KEY = \"bridge_coverity_connect_policy_view\";\nexports.COVERITY_POLICY_VIEW_KEY = \"coverity_policy_view\";\nexports.COVERITY_POLICY_VIEW_KEY_CLASSIC_EDITOR = \"bridge_coverity_connect_policy_view\";\n/**\n * @deprecated Use coverity_prComment_enabled instead. This can be removed in future release.\n */\nexports.BRIDGE_COVERITY_AUTOMATION_PRCOMMENT_KEY = \"bridge_coverity_automation_prcomment\";\nexports.COVERITY_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = \"coverityProjectDirectory\";\nexports.COVERITY_PRCOMMENT_ENABLED_KEY = \"coverity_prComment_enabled\";\nexports.COVERITY_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = \"bridge_coverity_automation_prcomment\";\n/**\n * @deprecated Use coverity_local instead. This can be removed in future release.\n */\nexports.BRIDGE_COVERITY_LOCAL_KEY = \"bridge_coverity_local\";\nexports.COVERITY_LOCAL_KEY = \"coverity_local\";\nexports.COVERITY_LOCAL_KEY_CLASSIC_EDITOR = \"bridge_coverity_local\";\n/**\n * @deprecated Use coverity_version instead. This can be removed in future release.\n */\nexports.BRIDGE_COVERITY_VERSION_KEY = \"bridge_coverity_version\";\nexports.COVERITY_VERSION_KEY = \"coverity_version\";\nexports.COVERITY_VERSION_KEY_CLASSIC_EDITOR = \"bridge_coverity_version\";\nexports.COVERITY_BUILD_COMMAND_KEY = \"coverity_build_command\";\nexports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR = \"coverityBuildCommand\";\nexports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS = \"coverityBuildCommandForPolaris\";\nexports.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM = \"coverityBuildCommandForSrm\";\nexports.COVERITY_CLEAN_COMMAND_KEY = \"coverity_clean_command\";\nexports.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR = \"coverityCleanCommand\";\nexports.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS = \"coverityCleanCommandForPolaris\";\nexports.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM = \"coverityCleanCommandForSrm\";\nexports.COVERITY_CONFIG_PATH_KEY = \"coverity_config_path\";\nexports.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR = \"coverityConfigPath\";\nexports.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS = \"coverityConfigPathForPolaris\";\nexports.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM = \"coverityConfigPathForSrm\";\nexports.COVERITY_ARGS_KEY = \"coverity_args\";\nexports.COVERITY_ARGS_KEY_CLASSIC_EDITOR = \"coverityArgs\";\nexports.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS = \"coverityArgsForPolaris\";\nexports.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM = \"coverityArgsForSrm\";\n// Bridge and ADO Exit Codes\nexports.EXIT_CODE_MAP = new Map([\n [\n ErrorCodes_1.ErrorCode.SUCCESSFULLY_COMPLETED.toString(),\n \"Bridge execution successfully completed\",\n ],\n [\n ErrorCodes_1.ErrorCode.UNDEFINED_ERROR_FROM_BRIDGE.toString(),\n \"Undefined error, check error logs\",\n ],\n [ErrorCodes_1.ErrorCode.ADAPTER_ERROR.toString(), \"Error from adapter end\"],\n [\n ErrorCodes_1.ErrorCode.BRIDGE_SHUTDOWN_FAILURE.toString(),\n \"Failed to shutdown the bridge\",\n ],\n [\n ErrorCodes_1.ErrorCode.BRIDGE_BREAK_ENABLED.toString(),\n \"The config option bridge.break has been set to true\",\n ],\n [\n ErrorCodes_1.ErrorCode.BRIDGE_INITIALIZATION_FAILED.toString(),\n \"Bridge initialization failed\",\n ],\n // The list of ADO extension related error codes begins below\n [\n ErrorCodes_1.ErrorCode.MISSING_AT_LEAST_ONE_SCAN_TYPE.toString(),\n \"Requires at least one scan type\",\n ],\n [\n ErrorCodes_1.ErrorCode.MISSING_REQUIRED_PARAMETERS.toString(),\n \"Required Parameters for Scan Type (Polaris/BlackDuck/Coverity/SRM) are missing\",\n ],\n [\n ErrorCodes_1.ErrorCode.AGENT_TEMP_DIRECTORY_NOT_SET.toString(),\n \"Agent.TempDirectory is not set\",\n ],\n [\n ErrorCodes_1.ErrorCode.BLACKDUCK_FIXPR_MAX_COUNT_NOT_APPLICABLE.toString(),\n \"blackduck_fixpr_maxCount is not applicable with blackduck_fixpr_createSinglePR\",\n ],\n [\n ErrorCodes_1.ErrorCode.INVALID_POLARIS_ASSESSMENT_TYPES.toString(),\n \"Invalid value for polaris_assessment_types\",\n ],\n [\n ErrorCodes_1.ErrorCode.INVALID_BLACKDUCK_FAILURE_SEVERITIES.toString(),\n \"Invalid value for blackduck_scan_failure_severities\",\n ],\n [\n ErrorCodes_1.ErrorCode.INVALID_BLACKDUCK_FIXPR_MAXCOUNT.toString(),\n \"Invalid value for blackduck_fixpr_maxCount\",\n ],\n [\n ErrorCodes_1.ErrorCode.MISSING_BOOLEAN_VALUE.toString(),\n \"Missing boolean value for blackduck_scan_full\",\n ],\n [\n ErrorCodes_1.ErrorCode.INVALID_SYNOPSYS_BRIDGE_URL.toString(),\n \"Provided Synopsys Bridge URL is not valid for the configured platform runner\",\n ],\n [\n ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_URL_CANNOT_BE_EMPTY.toString(),\n \"Provided Synopsys Bridge URL cannot be empty\",\n ],\n [\n ErrorCodes_1.ErrorCode.INVALID_URL.toString(),\n \"Invalid URL (Invalid Synopysys Bridge Download URL)\",\n ],\n [\n ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_VERSION_NOT_FOUND.toString(),\n \"Provided Synopsys Bridge version not found in artifactory\",\n ],\n [\n ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_DOWNLOAD_FAILED.toString(),\n \"Synopsys bridge download has been failed\",\n ],\n [\n ErrorCodes_1.ErrorCode.BRIDGE_INSTALL_DIRECTORY_NOT_EXIST.toString(),\n \"Synopsys Bridge Install Directory does not exist\",\n ],\n [\n ErrorCodes_1.ErrorCode.DEFAULT_DIRECTORY_NOT_FOUND.toString(),\n \"Synopsys Bridge default directory does not exist\",\n ],\n [\n ErrorCodes_1.ErrorCode.BRIDGE_EXECUTABLE_NOT_FOUND.toString(),\n \"Synopsys Bridge executable file could not be found at executable Bridge path\",\n ],\n [\n ErrorCodes_1.ErrorCode.WORKSPACE_DIRECTORY_NOT_FOUND.toString(),\n \"Workspace directory could not be located\",\n ],\n [\n ErrorCodes_1.ErrorCode.FILE_DOES_NOT_EXIST.toString(),\n \"File (Synopsys Bridge zip) does not exist\",\n ],\n [\n ErrorCodes_1.ErrorCode.NO_DESTINATION_DIRECTORY.toString(),\n \"No destination directory found for unzipping Synopsys Bridge\",\n ],\n [\n ErrorCodes_1.ErrorCode.FAILED_TO_GET_PULL_REQUEST_INFO_FROM_SOURCE_BRANCH.toString(),\n \"Failed to get pull request Id for current build from source branch\",\n ],\n [\n ErrorCodes_1.ErrorCode.MISSING_AZURE_TOKEN.toString(),\n \"Missing required azure token for fix pull request/automation comment\",\n ],\n [\n ErrorCodes_1.ErrorCode.INVALID_COVERITY_INSTALL_DIRECTORY.toString(),\n \"coverity_install_directory parameter for Coverity is invalid\",\n ],\n [\n ErrorCodes_1.ErrorCode.REQUIRED_COVERITY_STREAM_NAME_FOR_MANUAL_TRIGGER.toString(),\n \"COVERITY_STREAM_NAME is mandatory for azure manual trigger\",\n ],\n [\n ErrorCodes_1.ErrorCode.DOWNLOAD_FAILED_WITH_HTTP_STATUS_CODE.toString(),\n \"Failed to download synopsys-bridge zip from specified URL. HTTP status code: \",\n ],\n [\n ErrorCodes_1.ErrorCode.CONTENT_LENGTH_MISMATCH.toString(),\n \"Content-Length of synopsys-bridge in the artifactory did not match downloaded file size\",\n ],\n [\n ErrorCodes_1.ErrorCode.UNDEFINED_ERROR_FROM_EXTENSION.toString(),\n \"Undefined error from extension\",\n ],\n]);\nexports.SPACE = \" \";\n// Blackduck\n/**\n * @deprecated Use blackduck_url instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_URL_KEY = \"bridge_blackduck_url\";\nexports.BLACKDUCK_URL_KEY = \"blackduck_url\";\nexports.BLACKDUCK_URL_KEY_CLASSIC_EDITOR = \"bridge_blackduck_url\";\n/**\n * @deprecated Use blackduck_token instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_API_TOKEN_KEY = \"bridge_blackduck_token\";\nexports.BLACKDUCK_TOKEN_KEY = \"blackduck_token\";\nexports.BLACKDUCK_TOKEN_KEY_CLASSIC_EDITOR = \"bridge_blackduck_token\";\n/**\n * @deprecated Use blackduck_install_directory instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_INSTALL_DIRECTORY_KEY = \"bridge_blackduck_install_directory\";\nexports.BLACKDUCK_INSTALL_DIRECTORY_KEY = \"blackduck_install_directory\";\nexports.BLACKDUCK_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = \"bridge_blackduck_install_directory\";\nexports.BLACKDUCK_EXECUTION_PATH_KEY = \"blackduck_execution_path\";\nexports.BLACKDUCK_EXECUTION_PATH_KEY_CLASSIC_EDITOR = \"blackduckExecutionPath\";\n/**\n * @deprecated Use blackduck_scan_full instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_SCAN_FULL_KEY = \"bridge_blackduck_scan_full\";\nexports.BLACKDUCK_SCAN_FULL_KEY = \"blackduck_scan_full\";\nexports.BLACKDUCK_SCAN_FULL_KEY_CLASSIC_EDITOR = \"bridge_blackduck_scan_full\";\n/**\n * @deprecated Use blackduck_scan_failure_severities instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY = \"bridge_blackduck_scan_failure_severities\";\nexports.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY = \"blackduck_scan_failure_severities\";\nexports.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY_CLASSIC_EDITOR = \"bridge_blackduck_scan_failure_severities\";\n/**\n * @deprecated Use blackduck_prComment_enabled instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_AUTOMATION_PRCOMMENT_KEY = \"bridge_blackduck_automation_prcomment\";\nexports.BLACKDUCK_PRCOMMENT_ENABLED_KEY = \"blackduck_prComment_enabled\";\nexports.BLACKDUCK_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR = \"bridge_blackduck_automation_prcomment\";\n/**\n * @deprecated Use blackduck_fixpr_enabled instead. This can be removed in future release.\n */\nexports.BLACKDUCK_AUTOMATION_FIXPR_KEY = \"bridge_blackduck_automation_fixpr\";\n/**\n * @deprecated Use blackduck_fixpr_enabled instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_FIXPR_ENABLED_KEY = \"bridge_blackduck_fixpr_enabled\";\nexports.BLACKDUCK_FIXPR_ENABLED_KEY = \"blackduck_fixpr_enabled\";\nexports.BLACKDUCK_FIXPR_ENABLED_KEY_CLASSIC_EDITOR = \"bridge_blackduck_fixpr_enabled\";\n/**\n * @deprecated Use blackduck_fixpr_maxCount instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_FIXPR_MAXCOUNT_KEY = \"bridge_blackduck_fixpr_maxCount\";\nexports.BLACKDUCK_FIXPR_MAXCOUNT_KEY = \"blackduck_fixpr_maxCount\";\nexports.BLACKDUCK_FIXPR_MAXCOUNT_KEY_CLASSIC_EDITOR = \"bridge_blackduck_fixpr_maxCount\";\n/**\n * @deprecated Use blackduck_fixpr_createSinglePR instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY = \"bridge_blackduck_fixpr_createSinglePR\";\nexports.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY = \"blackduck_fixpr_createSinglePR\";\nexports.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY_CLASSIC_EDITOR = \"blackduckFixPRCreateSinglePR\";\n/**\n * @deprecated Use blackduck_fixpr_filter_severities instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY = \"bridge_blackduck_fixpr_filter_severities\";\nexports.BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY = \"blackduck_fixpr_filter_severities\";\nexports.BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY_CLASSIC_EDITOR = \"bridge_blackduck_fixpr_filter_severities\";\n/**\n * @deprecated Use blackduck_fixpr_useUpgradeGuidance instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY = \"bridge_blackduck_fixpr_useUpgradeGuidance\";\nexports.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY = \"blackduck_fixpr_useUpgradeGuidance\";\nexports.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY_CLASSIC_EDITOR = \"bridge_blackduck_fixpr_useUpgradeGuidance\";\nexports.BLACKDUCK_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = \"blackduckProjectDirectory\";\n/**\n * @deprecated Use blackduck_reports_sarif_create instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_REPORTS_SARIF_CREATE_KEY = \"bridge_blackduck_reports_sarif_create\";\nexports.BLACKDUCK_REPORTS_SARIF_CREATE_KEY = \"blackduck_reports_sarif_create\";\nexports.BLACKDUCK_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR = \"blackduckReportsSarifCreate\";\n/**\n * @deprecated Use blackduck_reports_sarif_file_path instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY = \"bridge_blackduck_reports_sarif_file_path\";\nexports.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY = \"blackduck_reports_sarif_file_path\";\nexports.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR = \"blackduckReportsSarifFilePath\";\n/**\n * @deprecated Use blackduck_reports_sarif_severities instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY = \"bridge_blackduck_reports_sarif_severities\";\nexports.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY = \"blackduck_reports_sarif_severities\";\nexports.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR = \"blackduckReportsSarifSeverities\";\n/**\n * @deprecated Use blackduck_reports_sarif_groupSCAIssues instead. This can be removed in future release.\n */\nexports.BRIDGE_BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES = \"bridge_blackduck_reports_sarif_groupSCAIssues\";\nexports.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY = \"blackduck_reports_sarif_groupSCAIssues\";\nexports.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR = \"blackduckReportsSarifGroupSCAIssues\";\nexports.BLACKDUCK_SEARCH_DEPTH_KEY = \"blackduck_search_depth\";\nexports.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR = \"blackduckSearchDepth\";\nexports.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR_FOR_POLARIS = \"blackduckSearchDepthForPolaris\";\nexports.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR_FOR_SRM = \"blackduckSearchDepthForSrm\";\nexports.BLACKDUCK_CONFIG_PATH_KEY = \"blackduck_config_path\";\nexports.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR = \"blackduckConfigPath\";\nexports.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS = \"blackduckConfigPathForPolaris\";\nexports.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM = \"blackduckConfigPathForSrm\";\nexports.BLACKDUCK_ARGS_KEY = \"blackduck_args\";\nexports.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR = \"blackduckArgs\";\nexports.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS = \"blackduckArgsForPolaris\";\nexports.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM = \"blackduckArgsForSrm\";\n//SRM\nexports.SRM_URL_KEY = \"srm_url\";\nexports.SRM_URL_KEY_CLASSIC_EDITOR = \"srmUrl\";\nexports.SRM_APIKEY_KEY = \"srm_apikey\";\nexports.SRM_APIKEY_KEY_CLASSIC_EDITOR = \"srmApikey\";\nexports.SRM_ASSESSMENT_TYPES_KEY = \"srm_assessment_types\";\nexports.SRM_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR = \"srmAssessmentTypes\";\nexports.SRM_PROJECT_NAME_KEY = \"srm_project_name\";\nexports.SRM_PROJECT_NAME_KEY_CLASSIC_EDITOR = \"srmProjectName\";\nexports.SRM_PROJECT_ID_KEY = \"srm_project_id\";\nexports.SRM_PROJECT_ID_KEY_CLASSIC_EDITOR = \"srmProjectId\";\nexports.SRM_BRANCH_NAME_KEY = \"srm_branch_name\";\nexports.SRM_BRANCH_NAME_KEY_CLASSIC_EDITOR = \"srmBranchName\";\nexports.SRM_BRANCH_PARENT_KEY = \"srm_branch_parent\";\nexports.SRM_BRANCH_PARENT_KEY_CLASSIC_EDITOR = \"srmBranchParent\";\nexports.SRM_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR = \"srmProjectDirectory\";\nexports.INCLUDE_DIAGNOSTICS_KEY = \"include_diagnostics\";\nexports.INCLUDE_DIAGNOSTICS_KEY_CLASSIC_EDITOR = \"include_diagnostics\";\n/**\n * @deprecated Use network_airgap instead. This can be removed in future release.\n */\nexports.BRIDGE_NETWORK_AIRGAP_KEY = \"bridge_network_airgap\";\nexports.NETWORK_AIRGAP_KEY = \"network_airgap\";\nexports.NETWORK_AIRGAP_KEY_CLASSIC_EDITOR = \"bridge_network_airgap\";\n/**\n * @deprecated Use synopsys_bridge_download_url instead. This can be removed in future release.\n */\nexports.BRIDGE_DOWNLOAD_URL_KEY = \"bridge_download_url\";\nexports.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY = \"synopsys_bridge_download_url\";\nexports.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY_CLASSIC_EDITOR = \"bridge_download_url\";\n/**\n * @deprecated Use synopsys_bridge_download_version instead. This can be removed in future release.\n */\nexports.BRIDGE_DOWNLOAD_VERSION_KEY = \"bridge_download_version\";\nexports.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY = \"synopsys_bridge_download_version\";\nexports.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY_CLASSIC_EDITOR = \"bridge_download_version\";\nexports.RETURN_STATUS_KEY = \"return_status\";\n//export const RETURN_STATUS_KEY_CLASSIC_EDITOR = \"returnStatus\";\nexports.MARK_BUILD_STATUS_KEY = \"mark_build_status\";\nexports.MARK_BUILD_STATUS_KEY_CLASSIC_EDITOR = \"markBuildStatus\";\nexports.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY = \"synopsys_bridge_install_directory\";\nexports.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR = \"synopsys_bridge_path\";\nexports.PROJECT_DIRECTORY_KEY = \"project_directory\";\nexports.UPLOAD_FOLDER_ARTIFACT_NAME = \"synopsys_bridge_diagnostics\";\nexports.BRIDGE_LOCAL_DIRECTORY = \".bridge\";\nexports.SARIF_DEFAULT_FILE_NAME = \"report.sarif.json\";\nexports.DEFAULT_BLACKDUCK_SARIF_GENERATOR_DIRECTORY = \"Blackduck SARIF Generator\";\nexports.DEFAULT_POLARIS_SARIF_GENERATOR_DIRECTORY = \"Polaris SARIF Generator\";\nexports.SARIF_UPLOAD_FOLDER_ARTIFACT_NAME = \"sarif_report\";\nexports.RETRY_DELAY_IN_MILLISECONDS = 15000;\nexports.RETRY_COUNT = 3;\nexports.NON_RETRY_HTTP_CODES = new Set([200, 201, 401, 403, 416]);\nexports.WINDOWS_PLATFORM = \"win64\";\nexports.LINUX_PLATFORM = \"linux64\";\nexports.MAC_ARM_PLATFORM = \"macos_arm\";\nexports.MAC_INTEL_PLATFORM = \"macosx\";\nexports.MIN_SUPPORTED_SYNOPSYS_BRIDGE_MAC_ARM_VERSION = \"2.1.0\";\nexports.DEFAULT_AZURE_API_URL = \"https://dev.azure.com\";\nexports.SYNOPSYS_SECURITY_SCAN_AZURE_DEVOPS_DOCS_URL = \"https://sig-product-docs.synopsys.com/bundle/bridge/page/documentation/c_synopsys-security-scan-for-azure-devops.html\";\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SynopsysAzureService = void 0;\nconst HttpClient_1 = require(\"typed-rest-client/HttpClient\");\nconst taskLib = __importStar(require(\"azure-pipelines-task-lib/task\"));\nconst constants = __importStar(require(\"./application-constant\"));\nconst ErrorCodes_1 = require(\"./enum/ErrorCodes\");\nclass SynopsysAzureService {\n constructor() {\n this.azureGetMergeRequestsAPI =\n \"/{0}/{1}/_apis/git/repositories/{2}/pullrequests?searchCriteria.status=active&$top=1&searchCriteria.sourceRefName={3}&api-version={4}\";\n this.apiVersion = \"7.0\";\n }\n getAzurePrResponseForManualTriggerFlow(azureData) {\n return __awaiter(this, void 0, void 0, function* () {\n if (azureData &&\n process.env[\"BUILD_REASON\"] &&\n process.env[\"BUILD_REASON\"] !== \"PullRequest\") {\n const StringFormat = (url, ...args) => url.replace(/{(\\d+)}/g, (match, index) => encodeURIComponent(args[index]) || \"\");\n const endpoint = StringFormat(azureData.api.url.concat(this.azureGetMergeRequestsAPI), azureData.organization.name, azureData.project.name, azureData.repository.name, azureData.repository.branch.name, this.apiVersion);\n taskLib.debug(`Azure check pull request API: ${endpoint}`);\n const token = \":\".concat(azureData.user.token);\n const encodedToken = Buffer.from(token, \"utf8\").toString(\"base64\");\n const httpClient = new HttpClient_1.HttpClient(\"synopsys-azure-service\");\n const httpResponse = yield httpClient.get(endpoint, {\n Authorization: \"Basic \".concat(encodedToken),\n Accept: \"application/json\",\n });\n if (httpResponse.message.statusCode === 200) {\n const azurePrResponse = JSON.parse(yield httpResponse.readBody());\n if (azurePrResponse.count === 1) {\n return {\n pullRequestId: azurePrResponse.value[0].pullRequestId,\n targetRefName: azurePrResponse.value[0].targetRefName,\n };\n }\n else {\n console.info(\"Unable to find pull request info for the current source build with branch: \".concat(azureData.repository.branch.name));\n }\n }\n else {\n throw new Error(\"Failed to get pull request info for current build from source branch: \"\n .concat(azureData.repository.branch.name)\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.FAILED_TO_GET_PULL_REQUEST_INFO_FROM_SOURCE_BRANCH.toString()));\n }\n }\n return undefined;\n });\n }\n}\nexports.SynopsysAzureService = SynopsysAzureService;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.uploadSarifResultAsArtifact = exports.uploadDiagnostics = void 0;\nconst taskLib = __importStar(require(\"azure-pipelines-task-lib/task\"));\nconst constants = __importStar(require(\"./application-constant\"));\nconst path = __importStar(require(\"path\"));\nconst utility_1 = require(\"./utility\");\nfunction uploadDiagnostics(workspaceDir) {\n const uploadArtifactPath = path.join(workspaceDir, constants.BRIDGE_LOCAL_DIRECTORY);\n let isBridgeDirectoryExists = false;\n isBridgeDirectoryExists = taskLib.exist(uploadArtifactPath);\n if (isBridgeDirectoryExists) {\n taskLib.uploadArtifact(constants.UPLOAD_FOLDER_ARTIFACT_NAME, uploadArtifactPath, constants.UPLOAD_FOLDER_ARTIFACT_NAME);\n }\n}\nexports.uploadDiagnostics = uploadDiagnostics;\nfunction uploadSarifResultAsArtifact(defaultSarifReportDirectory, userSarifFilePath) {\n const sarifFilePath = userSarifFilePath\n ? userSarifFilePath\n : (0, utility_1.getDefaultSarifReportPath)(defaultSarifReportDirectory, true);\n let isSarifReportDirectoryExists = false;\n isSarifReportDirectoryExists = taskLib.exist(sarifFilePath);\n if (isSarifReportDirectoryExists) {\n console.log(`Uploading SARIF report as artifact from: ${sarifFilePath}`);\n taskLib.uploadArtifact(constants.SARIF_UPLOAD_FOLDER_ARTIFACT_NAME, sarifFilePath, constants.SARIF_UPLOAD_FOLDER_ARTIFACT_NAME);\n console.log(\"Upload SARIF report successfully in the artifact\");\n }\n else {\n console.log(`Uploading SARIF report as artifact failed as file path not found at: ${sarifFilePath}`);\n }\n}\nexports.uploadSarifResultAsArtifact = uploadSarifResultAsArtifact;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._getFileSizeOnDisk = exports.downloadTool = exports.debug = void 0;\nconst httpm = __importStar(require(\"typed-rest-client/HttpClient\"));\nconst path = __importStar(require(\"path\"));\nconst fs = __importStar(require(\"fs\"));\nconst tl = __importStar(require(\"azure-pipelines-task-lib/task\"));\nconst constants = __importStar(require(\"./application-constant\"));\nconst ErrorCodes_1 = require(\"./enum/ErrorCodes\");\nconst userAgent = \"SynopsysSecurityScan\";\nconst requestOptions = {\n // ignoreSslError: true,\n proxy: tl.getHttpProxyConfiguration(),\n cert: tl.getHttpCertConfiguration(),\n allowRedirects: true,\n allowRetries: true,\n};\nfunction debug(message) {\n tl.debug(message);\n}\nexports.debug = debug;\n/**\n * Download a tool from an url and stream it into a file\n *\n * @param url url of tool to download\n * @param fileName optional fileName. Should typically not use (will be a guid for reliability). Can pass fileName with an absolute path.\n * @param handlers optional handlers array. Auth handlers to pass to the HttpClient for the tool download.\n * @param additionalHeaders optional custom HTTP headers. This is passed to the REST client that downloads the tool.\n */\nfunction downloadTool(url, fileName, handlers, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n // check if it's an absolute path already\n let destPath;\n if (path.isAbsolute(fileName)) {\n destPath = fileName;\n }\n else {\n destPath = path.join(_getAgentTemp(), fileName);\n }\n try {\n const http = new httpm.HttpClient(userAgent, handlers, requestOptions);\n tl.debug(fileName);\n // make sure that the folder exists\n tl.mkdirP(path.dirname(destPath));\n tl.debug(tl.loc(\"TOOL_LIB_Downloading\", url));\n tl.debug(\"destination \" + destPath);\n if (fs.existsSync(destPath)) {\n tl.debug(\"Destination file path already exists\");\n _deleteFile(destPath);\n }\n const response = yield http.get(url, additionalHeaders);\n if (response.message.statusCode != 200) {\n tl.debug(`Failed to download \"${fileName}\" from \"${url}\". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);\n reject(new Error(\"Failed to download synopsys-bridge zip from specified URL. HTTP status code: \"\n .concat(String(response.message.statusCode))\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.DOWNLOAD_FAILED_WITH_HTTP_STATUS_CODE.toString())));\n }\n const downloadedContentLength = _getContentLengthOfDownloadedFile(response);\n if (!isNaN(downloadedContentLength)) {\n tl.debug(`Content-Length of downloaded file: ${downloadedContentLength}`);\n }\n else {\n tl.debug(`Content-Length header missing`);\n }\n tl.debug(\"creating stream\");\n const file = fs.createWriteStream(destPath);\n file\n .on(\"open\", () => __awaiter(this, void 0, void 0, function* () {\n try {\n response.message\n .on(\"error\", (err) => {\n file.end();\n reject(err);\n })\n .pipe(file);\n }\n catch (err) {\n reject(err);\n }\n }))\n .on(\"error\", (err) => {\n file.end();\n reject(err);\n })\n .on(\"close\", () => {\n let fileSizeInBytes;\n try {\n fileSizeInBytes = _getFileSizeOnDisk(destPath);\n }\n catch (err) {\n const error = err;\n fileSizeInBytes = NaN;\n tl.warning(`Unable to check file size of ${destPath} due to error: ${error.message}`);\n }\n if (!isNaN(fileSizeInBytes)) {\n tl.debug(`Downloaded file size: ${fileSizeInBytes} bytes`);\n }\n else {\n tl.debug(`File size on disk was not found`);\n }\n if (!isNaN(downloadedContentLength) &&\n !isNaN(fileSizeInBytes) &&\n fileSizeInBytes !== downloadedContentLength) {\n const errMsg = `Content-Length (${downloadedContentLength} bytes) did not match downloaded file size (${fileSizeInBytes} bytes).`;\n tl.warning(errMsg);\n reject(errMsg\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.CONTENT_LENGTH_MISMATCH.toString()));\n }\n resolve(destPath);\n });\n }\n catch (error) {\n _deleteFile(destPath);\n throw error;\n }\n }));\n });\n}\nexports.downloadTool = downloadTool;\n/**\n * Gets size of downloaded file from \"Content-Length\" header\n *\n * @param response response for request to get the file\n * @returns number if the 'content-length' is not empty, otherwise NaN\n */\nfunction _getContentLengthOfDownloadedFile(response) {\n const contentLengthHeader = response.message.headers[\"content-length\"];\n return parseInt(contentLengthHeader);\n}\n/**\n * Gets size of file saved to disk\n *\n * @param filePath the path to the file, saved to the disk\n * @returns size of file saved to disk\n */\nfunction _getFileSizeOnDisk(filePath) {\n return fs.statSync(filePath).size;\n}\nexports._getFileSizeOnDisk = _getFileSizeOnDisk;\nfunction _getAgentTemp() {\n tl.assertAgent(\"2.115.0\");\n const tempDirectory = tl.getVariable(\"Agent.TempDirectory\");\n if (!tempDirectory) {\n throw new Error(\"Agent.TempDirectory is not set\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.AGENT_TEMP_DIRECTORY_NOT_SET.toString()));\n }\n return tempDirectory;\n}\nfunction _deleteFile(filePath) {\n try {\n if (fs.existsSync(filePath)) {\n fs.rmSync(filePath);\n tl.debug(`Removed unfinished downloaded file`);\n }\n }\n catch (err) {\n tl.debug(`Failed to delete '${filePath}'. ${err}`);\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BuildStatus = void 0;\nvar BuildStatus;\n(function (BuildStatus) {\n BuildStatus[\"Failed\"] = \"Failed\";\n BuildStatus[\"SucceededWithIssues\"] = \"SucceededWithIssues\";\n BuildStatus[\"Succeeded\"] = \"Succeeded\";\n})(BuildStatus = exports.BuildStatus || (exports.BuildStatus = {}));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ErrorCode = void 0;\nvar ErrorCode;\n(function (ErrorCode) {\n ErrorCode[ErrorCode[\"SUCCESSFULLY_COMPLETED\"] = 0] = \"SUCCESSFULLY_COMPLETED\";\n ErrorCode[ErrorCode[\"UNDEFINED_ERROR_FROM_BRIDGE\"] = 1] = \"UNDEFINED_ERROR_FROM_BRIDGE\";\n ErrorCode[ErrorCode[\"ADAPTER_ERROR\"] = 2] = \"ADAPTER_ERROR\";\n ErrorCode[ErrorCode[\"BRIDGE_SHUTDOWN_FAILURE\"] = 3] = \"BRIDGE_SHUTDOWN_FAILURE\";\n ErrorCode[ErrorCode[\"BRIDGE_BREAK_ENABLED\"] = 8] = \"BRIDGE_BREAK_ENABLED\";\n ErrorCode[ErrorCode[\"BRIDGE_INITIALIZATION_FAILED\"] = 9] = \"BRIDGE_INITIALIZATION_FAILED\";\n // The list of ADO extension related error codes begins below\n ErrorCode[ErrorCode[\"MISSING_AT_LEAST_ONE_SCAN_TYPE\"] = 101] = \"MISSING_AT_LEAST_ONE_SCAN_TYPE\";\n ErrorCode[ErrorCode[\"MISSING_REQUIRED_PARAMETERS\"] = 102] = \"MISSING_REQUIRED_PARAMETERS\";\n ErrorCode[ErrorCode[\"AGENT_TEMP_DIRECTORY_NOT_SET\"] = 103] = \"AGENT_TEMP_DIRECTORY_NOT_SET\";\n ErrorCode[ErrorCode[\"BLACKDUCK_FIXPR_MAX_COUNT_NOT_APPLICABLE\"] = 104] = \"BLACKDUCK_FIXPR_MAX_COUNT_NOT_APPLICABLE\";\n ErrorCode[ErrorCode[\"INVALID_POLARIS_ASSESSMENT_TYPES\"] = 105] = \"INVALID_POLARIS_ASSESSMENT_TYPES\";\n ErrorCode[ErrorCode[\"INVALID_BLACKDUCK_FAILURE_SEVERITIES\"] = 106] = \"INVALID_BLACKDUCK_FAILURE_SEVERITIES\";\n ErrorCode[ErrorCode[\"INVALID_BLACKDUCK_FIXPR_MAXCOUNT\"] = 107] = \"INVALID_BLACKDUCK_FIXPR_MAXCOUNT\";\n ErrorCode[ErrorCode[\"MISSING_BOOLEAN_VALUE\"] = 108] = \"MISSING_BOOLEAN_VALUE\";\n ErrorCode[ErrorCode[\"INVALID_SYNOPSYS_BRIDGE_URL\"] = 109] = \"INVALID_SYNOPSYS_BRIDGE_URL\";\n ErrorCode[ErrorCode[\"SYNOPSYS_BRIDGE_URL_CANNOT_BE_EMPTY\"] = 110] = \"SYNOPSYS_BRIDGE_URL_CANNOT_BE_EMPTY\";\n ErrorCode[ErrorCode[\"INVALID_URL\"] = 111] = \"INVALID_URL\";\n ErrorCode[ErrorCode[\"SYNOPSYS_BRIDGE_VERSION_NOT_FOUND\"] = 112] = \"SYNOPSYS_BRIDGE_VERSION_NOT_FOUND\";\n ErrorCode[ErrorCode[\"SYNOPSYS_BRIDGE_DOWNLOAD_FAILED\"] = 113] = \"SYNOPSYS_BRIDGE_DOWNLOAD_FAILED\";\n ErrorCode[ErrorCode[\"BRIDGE_INSTALL_DIRECTORY_NOT_EXIST\"] = 114] = \"BRIDGE_INSTALL_DIRECTORY_NOT_EXIST\";\n ErrorCode[ErrorCode[\"DEFAULT_DIRECTORY_NOT_FOUND\"] = 115] = \"DEFAULT_DIRECTORY_NOT_FOUND\";\n ErrorCode[ErrorCode[\"BRIDGE_EXECUTABLE_NOT_FOUND\"] = 116] = \"BRIDGE_EXECUTABLE_NOT_FOUND\";\n ErrorCode[ErrorCode[\"WORKSPACE_DIRECTORY_NOT_FOUND\"] = 117] = \"WORKSPACE_DIRECTORY_NOT_FOUND\";\n ErrorCode[ErrorCode[\"FILE_DOES_NOT_EXIST\"] = 118] = \"FILE_DOES_NOT_EXIST\";\n ErrorCode[ErrorCode[\"NO_DESTINATION_DIRECTORY\"] = 119] = \"NO_DESTINATION_DIRECTORY\";\n ErrorCode[ErrorCode[\"FAILED_TO_GET_PULL_REQUEST_INFO_FROM_SOURCE_BRANCH\"] = 120] = \"FAILED_TO_GET_PULL_REQUEST_INFO_FROM_SOURCE_BRANCH\";\n ErrorCode[ErrorCode[\"MISSING_AZURE_TOKEN\"] = 121] = \"MISSING_AZURE_TOKEN\";\n ErrorCode[ErrorCode[\"INVALID_COVERITY_INSTALL_DIRECTORY\"] = 122] = \"INVALID_COVERITY_INSTALL_DIRECTORY\";\n ErrorCode[ErrorCode[\"REQUIRED_COVERITY_STREAM_NAME_FOR_MANUAL_TRIGGER\"] = 123] = \"REQUIRED_COVERITY_STREAM_NAME_FOR_MANUAL_TRIGGER\";\n ErrorCode[ErrorCode[\"DOWNLOAD_FAILED_WITH_HTTP_STATUS_CODE\"] = 124] = \"DOWNLOAD_FAILED_WITH_HTTP_STATUS_CODE\";\n ErrorCode[ErrorCode[\"CONTENT_LENGTH_MISMATCH\"] = 125] = \"CONTENT_LENGTH_MISMATCH\";\n ErrorCode[ErrorCode[\"UNDEFINED_ERROR_FROM_EXTENSION\"] = 999] = \"UNDEFINED_ERROR_FROM_EXTENSION\";\n ErrorCode[ErrorCode[\"INVALID_SRM_ASSESSMENT_TYPES\"] = 126] = \"INVALID_SRM_ASSESSMENT_TYPES\";\n})(ErrorCode = exports.ErrorCode || (exports.ErrorCode = {}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar _a, _b;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.COVERITY_ARGS = exports.COVERITY_CONFIG_PATH = exports.COVERITY_CLEAN_COMMAND = exports.COVERITY_BUILD_COMMAND = exports.COVERITY_PROJECT_DIRECTORY = exports.COVERITY_VERSION = exports.COVERITY_AUTOMATION_PRCOMMENT = exports.COVERITY_LOCAL = exports.COVERITY_POLICY_VIEW = exports.COVERITY_EXECUTION_PATH = exports.COVERITY_INSTALL_DIRECTORY = exports.COVERITY_STREAM_NAME = exports.COVERITY_PROJECT_NAME = exports.COVERITY_USER_PASSWORD = exports.COVERITY_USER = exports.COVERITY_URL = exports.POLARIS_REPORTS_SARIF_ISSUE_TYPES = exports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES = exports.POLARIS_REPORTS_SARIF_SEVERITIES = exports.POLARIS_REPORTS_SARIF_FILE_PATH = exports.POLARIS_REPORTS_SARIF_CREATE = exports.POLARIS_PR_COMMENT_SEVERITIES = exports.POLARIS_PR_COMMENT_ENABLED = exports.PROJECT_SOURCE_EXCLUDES = exports.PROJECT_SOURCE_PRESERVE_SYM_LINKS = exports.PROJECT_SOURCE_ARCHIVE = exports.POLARIS_PROJECT_DIRECTORY = exports.POLARIS_ASSESSMENT_MODE = exports.POLARIS_TEST_SCA_TYPE = exports.POLARIS_BRANCH_PARENT_NAME = exports.POLARIS_BRANCH_NAME = exports.POLARIS_TRIAGE = exports.POLARIS_ASSESSMENT_TYPES = exports.POLARIS_PROJECT_NAME = exports.POLARIS_APPLICATION_NAME = exports.POLARIS_ACCESS_TOKEN = exports.POLARIS_SERVER_URL = exports.SCAN_TYPE = exports.AZURE_TOKEN = exports.INCLUDE_DIAGNOSTICS = exports.BRIDGE_DOWNLOAD_VERSION = exports.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY = exports.ENABLE_NETWORK_AIRGAP = exports.BRIDGE_DOWNLOAD_URL = exports.showLogForDeprecatedInputs = exports.getDelimitedInput = exports.getPathInput = exports.getBoolInput = exports.getArbitraryInputs = exports.getInput = void 0;\nexports.MARK_BUILD_STATUS = exports.RETURN_STATUS = exports.SRM_PROJECT_DIRECTORY = exports.SRM_BRANCH_PARENT = exports.SRM_BRANCH_NAME = exports.SRM_PROJECT_ID = exports.SRM_PROJECT_NAME = exports.SRM_ASSESSMENT_TYPES = exports.SRM_APIKEY = exports.SRM_URL = exports.BLACKDUCK_ARGS = exports.BLACKDUCK_CONFIG_PATH = exports.BLACKDUCK_SEARCH_DEPTH = exports.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES = exports.BLACKDUCK_REPORTS_SARIF_SEVERITIES = exports.BLACKDUCK_PROJECT_DIRECTORY = exports.BLACKDUCK_REPORTS_SARIF_FILE_PATH = exports.BLACKDUCK_REPORTS_SARIF_CREATE = exports.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE = exports.BLACKDUCK_FIXPR_FILTER_SEVERITIES = exports.BLACKDUCK_FIXPR_CREATE_SINGLE_PR = exports.BLACKDUCK_FIXPR_MAXCOUNT = exports.BLACKDUCK_AUTOMATION_PRCOMMENT = exports.BLACKDUCK_FIXPR_ENABLED = exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES = exports.BLACKDUCK_SCAN_FULL = exports.BLACKDUCK_EXECUTION_PATH = exports.BLACKDUCK_INSTALL_DIRECTORY = exports.BLACKDUCK_API_TOKEN = exports.BLACKDUCK_URL = void 0;\nconst taskLib = __importStar(require(\"azure-pipelines-task-lib/task\"));\nconst constants = __importStar(require(\"./application-constant\"));\nconst polaris_1 = require(\"./model/polaris\");\nconst deprecatedInputs = [];\nfunction getInput(newKey, classicEditorKey, deprecatedKey) {\n const newInput = taskLib.getInput(newKey);\n if (newInput) {\n return newInput === null || newInput === void 0 ? void 0 : newInput.trim();\n }\n let deprecatedInput;\n if (deprecatedKey) {\n deprecatedInput = taskLib.getInput(deprecatedKey);\n if (deprecatedInput) {\n deprecatedInputs.push(deprecatedKey);\n return deprecatedInput === null || deprecatedInput === void 0 ? void 0 : deprecatedInput.trim();\n }\n }\n const classEditorInput = taskLib.getInput(classicEditorKey);\n if (classEditorInput) {\n return classEditorInput === null || classEditorInput === void 0 ? void 0 : classEditorInput.trim();\n }\n return \"\";\n}\nexports.getInput = getInput;\nfunction getArbitraryInputs(yamlKey, classicEditorKey, classicEditorKeyForPolaris, classicEditorKeyForSrm) {\n const scanType = taskLib.getInput(constants.SCAN_TYPE_KEY);\n if (classicEditorKeyForPolaris.length > 0 && scanType == \"polaris\") {\n return taskLib.getInput(classicEditorKeyForPolaris);\n }\n else if (classicEditorKeyForSrm.length > 0 && scanType == \"srm\") {\n return taskLib.getInput(classicEditorKeyForSrm);\n }\n else if (classicEditorKey.length > 0 &&\n (scanType == \"coverity\" || scanType == \"blackduck\")) {\n return taskLib.getInput(classicEditorKey);\n }\n return taskLib.getInput(yamlKey);\n}\nexports.getArbitraryInputs = getArbitraryInputs;\nfunction getBoolInput(newKey, classicEditorKey, deprecatedKey) {\n let deprecatedInput;\n if (deprecatedKey) {\n deprecatedInput = taskLib.getBoolInput(deprecatedKey);\n if (deprecatedInput) {\n deprecatedInputs.push(deprecatedKey);\n }\n }\n return (taskLib.getBoolInput(newKey) ||\n deprecatedInput ||\n taskLib.getBoolInput(classicEditorKey));\n}\nexports.getBoolInput = getBoolInput;\nfunction getPathInput(newKey, classicEditorKey, deprecatedKey) {\n var _a, _b;\n let deprecatedInput;\n if (deprecatedKey) {\n deprecatedInput = taskLib.getPathInput(deprecatedKey);\n if (deprecatedInput) {\n deprecatedInputs.push(deprecatedKey);\n }\n }\n return (((_a = taskLib.getPathInput(newKey)) === null || _a === void 0 ? void 0 : _a.trim()) ||\n (deprecatedInput === null || deprecatedInput === void 0 ? void 0 : deprecatedInput.trim()) ||\n ((_b = taskLib.getPathInput(classicEditorKey)) === null || _b === void 0 ? void 0 : _b.trim()) ||\n \"\");\n}\nexports.getPathInput = getPathInput;\nfunction getDelimitedInput(newKey, classicEditorKey, deprecatedKey) {\n const newKeyInput = taskLib.getDelimitedInput(newKey, \",\");\n const classicEditorInput = taskLib.getDelimitedInput(classicEditorKey, \",\");\n let deprecatedInput = [];\n if (deprecatedKey) {\n deprecatedInput = taskLib.getDelimitedInput(deprecatedKey, \",\");\n if (deprecatedInput.length > 0) {\n deprecatedInputs.push(deprecatedKey);\n }\n }\n return ((newKeyInput.length > 0 && newKeyInput) ||\n (deprecatedInput.length > 0 && deprecatedInput) ||\n (classicEditorInput.length > 0 && classicEditorInput) ||\n []);\n}\nexports.getDelimitedInput = getDelimitedInput;\nfunction showLogForDeprecatedInputs() {\n if (deprecatedInputs.length > 0) {\n console.log(`[${deprecatedInputs.join(\",\")}] is/are deprecated for YAML. Check documentation for new parameters: ${constants.SYNOPSYS_SECURITY_SCAN_AZURE_DEVOPS_DOCS_URL}`);\n }\n}\nexports.showLogForDeprecatedInputs = showLogForDeprecatedInputs;\nfunction getInputForPolarisAssessmentMode() {\n var _a, _b, _c;\n return (((_a = taskLib.getInput(constants.POLARIS_ASSESSMENT_MODE_KEY)) === null || _a === void 0 ? void 0 : _a.trim()) ||\n (((_b = taskLib\n .getInput(constants.POLARIS_ASSESSMENT_MODE_KEY_CLASSIC_EDITOR)) === null || _b === void 0 ? void 0 : _b.trim()) === polaris_1.POLARIS_ASSESSMENT_MODES.CI\n ? polaris_1.POLARIS_ASSESSMENT_MODES.CI\n : ((_c = taskLib\n .getInput(constants.POLARIS_ASSESSMENT_MODE_KEY_CLASSIC_EDITOR)) === null || _c === void 0 ? void 0 : _c.trim()) === polaris_1.POLARIS_ASSESSMENT_MODES.SOURCEUPLOAD\n ? polaris_1.POLARIS_ASSESSMENT_MODES.SOURCE_UPLOAD\n : \"\"));\n}\n//Bridge download url\nexports.BRIDGE_DOWNLOAD_URL = getInput(constants.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY, constants.SYNOPSYS_BRIDGE_DOWNLOAD_URL_KEY_CLASSIC_EDITOR, constants.BRIDGE_DOWNLOAD_URL_KEY);\nexports.ENABLE_NETWORK_AIRGAP = getBoolInput(constants.NETWORK_AIRGAP_KEY, constants.NETWORK_AIRGAP_KEY_CLASSIC_EDITOR, constants.BRIDGE_NETWORK_AIRGAP_KEY);\nexports.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY = getPathInput(constants.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY, constants.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR, null);\nexports.BRIDGE_DOWNLOAD_VERSION = getInput(constants.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY, constants.SYNOPSYS_BRIDGE_DOWNLOAD_VERSION_KEY_CLASSIC_EDITOR, constants.BRIDGE_DOWNLOAD_VERSION_KEY);\nexports.INCLUDE_DIAGNOSTICS = getInput(constants.INCLUDE_DIAGNOSTICS_KEY, constants.INCLUDE_DIAGNOSTICS_KEY_CLASSIC_EDITOR, null);\nexports.AZURE_TOKEN = getInput(constants.AZURE_TOKEN_KEY, constants.AZURE_TOKEN_KEY_CLASSIC_EDITOR, null);\nexports.SCAN_TYPE = ((_a = taskLib.getInput(constants.SCAN_TYPE_KEY)) === null || _a === void 0 ? void 0 : _a.trim()) || \"\";\n// Polaris related inputs\nexports.POLARIS_SERVER_URL = getInput(constants.POLARIS_SERVER_URL_KEY, constants.POLARIS_SERVER_URL_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_SERVER_URL_KEY);\nexports.POLARIS_ACCESS_TOKEN = getInput(constants.POLARIS_ACCESS_TOKEN_KEY, constants.POLARIS_ACCESS_TOKEN_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_ACCESS_TOKEN_KEY);\nexports.POLARIS_APPLICATION_NAME = getInput(constants.POLARIS_APPLICATION_NAME_KEY, constants.POLARIS_APPLICATION_NAME_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_APPLICATION_NAME_KEY);\nexports.POLARIS_PROJECT_NAME = getInput(constants.POLARIS_PROJECT_NAME_KEY, constants.POLARIS_PROJECT_NAME_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_PROJECT_NAME_KEY);\nexports.POLARIS_ASSESSMENT_TYPES = getDelimitedInput(constants.POLARIS_ASSESSMENT_TYPES_KEY, constants.POLARIS_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_ASSESSMENT_TYPES_KEY);\nexports.POLARIS_TRIAGE = getInput(constants.POLARIS_TRIAGE_KEY, constants.POLARIS_TRIAGE_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_TRIAGE_KEY);\nexports.POLARIS_BRANCH_NAME = getInput(constants.POLARIS_BRANCH_NAME_KEY, constants.POLARIS_BRANCH_NAME_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_BRANCH_NAME_KEY);\nexports.POLARIS_BRANCH_PARENT_NAME = getInput(constants.POLARIS_BRANCH_PARENT_NAME_KEY, constants.POLARIS_BRANCH_PARENT_NAME_KEY_CLASSIC_EDITOR, null);\nexports.POLARIS_TEST_SCA_TYPE = getInput(constants.POLARIS_TEST_SCA_TYPE_KEY, constants.POLARIS_TEST_SCA_TYPE_KEY_CLASSIC_EDITOR, null);\nexports.POLARIS_ASSESSMENT_MODE = getInputForPolarisAssessmentMode();\nexports.POLARIS_PROJECT_DIRECTORY = getInput(constants.PROJECT_DIRECTORY_KEY, constants.POLARIS_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR, null);\nexports.PROJECT_SOURCE_ARCHIVE = getInput(constants.PROJECT_SOURCE_ARCHIVE_KEY, constants.PROJECT_SOURCE_ARCHIVE_KEY_CLASSIC_EDITOR, null);\nexports.PROJECT_SOURCE_PRESERVE_SYM_LINKS = getInput(constants.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY, constants.PROJECT_SOURCE_PRESERVE_SYM_LINKS_KEY_CLASSIC_EDITOR, null);\nexports.PROJECT_SOURCE_EXCLUDES = getDelimitedInput(constants.PROJECT_SOURCE_EXCLUDES_KEY, constants.PROJECT_SOURCE_EXCLUDES_KEY_CLASSIC_EDITOR, null);\nexports.POLARIS_PR_COMMENT_ENABLED = getInput(constants.POLARIS_PR_COMMENT_ENABLED_KEY, constants.POLARIS_PR_COMMENT_ENABLED_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_PR_COMMENT_ENABLED_KEY);\nexports.POLARIS_PR_COMMENT_SEVERITIES = getDelimitedInput(constants.POLARIS_PR_COMMENT_SEVERITIES_KEY, constants.POLARIS_PR_COMMENT_SEVERITIES_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_PR_COMMENT_SEVERITIES_KEY);\nexports.POLARIS_REPORTS_SARIF_CREATE = getInput(constants.POLARIS_REPORTS_SARIF_CREATE_KEY, constants.POLARIS_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_REPORTS_SARIF_CREATE_KEY);\nexports.POLARIS_REPORTS_SARIF_FILE_PATH = getInput(constants.POLARIS_REPORTS_SARIF_FILE_PATH_KEY, constants.POLARIS_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_REPORTS_SARIF_FILE_PATH_KEY);\nexports.POLARIS_REPORTS_SARIF_SEVERITIES = getDelimitedInput(constants.POLARIS_REPORTS_SARIF_SEVERITIES_KEY, constants.POLARIS_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_REPORTS_SARIF_SEVERITIES_KEY);\nexports.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES = getInput(constants.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY, constants.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY);\nexports.POLARIS_REPORTS_SARIF_ISSUE_TYPES = getDelimitedInput(constants.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY, constants.POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY_CLASSIC_EDITOR, constants.BRIDGE_POLARIS_REPORTS_SARIF_ISSUE_TYPES_KEY);\n// Coverity related inputs\nexports.COVERITY_URL = getInput(constants.COVERITY_URL_KEY, constants.COVERITY_URL_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_URL_KEY);\nexports.COVERITY_USER = getInput(constants.COVERITY_USER_KEY, constants.COVERITY_USER_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_USER_NAME_KEY);\nexports.COVERITY_USER_PASSWORD = getInput(constants.COVERITY_PASSPHRASE_KEY, constants.COVERITY_PASSPHRASE_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_USER_PASSWORD_KEY);\nexports.COVERITY_PROJECT_NAME = getInput(constants.COVERITY_PROJECT_NAME_KEY, constants.COVERITY_PROJECT_NAME_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_PROJECT_NAME_KEY);\nexports.COVERITY_STREAM_NAME = getInput(constants.COVERITY_STREAM_NAME_KEY, constants.COVERITY_STREAM_NAME_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_STREAM_NAME_KEY);\nexports.COVERITY_INSTALL_DIRECTORY = getPathInput(constants.COVERITY_INSTALL_DIRECTORY_KEY, constants.COVERITY_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_INSTALL_DIRECTORY_KEY);\nexports.COVERITY_EXECUTION_PATH = getPathInput(constants.COVERITY_EXECUTION_PATH_KEY, constants.COVERITY_EXECUTION_PATH_KEY_CLASSIC_EDITOR, null);\nexports.COVERITY_POLICY_VIEW = getInput(constants.COVERITY_POLICY_VIEW_KEY, constants.COVERITY_POLICY_VIEW_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_POLICY_VIEW_KEY);\nexports.COVERITY_LOCAL = getInput(constants.COVERITY_LOCAL_KEY, constants.COVERITY_LOCAL_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_LOCAL_KEY);\nexports.COVERITY_AUTOMATION_PRCOMMENT = getBoolInput(constants.COVERITY_PRCOMMENT_ENABLED_KEY, constants.COVERITY_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_AUTOMATION_PRCOMMENT_KEY);\nexports.COVERITY_VERSION = getInput(constants.COVERITY_VERSION_KEY, constants.COVERITY_VERSION_KEY_CLASSIC_EDITOR, constants.BRIDGE_COVERITY_VERSION_KEY);\nexports.COVERITY_PROJECT_DIRECTORY = getInput(constants.PROJECT_DIRECTORY_KEY, constants.COVERITY_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR, null);\nexports.COVERITY_BUILD_COMMAND = getArbitraryInputs(constants.COVERITY_BUILD_COMMAND_KEY, constants.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR, constants.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.COVERITY_BUILD_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM);\nexports.COVERITY_CLEAN_COMMAND = getArbitraryInputs(constants.COVERITY_CLEAN_COMMAND_KEY, constants.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR, constants.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.COVERITY_CLEAN_COMMAND_KEY_CLASSIC_EDITOR_FOR_SRM);\nexports.COVERITY_CONFIG_PATH = getArbitraryInputs(constants.COVERITY_CONFIG_PATH_KEY, constants.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR, constants.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.COVERITY_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM);\nexports.COVERITY_ARGS = getArbitraryInputs(constants.COVERITY_ARGS_KEY, constants.COVERITY_ARGS_KEY_CLASSIC_EDITOR, constants.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.COVERITY_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM);\n// Blackduck related inputs\nexports.BLACKDUCK_URL = getInput(constants.BLACKDUCK_URL_KEY, constants.BLACKDUCK_URL_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_URL_KEY);\nexports.BLACKDUCK_API_TOKEN = getInput(constants.BLACKDUCK_TOKEN_KEY, constants.BLACKDUCK_TOKEN_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_API_TOKEN_KEY);\nexports.BLACKDUCK_INSTALL_DIRECTORY = getPathInput(constants.BLACKDUCK_INSTALL_DIRECTORY_KEY, constants.BLACKDUCK_INSTALL_DIRECTORY_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_INSTALL_DIRECTORY_KEY);\nexports.BLACKDUCK_EXECUTION_PATH = getPathInput(constants.BLACKDUCK_EXECUTION_PATH_KEY, constants.BLACKDUCK_EXECUTION_PATH_KEY_CLASSIC_EDITOR, null);\nexports.BLACKDUCK_SCAN_FULL = getInput(constants.BLACKDUCK_SCAN_FULL_KEY, constants.BLACKDUCK_SCAN_FULL_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_SCAN_FULL_KEY);\nexports.BLACKDUCK_SCAN_FAILURE_SEVERITIES = getDelimitedInput(constants.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY, constants.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY);\n/**\n * @deprecated BLACKDUCK_AUTOMATION_FIXPR is deprecated.\n */\nconst BLACKDUCK_AUTOMATION_FIXPR = taskLib.getInput(constants.BLACKDUCK_AUTOMATION_FIXPR_KEY);\nif (BLACKDUCK_AUTOMATION_FIXPR) {\n deprecatedInputs.push(constants.BLACKDUCK_AUTOMATION_FIXPR_KEY);\n}\nexports.BLACKDUCK_FIXPR_ENABLED = getBoolInput(constants.BLACKDUCK_FIXPR_ENABLED_KEY, constants.BLACKDUCK_FIXPR_ENABLED_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_FIXPR_ENABLED_KEY) ||\n (BLACKDUCK_AUTOMATION_FIXPR === null || BLACKDUCK_AUTOMATION_FIXPR === void 0 ? void 0 : BLACKDUCK_AUTOMATION_FIXPR.trim()) ||\n \"\";\nexports.BLACKDUCK_AUTOMATION_PRCOMMENT = getBoolInput(constants.BLACKDUCK_PRCOMMENT_ENABLED_KEY, constants.BLACKDUCK_PRCOMMENT_ENABLED_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_AUTOMATION_PRCOMMENT_KEY);\nexports.BLACKDUCK_FIXPR_MAXCOUNT = getInput(constants.BLACKDUCK_FIXPR_MAXCOUNT_KEY, constants.BLACKDUCK_FIXPR_MAXCOUNT_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_FIXPR_MAXCOUNT_KEY);\nexports.BLACKDUCK_FIXPR_CREATE_SINGLE_PR = getInput(constants.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY, constants.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY);\nexports.BLACKDUCK_FIXPR_FILTER_SEVERITIES = getDelimitedInput(constants.BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY, constants.BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_FIXPR_FILTER_SEVERITIES_KEY);\nexports.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE = getDelimitedInput(constants.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY, constants.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_FIXPR_UPGRADE_GUIDANCE_KEY);\nexports.BLACKDUCK_REPORTS_SARIF_CREATE = getInput(constants.BLACKDUCK_REPORTS_SARIF_CREATE_KEY, constants.BLACKDUCK_REPORTS_SARIF_CREATE_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_REPORTS_SARIF_CREATE_KEY);\nexports.BLACKDUCK_REPORTS_SARIF_FILE_PATH = getInput(constants.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY, constants.BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_REPORTS_SARIF_FILE_PATH_KEY);\nexports.BLACKDUCK_PROJECT_DIRECTORY = getInput(constants.PROJECT_DIRECTORY_KEY, constants.BLACKDUCK_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR, null);\nexports.BLACKDUCK_REPORTS_SARIF_SEVERITIES = getDelimitedInput(constants.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY, constants.BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_REPORTS_SARIF_SEVERITIES_KEY);\nexports.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES = getInput(constants.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY, constants.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES_KEY_CLASSIC_EDITOR, constants.BRIDGE_BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES);\nexports.BLACKDUCK_SEARCH_DEPTH = getArbitraryInputs(constants.BLACKDUCK_SEARCH_DEPTH_KEY, constants.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.BLACKDUCK_SEARCH_DEPTH_KEY_CLASSIC_EDITOR_FOR_SRM);\nexports.BLACKDUCK_CONFIG_PATH = getArbitraryInputs(constants.BLACKDUCK_CONFIG_PATH_KEY, constants.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.BLACKDUCK_CONFIG_PATH_KEY_CLASSIC_EDITOR_FOR_SRM);\nexports.BLACKDUCK_ARGS = getArbitraryInputs(constants.BLACKDUCK_ARGS_KEY, constants.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR, constants.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR_FOR_POLARIS, constants.BLACKDUCK_ARGS_KEY_CLASSIC_EDITOR_FOR_SRM);\n//SRM inputs\nexports.SRM_URL = getInput(constants.SRM_URL_KEY, constants.SRM_URL_KEY_CLASSIC_EDITOR, null);\nexports.SRM_APIKEY = getInput(constants.SRM_APIKEY_KEY, constants.SRM_APIKEY_KEY_CLASSIC_EDITOR, null);\nexports.SRM_ASSESSMENT_TYPES = getDelimitedInput(constants.SRM_ASSESSMENT_TYPES_KEY, constants.SRM_ASSESSMENT_TYPES_KEY_CLASSIC_EDITOR, null);\nexports.SRM_PROJECT_NAME = getInput(constants.SRM_PROJECT_NAME_KEY, constants.SRM_PROJECT_NAME_KEY_CLASSIC_EDITOR, null);\nexports.SRM_PROJECT_ID = getInput(constants.SRM_PROJECT_ID_KEY, constants.SRM_PROJECT_ID_KEY_CLASSIC_EDITOR, null);\nexports.SRM_BRANCH_NAME = getInput(constants.SRM_BRANCH_NAME_KEY, constants.SRM_BRANCH_NAME_KEY_CLASSIC_EDITOR, null);\nexports.SRM_BRANCH_PARENT = getInput(constants.SRM_BRANCH_PARENT_KEY, constants.SRM_BRANCH_PARENT_KEY_CLASSIC_EDITOR, null);\nexports.SRM_PROJECT_DIRECTORY = getInput(constants.PROJECT_DIRECTORY_KEY, constants.SRM_PROJECT_DIRECTORY_KEY_CLASSIC_EDITOR, null);\nexports.RETURN_STATUS = ((_b = taskLib.getInput(constants.RETURN_STATUS_KEY)) === null || _b === void 0 ? void 0 : _b.trim()) || \"true\";\nexports.MARK_BUILD_STATUS = getInput(constants.MARK_BUILD_STATUS_KEY, constants.MARK_BUILD_STATUS_KEY_CLASSIC_EDITOR, null);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AZURE_BUILD_REASON = exports.AZURE_ENVIRONMENT_VARIABLES = void 0;\nexports.AZURE_ENVIRONMENT_VARIABLES = {\n AZURE_ORGANIZATION: \"System.TeamFoundationCollectionUri\",\n AZURE_PROJECT: \"System.TeamProject\",\n AZURE_REPOSITORY: \"Build.Repository.Name\",\n AZURE_SOURCE_BRANCH: \"Build.SourceBranch\",\n AZURE_PULL_REQUEST_NUMBER: \"System.PullRequest.PullRequestId\",\n AZURE_PULL_REQUEST_TARGET_BRANCH: \"System.PullRequest.TargetBranch\",\n AZURE_BUILD_REASON: \"Build.Reason\",\n AZURE_PULL_REQUEST_SOURCE_BRANCH: \"System.PullRequest.SourceBranch\",\n};\nvar AZURE_BUILD_REASON;\n(function (AZURE_BUILD_REASON) {\n AZURE_BUILD_REASON[\"PULL_REQUEST\"] = \"PullRequest\";\n AZURE_BUILD_REASON[\"MANUAL\"] = \"Manual\";\n})(AZURE_BUILD_REASON = exports.AZURE_BUILD_REASON || (exports.AZURE_BUILD_REASON = {}));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BLACKDUCK_SCAN_FAILURE_SEVERITIES = void 0;\nvar BLACKDUCK_SCAN_FAILURE_SEVERITIES;\n(function (BLACKDUCK_SCAN_FAILURE_SEVERITIES) {\n BLACKDUCK_SCAN_FAILURE_SEVERITIES[\"ALL\"] = \"ALL\";\n BLACKDUCK_SCAN_FAILURE_SEVERITIES[\"NONE\"] = \"NONE\";\n BLACKDUCK_SCAN_FAILURE_SEVERITIES[\"BLOCKER\"] = \"BLOCKER\";\n BLACKDUCK_SCAN_FAILURE_SEVERITIES[\"CRITICAL\"] = \"CRITICAL\";\n BLACKDUCK_SCAN_FAILURE_SEVERITIES[\"MAJOR\"] = \"MAJOR\";\n BLACKDUCK_SCAN_FAILURE_SEVERITIES[\"MINOR\"] = \"MINOR\";\n BLACKDUCK_SCAN_FAILURE_SEVERITIES[\"OK\"] = \"OK\";\n BLACKDUCK_SCAN_FAILURE_SEVERITIES[\"TRIVIAL\"] = \"TRIVIAL\";\n BLACKDUCK_SCAN_FAILURE_SEVERITIES[\"UNSPECIFIED\"] = \"UNSPECIFIED\";\n})(BLACKDUCK_SCAN_FAILURE_SEVERITIES = exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES || (exports.BLACKDUCK_SCAN_FAILURE_SEVERITIES = {}));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.POLARIS_ASSESSMENT_MODES = void 0;\nvar POLARIS_ASSESSMENT_MODES;\n(function (POLARIS_ASSESSMENT_MODES) {\n POLARIS_ASSESSMENT_MODES[\"CI\"] = \"CI\";\n POLARIS_ASSESSMENT_MODES[\"SOURCE_UPLOAD\"] = \"SOURCE_UPLOAD\";\n POLARIS_ASSESSMENT_MODES[\"SOURCEUPLOAD\"] = \"SOURCEUPLOAD\";\n})(POLARIS_ASSESSMENT_MODES = exports.POLARIS_ASSESSMENT_MODES || (exports.POLARIS_ASSESSMENT_MODES = {}));\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SynopsysBridge = void 0;\nconst path = __importStar(require(\"path\"));\nconst taskLib = __importStar(require(\"azure-pipelines-task-lib/task\"));\nconst HttpClient_1 = require(\"typed-rest-client/HttpClient\");\nconst tools_parameter_1 = require(\"./tools-parameter\");\nconst utility_1 = require(\"./utility\");\nconst validator_1 = require(\"./validator\");\nconst constants = __importStar(require(\"./application-constant\"));\nconst inputs = __importStar(require(\"./input\"));\nconst utility_2 = require(\"./utility\");\nconst fs_1 = require(\"fs\");\nconst dom_parser_1 = __importDefault(require(\"dom-parser\"));\nconst input_1 = require(\"./input\");\nconst application_constant_1 = require(\"./application-constant\");\nconst os_1 = __importDefault(require(\"os\"));\nconst semver_1 = __importDefault(require(\"semver\"));\nconst ErrorCodes_1 = require(\"./enum/ErrorCodes\");\nclass SynopsysBridge {\n constructor() {\n this.bridgeExecutablePath = \"\";\n this.bridgeArtifactoryURL =\n \"https://sig-repo.synopsys.com/artifactory/bds-integrations-release/com/synopsys/integration/synopsys-bridge\";\n this.bridgeUrlPattern = this.bridgeArtifactoryURL.concat(\"/$version/synopsys-bridge-$version-$platform.zip\");\n this.bridgeUrlLatestPattern = this.bridgeArtifactoryURL.concat(\"/latest/synopsys-bridge-$platform.zip\");\n }\n extractBridge(fileInfo) {\n return __awaiter(this, void 0, void 0, function* () {\n const extractZippedFilePath = inputs.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY ||\n this.getBridgeDefaultPath();\n // Clear the existing bridge, if available\n if (taskLib.exist(extractZippedFilePath)) {\n yield taskLib.rmRF(extractZippedFilePath);\n }\n yield (0, utility_2.extractZipped)(fileInfo.filePath, extractZippedFilePath);\n return Promise.resolve(extractZippedFilePath);\n });\n }\n executeBridgeCommand(executablePath, workspace, command) {\n return __awaiter(this, void 0, void 0, function* () {\n taskLib.debug(\"extractedPath: \".concat(executablePath));\n const executableBridgePath = yield this.setBridgeExecutablePath(executablePath);\n if (!taskLib.exist(executableBridgePath)) {\n throw new Error(\"Synopsys Bridge executable file could not be found at \"\n .concat(executableBridgePath)\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.BRIDGE_EXECUTABLE_NOT_FOUND.toString()));\n }\n try {\n return yield taskLib.exec(executableBridgePath, command, {\n cwd: workspace,\n });\n }\n catch (errorObject) {\n taskLib.debug(\"errorObject:\" + errorObject);\n throw errorObject;\n }\n });\n }\n prepareCommand(tempDir) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n let formattedCommand = \"\";\n const invalidParams = (0, validator_1.validateScanTypes)();\n if (invalidParams.length === 4) {\n return Promise.reject(new Error(\"Requires at least one scan type: (\"\n .concat(constants.POLARIS_SERVER_URL_KEY)\n .concat(\",\")\n .concat(constants.COVERITY_URL_KEY)\n .concat(\",\")\n .concat(constants.BLACKDUCK_URL_KEY)\n .concat(\",\")\n .concat(constants.SRM_URL_KEY)\n .concat(\")\")\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.MISSING_AT_LEAST_ONE_SCAN_TYPE.toString())));\n }\n let classicEditorErrors = [];\n let polarisErrors = [];\n let coverityErrors = [];\n let blackduckErrors = [];\n let srmErrors = [];\n if (input_1.SCAN_TYPE.length > 0) {\n // To support single scan using Classic Editor\n [formattedCommand, classicEditorErrors] =\n yield this.formatCommandForClassicEditor(formattedCommand, tempDir);\n }\n else {\n // To support multi-scan using YAML\n [formattedCommand, polarisErrors] = yield this.preparePolarisCommand(formattedCommand, tempDir);\n [formattedCommand, coverityErrors] = yield this.prepareBlackduckCommand(formattedCommand, tempDir);\n [formattedCommand, blackduckErrors] = yield this.prepareCoverityCommand(formattedCommand, tempDir);\n [formattedCommand, srmErrors] = yield this.prepareSrmCommand(formattedCommand, tempDir);\n }\n let validationErrors = [];\n validationErrors = validationErrors.concat(polarisErrors, coverityErrors, blackduckErrors, srmErrors, classicEditorErrors);\n if (formattedCommand.length === 0) {\n return Promise.reject(new Error(validationErrors.join(\",\")));\n }\n if (validationErrors.length > 0) {\n console.log(new Error(validationErrors.join(\",\")));\n }\n if ((0, utility_2.parseToBoolean)(inputs.INCLUDE_DIAGNOSTICS)) {\n formattedCommand = formattedCommand\n .concat(tools_parameter_1.SynopsysToolsParameter.SPACE)\n .concat(tools_parameter_1.SynopsysToolsParameter.DIAGNOSTICS_OPTION);\n }\n console.log(\"Formatted command is - \".concat(formattedCommand));\n return Promise.resolve(formattedCommand);\n }\n catch (e) {\n const errorObject = e;\n taskLib.debug(errorObject.stack === undefined ? \"\" : errorObject.stack.toString());\n return Promise.reject(errorObject);\n }\n });\n }\n formatCommandForClassicEditor(formattedCommand, tempDir) {\n return __awaiter(this, void 0, void 0, function* () {\n let errors = [];\n if (input_1.SCAN_TYPE == \"polaris\") {\n [formattedCommand, errors] = yield this.preparePolarisCommand(formattedCommand, tempDir);\n }\n else if (input_1.SCAN_TYPE == \"blackduck\") {\n [formattedCommand, errors] = yield this.prepareBlackduckCommand(formattedCommand, tempDir);\n }\n else if (input_1.SCAN_TYPE == \"coverity\") {\n [formattedCommand, errors] = yield this.prepareCoverityCommand(formattedCommand, tempDir);\n }\n else if (input_1.SCAN_TYPE == \"srm\") {\n [formattedCommand, errors] = yield this.prepareSrmCommand(formattedCommand, tempDir);\n }\n return [formattedCommand, errors];\n });\n }\n prepareSrmCommand(formattedCommand, tempDir) {\n return __awaiter(this, void 0, void 0, function* () {\n const srmErrors = (0, validator_1.validateSrmInputs)();\n if (srmErrors.length === 0 && inputs.SRM_URL) {\n const commandFormatter = new tools_parameter_1.SynopsysToolsParameter(tempDir);\n formattedCommand = formattedCommand.concat(yield commandFormatter.getFormattedCommandForSrm());\n }\n return [formattedCommand, srmErrors];\n });\n }\n preparePolarisCommand(formattedCommand, tempDir) {\n return __awaiter(this, void 0, void 0, function* () {\n // validating and preparing command for polaris\n const polarisErrors = (0, validator_1.validatePolarisInputs)();\n const commandFormatter = new tools_parameter_1.SynopsysToolsParameter(tempDir);\n if (polarisErrors.length === 0 && inputs.POLARIS_SERVER_URL) {\n formattedCommand = formattedCommand.concat(yield commandFormatter.getFormattedCommandForPolaris());\n }\n return [formattedCommand, polarisErrors];\n });\n }\n prepareCoverityCommand(formattedCommand, tempDir) {\n return __awaiter(this, void 0, void 0, function* () {\n // validating and preparing command for coverity\n const coverityErrors = (0, validator_1.validateCoverityInputs)();\n if (coverityErrors.length === 0 && inputs.COVERITY_URL) {\n const coverityCommandFormatter = new tools_parameter_1.SynopsysToolsParameter(tempDir);\n formattedCommand = formattedCommand.concat(yield coverityCommandFormatter.getFormattedCommandForCoverity());\n }\n return [formattedCommand, coverityErrors];\n });\n }\n prepareBlackduckCommand(formattedCommand, tempDir) {\n return __awaiter(this, void 0, void 0, function* () {\n const blackduckErrors = (0, validator_1.validateBlackDuckInputs)();\n if (blackduckErrors.length === 0 && inputs.BLACKDUCK_URL) {\n const blackDuckCommandFormatter = new tools_parameter_1.SynopsysToolsParameter(tempDir);\n formattedCommand = formattedCommand.concat(yield blackDuckCommandFormatter.getFormattedCommandForBlackduck());\n }\n return [formattedCommand, blackduckErrors];\n });\n }\n validateBridgeVersion(version) {\n return __awaiter(this, void 0, void 0, function* () {\n const versions = yield this.getAllAvailableBridgeVersions();\n return Promise.resolve(versions.indexOf(version.trim()) !== -1);\n });\n }\n downloadAndExtractBridge(tempDir) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const bridgeUrl = yield this.getBridgeUrl();\n if (bridgeUrl != \"\" && bridgeUrl != null) {\n const downloadBridge = yield (0, utility_2.getRemoteFile)(tempDir, bridgeUrl);\n console.info(\"Download of Synopsys Bridge completed\");\n // Extracting bridge\n return yield this.extractBridge(downloadBridge);\n }\n if (inputs.BRIDGE_DOWNLOAD_VERSION &&\n (yield this.checkIfSynopsysBridgeVersionExists(inputs.BRIDGE_DOWNLOAD_VERSION))) {\n return Promise.resolve(this.bridgeExecutablePath);\n }\n return this.bridgeExecutablePath;\n }\n catch (e) {\n const errorObject = e.message;\n if (errorObject.includes(\"404\") ||\n errorObject.toLowerCase().includes(\"invalid url\")) {\n return Promise.reject(new Error(\"Provided Synopsys Bridge url is not valid for the configured \"\n .concat(process.platform, \" runner\")\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.INVALID_SYNOPSYS_BRIDGE_URL.toString())));\n }\n else if (errorObject.toLowerCase().includes(\"empty\")) {\n return Promise.reject(new Error(\"Provided Synopsys Bridge URL cannot be empty\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_URL_CANNOT_BE_EMPTY.toString())));\n }\n else {\n return Promise.reject(new Error(errorObject));\n }\n }\n });\n }\n getBridgeUrl() {\n return __awaiter(this, void 0, void 0, function* () {\n let bridgeUrl;\n let version = \"\";\n if (inputs.BRIDGE_DOWNLOAD_URL) {\n bridgeUrl = inputs.BRIDGE_DOWNLOAD_URL;\n if (!(0, validator_1.validateBridgeUrl)(inputs.BRIDGE_DOWNLOAD_URL)) {\n return Promise.reject(new Error(\"Invalid URL\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.INVALID_URL.toString())));\n }\n // To check whether bridge already exists with same version mentioned in bridge url\n const versionsArray = bridgeUrl.match(\".*synopsys-bridge-([0-9.]*).*\");\n if (versionsArray) {\n version = versionsArray[1];\n if (!version) {\n const regex = /\\w*(synopsys-bridge-(win64|linux64|macosx|macos_arm).zip)/;\n version = yield this.getSynopsysBridgeVersionFromLatestURL(bridgeUrl.replace(regex, \"versions.txt\"));\n }\n }\n }\n else if (inputs.BRIDGE_DOWNLOAD_VERSION) {\n if (yield this.validateBridgeVersion(inputs.BRIDGE_DOWNLOAD_VERSION)) {\n bridgeUrl = this.getVersionUrl(inputs.BRIDGE_DOWNLOAD_VERSION.trim()).trim();\n version = inputs.BRIDGE_DOWNLOAD_VERSION;\n }\n else {\n return Promise.reject(new Error(\"Provided Synopsys Bridge version not found in artifactory\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_VERSION_NOT_FOUND.toString())));\n }\n }\n else {\n taskLib.debug(\"Checking for latest version of Synopsys Bridge to download and configure\");\n version = yield this.getSynopsysBridgeVersionFromLatestURL(this.bridgeArtifactoryURL.concat(\"/latest/versions.txt\"));\n bridgeUrl = this.getLatestVersionUrl();\n }\n if (version != \"\") {\n if (yield this.checkIfSynopsysBridgeVersionExists(version)) {\n console.log(\"Skipping download as same Synopsys Bridge version found\");\n return Promise.resolve(\"\");\n }\n }\n console.info(\"Downloading and configuring Synopsys Bridge\");\n console.info(\"Synopsys Bridge URL is - \".concat(bridgeUrl));\n return bridgeUrl;\n });\n }\n checkIfSynopsysBridgeVersionExists(bridgeVersion) {\n return __awaiter(this, void 0, void 0, function* () {\n this.bridgeExecutablePath = yield this.getSynopsysBridgePath();\n const osName = process.platform;\n let versionFilePath;\n if (osName === \"win32\") {\n versionFilePath = this.bridgeExecutablePath.concat(\"\\\\versions.txt\");\n }\n else {\n versionFilePath = this.bridgeExecutablePath.concat(\"/versions.txt\");\n }\n if (taskLib.exist(versionFilePath) && this.bridgeExecutablePath) {\n taskLib.debug(\"Synopsys Bridge executable found at \".concat(this.bridgeExecutablePath));\n taskLib.debug(\"Version file found at \".concat(this.bridgeExecutablePath));\n if (yield this.checkIfVersionExists(bridgeVersion, versionFilePath)) {\n return Promise.resolve(true);\n }\n }\n else {\n taskLib.debug(\"Synopsys Bridge version file could not be found at \".concat(this.bridgeExecutablePath));\n }\n return Promise.resolve(false);\n });\n }\n getAllAvailableBridgeVersions() {\n return __awaiter(this, void 0, void 0, function* () {\n let htmlResponse = \"\";\n const httpClient = new HttpClient_1.HttpClient(\"synopsys-task\");\n let retryCountLocal = application_constant_1.RETRY_COUNT;\n let httpResponse;\n let retryDelay = application_constant_1.RETRY_DELAY_IN_MILLISECONDS;\n const versionArray = [];\n do {\n httpResponse = yield httpClient.get(this.bridgeArtifactoryURL, {\n Accept: \"text/html\",\n });\n if (!application_constant_1.NON_RETRY_HTTP_CODES.has(Number(httpResponse.message.statusCode))) {\n retryDelay = yield this.retrySleepHelper(\"Getting all available bridge versions has been failed, Retries left: \", retryCountLocal, retryDelay);\n retryCountLocal--;\n }\n else {\n retryCountLocal = 0;\n htmlResponse = yield httpResponse.readBody();\n const domParser = new dom_parser_1.default();\n const doms = domParser.parseFromString(htmlResponse);\n const elems = doms.getElementsByTagName(\"a\"); //querySelectorAll('a')\n if (elems != null) {\n for (const el of elems) {\n const content = el.textContent;\n if (content != null) {\n const v = content.match(\"^[0-9]+.[0-9]+.[0-9]+\");\n if (v != null && v.length === 1) {\n versionArray.push(v[0]);\n }\n }\n }\n }\n }\n if (retryCountLocal === 0 && !(versionArray.length > 0)) {\n taskLib.warning(\"Unable to retrieve the Synopsys Bridge Versions from Artifactory\");\n }\n } while (retryCountLocal > 0);\n return versionArray;\n });\n }\n checkIfVersionExists(bridgeVersion, bridgeVersionFilePath) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const contents = (0, fs_1.readFileSync)(bridgeVersionFilePath, \"utf-8\");\n return contents.includes(\"Synopsys Bridge Package: \".concat(bridgeVersion));\n }\n catch (e) {\n console.info(\"Error reading version file content: \".concat(e.message));\n }\n return false;\n });\n }\n getSynopsysBridgeVersionFromLatestURL(latestVersionsUrl) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const httpClient = new HttpClient_1.HttpClient(\"\");\n let retryCountLocal = application_constant_1.RETRY_COUNT;\n let retryDelay = application_constant_1.RETRY_DELAY_IN_MILLISECONDS;\n let httpResponse;\n do {\n httpResponse = yield httpClient.get(latestVersionsUrl, {\n Accept: \"text/html\",\n });\n if (!application_constant_1.NON_RETRY_HTTP_CODES.has(Number(httpResponse.message.statusCode))) {\n retryDelay = yield this.retrySleepHelper(\"Getting latest Synopsys Bridge versions has been failed, Retries left: \", retryCountLocal, retryDelay);\n retryCountLocal--;\n }\n else if (httpResponse.message.statusCode === 200) {\n retryCountLocal = 0;\n const htmlResponse = (yield httpResponse.readBody()).trim();\n const lines = htmlResponse.split(\"\\n\");\n for (const line of lines) {\n if (line.includes(\"Synopsys Bridge Package\")) {\n return line.split(\":\")[1].trim();\n }\n }\n }\n if (retryCountLocal == 0) {\n taskLib.warning(\"Unable to retrieve the most recent version from Artifactory URL\");\n }\n } while (retryCountLocal > 0);\n }\n catch (e) {\n taskLib.debug(\"Error reading version file content: \".concat(e.message));\n }\n return \"\";\n });\n }\n getBridgeDefaultPath() {\n let bridgeDefaultPath = \"\";\n const osName = process.platform;\n if (osName === \"darwin\") {\n bridgeDefaultPath = path.join(process.env[\"HOME\"], constants.SYNOPSYS_BRIDGE_DEFAULT_PATH_MAC);\n }\n else if (osName === \"linux\") {\n bridgeDefaultPath = path.join(process.env[\"HOME\"], constants.SYNOPSYS_BRIDGE_DEFAULT_PATH_LINUX);\n }\n else if (osName === \"win32\") {\n bridgeDefaultPath = path.join(process.env[\"USERPROFILE\"], constants.SYNOPSYS_BRIDGE_DEFAULT_PATH_WINDOWS);\n }\n taskLib.debug(\"bridgeDefaultPath:\" + bridgeDefaultPath);\n return bridgeDefaultPath;\n }\n // Get bridge version url\n getVersionUrl(version) {\n const osName = process.platform;\n let bridgeDownloadUrl = this.bridgeUrlPattern.replace(\"$version\", version);\n bridgeDownloadUrl = bridgeDownloadUrl.replace(\"$version\", version);\n if (osName === \"darwin\") {\n const isValidVersionForARM = semver_1.default.gte(version, constants.MIN_SUPPORTED_SYNOPSYS_BRIDGE_MAC_ARM_VERSION);\n let osSuffix = constants.MAC_INTEL_PLATFORM;\n if (isValidVersionForARM) {\n const cpuInfo = os_1.default.cpus();\n taskLib.debug(`cpuInfo :: ${JSON.stringify(cpuInfo)}`);\n const isIntel = cpuInfo[0].model.includes(\"Intel\");\n osSuffix = isIntel\n ? constants.MAC_INTEL_PLATFORM\n : constants.MAC_ARM_PLATFORM;\n }\n bridgeDownloadUrl = bridgeDownloadUrl.replace(\"$platform\", osSuffix);\n }\n else if (osName === \"linux\") {\n bridgeDownloadUrl = bridgeDownloadUrl.replace(\"$platform\", constants.LINUX_PLATFORM);\n }\n else if (osName === \"win32\") {\n bridgeDownloadUrl = bridgeDownloadUrl.replace(\"$platform\", constants.WINDOWS_PLATFORM);\n }\n return bridgeDownloadUrl;\n }\n getLatestVersionUrl() {\n const osName = process.platform;\n let bridgeDownloadUrl = this.bridgeUrlLatestPattern;\n if (osName === \"darwin\") {\n const cpuInfo = os_1.default.cpus();\n taskLib.debug(`cpuInfo :: ${JSON.stringify(cpuInfo)}`);\n const isIntel = cpuInfo[0].model.includes(\"Intel\");\n const osSuffix = isIntel\n ? constants.MAC_INTEL_PLATFORM\n : constants.MAC_ARM_PLATFORM;\n bridgeDownloadUrl = bridgeDownloadUrl.replace(\"$platform\", osSuffix);\n }\n else if (osName === \"linux\") {\n bridgeDownloadUrl = bridgeDownloadUrl.replace(\"$platform\", constants.LINUX_PLATFORM);\n }\n else if (osName === \"win32\") {\n bridgeDownloadUrl = bridgeDownloadUrl.replace(\"$platform\", constants.WINDOWS_PLATFORM);\n }\n return bridgeDownloadUrl;\n }\n setBridgeExecutablePath(filePath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (process.platform === \"win32\") {\n this.bridgeExecutablePath = path.join(filePath, constants.SYNOPSYS_BRIDGE_EXECUTABLE_WINDOWS);\n }\n else if (process.platform === \"darwin\" || process.platform === \"linux\") {\n this.bridgeExecutablePath = path.join(filePath, constants.SYNOPSYS_BRIDGE_EXECUTABLE_MAC_LINUX);\n }\n return this.bridgeExecutablePath;\n });\n }\n //contains executable path with extension file\n getSynopsysBridgePath() {\n return __awaiter(this, void 0, void 0, function* () {\n let synopsysBridgeDirectoryPath = this.getBridgeDefaultPath();\n if (input_1.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY) {\n synopsysBridgeDirectoryPath = input_1.SYNOPSYS_BRIDGE_INSTALL_DIRECTORY_KEY;\n console.info(\"Looking for synopsys bridge in Synopsys Bridge Install Directory\");\n if (!taskLib.exist(synopsysBridgeDirectoryPath)) {\n throw new Error(\"Synopsys Bridge Install Directory does not exist\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.BRIDGE_INSTALL_DIRECTORY_NOT_EXIST.toString()));\n }\n }\n else {\n console.info(\"Looking for synopsys bridge in default path\");\n if (input_1.ENABLE_NETWORK_AIRGAP && this.getBridgeDefaultPath()) {\n if (!taskLib.exist(this.getBridgeDefaultPath())) {\n throw new Error(\"Synopsys Bridge default directory does not exist\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.DEFAULT_DIRECTORY_NOT_FOUND.toString()));\n }\n }\n }\n return synopsysBridgeDirectoryPath;\n });\n }\n retrySleepHelper(message, retryCountLocal, retryDelay) {\n return __awaiter(this, void 0, void 0, function* () {\n console.info(message\n .concat(String(retryCountLocal))\n .concat(\", Waiting: \")\n .concat(String(retryDelay / 1000))\n .concat(\" Seconds\"));\n yield (0, utility_1.sleep)(retryDelay);\n // Delayed exponentially starting from 15 seconds\n retryDelay = retryDelay * 2;\n return retryDelay;\n });\n }\n}\nexports.SynopsysBridge = SynopsysBridge;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SynopsysToolsParameter = void 0;\nconst path_1 = __importDefault(require(\"path\"));\nconst inputs = __importStar(require(\"./input\"));\nconst input_1 = require(\"./input\");\nconst blackduck_1 = require(\"./model/blackduck\");\nconst azure_1 = require(\"./model/azure\");\nconst constants = __importStar(require(\"./application-constant\"));\nconst taskLib = __importStar(require(\"azure-pipelines-task-lib/task\"));\nconst validator_1 = require(\"./validator\");\nconst utility_1 = require(\"./utility\");\nconst url = __importStar(require(\"url\"));\nconst azure_service_client_1 = require(\"./azure-service-client\");\nconst ErrorCodes_1 = require(\"./enum/ErrorCodes\");\nclass SynopsysToolsParameter {\n constructor(tempDir) {\n this.tempDir = tempDir;\n }\n getFormattedCommandForPolaris() {\n return __awaiter(this, void 0, void 0, function* () {\n let command = \"\";\n const assessmentTypeArray = [];\n const assessmentTypes = inputs.POLARIS_ASSESSMENT_TYPES;\n if (assessmentTypes != null && assessmentTypes.length > 0) {\n for (const assessmentType of assessmentTypes) {\n console.log(assessmentType);\n const regEx = new RegExp(\"^[a-zA-Z]+$\");\n if (assessmentType.trim().length > 0 &&\n regEx.test(assessmentType.trim())) {\n assessmentTypeArray.push(assessmentType.trim());\n }\n else {\n throw new Error(\"Invalid value for \"\n .concat(constants.POLARIS_ASSESSMENT_TYPES_KEY)\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.INVALID_POLARIS_ASSESSMENT_TYPES.toString()));\n }\n }\n }\n const azureRepositoryName = this.getAzureRepositoryName();\n let polarisApplicationName = inputs.POLARIS_APPLICATION_NAME;\n if (!polarisApplicationName) {\n polarisApplicationName = azureRepositoryName;\n taskLib.debug(`POLARIS_APPLICATION_NAME: ${polarisApplicationName}`);\n }\n let polarisProjectName = inputs.POLARIS_PROJECT_NAME;\n if (!polarisProjectName) {\n polarisProjectName = azureRepositoryName;\n taskLib.debug(`POLARIS_PROJECT_NAME: ${polarisProjectName}`);\n }\n let polData = {\n data: {\n polaris: {\n accesstoken: inputs.POLARIS_ACCESS_TOKEN,\n serverUrl: inputs.POLARIS_SERVER_URL,\n application: { name: polarisApplicationName },\n project: { name: polarisProjectName },\n assessment: Object.assign({ types: assessmentTypeArray }, (inputs.POLARIS_ASSESSMENT_MODE && {\n mode: inputs.POLARIS_ASSESSMENT_MODE,\n })),\n branch: { parent: {} },\n },\n },\n };\n if (inputs.POLARIS_BRANCH_NAME) {\n polData.data.polaris.branch.name = inputs.POLARIS_BRANCH_NAME;\n }\n if (inputs.POLARIS_TRIAGE) {\n polData.data.polaris.triage = inputs.POLARIS_TRIAGE;\n }\n if (inputs.POLARIS_TEST_SCA_TYPE) {\n polData.data.polaris.test = {\n sca: {\n type: inputs.POLARIS_TEST_SCA_TYPE,\n },\n };\n }\n if (inputs.POLARIS_PROJECT_DIRECTORY ||\n inputs.PROJECT_SOURCE_ARCHIVE ||\n inputs.PROJECT_SOURCE_EXCLUDES ||\n (0, utility_1.parseToBoolean)(inputs.PROJECT_SOURCE_PRESERVE_SYM_LINKS)) {\n polData.data.project = {};\n if (inputs.POLARIS_PROJECT_DIRECTORY) {\n polData.data.project.directory = inputs.POLARIS_PROJECT_DIRECTORY;\n }\n if (inputs.PROJECT_SOURCE_ARCHIVE ||\n inputs.PROJECT_SOURCE_EXCLUDES ||\n (0, utility_1.parseToBoolean)(inputs.PROJECT_SOURCE_PRESERVE_SYM_LINKS)) {\n polData.data.project.source = {};\n if (inputs.PROJECT_SOURCE_ARCHIVE) {\n polData.data.project.source.archive = inputs.PROJECT_SOURCE_ARCHIVE;\n }\n if ((0, utility_1.parseToBoolean)(inputs.PROJECT_SOURCE_PRESERVE_SYM_LINKS)) {\n polData.data.project.source.preserveSymLinks = true;\n }\n if (inputs.PROJECT_SOURCE_EXCLUDES) {\n const sourceExcludes = inputs.PROJECT_SOURCE_EXCLUDES.filter((sourceExclude) => sourceExclude && sourceExclude.trim() !== \"\").map((sourceExclude) => sourceExclude.trim());\n if (sourceExcludes.length > 0) {\n polData.data.project.source.excludes = sourceExcludes;\n }\n }\n }\n }\n // Set Coverity or Blackduck Arbitrary Arguments\n polData.data.coverity = this.setCoverityArbitraryArgs();\n polData.data.blackduck = this.setBlackDuckArbitraryArgs();\n const azureData = this.getAzureRepoInfo();\n const isPrCommentEnabled = (0, utility_1.parseToBoolean)(inputs.POLARIS_PR_COMMENT_ENABLED);\n const azurePrResponse = yield this.updateAzurePrNumberForManualTriggerFlow(azureData, isPrCommentEnabled);\n const isPullRequest = (0, utility_1.isPullRequestEvent)(azurePrResponse);\n if (isPrCommentEnabled) {\n if (!isPullRequest) {\n console.info(\"Polaris PR comment is ignored for non pull request scan\");\n }\n else {\n console.info(\"Polaris PR comment is enabled\");\n if (inputs.POLARIS_BRANCH_PARENT_NAME) {\n polData.data.polaris.branch.parent.name =\n inputs.POLARIS_BRANCH_PARENT_NAME;\n }\n polData.data.azure = this.setAzureData(\"\", input_1.AZURE_TOKEN, \"\", \"\", \"\", \"\", \"\");\n polData.data.polaris.prcomment = { severities: [], enabled: true };\n if (inputs.POLARIS_PR_COMMENT_SEVERITIES) {\n polData.data.polaris.prcomment.severities =\n inputs.POLARIS_PR_COMMENT_SEVERITIES.filter((severity) => severity);\n }\n }\n }\n if ((0, utility_1.parseToBoolean)(inputs.POLARIS_REPORTS_SARIF_CREATE)) {\n if (!isPullRequest) {\n polData.data.polaris.reports = this.setSarifReportsInputsForPolaris();\n }\n else {\n console.info(\"Polaris SARIF report create/upload is ignored for pull request scan\");\n }\n }\n // Remove empty data from json object\n polData = (0, utility_1.filterEmptyData)(polData);\n const inputJson = JSON.stringify(polData);\n let stateFilePath = path_1.default.join(this.tempDir, SynopsysToolsParameter.POLARIS_STATE_FILE_NAME);\n taskLib.writeFile(stateFilePath, inputJson);\n // Wrap the file path with double quotes, to make it work with directory path with space as well\n stateFilePath = '\"'.concat(stateFilePath).concat('\"');\n taskLib.debug(\"Generated state json file at - \".concat(stateFilePath));\n command = SynopsysToolsParameter.STAGE_OPTION.concat(SynopsysToolsParameter.SPACE)\n .concat(SynopsysToolsParameter.POLARIS_STAGE)\n .concat(SynopsysToolsParameter.SPACE)\n .concat(SynopsysToolsParameter.INPUT_OPTION)\n .concat(SynopsysToolsParameter.SPACE)\n .concat(stateFilePath)\n .concat(SynopsysToolsParameter.SPACE);\n return command;\n });\n }\n getFormattedCommandForBlackduck() {\n return __awaiter(this, void 0, void 0, function* () {\n const failureSeverities = inputs.BLACKDUCK_SCAN_FAILURE_SEVERITIES;\n let command = \"\";\n let blackduckData = {\n data: {\n blackduck: {\n url: inputs.BLACKDUCK_URL,\n token: inputs.BLACKDUCK_API_TOKEN,\n },\n },\n };\n if (inputs.BLACKDUCK_PROJECT_DIRECTORY) {\n blackduckData.data.project = {\n directory: inputs.BLACKDUCK_PROJECT_DIRECTORY,\n };\n }\n if (inputs.BLACKDUCK_INSTALL_DIRECTORY) {\n blackduckData.data.blackduck.install = {\n directory: inputs.BLACKDUCK_INSTALL_DIRECTORY,\n };\n }\n if (inputs.BLACKDUCK_SCAN_FULL) {\n if (inputs.BLACKDUCK_SCAN_FULL.toLowerCase() === \"true\" ||\n inputs.BLACKDUCK_SCAN_FULL.toLowerCase() === \"false\") {\n const scanFullValue = inputs.BLACKDUCK_SCAN_FULL.toLowerCase() === \"true\";\n blackduckData.data.blackduck.scan = { full: scanFullValue };\n }\n else {\n throw new Error(\"Missing boolean value for \"\n .concat(constants.BLACKDUCK_SCAN_FULL_KEY)\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.MISSING_BOOLEAN_VALUE.toString()));\n }\n }\n // Set arbitrary (To support both BlackDuck and Polaris)\n blackduckData.data.blackduck = Object.assign({}, this.setBlackDuckArbitraryArgs(), blackduckData.data.blackduck);\n if (failureSeverities && failureSeverities.length > 0) {\n (0, validator_1.validateBlackduckFailureSeverities)(failureSeverities);\n const failureSeverityEnums = [];\n const values = [];\n Object.keys(blackduck_1.BLACKDUCK_SCAN_FAILURE_SEVERITIES).map(function (key) {\n values.push(blackduck_1.BLACKDUCK_SCAN_FAILURE_SEVERITIES[key]);\n });\n for (const failureSeverity of failureSeverities) {\n if (values.indexOf(failureSeverity) == -1) {\n throw new Error(\"Invalid value for \"\n .concat(constants.BLACKDUCK_SCAN_FAILURE_SEVERITIES_KEY)\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.INVALID_BLACKDUCK_FAILURE_SEVERITIES.toString()));\n }\n else {\n failureSeverityEnums.push(blackduck_1.BLACKDUCK_SCAN_FAILURE_SEVERITIES[failureSeverity]);\n }\n }\n if (blackduckData.data.blackduck.scan) {\n blackduckData.data.blackduck.scan.failure = {\n severities: failureSeverityEnums,\n };\n }\n else {\n blackduckData.data.blackduck.scan = {\n failure: { severities: failureSeverityEnums },\n };\n }\n }\n const azureData = this.getAzureRepoInfo();\n const isPrCommentEnabled = (0, utility_1.parseToBoolean)(inputs.BLACKDUCK_AUTOMATION_PRCOMMENT);\n const isFixPrEnabled = (0, utility_1.parseToBoolean)(inputs.BLACKDUCK_FIXPR_ENABLED);\n const azurePrResponse = yield this.updateAzurePrNumberForManualTriggerFlow(azureData, isPrCommentEnabled || isFixPrEnabled);\n const isPullRequest = (0, utility_1.isPullRequestEvent)(azurePrResponse);\n // Check and put environment variable for fix pull request\n if (isFixPrEnabled) {\n if (isPullRequest) {\n console.info(\"Black Duck Fix PR ignored for pull request scan\");\n }\n else {\n console.log(\"Black Duck Fix PR is enabled\");\n blackduckData.data.blackduck.fixpr = this.setBlackDuckFixPrInputs();\n blackduckData.data.azure = azureData;\n }\n }\n if (isPrCommentEnabled) {\n if (!isPullRequest) {\n console.info(\"Black Duck PR comment is ignored for non pull request scan\");\n }\n else {\n console.info(\"BlackDuck PR comment is enabled\");\n blackduckData.data.azure = azureData;\n blackduckData.data.environment = this.setEnvironmentScanPullData();\n blackduckData.data.blackduck.automation = { prcomment: true };\n blackduckData.data;\n }\n }\n if ((0, utility_1.parseToBoolean)(inputs.ENABLE_NETWORK_AIRGAP)) {\n blackduckData.data.network = { airGap: true };\n }\n if ((0, utility_1.parseToBoolean)(inputs.BLACKDUCK_REPORTS_SARIF_CREATE)) {\n if (!isPullRequest) {\n blackduckData.data.blackduck.reports =\n this.setSarifReportsInputsForBlackduck();\n }\n else {\n console.info(\"Black Duck SARIF report create/upload is ignored for pull request scan\");\n }\n }\n // Remove empty data from json object\n blackduckData = (0, utility_1.filterEmptyData)(blackduckData);\n const inputJson = JSON.stringify(blackduckData);\n let stateFilePath = path_1.default.join(this.tempDir, SynopsysToolsParameter.BD_STATE_FILE_NAME);\n taskLib.writeFile(stateFilePath, inputJson);\n // Wrap the file path with double quotes, to make it work with directory path with space as well\n stateFilePath = '\"'.concat(stateFilePath).concat('\"');\n taskLib.debug(\"Generated state json file at - \".concat(stateFilePath));\n command = SynopsysToolsParameter.STAGE_OPTION.concat(SynopsysToolsParameter.SPACE)\n .concat(SynopsysToolsParameter.BLACKDUCK_STAGE)\n .concat(SynopsysToolsParameter.SPACE)\n .concat(SynopsysToolsParameter.INPUT_OPTION)\n .concat(SynopsysToolsParameter.SPACE)\n .concat(stateFilePath)\n .concat(SynopsysToolsParameter.SPACE);\n return command;\n });\n }\n getFormattedCommandForCoverity() {\n return __awaiter(this, void 0, void 0, function* () {\n let command = \"\";\n const azureRepositoryName = this.getAzureRepositoryName();\n let coverityProjectName = inputs.COVERITY_PROJECT_NAME;\n if (!coverityProjectName) {\n coverityProjectName = azureRepositoryName;\n taskLib.debug(`COVERITY_PROJECT_NAME: ${coverityProjectName}`);\n }\n const azureData = this.getAzureRepoInfo();\n const isPrCommentEnabled = (0, utility_1.parseToBoolean)(inputs.COVERITY_AUTOMATION_PRCOMMENT);\n const azurePrResponse = yield this.updateAzurePrNumberForManualTriggerFlow(azureData, isPrCommentEnabled);\n const isPullRequest = (0, utility_1.isPullRequestEvent)(azurePrResponse);\n let coverityStreamName = inputs.COVERITY_STREAM_NAME;\n if (!coverityStreamName) {\n if (isPullRequest) {\n const pullRequestTargetBranchName = taskLib.getVariable(azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_PULL_REQUEST_TARGET_BRANCH) ||\n (azurePrResponse === null || azurePrResponse === void 0 ? void 0 : azurePrResponse.targetRefName) ||\n \"\";\n coverityStreamName =\n azureRepositoryName && pullRequestTargetBranchName\n ? azureRepositoryName\n .concat(\"-\")\n .concat((0, utility_1.extractBranchName)(pullRequestTargetBranchName))\n : \"\";\n }\n else {\n const buildReason = taskLib.getVariable(azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_BUILD_REASON) ||\n \"\";\n if (buildReason === azure_1.AZURE_BUILD_REASON.MANUAL) {\n throw new Error(\"COVERITY_STREAM_NAME is mandatory for azure manual trigger\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.REQUIRED_COVERITY_STREAM_NAME_FOR_MANUAL_TRIGGER.toString()));\n }\n const sourceBranchName = taskLib.getVariable(azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_SOURCE_BRANCH) || \"\";\n coverityStreamName =\n azureRepositoryName && sourceBranchName\n ? azureRepositoryName\n .concat(\"-\")\n .concat((0, utility_1.extractBranchName)(sourceBranchName))\n : \"\";\n }\n taskLib.debug(`COVERITY_STREAM_NAME: ${coverityStreamName}`);\n }\n let covData = {\n data: {\n coverity: {\n connect: {\n user: {\n name: inputs.COVERITY_USER,\n password: inputs.COVERITY_USER_PASSWORD,\n },\n url: inputs.COVERITY_URL,\n project: { name: coverityProjectName },\n stream: { name: coverityStreamName },\n },\n },\n },\n };\n if ((0, utility_1.parseToBoolean)(inputs.COVERITY_LOCAL)) {\n covData.data.coverity.local = true;\n }\n if (inputs.COVERITY_INSTALL_DIRECTORY) {\n if ((0, validator_1.validateCoverityInstallDirectoryParam)(inputs.COVERITY_INSTALL_DIRECTORY)) {\n covData.data.coverity.install = {\n directory: inputs.COVERITY_INSTALL_DIRECTORY,\n };\n }\n }\n if (inputs.COVERITY_POLICY_VIEW) {\n covData.data.coverity.connect.policy = {\n view: inputs.COVERITY_POLICY_VIEW,\n };\n }\n if (inputs.COVERITY_PROJECT_DIRECTORY) {\n covData.data.project = {\n directory: inputs.COVERITY_PROJECT_DIRECTORY,\n };\n }\n if (isPrCommentEnabled) {\n if (!isPullRequest) {\n console.info(\"Coverity PR comment is ignored for non pull request scan\");\n }\n else {\n console.info(\"Coverity PR comment is enabled\");\n covData.data.azure = azureData;\n covData.data.environment = this.setEnvironmentScanPullData();\n covData.data.coverity.automation = { prcomment: true };\n }\n }\n if (inputs.COVERITY_VERSION) {\n covData.data.coverity.version = inputs.COVERITY_VERSION;\n }\n if ((0, utility_1.parseToBoolean)(inputs.ENABLE_NETWORK_AIRGAP)) {\n covData.data.coverity.network = { airGap: true };\n }\n // Set arbitrary (To support both Coverity and Polaris)\n covData.data.coverity = Object.assign({}, this.setCoverityArbitraryArgs(), covData.data.coverity);\n // Remove empty data from json object\n covData = (0, utility_1.filterEmptyData)(covData);\n const inputJson = JSON.stringify(covData);\n let stateFilePath = path_1.default.join(this.tempDir, SynopsysToolsParameter.COVERITY_STATE_FILE_NAME);\n taskLib.writeFile(stateFilePath, inputJson);\n // Wrap the file path with double quotes, to make it work with directory path with space as well\n stateFilePath = '\"'.concat(stateFilePath).concat('\"');\n taskLib.debug(\"Generated state json file at - \".concat(stateFilePath));\n command = SynopsysToolsParameter.STAGE_OPTION.concat(SynopsysToolsParameter.SPACE)\n .concat(SynopsysToolsParameter.COVERITY_STAGE)\n .concat(SynopsysToolsParameter.SPACE)\n .concat(SynopsysToolsParameter.INPUT_OPTION)\n .concat(SynopsysToolsParameter.SPACE)\n .concat(stateFilePath)\n .concat(SynopsysToolsParameter.SPACE);\n return command;\n });\n }\n setBlackDuckFixPrInputs() {\n if (inputs.BLACKDUCK_FIXPR_MAXCOUNT &&\n isNaN(Number(inputs.BLACKDUCK_FIXPR_MAXCOUNT))) {\n throw new Error(\"Invalid value for \"\n .concat(constants.BLACKDUCK_FIXPR_MAXCOUNT_KEY)\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.INVALID_BLACKDUCK_FIXPR_MAXCOUNT.toString()));\n }\n const createSinglePr = (0, utility_1.parseToBoolean)(inputs.BLACKDUCK_FIXPR_CREATE_SINGLE_PR);\n if (createSinglePr && inputs.BLACKDUCK_FIXPR_MAXCOUNT) {\n throw new Error(constants.BLACKDUCK_FIXPR_MAXCOUNT_KEY.concat(\" is not applicable with \")\n .concat(constants.BLACKDUCK_FIXPR_CREATE_SINGLE_PR_KEY)\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.BLACKDUCK_FIXPR_MAX_COUNT_NOT_APPLICABLE.toString()));\n }\n const blackDuckFixPrData = {};\n blackDuckFixPrData.enabled = true;\n blackDuckFixPrData.createSinglePR = createSinglePr;\n if (inputs.BLACKDUCK_FIXPR_MAXCOUNT && !createSinglePr) {\n blackDuckFixPrData.maxCount = Number(inputs.BLACKDUCK_FIXPR_MAXCOUNT);\n }\n if (inputs.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE &&\n inputs.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE.length > 0) {\n blackDuckFixPrData.useUpgradeGuidance =\n inputs.BLACKDUCK_FIXPR_UPGRADE_GUIDANCE;\n }\n const fixPRFilterSeverities = [];\n if (inputs.BLACKDUCK_FIXPR_FILTER_SEVERITIES &&\n inputs.BLACKDUCK_FIXPR_FILTER_SEVERITIES != null &&\n inputs.BLACKDUCK_FIXPR_FILTER_SEVERITIES.length > 0) {\n for (const fixPrSeverity of inputs.BLACKDUCK_FIXPR_FILTER_SEVERITIES) {\n if (fixPrSeverity != null && fixPrSeverity.trim() !== \"\") {\n fixPRFilterSeverities.push(fixPrSeverity.trim());\n }\n }\n }\n if (fixPRFilterSeverities.length > 0) {\n blackDuckFixPrData.filter = { severities: fixPRFilterSeverities };\n }\n return blackDuckFixPrData;\n }\n getFormattedCommandForSrm() {\n return __awaiter(this, void 0, void 0, function* () {\n let command = \"\";\n const assessmentTypeArray = [];\n const assessmentTypes = inputs.SRM_ASSESSMENT_TYPES;\n if (assessmentTypes != null && assessmentTypes.length > 0) {\n for (const assessmentType of assessmentTypes) {\n const regEx = new RegExp(\"^[a-zA-Z]+$\");\n if (assessmentType.trim().length > 0 &&\n regEx.test(assessmentType.trim())) {\n assessmentTypeArray.push(assessmentType.trim());\n }\n else {\n throw new Error(\"Invalid value for \"\n .concat(constants.SRM_ASSESSMENT_TYPES_KEY)\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.INVALID_SRM_ASSESSMENT_TYPES.toString()));\n }\n }\n }\n let srmData = {\n data: {\n srm: {\n url: inputs.SRM_URL,\n apikey: inputs.SRM_APIKEY,\n assessment: {\n types: assessmentTypeArray,\n },\n },\n },\n };\n if (inputs.SRM_BRANCH_NAME || inputs.SRM_BRANCH_PARENT) {\n srmData.data.srm.branch = Object.assign(Object.assign({}, (inputs.SRM_BRANCH_NAME && { name: inputs.SRM_BRANCH_NAME })), (inputs.SRM_BRANCH_PARENT && { parent: inputs.SRM_BRANCH_PARENT }));\n }\n if (inputs.SRM_PROJECT_NAME || inputs.SRM_PROJECT_ID) {\n srmData.data.srm.project = Object.assign(Object.assign({}, (inputs.SRM_PROJECT_NAME && { name: inputs.SRM_PROJECT_NAME })), (inputs.SRM_PROJECT_ID && { id: inputs.SRM_PROJECT_ID }));\n }\n else {\n const azureRepositoryName = this.getAzureRepositoryName();\n taskLib.debug(`SRM project name: ${azureRepositoryName}`);\n srmData.data.srm.project = {\n name: azureRepositoryName,\n };\n }\n if (inputs.BLACKDUCK_EXECUTION_PATH) {\n srmData.data.blackduck = {\n execution: {\n path: inputs.BLACKDUCK_EXECUTION_PATH,\n },\n };\n }\n if (inputs.COVERITY_EXECUTION_PATH) {\n srmData.data.coverity = {\n execution: {\n path: inputs.COVERITY_EXECUTION_PATH,\n },\n };\n }\n if (inputs.SRM_PROJECT_DIRECTORY) {\n srmData.data.project = {\n directory: inputs.SRM_PROJECT_DIRECTORY,\n };\n }\n // Set Coverity or Blackduck Arbitrary Arguments\n const coverityArgs = this.setCoverityArbitraryArgs();\n const blackduckArgs = this.setBlackDuckArbitraryArgs();\n if (Object.keys(coverityArgs).length > 0) {\n srmData.data.coverity = Object.assign(Object.assign({}, srmData.data.coverity), coverityArgs);\n }\n if (Object.keys(blackduckArgs).length > 0) {\n srmData.data.blackduck = Object.assign(Object.assign({}, srmData.data.blackduck), blackduckArgs);\n }\n // Remove empty data from json object\n srmData = (0, utility_1.filterEmptyData)(srmData);\n const inputJson = JSON.stringify(srmData);\n let stateFilePath = path_1.default.join(this.tempDir, SynopsysToolsParameter.SRM_STATE_FILE_NAME);\n taskLib.writeFile(stateFilePath, inputJson);\n // Wrap the file path with double quotes, to make it work with directory path with space as well\n stateFilePath = '\"'.concat(stateFilePath).concat('\"');\n taskLib.debug(\"Generated state json file at - \".concat(stateFilePath));\n command = SynopsysToolsParameter.STAGE_OPTION.concat(SynopsysToolsParameter.SPACE)\n .concat(SynopsysToolsParameter.SRM_STAGE)\n .concat(SynopsysToolsParameter.SPACE)\n .concat(SynopsysToolsParameter.INPUT_OPTION)\n .concat(SynopsysToolsParameter.SPACE)\n .concat(stateFilePath)\n .concat(SynopsysToolsParameter.SPACE);\n return command;\n });\n }\n getAzureRepoInfo() {\n var _a;\n let azureOrganization = \"\";\n const azureToken = input_1.AZURE_TOKEN;\n let azureInstanceUrl = \"\";\n const collectionUri = taskLib.getVariable(azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_ORGANIZATION) || \"\";\n taskLib.debug(`Azure API URL, obtained from the environment variable ${azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_ORGANIZATION}, is: ${collectionUri}`);\n if (collectionUri != \"\") {\n const parsedUrl = url.parse(collectionUri);\n azureInstanceUrl = `${parsedUrl.protocol}//${parsedUrl.host}`;\n azureOrganization = ((_a = parsedUrl.pathname) === null || _a === void 0 ? void 0 : _a.split(\"/\")[1]) || \"\";\n if (parsedUrl.host &&\n !azureOrganization &&\n parsedUrl.host.indexOf(\".visualstudio.com\") !== -1) {\n if (parsedUrl.host.split(\".\")[0]) {\n azureOrganization = parsedUrl.host.split(\".\")[0];\n azureInstanceUrl = constants.DEFAULT_AZURE_API_URL;\n }\n }\n }\n taskLib.debug(\"Azure organization name:\".concat(azureOrganization));\n const azureProject = taskLib.getVariable(azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_PROJECT) || \"\";\n taskLib.debug(`Azure project, obtained from the environment variable ${azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_PROJECT}, is: ${azureProject}`);\n const azureRepo = taskLib.getVariable(azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_REPOSITORY) || \"\";\n taskLib.debug(`Azure repo, obtained from the environment variable ${azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_REPOSITORY}, is: ${azureProject}`);\n const buildReason = taskLib.getVariable(azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_BUILD_REASON) || \"\";\n taskLib.debug(`Build Reason: ${buildReason}`);\n const azureRepoBranchName = buildReason == azure_1.AZURE_BUILD_REASON.PULL_REQUEST\n ? taskLib.getVariable(azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_PULL_REQUEST_SOURCE_BRANCH) || \"\"\n : taskLib.getVariable(azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_SOURCE_BRANCH) || \"\";\n taskLib.debug(`Azure repo branch name: ${azureProject}`);\n const azurePullRequestNumber = taskLib.getVariable(azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_PULL_REQUEST_NUMBER) || \"\";\n taskLib.debug(`Azure pull request number, obtained from the environment variable ${azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_PULL_REQUEST_NUMBER}, is: ${azurePullRequestNumber}`);\n taskLib.debug(`Azure Instance Url: ${azureInstanceUrl}`);\n taskLib.debug(`Azure Organization: ${azureOrganization}`);\n taskLib.debug(`Azure Project Name: ${azureProject}`);\n taskLib.debug(`Azure Repository Name: ${azureRepo}`);\n taskLib.debug(`Azure Repository Branch Name: ${azureRepoBranchName}`);\n taskLib.debug(`Azure Pull Request Number: ${azurePullRequestNumber}`);\n return this.setAzureData(azureInstanceUrl, azureToken, azureOrganization, azureProject, azureRepo, azureRepoBranchName, azurePullRequestNumber);\n }\n updateAzurePrNumberForManualTriggerFlow(azureData, isPrCommentOrFixPrEnabled) {\n return __awaiter(this, void 0, void 0, function* () {\n let azurePrResponse;\n if (isPrCommentOrFixPrEnabled) {\n if ((azureData === null || azureData === void 0 ? void 0 : azureData.user.token) == undefined || azureData.user.token == \"\") {\n throw new Error(\"Missing required azure token for fix pull request/automation comment\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.MISSING_AZURE_TOKEN.toString()));\n }\n if (azureData && azureData.repository.pull.number === 0) {\n const synopsysAzureService = new azure_service_client_1.SynopsysAzureService();\n azurePrResponse =\n yield synopsysAzureService.getAzurePrResponseForManualTriggerFlow(azureData);\n azureData.repository.pull.number = azurePrResponse === null || azurePrResponse === void 0 ? void 0 : azurePrResponse.pullRequestId;\n taskLib.debug(`Azure pull request number for manual trigger flow: ${azureData.repository.pull.number}`);\n }\n }\n return azurePrResponse;\n });\n }\n setAzureData(azureInstanceUrl, azureToken, azureOrganization, azureProject, azureRepo, azureRepoBranchName, azurePullRequestNumber) {\n const azureData = {\n api: {\n url: azureInstanceUrl,\n },\n user: {\n token: azureToken,\n },\n organization: {\n name: azureOrganization,\n },\n project: {\n name: azureProject,\n },\n repository: {\n name: azureRepo,\n branch: {\n name: azureRepoBranchName,\n },\n pull: {},\n },\n };\n if (azurePullRequestNumber != null) {\n azureData.repository.pull.number = Number(azurePullRequestNumber);\n }\n return azureData;\n }\n setEnvironmentScanPullData() {\n const azurePullRequestNumber = taskLib.getVariable(azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_PULL_REQUEST_NUMBER) || \"\";\n taskLib.debug(`Azure Pull Request Number: ${azurePullRequestNumber}`);\n if (azurePullRequestNumber == \"\") {\n taskLib.debug(\"azurePullRequestNumber is empty, setting environment.scan.pull as true\");\n const environment = {\n scan: {\n pull: true,\n },\n };\n return environment;\n }\n return {};\n }\n setSarifReportsInputsForBlackduck() {\n const reportData = {\n sarif: {\n create: true,\n },\n };\n if (inputs.BLACKDUCK_URL && inputs.BLACKDUCK_REPORTS_SARIF_FILE_PATH) {\n reportData.sarif.file = {\n path: inputs.BLACKDUCK_REPORTS_SARIF_FILE_PATH,\n };\n }\n const sarifReportFilterSeverities = [];\n if (inputs.BLACKDUCK_URL &&\n inputs.BLACKDUCK_REPORTS_SARIF_SEVERITIES &&\n inputs.BLACKDUCK_REPORTS_SARIF_SEVERITIES.length > 0) {\n const sarifSeverities = inputs.BLACKDUCK_REPORTS_SARIF_SEVERITIES.filter((severity) => severity && severity.trim() !== \"\").map((severity) => severity.trim());\n sarifReportFilterSeverities.push(...sarifSeverities);\n }\n if (sarifReportFilterSeverities.length > 0) {\n reportData.sarif.severities = sarifReportFilterSeverities;\n }\n const groupSCAIssues = inputs.BLACKDUCK_REPORTS_SARIF_GROUP_SCA_ISSUES;\n if (inputs.BLACKDUCK_URL && (0, utility_1.isBoolean)(groupSCAIssues)) {\n if (groupSCAIssues !== undefined) {\n reportData.sarif.groupSCAIssues = JSON.parse(groupSCAIssues);\n }\n }\n return reportData;\n }\n setSarifReportsInputsForPolaris() {\n const reportData = {\n sarif: {\n create: true,\n },\n };\n if (inputs.POLARIS_SERVER_URL && inputs.POLARIS_REPORTS_SARIF_FILE_PATH) {\n reportData.sarif.file = {\n path: inputs.POLARIS_REPORTS_SARIF_FILE_PATH,\n };\n }\n const sarifReportFilterSeverities = [];\n if (inputs.POLARIS_SERVER_URL &&\n inputs.POLARIS_REPORTS_SARIF_SEVERITIES &&\n inputs.POLARIS_REPORTS_SARIF_SEVERITIES.length > 0) {\n const severities = inputs.POLARIS_REPORTS_SARIF_SEVERITIES.filter((severity) => severity && severity.trim() !== \"\").map((severity) => severity.trim());\n sarifReportFilterSeverities.push(...severities);\n }\n if (sarifReportFilterSeverities.length > 0) {\n reportData.sarif.severities = sarifReportFilterSeverities;\n }\n const groupSCAIssues = inputs.POLARIS_REPORTS_SARIF_GROUP_SCA_ISSUES;\n if (inputs.POLARIS_SERVER_URL && (0, utility_1.isBoolean)(groupSCAIssues)) {\n if (groupSCAIssues !== undefined) {\n reportData.sarif.groupSCAIssues = JSON.parse(groupSCAIssues);\n }\n }\n const sarifReportIssueTypes = [];\n if (inputs.POLARIS_SERVER_URL &&\n inputs.POLARIS_REPORTS_SARIF_ISSUE_TYPES &&\n inputs.POLARIS_REPORTS_SARIF_ISSUE_TYPES.length > 0) {\n const issueTypes = inputs.POLARIS_REPORTS_SARIF_ISSUE_TYPES.filter((issueType) => issueType && issueType.trim() !== \"\").map((issueType) => issueType.trim());\n sarifReportIssueTypes.push(...issueTypes);\n }\n if (sarifReportIssueTypes.length > 0) {\n reportData.sarif.issue = { types: sarifReportIssueTypes };\n }\n return reportData;\n }\n getAzureRepositoryName() {\n const azureRepositoryName = taskLib.getVariable(azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_REPOSITORY) || \"\";\n taskLib.debug(`Azure Repository Name: ${azureRepositoryName}`);\n return azureRepositoryName;\n }\n setCoverityArbitraryArgs() {\n const covData = { data: {} };\n if (inputs.COVERITY_BUILD_COMMAND) {\n covData.data.build = {\n command: inputs.COVERITY_BUILD_COMMAND,\n };\n }\n if (inputs.COVERITY_CLEAN_COMMAND) {\n covData.data.clean = {\n command: inputs.COVERITY_CLEAN_COMMAND,\n };\n }\n if (inputs.COVERITY_CONFIG_PATH) {\n covData.data.config = {\n path: inputs.COVERITY_CONFIG_PATH,\n };\n }\n if (inputs.COVERITY_ARGS) {\n covData.data.args = inputs.COVERITY_ARGS;\n }\n return covData.data;\n }\n setBlackDuckArbitraryArgs() {\n const blackduckData = { data: {} };\n if (inputs.BLACKDUCK_SEARCH_DEPTH &&\n Number.isInteger(parseInt(inputs.BLACKDUCK_SEARCH_DEPTH))) {\n blackduckData.data.search = {\n depth: parseInt(inputs.BLACKDUCK_SEARCH_DEPTH),\n };\n }\n if (inputs.BLACKDUCK_CONFIG_PATH) {\n blackduckData.data.config = {\n path: inputs.BLACKDUCK_CONFIG_PATH,\n };\n }\n if (inputs.BLACKDUCK_ARGS) {\n blackduckData.data.args = inputs.BLACKDUCK_ARGS;\n }\n return blackduckData.data;\n }\n}\nSynopsysToolsParameter.STAGE_OPTION = \"--stage\";\nSynopsysToolsParameter.BLACKDUCK_STAGE = \"blackduck\";\nSynopsysToolsParameter.BD_STATE_FILE_NAME = \"bd_input.json\";\nSynopsysToolsParameter.INPUT_OPTION = \"--input\";\nSynopsysToolsParameter.POLARIS_STAGE = \"polaris\";\nSynopsysToolsParameter.POLARIS_STATE_FILE_NAME = \"polaris_input.json\";\nSynopsysToolsParameter.SPACE = \" \";\nSynopsysToolsParameter.COVERITY_STATE_FILE_NAME = \"coverity_input.json\";\nSynopsysToolsParameter.COVERITY_STAGE = \"connect\";\nSynopsysToolsParameter.DIAGNOSTICS_OPTION = \"--diagnostics\";\nSynopsysToolsParameter.SRM_STAGE = \"srm\";\nSynopsysToolsParameter.SRM_STATE_FILE_NAME = \"srm_input.json\";\nexports.SynopsysToolsParameter = SynopsysToolsParameter;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getMappedTaskResult = exports.equalsIgnoreCase = exports.getStatusCode = exports.extractBranchName = exports.isPullRequestEvent = exports.IS_PR_EVENT = exports.filterEmptyData = exports.getDefaultSarifReportPath = exports.sleep = exports.getWorkSpaceDirectory = exports.isBoolean = exports.parseToBoolean = exports.getRemoteFile = exports.extractZipped = exports.getTempDir = exports.cleanUrl = void 0;\nconst path_1 = __importDefault(require(\"path\"));\nconst constants = __importStar(require(\"./application-constant\"));\nconst application_constant_1 = require(\"./application-constant\");\nconst toolLib = __importStar(require(\"azure-pipelines-tool-lib\"));\nconst toolLibLocal = __importStar(require(\"../synopsys-task/download-tool\"));\nconst process = __importStar(require(\"process\"));\nconst taskLib = __importStar(require(\"azure-pipelines-task-lib/task\"));\nconst task_1 = require(\"azure-pipelines-task-lib/task\");\nconst azure_1 = require(\"./model/azure\");\nconst ErrorCodes_1 = require(\"./enum/ErrorCodes\");\nconst BuildStatus_1 = require(\"./enum/BuildStatus\");\nfunction cleanUrl(url) {\n if (url && url.endsWith(\"/\")) {\n return url.slice(0, url.length - 1);\n }\n return url;\n}\nexports.cleanUrl = cleanUrl;\nfunction getTempDir() {\n return process.env[\"AGENT_TEMPDIRECTORY\"] || \"\";\n}\nexports.getTempDir = getTempDir;\nfunction extractZipped(file, destinationPath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (file == null || file.length === 0) {\n return Promise.reject(new Error(\"File does not exist\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.FILE_DOES_NOT_EXIST.toString())));\n }\n // Extract file name from file with full path\n if (destinationPath == null || destinationPath.length === 0) {\n return Promise.reject(new Error(\"No destination directory found\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.NO_DESTINATION_DIRECTORY.toString())));\n }\n try {\n yield toolLib.extractZip(file, destinationPath);\n return Promise.resolve(true);\n }\n catch (error) {\n return Promise.reject(error);\n }\n });\n}\nexports.extractZipped = extractZipped;\nfunction getRemoteFile(destFilePath, url) {\n return __awaiter(this, void 0, void 0, function* () {\n if (url == null || url.length === 0) {\n return Promise.reject(new Error(\"URL cannot be empty\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_URL_CANNOT_BE_EMPTY.toString())));\n }\n let fileNameFromUrl = \"\";\n if (taskLib.stats(destFilePath).isDirectory()) {\n fileNameFromUrl = url.substring(url.lastIndexOf(\"/\") + 1);\n destFilePath = path_1.default.join(destFilePath, fileNameFromUrl || application_constant_1.SYNOPSYS_BRIDGE_ZIP_FILE_NAME);\n }\n let retryCountLocal = application_constant_1.RETRY_COUNT;\n let retryDelay = application_constant_1.RETRY_DELAY_IN_MILLISECONDS;\n do {\n try {\n const toolPath = yield toolLibLocal.downloadTool(url, destFilePath);\n return {\n filePath: toolPath,\n fileName: fileNameFromUrl,\n };\n }\n catch (err) {\n const error = err;\n if (retryCountLocal == 0) {\n throw error;\n }\n if (!application_constant_1.NON_RETRY_HTTP_CODES.has(Number(getStatusCode(error.message))) ||\n error.message.includes(\"did not match downloaded file size\")) {\n console.info(\"Synopsys Bridge download has been failed, Retries left: \"\n .concat(String(retryCountLocal))\n .concat(\", Waiting: \")\n .concat(String(retryDelay / 1000))\n .concat(\" Seconds\"));\n yield sleep(retryDelay);\n retryDelay = retryDelay * 2;\n retryCountLocal--;\n }\n else {\n retryCountLocal = 0;\n }\n }\n } while (retryCountLocal >= 0);\n return Promise.reject(\"Synopsys bridge download has been failed\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.SYNOPSYS_BRIDGE_DOWNLOAD_FAILED.toString()));\n });\n}\nexports.getRemoteFile = getRemoteFile;\nfunction parseToBoolean(value) {\n if (value &&\n value !== \"\" &&\n (value.toString().toLowerCase() === \"true\" || value === true)) {\n return true;\n }\n return false;\n}\nexports.parseToBoolean = parseToBoolean;\nfunction isBoolean(value) {\n if (value !== undefined &&\n value !== null &&\n value !== \"\" &&\n (value.toString().toLowerCase() === \"true\" ||\n value === true ||\n value.toString().toLowerCase() === \"false\" ||\n value === false)) {\n return true;\n }\n return false;\n}\nexports.isBoolean = isBoolean;\nfunction getWorkSpaceDirectory() {\n const repoLocalPath = process.env[\"BUILD_REPOSITORY_LOCALPATH\"];\n if (repoLocalPath !== undefined) {\n return repoLocalPath;\n }\n else {\n throw new Error(\"Workspace directory could not be located\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.WORKSPACE_DIRECTORY_NOT_FOUND.toString()));\n }\n}\nexports.getWorkSpaceDirectory = getWorkSpaceDirectory;\nfunction sleep(duration) {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n}\nexports.sleep = sleep;\nfunction getDefaultSarifReportPath(sarifReportDirectory, appendFilePath) {\n const pwd = getWorkSpaceDirectory();\n return !appendFilePath\n ? path_1.default.join(pwd, constants.BRIDGE_LOCAL_DIRECTORY, sarifReportDirectory)\n : path_1.default.join(pwd, constants.BRIDGE_LOCAL_DIRECTORY, sarifReportDirectory, constants.SARIF_DEFAULT_FILE_NAME);\n}\nexports.getDefaultSarifReportPath = getDefaultSarifReportPath;\nfunction filterEmptyData(data) {\n return JSON.parse(JSON.stringify(data), (key, value) => value === null ||\n value === \"\" ||\n value === 0 ||\n value.length === 0 ||\n (typeof value === \"object\" && Object.keys(value).length === 0)\n ? undefined\n : value);\n}\nexports.filterEmptyData = filterEmptyData;\n// Global variable to check PR events for uploading SARIF files in main.ts, reducing the need for current code refactoring\nexports.IS_PR_EVENT = false;\nfunction isPullRequestEvent(azurePrResponse) {\n const buildReason = taskLib.getVariable(azure_1.AZURE_ENVIRONMENT_VARIABLES.AZURE_BUILD_REASON) || \"\";\n exports.IS_PR_EVENT =\n buildReason === azure_1.AZURE_BUILD_REASON.PULL_REQUEST ||\n ((azurePrResponse === null || azurePrResponse === void 0 ? void 0 : azurePrResponse.pullRequestId) !== undefined &&\n azurePrResponse.pullRequestId > 0);\n return exports.IS_PR_EVENT;\n}\nexports.isPullRequestEvent = isPullRequestEvent;\nfunction extractBranchName(branchName) {\n const prefix = \"refs/heads/\";\n if (!branchName.startsWith(prefix)) {\n return branchName;\n }\n return branchName.substring(prefix.length);\n}\nexports.extractBranchName = extractBranchName;\n// This function extracts the status code from a given error message string.\n// Example: \"Failed to download synopsys-bridge zip from specified URL. HTTP status code: 502 124\",\n// The function will return the HTTP status code. For the above example: 502\nfunction getStatusCode(str) {\n const words = str.split(\" \");\n return words.length < 2 ? str : words[words.length - 2];\n}\nexports.getStatusCode = getStatusCode;\nfunction equalsIgnoreCase(a, b) {\n return a.toLowerCase() === b.toLowerCase();\n}\nexports.equalsIgnoreCase = equalsIgnoreCase;\nfunction getMappedTaskResult(buildStatus) {\n if (equalsIgnoreCase(buildStatus, BuildStatus_1.BuildStatus.Succeeded)) {\n return task_1.TaskResult.Succeeded;\n }\n else if (equalsIgnoreCase(buildStatus, BuildStatus_1.BuildStatus.SucceededWithIssues)) {\n return task_1.TaskResult.SucceededWithIssues;\n }\n else if (equalsIgnoreCase(buildStatus, BuildStatus_1.BuildStatus.Failed)) {\n return task_1.TaskResult.Failed;\n }\n else {\n if (buildStatus) {\n console.log(`Unsupported value for ${application_constant_1.MARK_BUILD_STATUS_KEY}: ${buildStatus}`);\n }\n return undefined;\n }\n}\nexports.getMappedTaskResult = getMappedTaskResult;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateSrmInputs = exports.validateBlackDuckInputs = exports.validateBlackduckFailureSeverities = exports.validateCoverityInstallDirectoryParam = exports.validateCoverityInputs = exports.validateBridgeUrl = exports.isNullOrEmpty = exports.validateParameters = exports.validatePolarisInputs = exports.validateScanTypes = void 0;\nconst constants = __importStar(require(\"./application-constant\"));\nconst inputs = __importStar(require(\"./input\"));\nconst taskLib = __importStar(require(\"azure-pipelines-task-lib/task\"));\nconst ErrorCodes_1 = require(\"./enum/ErrorCodes\");\nfunction validateScanTypes() {\n const paramsMap = new Map();\n paramsMap.set(constants.POLARIS_SERVER_URL_KEY, inputs.POLARIS_SERVER_URL);\n paramsMap.set(constants.BLACKDUCK_URL_KEY, inputs.BLACKDUCK_URL);\n paramsMap.set(constants.COVERITY_URL_KEY, inputs.COVERITY_URL);\n paramsMap.set(constants.SRM_URL_KEY, inputs.SRM_URL);\n return isNullOrEmpty(paramsMap);\n}\nexports.validateScanTypes = validateScanTypes;\nfunction validatePolarisInputs() {\n let errors = [];\n if (inputs.POLARIS_SERVER_URL) {\n const paramsMap = new Map();\n paramsMap.set(constants.POLARIS_ACCESS_TOKEN_KEY, inputs.POLARIS_ACCESS_TOKEN);\n paramsMap.set(constants.POLARIS_SERVER_URL_KEY, inputs.POLARIS_SERVER_URL);\n paramsMap.set(constants.POLARIS_ASSESSMENT_TYPES_KEY, inputs.POLARIS_ASSESSMENT_TYPES);\n errors = validateParameters(paramsMap, constants.POLARIS_KEY);\n }\n return errors;\n}\nexports.validatePolarisInputs = validatePolarisInputs;\nfunction validateParameters(params, toolName) {\n const invalidParams = isNullOrEmpty(params);\n const errors = [];\n if (invalidParams.length > 0) {\n errors.push(`[${invalidParams.join()}] - required parameters for ${toolName} is missing`\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.MISSING_REQUIRED_PARAMETERS.toString()));\n }\n return errors;\n}\nexports.validateParameters = validateParameters;\nfunction isNullOrEmpty(params) {\n const invalidParams = [];\n for (const param of params.entries()) {\n if (param[1] == null || param[1].length === 0) {\n invalidParams.push(param[0]);\n }\n }\n return invalidParams;\n}\nexports.isNullOrEmpty = isNullOrEmpty;\nfunction validateBridgeUrl(url) {\n if (!url.match(\".*\\\\.(zip|ZIP)$\")) {\n return false;\n }\n const osName = process.platform;\n taskLib.debug(\"osName:::\" + osName);\n const fileNameComponent = url.substring(url.lastIndexOf(\"/\"), url.length);\n if (osName === \"darwin\") {\n return fileNameComponent.toLowerCase().includes(\"mac\");\n }\n else if (osName === \"linux\") {\n return fileNameComponent.toLowerCase().includes(\"linux\");\n }\n else if (osName === \"win32\") {\n return fileNameComponent.toLowerCase().includes(\"win\");\n }\n else {\n return false;\n }\n}\nexports.validateBridgeUrl = validateBridgeUrl;\nfunction validateCoverityInputs() {\n let errors = [];\n if (inputs.COVERITY_URL) {\n const paramsMap = new Map();\n paramsMap.set(constants.COVERITY_USER_KEY, inputs.COVERITY_USER);\n paramsMap.set(constants.COVERITY_PASSPHRASE_KEY, inputs.COVERITY_USER_PASSWORD);\n paramsMap.set(constants.COVERITY_URL_KEY, inputs.COVERITY_URL);\n errors = validateParameters(paramsMap, constants.COVERITY_KEY);\n }\n return errors;\n}\nexports.validateCoverityInputs = validateCoverityInputs;\nfunction validateCoverityInstallDirectoryParam(installDir) {\n if (installDir != null &&\n installDir.length > 0 &&\n !taskLib.exist(installDir)) {\n taskLib.error(`[${constants.COVERITY_INSTALL_DIRECTORY_KEY}] parameter for Coverity is invalid`\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.INVALID_COVERITY_INSTALL_DIRECTORY.toString()));\n return false;\n }\n return true;\n}\nexports.validateCoverityInstallDirectoryParam = validateCoverityInstallDirectoryParam;\nfunction validateBlackduckFailureSeverities(severities) {\n if (severities == null || severities.length === 0) {\n taskLib.error(\"Provided value is not valid - BLACKDUCK_SCAN_FAILURE_SEVERITIES\"\n .concat(constants.SPACE)\n .concat(ErrorCodes_1.ErrorCode.INVALID_BLACKDUCK_FAILURE_SEVERITIES.toString()));\n return false;\n }\n return true;\n}\nexports.validateBlackduckFailureSeverities = validateBlackduckFailureSeverities;\nfunction validateBlackDuckInputs() {\n let errors = [];\n if (inputs.BLACKDUCK_URL) {\n const paramsMap = new Map();\n paramsMap.set(constants.BLACKDUCK_URL_KEY, inputs.BLACKDUCK_URL);\n paramsMap.set(constants.BLACKDUCK_TOKEN_KEY, inputs.BLACKDUCK_API_TOKEN);\n errors = validateParameters(paramsMap, constants.BLACKDUCK_KEY);\n }\n return errors;\n}\nexports.validateBlackDuckInputs = validateBlackDuckInputs;\nfunction validateSrmInputs() {\n let errors = [];\n if (inputs.SRM_URL) {\n const paramsMap = new Map();\n paramsMap.set(constants.SRM_URL_KEY, inputs.SRM_URL);\n paramsMap.set(constants.SRM_APIKEY_KEY, inputs.SRM_APIKEY);\n paramsMap.set(constants.SRM_ASSESSMENT_TYPES_KEY, inputs.SRM_ASSESSMENT_TYPES);\n errors = validateParameters(paramsMap, constants.SRM_KEY);\n }\n return errors;\n}\nexports.validateSrmInputs = validateSrmInputs;\n",null,"exports = module.exports = SemVer\n\nvar debug\n/* istanbul ignore next */\nif (typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)) {\n debug = function () {\n var args = Array.prototype.slice.call(arguments, 0)\n args.unshift('SEMVER')\n console.log.apply(console, args)\n }\n} else {\n debug = function () {}\n}\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0'\n\nvar MAX_LENGTH = 256\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nvar MAX_SAFE_COMPONENT_LENGTH = 16\n\nvar MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\n// The actual regexps go on exports.re\nvar re = exports.re = []\nvar safeRe = exports.safeRe = []\nvar src = exports.src = []\nvar R = 0\n\nvar LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nvar safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nfunction makeSafeRe (value) {\n for (var i = 0; i < safeRegexReplacements.length; i++) {\n var token = safeRegexReplacements[i][0]\n var max = safeRegexReplacements[i][1]\n value = value\n .split(token + '*').join(token + '{0,' + max + '}')\n .split(token + '+').join(token + '{1,' + max + '}')\n }\n return value\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\nvar NUMERICIDENTIFIER = R++\nsrc[NUMERICIDENTIFIER] = '0|[1-9]\\\\d*'\nvar NUMERICIDENTIFIERLOOSE = R++\nsrc[NUMERICIDENTIFIERLOOSE] = '\\\\d+'\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\nvar NONNUMERICIDENTIFIER = R++\nsrc[NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*'\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\nvar MAINVERSION = R++\nsrc[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIER] + ')'\n\nvar MAINVERSIONLOOSE = R++\nsrc[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIERLOOSE] + ')'\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\nvar PRERELEASEIDENTIFIER = R++\nsrc[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +\n '|' + src[NONNUMERICIDENTIFIER] + ')'\n\nvar PRERELEASEIDENTIFIERLOOSE = R++\nsrc[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +\n '|' + src[NONNUMERICIDENTIFIER] + ')'\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\nvar PRERELEASE = R++\nsrc[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[PRERELEASEIDENTIFIER] + ')*))'\n\nvar PRERELEASELOOSE = R++\nsrc[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\nvar BUILDIDENTIFIER = R++\nsrc[BUILDIDENTIFIER] = LETTERDASHNUMBER + '+'\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\nvar BUILD = R++\nsrc[BUILD] = '(?:\\\\+(' + src[BUILDIDENTIFIER] +\n '(?:\\\\.' + src[BUILDIDENTIFIER] + ')*))'\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\nvar FULL = R++\nvar FULLPLAIN = 'v?' + src[MAINVERSION] +\n src[PRERELEASE] + '?' +\n src[BUILD] + '?'\n\nsrc[FULL] = '^' + FULLPLAIN + '$'\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\nvar LOOSEPLAIN = '[v=\\\\s]*' + src[MAINVERSIONLOOSE] +\n src[PRERELEASELOOSE] + '?' +\n src[BUILD] + '?'\n\nvar LOOSE = R++\nsrc[LOOSE] = '^' + LOOSEPLAIN + '$'\n\nvar GTLT = R++\nsrc[GTLT] = '((?:<|>)?=?)'\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\nvar XRANGEIDENTIFIERLOOSE = R++\nsrc[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*'\nvar XRANGEIDENTIFIER = R++\nsrc[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\\\*'\n\nvar XRANGEPLAIN = R++\nsrc[XRANGEPLAIN] = '[v=\\\\s]*(' + src[XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIER] + ')' +\n '(?:' + src[PRERELEASE] + ')?' +\n src[BUILD] + '?' +\n ')?)?'\n\nvar XRANGEPLAINLOOSE = R++\nsrc[XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[PRERELEASELOOSE] + ')?' +\n src[BUILD] + '?' +\n ')?)?'\n\nvar XRANGE = R++\nsrc[XRANGE] = '^' + src[GTLT] + '\\\\s*' + src[XRANGEPLAIN] + '$'\nvar XRANGELOOSE = R++\nsrc[XRANGELOOSE] = '^' + src[GTLT] + '\\\\s*' + src[XRANGEPLAINLOOSE] + '$'\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\nvar COERCE = R++\nsrc[COERCE] = '(?:^|[^\\\\d])' +\n '(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:$|[^\\\\d])'\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\nvar LONETILDE = R++\nsrc[LONETILDE] = '(?:~>?)'\n\nvar TILDETRIM = R++\nsrc[TILDETRIM] = '(\\\\s*)' + src[LONETILDE] + '\\\\s+'\nre[TILDETRIM] = new RegExp(src[TILDETRIM], 'g')\nsafeRe[TILDETRIM] = new RegExp(makeSafeRe(src[TILDETRIM]), 'g')\nvar tildeTrimReplace = '$1~'\n\nvar TILDE = R++\nsrc[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'\nvar TILDELOOSE = R++\nsrc[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\nvar LONECARET = R++\nsrc[LONECARET] = '(?:\\\\^)'\n\nvar CARETTRIM = R++\nsrc[CARETTRIM] = '(\\\\s*)' + src[LONECARET] + '\\\\s+'\nre[CARETTRIM] = new RegExp(src[CARETTRIM], 'g')\nsafeRe[CARETTRIM] = new RegExp(makeSafeRe(src[CARETTRIM]), 'g')\nvar caretTrimReplace = '$1^'\n\nvar CARET = R++\nsrc[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'\nvar CARETLOOSE = R++\nsrc[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\nvar COMPARATORLOOSE = R++\nsrc[COMPARATORLOOSE] = '^' + src[GTLT] + '\\\\s*(' + LOOSEPLAIN + ')$|^$'\nvar COMPARATOR = R++\nsrc[COMPARATOR] = '^' + src[GTLT] + '\\\\s*(' + FULLPLAIN + ')$|^$'\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\nvar COMPARATORTRIM = R++\nsrc[COMPARATORTRIM] = '(\\\\s*)' + src[GTLT] +\n '\\\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'\n\n// this one has to use the /g flag\nre[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g')\nsafeRe[COMPARATORTRIM] = new RegExp(makeSafeRe(src[COMPARATORTRIM]), 'g')\nvar comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\nvar HYPHENRANGE = R++\nsrc[HYPHENRANGE] = '^\\\\s*(' + src[XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[XRANGEPLAIN] + ')' +\n '\\\\s*$'\n\nvar HYPHENRANGELOOSE = R++\nsrc[HYPHENRANGELOOSE] = '^\\\\s*(' + src[XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$'\n\n// Star ranges basically just allow anything at all.\nvar STAR = R++\nsrc[STAR] = '(<|>)?=?\\\\s*\\\\*'\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i])\n if (!re[i]) {\n re[i] = new RegExp(src[i])\n\n // Replace all greedy whitespace to prevent regex dos issues. These regex are\n // used internally via the safeRe object since all inputs in this library get\n // normalized first to trim and collapse all extra whitespace. The original\n // regexes are exported for userland consumption and lower level usage. A\n // future breaking change could export the safer regex only with a note that\n // all input should have extra whitespace removed.\n safeRe[i] = new RegExp(makeSafeRe(src[i]))\n }\n}\n\nexports.parse = parse\nfunction parse (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n var r = options.loose ? safeRe[LOOSE] : safeRe[FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nexports.valid = valid\nfunction valid (version, options) {\n var v = parse(version, options)\n return v ? v.version : null\n}\n\nexports.clean = clean\nfunction clean (version, options) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\n\nexports.SemVer = SemVer\n\nfunction SemVer (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n if (version instanceof SemVer) {\n if (version.loose === options.loose) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n }\n\n if (!(this instanceof SemVer)) {\n return new SemVer(version, options)\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n\n var m = version.trim().match(options.loose ? safeRe[LOOSE] : safeRe[FULL])\n\n if (!m) {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map(function (id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n}\n\nSemVer.prototype.format = function () {\n this.version = this.major + '.' + this.minor + '.' + this.patch\n if (this.prerelease.length) {\n this.version += '-' + this.prerelease.join('.')\n }\n return this.version\n}\n\nSemVer.prototype.toString = function () {\n return this.version\n}\n\nSemVer.prototype.compare = function (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return this.compareMain(other) || this.comparePre(other)\n}\n\nSemVer.prototype.compareMain = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n}\n\nSemVer.prototype.comparePre = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n var i = 0\n do {\n var a = this.prerelease[i]\n var b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n var i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error('invalid increment argument: ' + release)\n }\n this.format()\n this.raw = this.version\n return this\n}\n\nexports.inc = inc\nfunction inc (version, release, loose, identifier) {\n if (typeof (loose) === 'string') {\n identifier = loose\n loose = undefined\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\n\nexports.diff = diff\nfunction diff (version1, version2) {\n if (eq(version1, version2)) {\n return null\n } else {\n var v1 = parse(version1)\n var v2 = parse(version2)\n var prefix = ''\n if (v1.prerelease.length || v2.prerelease.length) {\n prefix = 'pre'\n var defaultResult = 'prerelease'\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers\n\nvar numeric = /^[0-9]+$/\nfunction compareIdentifiers (a, b) {\n var anum = numeric.test(a)\n var bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers\nfunction rcompareIdentifiers (a, b) {\n return compareIdentifiers(b, a)\n}\n\nexports.major = major\nfunction major (a, loose) {\n return new SemVer(a, loose).major\n}\n\nexports.minor = minor\nfunction minor (a, loose) {\n return new SemVer(a, loose).minor\n}\n\nexports.patch = patch\nfunction patch (a, loose) {\n return new SemVer(a, loose).patch\n}\n\nexports.compare = compare\nfunction compare (a, b, loose) {\n return new SemVer(a, loose).compare(new SemVer(b, loose))\n}\n\nexports.compareLoose = compareLoose\nfunction compareLoose (a, b) {\n return compare(a, b, true)\n}\n\nexports.rcompare = rcompare\nfunction rcompare (a, b, loose) {\n return compare(b, a, loose)\n}\n\nexports.sort = sort\nfunction sort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compare(a, b, loose)\n })\n}\n\nexports.rsort = rsort\nfunction rsort (list, loose) {\n return list.sort(function (a, b) {\n return exports.rcompare(a, b, loose)\n })\n}\n\nexports.gt = gt\nfunction gt (a, b, loose) {\n return compare(a, b, loose) > 0\n}\n\nexports.lt = lt\nfunction lt (a, b, loose) {\n return compare(a, b, loose) < 0\n}\n\nexports.eq = eq\nfunction eq (a, b, loose) {\n return compare(a, b, loose) === 0\n}\n\nexports.neq = neq\nfunction neq (a, b, loose) {\n return compare(a, b, loose) !== 0\n}\n\nexports.gte = gte\nfunction gte (a, b, loose) {\n return compare(a, b, loose) >= 0\n}\n\nexports.lte = lte\nfunction lte (a, b, loose) {\n return compare(a, b, loose) <= 0\n}\n\nexports.cmp = cmp\nfunction cmp (a, op, b, loose) {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError('Invalid operator: ' + op)\n }\n}\n\nexports.Comparator = Comparator\nfunction Comparator (comp, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n if (!(this instanceof Comparator)) {\n return new Comparator(comp, options)\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n}\n\nvar ANY = {}\nComparator.prototype.parse = function (comp) {\n var r = this.options.loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR]\n var m = comp.match(r)\n\n if (!m) {\n throw new TypeError('Invalid comparator: ' + comp)\n }\n\n this.operator = m[1]\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n}\n\nComparator.prototype.toString = function () {\n return this.value\n}\n\nComparator.prototype.test = function (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n version = new SemVer(version, this.options)\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n}\n\nComparator.prototype.intersects = function (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n var rangeTmp\n\n if (this.operator === '') {\n rangeTmp = new Range(comp.value, options)\n return satisfies(this.value, rangeTmp, options)\n } else if (comp.operator === '') {\n rangeTmp = new Range(this.value, options)\n return satisfies(comp.semver, rangeTmp, options)\n }\n\n var sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n var sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n var sameSemVer = this.semver.version === comp.semver.version\n var differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n var oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n ((this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<'))\n var oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n ((this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>'))\n\n return sameDirectionIncreasing || sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan || oppositeDirectionsGreaterThan\n}\n\nexports.Range = Range\nfunction Range (range, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (range instanceof Range) {\n if (range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n return new Range(range.value, options)\n }\n\n if (!(this instanceof Range)) {\n return new Range(range, options)\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range\n .trim()\n .split(/\\s+/)\n .join(' ')\n\n // First, split based on boolean or ||\n this.set = this.raw.split('||').map(function (range) {\n return this.parseRange(range.trim())\n }, this).filter(function (c) {\n // throw out any that are not relevant for whatever reason\n return c.length\n })\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + this.raw)\n }\n\n this.format()\n}\n\nRange.prototype.format = function () {\n this.range = this.set.map(function (comps) {\n return comps.join(' ').trim()\n }).join('||').trim()\n return this.range\n}\n\nRange.prototype.toString = function () {\n return this.range\n}\n\nRange.prototype.parseRange = function (range) {\n var loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? safeRe[HYPHENRANGELOOSE] : safeRe[HYPHENRANGE]\n range = range.replace(hr, hyphenReplace)\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(safeRe[COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, safeRe[COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(safeRe[TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(safeRe[CARETTRIM], caretTrimReplace)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n var compRe = loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR]\n var set = range.split(' ').map(function (comp) {\n return parseComparator(comp, this.options)\n }, this).join(' ').split(/\\s+/)\n if (this.options.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function (comp) {\n return !!comp.match(compRe)\n })\n }\n set = set.map(function (comp) {\n return new Comparator(comp, this.options)\n }, this)\n\n return set\n}\n\nRange.prototype.intersects = function (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some(function (thisComparators) {\n return thisComparators.every(function (thisComparator) {\n return range.set.some(function (rangeComparators) {\n return rangeComparators.every(function (rangeComparator) {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n })\n })\n}\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators\nfunction toComparators (range, options) {\n return new Range(range, options).set.map(function (comp) {\n return comp.map(function (c) {\n return c.value\n }).join(' ').trim().split(' ')\n })\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nfunction isX (id) {\n return !id || id.toLowerCase() === 'x' || id === '*'\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? safeRe[TILDELOOSE] : safeRe[TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? safeRe[CARETLOOSE] : safeRe[CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? safeRe[XRANGELOOSE] : safeRe[XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p\n } else if (xm) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(safeRe[STAR], '')\n}\n\n// This function is passed to string.replace(safeRe[HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n version = new SemVer(version, this.options)\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n var match = version.match(safeRe[COERCE])\n\n if (match == null) {\n return null\n }\n\n return parse(match[1] +\n '.' + (match[2] || '0') +\n '.' + (match[3] || '0'))\n}\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In node.js\n// this is pretty straight-forward - we use the crypto API.\n\nvar crypto = require('crypto');\n\nmodule.exports = function nodeRNG() {\n return crypto.randomBytes(16);\n};\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.updateReleaseName = exports.addBuildTag = exports.updateBuildNumber = exports.uploadBuildLog = exports.associateArtifact = exports.uploadArtifact = exports.logIssue = exports.logDetail = exports.setProgress = exports.setEndpoint = exports.addAttachment = exports.uploadSummary = exports.prependPath = exports.uploadFile = exports.CodeCoverageEnabler = exports.CodeCoveragePublisher = exports.TestPublisher = exports.getHttpCertConfiguration = exports.getHttpProxyConfiguration = exports.findMatch = exports.filter = exports.match = exports.tool = exports.execSync = exports.exec = exports.rmRF = exports.legacyFindFiles = exports.find = exports.retry = exports.mv = exports.cp = exports.ls = exports.which = exports.resolve = exports.mkdirP = exports.popd = exports.pushd = exports.cd = exports.checkPath = exports.cwd = exports.getAgentMode = exports.getPlatform = exports.osType = exports.writeFile = exports.exist = exports.stats = exports.debug = exports.error = exports.warning = exports.command = exports.setTaskVariable = exports.getTaskVariable = exports.getSecureFileTicket = exports.getSecureFileName = exports.getEndpointAuthorization = exports.getEndpointAuthorizationParameterRequired = exports.getEndpointAuthorizationParameter = exports.getEndpointAuthorizationSchemeRequired = exports.getEndpointAuthorizationScheme = exports.getEndpointDataParameterRequired = exports.getEndpointDataParameter = exports.getEndpointUrlRequired = exports.getEndpointUrl = exports.getPathInputRequired = exports.getPathInput = exports.filePathSupplied = exports.getDelimitedInput = exports.getBoolInput = exports.getInputRequired = exports.getInput = exports.setSecret = exports.setVariable = exports.getVariables = exports.assertAgent = exports.getVariable = exports.loc = exports.setResourcePath = exports.setResult = exports.setErrStream = exports.setStdStream = exports.AgentHostedMode = exports.Platform = exports.FieldType = exports.ArtifactType = exports.IssueType = exports.TaskState = exports.TaskResult = void 0;\nvar shell = require(\"shelljs\");\nvar childProcess = require(\"child_process\");\nvar fs = require(\"fs\");\nvar path = require(\"path\");\nvar os = require(\"os\");\nvar minimatch = require(\"minimatch\");\nvar im = require(\"./internal\");\nvar tcm = require(\"./taskcommand\");\nvar trm = require(\"./toolrunner\");\nvar semver = require(\"semver\");\nvar TaskResult;\n(function (TaskResult) {\n TaskResult[TaskResult[\"Succeeded\"] = 0] = \"Succeeded\";\n TaskResult[TaskResult[\"SucceededWithIssues\"] = 1] = \"SucceededWithIssues\";\n TaskResult[TaskResult[\"Failed\"] = 2] = \"Failed\";\n TaskResult[TaskResult[\"Cancelled\"] = 3] = \"Cancelled\";\n TaskResult[TaskResult[\"Skipped\"] = 4] = \"Skipped\";\n})(TaskResult = exports.TaskResult || (exports.TaskResult = {}));\nvar TaskState;\n(function (TaskState) {\n TaskState[TaskState[\"Unknown\"] = 0] = \"Unknown\";\n TaskState[TaskState[\"Initialized\"] = 1] = \"Initialized\";\n TaskState[TaskState[\"InProgress\"] = 2] = \"InProgress\";\n TaskState[TaskState[\"Completed\"] = 3] = \"Completed\";\n})(TaskState = exports.TaskState || (exports.TaskState = {}));\nvar IssueType;\n(function (IssueType) {\n IssueType[IssueType[\"Error\"] = 0] = \"Error\";\n IssueType[IssueType[\"Warning\"] = 1] = \"Warning\";\n})(IssueType = exports.IssueType || (exports.IssueType = {}));\nvar ArtifactType;\n(function (ArtifactType) {\n ArtifactType[ArtifactType[\"Container\"] = 0] = \"Container\";\n ArtifactType[ArtifactType[\"FilePath\"] = 1] = \"FilePath\";\n ArtifactType[ArtifactType[\"VersionControl\"] = 2] = \"VersionControl\";\n ArtifactType[ArtifactType[\"GitRef\"] = 3] = \"GitRef\";\n ArtifactType[ArtifactType[\"TfvcLabel\"] = 4] = \"TfvcLabel\";\n})(ArtifactType = exports.ArtifactType || (exports.ArtifactType = {}));\nvar FieldType;\n(function (FieldType) {\n FieldType[FieldType[\"AuthParameter\"] = 0] = \"AuthParameter\";\n FieldType[FieldType[\"DataParameter\"] = 1] = \"DataParameter\";\n FieldType[FieldType[\"Url\"] = 2] = \"Url\";\n})(FieldType = exports.FieldType || (exports.FieldType = {}));\n/** Platforms supported by our build agent */\nvar Platform;\n(function (Platform) {\n Platform[Platform[\"Windows\"] = 0] = \"Windows\";\n Platform[Platform[\"MacOS\"] = 1] = \"MacOS\";\n Platform[Platform[\"Linux\"] = 2] = \"Linux\";\n})(Platform = exports.Platform || (exports.Platform = {}));\nvar AgentHostedMode;\n(function (AgentHostedMode) {\n AgentHostedMode[AgentHostedMode[\"Unknown\"] = 0] = \"Unknown\";\n AgentHostedMode[AgentHostedMode[\"SelfHosted\"] = 1] = \"SelfHosted\";\n AgentHostedMode[AgentHostedMode[\"MsHosted\"] = 2] = \"MsHosted\";\n})(AgentHostedMode = exports.AgentHostedMode || (exports.AgentHostedMode = {}));\n//-----------------------------------------------------\n// General Helpers\n//-----------------------------------------------------\nexports.setStdStream = im._setStdStream;\nexports.setErrStream = im._setErrStream;\n//-----------------------------------------------------\n// Results\n//-----------------------------------------------------\n/**\n * Sets the result of the task.\n * Execution will continue.\n * If not set, task will be Succeeded.\n * If multiple calls are made to setResult the most pessimistic call wins (Failed) regardless of the order of calls.\n *\n * @param result TaskResult enum of Succeeded, SucceededWithIssues, Failed, Cancelled or Skipped.\n * @param message A message which will be logged as an error issue if the result is Failed.\n * @param done Optional. Instructs the agent the task is done. This is helpful when child processes\n * may still be running and prevent node from fully exiting. This argument is supported\n * from agent version 2.142.0 or higher (otherwise will no-op).\n * @returns void\n */\nfunction setResult(result, message, done) {\n exports.debug('task result: ' + TaskResult[result]);\n // add an error issue\n if (result == TaskResult.Failed && message) {\n exports.error(message);\n }\n else if (result == TaskResult.SucceededWithIssues && message) {\n exports.warning(message);\n }\n // task.complete\n var properties = { 'result': TaskResult[result] };\n if (done) {\n properties['done'] = 'true';\n }\n exports.command('task.complete', properties, message);\n}\nexports.setResult = setResult;\n//\n// Catching all exceptions\n//\nprocess.on('uncaughtException', function (err) {\n setResult(TaskResult.Failed, exports.loc('LIB_UnhandledEx', err.message));\n exports.error(String(err.stack));\n});\n//\n// Catching unhandled rejections from promises and rethrowing them as exceptions\n// For example, a promise that is rejected but not handled by a .catch() handler in node 10 \n// doesn't cause an uncaughtException but causes in Node 16.\n// For types definitions(Error | Any) see https://nodejs.org/docs/latest-v16.x/api/process.html#event-unhandledrejection\n//\nprocess.on('unhandledRejection', function (reason) {\n if (reason instanceof Error) {\n throw reason;\n }\n else {\n throw new Error(reason);\n }\n});\n//-----------------------------------------------------\n// Loc Helpers\n//-----------------------------------------------------\nexports.setResourcePath = im._setResourcePath;\nexports.loc = im._loc;\n//-----------------------------------------------------\n// Input Helpers\n//-----------------------------------------------------\nexports.getVariable = im._getVariable;\n/**\n * Asserts the agent version is at least the specified minimum.\n *\n * @param minimum minimum version version - must be 2.104.1 or higher\n */\nfunction assertAgent(minimum) {\n if (semver.lt(minimum, '2.104.1')) {\n throw new Error('assertAgent() requires the parameter to be 2.104.1 or higher');\n }\n var agent = exports.getVariable('Agent.Version');\n if (agent && semver.lt(agent, minimum)) {\n throw new Error(\"Agent version \" + minimum + \" or higher is required\");\n }\n}\nexports.assertAgent = assertAgent;\n/**\n * Gets a snapshot of the current state of all job variables available to the task.\n * Requires a 2.104.1 agent or higher for full functionality.\n *\n * Limitations on an agent prior to 2.104.1:\n * 1) The return value does not include all public variables. Only public variables\n * that have been added using setVariable are returned.\n * 2) The name returned for each secret variable is the formatted environment variable\n * name, not the actual variable name (unless it was set explicitly at runtime using\n * setVariable).\n *\n * @returns VariableInfo[]\n */\nfunction getVariables() {\n return Object.keys(im._knownVariableMap)\n .map(function (key) {\n var info = im._knownVariableMap[key];\n return { name: info.name, value: exports.getVariable(info.name), secret: info.secret };\n });\n}\nexports.getVariables = getVariables;\n/**\n * Sets a variable which will be available to subsequent tasks as well.\n *\n * @param name name of the variable to set\n * @param val value to set\n * @param secret whether variable is secret. Multi-line secrets are not allowed. Optional, defaults to false\n * @param isOutput whether variable is an output variable. Optional, defaults to false\n * @returns void\n */\nfunction setVariable(name, val, secret, isOutput) {\n if (secret === void 0) { secret = false; }\n if (isOutput === void 0) { isOutput = false; }\n // once a secret always a secret\n var key = im._getVariableKey(name);\n if (im._knownVariableMap.hasOwnProperty(key)) {\n secret = secret || im._knownVariableMap[key].secret;\n }\n // store the value\n var varValue = val || '';\n exports.debug('set ' + name + '=' + (secret && varValue ? '********' : varValue));\n if (secret) {\n if (varValue && varValue.match(/\\r|\\n/) && (\"\" + process.env['SYSTEM_UNSAFEALLOWMULTILINESECRET']).toUpperCase() != 'TRUE') {\n throw new Error(exports.loc('LIB_MultilineSecret'));\n }\n im._vault.storeSecret('SECRET_' + key, varValue);\n delete process.env[key];\n }\n else {\n process.env[key] = varValue;\n }\n // store the metadata\n im._knownVariableMap[key] = { name: name, secret: secret };\n // write the setvariable command\n exports.command('task.setvariable', { 'variable': name || '', isOutput: (isOutput || false).toString(), 'issecret': (secret || false).toString() }, varValue);\n}\nexports.setVariable = setVariable;\n/**\n * Registers a value with the logger, so the value will be masked from the logs. Multi-line secrets are not allowed.\n *\n * @param val value to register\n */\nfunction setSecret(val) {\n if (val) {\n if (val.match(/\\r|\\n/) && (\"\" + process.env['SYSTEM_UNSAFEALLOWMULTILINESECRET']).toUpperCase() !== 'TRUE') {\n throw new Error(exports.loc('LIB_MultilineSecret'));\n }\n exports.command('task.setsecret', {}, val);\n }\n}\nexports.setSecret = setSecret;\n/**\n * Gets the value of an input.\n * If required is true and the value is not set, it will throw.\n *\n * @param name name of the input to get\n * @param required whether input is required. optional, defaults to false\n * @returns string\n */\nfunction getInput(name, required) {\n var inval = im._vault.retrieveSecret('INPUT_' + im._getVariableKey(name));\n if (required && !inval) {\n throw new Error(exports.loc('LIB_InputRequired', name));\n }\n exports.debug(name + '=' + inval);\n return inval;\n}\nexports.getInput = getInput;\n/**\n * Gets the value of an input.\n * If the value is not set, it will throw.\n *\n * @param name name of the input to get\n * @returns string\n */\nfunction getInputRequired(name) {\n return getInput(name, true);\n}\nexports.getInputRequired = getInputRequired;\n/**\n * Gets the value of an input and converts to a bool. Convenience.\n * If required is true and the value is not set, it will throw.\n * If required is false and the value is not set, returns false.\n *\n * @param name name of the bool input to get\n * @param required whether input is required. optional, defaults to false\n * @returns boolean\n */\nfunction getBoolInput(name, required) {\n return (getInput(name, required) || '').toUpperCase() == \"TRUE\";\n}\nexports.getBoolInput = getBoolInput;\n/**\n * Gets the value of an input and splits the value using a delimiter (space, comma, etc).\n * Empty values are removed. This function is useful for splitting an input containing a simple\n * list of items - such as build targets.\n * IMPORTANT: Do not use this function for splitting additional args! Instead use argString(), which\n * follows normal argument splitting rules and handles values encapsulated by quotes.\n * If required is true and the value is not set, it will throw.\n *\n * @param name name of the input to get\n * @param delim delimiter to split on\n * @param required whether input is required. optional, defaults to false\n * @returns string[]\n */\nfunction getDelimitedInput(name, delim, required) {\n var inputVal = getInput(name, required);\n if (!inputVal) {\n return [];\n }\n var result = [];\n inputVal.split(delim).forEach(function (x) {\n if (x) {\n result.push(x);\n }\n });\n return result;\n}\nexports.getDelimitedInput = getDelimitedInput;\n/**\n * Checks whether a path inputs value was supplied by the user\n * File paths are relative with a picker, so an empty path is the root of the repo.\n * Useful if you need to condition work (like append an arg) if a value was supplied\n *\n * @param name name of the path input to check\n * @returns boolean\n */\nfunction filePathSupplied(name) {\n // normalize paths\n var pathValue = this.resolve(this.getPathInput(name) || '');\n var repoRoot = this.resolve(exports.getVariable('build.sourcesDirectory') || exports.getVariable('system.defaultWorkingDirectory') || '');\n var supplied = pathValue !== repoRoot;\n exports.debug(name + 'path supplied :' + supplied);\n return supplied;\n}\nexports.filePathSupplied = filePathSupplied;\n/**\n * Gets the value of a path input\n * It will be quoted for you if it isn't already and contains spaces\n * If required is true and the value is not set, it will throw.\n * If check is true and the path does not exist, it will throw.\n *\n * @param name name of the input to get\n * @param required whether input is required. optional, defaults to false\n * @param check whether path is checked. optional, defaults to false\n * @returns string\n */\nfunction getPathInput(name, required, check) {\n var inval = getInput(name, required);\n if (inval) {\n if (check) {\n exports.checkPath(inval, name);\n }\n }\n return inval;\n}\nexports.getPathInput = getPathInput;\n/**\n * Gets the value of a path input\n * It will be quoted for you if it isn't already and contains spaces\n * If the value is not set, it will throw.\n * If check is true and the path does not exist, it will throw.\n *\n * @param name name of the input to get\n * @param check whether path is checked. optional, defaults to false\n * @returns string\n */\nfunction getPathInputRequired(name, check) {\n return getPathInput(name, true, check);\n}\nexports.getPathInputRequired = getPathInputRequired;\n//-----------------------------------------------------\n// Endpoint Helpers\n//-----------------------------------------------------\n/**\n * Gets the url for a service endpoint\n * If the url was not set and is not optional, it will throw.\n *\n * @param id name of the service endpoint\n * @param optional whether the url is optional\n * @returns string\n */\nfunction getEndpointUrl(id, optional) {\n var urlval = process.env['ENDPOINT_URL_' + id];\n if (!optional && !urlval) {\n throw new Error(exports.loc('LIB_EndpointNotExist', id));\n }\n exports.debug(id + '=' + urlval);\n return urlval;\n}\nexports.getEndpointUrl = getEndpointUrl;\n/**\n * Gets the url for a service endpoint\n * If the url was not set, it will throw.\n *\n * @param id name of the service endpoint\n * @returns string\n */\nfunction getEndpointUrlRequired(id) {\n return getEndpointUrl(id, false);\n}\nexports.getEndpointUrlRequired = getEndpointUrlRequired;\n/*\n * Gets the endpoint data parameter value with specified key for a service endpoint\n * If the endpoint data parameter was not set and is not optional, it will throw.\n *\n * @param id name of the service endpoint\n * @param key of the parameter\n * @param optional whether the endpoint data is optional\n * @returns {string} value of the endpoint data parameter\n */\nfunction getEndpointDataParameter(id, key, optional) {\n var dataParamVal = process.env['ENDPOINT_DATA_' + id + '_' + key.toUpperCase()];\n if (!optional && !dataParamVal) {\n throw new Error(exports.loc('LIB_EndpointDataNotExist', id, key));\n }\n exports.debug(id + ' data ' + key + ' = ' + dataParamVal);\n return dataParamVal;\n}\nexports.getEndpointDataParameter = getEndpointDataParameter;\n/*\n * Gets the endpoint data parameter value with specified key for a service endpoint\n * If the endpoint data parameter was not set, it will throw.\n *\n * @param id name of the service endpoint\n * @param key of the parameter\n * @returns {string} value of the endpoint data parameter\n */\nfunction getEndpointDataParameterRequired(id, key) {\n return getEndpointDataParameter(id, key, false);\n}\nexports.getEndpointDataParameterRequired = getEndpointDataParameterRequired;\n/**\n * Gets the endpoint authorization scheme for a service endpoint\n * If the endpoint authorization scheme is not set and is not optional, it will throw.\n *\n * @param id name of the service endpoint\n * @param optional whether the endpoint authorization scheme is optional\n * @returns {string} value of the endpoint authorization scheme\n */\nfunction getEndpointAuthorizationScheme(id, optional) {\n var authScheme = im._vault.retrieveSecret('ENDPOINT_AUTH_SCHEME_' + id);\n if (!optional && !authScheme) {\n throw new Error(exports.loc('LIB_EndpointAuthNotExist', id));\n }\n exports.debug(id + ' auth scheme = ' + authScheme);\n return authScheme;\n}\nexports.getEndpointAuthorizationScheme = getEndpointAuthorizationScheme;\n/**\n * Gets the endpoint authorization scheme for a service endpoint\n * If the endpoint authorization scheme is not set, it will throw.\n *\n * @param id name of the service endpoint\n * @returns {string} value of the endpoint authorization scheme\n */\nfunction getEndpointAuthorizationSchemeRequired(id) {\n return getEndpointAuthorizationScheme(id, false);\n}\nexports.getEndpointAuthorizationSchemeRequired = getEndpointAuthorizationSchemeRequired;\n/**\n * Gets the endpoint authorization parameter value for a service endpoint with specified key\n * If the endpoint authorization parameter is not set and is not optional, it will throw.\n *\n * @param id name of the service endpoint\n * @param key key to find the endpoint authorization parameter\n * @param optional optional whether the endpoint authorization scheme is optional\n * @returns {string} value of the endpoint authorization parameter value\n */\nfunction getEndpointAuthorizationParameter(id, key, optional) {\n var authParam = im._vault.retrieveSecret('ENDPOINT_AUTH_PARAMETER_' + id + '_' + key.toUpperCase());\n if (!optional && !authParam) {\n throw new Error(exports.loc('LIB_EndpointAuthNotExist', id));\n }\n exports.debug(id + ' auth param ' + key + ' = ' + authParam);\n return authParam;\n}\nexports.getEndpointAuthorizationParameter = getEndpointAuthorizationParameter;\n/**\n * Gets the endpoint authorization parameter value for a service endpoint with specified key\n * If the endpoint authorization parameter is not set, it will throw.\n *\n * @param id name of the service endpoint\n * @param key key to find the endpoint authorization parameter\n * @returns {string} value of the endpoint authorization parameter value\n */\nfunction getEndpointAuthorizationParameterRequired(id, key) {\n return getEndpointAuthorizationParameter(id, key, false);\n}\nexports.getEndpointAuthorizationParameterRequired = getEndpointAuthorizationParameterRequired;\n/**\n * Gets the authorization details for a service endpoint\n * If the authorization was not set and is not optional, it will set the task result to Failed.\n *\n * @param id name of the service endpoint\n * @param optional whether the url is optional\n * @returns string\n */\nfunction getEndpointAuthorization(id, optional) {\n var aval = im._vault.retrieveSecret('ENDPOINT_AUTH_' + id);\n if (!optional && !aval) {\n setResult(TaskResult.Failed, exports.loc('LIB_EndpointAuthNotExist', id));\n }\n exports.debug(id + ' exists ' + (!!aval));\n var auth;\n try {\n if (aval) {\n auth = JSON.parse(aval);\n }\n }\n catch (err) {\n throw new Error(exports.loc('LIB_InvalidEndpointAuth', aval));\n }\n return auth;\n}\nexports.getEndpointAuthorization = getEndpointAuthorization;\n//-----------------------------------------------------\n// SecureFile Helpers\n//-----------------------------------------------------\n/**\n * Gets the name for a secure file\n *\n * @param id secure file id\n * @returns string\n */\nfunction getSecureFileName(id) {\n var name = process.env['SECUREFILE_NAME_' + id];\n exports.debug('secure file name for id ' + id + ' = ' + name);\n return name;\n}\nexports.getSecureFileName = getSecureFileName;\n/**\n * Gets the secure file ticket that can be used to download the secure file contents\n *\n * @param id name of the secure file\n * @returns {string} secure file ticket\n */\nfunction getSecureFileTicket(id) {\n var ticket = im._vault.retrieveSecret('SECUREFILE_TICKET_' + id);\n exports.debug('secure file ticket for id ' + id + ' = ' + ticket);\n return ticket;\n}\nexports.getSecureFileTicket = getSecureFileTicket;\n//-----------------------------------------------------\n// Task Variable Helpers\n//-----------------------------------------------------\n/**\n * Gets a variable value that is set by previous step from the same wrapper task.\n * Requires a 2.115.0 agent or higher.\n *\n * @param name name of the variable to get\n * @returns string\n */\nfunction getTaskVariable(name) {\n assertAgent('2.115.0');\n var inval = im._vault.retrieveSecret('VSTS_TASKVARIABLE_' + im._getVariableKey(name));\n if (inval) {\n inval = inval.trim();\n }\n exports.debug('task variable: ' + name + '=' + inval);\n return inval;\n}\nexports.getTaskVariable = getTaskVariable;\n/**\n * Sets a task variable which will only be available to subsequent steps belong to the same wrapper task.\n * Requires a 2.115.0 agent or higher.\n *\n * @param name name of the variable to set\n * @param val value to set\n * @param secret whether variable is secret. optional, defaults to false\n * @returns void\n */\nfunction setTaskVariable(name, val, secret) {\n if (secret === void 0) { secret = false; }\n assertAgent('2.115.0');\n var key = im._getVariableKey(name);\n // store the value\n var varValue = val || '';\n exports.debug('set task variable: ' + name + '=' + (secret && varValue ? '********' : varValue));\n im._vault.storeSecret('VSTS_TASKVARIABLE_' + key, varValue);\n delete process.env[key];\n // write the command\n exports.command('task.settaskvariable', { 'variable': name || '', 'issecret': (secret || false).toString() }, varValue);\n}\nexports.setTaskVariable = setTaskVariable;\n//-----------------------------------------------------\n// Cmd Helpers\n//-----------------------------------------------------\nexports.command = im._command;\nexports.warning = im._warning;\nexports.error = im._error;\nexports.debug = im._debug;\n//-----------------------------------------------------\n// Disk Functions\n//-----------------------------------------------------\nfunction _checkShell(cmd, continueOnError) {\n var se = shell.error();\n if (se) {\n exports.debug(cmd + ' failed');\n var errMsg = exports.loc('LIB_OperationFailed', cmd, se);\n exports.debug(errMsg);\n if (!continueOnError) {\n throw new Error(errMsg);\n }\n }\n}\n/**\n * Get's stat on a path.\n * Useful for checking whether a file or directory. Also getting created, modified and accessed time.\n * see [fs.stat](https://nodejs.org/api/fs.html#fs_class_fs_stats)\n *\n * @param path path to check\n * @returns fsStat\n */\nfunction stats(path) {\n return fs.statSync(path);\n}\nexports.stats = stats;\nexports.exist = im._exist;\nfunction writeFile(file, data, options) {\n if (typeof (options) === 'string') {\n fs.writeFileSync(file, data, { encoding: options });\n }\n else {\n fs.writeFileSync(file, data, options);\n }\n}\nexports.writeFile = writeFile;\n/**\n * @deprecated Use `getPlatform`\n * Useful for determining the host operating system.\n * see [os.type](https://nodejs.org/api/os.html#os_os_type)\n *\n * @return the name of the operating system\n */\nfunction osType() {\n return os.type();\n}\nexports.osType = osType;\n/**\n * Determine the operating system the build agent is running on.\n * @returns {Platform}\n * @throws {Error} Platform is not supported by our agent\n */\nfunction getPlatform() {\n switch (process.platform) {\n case 'win32': return Platform.Windows;\n case 'darwin': return Platform.MacOS;\n case 'linux': return Platform.Linux;\n default: throw Error(exports.loc('LIB_PlatformNotSupported', process.platform));\n }\n}\nexports.getPlatform = getPlatform;\n/**\n * Return hosted type of Agent\n * @returns {AgentHostedMode}\n */\nfunction getAgentMode() {\n var agentCloudId = exports.getVariable('Agent.CloudId');\n if (agentCloudId === undefined)\n return AgentHostedMode.Unknown;\n if (agentCloudId)\n return AgentHostedMode.MsHosted;\n return AgentHostedMode.SelfHosted;\n}\nexports.getAgentMode = getAgentMode;\n/**\n * Returns the process's current working directory.\n * see [process.cwd](https://nodejs.org/api/process.html#process_process_cwd)\n *\n * @return the path to the current working directory of the process\n */\nfunction cwd() {\n return process.cwd();\n}\nexports.cwd = cwd;\nexports.checkPath = im._checkPath;\n/**\n * Change working directory.\n *\n * @param path new working directory path\n * @returns void\n */\nfunction cd(path) {\n if (path) {\n shell.cd(path);\n _checkShell('cd');\n }\n}\nexports.cd = cd;\n/**\n * Change working directory and push it on the stack\n *\n * @param path new working directory path\n * @returns void\n */\nfunction pushd(path) {\n shell.pushd(path);\n _checkShell('pushd');\n}\nexports.pushd = pushd;\n/**\n * Change working directory back to previously pushed directory\n *\n * @returns void\n */\nfunction popd() {\n shell.popd();\n _checkShell('popd');\n}\nexports.popd = popd;\n/**\n * Make a directory. Creates the full path with folders in between\n * Will throw if it fails\n *\n * @param p path to create\n * @returns void\n */\nfunction mkdirP(p) {\n if (!p) {\n throw new Error(exports.loc('LIB_ParameterIsRequired', 'p'));\n }\n // build a stack of directories to create\n var stack = [];\n var testDir = p;\n while (true) {\n // validate the loop is not out of control\n if (stack.length >= (process.env['TASKLIB_TEST_MKDIRP_FAILSAFE'] || 1000)) {\n // let the framework throw\n exports.debug('loop is out of control');\n fs.mkdirSync(p);\n return;\n }\n exports.debug(\"testing directory '\" + testDir + \"'\");\n var stats_1 = void 0;\n try {\n stats_1 = fs.statSync(testDir);\n }\n catch (err) {\n if (err.code == 'ENOENT') {\n // validate the directory is not the drive root\n var parentDir = path.dirname(testDir);\n if (testDir == parentDir) {\n throw new Error(exports.loc('LIB_MkdirFailedInvalidDriveRoot', p, testDir)); // Unable to create directory '{p}'. Root directory does not exist: '{testDir}'\n }\n // push the dir and test the parent\n stack.push(testDir);\n testDir = parentDir;\n continue;\n }\n else if (err.code == 'UNKNOWN') {\n throw new Error(exports.loc('LIB_MkdirFailedInvalidShare', p, testDir)); // Unable to create directory '{p}'. Unable to verify the directory exists: '{testDir}'. If directory is a file share, please verify the share name is correct, the share is online, and the current process has permission to access the share.\n }\n else {\n throw err;\n }\n }\n if (!stats_1.isDirectory()) {\n throw new Error(exports.loc('LIB_MkdirFailedFileExists', p, testDir)); // Unable to create directory '{p}'. Conflicting file exists: '{testDir}'\n }\n // testDir exists\n break;\n }\n // create each directory\n while (stack.length) {\n var dir = stack.pop(); // non-null because `stack.length` was truthy\n exports.debug(\"mkdir '\" + dir + \"'\");\n try {\n fs.mkdirSync(dir);\n }\n catch (err) {\n throw new Error(exports.loc('LIB_MkdirFailed', p, err.message)); // Unable to create directory '{p}'. {err.message}\n }\n }\n}\nexports.mkdirP = mkdirP;\n/**\n * Resolves a sequence of paths or path segments into an absolute path.\n * Calls node.js path.resolve()\n * Allows L0 testing with consistent path formats on Mac/Linux and Windows in the mock implementation\n * @param pathSegments\n * @returns {string}\n */\nfunction resolve() {\n var pathSegments = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n pathSegments[_i] = arguments[_i];\n }\n var absolutePath = path.resolve.apply(this, pathSegments);\n exports.debug('Absolute path for pathSegments: ' + pathSegments + ' = ' + absolutePath);\n return absolutePath;\n}\nexports.resolve = resolve;\nexports.which = im._which;\n/**\n * Returns array of files in the given path, or in current directory if no path provided. See shelljs.ls\n * @param {string} options Available options: -R (recursive), -A (all files, include files beginning with ., except for . and ..)\n * @param {string[]} paths Paths to search.\n * @return {string[]} An array of files in the given path(s).\n */\nfunction ls(options, paths) {\n if (options) {\n return shell.ls(options, paths);\n }\n else {\n return shell.ls(paths);\n }\n}\nexports.ls = ls;\n/**\n * Copies a file or folder.\n *\n * @param source source path\n * @param dest destination path\n * @param options string -r, -f or -rf for recursive and force\n * @param continueOnError optional. whether to continue on error\n * @param retryCount optional. Retry count to copy the file. It might help to resolve intermittent issues e.g. with UNC target paths on a remote host.\n */\nfunction cp(source, dest, options, continueOnError, retryCount) {\n if (retryCount === void 0) { retryCount = 0; }\n while (retryCount >= 0) {\n try {\n if (options) {\n shell.cp(options, source, dest);\n }\n else {\n shell.cp(source, dest);\n }\n _checkShell('cp', false);\n break;\n }\n catch (e) {\n if (retryCount <= 0) {\n if (continueOnError) {\n exports.warning(e);\n break;\n }\n else {\n throw e;\n }\n }\n else {\n console.log(exports.loc('LIB_CopyFileFailed', retryCount));\n retryCount--;\n }\n }\n }\n}\nexports.cp = cp;\n/**\n * Moves a path.\n *\n * @param source source path\n * @param dest destination path\n * @param options string -f or -n for force and no clobber\n * @param continueOnError optional. whether to continue on error\n */\nfunction mv(source, dest, options, continueOnError) {\n if (options) {\n shell.mv(options, source, dest);\n }\n else {\n shell.mv(source, dest);\n }\n _checkShell('mv', continueOnError);\n}\nexports.mv = mv;\n/**\n * Tries to execute a function a specified number of times.\n *\n * @param func a function to be executed.\n * @param args executed function arguments array.\n * @param retryOptions optional. Defaults to { continueOnError: false, retryCount: 0 }.\n * @returns the same as the usual function.\n */\nfunction retry(func, args, retryOptions) {\n if (retryOptions === void 0) { retryOptions = { continueOnError: false, retryCount: 0 }; }\n while (retryOptions.retryCount >= 0) {\n try {\n return func.apply(void 0, args);\n }\n catch (e) {\n if (retryOptions.retryCount <= 0) {\n if (retryOptions.continueOnError) {\n exports.warning(e);\n break;\n }\n else {\n throw e;\n }\n }\n else {\n exports.debug(\"Attempt to execute function \\\"\" + (func === null || func === void 0 ? void 0 : func.name) + \"\\\" failed, retries left: \" + retryOptions.retryCount);\n retryOptions.retryCount--;\n }\n }\n }\n}\nexports.retry = retry;\n/**\n * Gets info about item stats.\n *\n * @param path a path to the item to be processed.\n * @param followSymbolicLink indicates whether to traverse descendants of symbolic link directories.\n * @param allowBrokenSymbolicLinks when true, broken symbolic link will not cause an error.\n * @returns fs.Stats\n */\nfunction _getStats(path, followSymbolicLink, allowBrokenSymbolicLinks) {\n // stat returns info about the target of a symlink (or symlink chain),\n // lstat returns info about a symlink itself\n var stats;\n if (followSymbolicLink) {\n try {\n // use stat (following symlinks)\n stats = fs.statSync(path);\n }\n catch (err) {\n if (err.code == 'ENOENT' && allowBrokenSymbolicLinks) {\n // fallback to lstat (broken symlinks allowed)\n stats = fs.lstatSync(path);\n exports.debug(\" \" + path + \" (broken symlink)\");\n }\n else {\n throw err;\n }\n }\n }\n else {\n // use lstat (not following symlinks)\n stats = fs.lstatSync(path);\n }\n return stats;\n}\n/**\n * Recursively finds all paths a given path. Returns an array of paths.\n *\n * @param findPath path to search\n * @param options optional. defaults to { followSymbolicLinks: true }. following soft links is generally appropriate unless deleting files.\n * @returns string[]\n */\nfunction find(findPath, options) {\n if (!findPath) {\n exports.debug('no path specified');\n return [];\n }\n // normalize the path, otherwise the first result is inconsistently formatted from the rest of the results\n // because path.join() performs normalization.\n findPath = path.normalize(findPath);\n // debug trace the parameters\n exports.debug(\"findPath: '\" + findPath + \"'\");\n options = options || _getDefaultFindOptions();\n _debugFindOptions(options);\n // return empty if not exists\n try {\n fs.lstatSync(findPath);\n }\n catch (err) {\n if (err.code == 'ENOENT') {\n exports.debug('0 results');\n return [];\n }\n throw err;\n }\n try {\n var result = [];\n // push the first item\n var stack = [new _FindItem(findPath, 1)];\n var traversalChain = []; // used to detect cycles\n var _loop_1 = function () {\n // pop the next item and push to the result array\n var item = stack.pop(); // non-null because `stack.length` was truthy\n var stats_2 = void 0;\n try {\n // `item.path` equals `findPath` for the first item to be processed, when the `result` array is empty\n var isPathToSearch = !result.length;\n // following specified symlinks only if current path equals specified path\n var followSpecifiedSymbolicLink = options.followSpecifiedSymbolicLink && isPathToSearch;\n // following all symlinks or following symlink for the specified path\n var followSymbolicLink = options.followSymbolicLinks || followSpecifiedSymbolicLink;\n // stat the item. The stat info is used further below to determine whether to traverse deeper\n stats_2 = _getStats(item.path, followSymbolicLink, options.allowBrokenSymbolicLinks);\n }\n catch (err) {\n if (err.code == 'ENOENT' && options.skipMissingFiles) {\n exports.warning(\"No such file or directory: \\\"\" + item.path + \"\\\" - skipping.\");\n return \"continue\";\n }\n throw err;\n }\n result.push(item.path);\n // note, isDirectory() returns false for the lstat of a symlink\n if (stats_2.isDirectory()) {\n exports.debug(\" \" + item.path + \" (directory)\");\n if (options.followSymbolicLinks) {\n // get the realpath\n var realPath_1;\n if (im._isUncPath(item.path)) {\n // Sometimes there are spontaneous issues when working with unc-paths, so retries have been added for them.\n realPath_1 = retry(fs.realpathSync, [item.path], { continueOnError: false, retryCount: 5 });\n }\n else {\n realPath_1 = fs.realpathSync(item.path);\n }\n // fixup the traversal chain to match the item level\n while (traversalChain.length >= item.level) {\n traversalChain.pop();\n }\n // test for a cycle\n if (traversalChain.some(function (x) { return x == realPath_1; })) {\n exports.debug(' cycle detected');\n return \"continue\";\n }\n // update the traversal chain\n traversalChain.push(realPath_1);\n }\n // push the child items in reverse onto the stack\n var childLevel_1 = item.level + 1;\n var childItems = fs.readdirSync(item.path)\n .map(function (childName) { return new _FindItem(path.join(item.path, childName), childLevel_1); });\n for (var i = childItems.length - 1; i >= 0; i--) {\n stack.push(childItems[i]);\n }\n }\n else {\n exports.debug(\" \" + item.path + \" (file)\");\n }\n };\n while (stack.length) {\n _loop_1();\n }\n exports.debug(result.length + \" results\");\n return result;\n }\n catch (err) {\n throw new Error(exports.loc('LIB_OperationFailed', 'find', err.message));\n }\n}\nexports.find = find;\nvar _FindItem = /** @class */ (function () {\n function _FindItem(path, level) {\n this.path = path;\n this.level = level;\n }\n return _FindItem;\n}());\nfunction _debugFindOptions(options) {\n exports.debug(\"findOptions.allowBrokenSymbolicLinks: '\" + options.allowBrokenSymbolicLinks + \"'\");\n exports.debug(\"findOptions.followSpecifiedSymbolicLink: '\" + options.followSpecifiedSymbolicLink + \"'\");\n exports.debug(\"findOptions.followSymbolicLinks: '\" + options.followSymbolicLinks + \"'\");\n exports.debug(\"findOptions.skipMissingFiles: '\" + options.skipMissingFiles + \"'\");\n}\nfunction _getDefaultFindOptions() {\n return {\n allowBrokenSymbolicLinks: false,\n followSpecifiedSymbolicLink: true,\n followSymbolicLinks: true,\n skipMissingFiles: false\n };\n}\n/**\n * Prefer tl.find() and tl.match() instead. This function is for backward compatibility\n * when porting tasks to Node from the PowerShell or PowerShell3 execution handler.\n *\n * @param rootDirectory path to root unrooted patterns with\n * @param pattern include and exclude patterns\n * @param includeFiles whether to include files in the result. defaults to true when includeFiles and includeDirectories are both false\n * @param includeDirectories whether to include directories in the result\n * @returns string[]\n */\nfunction legacyFindFiles(rootDirectory, pattern, includeFiles, includeDirectories) {\n if (!pattern) {\n throw new Error('pattern parameter cannot be empty');\n }\n exports.debug(\"legacyFindFiles rootDirectory: '\" + rootDirectory + \"'\");\n exports.debug(\"pattern: '\" + pattern + \"'\");\n exports.debug(\"includeFiles: '\" + includeFiles + \"'\");\n exports.debug(\"includeDirectories: '\" + includeDirectories + \"'\");\n if (!includeFiles && !includeDirectories) {\n includeFiles = true;\n }\n // organize the patterns into include patterns and exclude patterns\n var includePatterns = [];\n var excludePatterns = [];\n pattern = pattern.replace(/;;/g, '\\0');\n for (var _i = 0, _a = pattern.split(';'); _i < _a.length; _i++) {\n var pat = _a[_i];\n if (!pat) {\n continue;\n }\n pat = pat.replace(/\\0/g, ';');\n // determine whether include pattern and remove any include/exclude prefix.\n // include patterns start with +: or anything other than -:\n // exclude patterns start with -:\n var isIncludePattern = void 0;\n if (im._startsWith(pat, '+:')) {\n pat = pat.substring(2);\n isIncludePattern = true;\n }\n else if (im._startsWith(pat, '-:')) {\n pat = pat.substring(2);\n isIncludePattern = false;\n }\n else {\n isIncludePattern = true;\n }\n // validate pattern does not end with a slash\n if (im._endsWith(pat, '/') || (process.platform == 'win32' && im._endsWith(pat, '\\\\'))) {\n throw new Error(exports.loc('LIB_InvalidPattern', pat));\n }\n // root the pattern\n if (rootDirectory && !path.isAbsolute(pat)) {\n pat = path.join(rootDirectory, pat);\n // remove trailing slash sometimes added by path.join() on Windows, e.g.\n // path.join('\\\\\\\\hello', 'world') => '\\\\\\\\hello\\\\world\\\\'\n // path.join('//hello', 'world') => '\\\\\\\\hello\\\\world\\\\'\n if (im._endsWith(pat, '\\\\')) {\n pat = pat.substring(0, pat.length - 1);\n }\n }\n if (isIncludePattern) {\n includePatterns.push(pat);\n }\n else {\n excludePatterns.push(im._legacyFindFiles_convertPatternToRegExp(pat));\n }\n }\n // find and apply patterns\n var count = 0;\n var result = _legacyFindFiles_getMatchingItems(includePatterns, excludePatterns, !!includeFiles, !!includeDirectories);\n exports.debug('all matches:');\n for (var _b = 0, result_1 = result; _b < result_1.length; _b++) {\n var resultItem = result_1[_b];\n exports.debug(' ' + resultItem);\n }\n exports.debug('total matched: ' + result.length);\n return result;\n}\nexports.legacyFindFiles = legacyFindFiles;\nfunction _legacyFindFiles_getMatchingItems(includePatterns, excludePatterns, includeFiles, includeDirectories) {\n exports.debug('getMatchingItems()');\n for (var _i = 0, includePatterns_1 = includePatterns; _i < includePatterns_1.length; _i++) {\n var pattern = includePatterns_1[_i];\n exports.debug(\"includePattern: '\" + pattern + \"'\");\n }\n for (var _a = 0, excludePatterns_1 = excludePatterns; _a < excludePatterns_1.length; _a++) {\n var pattern = excludePatterns_1[_a];\n exports.debug(\"excludePattern: \" + pattern);\n }\n exports.debug('includeFiles: ' + includeFiles);\n exports.debug('includeDirectories: ' + includeDirectories);\n var allFiles = {};\n var _loop_2 = function (pattern) {\n // determine the directory to search\n //\n // note, getDirectoryName removes redundant path separators\n var findPath = void 0;\n var starIndex = pattern.indexOf('*');\n var questionIndex = pattern.indexOf('?');\n if (starIndex < 0 && questionIndex < 0) {\n // if no wildcards are found, use the directory name portion of the path.\n // if there is no directory name (file name only in pattern or drive root),\n // this will return empty string.\n findPath = im._getDirectoryName(pattern);\n }\n else {\n // extract the directory prior to the first wildcard\n var index = Math.min(starIndex >= 0 ? starIndex : questionIndex, questionIndex >= 0 ? questionIndex : starIndex);\n findPath = im._getDirectoryName(pattern.substring(0, index));\n }\n // note, due to this short-circuit and the above usage of getDirectoryName, this\n // function has the same limitations regarding drive roots as the powershell\n // implementation.\n //\n // also note, since getDirectoryName eliminates slash redundancies, some additional\n // work may be required if removal of this limitation is attempted.\n if (!findPath) {\n return \"continue\";\n }\n var patternRegex = im._legacyFindFiles_convertPatternToRegExp(pattern);\n // find files/directories\n var items = find(findPath, { followSymbolicLinks: true })\n .filter(function (item) {\n if (includeFiles && includeDirectories) {\n return true;\n }\n var isDir = fs.statSync(item).isDirectory();\n return (includeFiles && !isDir) || (includeDirectories && isDir);\n })\n .forEach(function (item) {\n var normalizedPath = process.platform == 'win32' ? item.replace(/\\\\/g, '/') : item; // normalize separators\n // **/times/** will not match C:/fun/times because there isn't a trailing slash\n // so try both if including directories\n var alternatePath = normalizedPath + \"/\"; // potential bug: it looks like this will result in a false\n // positive if the item is a regular file and not a directory\n var isMatch = false;\n if (patternRegex.test(normalizedPath) || (includeDirectories && patternRegex.test(alternatePath))) {\n isMatch = true;\n // test whether the path should be excluded\n for (var _i = 0, excludePatterns_2 = excludePatterns; _i < excludePatterns_2.length; _i++) {\n var regex = excludePatterns_2[_i];\n if (regex.test(normalizedPath) || (includeDirectories && regex.test(alternatePath))) {\n isMatch = false;\n break;\n }\n }\n }\n if (isMatch) {\n allFiles[item] = item;\n }\n });\n };\n for (var _b = 0, includePatterns_2 = includePatterns; _b < includePatterns_2.length; _b++) {\n var pattern = includePatterns_2[_b];\n _loop_2(pattern);\n }\n return Object.keys(allFiles).sort();\n}\n/**\n * Remove a path recursively with force\n *\n * @param inputPath path to remove\n * @throws when the file or directory exists but could not be deleted.\n */\nfunction rmRF(inputPath) {\n exports.debug('rm -rf ' + inputPath);\n if (getPlatform() == Platform.Windows) {\n // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another\n // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del.\n try {\n if (fs.statSync(inputPath).isDirectory()) {\n exports.debug('removing directory ' + inputPath);\n childProcess.execSync(\"rd /s /q \\\"\" + inputPath + \"\\\"\");\n }\n else {\n exports.debug('removing file ' + inputPath);\n childProcess.execSync(\"del /f /a \\\"\" + inputPath + \"\\\"\");\n }\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code != 'ENOENT') {\n throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', err.message));\n }\n }\n // Shelling out fails to remove a symlink folder with missing source, this unlink catches that\n try {\n fs.unlinkSync(inputPath);\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code != 'ENOENT') {\n throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', err.message));\n }\n }\n }\n else {\n // get the lstats in order to workaround a bug in shelljs@0.3.0 where symlinks\n // with missing targets are not handled correctly by \"rm('-rf', path)\"\n var lstats = void 0;\n try {\n lstats = fs.lstatSync(inputPath);\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code == 'ENOENT') {\n return;\n }\n throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', err.message));\n }\n if (lstats.isDirectory()) {\n exports.debug('removing directory');\n shell.rm('-rf', inputPath);\n var errMsg = shell.error();\n if (errMsg) {\n throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', errMsg));\n }\n return;\n }\n exports.debug('removing file');\n try {\n fs.unlinkSync(inputPath);\n }\n catch (err) {\n throw new Error(exports.loc('LIB_OperationFailed', 'rmRF', err.message));\n }\n }\n}\nexports.rmRF = rmRF;\n/**\n * Exec a tool. Convenience wrapper over ToolRunner to exec with args in one call.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param args an arg string or array of args\n * @param options optional exec options. See IExecOptions\n * @returns number\n */\nfunction exec(tool, args, options) {\n var tr = this.tool(tool);\n tr.on('debug', function (data) {\n exports.debug(data);\n });\n if (args) {\n if (args instanceof Array) {\n tr.arg(args);\n }\n else if (typeof (args) === 'string') {\n tr.line(args);\n }\n }\n return tr.exec(options);\n}\nexports.exec = exec;\n/**\n * Exec a tool synchronously. Convenience wrapper over ToolRunner to execSync with args in one call.\n * Output will be *not* be streamed to the live console. It will be returned after execution is complete.\n * Appropriate for short running tools\n * Returns IExecResult with output and return code\n *\n * @param tool path to tool to exec\n * @param args an arg string or array of args\n * @param options optional exec options. See IExecSyncOptions\n * @returns IExecSyncResult\n */\nfunction execSync(tool, args, options) {\n var tr = this.tool(tool);\n tr.on('debug', function (data) {\n exports.debug(data);\n });\n if (args) {\n if (args instanceof Array) {\n tr.arg(args);\n }\n else if (typeof (args) === 'string') {\n tr.line(args);\n }\n }\n return tr.execSync(options);\n}\nexports.execSync = execSync;\n/**\n * Convenience factory to create a ToolRunner.\n *\n * @param tool path to tool to exec\n * @returns ToolRunner\n */\nfunction tool(tool) {\n var tr = new trm.ToolRunner(tool);\n tr.on('debug', function (message) {\n exports.debug(message);\n });\n return tr;\n}\nexports.tool = tool;\n/**\n * Applies glob patterns to a list of paths. Supports interleaved exclude patterns.\n *\n * @param list array of paths\n * @param patterns patterns to apply. supports interleaved exclude patterns.\n * @param patternRoot optional. default root to apply to unrooted patterns. not applied to basename-only patterns when matchBase:true.\n * @param options optional. defaults to { dot: true, nobrace: true, nocase: process.platform == 'win32' }.\n */\nfunction match(list, patterns, patternRoot, options) {\n // trace parameters\n exports.debug(\"patternRoot: '\" + patternRoot + \"'\");\n options = options || _getDefaultMatchOptions(); // default match options\n _debugMatchOptions(options);\n // convert pattern to an array\n if (typeof patterns == 'string') {\n patterns = [patterns];\n }\n // hashtable to keep track of matches\n var map = {};\n var originalOptions = options;\n for (var _i = 0, patterns_1 = patterns; _i < patterns_1.length; _i++) {\n var pattern = patterns_1[_i];\n exports.debug(\"pattern: '\" + pattern + \"'\");\n // trim and skip empty\n pattern = (pattern || '').trim();\n if (!pattern) {\n exports.debug('skipping empty pattern');\n continue;\n }\n // clone match options\n var options_1 = im._cloneMatchOptions(originalOptions);\n // skip comments\n if (!options_1.nocomment && im._startsWith(pattern, '#')) {\n exports.debug('skipping comment');\n continue;\n }\n // set nocomment - brace expansion could result in a leading '#'\n options_1.nocomment = true;\n // determine whether pattern is include or exclude\n var negateCount = 0;\n if (!options_1.nonegate) {\n while (pattern.charAt(negateCount) == '!') {\n negateCount++;\n }\n pattern = pattern.substring(negateCount); // trim leading '!'\n if (negateCount) {\n exports.debug(\"trimmed leading '!'. pattern: '\" + pattern + \"'\");\n }\n }\n var isIncludePattern = negateCount == 0 ||\n (negateCount % 2 == 0 && !options_1.flipNegate) ||\n (negateCount % 2 == 1 && options_1.flipNegate);\n // set nonegate - brace expansion could result in a leading '!'\n options_1.nonegate = true;\n options_1.flipNegate = false;\n // expand braces - required to accurately root patterns\n var expanded = void 0;\n var preExpanded = pattern;\n if (options_1.nobrace) {\n expanded = [pattern];\n }\n else {\n // convert slashes on Windows before calling braceExpand(). unfortunately this means braces cannot\n // be escaped on Windows, this limitation is consistent with current limitations of minimatch (3.0.3).\n exports.debug('expanding braces');\n var convertedPattern = process.platform == 'win32' ? pattern.replace(/\\\\/g, '/') : pattern;\n expanded = minimatch.braceExpand(convertedPattern);\n }\n // set nobrace\n options_1.nobrace = true;\n for (var _a = 0, expanded_1 = expanded; _a < expanded_1.length; _a++) {\n var pattern_1 = expanded_1[_a];\n if (expanded.length != 1 || pattern_1 != preExpanded) {\n exports.debug(\"pattern: '\" + pattern_1 + \"'\");\n }\n // trim and skip empty\n pattern_1 = (pattern_1 || '').trim();\n if (!pattern_1) {\n exports.debug('skipping empty pattern');\n continue;\n }\n // root the pattern when all of the following conditions are true:\n if (patternRoot && // patternRoot supplied\n !im._isRooted(pattern_1) && // AND pattern not rooted\n // AND matchBase:false or not basename only\n (!options_1.matchBase || (process.platform == 'win32' ? pattern_1.replace(/\\\\/g, '/') : pattern_1).indexOf('/') >= 0)) {\n pattern_1 = im._ensureRooted(patternRoot, pattern_1);\n exports.debug(\"rooted pattern: '\" + pattern_1 + \"'\");\n }\n if (isIncludePattern) {\n // apply the pattern\n exports.debug('applying include pattern against original list');\n var matchResults = minimatch.match(list, pattern_1, options_1);\n exports.debug(matchResults.length + ' matches');\n // union the results\n for (var _b = 0, matchResults_1 = matchResults; _b < matchResults_1.length; _b++) {\n var matchResult = matchResults_1[_b];\n map[matchResult] = true;\n }\n }\n else {\n // apply the pattern\n exports.debug('applying exclude pattern against original list');\n var matchResults = minimatch.match(list, pattern_1, options_1);\n exports.debug(matchResults.length + ' matches');\n // substract the results\n for (var _c = 0, matchResults_2 = matchResults; _c < matchResults_2.length; _c++) {\n var matchResult = matchResults_2[_c];\n delete map[matchResult];\n }\n }\n }\n }\n // return a filtered version of the original list (preserves order and prevents duplication)\n var result = list.filter(function (item) { return map.hasOwnProperty(item); });\n exports.debug(result.length + ' final results');\n return result;\n}\nexports.match = match;\n/**\n * Filter to apply glob patterns\n *\n * @param pattern pattern to apply\n * @param options optional. defaults to { dot: true, nobrace: true, nocase: process.platform == 'win32' }.\n */\nfunction filter(pattern, options) {\n options = options || _getDefaultMatchOptions();\n return minimatch.filter(pattern, options);\n}\nexports.filter = filter;\nfunction _debugMatchOptions(options) {\n exports.debug(\"matchOptions.debug: '\" + options.debug + \"'\");\n exports.debug(\"matchOptions.nobrace: '\" + options.nobrace + \"'\");\n exports.debug(\"matchOptions.noglobstar: '\" + options.noglobstar + \"'\");\n exports.debug(\"matchOptions.dot: '\" + options.dot + \"'\");\n exports.debug(\"matchOptions.noext: '\" + options.noext + \"'\");\n exports.debug(\"matchOptions.nocase: '\" + options.nocase + \"'\");\n exports.debug(\"matchOptions.nonull: '\" + options.nonull + \"'\");\n exports.debug(\"matchOptions.matchBase: '\" + options.matchBase + \"'\");\n exports.debug(\"matchOptions.nocomment: '\" + options.nocomment + \"'\");\n exports.debug(\"matchOptions.nonegate: '\" + options.nonegate + \"'\");\n exports.debug(\"matchOptions.flipNegate: '\" + options.flipNegate + \"'\");\n}\nfunction _getDefaultMatchOptions() {\n return {\n debug: false,\n nobrace: true,\n noglobstar: false,\n dot: true,\n noext: false,\n nocase: process.platform == 'win32',\n nonull: false,\n matchBase: false,\n nocomment: false,\n nonegate: false,\n flipNegate: false\n };\n}\n/**\n * Determines the find root from a list of patterns. Performs the find and then applies the glob patterns.\n * Supports interleaved exclude patterns. Unrooted patterns are rooted using defaultRoot, unless\n * matchOptions.matchBase is specified and the pattern is a basename only. For matchBase cases, the\n * defaultRoot is used as the find root.\n *\n * @param defaultRoot default path to root unrooted patterns. falls back to System.DefaultWorkingDirectory or process.cwd().\n * @param patterns pattern or array of patterns to apply\n * @param findOptions defaults to { followSymbolicLinks: true }. following soft links is generally appropriate unless deleting files.\n * @param matchOptions defaults to { dot: true, nobrace: true, nocase: process.platform == 'win32' }\n */\nfunction findMatch(defaultRoot, patterns, findOptions, matchOptions) {\n // apply defaults for parameters and trace\n defaultRoot = defaultRoot || this.getVariable('system.defaultWorkingDirectory') || process.cwd();\n exports.debug(\"defaultRoot: '\" + defaultRoot + \"'\");\n patterns = patterns || [];\n patterns = typeof patterns == 'string' ? [patterns] : patterns;\n findOptions = findOptions || _getDefaultFindOptions();\n _debugFindOptions(findOptions);\n matchOptions = matchOptions || _getDefaultMatchOptions();\n _debugMatchOptions(matchOptions);\n // normalize slashes for root dir\n defaultRoot = im._normalizeSeparators(defaultRoot);\n var results = {};\n var originalMatchOptions = matchOptions;\n for (var _i = 0, _a = (patterns || []); _i < _a.length; _i++) {\n var pattern = _a[_i];\n exports.debug(\"pattern: '\" + pattern + \"'\");\n // trim and skip empty\n pattern = (pattern || '').trim();\n if (!pattern) {\n exports.debug('skipping empty pattern');\n continue;\n }\n // clone match options\n var matchOptions_1 = im._cloneMatchOptions(originalMatchOptions);\n // skip comments\n if (!matchOptions_1.nocomment && im._startsWith(pattern, '#')) {\n exports.debug('skipping comment');\n continue;\n }\n // set nocomment - brace expansion could result in a leading '#'\n matchOptions_1.nocomment = true;\n // determine whether pattern is include or exclude\n var negateCount = 0;\n if (!matchOptions_1.nonegate) {\n while (pattern.charAt(negateCount) == '!') {\n negateCount++;\n }\n pattern = pattern.substring(negateCount); // trim leading '!'\n if (negateCount) {\n exports.debug(\"trimmed leading '!'. pattern: '\" + pattern + \"'\");\n }\n }\n var isIncludePattern = negateCount == 0 ||\n (negateCount % 2 == 0 && !matchOptions_1.flipNegate) ||\n (negateCount % 2 == 1 && matchOptions_1.flipNegate);\n // set nonegate - brace expansion could result in a leading '!'\n matchOptions_1.nonegate = true;\n matchOptions_1.flipNegate = false;\n // expand braces - required to accurately interpret findPath\n var expanded = void 0;\n var preExpanded = pattern;\n if (matchOptions_1.nobrace) {\n expanded = [pattern];\n }\n else {\n // convert slashes on Windows before calling braceExpand(). unfortunately this means braces cannot\n // be escaped on Windows, this limitation is consistent with current limitations of minimatch (3.0.3).\n exports.debug('expanding braces');\n var convertedPattern = process.platform == 'win32' ? pattern.replace(/\\\\/g, '/') : pattern;\n expanded = minimatch.braceExpand(convertedPattern);\n }\n // set nobrace\n matchOptions_1.nobrace = true;\n for (var _b = 0, expanded_2 = expanded; _b < expanded_2.length; _b++) {\n var pattern_2 = expanded_2[_b];\n if (expanded.length != 1 || pattern_2 != preExpanded) {\n exports.debug(\"pattern: '\" + pattern_2 + \"'\");\n }\n // trim and skip empty\n pattern_2 = (pattern_2 || '').trim();\n if (!pattern_2) {\n exports.debug('skipping empty pattern');\n continue;\n }\n if (isIncludePattern) {\n // determine the findPath\n var findInfo = im._getFindInfoFromPattern(defaultRoot, pattern_2, matchOptions_1);\n var findPath = findInfo.findPath;\n exports.debug(\"findPath: '\" + findPath + \"'\");\n if (!findPath) {\n exports.debug('skipping empty path');\n continue;\n }\n // perform the find\n exports.debug(\"statOnly: '\" + findInfo.statOnly + \"'\");\n var findResults = [];\n if (findInfo.statOnly) {\n // simply stat the path - all path segments were used to build the path\n try {\n fs.statSync(findPath);\n findResults.push(findPath);\n }\n catch (err) {\n if (err.code != 'ENOENT') {\n throw err;\n }\n exports.debug('ENOENT');\n }\n }\n else {\n findResults = find(findPath, findOptions);\n }\n exports.debug(\"found \" + findResults.length + \" paths\");\n // apply the pattern\n exports.debug('applying include pattern');\n if (findInfo.adjustedPattern != pattern_2) {\n exports.debug(\"adjustedPattern: '\" + findInfo.adjustedPattern + \"'\");\n pattern_2 = findInfo.adjustedPattern;\n }\n var matchResults = minimatch.match(findResults, pattern_2, matchOptions_1);\n exports.debug(matchResults.length + ' matches');\n // union the results\n for (var _c = 0, matchResults_3 = matchResults; _c < matchResults_3.length; _c++) {\n var matchResult = matchResults_3[_c];\n var key = process.platform == 'win32' ? matchResult.toUpperCase() : matchResult;\n results[key] = matchResult;\n }\n }\n else {\n // check if basename only and matchBase=true\n if (matchOptions_1.matchBase &&\n !im._isRooted(pattern_2) &&\n (process.platform == 'win32' ? pattern_2.replace(/\\\\/g, '/') : pattern_2).indexOf('/') < 0) {\n // do not root the pattern\n exports.debug('matchBase and basename only');\n }\n else {\n // root the exclude pattern\n pattern_2 = im._ensurePatternRooted(defaultRoot, pattern_2);\n exports.debug(\"after ensurePatternRooted, pattern: '\" + pattern_2 + \"'\");\n }\n // apply the pattern\n exports.debug('applying exclude pattern');\n var matchResults = minimatch.match(Object.keys(results).map(function (key) { return results[key]; }), pattern_2, matchOptions_1);\n exports.debug(matchResults.length + ' matches');\n // substract the results\n for (var _d = 0, matchResults_4 = matchResults; _d < matchResults_4.length; _d++) {\n var matchResult = matchResults_4[_d];\n var key = process.platform == 'win32' ? matchResult.toUpperCase() : matchResult;\n delete results[key];\n }\n }\n }\n }\n var finalResult = Object.keys(results)\n .map(function (key) { return results[key]; })\n .sort();\n exports.debug(finalResult.length + ' final results');\n return finalResult;\n}\nexports.findMatch = findMatch;\n/**\n * Build Proxy URL in the following format: protocol://username:password@hostname:port\n * @param proxyUrl Url address of the proxy server (eg: http://example.com)\n * @param proxyUsername Proxy username (optional)\n * @param proxyPassword Proxy password (optional)\n * @returns string\n */\nfunction getProxyFormattedUrl(proxyUrl, proxyUsername, proxyPassword) {\n var parsedUrl = new URL(proxyUrl);\n var proxyAddress = parsedUrl.protocol + \"//\" + parsedUrl.host;\n if (proxyUsername) {\n proxyAddress = parsedUrl.protocol + \"//\" + proxyUsername + \":\" + proxyPassword + \"@\" + parsedUrl.host;\n }\n return proxyAddress;\n}\n/**\n * Gets http proxy configuration used by Build/Release agent\n *\n * @return ProxyConfiguration\n */\nfunction getHttpProxyConfiguration(requestUrl) {\n var proxyUrl = exports.getVariable('Agent.ProxyUrl');\n if (proxyUrl && proxyUrl.length > 0) {\n var proxyUsername = exports.getVariable('Agent.ProxyUsername');\n var proxyPassword = exports.getVariable('Agent.ProxyPassword');\n var proxyBypassHosts = JSON.parse(exports.getVariable('Agent.ProxyBypassList') || '[]');\n var bypass_1 = false;\n if (requestUrl) {\n proxyBypassHosts.forEach(function (bypassHost) {\n if (new RegExp(bypassHost, 'i').test(requestUrl)) {\n bypass_1 = true;\n }\n });\n }\n if (bypass_1) {\n return null;\n }\n else {\n var proxyAddress = getProxyFormattedUrl(proxyUrl, proxyUsername, proxyPassword);\n return {\n proxyUrl: proxyUrl,\n proxyUsername: proxyUsername,\n proxyPassword: proxyPassword,\n proxyBypassHosts: proxyBypassHosts,\n proxyFormattedUrl: proxyAddress\n };\n }\n }\n else {\n return null;\n }\n}\nexports.getHttpProxyConfiguration = getHttpProxyConfiguration;\n/**\n * Gets http certificate configuration used by Build/Release agent\n *\n * @return CertConfiguration\n */\nfunction getHttpCertConfiguration() {\n var ca = exports.getVariable('Agent.CAInfo');\n var clientCert = exports.getVariable('Agent.ClientCert');\n if (ca || clientCert) {\n var certConfig = {};\n certConfig.caFile = ca;\n certConfig.certFile = clientCert;\n if (clientCert) {\n var clientCertKey = exports.getVariable('Agent.ClientCertKey');\n var clientCertArchive = exports.getVariable('Agent.ClientCertArchive');\n var clientCertPassword = exports.getVariable('Agent.ClientCertPassword');\n certConfig.keyFile = clientCertKey;\n certConfig.certArchiveFile = clientCertArchive;\n certConfig.passphrase = clientCertPassword;\n }\n return certConfig;\n }\n else {\n return null;\n }\n}\nexports.getHttpCertConfiguration = getHttpCertConfiguration;\n//-----------------------------------------------------\n// Test Publisher\n//-----------------------------------------------------\nvar TestPublisher = /** @class */ (function () {\n function TestPublisher(testRunner) {\n this.testRunner = testRunner;\n }\n TestPublisher.prototype.publish = function (resultFiles, mergeResults, platform, config, runTitle, publishRunAttachments, testRunSystem) {\n // Could have used an initializer, but wanted to avoid reordering parameters when converting to strict null checks\n // (A parameter cannot both be optional and have an initializer)\n testRunSystem = testRunSystem || \"VSTSTask\";\n var properties = {};\n properties['type'] = this.testRunner;\n if (mergeResults) {\n properties['mergeResults'] = mergeResults;\n }\n if (platform) {\n properties['platform'] = platform;\n }\n if (config) {\n properties['config'] = config;\n }\n if (runTitle) {\n properties['runTitle'] = runTitle;\n }\n if (publishRunAttachments) {\n properties['publishRunAttachments'] = publishRunAttachments;\n }\n if (resultFiles) {\n properties['resultFiles'] = Array.isArray(resultFiles) ? resultFiles.join() : resultFiles;\n }\n properties['testRunSystem'] = testRunSystem;\n exports.command('results.publish', properties, '');\n };\n return TestPublisher;\n}());\nexports.TestPublisher = TestPublisher;\n//-----------------------------------------------------\n// Code coverage Publisher\n//-----------------------------------------------------\nvar CodeCoveragePublisher = /** @class */ (function () {\n function CodeCoveragePublisher() {\n }\n CodeCoveragePublisher.prototype.publish = function (codeCoverageTool, summaryFileLocation, reportDirectory, additionalCodeCoverageFiles) {\n var properties = {};\n if (codeCoverageTool) {\n properties['codecoveragetool'] = codeCoverageTool;\n }\n if (summaryFileLocation) {\n properties['summaryfile'] = summaryFileLocation;\n }\n if (reportDirectory) {\n properties['reportdirectory'] = reportDirectory;\n }\n if (additionalCodeCoverageFiles) {\n properties['additionalcodecoveragefiles'] = Array.isArray(additionalCodeCoverageFiles) ? additionalCodeCoverageFiles.join() : additionalCodeCoverageFiles;\n }\n exports.command('codecoverage.publish', properties, \"\");\n };\n return CodeCoveragePublisher;\n}());\nexports.CodeCoveragePublisher = CodeCoveragePublisher;\n//-----------------------------------------------------\n// Code coverage Publisher\n//-----------------------------------------------------\nvar CodeCoverageEnabler = /** @class */ (function () {\n function CodeCoverageEnabler(buildTool, ccTool) {\n this.buildTool = buildTool;\n this.ccTool = ccTool;\n }\n CodeCoverageEnabler.prototype.enableCodeCoverage = function (buildProps) {\n buildProps['buildtool'] = this.buildTool;\n buildProps['codecoveragetool'] = this.ccTool;\n exports.command('codecoverage.enable', buildProps, \"\");\n };\n return CodeCoverageEnabler;\n}());\nexports.CodeCoverageEnabler = CodeCoverageEnabler;\n//-----------------------------------------------------\n// Task Logging Commands\n//-----------------------------------------------------\n/**\n * Upload user interested file as additional log information\n * to the current timeline record.\n *\n * The file shall be available for download along with task logs.\n *\n * @param path Path to the file that should be uploaded.\n * @returns void\n */\nfunction uploadFile(path) {\n exports.command(\"task.uploadfile\", null, path);\n}\nexports.uploadFile = uploadFile;\n/**\n * Instruction for the agent to update the PATH environment variable.\n * The specified directory is prepended to the PATH.\n * The updated environment variable will be reflected in subsequent tasks.\n *\n * @param path Local directory path.\n * @returns void\n */\nfunction prependPath(path) {\n assertAgent(\"2.115.0\");\n exports.command(\"task.prependpath\", null, path);\n}\nexports.prependPath = prependPath;\n/**\n * Upload and attach summary markdown to current timeline record.\n * This summary shall be added to the build/release summary and\n * not available for download with logs.\n *\n * @param path Local directory path.\n * @returns void\n */\nfunction uploadSummary(path) {\n exports.command(\"task.uploadsummary\", null, path);\n}\nexports.uploadSummary = uploadSummary;\n/**\n * Upload and attach attachment to current timeline record.\n * These files are not available for download with logs.\n * These can only be referred to by extensions using the type or name values.\n *\n * @param type Attachment type.\n * @param name Attachment name.\n * @param path Attachment path.\n * @returns void\n */\nfunction addAttachment(type, name, path) {\n exports.command(\"task.addattachment\", { \"type\": type, \"name\": name }, path);\n}\nexports.addAttachment = addAttachment;\n/**\n * Set an endpoint field with given value.\n * Value updated will be retained in the endpoint for\n * the subsequent tasks that execute within the same job.\n *\n * @param id Endpoint id.\n * @param field FieldType enum of AuthParameter, DataParameter or Url.\n * @param key Key.\n * @param value Value for key or url.\n * @returns void\n */\nfunction setEndpoint(id, field, key, value) {\n exports.command(\"task.setendpoint\", { \"id\": id, \"field\": FieldType[field].toLowerCase(), \"key\": key }, value);\n}\nexports.setEndpoint = setEndpoint;\n/**\n * Set progress and current operation for current task.\n *\n * @param percent Percentage of completion.\n * @param currentOperation Current pperation.\n * @returns void\n */\nfunction setProgress(percent, currentOperation) {\n exports.command(\"task.setprogress\", { \"value\": \"\" + percent }, currentOperation);\n}\nexports.setProgress = setProgress;\n/**\n * Indicates whether to write the logging command directly to the host or to the output pipeline.\n *\n * @param id Timeline record Guid.\n * @param parentId Parent timeline record Guid.\n * @param recordType Record type.\n * @param recordName Record name.\n * @param order Order of timeline record.\n * @param startTime Start time.\n * @param finishTime End time.\n * @param progress Percentage of completion.\n * @param state TaskState enum of Unknown, Initialized, InProgress or Completed.\n * @param result TaskResult enum of Succeeded, SucceededWithIssues, Failed, Cancelled or Skipped.\n * @param message current operation\n * @returns void\n */\nfunction logDetail(id, message, parentId, recordType, recordName, order, startTime, finishTime, progress, state, result) {\n var properties = {\n \"id\": id,\n \"parentid\": parentId,\n \"type\": recordType,\n \"name\": recordName,\n \"order\": order ? order.toString() : undefined,\n \"starttime\": startTime,\n \"finishtime\": finishTime,\n \"progress\": progress ? progress.toString() : undefined,\n \"state\": state ? TaskState[state] : undefined,\n \"result\": result ? TaskResult[result] : undefined\n };\n exports.command(\"task.logdetail\", properties, message);\n}\nexports.logDetail = logDetail;\n/**\n * Log error or warning issue to timeline record of current task.\n *\n * @param type IssueType enum of Error or Warning.\n * @param sourcePath Source file location.\n * @param lineNumber Line number.\n * @param columnNumber Column number.\n * @param code Error or warning code.\n * @param message Error or warning message.\n * @returns void\n */\nfunction logIssue(type, message, sourcePath, lineNumber, columnNumber, errorCode) {\n var properties = {\n \"type\": IssueType[type].toLowerCase(),\n \"code\": errorCode,\n \"sourcepath\": sourcePath,\n \"linenumber\": lineNumber ? lineNumber.toString() : undefined,\n \"columnnumber\": columnNumber ? columnNumber.toString() : undefined,\n };\n exports.command(\"task.logissue\", properties, message);\n}\nexports.logIssue = logIssue;\n//-----------------------------------------------------\n// Artifact Logging Commands\n//-----------------------------------------------------\n/**\n * Upload user interested file as additional log information\n * to the current timeline record.\n *\n * The file shall be available for download along with task logs.\n *\n * @param containerFolder Folder that the file will upload to, folder will be created if needed.\n * @param path Path to the file that should be uploaded.\n * @param name Artifact name.\n * @returns void\n */\nfunction uploadArtifact(containerFolder, path, name) {\n exports.command(\"artifact.upload\", { \"containerfolder\": containerFolder, \"artifactname\": name }, path);\n}\nexports.uploadArtifact = uploadArtifact;\n/**\n * Create an artifact link, artifact location is required to be\n * a file container path, VC path or UNC share path.\n *\n * The file shall be available for download along with task logs.\n *\n * @param name Artifact name.\n * @param path Path to the file that should be associated.\n * @param artifactType ArtifactType enum of Container, FilePath, VersionControl, GitRef or TfvcLabel.\n * @returns void\n */\nfunction associateArtifact(name, path, artifactType) {\n exports.command(\"artifact.associate\", { \"type\": ArtifactType[artifactType].toLowerCase(), \"artifactname\": name }, path);\n}\nexports.associateArtifact = associateArtifact;\n//-----------------------------------------------------\n// Build Logging Commands\n//-----------------------------------------------------\n/**\n * Upload user interested log to build’s container “logs\\tool” folder.\n *\n * @param path Path to the file that should be uploaded.\n * @returns void\n */\nfunction uploadBuildLog(path) {\n exports.command(\"build.uploadlog\", null, path);\n}\nexports.uploadBuildLog = uploadBuildLog;\n/**\n * Update build number for current build.\n *\n * @param value Value to be assigned as the build number.\n * @returns void\n */\nfunction updateBuildNumber(value) {\n exports.command(\"build.updatebuildnumber\", null, value);\n}\nexports.updateBuildNumber = updateBuildNumber;\n/**\n * Add a tag for current build.\n *\n * @param value Tag value.\n * @returns void\n */\nfunction addBuildTag(value) {\n exports.command(\"build.addbuildtag\", null, value);\n}\nexports.addBuildTag = addBuildTag;\n//-----------------------------------------------------\n// Release Logging Commands\n//-----------------------------------------------------\n/**\n * Update release name for current release.\n *\n * @param value Value to be assigned as the release name.\n * @returns void\n */\nfunction updateReleaseName(name) {\n assertAgent(\"2.132.0\");\n exports.command(\"release.updatereleasename\", null, name);\n}\nexports.updateReleaseName = updateReleaseName;\n//-----------------------------------------------------\n// Tools\n//-----------------------------------------------------\nexports.TaskCommand = tcm.TaskCommand;\nexports.commandFromString = tcm.commandFromString;\nexports.ToolRunner = trm.ToolRunner;\n//-----------------------------------------------------\n// Validation Checks\n//-----------------------------------------------------\n// async await needs generators in node 4.x+\nif (semver.lt(process.versions.node, '4.2.0')) {\n exports.warning('Tasks require a new agent. Upgrade your agent or node to 4.2.0 or later');\n}\n//-------------------------------------------------------------------\n// Populate the vault with sensitive data. Inputs and Endpoints\n//-------------------------------------------------------------------\n// avoid loading twice (overwrites .taskkey)\nif (!global['_vsts_task_lib_loaded']) {\n im._loadData();\n im._exposeProxySettings();\n im._exposeCertSettings();\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.commandFromString = exports.TaskCommand = void 0;\n//\n// Command Format:\n// ##vso[artifact.command key=value;key=value]user message\n// \n// Examples:\n// ##vso[task.progress value=58]\n// ##vso[task.issue type=warning;]This is the user warning message\n//\nvar CMD_PREFIX = '##vso[';\nvar TaskCommand = /** @class */ (function () {\n function TaskCommand(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n TaskCommand.prototype.toString = function () {\n var cmdStr = CMD_PREFIX + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n for (var key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n var val = this.properties[key];\n if (val) {\n // safely append the val - avoid blowing up when attempting to\n // call .replace() if message is not a string for some reason\n cmdStr += key + '=' + escape('' + (val || '')) + ';';\n }\n }\n }\n }\n cmdStr += ']';\n // safely append the message - avoid blowing up when attempting to\n // call .replace() if message is not a string for some reason\n var message = '' + (this.message || '');\n cmdStr += escapedata(message);\n return cmdStr;\n };\n return TaskCommand;\n}());\nexports.TaskCommand = TaskCommand;\nfunction commandFromString(commandLine) {\n var preLen = CMD_PREFIX.length;\n var lbPos = commandLine.indexOf('[');\n var rbPos = commandLine.indexOf(']');\n if (lbPos == -1 || rbPos == -1 || rbPos - lbPos < 3) {\n throw new Error('Invalid command brackets');\n }\n var cmdInfo = commandLine.substring(lbPos + 1, rbPos);\n var spaceIdx = cmdInfo.indexOf(' ');\n var command = cmdInfo;\n var properties = {};\n if (spaceIdx > 0) {\n command = cmdInfo.trim().substring(0, spaceIdx);\n var propSection = cmdInfo.trim().substring(spaceIdx + 1);\n var propLines = propSection.split(';');\n propLines.forEach(function (propLine) {\n propLine = propLine.trim();\n if (propLine.length > 0) {\n var eqIndex = propLine.indexOf('=');\n if (eqIndex == -1) {\n throw new Error('Invalid property: ' + propLine);\n }\n var key = propLine.substring(0, eqIndex);\n var val = propLine.substring(eqIndex + 1);\n properties[key] = unescape(val);\n }\n });\n }\n var msg = unescapedata(commandLine.substring(rbPos + 1));\n var cmd = new TaskCommand(command, properties, msg);\n return cmd;\n}\nexports.commandFromString = commandFromString;\nfunction escapedata(s) {\n return s.replace(/%/g, '%AZP25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction unescapedata(s) {\n return s.replace(/%0D/g, '\\r')\n .replace(/%0A/g, '\\n')\n .replace(/%AZP25/g, '%');\n}\nfunction escape(s) {\n return s.replace(/%/g, '%AZP25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/]/g, '%5D')\n .replace(/;/g, '%3B');\n}\nfunction unescape(s) {\n return s.replace(/%0D/g, '\\r')\n .replace(/%0A/g, '\\n')\n .replace(/%5D/g, ']')\n .replace(/%3B/g, ';')\n .replace(/%AZP25/g, '%');\n}\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ToolRunner = void 0;\nvar Q = require(\"q\");\nvar os = require(\"os\");\nvar events = require(\"events\");\nvar child = require(\"child_process\");\nvar im = require(\"./internal\");\nvar fs = require(\"fs\");\nvar ToolRunner = /** @class */ (function (_super) {\n __extends(ToolRunner, _super);\n function ToolRunner(toolPath) {\n var _this = _super.call(this) || this;\n _this.cmdSpecialChars = [' ', '\\t', '&', '(', ')', '[', ']', '{', '}', '^', '=', ';', '!', '\\'', '+', ',', '`', '~', '|', '<', '>', '\"'];\n if (!toolPath) {\n throw new Error('Parameter \\'toolPath\\' cannot be null or empty.');\n }\n _this.toolPath = im._which(toolPath, true);\n _this.args = [];\n _this._debug('toolRunner toolPath: ' + toolPath);\n return _this;\n }\n ToolRunner.prototype._debug = function (message) {\n this.emit('debug', message);\n };\n ToolRunner.prototype._argStringToArray = function (argString) {\n var args = [];\n var inQuotes = false;\n var escaped = false;\n var lastCharWasSpace = true;\n var arg = '';\n var append = function (c) {\n // we only escape double quotes.\n if (escaped) {\n if (c !== '\"') {\n arg += '\\\\';\n }\n else {\n arg.slice(0, -1);\n }\n }\n arg += c;\n escaped = false;\n };\n for (var i = 0; i < argString.length; i++) {\n var c = argString.charAt(i);\n if (c === ' ' && !inQuotes) {\n if (!lastCharWasSpace) {\n args.push(arg);\n arg = '';\n }\n lastCharWasSpace = true;\n continue;\n }\n else {\n lastCharWasSpace = false;\n }\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === \"\\\\\" && escaped) {\n append(c);\n continue;\n }\n if (c === \"\\\\\" && inQuotes) {\n escaped = true;\n continue;\n }\n append(c);\n lastCharWasSpace = false;\n }\n if (!lastCharWasSpace) {\n args.push(arg.trim());\n }\n return args;\n };\n ToolRunner.prototype._getCommandString = function (options, noPrefix) {\n var _this = this;\n var toolPath = this._getSpawnFileName();\n var args = this._getSpawnArgs(options);\n var cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n var commandParts = [];\n if (process.platform == 'win32') {\n // Windows + cmd file\n if (this._isCmdFile()) {\n commandParts.push(toolPath);\n commandParts = commandParts.concat(args);\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n commandParts.push(\"\\\"\" + toolPath + \"\\\"\");\n commandParts = commandParts.concat(args);\n }\n else if (options.shell) {\n commandParts.push(this._windowsQuoteCmdArg(toolPath));\n commandParts = commandParts.concat(args);\n }\n // Windows (regular)\n else {\n commandParts.push(this._windowsQuoteCmdArg(toolPath));\n commandParts = commandParts.concat(args.map(function (arg) { return _this._windowsQuoteCmdArg(arg); }));\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n commandParts.push(toolPath);\n commandParts = commandParts.concat(args);\n }\n cmd += commandParts.join(' ');\n // append second tool\n if (this.pipeOutputToTool) {\n cmd += ' | ' + this.pipeOutputToTool._getCommandString(options, /*noPrefix:*/ true);\n }\n return cmd;\n };\n ToolRunner.prototype._processLineBuffer = function (data, strBuffer, onLine) {\n try {\n var s = strBuffer + data.toString();\n var n = s.indexOf(os.EOL);\n while (n > -1) {\n var line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n strBuffer = s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug('error processing line');\n }\n };\n /**\n * Wraps an arg string with specified char if it's not already wrapped\n * @returns {string} Arg wrapped with specified char\n * @param {string} arg Input argument string\n * @param {string} wrapChar A char input string should be wrapped with\n */\n ToolRunner.prototype._wrapArg = function (arg, wrapChar) {\n if (!this._isWrapped(arg, wrapChar)) {\n return \"\" + wrapChar + arg + wrapChar;\n }\n return arg;\n };\n /**\n * Unwraps an arg string wrapped with specified char\n * @param arg Arg wrapped with specified char\n * @param wrapChar A char to be removed\n */\n ToolRunner.prototype._unwrapArg = function (arg, wrapChar) {\n if (this._isWrapped(arg, wrapChar)) {\n var pattern = new RegExp(\"(^\\\\\\\\?\" + wrapChar + \")|(\\\\\\\\?\" + wrapChar + \"$)\", 'g');\n return arg.trim().replace(pattern, '');\n }\n return arg;\n };\n /**\n * Determine if arg string is wrapped with specified char\n * @param arg Input arg string\n */\n ToolRunner.prototype._isWrapped = function (arg, wrapChar) {\n var pattern = new RegExp(\"^\\\\\\\\?\" + wrapChar + \".+\\\\\\\\?\" + wrapChar + \"$\");\n return pattern.test(arg.trim());\n };\n ToolRunner.prototype._getSpawnFileName = function (options) {\n if (process.platform == 'win32') {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n if (options && options.shell) {\n return this._wrapArg(this.toolPath, '\"');\n }\n return this.toolPath;\n };\n ToolRunner.prototype._getSpawnArgs = function (options) {\n var _this = this;\n if (process.platform == 'win32') {\n if (this._isCmdFile()) {\n var argline = \"/D /S /C \\\"\" + this._windowsQuoteCmdArg(this.toolPath);\n for (var i = 0; i < this.args.length; i++) {\n argline += ' ';\n argline += options.windowsVerbatimArguments ? this.args[i] : this._windowsQuoteCmdArg(this.args[i]);\n }\n argline += '\"';\n return [argline];\n }\n if (options.windowsVerbatimArguments) {\n // note, in Node 6.x options.argv0 can be used instead of overriding args.slice and args.unshift.\n // for more details, refer to https://github.com/nodejs/node/blob/v6.x/lib/child_process.js\n var args_1 = this.args.slice(0); // copy the array\n // override slice to prevent Node from creating a copy of the arg array.\n // we need Node to use the \"unshift\" override below.\n args_1.slice = function () {\n if (arguments.length != 1 || arguments[0] != 0) {\n throw new Error('Unexpected arguments passed to args.slice when windowsVerbatimArguments flag is set.');\n }\n return args_1;\n };\n // override unshift\n //\n // when using the windowsVerbatimArguments option, Node does not quote the tool path when building\n // the cmdline parameter for the win32 function CreateProcess(). an unquoted space in the tool path\n // causes problems for tools when attempting to parse their own command line args. tools typically\n // assume their arguments begin after arg 0.\n //\n // by hijacking unshift, we can quote the tool path when it pushed onto the args array. Node builds\n // the cmdline parameter from the args array.\n //\n // note, we can't simply pass a quoted tool path to Node for multiple reasons:\n // 1) Node verifies the file exists (calls win32 function GetFileAttributesW) and the check returns\n // false if the path is quoted.\n // 2) Node passes the tool path as the application parameter to CreateProcess, which expects the\n // path to be unquoted.\n //\n // also note, in addition to the tool path being embedded within the cmdline parameter, Node also\n // passes the tool path to CreateProcess via the application parameter (optional parameter). when\n // present, Windows uses the application parameter to determine which file to run, instead of\n // interpreting the file from the cmdline parameter.\n args_1.unshift = function () {\n if (arguments.length != 1) {\n throw new Error('Unexpected arguments passed to args.unshift when windowsVerbatimArguments flag is set.');\n }\n return Array.prototype.unshift.call(args_1, \"\\\"\" + arguments[0] + \"\\\"\"); // quote the file name\n };\n return args_1;\n }\n else if (options.shell) {\n var args = [];\n for (var _i = 0, _a = this.args; _i < _a.length; _i++) {\n var arg = _a[_i];\n if (this._needQuotesForCmd(arg, '%')) {\n args.push(this._wrapArg(arg, '\"'));\n }\n else {\n args.push(arg);\n }\n }\n return args;\n }\n }\n else if (options.shell) {\n return this.args.map(function (arg) {\n if (_this._isWrapped(arg, \"'\")) {\n return arg;\n }\n // remove wrapping double quotes to avoid escaping\n arg = _this._unwrapArg(arg, '\"');\n arg = _this._escapeChar(arg, '\"');\n return _this._wrapArg(arg, '\"');\n });\n }\n return this.args;\n };\n /**\n * Escape specified character.\n * @param arg String to escape char in\n * @param charToEscape Char should be escaped\n */\n ToolRunner.prototype._escapeChar = function (arg, charToEscape) {\n var escChar = \"\\\\\";\n var output = '';\n var charIsEscaped = false;\n for (var _i = 0, arg_1 = arg; _i < arg_1.length; _i++) {\n var char = arg_1[_i];\n if (char === charToEscape && !charIsEscaped) {\n output += escChar + char;\n }\n else {\n output += char;\n }\n charIsEscaped = char === escChar && !charIsEscaped;\n }\n return output;\n };\n ToolRunner.prototype._isCmdFile = function () {\n var upperToolPath = this.toolPath.toUpperCase();\n return im._endsWith(upperToolPath, '.CMD') || im._endsWith(upperToolPath, '.BAT');\n };\n /**\n * Determine whether the cmd arg needs to be quoted. Returns true if arg contains any of special chars array.\n * @param arg The cmd command arg.\n * @param additionalChars Additional chars which should be also checked.\n */\n ToolRunner.prototype._needQuotesForCmd = function (arg, additionalChars) {\n var specialChars = this.cmdSpecialChars;\n if (additionalChars) {\n specialChars = this.cmdSpecialChars.concat(additionalChars);\n }\n var _loop_1 = function (char) {\n if (specialChars.some(function (x) { return x === char; })) {\n return { value: true };\n }\n };\n for (var _i = 0, arg_2 = arg; _i < arg_2.length; _i++) {\n var char = arg_2[_i];\n var state_1 = _loop_1(char);\n if (typeof state_1 === \"object\")\n return state_1.value;\n }\n return false;\n };\n ToolRunner.prototype._windowsQuoteCmdArg = function (arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uv_quote_cmd_arg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n var needsQuotes = this._needQuotesForCmd(arg);\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that preceed a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n var reverse = '\"';\n var quote_hit = true;\n for (var i = arg.length; i > 0; i--) { // walk the string in reverse\n reverse += arg[i - 1];\n if (quote_hit && arg[i - 1] == '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] == '\"') {\n quote_hit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quote_hit = false;\n }\n }\n reverse += '\"';\n return reverse.split('').reverse().join('');\n };\n ToolRunner.prototype._uv_quote_cmd_arg = function (arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (arg.indexOf(' ') < 0 && arg.indexOf('\\t') < 0 && arg.indexOf('\"') < 0) {\n // No quotation needed\n return arg;\n }\n if (arg.indexOf('\"') < 0 && arg.indexOf('\\\\') < 0) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return \"\\\"\" + arg + \"\\\"\";\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n var reverse = '\"';\n var quote_hit = true;\n for (var i = arg.length; i > 0; i--) { // walk the string in reverse\n reverse += arg[i - 1];\n if (quote_hit && arg[i - 1] == '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] == '\"') {\n quote_hit = true;\n reverse += '\\\\';\n }\n else {\n quote_hit = false;\n }\n }\n reverse += '\"';\n return reverse.split('').reverse().join('');\n };\n ToolRunner.prototype._cloneExecOptions = function (options) {\n options = options || {};\n var result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n shell: options.shell || false\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n };\n ToolRunner.prototype._getSpawnOptions = function (options) {\n options = options || {};\n var result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result.shell = options.shell;\n result['windowsVerbatimArguments'] = options.windowsVerbatimArguments || this._isCmdFile();\n return result;\n };\n ToolRunner.prototype._getSpawnSyncOptions = function (options) {\n var result = {};\n result.maxBuffer = 1024 * 1024 * 1024;\n result.cwd = options.cwd;\n result.env = options.env;\n result.shell = options.shell;\n result['windowsVerbatimArguments'] = options.windowsVerbatimArguments || this._isCmdFile();\n return result;\n };\n ToolRunner.prototype.execWithPiping = function (pipeOutputToTool, options) {\n var _this = this;\n var _a, _b, _c, _d;\n var defer = Q.defer();\n this._debug('exec tool: ' + this.toolPath);\n this._debug('arguments:');\n this.args.forEach(function (arg) {\n _this._debug(' ' + arg);\n });\n var success = true;\n var optionsNonNull = this._cloneExecOptions(options);\n if (!optionsNonNull.silent) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n var cp;\n var toolPath = pipeOutputToTool.toolPath;\n var toolPathFirst;\n var successFirst = true;\n var returnCodeFirst;\n var fileStream;\n var waitingEvents = 0; // number of process or stream events we are waiting on to complete\n var returnCode = 0;\n var error;\n toolPathFirst = this.toolPath;\n // Following node documentation example from this link on how to pipe output of one process to another\n // https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options\n //start the child process for both tools\n waitingEvents++;\n var cpFirst = child.spawn(this._getSpawnFileName(optionsNonNull), this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(optionsNonNull));\n waitingEvents++;\n cp = child.spawn(pipeOutputToTool._getSpawnFileName(optionsNonNull), pipeOutputToTool._getSpawnArgs(optionsNonNull), pipeOutputToTool._getSpawnOptions(optionsNonNull));\n fileStream = this.pipeOutputToFile ? fs.createWriteStream(this.pipeOutputToFile) : null;\n if (fileStream) {\n waitingEvents++;\n fileStream.on('finish', function () {\n waitingEvents--; //file write is complete\n fileStream = null;\n if (waitingEvents == 0) {\n if (error) {\n defer.reject(error);\n }\n else {\n defer.resolve(returnCode);\n }\n }\n });\n fileStream.on('error', function (err) {\n waitingEvents--; //there were errors writing to the file, write is done\n _this._debug(\"Failed to pipe output of \" + toolPathFirst + \" to file \" + _this.pipeOutputToFile + \". Error = \" + err);\n fileStream = null;\n if (waitingEvents == 0) {\n if (error) {\n defer.reject(error);\n }\n else {\n defer.resolve(returnCode);\n }\n }\n });\n }\n //pipe stdout of first tool to stdin of second tool\n (_a = cpFirst.stdout) === null || _a === void 0 ? void 0 : _a.on('data', function (data) {\n var _a;\n try {\n if (fileStream) {\n fileStream.write(data);\n }\n (_a = cp.stdin) === null || _a === void 0 ? void 0 : _a.write(data);\n }\n catch (err) {\n _this._debug('Failed to pipe output of ' + toolPathFirst + ' to ' + toolPath);\n _this._debug(toolPath + ' might have exited due to errors prematurely. Verify the arguments passed are valid.');\n }\n });\n (_b = cpFirst.stderr) === null || _b === void 0 ? void 0 : _b.on('data', function (data) {\n if (fileStream) {\n fileStream.write(data);\n }\n successFirst = !optionsNonNull.failOnStdErr;\n if (!optionsNonNull.silent) {\n var s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream;\n s.write(data);\n }\n });\n cpFirst.on('error', function (err) {\n var _a;\n waitingEvents--; //first process is complete with errors\n if (fileStream) {\n fileStream.end();\n }\n (_a = cp.stdin) === null || _a === void 0 ? void 0 : _a.end();\n error = new Error(toolPathFirst + ' failed. ' + err.message);\n if (waitingEvents == 0) {\n defer.reject(error);\n }\n });\n cpFirst.on('close', function (code, signal) {\n var _a;\n waitingEvents--; //first process is complete\n if (code != 0 && !optionsNonNull.ignoreReturnCode) {\n successFirst = false;\n returnCodeFirst = code;\n returnCode = returnCodeFirst;\n }\n _this._debug('success of first tool:' + successFirst);\n if (fileStream) {\n fileStream.end();\n }\n (_a = cp.stdin) === null || _a === void 0 ? void 0 : _a.end();\n if (waitingEvents == 0) {\n if (error) {\n defer.reject(error);\n }\n else {\n defer.resolve(returnCode);\n }\n }\n });\n var stdbuffer = '';\n (_c = cp.stdout) === null || _c === void 0 ? void 0 : _c.on('data', function (data) {\n _this.emit('stdout', data);\n if (!optionsNonNull.silent) {\n optionsNonNull.outStream.write(data);\n }\n _this._processLineBuffer(data, stdbuffer, function (line) {\n _this.emit('stdline', line);\n });\n });\n var errbuffer = '';\n (_d = cp.stderr) === null || _d === void 0 ? void 0 : _d.on('data', function (data) {\n _this.emit('stderr', data);\n success = !optionsNonNull.failOnStdErr;\n if (!optionsNonNull.silent) {\n var s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream;\n s.write(data);\n }\n _this._processLineBuffer(data, errbuffer, function (line) {\n _this.emit('errline', line);\n });\n });\n cp.on('error', function (err) {\n waitingEvents--; //process is done with errors\n error = new Error(toolPath + ' failed. ' + err.message);\n if (waitingEvents == 0) {\n defer.reject(error);\n }\n });\n cp.on('close', function (code, signal) {\n waitingEvents--; //process is complete\n _this._debug('rc:' + code);\n returnCode = code;\n if (stdbuffer.length > 0) {\n _this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n _this.emit('errline', errbuffer);\n }\n if (code != 0 && !optionsNonNull.ignoreReturnCode) {\n success = false;\n }\n _this._debug('success:' + success);\n if (!successFirst) { //in the case output is piped to another tool, check exit code of both tools\n error = new Error(toolPathFirst + ' failed with return code: ' + returnCodeFirst);\n }\n else if (!success) {\n error = new Error(toolPath + ' failed with return code: ' + code);\n }\n if (waitingEvents == 0) {\n if (error) {\n defer.reject(error);\n }\n else {\n defer.resolve(returnCode);\n }\n }\n });\n return defer.promise;\n };\n /**\n * Add argument\n * Append an argument or an array of arguments\n * returns ToolRunner for chaining\n *\n * @param val string cmdline or array of strings\n * @returns ToolRunner\n */\n ToolRunner.prototype.arg = function (val) {\n if (!val) {\n return this;\n }\n if (val instanceof Array) {\n this._debug(this.toolPath + ' arg: ' + JSON.stringify(val));\n this.args = this.args.concat(val);\n }\n else if (typeof (val) === 'string') {\n this._debug(this.toolPath + ' arg: ' + val);\n this.args = this.args.concat(val.trim());\n }\n return this;\n };\n /**\n * Parses an argument line into one or more arguments\n * e.g. .line('\"arg one\" two -z') is equivalent to .arg(['arg one', 'two', '-z'])\n * returns ToolRunner for chaining\n *\n * @param val string argument line\n * @returns ToolRunner\n */\n ToolRunner.prototype.line = function (val) {\n if (!val) {\n return this;\n }\n this._debug(this.toolPath + ' arg: ' + val);\n this.args = this.args.concat(this._argStringToArray(val));\n return this;\n };\n /**\n * Add argument(s) if a condition is met\n * Wraps arg(). See arg for details\n * returns ToolRunner for chaining\n *\n * @param condition boolean condition\n * @param val string cmdline or array of strings\n * @returns ToolRunner\n */\n ToolRunner.prototype.argIf = function (condition, val) {\n if (condition) {\n this.arg(val);\n }\n return this;\n };\n /**\n * Pipe output of exec() to another tool\n * @param tool\n * @param file optional filename to additionally stream the output to.\n * @returns {ToolRunner}\n */\n ToolRunner.prototype.pipeExecOutputToTool = function (tool, file) {\n this.pipeOutputToTool = tool;\n this.pipeOutputToFile = file;\n return this;\n };\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See IExecOptions\n * @returns number\n */\n ToolRunner.prototype.exec = function (options) {\n var _this = this;\n var _a, _b, _c;\n if (this.pipeOutputToTool) {\n return this.execWithPiping(this.pipeOutputToTool, options);\n }\n var defer = Q.defer();\n this._debug('exec tool: ' + this.toolPath);\n this._debug('arguments:');\n this.args.forEach(function (arg) {\n _this._debug(' ' + arg);\n });\n var optionsNonNull = this._cloneExecOptions(options);\n if (!optionsNonNull.silent) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n var state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', function (message) {\n _this._debug(message);\n });\n var cp = child.spawn(this._getSpawnFileName(options), this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(options));\n this.childProcess = cp;\n // it is possible for the child process to end its last line without a new line.\n // because stdout is buffered, this causes the last line to not get sent to the parent\n // stream. Adding this event forces a flush before the child streams are closed.\n (_a = cp.stdout) === null || _a === void 0 ? void 0 : _a.on('finish', function () {\n if (!optionsNonNull.silent) {\n optionsNonNull.outStream.write(os.EOL);\n }\n });\n var stdbuffer = '';\n (_b = cp.stdout) === null || _b === void 0 ? void 0 : _b.on('data', function (data) {\n _this.emit('stdout', data);\n if (!optionsNonNull.silent) {\n optionsNonNull.outStream.write(data);\n }\n _this._processLineBuffer(data, stdbuffer, function (line) {\n _this.emit('stdline', line);\n });\n });\n var errbuffer = '';\n (_c = cp.stderr) === null || _c === void 0 ? void 0 : _c.on('data', function (data) {\n state.processStderr = true;\n _this.emit('stderr', data);\n if (!optionsNonNull.silent) {\n var s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream;\n s.write(data);\n }\n _this._processLineBuffer(data, errbuffer, function (line) {\n _this.emit('errline', line);\n });\n });\n cp.on('error', function (err) {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', function (code, signal) {\n state.processExitCode = code;\n state.processExited = true;\n _this._debug(\"Exit code \" + code + \" received from tool '\" + _this.toolPath + \"'\");\n state.CheckComplete();\n });\n cp.on('close', function (code, signal) {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n _this._debug(\"STDIO streams have closed for tool '\" + _this.toolPath + \"'\");\n state.CheckComplete();\n });\n state.on('done', function (error, exitCode) {\n if (stdbuffer.length > 0) {\n _this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n _this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n defer.reject(error);\n }\n else {\n defer.resolve(exitCode);\n }\n });\n return defer.promise;\n };\n /**\n * Exec a tool synchronously.\n * Output will be *not* be streamed to the live console. It will be returned after execution is complete.\n * Appropriate for short running tools\n * Returns IExecSyncResult with output and return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See IExecSyncOptions\n * @returns IExecSyncResult\n */\n ToolRunner.prototype.execSync = function (options) {\n var _this = this;\n this._debug('exec tool: ' + this.toolPath);\n this._debug('arguments:');\n this.args.forEach(function (arg) {\n _this._debug(' ' + arg);\n });\n var success = true;\n options = this._cloneExecOptions(options);\n if (!options.silent) {\n options.outStream.write(this._getCommandString(options) + os.EOL);\n }\n var r = child.spawnSync(this._getSpawnFileName(options), this._getSpawnArgs(options), this._getSpawnSyncOptions(options));\n if (!options.silent && r.stdout && r.stdout.length > 0) {\n options.outStream.write(r.stdout);\n }\n if (!options.silent && r.stderr && r.stderr.length > 0) {\n options.errStream.write(r.stderr);\n }\n var res = { code: r.status, error: r.error };\n res.stdout = (r.stdout) ? r.stdout.toString() : '';\n res.stderr = (r.stderr) ? r.stderr.toString() : '';\n return res;\n };\n /**\n * Used to close child process by sending SIGNINT signal.\n * It allows executed script to have some additional logic on SIGINT, before exiting.\n */\n ToolRunner.prototype.killChildProcess = function () {\n if (this.childProcess) {\n this.childProcess.kill();\n }\n };\n return ToolRunner;\n}(events.EventEmitter));\nexports.ToolRunner = ToolRunner;\nvar ExecState = /** @class */ (function (_super) {\n __extends(ExecState, _super);\n function ExecState(options, toolPath) {\n var _this = _super.call(this) || this;\n _this.delay = 10000; // 10 seconds\n _this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n _this.options = options;\n _this.toolPath = toolPath;\n var delay = process.env['TASKLIB_TEST_TOOLRUNNER_EXITDELAY'];\n if (delay) {\n _this.delay = parseInt(delay);\n }\n return _this;\n }\n ExecState.prototype.CheckComplete = function () {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n };\n ExecState.prototype._debug = function (message) {\n this.emit('debug', message);\n };\n ExecState.prototype._setResult = function () {\n // determine whether there is an error\n var error;\n if (this.processExited) {\n if (this.processError) {\n error = new Error(im._loc('LIB_ProcessError', this.toolPath, this.processError));\n }\n else if (this.processExitCode != 0 && !this.options.ignoreReturnCode) {\n error = new Error(im._loc('LIB_ProcessExitCode', this.toolPath, this.processExitCode));\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(im._loc('LIB_ProcessStderr', this.toolPath));\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n };\n ExecState.HandleTimeout = function (state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n console.log(im._loc('LIB_StdioNotClosed', state.delay / 1000, state.toolPath));\n state._debug(im._loc('LIB_StdioNotClosed', state.delay / 1000, state.toolPath));\n }\n state._setResult();\n };\n return ExecState;\n}(events.EventEmitter));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Vault = void 0;\nvar fs = require(\"fs\");\nvar path = require(\"path\");\nvar crypto = require(\"crypto\");\nvar uuidV4 = require('uuid/v4');\nvar algorithm = \"aes-256-ctr\";\nvar encryptEncoding = 'hex';\nvar unencryptedEncoding = 'utf8';\n//\n// Store sensitive data in proc.\n// Main goal: Protects tasks which would dump envvars from leaking secrets inadvertently\n// the task lib clears after storing.\n// Also protects against a dump of a process getting the secrets\n// The secret is generated and stored externally for the lifetime of the task.\n//\nvar Vault = /** @class */ (function () {\n function Vault(keyPath) {\n this._keyFile = path.join(keyPath, '.taskkey');\n this._store = {};\n this.genKey();\n }\n Vault.prototype.initialize = function () {\n };\n Vault.prototype.storeSecret = function (name, data) {\n if (!name || name.length == 0) {\n return false;\n }\n name = name.toLowerCase();\n if (!data || data.length == 0) {\n if (this._store.hasOwnProperty(name)) {\n delete this._store[name];\n }\n return false;\n }\n var key = this.getKey();\n var iv = crypto.randomBytes(16);\n var cipher = crypto.createCipheriv(algorithm, key, iv);\n var crypted = cipher.update(data, unencryptedEncoding, encryptEncoding);\n var cryptedFinal = cipher.final(encryptEncoding);\n this._store[name] = iv.toString(encryptEncoding) + crypted + cryptedFinal;\n return true;\n };\n Vault.prototype.retrieveSecret = function (name) {\n var secret;\n name = (name || '').toLowerCase();\n if (this._store.hasOwnProperty(name)) {\n var key = this.getKey();\n var data = this._store[name];\n var ivDataBuffer = Buffer.from(data, encryptEncoding);\n var iv = ivDataBuffer.slice(0, 16);\n var encryptedText = ivDataBuffer.slice(16);\n var decipher = crypto.createDecipheriv(algorithm, key, iv);\n var dec = decipher.update(encryptedText);\n var decFinal = decipher.final(unencryptedEncoding);\n secret = dec + decFinal;\n }\n return secret;\n };\n Vault.prototype.getKey = function () {\n var key = fs.readFileSync(this._keyFile).toString('utf8');\n // Key needs to be hashed to correct length to match algorithm (aes-256-ctr)\n return crypto.createHash('sha256').update(key).digest();\n };\n Vault.prototype.genKey = function () {\n fs.writeFileSync(this._keyFile, uuidV4(), { encoding: 'utf8' });\n };\n return Vault;\n}());\nexports.Vault = Vault;\n","exports = module.exports = SemVer\n\nvar debug\n/* istanbul ignore next */\nif (typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)) {\n debug = function () {\n var args = Array.prototype.slice.call(arguments, 0)\n args.unshift('SEMVER')\n console.log.apply(console, args)\n }\n} else {\n debug = function () {}\n}\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0'\n\nvar MAX_LENGTH = 256\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nvar MAX_SAFE_COMPONENT_LENGTH = 16\n\nvar MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\n// The actual regexps go on exports.re\nvar re = exports.re = []\nvar safeRe = exports.safeRe = []\nvar src = exports.src = []\nvar R = 0\n\nvar LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nvar safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nfunction makeSafeRe (value) {\n for (var i = 0; i < safeRegexReplacements.length; i++) {\n var token = safeRegexReplacements[i][0]\n var max = safeRegexReplacements[i][1]\n value = value\n .split(token + '*').join(token + '{0,' + max + '}')\n .split(token + '+').join(token + '{1,' + max + '}')\n }\n return value\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\nvar NUMERICIDENTIFIER = R++\nsrc[NUMERICIDENTIFIER] = '0|[1-9]\\\\d*'\nvar NUMERICIDENTIFIERLOOSE = R++\nsrc[NUMERICIDENTIFIERLOOSE] = '\\\\d+'\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\nvar NONNUMERICIDENTIFIER = R++\nsrc[NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*'\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\nvar MAINVERSION = R++\nsrc[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIER] + ')'\n\nvar MAINVERSIONLOOSE = R++\nsrc[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[NUMERICIDENTIFIERLOOSE] + ')'\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\nvar PRERELEASEIDENTIFIER = R++\nsrc[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +\n '|' + src[NONNUMERICIDENTIFIER] + ')'\n\nvar PRERELEASEIDENTIFIERLOOSE = R++\nsrc[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +\n '|' + src[NONNUMERICIDENTIFIER] + ')'\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\nvar PRERELEASE = R++\nsrc[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[PRERELEASEIDENTIFIER] + ')*))'\n\nvar PRERELEASELOOSE = R++\nsrc[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\nvar BUILDIDENTIFIER = R++\nsrc[BUILDIDENTIFIER] = LETTERDASHNUMBER + '+'\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\nvar BUILD = R++\nsrc[BUILD] = '(?:\\\\+(' + src[BUILDIDENTIFIER] +\n '(?:\\\\.' + src[BUILDIDENTIFIER] + ')*))'\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\nvar FULL = R++\nvar FULLPLAIN = 'v?' + src[MAINVERSION] +\n src[PRERELEASE] + '?' +\n src[BUILD] + '?'\n\nsrc[FULL] = '^' + FULLPLAIN + '$'\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\nvar LOOSEPLAIN = '[v=\\\\s]*' + src[MAINVERSIONLOOSE] +\n src[PRERELEASELOOSE] + '?' +\n src[BUILD] + '?'\n\nvar LOOSE = R++\nsrc[LOOSE] = '^' + LOOSEPLAIN + '$'\n\nvar GTLT = R++\nsrc[GTLT] = '((?:<|>)?=?)'\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\nvar XRANGEIDENTIFIERLOOSE = R++\nsrc[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*'\nvar XRANGEIDENTIFIER = R++\nsrc[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\\\*'\n\nvar XRANGEPLAIN = R++\nsrc[XRANGEPLAIN] = '[v=\\\\s]*(' + src[XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIER] + ')' +\n '(?:' + src[PRERELEASE] + ')?' +\n src[BUILD] + '?' +\n ')?)?'\n\nvar XRANGEPLAINLOOSE = R++\nsrc[XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[PRERELEASELOOSE] + ')?' +\n src[BUILD] + '?' +\n ')?)?'\n\nvar XRANGE = R++\nsrc[XRANGE] = '^' + src[GTLT] + '\\\\s*' + src[XRANGEPLAIN] + '$'\nvar XRANGELOOSE = R++\nsrc[XRANGELOOSE] = '^' + src[GTLT] + '\\\\s*' + src[XRANGEPLAINLOOSE] + '$'\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\nvar COERCE = R++\nsrc[COERCE] = '(?:^|[^\\\\d])' +\n '(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:$|[^\\\\d])'\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\nvar LONETILDE = R++\nsrc[LONETILDE] = '(?:~>?)'\n\nvar TILDETRIM = R++\nsrc[TILDETRIM] = '(\\\\s*)' + src[LONETILDE] + '\\\\s+'\nre[TILDETRIM] = new RegExp(src[TILDETRIM], 'g')\nsafeRe[TILDETRIM] = new RegExp(makeSafeRe(src[TILDETRIM]), 'g')\nvar tildeTrimReplace = '$1~'\n\nvar TILDE = R++\nsrc[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'\nvar TILDELOOSE = R++\nsrc[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\nvar LONECARET = R++\nsrc[LONECARET] = '(?:\\\\^)'\n\nvar CARETTRIM = R++\nsrc[CARETTRIM] = '(\\\\s*)' + src[LONECARET] + '\\\\s+'\nre[CARETTRIM] = new RegExp(src[CARETTRIM], 'g')\nsafeRe[CARETTRIM] = new RegExp(makeSafeRe(src[CARETTRIM]), 'g')\nvar caretTrimReplace = '$1^'\n\nvar CARET = R++\nsrc[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'\nvar CARETLOOSE = R++\nsrc[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\nvar COMPARATORLOOSE = R++\nsrc[COMPARATORLOOSE] = '^' + src[GTLT] + '\\\\s*(' + LOOSEPLAIN + ')$|^$'\nvar COMPARATOR = R++\nsrc[COMPARATOR] = '^' + src[GTLT] + '\\\\s*(' + FULLPLAIN + ')$|^$'\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\nvar COMPARATORTRIM = R++\nsrc[COMPARATORTRIM] = '(\\\\s*)' + src[GTLT] +\n '\\\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'\n\n// this one has to use the /g flag\nre[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g')\nsafeRe[COMPARATORTRIM] = new RegExp(makeSafeRe(src[COMPARATORTRIM]), 'g')\nvar comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\nvar HYPHENRANGE = R++\nsrc[HYPHENRANGE] = '^\\\\s*(' + src[XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[XRANGEPLAIN] + ')' +\n '\\\\s*$'\n\nvar HYPHENRANGELOOSE = R++\nsrc[HYPHENRANGELOOSE] = '^\\\\s*(' + src[XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$'\n\n// Star ranges basically just allow anything at all.\nvar STAR = R++\nsrc[STAR] = '(<|>)?=?\\\\s*\\\\*'\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i])\n if (!re[i]) {\n re[i] = new RegExp(src[i])\n\n // Replace all greedy whitespace to prevent regex dos issues. These regex are\n // used internally via the safeRe object since all inputs in this library get\n // normalized first to trim and collapse all extra whitespace. The original\n // regexes are exported for userland consumption and lower level usage. A\n // future breaking change could export the safer regex only with a note that\n // all input should have extra whitespace removed.\n safeRe[i] = new RegExp(makeSafeRe(src[i]))\n }\n}\n\nexports.parse = parse\nfunction parse (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n var r = options.loose ? safeRe[LOOSE] : safeRe[FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nexports.valid = valid\nfunction valid (version, options) {\n var v = parse(version, options)\n return v ? v.version : null\n}\n\nexports.clean = clean\nfunction clean (version, options) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\n\nexports.SemVer = SemVer\n\nfunction SemVer (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n if (version instanceof SemVer) {\n if (version.loose === options.loose) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n }\n\n if (!(this instanceof SemVer)) {\n return new SemVer(version, options)\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n\n var m = version.trim().match(options.loose ? safeRe[LOOSE] : safeRe[FULL])\n\n if (!m) {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map(function (id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n}\n\nSemVer.prototype.format = function () {\n this.version = this.major + '.' + this.minor + '.' + this.patch\n if (this.prerelease.length) {\n this.version += '-' + this.prerelease.join('.')\n }\n return this.version\n}\n\nSemVer.prototype.toString = function () {\n return this.version\n}\n\nSemVer.prototype.compare = function (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return this.compareMain(other) || this.comparePre(other)\n}\n\nSemVer.prototype.compareMain = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n}\n\nSemVer.prototype.comparePre = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n var i = 0\n do {\n var a = this.prerelease[i]\n var b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n var i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error('invalid increment argument: ' + release)\n }\n this.format()\n this.raw = this.version\n return this\n}\n\nexports.inc = inc\nfunction inc (version, release, loose, identifier) {\n if (typeof (loose) === 'string') {\n identifier = loose\n loose = undefined\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\n\nexports.diff = diff\nfunction diff (version1, version2) {\n if (eq(version1, version2)) {\n return null\n } else {\n var v1 = parse(version1)\n var v2 = parse(version2)\n var prefix = ''\n if (v1.prerelease.length || v2.prerelease.length) {\n prefix = 'pre'\n var defaultResult = 'prerelease'\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers\n\nvar numeric = /^[0-9]+$/\nfunction compareIdentifiers (a, b) {\n var anum = numeric.test(a)\n var bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers\nfunction rcompareIdentifiers (a, b) {\n return compareIdentifiers(b, a)\n}\n\nexports.major = major\nfunction major (a, loose) {\n return new SemVer(a, loose).major\n}\n\nexports.minor = minor\nfunction minor (a, loose) {\n return new SemVer(a, loose).minor\n}\n\nexports.patch = patch\nfunction patch (a, loose) {\n return new SemVer(a, loose).patch\n}\n\nexports.compare = compare\nfunction compare (a, b, loose) {\n return new SemVer(a, loose).compare(new SemVer(b, loose))\n}\n\nexports.compareLoose = compareLoose\nfunction compareLoose (a, b) {\n return compare(a, b, true)\n}\n\nexports.rcompare = rcompare\nfunction rcompare (a, b, loose) {\n return compare(b, a, loose)\n}\n\nexports.sort = sort\nfunction sort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compare(a, b, loose)\n })\n}\n\nexports.rsort = rsort\nfunction rsort (list, loose) {\n return list.sort(function (a, b) {\n return exports.rcompare(a, b, loose)\n })\n}\n\nexports.gt = gt\nfunction gt (a, b, loose) {\n return compare(a, b, loose) > 0\n}\n\nexports.lt = lt\nfunction lt (a, b, loose) {\n return compare(a, b, loose) < 0\n}\n\nexports.eq = eq\nfunction eq (a, b, loose) {\n return compare(a, b, loose) === 0\n}\n\nexports.neq = neq\nfunction neq (a, b, loose) {\n return compare(a, b, loose) !== 0\n}\n\nexports.gte = gte\nfunction gte (a, b, loose) {\n return compare(a, b, loose) >= 0\n}\n\nexports.lte = lte\nfunction lte (a, b, loose) {\n return compare(a, b, loose) <= 0\n}\n\nexports.cmp = cmp\nfunction cmp (a, op, b, loose) {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError('Invalid operator: ' + op)\n }\n}\n\nexports.Comparator = Comparator\nfunction Comparator (comp, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n if (!(this instanceof Comparator)) {\n return new Comparator(comp, options)\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n}\n\nvar ANY = {}\nComparator.prototype.parse = function (comp) {\n var r = this.options.loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR]\n var m = comp.match(r)\n\n if (!m) {\n throw new TypeError('Invalid comparator: ' + comp)\n }\n\n this.operator = m[1]\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n}\n\nComparator.prototype.toString = function () {\n return this.value\n}\n\nComparator.prototype.test = function (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n version = new SemVer(version, this.options)\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n}\n\nComparator.prototype.intersects = function (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n var rangeTmp\n\n if (this.operator === '') {\n rangeTmp = new Range(comp.value, options)\n return satisfies(this.value, rangeTmp, options)\n } else if (comp.operator === '') {\n rangeTmp = new Range(this.value, options)\n return satisfies(comp.semver, rangeTmp, options)\n }\n\n var sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n var sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n var sameSemVer = this.semver.version === comp.semver.version\n var differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n var oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n ((this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<'))\n var oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n ((this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>'))\n\n return sameDirectionIncreasing || sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan || oppositeDirectionsGreaterThan\n}\n\nexports.Range = Range\nfunction Range (range, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (range instanceof Range) {\n if (range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n return new Range(range.value, options)\n }\n\n if (!(this instanceof Range)) {\n return new Range(range, options)\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range\n .trim()\n .split(/\\s+/)\n .join(' ')\n\n // First, split based on boolean or ||\n this.set = this.raw.split('||').map(function (range) {\n return this.parseRange(range.trim())\n }, this).filter(function (c) {\n // throw out any that are not relevant for whatever reason\n return c.length\n })\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + this.raw)\n }\n\n this.format()\n}\n\nRange.prototype.format = function () {\n this.range = this.set.map(function (comps) {\n return comps.join(' ').trim()\n }).join('||').trim()\n return this.range\n}\n\nRange.prototype.toString = function () {\n return this.range\n}\n\nRange.prototype.parseRange = function (range) {\n var loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? safeRe[HYPHENRANGELOOSE] : safeRe[HYPHENRANGE]\n range = range.replace(hr, hyphenReplace)\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(safeRe[COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, safeRe[COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(safeRe[TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(safeRe[CARETTRIM], caretTrimReplace)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n var compRe = loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR]\n var set = range.split(' ').map(function (comp) {\n return parseComparator(comp, this.options)\n }, this).join(' ').split(/\\s+/)\n if (this.options.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function (comp) {\n return !!comp.match(compRe)\n })\n }\n set = set.map(function (comp) {\n return new Comparator(comp, this.options)\n }, this)\n\n return set\n}\n\nRange.prototype.intersects = function (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some(function (thisComparators) {\n return thisComparators.every(function (thisComparator) {\n return range.set.some(function (rangeComparators) {\n return rangeComparators.every(function (rangeComparator) {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n })\n })\n}\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators\nfunction toComparators (range, options) {\n return new Range(range, options).set.map(function (comp) {\n return comp.map(function (c) {\n return c.value\n }).join(' ').trim().split(' ')\n })\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nfunction isX (id) {\n return !id || id.toLowerCase() === 'x' || id === '*'\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? safeRe[TILDELOOSE] : safeRe[TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? safeRe[CARETLOOSE] : safeRe[CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? safeRe[XRANGELOOSE] : safeRe[XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p\n } else if (xm) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(safeRe[STAR], '')\n}\n\n// This function is passed to string.replace(safeRe[HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n version = new SemVer(version, this.options)\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n var match = version.match(safeRe[COERCE])\n\n if (match == null) {\n return null\n }\n\n return parse(match[1] +\n '.' + (match[2] || '0') +\n '.' + (match[3] || '0'))\n}\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In node.js\n// this is pretty straight-forward - we use the crypto API.\n\nvar crypto = require('crypto');\n\nmodule.exports = function nodeRNG() {\n return crypto.randomBytes(16);\n};\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n",null,"'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n if(a===b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","var concatMap = require('concat-map');\nvar balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str) {\n if (!str)\n return [];\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), true).map(unescapeBraces);\n}\n\nfunction identity(e) {\n return e;\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, isTop) {\n var expansions = [];\n\n var m = balanced('{', '}', str);\n if (!m || /\\$$/.test(m.pre)) return [str];\n\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,.*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n return expand(str);\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], false).map(embrace);\n if (n.length === 1) {\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.abs(numeric(n[2]))\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y); i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = concatMap(n, function(el) { return expand(el, false) });\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n\n return expansions;\n}\n\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","module.exports = function (xs, fn) {\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n var x = fn(xs[i], i);\n if (isArray(x)) res.push.apply(res, x);\n else res.push(x);\n }\n return res;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","var DomParser = require('./lib/DomParser');\nmodule.exports = DomParser;\n","var\n tagRegExp = /(<\\/?[a-z][a-z0-9]*(?::[a-z][a-z0-9]*)?\\s*(?:\\s+[a-z0-9-_]+=(?:(?:'[\\s\\S]*?')|(?:\"[\\s\\S]*?\")))*\\s*\\/?>)|([^<]|<(?![a-z\\/]))*/gi,\n attrRegExp = /\\s[a-z0-9-_]+\\b(\\s*=\\s*('|\")[\\s\\S]*?\\2)?/gi,\n splitAttrRegExp = /(\\s[a-z0-9-_]+\\b\\s*)(?:=(\\s*('|\")[\\s\\S]*?\\3))?/gi,\n startTagExp = /^<[a-z]/,\n selfCloseTagExp = /\\/>$/,\n closeTagExp = /^<\\//,\n nodeNameExp = /<\\/?([a-z][a-z0-9]*)(?::([a-z][a-z0-9]*))?/i,\n attributeQuotesExp = /^('|\")|('|\")$/g,\n noClosingTagsExp = /^(?:area|base|br|col|command|embed|hr|img|input|link|meta|param|source)/i;\n\nvar Node = require('./Node');\n\nfunction findByRegExp(html, selector, onlyFirst) {\n\n var\n result = [],\n tagsCount = 0,\n tags = html.match(tagRegExp),\n composing = false,\n currentObject = null,\n matchingSelector,\n fullNodeName,\n selfCloseTag,\n attributes,\n attrBuffer,\n attrStr,\n buffer,\n tag;\n\n for (var i = 0, l = tags.length; i < l; i++) {\n\n tag = tags[i];\n fullNodeName = tag.match(nodeNameExp);\n\n matchingSelector = selector.test(tag);\n\n if (matchingSelector && !composing){\n composing = true;\n }\n\n if (composing) {\n\n if (startTagExp.test(tag)) {\n selfCloseTag = selfCloseTagExp.test(tag) || noClosingTagsExp.test(fullNodeName[1]);\n attributes = [];\n attrStr = tag.match(attrRegExp) || [];\n for (var aI = 0, aL = attrStr.length; aI < aL; aI++) {\n splitAttrRegExp.lastIndex = 0;\n attrBuffer = splitAttrRegExp.exec(attrStr[aI]);\n attributes.push({\n name: attrBuffer[1].trim(),\n value: (attrBuffer[2] || '').trim().replace(attributeQuotesExp, '')\n });\n }\n\n ((currentObject && currentObject.childNodes) || result).push(buffer = new Node({\n nodeType: 1, //element node\n nodeName: fullNodeName[1],\n namespace: fullNodeName[2],\n attributes: attributes,\n childNodes: [],\n parentNode: currentObject,\n startTag: tag,\n selfCloseTag: selfCloseTag\n }));\n tagsCount++;\n\n if (!onlyFirst && matchingSelector && currentObject){\n result.push(buffer);\n }\n\n if (selfCloseTag) {\n tagsCount--;\n }\n else {\n currentObject = buffer;\n }\n\n }\n else if (closeTagExp.test(tag)) {\n if (currentObject.nodeName == fullNodeName[1]){\n currentObject = currentObject.parentNode;\n tagsCount--;\n }\n }\n else {\n currentObject.childNodes.push(new Node({\n nodeType: 3,\n text: tag,\n parentNode: currentObject\n }));\n }\n\n if (tagsCount == 0) {\n composing = false;\n currentObject = null;\n\n if (onlyFirst){\n break;\n }\n }\n\n }\n\n }\n\n return onlyFirst ? result[0] || null : result;\n}\n\n\nfunction Dom(rawHTML) {\n this.rawHTML = rawHTML;\n}\n\nDom.prototype.getElementsByClassName = function (className) {\n var selector = new RegExp('class=(\\'|\")(.*?\\\\s)?' + className + '(\\\\s.*?)?\\\\1');\n return findByRegExp(this.rawHTML, selector);\n};\n\nDom.prototype.getElementsByTagName = function (tagName) {\n var selector = new RegExp('^<'+tagName, 'i');\n return findByRegExp(this.rawHTML, selector);\n};\n\nDom.prototype.getElementById = function(id){\n var selector = new RegExp('id=(\\'|\")' + id + '\\\\1');\n return findByRegExp(this.rawHTML, selector, true);\n};\n\nDom.prototype.getElementsByName = function(name){\n return this.getElementsByAttribute('name', name);\n};\n\nDom.prototype.getElementsByAttribute = function(attr, value){\n var selector = new RegExp('\\\\s' + attr + '=(\\'|\")' + value + '\\\\1');\n return findByRegExp(this.rawHTML, selector);\n};\n\n\nmodule.exports = Dom;\n","var Dom = require('./Dom');\n\nfunction DomParser() {\n}\n\nDomParser.prototype.parseFromString = function (html) {\n return new Dom(html);\n};\n\nmodule.exports = DomParser;","//https://developer.mozilla.org/en-US/docs/Web/API/Element\n\n\nfunction Node(cfg) {\n\n this.namespace = cfg.namespace || null;\n this.text = cfg.text;\n this._selfCloseTag = cfg.selfCloseTag;\n\n\n Object.defineProperties(this, {\n nodeType: {\n value: cfg.nodeType\n },\n nodeName: {\n value: cfg.nodeType == 1 ? cfg.nodeName : '#text'\n },\n childNodes: {\n value: cfg.childNodes\n },\n firstChild: {\n get: function(){\n return this.childNodes[0] || null;\n }\n },\n lastChild: {\n get: function(){\n return this.childNodes[this.childNodes.length-1] || null;\n }\n },\n parentNode: {\n value: cfg.parentNode || null\n },\n attributes: {\n value: cfg.attributes || []\n },\n innerHTML: {\n get: function(){\n var\n result = '',\n cNode;\n for (var i = 0, l = this.childNodes.length; i < l; i++) {\n cNode = this.childNodes[i];\n result += cNode.nodeType === 3 ? cNode.text : cNode.outerHTML;\n }\n return result;\n }\n },\n outerHTML: {\n get: function(){\n if (this.nodeType != 3){\n var\n str,\n attrs = (this.attributes.map(function(elem){\n return elem.name + (elem.value ? '=' + '\"'+ elem.value +'\"' : '');\n }) || []).join(' '),\n childs = '';\n\n str = '<' + this.nodeName + (attrs ? ' ' + attrs : '') + (this._selfCloseTag ? '/' : '') + '>';\n\n if (!this._selfCloseTag){\n childs = (this._selfCloseTag ? '' : this.childNodes.map(function(child){\n return child.outerHTML;\n }) || []).join('');\n\n str += childs;\n str += '';\n }\n }\n else{\n str = this.textContent;\n }\n return str;\n }\n },\n textContent: {\n get: function(){\n if (this.nodeType == Node.TEXT_NODE){\n return this.text;\n }\n else{\n return this.childNodes.map(function(node){\n return node.textContent;\n }).join('').replace(/\\x20+/g, ' ');\n }\n }\n }\n });\n}\n\nNode.prototype.getAttribute = function (attributeName) {\n for (var i = 0, l = this.attributes.length; i < l; i++) {\n if (this.attributes[i].name == attributeName) {\n return this.attributes[i].value;\n }\n }\n return null;\n};\n\nfunction searchElements(root, conditionFn, onlyFirst){\n var result = [];\n onlyFirst = !!onlyFirst;\n if (root.nodeType !== 3) {\n for (var i = 0, l = root.childNodes.length; i < l; i++) {\n if (root.childNodes[i].nodeType !== 3 && conditionFn(root.childNodes[i])) {\n result.push(root.childNodes[i]);\n if (onlyFirst){\n break;\n }\n }\n result = result.concat(searchElements(root.childNodes[i], conditionFn));\n }\n }\n return onlyFirst ? result[0] : result;\n}\n\nNode.prototype.getElementsByTagName = function (tagName) {\n return searchElements(this, function(elem){\n return elem.nodeName == tagName;\n })\n};\n\nNode.prototype.getElementsByClassName = function (className) {\n var expr = new RegExp('^(.*?\\\\s)?' + className + '(\\\\s.*?)?$');\n return searchElements(this, function(elem){\n return elem.attributes.length && expr.test(elem.getAttribute('class'));\n })\n};\n\nNode.prototype.getElementById = function (id) {\n return searchElements(this, function(elem){\n return elem.attributes.length && elem.getAttribute('id') == id;\n }, true)\n};\n\nNode.prototype.getElementsByName = function (name) {\n return searchElements(this, function(elem){\n return elem.attributes.length && elem.getAttribute('name') == name;\n })\n};\n\n\nNode.ELEMENT_NODE = 1;\nNode.TEXT_NODE = 3;\n\nmodule.exports = Node;","module.exports = realpath\nrealpath.realpath = realpath\nrealpath.sync = realpathSync\nrealpath.realpathSync = realpathSync\nrealpath.monkeypatch = monkeypatch\nrealpath.unmonkeypatch = unmonkeypatch\n\nvar fs = require('fs')\nvar origRealpath = fs.realpath\nvar origRealpathSync = fs.realpathSync\n\nvar version = process.version\nvar ok = /^v[0-5]\\./.test(version)\nvar old = require('./old.js')\n\nfunction newError (er) {\n return er && er.syscall === 'realpath' && (\n er.code === 'ELOOP' ||\n er.code === 'ENOMEM' ||\n er.code === 'ENAMETOOLONG'\n )\n}\n\nfunction realpath (p, cache, cb) {\n if (ok) {\n return origRealpath(p, cache, cb)\n }\n\n if (typeof cache === 'function') {\n cb = cache\n cache = null\n }\n origRealpath(p, cache, function (er, result) {\n if (newError(er)) {\n old.realpath(p, cache, cb)\n } else {\n cb(er, result)\n }\n })\n}\n\nfunction realpathSync (p, cache) {\n if (ok) {\n return origRealpathSync(p, cache)\n }\n\n try {\n return origRealpathSync(p, cache)\n } catch (er) {\n if (newError(er)) {\n return old.realpathSync(p, cache)\n } else {\n throw er\n }\n }\n}\n\nfunction monkeypatch () {\n fs.realpath = realpath\n fs.realpathSync = realpathSync\n}\n\nfunction unmonkeypatch () {\n fs.realpath = origRealpath\n fs.realpathSync = origRealpathSync\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar pathModule = require('path');\nvar isWindows = process.platform === 'win32';\nvar fs = require('fs');\n\n// JavaScript implementation of realpath, ported from node pre-v6\n\nvar DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);\n\nfunction rethrow() {\n // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and\n // is fairly slow to generate.\n var callback;\n if (DEBUG) {\n var backtrace = new Error;\n callback = debugCallback;\n } else\n callback = missingCallback;\n\n return callback;\n\n function debugCallback(err) {\n if (err) {\n backtrace.message = err.message;\n err = backtrace;\n missingCallback(err);\n }\n }\n\n function missingCallback(err) {\n if (err) {\n if (process.throwDeprecation)\n throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs\n else if (!process.noDeprecation) {\n var msg = 'fs: missing callback ' + (err.stack || err.message);\n if (process.traceDeprecation)\n console.trace(msg);\n else\n console.error(msg);\n }\n }\n }\n}\n\nfunction maybeCallback(cb) {\n return typeof cb === 'function' ? cb : rethrow();\n}\n\nvar normalize = pathModule.normalize;\n\n// Regexp that finds the next partion of a (partial) path\n// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']\nif (isWindows) {\n var nextPartRe = /(.*?)(?:[\\/\\\\]+|$)/g;\n} else {\n var nextPartRe = /(.*?)(?:[\\/]+|$)/g;\n}\n\n// Regex to find the device root, including trailing slash. E.g. 'c:\\\\'.\nif (isWindows) {\n var splitRootRe = /^(?:[a-zA-Z]:|[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/][^\\\\\\/]+)?[\\\\\\/]*/;\n} else {\n var splitRootRe = /^[\\/]*/;\n}\n\nexports.realpathSync = function realpathSync(p, cache) {\n // make p is absolute\n p = pathModule.resolve(p);\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {\n return cache[p];\n }\n\n var original = p,\n seenLinks = {},\n knownHard = {};\n\n // current character position in p\n var pos;\n // the partial path so far, including a trailing slash if any\n var current;\n // the partial path without a trailing slash (except when pointing at a root)\n var base;\n // the partial path scanned in the previous round, with slash\n var previous;\n\n start();\n\n function start() {\n // Skip over roots\n var m = splitRootRe.exec(p);\n pos = m[0].length;\n current = m[0];\n base = m[0];\n previous = '';\n\n // On windows, check that the root exists. On unix there is no need.\n if (isWindows && !knownHard[base]) {\n fs.lstatSync(base);\n knownHard[base] = true;\n }\n }\n\n // walk down the path, swapping out linked pathparts for their real\n // values\n // NB: p.length changes.\n while (pos < p.length) {\n // find the next part\n nextPartRe.lastIndex = pos;\n var result = nextPartRe.exec(p);\n previous = current;\n current += result[0];\n base = previous + result[1];\n pos = nextPartRe.lastIndex;\n\n // continue if not a symlink\n if (knownHard[base] || (cache && cache[base] === base)) {\n continue;\n }\n\n var resolvedLink;\n if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {\n // some known symbolic link. no need to stat again.\n resolvedLink = cache[base];\n } else {\n var stat = fs.lstatSync(base);\n if (!stat.isSymbolicLink()) {\n knownHard[base] = true;\n if (cache) cache[base] = base;\n continue;\n }\n\n // read the link if it wasn't read before\n // dev/ino always return 0 on windows, so skip the check.\n var linkTarget = null;\n if (!isWindows) {\n var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);\n if (seenLinks.hasOwnProperty(id)) {\n linkTarget = seenLinks[id];\n }\n }\n if (linkTarget === null) {\n fs.statSync(base);\n linkTarget = fs.readlinkSync(base);\n }\n resolvedLink = pathModule.resolve(previous, linkTarget);\n // track this, if given a cache.\n if (cache) cache[base] = resolvedLink;\n if (!isWindows) seenLinks[id] = linkTarget;\n }\n\n // resolve the link, then start over\n p = pathModule.resolve(resolvedLink, p.slice(pos));\n start();\n }\n\n if (cache) cache[original] = p;\n\n return p;\n};\n\n\nexports.realpath = function realpath(p, cache, cb) {\n if (typeof cb !== 'function') {\n cb = maybeCallback(cache);\n cache = null;\n }\n\n // make p is absolute\n p = pathModule.resolve(p);\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {\n return process.nextTick(cb.bind(null, null, cache[p]));\n }\n\n var original = p,\n seenLinks = {},\n knownHard = {};\n\n // current character position in p\n var pos;\n // the partial path so far, including a trailing slash if any\n var current;\n // the partial path without a trailing slash (except when pointing at a root)\n var base;\n // the partial path scanned in the previous round, with slash\n var previous;\n\n start();\n\n function start() {\n // Skip over roots\n var m = splitRootRe.exec(p);\n pos = m[0].length;\n current = m[0];\n base = m[0];\n previous = '';\n\n // On windows, check that the root exists. On unix there is no need.\n if (isWindows && !knownHard[base]) {\n fs.lstat(base, function(err) {\n if (err) return cb(err);\n knownHard[base] = true;\n LOOP();\n });\n } else {\n process.nextTick(LOOP);\n }\n }\n\n // walk down the path, swapping out linked pathparts for their real\n // values\n function LOOP() {\n // stop if scanned past end of path\n if (pos >= p.length) {\n if (cache) cache[original] = p;\n return cb(null, p);\n }\n\n // find the next part\n nextPartRe.lastIndex = pos;\n var result = nextPartRe.exec(p);\n previous = current;\n current += result[0];\n base = previous + result[1];\n pos = nextPartRe.lastIndex;\n\n // continue if not a symlink\n if (knownHard[base] || (cache && cache[base] === base)) {\n return process.nextTick(LOOP);\n }\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {\n // known symbolic link. no need to stat again.\n return gotResolvedLink(cache[base]);\n }\n\n return fs.lstat(base, gotStat);\n }\n\n function gotStat(err, stat) {\n if (err) return cb(err);\n\n // if not a symlink, skip to the next path part\n if (!stat.isSymbolicLink()) {\n knownHard[base] = true;\n if (cache) cache[base] = base;\n return process.nextTick(LOOP);\n }\n\n // stat & read the link if not read before\n // call gotTarget as soon as the link target is known\n // dev/ino always return 0 on windows, so skip the check.\n if (!isWindows) {\n var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);\n if (seenLinks.hasOwnProperty(id)) {\n return gotTarget(null, seenLinks[id], base);\n }\n }\n fs.stat(base, function(err) {\n if (err) return cb(err);\n\n fs.readlink(base, function(err, target) {\n if (!isWindows) seenLinks[id] = target;\n gotTarget(err, target);\n });\n });\n }\n\n function gotTarget(err, target, base) {\n if (err) return cb(err);\n\n var resolvedLink = pathModule.resolve(previous, target);\n if (cache) cache[base] = resolvedLink;\n gotResolvedLink(resolvedLink);\n }\n\n function gotResolvedLink(resolvedLink) {\n // resolve the link, then start over\n p = pathModule.resolve(resolvedLink, p.slice(pos));\n start();\n }\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\ntry {\n\tnull.error; // eslint-disable-line no-unused-expressions\n} catch (e) {\n\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\tvar errorProto = getProto(getProto(e));\n\tINTRINSICS['%Error.prototype%'] = errorProto;\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","exports.setopts = setopts\nexports.ownProp = ownProp\nexports.makeAbs = makeAbs\nexports.finish = finish\nexports.mark = mark\nexports.isIgnored = isIgnored\nexports.childrenIgnored = childrenIgnored\n\nfunction ownProp (obj, field) {\n return Object.prototype.hasOwnProperty.call(obj, field)\n}\n\nvar fs = require(\"fs\")\nvar path = require(\"path\")\nvar minimatch = require(\"minimatch\")\nvar isAbsolute = require(\"path-is-absolute\")\nvar Minimatch = minimatch.Minimatch\n\nfunction alphasort (a, b) {\n return a.localeCompare(b, 'en')\n}\n\nfunction setupIgnores (self, options) {\n self.ignore = options.ignore || []\n\n if (!Array.isArray(self.ignore))\n self.ignore = [self.ignore]\n\n if (self.ignore.length) {\n self.ignore = self.ignore.map(ignoreMap)\n }\n}\n\n// ignore patterns are always in dot:true mode.\nfunction ignoreMap (pattern) {\n var gmatcher = null\n if (pattern.slice(-3) === '/**') {\n var gpattern = pattern.replace(/(\\/\\*\\*)+$/, '')\n gmatcher = new Minimatch(gpattern, { dot: true })\n }\n\n return {\n matcher: new Minimatch(pattern, { dot: true }),\n gmatcher: gmatcher\n }\n}\n\nfunction setopts (self, pattern, options) {\n if (!options)\n options = {}\n\n // base-matching: just use globstar for that.\n if (options.matchBase && -1 === pattern.indexOf(\"/\")) {\n if (options.noglobstar) {\n throw new Error(\"base matching requires globstar\")\n }\n pattern = \"**/\" + pattern\n }\n\n self.silent = !!options.silent\n self.pattern = pattern\n self.strict = options.strict !== false\n self.realpath = !!options.realpath\n self.realpathCache = options.realpathCache || Object.create(null)\n self.follow = !!options.follow\n self.dot = !!options.dot\n self.mark = !!options.mark\n self.nodir = !!options.nodir\n if (self.nodir)\n self.mark = true\n self.sync = !!options.sync\n self.nounique = !!options.nounique\n self.nonull = !!options.nonull\n self.nosort = !!options.nosort\n self.nocase = !!options.nocase\n self.stat = !!options.stat\n self.noprocess = !!options.noprocess\n self.absolute = !!options.absolute\n self.fs = options.fs || fs\n\n self.maxLength = options.maxLength || Infinity\n self.cache = options.cache || Object.create(null)\n self.statCache = options.statCache || Object.create(null)\n self.symlinks = options.symlinks || Object.create(null)\n\n setupIgnores(self, options)\n\n self.changedCwd = false\n var cwd = process.cwd()\n if (!ownProp(options, \"cwd\"))\n self.cwd = cwd\n else {\n self.cwd = path.resolve(options.cwd)\n self.changedCwd = self.cwd !== cwd\n }\n\n self.root = options.root || path.resolve(self.cwd, \"/\")\n self.root = path.resolve(self.root)\n if (process.platform === \"win32\")\n self.root = self.root.replace(/\\\\/g, \"/\")\n\n // TODO: is an absolute `cwd` supposed to be resolved against `root`?\n // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')\n self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)\n if (process.platform === \"win32\")\n self.cwdAbs = self.cwdAbs.replace(/\\\\/g, \"/\")\n self.nomount = !!options.nomount\n\n // disable comments and negation in Minimatch.\n // Note that they are not supported in Glob itself anyway.\n options.nonegate = true\n options.nocomment = true\n // always treat \\ in patterns as escapes, not path separators\n options.allowWindowsEscape = false\n\n self.minimatch = new Minimatch(pattern, options)\n self.options = self.minimatch.options\n}\n\nfunction finish (self) {\n var nou = self.nounique\n var all = nou ? [] : Object.create(null)\n\n for (var i = 0, l = self.matches.length; i < l; i ++) {\n var matches = self.matches[i]\n if (!matches || Object.keys(matches).length === 0) {\n if (self.nonull) {\n // do like the shell, and spit out the literal glob\n var literal = self.minimatch.globSet[i]\n if (nou)\n all.push(literal)\n else\n all[literal] = true\n }\n } else {\n // had matches\n var m = Object.keys(matches)\n if (nou)\n all.push.apply(all, m)\n else\n m.forEach(function (m) {\n all[m] = true\n })\n }\n }\n\n if (!nou)\n all = Object.keys(all)\n\n if (!self.nosort)\n all = all.sort(alphasort)\n\n // at *some* point we statted all of these\n if (self.mark) {\n for (var i = 0; i < all.length; i++) {\n all[i] = self._mark(all[i])\n }\n if (self.nodir) {\n all = all.filter(function (e) {\n var notDir = !(/\\/$/.test(e))\n var c = self.cache[e] || self.cache[makeAbs(self, e)]\n if (notDir && c)\n notDir = c !== 'DIR' && !Array.isArray(c)\n return notDir\n })\n }\n }\n\n if (self.ignore.length)\n all = all.filter(function(m) {\n return !isIgnored(self, m)\n })\n\n self.found = all\n}\n\nfunction mark (self, p) {\n var abs = makeAbs(self, p)\n var c = self.cache[abs]\n var m = p\n if (c) {\n var isDir = c === 'DIR' || Array.isArray(c)\n var slash = p.slice(-1) === '/'\n\n if (isDir && !slash)\n m += '/'\n else if (!isDir && slash)\n m = m.slice(0, -1)\n\n if (m !== p) {\n var mabs = makeAbs(self, m)\n self.statCache[mabs] = self.statCache[abs]\n self.cache[mabs] = self.cache[abs]\n }\n }\n\n return m\n}\n\n// lotta situps...\nfunction makeAbs (self, f) {\n var abs = f\n if (f.charAt(0) === '/') {\n abs = path.join(self.root, f)\n } else if (isAbsolute(f) || f === '') {\n abs = f\n } else if (self.changedCwd) {\n abs = path.resolve(self.cwd, f)\n } else {\n abs = path.resolve(f)\n }\n\n if (process.platform === 'win32')\n abs = abs.replace(/\\\\/g, '/')\n\n return abs\n}\n\n\n// Return true, if pattern ends with globstar '**', for the accompanying parent directory.\n// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents\nfunction isIgnored (self, path) {\n if (!self.ignore.length)\n return false\n\n return self.ignore.some(function(item) {\n return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))\n })\n}\n\nfunction childrenIgnored (self, path) {\n if (!self.ignore.length)\n return false\n\n return self.ignore.some(function(item) {\n return !!(item.gmatcher && item.gmatcher.match(path))\n })\n}\n","// Approach:\n//\n// 1. Get the minimatch set\n// 2. For each pattern in the set, PROCESS(pattern, false)\n// 3. Store matches per-set, then uniq them\n//\n// PROCESS(pattern, inGlobStar)\n// Get the first [n] items from pattern that are all strings\n// Join these together. This is PREFIX.\n// If there is no more remaining, then stat(PREFIX) and\n// add to matches if it succeeds. END.\n//\n// If inGlobStar and PREFIX is symlink and points to dir\n// set ENTRIES = []\n// else readdir(PREFIX) as ENTRIES\n// If fail, END\n//\n// with ENTRIES\n// If pattern[n] is GLOBSTAR\n// // handle the case where the globstar match is empty\n// // by pruning it out, and testing the resulting pattern\n// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)\n// // handle other cases.\n// for ENTRY in ENTRIES (not dotfiles)\n// // attach globstar + tail onto the entry\n// // Mark that this entry is a globstar match\n// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)\n//\n// else // not globstar\n// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)\n// Test ENTRY against pattern[n]\n// If fails, continue\n// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])\n//\n// Caveat:\n// Cache all stats and readdirs results to minimize syscall. Since all\n// we ever care about is existence and directory-ness, we can just keep\n// `true` for files, and [children,...] for directories, or `false` for\n// things that don't exist.\n\nmodule.exports = glob\n\nvar rp = require('fs.realpath')\nvar minimatch = require('minimatch')\nvar Minimatch = minimatch.Minimatch\nvar inherits = require('inherits')\nvar EE = require('events').EventEmitter\nvar path = require('path')\nvar assert = require('assert')\nvar isAbsolute = require('path-is-absolute')\nvar globSync = require('./sync.js')\nvar common = require('./common.js')\nvar setopts = common.setopts\nvar ownProp = common.ownProp\nvar inflight = require('inflight')\nvar util = require('util')\nvar childrenIgnored = common.childrenIgnored\nvar isIgnored = common.isIgnored\n\nvar once = require('once')\n\nfunction glob (pattern, options, cb) {\n if (typeof options === 'function') cb = options, options = {}\n if (!options) options = {}\n\n if (options.sync) {\n if (cb)\n throw new TypeError('callback provided to sync glob')\n return globSync(pattern, options)\n }\n\n return new Glob(pattern, options, cb)\n}\n\nglob.sync = globSync\nvar GlobSync = glob.GlobSync = globSync.GlobSync\n\n// old api surface\nglob.glob = glob\n\nfunction extend (origin, add) {\n if (add === null || typeof add !== 'object') {\n return origin\n }\n\n var keys = Object.keys(add)\n var i = keys.length\n while (i--) {\n origin[keys[i]] = add[keys[i]]\n }\n return origin\n}\n\nglob.hasMagic = function (pattern, options_) {\n var options = extend({}, options_)\n options.noprocess = true\n\n var g = new Glob(pattern, options)\n var set = g.minimatch.set\n\n if (!pattern)\n return false\n\n if (set.length > 1)\n return true\n\n for (var j = 0; j < set[0].length; j++) {\n if (typeof set[0][j] !== 'string')\n return true\n }\n\n return false\n}\n\nglob.Glob = Glob\ninherits(Glob, EE)\nfunction Glob (pattern, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = null\n }\n\n if (options && options.sync) {\n if (cb)\n throw new TypeError('callback provided to sync glob')\n return new GlobSync(pattern, options)\n }\n\n if (!(this instanceof Glob))\n return new Glob(pattern, options, cb)\n\n setopts(this, pattern, options)\n this._didRealPath = false\n\n // process each pattern in the minimatch set\n var n = this.minimatch.set.length\n\n // The matches are stored as {: true,...} so that\n // duplicates are automagically pruned.\n // Later, we do an Object.keys() on these.\n // Keep them as a list so we can fill in when nonull is set.\n this.matches = new Array(n)\n\n if (typeof cb === 'function') {\n cb = once(cb)\n this.on('error', cb)\n this.on('end', function (matches) {\n cb(null, matches)\n })\n }\n\n var self = this\n this._processing = 0\n\n this._emitQueue = []\n this._processQueue = []\n this.paused = false\n\n if (this.noprocess)\n return this\n\n if (n === 0)\n return done()\n\n var sync = true\n for (var i = 0; i < n; i ++) {\n this._process(this.minimatch.set[i], i, false, done)\n }\n sync = false\n\n function done () {\n --self._processing\n if (self._processing <= 0) {\n if (sync) {\n process.nextTick(function () {\n self._finish()\n })\n } else {\n self._finish()\n }\n }\n }\n}\n\nGlob.prototype._finish = function () {\n assert(this instanceof Glob)\n if (this.aborted)\n return\n\n if (this.realpath && !this._didRealpath)\n return this._realpath()\n\n common.finish(this)\n this.emit('end', this.found)\n}\n\nGlob.prototype._realpath = function () {\n if (this._didRealpath)\n return\n\n this._didRealpath = true\n\n var n = this.matches.length\n if (n === 0)\n return this._finish()\n\n var self = this\n for (var i = 0; i < this.matches.length; i++)\n this._realpathSet(i, next)\n\n function next () {\n if (--n === 0)\n self._finish()\n }\n}\n\nGlob.prototype._realpathSet = function (index, cb) {\n var matchset = this.matches[index]\n if (!matchset)\n return cb()\n\n var found = Object.keys(matchset)\n var self = this\n var n = found.length\n\n if (n === 0)\n return cb()\n\n var set = this.matches[index] = Object.create(null)\n found.forEach(function (p, i) {\n // If there's a problem with the stat, then it means that\n // one or more of the links in the realpath couldn't be\n // resolved. just return the abs value in that case.\n p = self._makeAbs(p)\n rp.realpath(p, self.realpathCache, function (er, real) {\n if (!er)\n set[real] = true\n else if (er.syscall === 'stat')\n set[p] = true\n else\n self.emit('error', er) // srsly wtf right here\n\n if (--n === 0) {\n self.matches[index] = set\n cb()\n }\n })\n })\n}\n\nGlob.prototype._mark = function (p) {\n return common.mark(this, p)\n}\n\nGlob.prototype._makeAbs = function (f) {\n return common.makeAbs(this, f)\n}\n\nGlob.prototype.abort = function () {\n this.aborted = true\n this.emit('abort')\n}\n\nGlob.prototype.pause = function () {\n if (!this.paused) {\n this.paused = true\n this.emit('pause')\n }\n}\n\nGlob.prototype.resume = function () {\n if (this.paused) {\n this.emit('resume')\n this.paused = false\n if (this._emitQueue.length) {\n var eq = this._emitQueue.slice(0)\n this._emitQueue.length = 0\n for (var i = 0; i < eq.length; i ++) {\n var e = eq[i]\n this._emitMatch(e[0], e[1])\n }\n }\n if (this._processQueue.length) {\n var pq = this._processQueue.slice(0)\n this._processQueue.length = 0\n for (var i = 0; i < pq.length; i ++) {\n var p = pq[i]\n this._processing--\n this._process(p[0], p[1], p[2], p[3])\n }\n }\n }\n}\n\nGlob.prototype._process = function (pattern, index, inGlobStar, cb) {\n assert(this instanceof Glob)\n assert(typeof cb === 'function')\n\n if (this.aborted)\n return\n\n this._processing++\n if (this.paused) {\n this._processQueue.push([pattern, index, inGlobStar, cb])\n return\n }\n\n //console.error('PROCESS %d', this._processing, pattern)\n\n // Get the first [n] parts of pattern that are all strings.\n var n = 0\n while (typeof pattern[n] === 'string') {\n n ++\n }\n // now n is the index of the first one that is *not* a string.\n\n // see if there's anything else\n var prefix\n switch (n) {\n // if not, then this is rather simple\n case pattern.length:\n this._processSimple(pattern.join('/'), index, cb)\n return\n\n case 0:\n // pattern *starts* with some non-trivial item.\n // going to readdir(cwd), but not include the prefix in matches.\n prefix = null\n break\n\n default:\n // pattern has some string bits in the front.\n // whatever it starts with, whether that's 'absolute' like /foo/bar,\n // or 'relative' like '../baz'\n prefix = pattern.slice(0, n).join('/')\n break\n }\n\n var remain = pattern.slice(n)\n\n // get the list of entries.\n var read\n if (prefix === null)\n read = '.'\n else if (isAbsolute(prefix) ||\n isAbsolute(pattern.map(function (p) {\n return typeof p === 'string' ? p : '[*]'\n }).join('/'))) {\n if (!prefix || !isAbsolute(prefix))\n prefix = '/' + prefix\n read = prefix\n } else\n read = prefix\n\n var abs = this._makeAbs(read)\n\n //if ignored, skip _processing\n if (childrenIgnored(this, read))\n return cb()\n\n var isGlobStar = remain[0] === minimatch.GLOBSTAR\n if (isGlobStar)\n this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)\n else\n this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)\n}\n\nGlob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {\n var self = this\n this._readdir(abs, inGlobStar, function (er, entries) {\n return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)\n })\n}\n\nGlob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {\n\n // if the abs isn't a dir, then nothing can match!\n if (!entries)\n return cb()\n\n // It will only match dot entries if it starts with a dot, or if\n // dot is set. Stuff like @(.foo|.bar) isn't allowed.\n var pn = remain[0]\n var negate = !!this.minimatch.negate\n var rawGlob = pn._glob\n var dotOk = this.dot || rawGlob.charAt(0) === '.'\n\n var matchedEntries = []\n for (var i = 0; i < entries.length; i++) {\n var e = entries[i]\n if (e.charAt(0) !== '.' || dotOk) {\n var m\n if (negate && !prefix) {\n m = !e.match(pn)\n } else {\n m = e.match(pn)\n }\n if (m)\n matchedEntries.push(e)\n }\n }\n\n //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)\n\n var len = matchedEntries.length\n // If there are no matched entries, then nothing matches.\n if (len === 0)\n return cb()\n\n // if this is the last remaining pattern bit, then no need for\n // an additional stat *unless* the user has specified mark or\n // stat explicitly. We know they exist, since readdir returned\n // them.\n\n if (remain.length === 1 && !this.mark && !this.stat) {\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n if (prefix) {\n if (prefix !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n\n if (e.charAt(0) === '/' && !this.nomount) {\n e = path.join(this.root, e)\n }\n this._emitMatch(index, e)\n }\n // This was the last one, and no stats were needed\n return cb()\n }\n\n // now test all matched entries as stand-ins for that part\n // of the pattern.\n remain.shift()\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n var newPattern\n if (prefix) {\n if (prefix !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n this._process([e].concat(remain), index, inGlobStar, cb)\n }\n cb()\n}\n\nGlob.prototype._emitMatch = function (index, e) {\n if (this.aborted)\n return\n\n if (isIgnored(this, e))\n return\n\n if (this.paused) {\n this._emitQueue.push([index, e])\n return\n }\n\n var abs = isAbsolute(e) ? e : this._makeAbs(e)\n\n if (this.mark)\n e = this._mark(e)\n\n if (this.absolute)\n e = abs\n\n if (this.matches[index][e])\n return\n\n if (this.nodir) {\n var c = this.cache[abs]\n if (c === 'DIR' || Array.isArray(c))\n return\n }\n\n this.matches[index][e] = true\n\n var st = this.statCache[abs]\n if (st)\n this.emit('stat', e, st)\n\n this.emit('match', e)\n}\n\nGlob.prototype._readdirInGlobStar = function (abs, cb) {\n if (this.aborted)\n return\n\n // follow all symlinked directories forever\n // just proceed as if this is a non-globstar situation\n if (this.follow)\n return this._readdir(abs, false, cb)\n\n var lstatkey = 'lstat\\0' + abs\n var self = this\n var lstatcb = inflight(lstatkey, lstatcb_)\n\n if (lstatcb)\n self.fs.lstat(abs, lstatcb)\n\n function lstatcb_ (er, lstat) {\n if (er && er.code === 'ENOENT')\n return cb()\n\n var isSym = lstat && lstat.isSymbolicLink()\n self.symlinks[abs] = isSym\n\n // If it's not a symlink or a dir, then it's definitely a regular file.\n // don't bother doing a readdir in that case.\n if (!isSym && lstat && !lstat.isDirectory()) {\n self.cache[abs] = 'FILE'\n cb()\n } else\n self._readdir(abs, false, cb)\n }\n}\n\nGlob.prototype._readdir = function (abs, inGlobStar, cb) {\n if (this.aborted)\n return\n\n cb = inflight('readdir\\0'+abs+'\\0'+inGlobStar, cb)\n if (!cb)\n return\n\n //console.error('RD %j %j', +inGlobStar, abs)\n if (inGlobStar && !ownProp(this.symlinks, abs))\n return this._readdirInGlobStar(abs, cb)\n\n if (ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n if (!c || c === 'FILE')\n return cb()\n\n if (Array.isArray(c))\n return cb(null, c)\n }\n\n var self = this\n self.fs.readdir(abs, readdirCb(this, abs, cb))\n}\n\nfunction readdirCb (self, abs, cb) {\n return function (er, entries) {\n if (er)\n self._readdirError(abs, er, cb)\n else\n self._readdirEntries(abs, entries, cb)\n }\n}\n\nGlob.prototype._readdirEntries = function (abs, entries, cb) {\n if (this.aborted)\n return\n\n // if we haven't asked to stat everything, then just\n // assume that everything in there exists, so we can avoid\n // having to stat it a second time.\n if (!this.mark && !this.stat) {\n for (var i = 0; i < entries.length; i ++) {\n var e = entries[i]\n if (abs === '/')\n e = abs + e\n else\n e = abs + '/' + e\n this.cache[e] = true\n }\n }\n\n this.cache[abs] = entries\n return cb(null, entries)\n}\n\nGlob.prototype._readdirError = function (f, er, cb) {\n if (this.aborted)\n return\n\n // handle errors, and cache the information\n switch (er.code) {\n case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205\n case 'ENOTDIR': // totally normal. means it *does* exist.\n var abs = this._makeAbs(f)\n this.cache[abs] = 'FILE'\n if (abs === this.cwdAbs) {\n var error = new Error(er.code + ' invalid cwd ' + this.cwd)\n error.path = this.cwd\n error.code = er.code\n this.emit('error', error)\n this.abort()\n }\n break\n\n case 'ENOENT': // not terribly unusual\n case 'ELOOP':\n case 'ENAMETOOLONG':\n case 'UNKNOWN':\n this.cache[this._makeAbs(f)] = false\n break\n\n default: // some unusual error. Treat as failure.\n this.cache[this._makeAbs(f)] = false\n if (this.strict) {\n this.emit('error', er)\n // If the error is handled, then we abort\n // if not, we threw out of here\n this.abort()\n }\n if (!this.silent)\n console.error('glob error', er)\n break\n }\n\n return cb()\n}\n\nGlob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {\n var self = this\n this._readdir(abs, inGlobStar, function (er, entries) {\n self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)\n })\n}\n\n\nGlob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {\n //console.error('pgs2', prefix, remain[0], entries)\n\n // no entries means not a dir, so it can never have matches\n // foo.txt/** doesn't match foo.txt\n if (!entries)\n return cb()\n\n // test without the globstar, and with every child both below\n // and replacing the globstar.\n var remainWithoutGlobStar = remain.slice(1)\n var gspref = prefix ? [ prefix ] : []\n var noGlobStar = gspref.concat(remainWithoutGlobStar)\n\n // the noGlobStar pattern exits the inGlobStar state\n this._process(noGlobStar, index, false, cb)\n\n var isSym = this.symlinks[abs]\n var len = entries.length\n\n // If it's a symlink, and we're in a globstar, then stop\n if (isSym && inGlobStar)\n return cb()\n\n for (var i = 0; i < len; i++) {\n var e = entries[i]\n if (e.charAt(0) === '.' && !this.dot)\n continue\n\n // these two cases enter the inGlobStar state\n var instead = gspref.concat(entries[i], remainWithoutGlobStar)\n this._process(instead, index, true, cb)\n\n var below = gspref.concat(entries[i], remain)\n this._process(below, index, true, cb)\n }\n\n cb()\n}\n\nGlob.prototype._processSimple = function (prefix, index, cb) {\n // XXX review this. Shouldn't it be doing the mounting etc\n // before doing stat? kinda weird?\n var self = this\n this._stat(prefix, function (er, exists) {\n self._processSimple2(prefix, index, er, exists, cb)\n })\n}\nGlob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {\n\n //console.error('ps2', prefix, exists)\n\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n // If it doesn't exist, then just mark the lack of results\n if (!exists)\n return cb()\n\n if (prefix && isAbsolute(prefix) && !this.nomount) {\n var trail = /[\\/\\\\]$/.test(prefix)\n if (prefix.charAt(0) === '/') {\n prefix = path.join(this.root, prefix)\n } else {\n prefix = path.resolve(this.root, prefix)\n if (trail)\n prefix += '/'\n }\n }\n\n if (process.platform === 'win32')\n prefix = prefix.replace(/\\\\/g, '/')\n\n // Mark this as a match\n this._emitMatch(index, prefix)\n cb()\n}\n\n// Returns either 'DIR', 'FILE', or false\nGlob.prototype._stat = function (f, cb) {\n var abs = this._makeAbs(f)\n var needDir = f.slice(-1) === '/'\n\n if (f.length > this.maxLength)\n return cb()\n\n if (!this.stat && ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n\n if (Array.isArray(c))\n c = 'DIR'\n\n // It exists, but maybe not how we need it\n if (!needDir || c === 'DIR')\n return cb(null, c)\n\n if (needDir && c === 'FILE')\n return cb()\n\n // otherwise we have to stat, because maybe c=true\n // if we know it exists, but not what it is.\n }\n\n var exists\n var stat = this.statCache[abs]\n if (stat !== undefined) {\n if (stat === false)\n return cb(null, stat)\n else {\n var type = stat.isDirectory() ? 'DIR' : 'FILE'\n if (needDir && type === 'FILE')\n return cb()\n else\n return cb(null, type, stat)\n }\n }\n\n var self = this\n var statcb = inflight('stat\\0' + abs, lstatcb_)\n if (statcb)\n self.fs.lstat(abs, statcb)\n\n function lstatcb_ (er, lstat) {\n if (lstat && lstat.isSymbolicLink()) {\n // If it's a symlink, then treat it as the target, unless\n // the target does not exist, then treat it as a file.\n return self.fs.stat(abs, function (er, stat) {\n if (er)\n self._stat2(f, abs, null, lstat, cb)\n else\n self._stat2(f, abs, er, stat, cb)\n })\n } else {\n self._stat2(f, abs, er, lstat, cb)\n }\n }\n}\n\nGlob.prototype._stat2 = function (f, abs, er, stat, cb) {\n if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {\n this.statCache[abs] = false\n return cb()\n }\n\n var needDir = f.slice(-1) === '/'\n this.statCache[abs] = stat\n\n if (abs.slice(-1) === '/' && stat && !stat.isDirectory())\n return cb(null, false, stat)\n\n var c = true\n if (stat)\n c = stat.isDirectory() ? 'DIR' : 'FILE'\n this.cache[abs] = this.cache[abs] || c\n\n if (needDir && c === 'FILE')\n return cb()\n\n return cb(null, c, stat)\n}\n","module.exports = minimatch\nminimatch.Minimatch = Minimatch\n\nvar path = (function () { try { return require('path') } catch (e) {}}()) || {\n sep: '/'\n}\nminimatch.sep = path.sep\n\nvar GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}\nvar expand = require('brace-expansion')\n\nvar plTypes = {\n '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},\n '?': { open: '(?:', close: ')?' },\n '+': { open: '(?:', close: ')+' },\n '*': { open: '(?:', close: ')*' },\n '@': { open: '(?:', close: ')' }\n}\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nvar qmark = '[^/]'\n\n// * => any number of characters\nvar star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nvar twoStarDot = '(?:(?!(?:\\\\\\/|^)(?:\\\\.{1,2})($|\\\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nvar twoStarNoDot = '(?:(?!(?:\\\\\\/|^)\\\\.).)*?'\n\n// characters that need to be escaped in RegExp.\nvar reSpecials = charSet('().*{}+?[]^$\\\\!')\n\n// \"abc\" -> { a:true, b:true, c:true }\nfunction charSet (s) {\n return s.split('').reduce(function (set, c) {\n set[c] = true\n return set\n }, {})\n}\n\n// normalizes slashes.\nvar slashSplit = /\\/+/\n\nminimatch.filter = filter\nfunction filter (pattern, options) {\n options = options || {}\n return function (p, i, list) {\n return minimatch(p, pattern, options)\n }\n}\n\nfunction ext (a, b) {\n b = b || {}\n var t = {}\n Object.keys(a).forEach(function (k) {\n t[k] = a[k]\n })\n Object.keys(b).forEach(function (k) {\n t[k] = b[k]\n })\n return t\n}\n\nminimatch.defaults = function (def) {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch\n }\n\n var orig = minimatch\n\n var m = function minimatch (p, pattern, options) {\n return orig(p, pattern, ext(def, options))\n }\n\n m.Minimatch = function Minimatch (pattern, options) {\n return new orig.Minimatch(pattern, ext(def, options))\n }\n m.Minimatch.defaults = function defaults (options) {\n return orig.defaults(ext(def, options)).Minimatch\n }\n\n m.filter = function filter (pattern, options) {\n return orig.filter(pattern, ext(def, options))\n }\n\n m.defaults = function defaults (options) {\n return orig.defaults(ext(def, options))\n }\n\n m.makeRe = function makeRe (pattern, options) {\n return orig.makeRe(pattern, ext(def, options))\n }\n\n m.braceExpand = function braceExpand (pattern, options) {\n return orig.braceExpand(pattern, ext(def, options))\n }\n\n m.match = function (list, pattern, options) {\n return orig.match(list, pattern, ext(def, options))\n }\n\n return m\n}\n\nMinimatch.defaults = function (def) {\n return minimatch.defaults(def).Minimatch\n}\n\nfunction minimatch (p, pattern, options) {\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n return new Minimatch(pattern, options).match(p)\n}\n\nfunction Minimatch (pattern, options) {\n if (!(this instanceof Minimatch)) {\n return new Minimatch(pattern, options)\n }\n\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n pattern = pattern.trim()\n\n // windows support: need to use /, not \\\n if (!options.allowWindowsEscape && path.sep !== '/') {\n pattern = pattern.split(path.sep).join('/')\n }\n\n this.options = options\n this.set = []\n this.pattern = pattern\n this.regexp = null\n this.negate = false\n this.comment = false\n this.empty = false\n this.partial = !!options.partial\n\n // make the set of regexps etc.\n this.make()\n}\n\nMinimatch.prototype.debug = function () {}\n\nMinimatch.prototype.make = make\nfunction make () {\n var pattern = this.pattern\n var options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n var set = this.globSet = this.braceExpand()\n\n if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }\n\n this.debug(this.pattern, set)\n\n // step 3: now we have a set, so turn each one into a series of path-portion\n // matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n set = this.globParts = set.map(function (s) {\n return s.split(slashSplit)\n })\n\n this.debug(this.pattern, set)\n\n // glob --> regexps\n set = set.map(function (s, si, set) {\n return s.map(this.parse, this)\n }, this)\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n set = set.filter(function (s) {\n return s.indexOf(false) === -1\n })\n\n this.debug(this.pattern, set)\n\n this.set = set\n}\n\nMinimatch.prototype.parseNegate = parseNegate\nfunction parseNegate () {\n var pattern = this.pattern\n var negate = false\n var options = this.options\n var negateOffset = 0\n\n if (options.nonegate) return\n\n for (var i = 0, l = pattern.length\n ; i < l && pattern.charAt(i) === '!'\n ; i++) {\n negate = !negate\n negateOffset++\n }\n\n if (negateOffset) this.pattern = pattern.substr(negateOffset)\n this.negate = negate\n}\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nminimatch.braceExpand = function (pattern, options) {\n return braceExpand(pattern, options)\n}\n\nMinimatch.prototype.braceExpand = braceExpand\n\nfunction braceExpand (pattern, options) {\n if (!options) {\n if (this instanceof Minimatch) {\n options = this.options\n } else {\n options = {}\n }\n }\n\n pattern = typeof pattern === 'undefined'\n ? this.pattern : pattern\n\n assertValidPattern(pattern)\n\n // Thanks to Yeting Li for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern)\n}\n\nvar MAX_PATTERN_LENGTH = 1024 * 64\nvar assertValidPattern = function (pattern) {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\nMinimatch.prototype.parse = parse\nvar SUBPARSE = {}\nfunction parse (pattern, isSub) {\n assertValidPattern(pattern)\n\n var options = this.options\n\n // shortcuts\n if (pattern === '**') {\n if (!options.noglobstar)\n return GLOBSTAR\n else\n pattern = '*'\n }\n if (pattern === '') return ''\n\n var re = ''\n var hasMagic = !!options.nocase\n var escaping = false\n // ? => one single character\n var patternListStack = []\n var negativeLists = []\n var stateChar\n var inClass = false\n var reClassStart = -1\n var classStart = -1\n // . and .. never match anything that doesn't start with .,\n // even when options.dot is set.\n var patternStart = pattern.charAt(0) === '.' ? '' // anything\n // not (start or / followed by . or .. followed by / or end)\n : options.dot ? '(?!(?:^|\\\\\\/)\\\\.{1,2}(?:$|\\\\\\/))'\n : '(?!\\\\.)'\n var self = this\n\n function clearStateChar () {\n if (stateChar) {\n // we had some state-tracking character\n // that wasn't consumed by this pass.\n switch (stateChar) {\n case '*':\n re += star\n hasMagic = true\n break\n case '?':\n re += qmark\n hasMagic = true\n break\n default:\n re += '\\\\' + stateChar\n break\n }\n self.debug('clearStateChar %j %j', stateChar, re)\n stateChar = false\n }\n }\n\n for (var i = 0, len = pattern.length, c\n ; (i < len) && (c = pattern.charAt(i))\n ; i++) {\n this.debug('%s\\t%s %s %j', pattern, i, re, c)\n\n // skip over any that are escaped.\n if (escaping && reSpecials[c]) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n switch (c) {\n /* istanbul ignore next */\n case '/': {\n // completely not allowed, even escaped.\n // Should already be path-split by now.\n return false\n }\n\n case '\\\\':\n clearStateChar()\n escaping = true\n continue\n\n // the various stateChar values\n // for the \"extglob\" stuff.\n case '?':\n case '*':\n case '+':\n case '@':\n case '!':\n this.debug('%s\\t%s %s %j <-- stateChar', pattern, i, re, c)\n\n // all of those are literals inside a class, except that\n // the glob [!a] means [^a] in regexp\n if (inClass) {\n this.debug(' in class')\n if (c === '!' && i === classStart + 1) c = '^'\n re += c\n continue\n }\n\n // if we already have a stateChar, then it means\n // that there was something like ** or +? in there.\n // Handle the stateChar, then proceed with this one.\n self.debug('call clearStateChar %j', stateChar)\n clearStateChar()\n stateChar = c\n // if extglob is disabled, then +(asdf|foo) isn't a thing.\n // just clear the statechar *now*, rather than even diving into\n // the patternList stuff.\n if (options.noext) clearStateChar()\n continue\n\n case '(':\n if (inClass) {\n re += '('\n continue\n }\n\n if (!stateChar) {\n re += '\\\\('\n continue\n }\n\n patternListStack.push({\n type: stateChar,\n start: i - 1,\n reStart: re.length,\n open: plTypes[stateChar].open,\n close: plTypes[stateChar].close\n })\n // negation is (?:(?!js)[^/]*)\n re += stateChar === '!' ? '(?:(?!(?:' : '(?:'\n this.debug('plType %j %j', stateChar, re)\n stateChar = false\n continue\n\n case ')':\n if (inClass || !patternListStack.length) {\n re += '\\\\)'\n continue\n }\n\n clearStateChar()\n hasMagic = true\n var pl = patternListStack.pop()\n // negation is (?:(?!js)[^/]*)\n // The others are (?:)\n re += pl.close\n if (pl.type === '!') {\n negativeLists.push(pl)\n }\n pl.reEnd = re.length\n continue\n\n case '|':\n if (inClass || !patternListStack.length || escaping) {\n re += '\\\\|'\n escaping = false\n continue\n }\n\n clearStateChar()\n re += '|'\n continue\n\n // these are mostly the same in regexp and glob\n case '[':\n // swallow any state-tracking char before the [\n clearStateChar()\n\n if (inClass) {\n re += '\\\\' + c\n continue\n }\n\n inClass = true\n classStart = i\n reClassStart = re.length\n re += c\n continue\n\n case ']':\n // a right bracket shall lose its special\n // meaning and represent itself in\n // a bracket expression if it occurs\n // first in the list. -- POSIX.2 2.8.3.2\n if (i === classStart + 1 || !inClass) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n // handle the case where we left a class open.\n // \"[z-a]\" is valid, equivalent to \"\\[z-a\\]\"\n // split where the last [ was, make sure we don't have\n // an invalid re. if so, re-walk the contents of the\n // would-be class to re-translate any characters that\n // were passed through as-is\n // TODO: It would probably be faster to determine this\n // without a try/catch and a new RegExp, but it's tricky\n // to do safely. For now, this is safe and works.\n var cs = pattern.substring(classStart + 1, i)\n try {\n RegExp('[' + cs + ']')\n } catch (er) {\n // not a valid class!\n var sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0] + '\\\\]'\n hasMagic = hasMagic || sp[1]\n inClass = false\n continue\n }\n\n // finish up the class.\n hasMagic = true\n inClass = false\n re += c\n continue\n\n default:\n // swallow any state char that wasn't consumed\n clearStateChar()\n\n if (escaping) {\n // no need\n escaping = false\n } else if (reSpecials[c]\n && !(c === '^' && inClass)) {\n re += '\\\\'\n }\n\n re += c\n\n } // switch\n } // for\n\n // handle the case where we left a class open.\n // \"[abc\" is valid, equivalent to \"\\[abc\"\n if (inClass) {\n // split where the last [ was, and escape it\n // this is a huge pita. We now have to re-walk\n // the contents of the would-be class to re-translate\n // any characters that were passed through as-is\n cs = pattern.substr(classStart + 1)\n sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0]\n hasMagic = hasMagic || sp[1]\n }\n\n // handle the case where we had a +( thing at the *end*\n // of the pattern.\n // each pattern list stack adds 3 chars, and we need to go through\n // and escape any | chars that were passed through as-is for the regexp.\n // Go through and escape them, taking care not to double-escape any\n // | chars that were already escaped.\n for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {\n var tail = re.slice(pl.reStart + pl.open.length)\n this.debug('setting tail', re, pl)\n // maybe some even number of \\, then maybe 1 \\, followed by a |\n tail = tail.replace(/((?:\\\\{2}){0,64})(\\\\?)\\|/g, function (_, $1, $2) {\n if (!$2) {\n // the | isn't already escaped, so escape it.\n $2 = '\\\\'\n }\n\n // need to escape all those slashes *again*, without escaping the\n // one that we need for escaping the | character. As it works out,\n // escaping an even number of slashes can be done by simply repeating\n // it exactly after itself. That's why this trick works.\n //\n // I am sorry that you have to see this.\n return $1 + $1 + $2 + '|'\n })\n\n this.debug('tail=%j\\n %s', tail, tail, pl, re)\n var t = pl.type === '*' ? star\n : pl.type === '?' ? qmark\n : '\\\\' + pl.type\n\n hasMagic = true\n re = re.slice(0, pl.reStart) + t + '\\\\(' + tail\n }\n\n // handle trailing things that only matter at the very end.\n clearStateChar()\n if (escaping) {\n // trailing \\\\\n re += '\\\\\\\\'\n }\n\n // only need to apply the nodot start if the re starts with\n // something that could conceivably capture a dot\n var addPatternStart = false\n switch (re.charAt(0)) {\n case '[': case '.': case '(': addPatternStart = true\n }\n\n // Hack to work around lack of negative lookbehind in JS\n // A pattern like: *.!(x).!(y|z) needs to ensure that a name\n // like 'a.xyz.yz' doesn't match. So, the first negative\n // lookahead, has to look ALL the way ahead, to the end of\n // the pattern.\n for (var n = negativeLists.length - 1; n > -1; n--) {\n var nl = negativeLists[n]\n\n var nlBefore = re.slice(0, nl.reStart)\n var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)\n var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)\n var nlAfter = re.slice(nl.reEnd)\n\n nlLast += nlAfter\n\n // Handle nested stuff like *(*.js|!(*.json)), where open parens\n // mean that we should *not* include the ) in the bit that is considered\n // \"after\" the negated section.\n var openParensBefore = nlBefore.split('(').length - 1\n var cleanAfter = nlAfter\n for (i = 0; i < openParensBefore; i++) {\n cleanAfter = cleanAfter.replace(/\\)[+*?]?/, '')\n }\n nlAfter = cleanAfter\n\n var dollar = ''\n if (nlAfter === '' && isSub !== SUBPARSE) {\n dollar = '$'\n }\n var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast\n re = newRe\n }\n\n // if the re is not \"\" at this point, then we need to make sure\n // it doesn't match against an empty path part.\n // Otherwise a/* will match a/, which it should not.\n if (re !== '' && hasMagic) {\n re = '(?=.)' + re\n }\n\n if (addPatternStart) {\n re = patternStart + re\n }\n\n // parsing just a piece of a larger pattern.\n if (isSub === SUBPARSE) {\n return [re, hasMagic]\n }\n\n // skip the regexp for non-magical patterns\n // unescape anything in it, though, so that it'll be\n // an exact match against a file etc.\n if (!hasMagic) {\n return globUnescape(pattern)\n }\n\n var flags = options.nocase ? 'i' : ''\n try {\n var regExp = new RegExp('^' + re + '$', flags)\n } catch (er) /* istanbul ignore next - should be impossible */ {\n // If it was an invalid regular expression, then it can't match\n // anything. This trick looks for a character after the end of\n // the string, which is of course impossible, except in multi-line\n // mode, but it's not a /m regex.\n return new RegExp('$.')\n }\n\n regExp._glob = pattern\n regExp._src = re\n\n return regExp\n}\n\nminimatch.makeRe = function (pattern, options) {\n return new Minimatch(pattern, options || {}).makeRe()\n}\n\nMinimatch.prototype.makeRe = makeRe\nfunction makeRe () {\n if (this.regexp || this.regexp === false) return this.regexp\n\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n var set = this.set\n\n if (!set.length) {\n this.regexp = false\n return this.regexp\n }\n var options = this.options\n\n var twoStar = options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot\n var flags = options.nocase ? 'i' : ''\n\n var re = set.map(function (pattern) {\n return pattern.map(function (p) {\n return (p === GLOBSTAR) ? twoStar\n : (typeof p === 'string') ? regExpEscape(p)\n : p._src\n }).join('\\\\\\/')\n }).join('|')\n\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^(?:' + re + ')$'\n\n // can match anything, as long as it's not this.\n if (this.negate) re = '^(?!' + re + ').*$'\n\n try {\n this.regexp = new RegExp(re, flags)\n } catch (ex) /* istanbul ignore next - should be impossible */ {\n this.regexp = false\n }\n return this.regexp\n}\n\nminimatch.match = function (list, pattern, options) {\n options = options || {}\n var mm = new Minimatch(pattern, options)\n list = list.filter(function (f) {\n return mm.match(f)\n })\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\n\nMinimatch.prototype.match = function match (f, partial) {\n if (typeof partial === 'undefined') partial = this.partial\n this.debug('match', f, this.pattern)\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) return false\n if (this.empty) return f === ''\n\n if (f === '/' && partial) return true\n\n var options = this.options\n\n // windows: need to use /, not \\\n if (path.sep !== '/') {\n f = f.split(path.sep).join('/')\n }\n\n // treat the test path as a set of pathparts.\n f = f.split(slashSplit)\n this.debug(this.pattern, 'split', f)\n\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n\n var set = this.set\n this.debug(this.pattern, 'set', set)\n\n // Find the basename of the path by looking for the last non-empty segment\n var filename\n var i\n for (i = f.length - 1; i >= 0; i--) {\n filename = f[i]\n if (filename) break\n }\n\n for (i = 0; i < set.length; i++) {\n var pattern = set[i]\n var file = f\n if (options.matchBase && pattern.length === 1) {\n file = [filename]\n }\n var hit = this.matchOne(file, pattern, partial)\n if (hit) {\n if (options.flipNegate) return true\n return !this.negate\n }\n }\n\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) return false\n return this.negate\n}\n\n// set partial to true to test if, for example,\n// \"/a/b\" matches the start of \"/*/b/*/d\"\n// Partial means, if you run out of file before you run\n// out of pattern, then that's fine, as long as all\n// the parts match.\nMinimatch.prototype.matchOne = function (file, pattern, partial) {\n var options = this.options\n\n this.debug('matchOne',\n { 'this': this, file: file, pattern: pattern })\n\n this.debug('matchOne', file.length, pattern.length)\n\n for (var fi = 0,\n pi = 0,\n fl = file.length,\n pl = pattern.length\n ; (fi < fl) && (pi < pl)\n ; fi++, pi++) {\n this.debug('matchOne loop')\n var p = pattern[pi]\n var f = file[fi]\n\n this.debug(pattern, p, f)\n\n // should be impossible.\n // some invalid regexp stuff in the set.\n /* istanbul ignore if */\n if (p === false) return false\n\n if (p === GLOBSTAR) {\n this.debug('GLOBSTAR', [pattern, p, f])\n\n // \"**\"\n // a/**/b/**/c would match the following:\n // a/b/x/y/z/c\n // a/x/y/z/b/c\n // a/b/x/b/x/c\n // a/b/c\n // To do this, take the rest of the pattern after\n // the **, and see if it would match the file remainder.\n // If so, return success.\n // If not, the ** \"swallows\" a segment, and try again.\n // This is recursively awful.\n //\n // a/**/b/**/c matching a/b/x/y/z/c\n // - a matches a\n // - doublestar\n // - matchOne(b/x/y/z/c, b/**/c)\n // - b matches b\n // - doublestar\n // - matchOne(x/y/z/c, c) -> no\n // - matchOne(y/z/c, c) -> no\n // - matchOne(z/c, c) -> no\n // - matchOne(c, c) yes, hit\n var fr = fi\n var pr = pi + 1\n if (pr === pl) {\n this.debug('** at the end')\n // a ** at the end will just swallow the rest.\n // We have found a match.\n // however, it will not swallow /.x, unless\n // options.dot is set.\n // . and .. are *never* matched by **, for explosively\n // exponential reasons.\n for (; fi < fl; fi++) {\n if (file[fi] === '.' || file[fi] === '..' ||\n (!options.dot && file[fi].charAt(0) === '.')) return false\n }\n return true\n }\n\n // ok, let's see if we can swallow whatever we can.\n while (fr < fl) {\n var swallowee = file[fr]\n\n this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n // XXX remove this slice. Just pass the start index.\n if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n this.debug('globstar found match!', fr, fl, swallowee)\n // found a match.\n return true\n } else {\n // can't swallow \".\" or \"..\" ever.\n // can only swallow \".foo\" when explicitly asked.\n if (swallowee === '.' || swallowee === '..' ||\n (!options.dot && swallowee.charAt(0) === '.')) {\n this.debug('dot detected!', file, fr, pattern, pr)\n break\n }\n\n // ** swallows a segment, and continue.\n this.debug('globstar swallow a segment, and continue')\n fr++\n }\n }\n\n // no match was found.\n // However, in partial mode, we can't say this is necessarily over.\n // If there's more *pattern* left, then\n /* istanbul ignore if */\n if (partial) {\n // ran out of file\n this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n if (fr === fl) return true\n }\n return false\n }\n\n // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n var hit\n if (typeof p === 'string') {\n hit = f === p\n this.debug('string match', p, f, hit)\n } else {\n hit = f.match(p)\n this.debug('pattern match', p, f, hit)\n }\n\n if (!hit) return false\n }\n\n // Note: ending in / means that we'll get a final \"\"\n // at the end of the pattern. This can only match a\n // corresponding \"\" at the end of the file.\n // If the file ends in /, then it can only match a\n // a pattern that ends in /, unless the pattern just\n // doesn't have any more for it. But, a/b/ should *not*\n // match \"a/b/*\", even though \"\" matches against the\n // [^/]*? pattern, except in partial mode, where it might\n // simply not be reached yet.\n // However, a/b/ should still satisfy a/*\n\n // now either we fell off the end of the pattern, or we're done.\n if (fi === fl && pi === pl) {\n // ran out of pattern and filename at the same time.\n // an exact hit!\n return true\n } else if (fi === fl) {\n // ran out of file, but still had pattern left.\n // this is ok if we're doing the match as part of\n // a glob fs traversal.\n return partial\n } else /* istanbul ignore else */ if (pi === pl) {\n // ran out of pattern, still have file left.\n // this is only acceptable if we're on the very last\n // empty segment of a file with a trailing slash.\n // a/* should match a/b/\n return (fi === fl - 1) && (file[fi] === '')\n }\n\n // should be unreachable.\n /* istanbul ignore next */\n throw new Error('wtf?')\n}\n\n// replace stuff like \\* with *\nfunction globUnescape (s) {\n return s.replace(/\\\\(.)/g, '$1')\n}\n\nfunction regExpEscape (s) {\n return s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n}\n","module.exports = globSync\nglobSync.GlobSync = GlobSync\n\nvar rp = require('fs.realpath')\nvar minimatch = require('minimatch')\nvar Minimatch = minimatch.Minimatch\nvar Glob = require('./glob.js').Glob\nvar util = require('util')\nvar path = require('path')\nvar assert = require('assert')\nvar isAbsolute = require('path-is-absolute')\nvar common = require('./common.js')\nvar setopts = common.setopts\nvar ownProp = common.ownProp\nvar childrenIgnored = common.childrenIgnored\nvar isIgnored = common.isIgnored\n\nfunction globSync (pattern, options) {\n if (typeof options === 'function' || arguments.length === 3)\n throw new TypeError('callback provided to sync glob\\n'+\n 'See: https://github.com/isaacs/node-glob/issues/167')\n\n return new GlobSync(pattern, options).found\n}\n\nfunction GlobSync (pattern, options) {\n if (!pattern)\n throw new Error('must provide pattern')\n\n if (typeof options === 'function' || arguments.length === 3)\n throw new TypeError('callback provided to sync glob\\n'+\n 'See: https://github.com/isaacs/node-glob/issues/167')\n\n if (!(this instanceof GlobSync))\n return new GlobSync(pattern, options)\n\n setopts(this, pattern, options)\n\n if (this.noprocess)\n return this\n\n var n = this.minimatch.set.length\n this.matches = new Array(n)\n for (var i = 0; i < n; i ++) {\n this._process(this.minimatch.set[i], i, false)\n }\n this._finish()\n}\n\nGlobSync.prototype._finish = function () {\n assert.ok(this instanceof GlobSync)\n if (this.realpath) {\n var self = this\n this.matches.forEach(function (matchset, index) {\n var set = self.matches[index] = Object.create(null)\n for (var p in matchset) {\n try {\n p = self._makeAbs(p)\n var real = rp.realpathSync(p, self.realpathCache)\n set[real] = true\n } catch (er) {\n if (er.syscall === 'stat')\n set[self._makeAbs(p)] = true\n else\n throw er\n }\n }\n })\n }\n common.finish(this)\n}\n\n\nGlobSync.prototype._process = function (pattern, index, inGlobStar) {\n assert.ok(this instanceof GlobSync)\n\n // Get the first [n] parts of pattern that are all strings.\n var n = 0\n while (typeof pattern[n] === 'string') {\n n ++\n }\n // now n is the index of the first one that is *not* a string.\n\n // See if there's anything else\n var prefix\n switch (n) {\n // if not, then this is rather simple\n case pattern.length:\n this._processSimple(pattern.join('/'), index)\n return\n\n case 0:\n // pattern *starts* with some non-trivial item.\n // going to readdir(cwd), but not include the prefix in matches.\n prefix = null\n break\n\n default:\n // pattern has some string bits in the front.\n // whatever it starts with, whether that's 'absolute' like /foo/bar,\n // or 'relative' like '../baz'\n prefix = pattern.slice(0, n).join('/')\n break\n }\n\n var remain = pattern.slice(n)\n\n // get the list of entries.\n var read\n if (prefix === null)\n read = '.'\n else if (isAbsolute(prefix) ||\n isAbsolute(pattern.map(function (p) {\n return typeof p === 'string' ? p : '[*]'\n }).join('/'))) {\n if (!prefix || !isAbsolute(prefix))\n prefix = '/' + prefix\n read = prefix\n } else\n read = prefix\n\n var abs = this._makeAbs(read)\n\n //if ignored, skip processing\n if (childrenIgnored(this, read))\n return\n\n var isGlobStar = remain[0] === minimatch.GLOBSTAR\n if (isGlobStar)\n this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)\n else\n this._processReaddir(prefix, read, abs, remain, index, inGlobStar)\n}\n\n\nGlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {\n var entries = this._readdir(abs, inGlobStar)\n\n // if the abs isn't a dir, then nothing can match!\n if (!entries)\n return\n\n // It will only match dot entries if it starts with a dot, or if\n // dot is set. Stuff like @(.foo|.bar) isn't allowed.\n var pn = remain[0]\n var negate = !!this.minimatch.negate\n var rawGlob = pn._glob\n var dotOk = this.dot || rawGlob.charAt(0) === '.'\n\n var matchedEntries = []\n for (var i = 0; i < entries.length; i++) {\n var e = entries[i]\n if (e.charAt(0) !== '.' || dotOk) {\n var m\n if (negate && !prefix) {\n m = !e.match(pn)\n } else {\n m = e.match(pn)\n }\n if (m)\n matchedEntries.push(e)\n }\n }\n\n var len = matchedEntries.length\n // If there are no matched entries, then nothing matches.\n if (len === 0)\n return\n\n // if this is the last remaining pattern bit, then no need for\n // an additional stat *unless* the user has specified mark or\n // stat explicitly. We know they exist, since readdir returned\n // them.\n\n if (remain.length === 1 && !this.mark && !this.stat) {\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n if (prefix) {\n if (prefix.slice(-1) !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n\n if (e.charAt(0) === '/' && !this.nomount) {\n e = path.join(this.root, e)\n }\n this._emitMatch(index, e)\n }\n // This was the last one, and no stats were needed\n return\n }\n\n // now test all matched entries as stand-ins for that part\n // of the pattern.\n remain.shift()\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n var newPattern\n if (prefix)\n newPattern = [prefix, e]\n else\n newPattern = [e]\n this._process(newPattern.concat(remain), index, inGlobStar)\n }\n}\n\n\nGlobSync.prototype._emitMatch = function (index, e) {\n if (isIgnored(this, e))\n return\n\n var abs = this._makeAbs(e)\n\n if (this.mark)\n e = this._mark(e)\n\n if (this.absolute) {\n e = abs\n }\n\n if (this.matches[index][e])\n return\n\n if (this.nodir) {\n var c = this.cache[abs]\n if (c === 'DIR' || Array.isArray(c))\n return\n }\n\n this.matches[index][e] = true\n\n if (this.stat)\n this._stat(e)\n}\n\n\nGlobSync.prototype._readdirInGlobStar = function (abs) {\n // follow all symlinked directories forever\n // just proceed as if this is a non-globstar situation\n if (this.follow)\n return this._readdir(abs, false)\n\n var entries\n var lstat\n var stat\n try {\n lstat = this.fs.lstatSync(abs)\n } catch (er) {\n if (er.code === 'ENOENT') {\n // lstat failed, doesn't exist\n return null\n }\n }\n\n var isSym = lstat && lstat.isSymbolicLink()\n this.symlinks[abs] = isSym\n\n // If it's not a symlink or a dir, then it's definitely a regular file.\n // don't bother doing a readdir in that case.\n if (!isSym && lstat && !lstat.isDirectory())\n this.cache[abs] = 'FILE'\n else\n entries = this._readdir(abs, false)\n\n return entries\n}\n\nGlobSync.prototype._readdir = function (abs, inGlobStar) {\n var entries\n\n if (inGlobStar && !ownProp(this.symlinks, abs))\n return this._readdirInGlobStar(abs)\n\n if (ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n if (!c || c === 'FILE')\n return null\n\n if (Array.isArray(c))\n return c\n }\n\n try {\n return this._readdirEntries(abs, this.fs.readdirSync(abs))\n } catch (er) {\n this._readdirError(abs, er)\n return null\n }\n}\n\nGlobSync.prototype._readdirEntries = function (abs, entries) {\n // if we haven't asked to stat everything, then just\n // assume that everything in there exists, so we can avoid\n // having to stat it a second time.\n if (!this.mark && !this.stat) {\n for (var i = 0; i < entries.length; i ++) {\n var e = entries[i]\n if (abs === '/')\n e = abs + e\n else\n e = abs + '/' + e\n this.cache[e] = true\n }\n }\n\n this.cache[abs] = entries\n\n // mark and cache dir-ness\n return entries\n}\n\nGlobSync.prototype._readdirError = function (f, er) {\n // handle errors, and cache the information\n switch (er.code) {\n case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205\n case 'ENOTDIR': // totally normal. means it *does* exist.\n var abs = this._makeAbs(f)\n this.cache[abs] = 'FILE'\n if (abs === this.cwdAbs) {\n var error = new Error(er.code + ' invalid cwd ' + this.cwd)\n error.path = this.cwd\n error.code = er.code\n throw error\n }\n break\n\n case 'ENOENT': // not terribly unusual\n case 'ELOOP':\n case 'ENAMETOOLONG':\n case 'UNKNOWN':\n this.cache[this._makeAbs(f)] = false\n break\n\n default: // some unusual error. Treat as failure.\n this.cache[this._makeAbs(f)] = false\n if (this.strict)\n throw er\n if (!this.silent)\n console.error('glob error', er)\n break\n }\n}\n\nGlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {\n\n var entries = this._readdir(abs, inGlobStar)\n\n // no entries means not a dir, so it can never have matches\n // foo.txt/** doesn't match foo.txt\n if (!entries)\n return\n\n // test without the globstar, and with every child both below\n // and replacing the globstar.\n var remainWithoutGlobStar = remain.slice(1)\n var gspref = prefix ? [ prefix ] : []\n var noGlobStar = gspref.concat(remainWithoutGlobStar)\n\n // the noGlobStar pattern exits the inGlobStar state\n this._process(noGlobStar, index, false)\n\n var len = entries.length\n var isSym = this.symlinks[abs]\n\n // If it's a symlink, and we're in a globstar, then stop\n if (isSym && inGlobStar)\n return\n\n for (var i = 0; i < len; i++) {\n var e = entries[i]\n if (e.charAt(0) === '.' && !this.dot)\n continue\n\n // these two cases enter the inGlobStar state\n var instead = gspref.concat(entries[i], remainWithoutGlobStar)\n this._process(instead, index, true)\n\n var below = gspref.concat(entries[i], remain)\n this._process(below, index, true)\n }\n}\n\nGlobSync.prototype._processSimple = function (prefix, index) {\n // XXX review this. Shouldn't it be doing the mounting etc\n // before doing stat? kinda weird?\n var exists = this._stat(prefix)\n\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n // If it doesn't exist, then just mark the lack of results\n if (!exists)\n return\n\n if (prefix && isAbsolute(prefix) && !this.nomount) {\n var trail = /[\\/\\\\]$/.test(prefix)\n if (prefix.charAt(0) === '/') {\n prefix = path.join(this.root, prefix)\n } else {\n prefix = path.resolve(this.root, prefix)\n if (trail)\n prefix += '/'\n }\n }\n\n if (process.platform === 'win32')\n prefix = prefix.replace(/\\\\/g, '/')\n\n // Mark this as a match\n this._emitMatch(index, prefix)\n}\n\n// Returns either 'DIR', 'FILE', or false\nGlobSync.prototype._stat = function (f) {\n var abs = this._makeAbs(f)\n var needDir = f.slice(-1) === '/'\n\n if (f.length > this.maxLength)\n return false\n\n if (!this.stat && ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n\n if (Array.isArray(c))\n c = 'DIR'\n\n // It exists, but maybe not how we need it\n if (!needDir || c === 'DIR')\n return c\n\n if (needDir && c === 'FILE')\n return false\n\n // otherwise we have to stat, because maybe c=true\n // if we know it exists, but not what it is.\n }\n\n var exists\n var stat = this.statCache[abs]\n if (!stat) {\n var lstat\n try {\n lstat = this.fs.lstatSync(abs)\n } catch (er) {\n if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {\n this.statCache[abs] = false\n return false\n }\n }\n\n if (lstat && lstat.isSymbolicLink()) {\n try {\n stat = this.fs.statSync(abs)\n } catch (er) {\n stat = lstat\n }\n } else {\n stat = lstat\n }\n }\n\n this.statCache[abs] = stat\n\n var c = true\n if (stat)\n c = stat.isDirectory() ? 'DIR' : 'FILE'\n\n this.cache[abs] = this.cache[abs] || c\n\n if (needDir && c === 'FILE')\n return false\n\n return c\n}\n\nGlobSync.prototype._mark = function (p) {\n return common.mark(this, p)\n}\n\nGlobSync.prototype._makeAbs = function (f) {\n return common.makeAbs(this, f)\n}\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n","var wrappy = require('wrappy')\nvar reqs = Object.create(null)\nvar once = require('once')\n\nmodule.exports = wrappy(inflight)\n\nfunction inflight (key, cb) {\n if (reqs[key]) {\n reqs[key].push(cb)\n return null\n } else {\n reqs[key] = [cb]\n return makeres(key)\n }\n}\n\nfunction makeres (key) {\n return once(function RES () {\n var cbs = reqs[key]\n var len = cbs.length\n var args = slice(arguments)\n\n // XXX It's somewhat ambiguous whether a new callback added in this\n // pass should be queued for later execution if something in the\n // list of callbacks throws, or if it should just be discarded.\n // However, it's such an edge case that it hardly matters, and either\n // choice is likely as surprising as the other.\n // As it happens, we do go ahead and schedule it for later execution.\n try {\n for (var i = 0; i < len; i++) {\n cbs[i].apply(null, args)\n }\n } finally {\n if (cbs.length > len) {\n // added more in the interim.\n // de-zalgo, just in case, but don't call again.\n cbs.splice(0, len)\n process.nextTick(function () {\n RES.apply(null, args)\n })\n } else {\n delete reqs[key]\n }\n }\n })\n}\n\nfunction slice (args) {\n var length = args.length\n var array = []\n\n for (var i = 0; i < length; i++) array[i] = args[i]\n return array\n}\n","try {\n var util = require('util');\n /* istanbul ignore next */\n if (typeof util.inherits !== 'function') throw '';\n module.exports = util.inherits;\n} catch (e) {\n /* istanbul ignore next */\n module.exports = require('./inherits_browser.js');\n}\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n","module.exports = minimatch\nminimatch.Minimatch = Minimatch\n\nconst path = (() => { try { return require('path') } catch (e) {}})() || {\n sep: '/'\n}\nminimatch.sep = path.sep\n\nconst GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}\nconst expand = require('brace-expansion')\n\nconst plTypes = {\n '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},\n '?': { open: '(?:', close: ')?' },\n '+': { open: '(?:', close: ')+' },\n '*': { open: '(?:', close: ')*' },\n '@': { open: '(?:', close: ')' }\n}\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\\\/|^)(?:\\\\.{1,2})($|\\\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\\\/|^)\\\\.).)*?'\n\n// characters that need to be escaped in RegExp.\nconst reSpecials = charSet('().*{}+?[]^$\\\\!')\n\n// \"abc\" -> { a:true, b:true, c:true }\nfunction charSet (s) {\n return s.split('').reduce(function (set, c) {\n set[c] = true\n return set\n }, {})\n}\n\n// normalizes slashes.\nconst slashSplit = /\\/+/\n\nminimatch.filter = filter\nfunction filter (pattern, options) {\n options = options || {}\n return function (p, i, list) {\n return minimatch(p, pattern, options)\n }\n}\n\nfunction ext (a, b) {\n a = a || {}\n b = b || {}\n const t = {}\n Object.keys(a).forEach(function (k) {\n t[k] = a[k]\n })\n Object.keys(b).forEach(function (k) {\n t[k] = b[k]\n })\n return t\n}\n\nminimatch.defaults = function (def) {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch\n }\n\n const orig = minimatch\n\n const m = function minimatch (p, pattern, options) {\n return orig(p, pattern, ext(def, options))\n }\n\n m.Minimatch = function Minimatch (pattern, options) {\n return new orig.Minimatch(pattern, ext(def, options))\n }\n m.Minimatch.defaults = options => {\n return orig.defaults(ext(def, options)).Minimatch\n }\n\n m.filter = function filter (pattern, options) {\n return orig.filter(pattern, ext(def, options))\n }\n\n m.defaults = function defaults (options) {\n return orig.defaults(ext(def, options))\n }\n\n m.makeRe = function makeRe (pattern, options) {\n return orig.makeRe(pattern, ext(def, options))\n }\n\n m.braceExpand = function braceExpand (pattern, options) {\n return orig.braceExpand(pattern, ext(def, options))\n }\n\n m.match = function (list, pattern, options) {\n return orig.match(list, pattern, ext(def, options))\n }\n\n return m\n}\n\nMinimatch.defaults = function (def) {\n return minimatch.defaults(def).Minimatch\n}\n\nfunction minimatch (p, pattern, options) {\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n // \"\" only matches \"\"\n if (pattern.trim() === '') return p === ''\n\n return new Minimatch(pattern, options).match(p)\n}\n\nfunction Minimatch (pattern, options) {\n if (!(this instanceof Minimatch)) {\n return new Minimatch(pattern, options)\n }\n\n assertValidPattern(pattern)\n\n if (!options) options = {}\n pattern = pattern.trim()\n\n // windows support: need to use /, not \\\n if (path.sep !== '/') {\n pattern = pattern.split(path.sep).join('/')\n }\n\n this.options = options\n this.set = []\n this.pattern = pattern\n this.regexp = null\n this.negate = false\n this.comment = false\n this.empty = false\n\n // make the set of regexps etc.\n this.make()\n}\n\nMinimatch.prototype.debug = function () {}\n\nMinimatch.prototype.make = make\nfunction make () {\n // don't do it more than once.\n if (this._made) return\n\n var pattern = this.pattern\n var options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n var set = this.globSet = this.braceExpand()\n\n if (options.debug) this.debug = console.error\n\n this.debug(this.pattern, set)\n\n // step 3: now we have a set, so turn each one into a series of path-portion\n // matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n set = this.globParts = set.map(function (s) {\n return s.split(slashSplit)\n })\n\n this.debug(this.pattern, set)\n\n // glob --> regexps\n set = set.map(function (s, si, set) {\n return s.map(this.parse, this)\n }, this)\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n set = set.filter(function (s) {\n return s.indexOf(false) === -1\n })\n\n this.debug(this.pattern, set)\n\n this.set = set\n}\n\nMinimatch.prototype.parseNegate = parseNegate\nfunction parseNegate () {\n var pattern = this.pattern\n var negate = false\n var options = this.options\n var negateOffset = 0\n\n if (options.nonegate) return\n\n for (var i = 0, l = pattern.length\n ; i < l && pattern.charAt(i) === '!'\n ; i++) {\n negate = !negate\n negateOffset++\n }\n\n if (negateOffset) this.pattern = pattern.substr(negateOffset)\n this.negate = negate\n}\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nminimatch.braceExpand = function (pattern, options) {\n return braceExpand(pattern, options)\n}\n\nMinimatch.prototype.braceExpand = braceExpand\n\nfunction braceExpand (pattern, options) {\n if (!options) {\n if (this instanceof Minimatch) {\n options = this.options\n } else {\n options = {}\n }\n }\n\n pattern = typeof pattern === 'undefined'\n ? this.pattern : pattern\n\n assertValidPattern(pattern)\n\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern)\n}\n\nconst MAX_PATTERN_LENGTH = 1024 * 64\nconst assertValidPattern = pattern => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\nMinimatch.prototype.parse = parse\nconst SUBPARSE = {}\nfunction parse (pattern, isSub) {\n assertValidPattern(pattern)\n\n var options = this.options\n\n // shortcuts\n if (!options.noglobstar && pattern === '**') return GLOBSTAR\n if (pattern === '') return ''\n\n var re = ''\n var hasMagic = false\n var escaping = false\n // ? => one single character\n var patternListStack = []\n var negativeLists = []\n var stateChar\n var inClass = false\n var reClassStart = -1\n var classStart = -1\n // . and .. never match anything that doesn't start with .,\n // even when options.dot is set.\n var patternStart = pattern.charAt(0) === '.' ? '' // anything\n // not (start or / followed by . or .. followed by / or end)\n : options.dot ? '(?!(?:^|\\\\\\/)\\\\.{1,2}(?:$|\\\\\\/))'\n : '(?!\\\\.)'\n var self = this\n\n function clearStateChar () {\n if (stateChar) {\n // we had some state-tracking character\n // that wasn't consumed by this pass.\n switch (stateChar) {\n case '*':\n re += star\n hasMagic = true\n break\n case '?':\n re += qmark\n hasMagic = true\n break\n default:\n re += '\\\\' + stateChar\n break\n }\n self.debug('clearStateChar %j %j', stateChar, re)\n stateChar = false\n }\n }\n\n for (var i = 0, len = pattern.length, c\n ; (i < len) && (c = pattern.charAt(i))\n ; i++) {\n this.debug('%s\\t%s %s %j', pattern, i, re, c)\n\n // skip over any that are escaped.\n if (escaping && reSpecials[c]) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n switch (c) {\n case '/': /* istanbul ignore next */ {\n // completely not allowed, even escaped.\n // Should already be path-split by now.\n return false\n }\n\n case '\\\\':\n clearStateChar()\n escaping = true\n continue\n\n // the various stateChar values\n // for the \"extglob\" stuff.\n case '?':\n case '*':\n case '+':\n case '@':\n case '!':\n this.debug('%s\\t%s %s %j <-- stateChar', pattern, i, re, c)\n\n // all of those are literals inside a class, except that\n // the glob [!a] means [^a] in regexp\n if (inClass) {\n this.debug(' in class')\n if (c === '!' && i === classStart + 1) c = '^'\n re += c\n continue\n }\n\n // if we already have a stateChar, then it means\n // that there was something like ** or +? in there.\n // Handle the stateChar, then proceed with this one.\n self.debug('call clearStateChar %j', stateChar)\n clearStateChar()\n stateChar = c\n // if extglob is disabled, then +(asdf|foo) isn't a thing.\n // just clear the statechar *now*, rather than even diving into\n // the patternList stuff.\n if (options.noext) clearStateChar()\n continue\n\n case '(':\n if (inClass) {\n re += '('\n continue\n }\n\n if (!stateChar) {\n re += '\\\\('\n continue\n }\n\n patternListStack.push({\n type: stateChar,\n start: i - 1,\n reStart: re.length,\n open: plTypes[stateChar].open,\n close: plTypes[stateChar].close\n })\n // negation is (?:(?!js)[^/]*)\n re += stateChar === '!' ? '(?:(?!(?:' : '(?:'\n this.debug('plType %j %j', stateChar, re)\n stateChar = false\n continue\n\n case ')':\n if (inClass || !patternListStack.length) {\n re += '\\\\)'\n continue\n }\n\n clearStateChar()\n hasMagic = true\n var pl = patternListStack.pop()\n // negation is (?:(?!js)[^/]*)\n // The others are (?:)\n re += pl.close\n if (pl.type === '!') {\n negativeLists.push(pl)\n }\n pl.reEnd = re.length\n continue\n\n case '|':\n if (inClass || !patternListStack.length || escaping) {\n re += '\\\\|'\n escaping = false\n continue\n }\n\n clearStateChar()\n re += '|'\n continue\n\n // these are mostly the same in regexp and glob\n case '[':\n // swallow any state-tracking char before the [\n clearStateChar()\n\n if (inClass) {\n re += '\\\\' + c\n continue\n }\n\n inClass = true\n classStart = i\n reClassStart = re.length\n re += c\n continue\n\n case ']':\n // a right bracket shall lose its special\n // meaning and represent itself in\n // a bracket expression if it occurs\n // first in the list. -- POSIX.2 2.8.3.2\n if (i === classStart + 1 || !inClass) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n // handle the case where we left a class open.\n // \"[z-a]\" is valid, equivalent to \"\\[z-a\\]\"\n if (inClass) {\n // split where the last [ was, make sure we don't have\n // an invalid re. if so, re-walk the contents of the\n // would-be class to re-translate any characters that\n // were passed through as-is\n // TODO: It would probably be faster to determine this\n // without a try/catch and a new RegExp, but it's tricky\n // to do safely. For now, this is safe and works.\n var cs = pattern.substring(classStart + 1, i)\n try {\n RegExp('[' + cs + ']')\n } catch (er) {\n // not a valid class!\n var sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0] + '\\\\]'\n hasMagic = hasMagic || sp[1]\n inClass = false\n continue\n }\n }\n\n // finish up the class.\n hasMagic = true\n inClass = false\n re += c\n continue\n\n default:\n // swallow any state char that wasn't consumed\n clearStateChar()\n\n if (escaping) {\n // no need\n escaping = false\n } else if (reSpecials[c]\n && !(c === '^' && inClass)) {\n re += '\\\\'\n }\n\n re += c\n\n } // switch\n } // for\n\n // handle the case where we left a class open.\n // \"[abc\" is valid, equivalent to \"\\[abc\"\n if (inClass) {\n // split where the last [ was, and escape it\n // this is a huge pita. We now have to re-walk\n // the contents of the would-be class to re-translate\n // any characters that were passed through as-is\n cs = pattern.substr(classStart + 1)\n sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0]\n hasMagic = hasMagic || sp[1]\n }\n\n // handle the case where we had a +( thing at the *end*\n // of the pattern.\n // each pattern list stack adds 3 chars, and we need to go through\n // and escape any | chars that were passed through as-is for the regexp.\n // Go through and escape them, taking care not to double-escape any\n // | chars that were already escaped.\n for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {\n var tail = re.slice(pl.reStart + pl.open.length)\n this.debug('setting tail', re, pl)\n // maybe some even number of \\, then maybe 1 \\, followed by a |\n tail = tail.replace(/((?:\\\\{2}){0,64})(\\\\?)\\|/g, function (_, $1, $2) {\n if (!$2) {\n // the | isn't already escaped, so escape it.\n $2 = '\\\\'\n }\n\n // need to escape all those slashes *again*, without escaping the\n // one that we need for escaping the | character. As it works out,\n // escaping an even number of slashes can be done by simply repeating\n // it exactly after itself. That's why this trick works.\n //\n // I am sorry that you have to see this.\n return $1 + $1 + $2 + '|'\n })\n\n this.debug('tail=%j\\n %s', tail, tail, pl, re)\n var t = pl.type === '*' ? star\n : pl.type === '?' ? qmark\n : '\\\\' + pl.type\n\n hasMagic = true\n re = re.slice(0, pl.reStart) + t + '\\\\(' + tail\n }\n\n // handle trailing things that only matter at the very end.\n clearStateChar()\n if (escaping) {\n // trailing \\\\\n re += '\\\\\\\\'\n }\n\n // only need to apply the nodot start if the re starts with\n // something that could conceivably capture a dot\n var addPatternStart = false\n switch (re.charAt(0)) {\n case '.':\n case '[':\n case '(': addPatternStart = true\n }\n\n // Hack to work around lack of negative lookbehind in JS\n // A pattern like: *.!(x).!(y|z) needs to ensure that a name\n // like 'a.xyz.yz' doesn't match. So, the first negative\n // lookahead, has to look ALL the way ahead, to the end of\n // the pattern.\n for (var n = negativeLists.length - 1; n > -1; n--) {\n var nl = negativeLists[n]\n\n var nlBefore = re.slice(0, nl.reStart)\n var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)\n var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)\n var nlAfter = re.slice(nl.reEnd)\n\n nlLast += nlAfter\n\n // Handle nested stuff like *(*.js|!(*.json)), where open parens\n // mean that we should *not* include the ) in the bit that is considered\n // \"after\" the negated section.\n var openParensBefore = nlBefore.split('(').length - 1\n var cleanAfter = nlAfter\n for (i = 0; i < openParensBefore; i++) {\n cleanAfter = cleanAfter.replace(/\\)[+*?]?/, '')\n }\n nlAfter = cleanAfter\n\n var dollar = ''\n if (nlAfter === '' && isSub !== SUBPARSE) {\n dollar = '$'\n }\n var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast\n re = newRe\n }\n\n // if the re is not \"\" at this point, then we need to make sure\n // it doesn't match against an empty path part.\n // Otherwise a/* will match a/, which it should not.\n if (re !== '' && hasMagic) {\n re = '(?=.)' + re\n }\n\n if (addPatternStart) {\n re = patternStart + re\n }\n\n // parsing just a piece of a larger pattern.\n if (isSub === SUBPARSE) {\n return [re, hasMagic]\n }\n\n // skip the regexp for non-magical patterns\n // unescape anything in it, though, so that it'll be\n // an exact match against a file etc.\n if (!hasMagic) {\n return globUnescape(pattern)\n }\n\n var flags = options.nocase ? 'i' : ''\n try {\n var regExp = new RegExp('^' + re + '$', flags)\n } catch (er) /* istanbul ignore next - should be impossible */ {\n // If it was an invalid regular expression, then it can't match\n // anything. This trick looks for a character after the end of\n // the string, which is of course impossible, except in multi-line\n // mode, but it's not a /m regex.\n return new RegExp('$.')\n }\n\n regExp._glob = pattern\n regExp._src = re\n\n return regExp\n}\n\nminimatch.makeRe = function (pattern, options) {\n return new Minimatch(pattern, options || {}).makeRe()\n}\n\nMinimatch.prototype.makeRe = makeRe\nfunction makeRe () {\n if (this.regexp || this.regexp === false) return this.regexp\n\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n var set = this.set\n\n if (!set.length) {\n this.regexp = false\n return this.regexp\n }\n var options = this.options\n\n var twoStar = options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot\n var flags = options.nocase ? 'i' : ''\n\n var re = set.map(function (pattern) {\n return pattern.map(function (p) {\n return (p === GLOBSTAR) ? twoStar\n : (typeof p === 'string') ? regExpEscape(p)\n : p._src\n }).join('\\\\\\/')\n }).join('|')\n\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^(?:' + re + ')$'\n\n // can match anything, as long as it's not this.\n if (this.negate) re = '^(?!' + re + ').*$'\n\n try {\n this.regexp = new RegExp(re, flags)\n } catch (ex) /* istanbul ignore next - should be impossible */ {\n this.regexp = false\n }\n return this.regexp\n}\n\nminimatch.match = function (list, pattern, options) {\n options = options || {}\n const mm = new Minimatch(pattern, options)\n list = list.filter(function (f) {\n return mm.match(f)\n })\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\n\nMinimatch.prototype.match = match\nfunction match (f, partial) {\n this.debug('match', f, this.pattern)\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) return false\n if (this.empty) return f === ''\n\n if (f === '/' && partial) return true\n\n var options = this.options\n\n // windows: need to use /, not \\\n if (path.sep !== '/') {\n f = f.split(path.sep).join('/')\n }\n\n // treat the test path as a set of pathparts.\n f = f.split(slashSplit)\n this.debug(this.pattern, 'split', f)\n\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n\n var set = this.set\n this.debug(this.pattern, 'set', set)\n\n // Find the basename of the path by looking for the last non-empty segment\n var filename\n var i\n for (i = f.length - 1; i >= 0; i--) {\n filename = f[i]\n if (filename) break\n }\n\n for (i = 0; i < set.length; i++) {\n var pattern = set[i]\n var file = f\n if (options.matchBase && pattern.length === 1) {\n file = [filename]\n }\n var hit = this.matchOne(file, pattern, partial)\n if (hit) {\n if (options.flipNegate) return true\n return !this.negate\n }\n }\n\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) return false\n return this.negate\n}\n\n// set partial to true to test if, for example,\n// \"/a/b\" matches the start of \"/*/b/*/d\"\n// Partial means, if you run out of file before you run\n// out of pattern, then that's fine, as long as all\n// the parts match.\nMinimatch.prototype.matchOne = function (file, pattern, partial) {\n var options = this.options\n\n this.debug('matchOne',\n { 'this': this, file: file, pattern: pattern })\n\n this.debug('matchOne', file.length, pattern.length)\n\n for (var fi = 0,\n pi = 0,\n fl = file.length,\n pl = pattern.length\n ; (fi < fl) && (pi < pl)\n ; fi++, pi++) {\n this.debug('matchOne loop')\n var p = pattern[pi]\n var f = file[fi]\n\n this.debug(pattern, p, f)\n\n // should be impossible.\n // some invalid regexp stuff in the set.\n /* istanbul ignore if */\n if (p === false) return false\n\n if (p === GLOBSTAR) {\n this.debug('GLOBSTAR', [pattern, p, f])\n\n // \"**\"\n // a/**/b/**/c would match the following:\n // a/b/x/y/z/c\n // a/x/y/z/b/c\n // a/b/x/b/x/c\n // a/b/c\n // To do this, take the rest of the pattern after\n // the **, and see if it would match the file remainder.\n // If so, return success.\n // If not, the ** \"swallows\" a segment, and try again.\n // This is recursively awful.\n //\n // a/**/b/**/c matching a/b/x/y/z/c\n // - a matches a\n // - doublestar\n // - matchOne(b/x/y/z/c, b/**/c)\n // - b matches b\n // - doublestar\n // - matchOne(x/y/z/c, c) -> no\n // - matchOne(y/z/c, c) -> no\n // - matchOne(z/c, c) -> no\n // - matchOne(c, c) yes, hit\n var fr = fi\n var pr = pi + 1\n if (pr === pl) {\n this.debug('** at the end')\n // a ** at the end will just swallow the rest.\n // We have found a match.\n // however, it will not swallow /.x, unless\n // options.dot is set.\n // . and .. are *never* matched by **, for explosively\n // exponential reasons.\n for (; fi < fl; fi++) {\n if (file[fi] === '.' || file[fi] === '..' ||\n (!options.dot && file[fi].charAt(0) === '.')) return false\n }\n return true\n }\n\n // ok, let's see if we can swallow whatever we can.\n while (fr < fl) {\n var swallowee = file[fr]\n\n this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n // XXX remove this slice. Just pass the start index.\n if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n this.debug('globstar found match!', fr, fl, swallowee)\n // found a match.\n return true\n } else {\n // can't swallow \".\" or \"..\" ever.\n // can only swallow \".foo\" when explicitly asked.\n if (swallowee === '.' || swallowee === '..' ||\n (!options.dot && swallowee.charAt(0) === '.')) {\n this.debug('dot detected!', file, fr, pattern, pr)\n break\n }\n\n // ** swallows a segment, and continue.\n this.debug('globstar swallow a segment, and continue')\n fr++\n }\n }\n\n // no match was found.\n // However, in partial mode, we can't say this is necessarily over.\n // If there's more *pattern* left, then\n /* istanbul ignore if */\n if (partial) {\n // ran out of file\n this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n if (fr === fl) return true\n }\n return false\n }\n\n // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n var hit\n if (typeof p === 'string') {\n if (options.nocase) {\n hit = f.toLowerCase() === p.toLowerCase()\n } else {\n hit = f === p\n }\n this.debug('string match', p, f, hit)\n } else {\n hit = f.match(p)\n this.debug('pattern match', p, f, hit)\n }\n\n if (!hit) return false\n }\n\n // Note: ending in / means that we'll get a final \"\"\n // at the end of the pattern. This can only match a\n // corresponding \"\" at the end of the file.\n // If the file ends in /, then it can only match a\n // a pattern that ends in /, unless the pattern just\n // doesn't have any more for it. But, a/b/ should *not*\n // match \"a/b/*\", even though \"\" matches against the\n // [^/]*? pattern, except in partial mode, where it might\n // simply not be reached yet.\n // However, a/b/ should still satisfy a/*\n\n // now either we fell off the end of the pattern, or we're done.\n if (fi === fl && pi === pl) {\n // ran out of pattern and filename at the same time.\n // an exact hit!\n return true\n } else if (fi === fl) {\n // ran out of file, but still had pattern left.\n // this is ok if we're doing the match as part of\n // a glob fs traversal.\n return partial\n } else /* istanbul ignore else */ if (pi === pl) {\n // ran out of pattern, still have file left.\n // this is only acceptable if we're on the very last\n // empty segment of a file with a trailing slash.\n // a/* should match a/b/\n return (fi === fl - 1) && (file[fi] === '')\n }\n\n // should be unreachable.\n /* istanbul ignore next */\n throw new Error('wtf?')\n}\n\n// replace stuff like \\* with *\nfunction globUnescape (s) {\n return s.replace(/\\\\(.)/g, '$1')\n}\n\nfunction regExpEscape (s) {\n return s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n}\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","module.exports = require('util').inspect;\n","var wrappy = require('wrappy')\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n\n Object.defineProperty(Function.prototype, 'onceStrict', {\n value: function () {\n return onceStrict(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var f = function () {\n if (f.called) return f.value\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n f.called = false\n return f\n}\n\nfunction onceStrict (fn) {\n var f = function () {\n if (f.called)\n throw new Error(f.onceError)\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n var name = fn.name || 'Function wrapped with `once`'\n f.onceError = name + \" shouldn't be called more than once\"\n f.called = false\n return f\n}\n","'use strict';\n\nfunction posix(path) {\n\treturn path.charAt(0) === '/';\n}\n\nfunction win32(path) {\n\t// https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56\n\tvar splitDeviceRe = /^([a-zA-Z]:|[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/]+[^\\\\\\/]+)?([\\\\\\/])?([\\s\\S]*?)$/;\n\tvar result = splitDeviceRe.exec(path);\n\tvar device = result[1] || '';\n\tvar isUnc = Boolean(device && device.charAt(1) !== ':');\n\n\t// UNC paths are always absolute\n\treturn Boolean(result[2] || isUnc);\n}\n\nmodule.exports = process.platform === 'win32' ? win32 : posix;\nmodule.exports.posix = posix;\nmodule.exports.win32 = win32;\n","// vim:ts=4:sts=4:sw=4:\n/*!\n *\n * Copyright 2009-2017 Kris Kowal under the terms of the MIT\n * license found at https://github.com/kriskowal/q/blob/v1/LICENSE\n *\n * With parts by Tyler Close\n * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found\n * at http://www.opensource.org/licenses/mit-license.html\n * Forked at ref_send.js version: 2009-05-11\n *\n * With parts by Mark Miller\n * Copyright (C) 2011 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\n(function (definition) {\n \"use strict\";\n\n // This file will function properly as a