{"version":3,"sources":["jsdelivr-header.js","/npm/@perfsee/chrome-finder@1.14.2/dist/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAgBA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,QAAQ,gBAAa,EACrB,MAAM,SAAW,QAAQ,YACnB,SAAW,QAAQ,YACnB,QAAU,QAAQ,WAClB,QAAU,QAAQ,WACxB,SAAS,YAAW,IAAE,EAAG,IAAE,EAAG,OAAE,GAAW,CAAC,GACxC,MAAM,EAAiB,qBAAqB,GAG5C,GAF6C,iBAAnB,GAA+B,EAAe,OAAS,IAChD,EAAI,SAAS,mBAAmB,EAAgB,EAAK,GAElF,OAAO,QAAQ,QAAQ,CAAE,iBAAgB,SAAS,EAAI,SAAS,eAAe,KAElF,MAAM,IAAI,MAAM,iDACpB,CAEA,SAAS,qBAAqB,GAC1B,IAAI,EACJ,OAAQ,QAAQ,UACZ,IAAK,QACD,EAAS,QAAQ,wBACjB,MACJ,IAAK,QACD,EAAS,QAAQ,wBACjB,MACJ,IAAK,SACD,EAAS,SAAS,yBAClB,MACJ,QACI,MAAM,IAAI,MAAM,wBAExB,OAAO,QAAQ,IAAI,0BAA4B,QAAQ,IAAI,2BAA6B,EAAO,EACnG,CAjBA,QAAQ,WAAa","file":"/npm/@perfsee/chrome-finder@1.14.2/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@perfsee/chrome-finder@1.14.2/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\n/*\nCopyright 2022 ByteDance and/or its affiliates.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findChrome = void 0;\nconst chrome_1 = require(\"./chrome\");\nconst darwin_1 = require(\"./darwin\");\nconst linux_1 = require(\"./linux\");\nconst win32_1 = require(\"./win32\");\nfunction findChrome({ min, max, canary } = {}) {\n    const executablePath = findChromeBinaryPath(canary);\n    const isNotEmpty = typeof executablePath === 'string' && executablePath.length > 0;\n    const isSuitable = isNotEmpty && (0, chrome_1.isSuitableVersion)(executablePath, min, max);\n    if (isSuitable) {\n        return Promise.resolve({ executablePath, browser: (0, chrome_1.chromeVersion)(executablePath) });\n    }\n    throw new Error(\"Couldn't find suitable Chrome version locally.\");\n}\nexports.findChrome = findChrome;\nfunction findChromeBinaryPath(canary) {\n    let getter;\n    switch (process.platform) {\n        case 'linux':\n            getter = linux_1.findChromeBinaryOnLinux;\n            break;\n        case 'win32':\n            getter = win32_1.findChromeBinaryOnWin32;\n            break;\n        case 'darwin':\n            getter = darwin_1.findChromeBinaryOnDarwin;\n            break;\n        default:\n            throw new Error('Unsupported platform');\n    }\n    return process.env.CHROMIUM_EXECUTABLE_PATH ?? process.env.PUPPETEER_EXECUTABLE_PATH ?? getter(canary);\n}\n"]}