var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // node_modules/@actions/core/lib/utils.js var require_utils = __commonJS({ "node_modules/@actions/core/lib/utils.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toCommandProperties = exports.toCommandValue = void 0; function toCommandValue(input) { if (input === null || input === void 0) { return ""; } else if (typeof input === "string" || input instanceof String) { return input; } return JSON.stringify(input); } exports.toCommandValue = toCommandValue; function toCommandProperties(annotationProperties) { if (!Object.keys(annotationProperties).length) { return {}; } return { title: annotationProperties.title, file: annotationProperties.file, line: annotationProperties.startLine, endLine: annotationProperties.endLine, col: annotationProperties.startColumn, endColumn: annotationProperties.endColumn }; } exports.toCommandProperties = toCommandProperties; } }); // node_modules/@actions/core/lib/command.js var require_command = __commonJS({ "node_modules/@actions/core/lib/command.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.issue = exports.issueCommand = void 0; var os = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os.EOL); } exports.issueCommand = issueCommand; function issue(name, message = "") { issueCommand(name, {}, message); } exports.issue = issue; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { if (!command) { command = "missing.command"; } this.command = command; this.properties = properties; this.message = message; } toString() { let cmdStr = CMD_STRING + this.command; if (this.properties && Object.keys(this.properties).length > 0) { cmdStr += " "; let first = true; for (const key in this.properties) { if (this.properties.hasOwnProperty(key)) { const val = this.properties[key]; if (val) { if (first) { first = false; } else { cmdStr += ","; } cmdStr += `${key}=${escapeProperty(val)}`; } } } } cmdStr += `${CMD_STRING}${escapeData(this.message)}`; return cmdStr; } }; function escapeData(s) { return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); } function escapeProperty(s) { return utils_1.toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); } } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js function rng() { if (poolPtr > rnds8Pool.length - 16) { import_crypto.default.randomFillSync(rnds8Pool); poolPtr = 0; } return rnds8Pool.slice(poolPtr, poolPtr += 16); } var import_crypto, rnds8Pool, poolPtr; var init_rng = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/rng.js"() { import_crypto = __toESM(require("crypto")); rnds8Pool = new Uint8Array(256); poolPtr = rnds8Pool.length; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js var regex_default; var init_regex = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/regex.js"() { regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js function validate(uuid) { return typeof uuid === "string" && regex_default.test(uuid); } var validate_default; var init_validate = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/validate.js"() { init_regex(); validate_default = validate; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js function stringify(arr, offset = 0) { const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); if (!validate_default(uuid)) { throw TypeError("Stringified UUID is invalid"); } return uuid; } var byteToHex, stringify_default; var init_stringify = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/stringify.js"() { init_validate(); byteToHex = []; for (let i = 0; i < 256; ++i) { byteToHex.push((i + 256).toString(16).substr(1)); } stringify_default = stringify; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js function v1(options, buf, offset) { let i = buf && offset || 0; const b = buf || new Array(16); options = options || {}; let node = options.node || _nodeId; let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; if (node == null || clockseq == null) { const seedBytes = options.random || (options.rng || rng)(); if (node == null) { node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; } if (clockseq == null) { clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; } } let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; if (dt < 0 && options.clockseq === void 0) { clockseq = clockseq + 1 & 16383; } if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { nsecs = 0; } if (nsecs >= 1e4) { throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } _lastMSecs = msecs; _lastNSecs = nsecs; _clockseq = clockseq; msecs += 122192928e5; const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; b[i++] = tl >>> 24 & 255; b[i++] = tl >>> 16 & 255; b[i++] = tl >>> 8 & 255; b[i++] = tl & 255; const tmh = msecs / 4294967296 * 1e4 & 268435455; b[i++] = tmh >>> 8 & 255; b[i++] = tmh & 255; b[i++] = tmh >>> 24 & 15 | 16; b[i++] = tmh >>> 16 & 255; b[i++] = clockseq >>> 8 | 128; b[i++] = clockseq & 255; for (let n = 0; n < 6; ++n) { b[i + n] = node[n]; } return buf || stringify_default(b); } var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; var init_v1 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v1.js"() { init_rng(); init_stringify(); _lastMSecs = 0; _lastNSecs = 0; v1_default = v1; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js function parse(uuid) { if (!validate_default(uuid)) { throw TypeError("Invalid UUID"); } let v; const arr = new Uint8Array(16); arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; arr[1] = v >>> 16 & 255; arr[2] = v >>> 8 & 255; arr[3] = v & 255; arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; arr[5] = v & 255; arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; arr[7] = v & 255; arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; arr[9] = v & 255; arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; arr[11] = v / 4294967296 & 255; arr[12] = v >>> 24 & 255; arr[13] = v >>> 16 & 255; arr[14] = v >>> 8 & 255; arr[15] = v & 255; return arr; } var parse_default; var init_parse = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/parse.js"() { init_validate(); parse_default = parse; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js function stringToBytes(str) { str = unescape(encodeURIComponent(str)); const bytes = []; for (let i = 0; i < str.length; ++i) { bytes.push(str.charCodeAt(i)); } return bytes; } function v35_default(name, version3, hashfunc) { function generateUUID(value, namespace, buf, offset) { if (typeof value === "string") { value = stringToBytes(value); } if (typeof namespace === "string") { namespace = parse_default(namespace); } if (namespace.length !== 16) { throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); } let bytes = new Uint8Array(16 + value.length); bytes.set(namespace); bytes.set(value, namespace.length); bytes = hashfunc(bytes); bytes[6] = bytes[6] & 15 | version3; bytes[8] = bytes[8] & 63 | 128; if (buf) { offset = offset || 0; for (let i = 0; i < 16; ++i) { buf[offset + i] = bytes[i]; } return buf; } return stringify_default(bytes); } try { generateUUID.name = name; } catch (err) { } generateUUID.DNS = DNS; generateUUID.URL = URL2; return generateUUID; } var DNS, URL2; var init_v35 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v35.js"() { init_stringify(); init_parse(); DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js function md5(bytes) { if (Array.isArray(bytes)) { bytes = Buffer.from(bytes); } else if (typeof bytes === "string") { bytes = Buffer.from(bytes, "utf8"); } return import_crypto2.default.createHash("md5").update(bytes).digest(); } var import_crypto2, md5_default; var init_md5 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/md5.js"() { import_crypto2 = __toESM(require("crypto")); md5_default = md5; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js var v3, v3_default; var init_v3 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v3.js"() { init_v35(); init_md5(); v3 = v35_default("v3", 48, md5_default); v3_default = v3; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js function v4(options, buf, offset) { options = options || {}; const rnds = options.random || (options.rng || rng)(); rnds[6] = rnds[6] & 15 | 64; rnds[8] = rnds[8] & 63 | 128; if (buf) { offset = offset || 0; for (let i = 0; i < 16; ++i) { buf[offset + i] = rnds[i]; } return buf; } return stringify_default(rnds); } var v4_default; var init_v4 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v4.js"() { init_rng(); init_stringify(); v4_default = v4; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js function sha1(bytes) { if (Array.isArray(bytes)) { bytes = Buffer.from(bytes); } else if (typeof bytes === "string") { bytes = Buffer.from(bytes, "utf8"); } return import_crypto3.default.createHash("sha1").update(bytes).digest(); } var import_crypto3, sha1_default; var init_sha1 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/sha1.js"() { import_crypto3 = __toESM(require("crypto")); sha1_default = sha1; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js var v5, v5_default; var init_v5 = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/v5.js"() { init_v35(); init_sha1(); v5 = v35_default("v5", 80, sha1_default); v5_default = v5; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js var nil_default; var init_nil = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/nil.js"() { nil_default = "00000000-0000-0000-0000-000000000000"; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js function version(uuid) { if (!validate_default(uuid)) { throw TypeError("Invalid UUID"); } return parseInt(uuid.substr(14, 1), 16); } var version_default; var init_version = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/version.js"() { init_validate(); version_default = version; } }); // node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js var esm_node_exports = {}; __export(esm_node_exports, { NIL: () => nil_default, parse: () => parse_default, stringify: () => stringify_default, v1: () => v1_default, v3: () => v3_default, v4: () => v4_default, v5: () => v5_default, validate: () => validate_default, version: () => version_default }); var init_esm_node = __esm({ "node_modules/@actions/core/node_modules/uuid/dist/esm-node/index.js"() { init_v1(); init_v3(); init_v4(); init_v5(); init_nil(); init_version(); init_validate(); init_stringify(); init_parse(); } }); // node_modules/@actions/core/lib/file-command.js var require_file_command = __commonJS({ "node_modules/@actions/core/lib/file-command.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; var fs = __importStar2(require("fs")); var os = __importStar2(require("os")); var uuid_1 = (init_esm_node(), __toCommonJS(esm_node_exports)); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } if (!fs.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { encoding: "utf8" }); } exports.issueFileCommand = issueFileCommand; function prepareKeyValueMessage(key, value) { const delimiter = `ghadelimiter_${uuid_1.v4()}`; const convertedValue = utils_1.toCommandValue(value); if (key.includes(delimiter)) { throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; } exports.prepareKeyValueMessage = prepareKeyValueMessage; } }); // node_modules/@actions/http-client/lib/proxy.js var require_proxy = __commonJS({ "node_modules/@actions/http-client/lib/proxy.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkBypass = exports.getProxyUrl = void 0; function getProxyUrl(reqUrl) { const usingSsl = reqUrl.protocol === "https:"; if (checkBypass(reqUrl)) { return void 0; } const proxyVar = (() => { if (usingSsl) { return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; } else { return process.env["http_proxy"] || process.env["HTTP_PROXY"]; } })(); if (proxyVar) { return new URL(proxyVar); } else { return void 0; } } exports.getProxyUrl = getProxyUrl; function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; } const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; if (!noProxy) { return false; } let reqPort; if (reqUrl.port) { reqPort = Number(reqUrl.port); } else if (reqUrl.protocol === "http:") { reqPort = 80; } else if (reqUrl.protocol === "https:") { reqPort = 443; } const upperReqHosts = [reqUrl.hostname.toUpperCase()]; if (typeof reqPort === "number") { upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); } for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { if (upperReqHosts.some((x) => x === upperNoProxyItem)) { return true; } } return false; } exports.checkBypass = checkBypass; } }); // node_modules/tunnel/lib/tunnel.js var require_tunnel = __commonJS({ "node_modules/tunnel/lib/tunnel.js"(exports) { "use strict"; var net = require("net"); var tls = require("tls"); var http = require("http"); var https = require("https"); var events = require("events"); var assert = require("assert"); var util = require("util"); exports.httpOverHttp = httpOverHttp; exports.httpsOverHttp = httpsOverHttp; exports.httpOverHttps = httpOverHttps; exports.httpsOverHttps = httpsOverHttps; function httpOverHttp(options) { var agent = new TunnelingAgent(options); agent.request = http.request; return agent; } function httpsOverHttp(options) { var agent = new TunnelingAgent(options); agent.request = http.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; } function httpOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; return agent; } function httpsOverHttps(options) { var agent = new TunnelingAgent(options); agent.request = https.request; agent.createSocket = createSecureSocket; agent.defaultPort = 443; return agent; } function TunnelingAgent(options) { var self2 = this; self2.options = options || {}; self2.proxyOptions = self2.options.proxy || {}; self2.maxSockets = self2.options.maxSockets || http.Agent.defaultMaxSockets; self2.requests = []; self2.sockets = []; self2.on("free", function onFree(socket, host, port, localAddress) { var options2 = toOptions(host, port, localAddress); for (var i = 0, len = self2.requests.length; i < len; ++i) { var pending = self2.requests[i]; if (pending.host === options2.host && pending.port === options2.port) { self2.requests.splice(i, 1); pending.request.onSocket(socket); return; } } socket.destroy(); self2.removeSocket(socket); }); } util.inherits(TunnelingAgent, events.EventEmitter); TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { var self2 = this; var options = mergeOptions({ request: req }, self2.options, toOptions(host, port, localAddress)); if (self2.sockets.length >= this.maxSockets) { self2.requests.push(options); return; } self2.createSocket(options, function(socket) { socket.on("free", onFree); socket.on("close", onCloseOrRemove); socket.on("agentRemove", onCloseOrRemove); req.onSocket(socket); function onFree() { self2.emit("free", socket, options); } function onCloseOrRemove(err) { self2.removeSocket(socket); socket.removeListener("free", onFree); socket.removeListener("close", onCloseOrRemove); socket.removeListener("agentRemove", onCloseOrRemove); } }); }; TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { var self2 = this; var placeholder = {}; self2.sockets.push(placeholder); var connectOptions = mergeOptions({}, self2.proxyOptions, { method: "CONNECT", path: options.host + ":" + options.port, agent: false, headers: { host: options.host + ":" + options.port } }); if (options.localAddress) { connectOptions.localAddress = options.localAddress; } if (connectOptions.proxyAuth) { connectOptions.headers = connectOptions.headers || {}; connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); } debug("making CONNECT request"); var connectReq = self2.request(connectOptions); connectReq.useChunkedEncodingByDefault = false; connectReq.once("response", onResponse); connectReq.once("upgrade", onUpgrade); connectReq.once("connect", onConnect); connectReq.once("error", onError); connectReq.end(); function onResponse(res) { res.upgrade = true; } function onUpgrade(res, socket, head) { process.nextTick(function() { onConnect(res, socket, head); }); } function onConnect(res, socket, head) { connectReq.removeAllListeners(); socket.removeAllListeners(); if (res.statusCode !== 200) { debug( "tunneling socket could not be established, statusCode=%d", res.statusCode ); socket.destroy(); var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); error.code = "ECONNRESET"; options.request.emit("error", error); self2.removeSocket(placeholder); return; } if (head.length > 0) { debug("got illegal response body from proxy"); socket.destroy(); var error = new Error("got illegal response body from proxy"); error.code = "ECONNRESET"; options.request.emit("error", error); self2.removeSocket(placeholder); return; } debug("tunneling connection has established"); self2.sockets[self2.sockets.indexOf(placeholder)] = socket; return cb(socket); } function onError(cause) { connectReq.removeAllListeners(); debug( "tunneling socket could not be established, cause=%s\n", cause.message, cause.stack ); var error = new Error("tunneling socket could not be established, cause=" + cause.message); error.code = "ECONNRESET"; options.request.emit("error", error); self2.removeSocket(placeholder); } }; TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { var pos = this.sockets.indexOf(socket); if (pos === -1) { return; } this.sockets.splice(pos, 1); var pending = this.requests.shift(); if (pending) { this.createSocket(pending, function(socket2) { pending.request.onSocket(socket2); }); } }; function createSecureSocket(options, cb) { var self2 = this; TunnelingAgent.prototype.createSocket.call(self2, options, function(socket) { var hostHeader = options.request.getHeader("host"); var tlsOptions = mergeOptions({}, self2.options, { socket, servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host }); var secureSocket = tls.connect(0, tlsOptions); self2.sockets[self2.sockets.indexOf(socket)] = secureSocket; cb(secureSocket); }); } function toOptions(host, port, localAddress) { if (typeof host === "string") { return { host, port, localAddress }; } return host; } function mergeOptions(target) { for (var i = 1, len = arguments.length; i < len; ++i) { var overrides = arguments[i]; if (typeof overrides === "object") { var keys = Object.keys(overrides); for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { var k = keys[j]; if (overrides[k] !== void 0) { target[k] = overrides[k]; } } } } return target; } var debug; if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { debug = function() { var args = Array.prototype.slice.call(arguments); if (typeof args[0] === "string") { args[0] = "TUNNEL: " + args[0]; } else { args.unshift("TUNNEL:"); } console.error.apply(console, args); }; } else { debug = function() { }; } exports.debug = debug; } }); // node_modules/tunnel/index.js var require_tunnel2 = __commonJS({ "node_modules/tunnel/index.js"(exports, module2) { module2.exports = require_tunnel(); } }); // node_modules/@actions/http-client/lib/index.js var require_lib = __commonJS({ "node_modules/@actions/http-client/lib/index.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__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.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; var http = __importStar2(require("http")); var https = __importStar2(require("https")); var pm = __importStar2(require_proxy()); var tunnel = __importStar2(require_tunnel2()); var HttpCodes; (function(HttpCodes2) { HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; })(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); var Headers; (function(Headers2) { Headers2["Accept"] = "accept"; Headers2["ContentType"] = "content-type"; })(Headers = exports.Headers || (exports.Headers = {})); var MediaTypes; (function(MediaTypes2) { MediaTypes2["ApplicationJson"] = "application/json"; })(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); function getProxyUrl(serverUrl) { const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); return proxyUrl ? proxyUrl.href : ""; } exports.getProxyUrl = getProxyUrl; var HttpRedirectCodes = [ HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect ]; var HttpResponseRetryCodes = [ HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout ]; var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; var ExponentialBackoffCeiling = 10; var ExponentialBackoffTimeSlice = 5; var HttpClientError = class _HttpClientError extends Error { constructor(message, statusCode) { super(message); this.name = "HttpClientError"; this.statusCode = statusCode; Object.setPrototypeOf(this, _HttpClientError.prototype); } }; exports.HttpClientError = HttpClientError; var HttpClientResponse = class { constructor(message) { this.message = message; } readBody() { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); }); this.message.on("end", () => { resolve(output.toString()); }); })); }); } }; exports.HttpClientResponse = HttpClientResponse; function isHttps(requestUrl) { const parsedUrl = new URL(requestUrl); return parsedUrl.protocol === "https:"; } exports.isHttps = isHttps; var HttpClient = class { 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 || []; this.requestOptions = requestOptions; if (requestOptions) { if (requestOptions.ignoreSslError != null) { this._ignoreSslError = requestOptions.ignoreSslError; } this._socketTimeout = requestOptions.socketTimeout; 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 __awaiter2(this, void 0, void 0, function* () { return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); }); } get(requestUrl, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("GET", requestUrl, null, additionalHeaders || {}); }); } del(requestUrl, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("DELETE", requestUrl, null, additionalHeaders || {}); }); } post(requestUrl, data, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("POST", requestUrl, data, additionalHeaders || {}); }); } patch(requestUrl, data, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("PATCH", requestUrl, data, additionalHeaders || {}); }); } put(requestUrl, data, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("PUT", requestUrl, data, additionalHeaders || {}); }); } head(requestUrl, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request("HEAD", requestUrl, null, additionalHeaders || {}); }); } sendStream(verb, requestUrl, stream, additionalHeaders) { return __awaiter2(this, void 0, void 0, function* () { return this.request(verb, requestUrl, stream, additionalHeaders); }); } /** * Gets a typed object from an endpoint * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise */ getJson(requestUrl, additionalHeaders = {}) { return __awaiter2(this, void 0, void 0, function* () { additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const res = yield this.get(requestUrl, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } postJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); const res = yield this.post(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } putJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); const res = yield this.put(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } patchJson(requestUrl, obj, additionalHeaders = {}) { return __awaiter2(this, void 0, void 0, function* () { const data = JSON.stringify(obj, null, 2); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); const res = yield this.patch(requestUrl, data, additionalHeaders); return this._processResponse(res, this.requestOptions); }); } /** * 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 __awaiter2(this, void 0, void 0, function* () { if (this._disposed) { throw new Error("Client has already been disposed."); } const parsedUrl = new URL(requestUrl); let info2 = this._prepareRequest(verb, parsedUrl, headers); const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; let numTries = 0; let response; do { response = yield this.requestRaw(info2, data); if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { let authenticationHandler; for (const handler of this.handlers) { if (handler.canHandleAuthentication(response)) { authenticationHandler = handler; break; } } if (authenticationHandler) { return authenticationHandler.handleAuthentication(this, info2, data); } else { return response; } } let redirectsRemaining = this._maxRedirects; while (response.message.statusCode && HttpRedirectCodes.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { const redirectUrl = response.message.headers["location"]; if (!redirectUrl) { break; } const parsedRedirectUrl = new URL(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."); } yield response.readBody(); if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { for (const header in headers) { if (header.toLowerCase() === "authorization") { delete headers[header]; } } } info2 = this._prepareRequest(verb, parsedRedirectUrl, headers); response = yield this.requestRaw(info2, data); redirectsRemaining--; } if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { return response; } numTries += 1; if (numTries < maxTries) { yield response.readBody(); yield this._performExponentialBackoff(numTries); } } while (numTries < maxTries); 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(info2, data) { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { resolve(res); } } this.requestRawWithCallback(info2, data, callbackForResult); }); }); } /** * Raw request with callback. * @param info * @param data * @param onResult */ requestRawWithCallback(info2, data, onResult) { if (typeof data === "string") { if (!info2.options.headers) { info2.options.headers = {}; } info2.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); } let callbackCalled = false; function handleResult(err, res) { if (!callbackCalled) { callbackCalled = true; onResult(err, res); } } const req = info2.httpModule.request(info2.options, (msg) => { const res = new HttpClientResponse(msg); handleResult(void 0, res); }); let socket; req.on("socket", (sock) => { socket = sock; }); req.setTimeout(this._socketTimeout || 3 * 6e4, () => { if (socket) { socket.end(); } handleResult(new Error(`Request timeout: ${info2.options.path}`)); }); req.on("error", function(err) { handleResult(err); }); 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(); } } /** * Gets an http agent. This function is useful when you need an http agent that handles * routing through a proxy server - depending upon the url and proxy environment variables. * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com */ getAgent(serverUrl) { const parsedUrl = new URL(serverUrl); return this._getAgent(parsedUrl); } _prepareRequest(method, requestUrl, headers) { const info2 = {}; info2.parsedUrl = requestUrl; const usingSsl = info2.parsedUrl.protocol === "https:"; info2.httpModule = usingSsl ? https : http; const defaultPort = usingSsl ? 443 : 80; info2.options = {}; info2.options.host = info2.parsedUrl.hostname; info2.options.port = info2.parsedUrl.port ? parseInt(info2.parsedUrl.port) : defaultPort; info2.options.path = (info2.parsedUrl.pathname || "") + (info2.parsedUrl.search || ""); info2.options.method = method; info2.options.headers = this._mergeHeaders(headers); if (this.userAgent != null) { info2.options.headers["user-agent"] = this.userAgent; } info2.options.agent = this._getAgent(info2.parsedUrl); if (this.handlers) { for (const handler of this.handlers) { handler.prepareRequest(info2.options); } } return info2; } _mergeHeaders(headers) { if (this.requestOptions && this.requestOptions.headers) { return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); } return lowercaseKeys(headers || {}); } _getExistingOrDefaultHeader(additionalHeaders, header, _default) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; } return additionalHeaders[header] || clientHeader || _default; } _getAgent(parsedUrl) { let agent; const proxyUrl = pm.getProxyUrl(parsedUrl); const useProxy = proxyUrl && proxyUrl.hostname; if (this._keepAlive && useProxy) { agent = this._proxyAgent; } if (this._keepAlive && !useProxy) { agent = this._agent; } if (agent) { return agent; } const usingSsl = parsedUrl.protocol === "https:"; let maxSockets = 100; if (this.requestOptions) { maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; } if (proxyUrl && proxyUrl.hostname) { const agentOptions = { maxSockets, keepAlive: this._keepAlive, proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` }), { host: proxyUrl.hostname, port: proxyUrl.port }) }; let tunnelAgent; const overHttps = 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 (this._keepAlive && !agent) { const options = { keepAlive: this._keepAlive, maxSockets }; agent = usingSsl ? new https.Agent(options) : new http.Agent(options); this._agent = agent; } if (!agent) { agent = usingSsl ? https.globalAgent : http.globalAgent; } if (usingSsl && this._ignoreSslError) { agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false }); } return agent; } _performExponentialBackoff(retryNumber) { return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); return new Promise((resolve) => setTimeout(() => resolve(), ms)); }); } _processResponse(res, options) { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, result: null, headers: {} }; if (statusCode === HttpCodes.NotFound) { resolve(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { const a = new Date(value); if (!isNaN(a.valueOf())) { return a; } } return value; } let obj; let contents; try { contents = yield res.readBody(); if (contents && contents.length > 0) { if (options && options.deserializeDates) { obj = JSON.parse(contents, dateTimeDeserializer); } else { obj = JSON.parse(contents); } response.result = obj; } response.headers = res.message.headers; } catch (err) { } if (statusCode > 299) { let msg; if (obj && obj.message) { msg = obj.message; } else if (contents && contents.length > 0) { msg = contents; } else { msg = `Failed request: (${statusCode})`; } const err = new HttpClientError(msg, statusCode); err.result = response.result; reject(err); } else { resolve(response); } })); }); } }; exports.HttpClient = HttpClient; var lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); } }); // node_modules/@actions/http-client/lib/auth.js var require_auth = __commonJS({ "node_modules/@actions/http-client/lib/auth.js"(exports) { "use strict"; var __awaiter2 = exports && exports.__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.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; var BasicCredentialHandler = class { constructor(username, password) { this.username = username; this.password = password; } prepareRequest(options) { if (!options.headers) { throw Error("The request has no headers"); } options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; } // This handler cannot handle 401 canHandleAuthentication() { return false; } handleAuthentication() { return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } }; exports.BasicCredentialHandler = BasicCredentialHandler; var BearerCredentialHandler = class { constructor(token) { this.token = token; } // currently implements pre-authorization // TODO: support preAuth = false where it hooks on 401 prepareRequest(options) { if (!options.headers) { throw Error("The request has no headers"); } options.headers["Authorization"] = `Bearer ${this.token}`; } // This handler cannot handle 401 canHandleAuthentication() { return false; } handleAuthentication() { return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } }; exports.BearerCredentialHandler = BearerCredentialHandler; var PersonalAccessTokenCredentialHandler = class { constructor(token) { this.token = token; } // currently implements pre-authorization // TODO: support preAuth = false where it hooks on 401 prepareRequest(options) { if (!options.headers) { throw Error("The request has no headers"); } options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; } // This handler cannot handle 401 canHandleAuthentication() { return false; } handleAuthentication() { return __awaiter2(this, void 0, void 0, function* () { throw new Error("not implemented"); }); } }; exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; } }); // node_modules/@actions/core/lib/oidc-utils.js var require_oidc_utils = __commonJS({ "node_modules/@actions/core/lib/oidc-utils.js"(exports) { "use strict"; var __awaiter2 = exports && exports.__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.OidcClient = void 0; var http_client_1 = require_lib(); var auth_1 = require_auth(); var core_1 = require_core(); var OidcClient = class _OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { allowRetries: allowRetry, maxRetries: maxRetry }; return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); } static getRequestToken() { const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; if (!token) { throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); } return token; } static getIDTokenUrl() { const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; if (!runtimeUrl) { throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); } return runtimeUrl; } static getCall(id_token_url) { var _a; return __awaiter2(this, void 0, void 0, function* () { const httpclient = _OidcClient.createHttpClient(); const res = yield httpclient.getJson(id_token_url).catch((error) => { throw new Error(`Failed to get ID Token. Error Code : ${error.statusCode} Error Message: ${error.result.message}`); }); const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; if (!id_token) { throw new Error("Response json body do not have ID Token field"); } return id_token; }); } static getIDToken(audience) { return __awaiter2(this, void 0, void 0, function* () { try { let id_token_url = _OidcClient.getIDTokenUrl(); if (audience) { const encodedAudience = encodeURIComponent(audience); id_token_url = `${id_token_url}&audience=${encodedAudience}`; } core_1.debug(`ID token url is ${id_token_url}`); const id_token = yield _OidcClient.getCall(id_token_url); core_1.setSecret(id_token); return id_token; } catch (error) { throw new Error(`Error message: ${error.message}`); } }); } }; exports.OidcClient = OidcClient; } }); // node_modules/@actions/core/lib/summary.js var require_summary = __commonJS({ "node_modules/@actions/core/lib/summary.js"(exports) { "use strict"; var __awaiter2 = exports && exports.__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.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; var os_1 = require("os"); var fs_1 = require("fs"); var { access, appendFile, writeFile } = fs_1.promises; exports.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; exports.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; var Summary = class { constructor() { this._buffer = ""; } /** * Finds the summary file path from the environment, rejects if env var is not found or file does not exist * Also checks r/w permissions. * * @returns step summary file path */ filePath() { return __awaiter2(this, void 0, void 0, function* () { if (this._filePath) { return this._filePath; } const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; if (!pathFromEnv) { throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); } try { yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); } catch (_a) { throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); } this._filePath = pathFromEnv; return this._filePath; }); } /** * Wraps content in an HTML tag, adding any HTML attributes * * @param {string} tag HTML tag to wrap * @param {string | null} content content within the tag * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add * * @returns {string} content wrapped in HTML element */ wrap(tag, content, attrs = {}) { const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); if (!content) { return `<${tag}${htmlAttrs}>`; } return `<${tag}${htmlAttrs}>${content}`; } /** * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. * * @param {SummaryWriteOptions} [options] (optional) options for write operation * * @returns {Promise} summary instance */ write(options) { return __awaiter2(this, void 0, void 0, function* () { const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); const filePath = yield this.filePath(); const writeFunc = overwrite ? writeFile : appendFile; yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); return this.emptyBuffer(); }); } /** * Clears the summary buffer and wipes the summary file * * @returns {Summary} summary instance */ clear() { return __awaiter2(this, void 0, void 0, function* () { return this.emptyBuffer().write({ overwrite: true }); }); } /** * Returns the current summary buffer as a string * * @returns {string} string of summary buffer */ stringify() { return this._buffer; } /** * If the summary buffer is empty * * @returns {boolen} true if the buffer is empty */ isEmptyBuffer() { return this._buffer.length === 0; } /** * Resets the summary buffer without writing to summary file * * @returns {Summary} summary instance */ emptyBuffer() { this._buffer = ""; return this; } /** * Adds raw text to the summary buffer * * @param {string} text content to add * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) * * @returns {Summary} summary instance */ addRaw(text, addEOL = false) { this._buffer += text; return addEOL ? this.addEOL() : this; } /** * Adds the operating system-specific end-of-line marker to the buffer * * @returns {Summary} summary instance */ addEOL() { return this.addRaw(os_1.EOL); } /** * Adds an HTML codeblock to the summary buffer * * @param {string} code content to render within fenced code block * @param {string} lang (optional) language to syntax highlight code * * @returns {Summary} summary instance */ addCodeBlock(code, lang) { const attrs = Object.assign({}, lang && { lang }); const element = this.wrap("pre", this.wrap("code", code), attrs); return this.addRaw(element).addEOL(); } /** * Adds an HTML list to the summary buffer * * @param {string[]} items list of items to render * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) * * @returns {Summary} summary instance */ addList(items, ordered = false) { const tag = ordered ? "ol" : "ul"; const listItems = items.map((item) => this.wrap("li", item)).join(""); const element = this.wrap(tag, listItems); return this.addRaw(element).addEOL(); } /** * Adds an HTML table to the summary buffer * * @param {SummaryTableCell[]} rows table rows * * @returns {Summary} summary instance */ addTable(rows) { const tableBody = rows.map((row) => { const cells = row.map((cell) => { if (typeof cell === "string") { return this.wrap("td", cell); } const { header, data, colspan, rowspan } = cell; const tag = header ? "th" : "td"; const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); return this.wrap(tag, data, attrs); }).join(""); return this.wrap("tr", cells); }).join(""); const element = this.wrap("table", tableBody); return this.addRaw(element).addEOL(); } /** * Adds a collapsable HTML details element to the summary buffer * * @param {string} label text for the closed state * @param {string} content collapsable content * * @returns {Summary} summary instance */ addDetails(label, content) { const element = this.wrap("details", this.wrap("summary", label) + content); return this.addRaw(element).addEOL(); } /** * Adds an HTML image tag to the summary buffer * * @param {string} src path to the image you to embed * @param {string} alt text description of the image * @param {SummaryImageOptions} options (optional) addition image attributes * * @returns {Summary} summary instance */ addImage(src, alt, options) { const { width, height } = options || {}; const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); return this.addRaw(element).addEOL(); } /** * Adds an HTML section heading element * * @param {string} text heading text * @param {number | string} [level=1] (optional) the heading level, default: 1 * * @returns {Summary} summary instance */ addHeading(text, level) { const tag = `h${level}`; const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; const element = this.wrap(allowedTag, text); return this.addRaw(element).addEOL(); } /** * Adds an HTML thematic break (
) to the summary buffer * * @returns {Summary} summary instance */ addSeparator() { const element = this.wrap("hr", null); return this.addRaw(element).addEOL(); } /** * Adds an HTML line break (
) to the summary buffer * * @returns {Summary} summary instance */ addBreak() { const element = this.wrap("br", null); return this.addRaw(element).addEOL(); } /** * Adds an HTML blockquote to the summary buffer * * @param {string} text quote text * @param {string} cite (optional) citation url * * @returns {Summary} summary instance */ addQuote(text, cite) { const attrs = Object.assign({}, cite && { cite }); const element = this.wrap("blockquote", text, attrs); return this.addRaw(element).addEOL(); } /** * Adds an HTML anchor tag to the summary buffer * * @param {string} text link text/content * @param {string} href hyperlink * * @returns {Summary} summary instance */ addLink(text, href) { const element = this.wrap("a", text, { href }); return this.addRaw(element).addEOL(); } }; var _summary = new Summary(); exports.markdownSummary = _summary; exports.summary = _summary; } }); // node_modules/@actions/core/lib/path-utils.js var require_path_utils = __commonJS({ "node_modules/@actions/core/lib/path-utils.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; var path = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } exports.toPosixPath = toPosixPath; function toWin32Path(pth) { return pth.replace(/[/]/g, "\\"); } exports.toWin32Path = toWin32Path; function toPlatformPath(pth) { return pth.replace(/[/\\]/g, path.sep); } exports.toPlatformPath = toPlatformPath; } }); // node_modules/@actions/core/lib/core.js var require_core = __commonJS({ "node_modules/@actions/core/lib/core.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__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.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os = __importStar2(require("os")); var path = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; })(ExitCode = exports.ExitCode || (exports.ExitCode = {})); function exportVariable(name, val) { const convertedVal = utils_1.toCommandValue(val); process.env[name] = convertedVal; const filePath = process.env["GITHUB_ENV"] || ""; if (filePath) { return file_command_1.issueFileCommand("ENV", file_command_1.prepareKeyValueMessage(name, val)); } command_1.issueCommand("set-env", { name }, convertedVal); } exports.exportVariable = exportVariable; function setSecret(secret) { command_1.issueCommand("add-mask", {}, secret); } exports.setSecret = setSecret; function addPath2(inputPath) { const filePath = process.env["GITHUB_PATH"] || ""; if (filePath) { file_command_1.issueFileCommand("PATH", inputPath); } else { command_1.issueCommand("add-path", {}, inputPath); } process.env["PATH"] = `${inputPath}${path.delimiter}${process.env["PATH"]}`; } exports.addPath = addPath2; function getInput2(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } if (options && options.trimWhitespace === false) { return val; } return val.trim(); } exports.getInput = getInput2; function getMultilineInput(name, options) { const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); if (options && options.trimWhitespace === false) { return inputs; } return inputs.map((input) => input.trim()); } exports.getMultilineInput = getMultilineInput; function getBooleanInput(name, options) { const trueValue = ["true", "True", "TRUE"]; const falseValue = ["false", "False", "FALSE"]; const val = getInput2(name, options); if (trueValue.includes(val)) return true; if (falseValue.includes(val)) return false; throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports.getBooleanInput = getBooleanInput; function setOutput2(name, value) { const filePath = process.env["GITHUB_OUTPUT"] || ""; if (filePath) { return file_command_1.issueFileCommand("OUTPUT", file_command_1.prepareKeyValueMessage(name, value)); } process.stdout.write(os.EOL); command_1.issueCommand("set-output", { name }, utils_1.toCommandValue(value)); } exports.setOutput = setOutput2; function setCommandEcho(enabled) { command_1.issue("echo", enabled ? "on" : "off"); } exports.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; error(message); } exports.setFailed = setFailed2; function isDebug() { return process.env["RUNNER_DEBUG"] === "1"; } exports.isDebug = isDebug; function debug(message) { command_1.issueCommand("debug", {}, message); } exports.debug = debug; function error(message, properties = {}) { command_1.issueCommand("error", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } exports.error = error; function warning2(message, properties = {}) { command_1.issueCommand("warning", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } exports.warning = warning2; function notice(message, properties = {}) { command_1.issueCommand("notice", utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } exports.notice = notice; function info2(message) { process.stdout.write(message + os.EOL); } exports.info = info2; function startGroup(name) { command_1.issue("group", name); } exports.startGroup = startGroup; function endGroup() { command_1.issue("endgroup"); } exports.endGroup = endGroup; function group(name, fn) { return __awaiter2(this, void 0, void 0, function* () { startGroup(name); let result; try { result = yield fn(); } finally { endGroup(); } return result; }); } exports.group = group; function saveState(name, value) { const filePath = process.env["GITHUB_STATE"] || ""; if (filePath) { return file_command_1.issueFileCommand("STATE", file_command_1.prepareKeyValueMessage(name, value)); } command_1.issueCommand("save-state", { name }, utils_1.toCommandValue(value)); } exports.saveState = saveState; function getState(name) { return process.env[`STATE_${name}`] || ""; } exports.getState = getState; function getIDToken(aud) { return __awaiter2(this, void 0, void 0, function* () { return yield oidc_utils_1.OidcClient.getIDToken(aud); }); } exports.getIDToken = getIDToken; var summary_1 = require_summary(); Object.defineProperty(exports, "summary", { enumerable: true, get: function() { return summary_1.summary; } }); var summary_2 = require_summary(); Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function() { return summary_2.markdownSummary; } }); var path_utils_1 = require_path_utils(); Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function() { return path_utils_1.toPosixPath; } }); Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function() { return path_utils_1.toWin32Path; } }); Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function() { return path_utils_1.toPlatformPath; } }); } }); // node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ "node_modules/@actions/io/lib/io-util.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__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 _a; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; var fs = __importStar2(require("fs")); var path = __importStar2(require("path")); _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; exports.IS_WINDOWS = process.platform === "win32"; function exists(fsPath) { return __awaiter2(this, void 0, void 0, function* () { try { yield exports.stat(fsPath); } catch (err) { if (err.code === "ENOENT") { return false; } throw err; } return true; }); } exports.exists = exists; function isDirectory(fsPath, useStat = false) { return __awaiter2(this, void 0, void 0, function* () { const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); return stats.isDirectory(); }); } exports.isDirectory = isDirectory; function isRooted(p) { p = normalizeSeparators(p); if (!p) { throw new Error('isRooted() parameter "p" cannot be empty'); } if (exports.IS_WINDOWS) { return p.startsWith("\\") || /^[A-Z]:/i.test(p); } return p.startsWith("/"); } exports.isRooted = isRooted; function tryGetExecutablePath(filePath, extensions) { return __awaiter2(this, void 0, void 0, function* () { let stats = void 0; try { stats = yield exports.stat(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); } } if (stats && stats.isFile()) { if (exports.IS_WINDOWS) { const upperExt = path.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } } else { if (isUnixExecutable(stats)) { return filePath; } } } const originalFilePath = filePath; for (const extension of extensions) { filePath = originalFilePath + extension; stats = void 0; try { stats = yield exports.stat(filePath); } catch (err) { if (err.code !== "ENOENT") { console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); } } if (stats && stats.isFile()) { if (exports.IS_WINDOWS) { try { const directory = path.dirname(filePath); const upperName = path.basename(filePath).toUpperCase(); for (const actualName of yield exports.readdir(directory)) { if (upperName === actualName.toUpperCase()) { filePath = path.join(directory, actualName); break; } } } catch (err) { console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); } return filePath; } else { if (isUnixExecutable(stats)) { return filePath; } } } } return ""; }); } exports.tryGetExecutablePath = tryGetExecutablePath; function normalizeSeparators(p) { p = p || ""; if (exports.IS_WINDOWS) { p = p.replace(/\//g, "\\"); return p.replace(/\\\\+/g, "\\"); } return p.replace(/\/\/+/g, "/"); } function isUnixExecutable(stats) { return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); } function getCmdPath() { var _a2; return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; } exports.getCmdPath = getCmdPath; } }); // node_modules/@actions/io/lib/io.js var require_io = __commonJS({ "node_modules/@actions/io/lib/io.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__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.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; var assert_1 = require("assert"); var childProcess = __importStar2(require("child_process")); var path = __importStar2(require("path")); var util_1 = require("util"); var ioUtil = __importStar2(require_io_util()); var exec = util_1.promisify(childProcess.exec); var execFile = util_1.promisify(childProcess.execFile); function cp2(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; if (destStat && destStat.isFile() && !force) { return; } const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path.join(dest, path.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } const sourceStat = yield ioUtil.stat(source); if (sourceStat.isDirectory()) { if (!recursive) { throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); } else { yield cpDirRecursive(source, newDest, 0, force); } } else { if (path.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); } }); } exports.cp = cp2; function mv(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { dest = path.join(dest, path.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { if (options.force == null || options.force) { yield rmRF2(dest); } else { throw new Error("Destination already exists"); } } } yield mkdirP2(path.dirname(dest)); yield ioUtil.rename(source, dest); }); } exports.mv = mv; function rmRF2(inputPath) { return __awaiter2(this, void 0, void 0, function* () { if (ioUtil.IS_WINDOWS) { if (/[*"<>|]/.test(inputPath)) { throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } try { const cmdPath = ioUtil.getCmdPath(); if (yield ioUtil.isDirectory(inputPath, true)) { yield exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, { env: { inputPath } }); } else { yield exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, { env: { inputPath } }); } } catch (err) { if (err.code !== "ENOENT") throw err; } try { yield ioUtil.unlink(inputPath); } catch (err) { if (err.code !== "ENOENT") throw err; } } else { let isDir = false; try { isDir = yield ioUtil.isDirectory(inputPath); } catch (err) { if (err.code !== "ENOENT") throw err; return; } if (isDir) { yield execFile(`rm`, [`-rf`, `${inputPath}`]); } else { yield ioUtil.unlink(inputPath); } } }); } exports.rmRF = rmRF2; function mkdirP2(fsPath) { return __awaiter2(this, void 0, void 0, function* () { assert_1.ok(fsPath, "a path argument must be provided"); yield ioUtil.mkdir(fsPath, { recursive: true }); }); } exports.mkdirP = mkdirP2; function which(tool, check) { return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } if (check) { const result = yield which(tool, false); if (!result) { if (ioUtil.IS_WINDOWS) { throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } return result; } const matches = yield findInPath(tool); if (matches && matches.length > 0) { return matches[0]; } return ""; }); } exports.which = which; function findInPath(tool) { return __awaiter2(this, void 0, void 0, function* () { if (!tool) { throw new Error("parameter 'tool' is required"); } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { for (const extension of process.env["PATHEXT"].split(path.delimiter)) { if (extension) { extensions.push(extension); } } } if (ioUtil.isRooted(tool)) { const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); if (filePath) { return [filePath]; } return []; } if (tool.includes(path.sep)) { return []; } const directories = []; if (process.env.PATH) { for (const p of process.env.PATH.split(path.delimiter)) { if (p) { directories.push(p); } } } const matches = []; for (const directory of directories) { const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } } return matches; }); } exports.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { return __awaiter2(this, void 0, void 0, function* () { if (currentDepth >= 255) return; currentDepth++; yield mkdirP2(destDir); const files = yield ioUtil.readdir(sourceDir); for (const fileName of files) { const srcFile = `${sourceDir}/${fileName}`; const destFile = `${destDir}/${fileName}`; const srcFileStat = yield ioUtil.lstat(srcFile); if (srcFileStat.isDirectory()) { yield cpDirRecursive(srcFile, destFile, currentDepth, force); } else { yield copyFile(srcFile, destFile, force); } } yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); } function copyFile(srcFile, destFile, force) { return __awaiter2(this, void 0, void 0, function* () { if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { try { yield ioUtil.lstat(destFile); yield ioUtil.unlink(destFile); } catch (e) { if (e.code === "EPERM") { yield ioUtil.chmod(destFile, "0666"); yield ioUtil.unlink(destFile); } } const symlinkFull = yield ioUtil.readlink(srcFile); yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); } else if (!(yield ioUtil.exists(destFile)) || force) { yield ioUtil.copyFile(srcFile, destFile); } }); } } }); // node_modules/semver/semver.js var require_semver = __commonJS({ "node_modules/semver/semver.js"(exports, module2) { exports = module2.exports = SemVer; var debug; if (typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) { debug = function() { var args = Array.prototype.slice.call(arguments, 0); args.unshift("SEMVER"); console.log.apply(console, args); }; } else { debug = function() { }; } exports.SEMVER_SPEC_VERSION = "2.0.0"; var MAX_LENGTH = 256; var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ 9007199254740991; var MAX_SAFE_COMPONENT_LENGTH = 16; var re = exports.re = []; var src = exports.src = []; var t = exports.tokens = {}; var R = 0; function tok(n) { t[n] = R++; } tok("NUMERICIDENTIFIER"); src[t.NUMERICIDENTIFIER] = "0|[1-9]\\d*"; tok("NUMERICIDENTIFIERLOOSE"); src[t.NUMERICIDENTIFIERLOOSE] = "[0-9]+"; tok("NONNUMERICIDENTIFIER"); src[t.NONNUMERICIDENTIFIER] = "\\d*[a-zA-Z-][a-zA-Z0-9-]*"; tok("MAINVERSION"); src[t.MAINVERSION] = "(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")\\.(" + src[t.NUMERICIDENTIFIER] + ")"; tok("MAINVERSIONLOOSE"); src[t.MAINVERSIONLOOSE] = "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"; tok("PRERELEASEIDENTIFIER"); src[t.PRERELEASEIDENTIFIER] = "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; tok("PRERELEASEIDENTIFIERLOOSE"); src[t.PRERELEASEIDENTIFIERLOOSE] = "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")"; tok("PRERELEASE"); src[t.PRERELEASE] = "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))"; tok("PRERELEASELOOSE"); src[t.PRERELEASELOOSE] = "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))"; tok("BUILDIDENTIFIER"); src[t.BUILDIDENTIFIER] = "[0-9A-Za-z-]+"; tok("BUILD"); src[t.BUILD] = "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))"; tok("FULL"); tok("FULLPLAIN"); src[t.FULLPLAIN] = "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?"; src[t.FULL] = "^" + src[t.FULLPLAIN] + "$"; tok("LOOSEPLAIN"); src[t.LOOSEPLAIN] = "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?"; tok("LOOSE"); src[t.LOOSE] = "^" + src[t.LOOSEPLAIN] + "$"; tok("GTLT"); src[t.GTLT] = "((?:<|>)?=?)"; tok("XRANGEIDENTIFIERLOOSE"); src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*"; tok("XRANGEIDENTIFIER"); src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + "|x|X|\\*"; tok("XRANGEPLAIN"); src[t.XRANGEPLAIN] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?)?)?"; tok("XRANGEPLAINLOOSE"); src[t.XRANGEPLAINLOOSE] = "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?)?)?"; tok("XRANGE"); src[t.XRANGE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$"; tok("XRANGELOOSE"); src[t.XRANGELOOSE] = "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$"; tok("COERCE"); src[t.COERCE] = "(^|[^\\d])(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "})(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?(?:$|[^\\d])"; tok("COERCERTL"); re[t.COERCERTL] = new RegExp(src[t.COERCE], "g"); tok("LONETILDE"); src[t.LONETILDE] = "(?:~>?)"; tok("TILDETRIM"); src[t.TILDETRIM] = "(\\s*)" + src[t.LONETILDE] + "\\s+"; re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], "g"); var tildeTrimReplace = "$1~"; tok("TILDE"); src[t.TILDE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$"; tok("TILDELOOSE"); src[t.TILDELOOSE] = "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$"; tok("LONECARET"); src[t.LONECARET] = "(?:\\^)"; tok("CARETTRIM"); src[t.CARETTRIM] = "(\\s*)" + src[t.LONECARET] + "\\s+"; re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], "g"); var caretTrimReplace = "$1^"; tok("CARET"); src[t.CARET] = "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$"; tok("CARETLOOSE"); src[t.CARETLOOSE] = "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$"; tok("COMPARATORLOOSE"); src[t.COMPARATORLOOSE] = "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$"; tok("COMPARATOR"); src[t.COMPARATOR] = "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$"; tok("COMPARATORTRIM"); src[t.COMPARATORTRIM] = "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")"; re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], "g"); var comparatorTrimReplace = "$1$2$3"; tok("HYPHENRANGE"); src[t.HYPHENRANGE] = "^\\s*(" + src[t.XRANGEPLAIN] + ")\\s+-\\s+(" + src[t.XRANGEPLAIN] + ")\\s*$"; tok("HYPHENRANGELOOSE"); src[t.HYPHENRANGELOOSE] = "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")\\s+-\\s+(" + src[t.XRANGEPLAINLOOSE] + ")\\s*$"; tok("STAR"); src[t.STAR] = "(<|>)?=?\\s*\\*"; for (i = 0; i < R; i++) { debug(i, src[i]); if (!re[i]) { re[i] = new RegExp(src[i]); } } var i; exports.parse = parse3; function parse3(version3, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (version3 instanceof SemVer) { return version3; } if (typeof version3 !== "string") { return null; } if (version3.length > MAX_LENGTH) { return null; } var r = options.loose ? re[t.LOOSE] : re[t.FULL]; if (!r.test(version3)) { return null; } try { return new SemVer(version3, options); } catch (er) { return null; } } exports.valid = valid; function valid(version3, options) { var v = parse3(version3, options); return v ? v.version : null; } exports.clean = clean; function clean(version3, options) { var s = parse3(version3.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; } exports.SemVer = SemVer; function SemVer(version3, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (version3 instanceof SemVer) { if (version3.loose === options.loose) { return version3; } else { version3 = version3.version; } } else if (typeof version3 !== "string") { throw new TypeError("Invalid Version: " + version3); } if (version3.length > MAX_LENGTH) { throw new TypeError("version is longer than " + MAX_LENGTH + " characters"); } if (!(this instanceof SemVer)) { return new SemVer(version3, options); } debug("SemVer", version3, options); this.options = options; this.loose = !!options.loose; var m = version3.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); if (!m) { throw new TypeError("Invalid Version: " + version3); } this.raw = version3; this.major = +m[1]; this.minor = +m[2]; this.patch = +m[3]; if (this.major > MAX_SAFE_INTEGER || this.major < 0) { throw new TypeError("Invalid major version"); } if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { throw new TypeError("Invalid minor version"); } if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { throw new TypeError("Invalid patch version"); } if (!m[4]) { this.prerelease = []; } else { this.prerelease = m[4].split(".").map(function(id) { if (/^[0-9]+$/.test(id)) { var num = +id; if (num >= 0 && num < MAX_SAFE_INTEGER) { return num; } } return id; }); } this.build = m[5] ? m[5].split(".") : []; this.format(); } SemVer.prototype.format = function() { this.version = this.major + "." + this.minor + "." + this.patch; if (this.prerelease.length) { this.version += "-" + this.prerelease.join("."); } return this.version; }; SemVer.prototype.toString = function() { return this.version; }; SemVer.prototype.compare = function(other) { debug("SemVer.compare", this.version, this.options, other); if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } return this.compareMain(other) || this.comparePre(other); }; SemVer.prototype.compareMain = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); }; SemVer.prototype.comparePre = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } if (this.prerelease.length && !other.prerelease.length) { return -1; } else if (!this.prerelease.length && other.prerelease.length) { return 1; } else if (!this.prerelease.length && !other.prerelease.length) { return 0; } var i2 = 0; do { var a = this.prerelease[i2]; var b = other.prerelease[i2]; debug("prerelease compare", i2, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i2); }; SemVer.prototype.compareBuild = function(other) { if (!(other instanceof SemVer)) { other = new SemVer(other, this.options); } var i2 = 0; do { var a = this.build[i2]; var b = other.build[i2]; debug("prerelease compare", i2, a, b); if (a === void 0 && b === void 0) { return 0; } else if (b === void 0) { return 1; } else if (a === void 0) { return -1; } else if (a === b) { continue; } else { return compareIdentifiers(a, b); } } while (++i2); }; SemVer.prototype.inc = function(release, identifier) { switch (release) { case "premajor": this.prerelease.length = 0; this.patch = 0; this.minor = 0; this.major++; this.inc("pre", identifier); break; case "preminor": this.prerelease.length = 0; this.patch = 0; this.minor++; this.inc("pre", identifier); break; case "prepatch": this.prerelease.length = 0; this.inc("patch", identifier); this.inc("pre", identifier); break; case "prerelease": if (this.prerelease.length === 0) { this.inc("patch", identifier); } this.inc("pre", identifier); break; case "major": if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { this.major++; } this.minor = 0; this.patch = 0; this.prerelease = []; break; case "minor": if (this.patch !== 0 || this.prerelease.length === 0) { this.minor++; } this.patch = 0; this.prerelease = []; break; case "patch": if (this.prerelease.length === 0) { this.patch++; } this.prerelease = []; break; case "pre": if (this.prerelease.length === 0) { this.prerelease = [0]; } else { var i2 = this.prerelease.length; while (--i2 >= 0) { if (typeof this.prerelease[i2] === "number") { this.prerelease[i2]++; i2 = -2; } } if (i2 === -1) { this.prerelease.push(0); } } if (identifier) { if (this.prerelease[0] === identifier) { if (isNaN(this.prerelease[1])) { this.prerelease = [identifier, 0]; } } else { this.prerelease = [identifier, 0]; } } break; default: throw new Error("invalid increment argument: " + release); } this.format(); this.raw = this.version; return this; }; exports.inc = inc; function inc(version3, release, loose, identifier) { if (typeof loose === "string") { identifier = loose; loose = void 0; } try { return new SemVer(version3, loose).inc(release, identifier).version; } catch (er) { return null; } } exports.diff = diff; function diff(version1, version22) { if (eq(version1, version22)) { return null; } else { var v13 = parse3(version1); var v2 = parse3(version22); var prefix = ""; if (v13.prerelease.length || v2.prerelease.length) { prefix = "pre"; var defaultResult = "prerelease"; } for (var key in v13) { if (key === "major" || key === "minor" || key === "patch") { if (v13[key] !== v2[key]) { return prefix + key; } } } return defaultResult; } } exports.compareIdentifiers = compareIdentifiers; var numeric = /^[0-9]+$/; function compareIdentifiers(a, b) { var anum = numeric.test(a); var bnum = numeric.test(b); if (anum && bnum) { a = +a; b = +b; } return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; } exports.rcompareIdentifiers = rcompareIdentifiers; function rcompareIdentifiers(a, b) { return compareIdentifiers(b, a); } exports.major = major; function major(a, loose) { return new SemVer(a, loose).major; } exports.minor = minor; function minor(a, loose) { return new SemVer(a, loose).minor; } exports.patch = patch; function patch(a, loose) { return new SemVer(a, loose).patch; } exports.compare = compare; function compare(a, b, loose) { return new SemVer(a, loose).compare(new SemVer(b, loose)); } exports.compareLoose = compareLoose; function compareLoose(a, b) { return compare(a, b, true); } exports.compareBuild = compareBuild; function compareBuild(a, b, loose) { var versionA = new SemVer(a, loose); var versionB = new SemVer(b, loose); return versionA.compare(versionB) || versionA.compareBuild(versionB); } exports.rcompare = rcompare; function rcompare(a, b, loose) { return compare(b, a, loose); } exports.sort = sort; function sort(list, loose) { return list.sort(function(a, b) { return exports.compareBuild(a, b, loose); }); } exports.rsort = rsort; function rsort(list, loose) { return list.sort(function(a, b) { return exports.compareBuild(b, a, loose); }); } exports.gt = gt; function gt(a, b, loose) { return compare(a, b, loose) > 0; } exports.lt = lt; function lt(a, b, loose) { return compare(a, b, loose) < 0; } exports.eq = eq; function eq(a, b, loose) { return compare(a, b, loose) === 0; } exports.neq = neq; function neq(a, b, loose) { return compare(a, b, loose) !== 0; } exports.gte = gte; function gte(a, b, loose) { return compare(a, b, loose) >= 0; } exports.lte = lte; function lte(a, b, loose) { return compare(a, b, loose) <= 0; } exports.cmp = cmp; function cmp(a, op, b, loose) { switch (op) { case "===": if (typeof a === "object") a = a.version; if (typeof b === "object") b = b.version; return a === b; case "!==": if (typeof a === "object") a = a.version; if (typeof b === "object") b = b.version; return a !== b; case "": case "=": case "==": return eq(a, b, loose); case "!=": return neq(a, b, loose); case ">": return gt(a, b, loose); case ">=": return gte(a, b, loose); case "<": return lt(a, b, loose); case "<=": return lte(a, b, loose); default: throw new TypeError("Invalid operator: " + op); } } exports.Comparator = Comparator; function Comparator(comp, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (comp instanceof Comparator) { if (comp.loose === !!options.loose) { return comp; } else { comp = comp.value; } } if (!(this instanceof Comparator)) { return new Comparator(comp, options); } debug("comparator", comp, options); this.options = options; this.loose = !!options.loose; this.parse(comp); if (this.semver === ANY) { this.value = ""; } else { this.value = this.operator + this.semver.version; } debug("comp", this); } var ANY = {}; Comparator.prototype.parse = function(comp) { var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; var m = comp.match(r); if (!m) { throw new TypeError("Invalid comparator: " + comp); } this.operator = m[1] !== void 0 ? m[1] : ""; if (this.operator === "=") { this.operator = ""; } if (!m[2]) { this.semver = ANY; } else { this.semver = new SemVer(m[2], this.options.loose); } }; Comparator.prototype.toString = function() { return this.value; }; Comparator.prototype.test = function(version3) { debug("Comparator.test", version3, this.options.loose); if (this.semver === ANY || version3 === ANY) { return true; } if (typeof version3 === "string") { try { version3 = new SemVer(version3, this.options); } catch (er) { return false; } } return cmp(version3, this.operator, this.semver, this.options); }; Comparator.prototype.intersects = function(comp, options) { if (!(comp instanceof Comparator)) { throw new TypeError("a Comparator is required"); } if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } var rangeTmp; if (this.operator === "") { if (this.value === "") { return true; } rangeTmp = new Range(comp.value, options); return satisfies(this.value, rangeTmp, options); } else if (comp.operator === "") { if (comp.value === "") { return true; } rangeTmp = new Range(this.value, options); return satisfies(comp.semver, rangeTmp, options); } var sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); var sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); var sameSemVer = this.semver.version === comp.semver.version; var differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); var oppositeDirectionsLessThan = cmp(this.semver, "<", comp.semver, options) && ((this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<")); var oppositeDirectionsGreaterThan = cmp(this.semver, ">", comp.semver, options) && ((this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">")); return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; }; exports.Range = Range; function Range(range, options) { if (!options || typeof options !== "object") { options = { loose: !!options, includePrerelease: false }; } if (range instanceof Range) { if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { return range; } else { return new Range(range.raw, options); } } if (range instanceof Comparator) { return new Range(range.value, options); } if (!(this instanceof Range)) { return new Range(range, options); } this.options = options; this.loose = !!options.loose; this.includePrerelease = !!options.includePrerelease; this.raw = range; this.set = range.split(/\s*\|\|\s*/).map(function(range2) { return this.parseRange(range2.trim()); }, this).filter(function(c) { return c.length; }); if (!this.set.length) { throw new TypeError("Invalid SemVer Range: " + range); } this.format(); } Range.prototype.format = function() { this.range = this.set.map(function(comps) { return comps.join(" ").trim(); }).join("||").trim(); return this.range; }; Range.prototype.toString = function() { return this.range; }; Range.prototype.parseRange = function(range) { var loose = this.options.loose; range = range.trim(); var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; range = range.replace(hr, hyphenReplace); debug("hyphen replace", range); range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); debug("comparator trim", range, re[t.COMPARATORTRIM]); range = range.replace(re[t.TILDETRIM], tildeTrimReplace); range = range.replace(re[t.CARETTRIM], caretTrimReplace); range = range.split(/\s+/).join(" "); var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; var set = range.split(" ").map(function(comp) { return parseComparator(comp, this.options); }, this).join(" ").split(/\s+/); if (this.options.loose) { set = set.filter(function(comp) { return !!comp.match(compRe); }); } set = set.map(function(comp) { return new Comparator(comp, this.options); }, this); return set; }; Range.prototype.intersects = function(range, options) { if (!(range instanceof Range)) { throw new TypeError("a Range is required"); } return this.set.some(function(thisComparators) { return isSatisfiable(thisComparators, options) && range.set.some(function(rangeComparators) { return isSatisfiable(rangeComparators, options) && thisComparators.every(function(thisComparator) { return rangeComparators.every(function(rangeComparator) { return thisComparator.intersects(rangeComparator, options); }); }); }); }); }; function isSatisfiable(comparators, options) { var result = true; var remainingComparators = comparators.slice(); var testComparator = remainingComparators.pop(); while (result && remainingComparators.length) { result = remainingComparators.every(function(otherComparator) { return testComparator.intersects(otherComparator, options); }); testComparator = remainingComparators.pop(); } return result; } exports.toComparators = toComparators; function toComparators(range, options) { return new Range(range, options).set.map(function(comp) { return comp.map(function(c) { return c.value; }).join(" ").trim().split(" "); }); } function parseComparator(comp, options) { debug("comp", comp, options); comp = replaceCarets(comp, options); debug("caret", comp); comp = replaceTildes(comp, options); debug("tildes", comp); comp = replaceXRanges(comp, options); debug("xrange", comp); comp = replaceStars(comp, options); debug("stars", comp); return comp; } function isX(id) { return !id || id.toLowerCase() === "x" || id === "*"; } function replaceTildes(comp, options) { return comp.trim().split(/\s+/).map(function(comp2) { return replaceTilde(comp2, options); }).join(" "); } function replaceTilde(comp, options) { var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; return comp.replace(r, function(_, M, m, p, pr) { debug("tilde", comp, _, M, m, p, pr); var ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; } else if (isX(p)) { ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; } else if (pr) { debug("replaceTilde pr", pr); ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; } else { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; } debug("tilde return", ret); return ret; }); } function replaceCarets(comp, options) { return comp.trim().split(/\s+/).map(function(comp2) { return replaceCaret(comp2, options); }).join(" "); } function replaceCaret(comp, options) { debug("caret", comp, options); var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; return comp.replace(r, function(_, M, m, p, pr) { debug("caret", comp, _, M, m, p, pr); var ret; if (isX(M)) { ret = ""; } else if (isX(m)) { ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0"; } else if (isX(p)) { if (M === "0") { ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0"; } else { ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0"; } } else if (pr) { debug("replaceCaret pr", pr); if (M === "0") { if (m === "0") { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1); } else { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0"; } } else { ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0"; } } else { debug("no pr"); if (M === "0") { if (m === "0") { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." + (+p + 1); } else { ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0"; } } else { ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0"; } } debug("caret return", ret); return ret; }); } function replaceXRanges(comp, options) { debug("replaceXRanges", comp, options); return comp.split(/\s+/).map(function(comp2) { return replaceXRange(comp2, options); }).join(" "); } function replaceXRange(comp, options) { comp = comp.trim(); var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; return comp.replace(r, function(ret, gtlt, M, m, p, pr) { debug("xRange", comp, ret, gtlt, M, m, p, pr); var xM = isX(M); var xm = xM || isX(m); var xp = xm || isX(p); var anyX = xp; if (gtlt === "=" && anyX) { gtlt = ""; } pr = options.includePrerelease ? "-0" : ""; if (xM) { if (gtlt === ">" || gtlt === "<") { ret = "<0.0.0-0"; } else { ret = "*"; } } else if (gtlt && anyX) { if (xm) { m = 0; } p = 0; if (gtlt === ">") { gtlt = ">="; if (xm) { M = +M + 1; m = 0; p = 0; } else { m = +m + 1; p = 0; } } else if (gtlt === "<=") { gtlt = "<"; if (xm) { M = +M + 1; } else { m = +m + 1; } } ret = gtlt + M + "." + m + "." + p + pr; } else if (xm) { ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0" + pr; } else if (xp) { ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0" + pr; } debug("xRange return", ret); return ret; }); } function replaceStars(comp, options) { debug("replaceStars", comp, options); return comp.trim().replace(re[t.STAR], ""); } function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { if (isX(fM)) { from = ""; } else if (isX(fm)) { from = ">=" + fM + ".0.0"; } else if (isX(fp)) { from = ">=" + fM + "." + fm + ".0"; } else { from = ">=" + from; } if (isX(tM)) { to = ""; } else if (isX(tm)) { to = "<" + (+tM + 1) + ".0.0"; } else if (isX(tp)) { to = "<" + tM + "." + (+tm + 1) + ".0"; } else if (tpr) { to = "<=" + tM + "." + tm + "." + tp + "-" + tpr; } else { to = "<=" + to; } return (from + " " + to).trim(); } Range.prototype.test = function(version3) { if (!version3) { return false; } if (typeof version3 === "string") { try { version3 = new SemVer(version3, this.options); } catch (er) { return false; } } for (var i2 = 0; i2 < this.set.length; i2++) { if (testSet(this.set[i2], version3, this.options)) { return true; } } return false; }; function testSet(set, version3, options) { for (var i2 = 0; i2 < set.length; i2++) { if (!set[i2].test(version3)) { return false; } } if (version3.prerelease.length && !options.includePrerelease) { for (i2 = 0; i2 < set.length; i2++) { debug(set[i2].semver); if (set[i2].semver === ANY) { continue; } if (set[i2].semver.prerelease.length > 0) { var allowed = set[i2].semver; if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) { return true; } } } return false; } return true; } exports.satisfies = satisfies; function satisfies(version3, range, options) { try { range = new Range(range, options); } catch (er) { return false; } return range.test(version3); } exports.maxSatisfying = maxSatisfying; function maxSatisfying(versions, range, options) { var max = null; var maxSV = null; try { var rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach(function(v) { if (rangeObj.test(v)) { if (!max || maxSV.compare(v) === -1) { max = v; maxSV = new SemVer(max, options); } } }); return max; } exports.minSatisfying = minSatisfying; function minSatisfying(versions, range, options) { var min = null; var minSV = null; try { var rangeObj = new Range(range, options); } catch (er) { return null; } versions.forEach(function(v) { if (rangeObj.test(v)) { if (!min || minSV.compare(v) === 1) { min = v; minSV = new SemVer(min, options); } } }); return min; } exports.minVersion = minVersion; function minVersion(range, loose) { range = new Range(range, loose); var minver = new SemVer("0.0.0"); if (range.test(minver)) { return minver; } minver = new SemVer("0.0.0-0"); if (range.test(minver)) { return minver; } minver = null; for (var i2 = 0; i2 < range.set.length; ++i2) { var comparators = range.set[i2]; comparators.forEach(function(comparator) { var compver = new SemVer(comparator.semver.version); switch (comparator.operator) { case ">": if (compver.prerelease.length === 0) { compver.patch++; } else { compver.prerelease.push(0); } compver.raw = compver.format(); case "": case ">=": if (!minver || gt(minver, compver)) { minver = compver; } break; case "<": case "<=": break; default: throw new Error("Unexpected operation: " + comparator.operator); } }); } if (minver && range.test(minver)) { return minver; } return null; } exports.validRange = validRange; function validRange(range, options) { try { return new Range(range, options).range || "*"; } catch (er) { return null; } } exports.ltr = ltr; function ltr(version3, range, options) { return outside(version3, range, "<", options); } exports.gtr = gtr; function gtr(version3, range, options) { return outside(version3, range, ">", options); } exports.outside = outside; function outside(version3, range, hilo, options) { version3 = new SemVer(version3, options); range = new Range(range, options); var gtfn, ltefn, ltfn, comp, ecomp; switch (hilo) { case ">": gtfn = gt; ltefn = lte; ltfn = lt; comp = ">"; ecomp = ">="; break; case "<": gtfn = lt; ltefn = gte; ltfn = gt; comp = "<"; ecomp = "<="; break; default: throw new TypeError('Must provide a hilo val of "<" or ">"'); } if (satisfies(version3, range, options)) { return false; } for (var i2 = 0; i2 < range.set.length; ++i2) { var comparators = range.set[i2]; var high = null; var low = null; comparators.forEach(function(comparator) { if (comparator.semver === ANY) { comparator = new Comparator(">=0.0.0"); } high = high || comparator; low = low || comparator; if (gtfn(comparator.semver, high.semver, options)) { high = comparator; } else if (ltfn(comparator.semver, low.semver, options)) { low = comparator; } }); if (high.operator === comp || high.operator === ecomp) { return false; } if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) { return false; } else if (low.operator === ecomp && ltfn(version3, low.semver)) { return false; } } return true; } exports.prerelease = prerelease; function prerelease(version3, options) { var parsed = parse3(version3, 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.coerce = coerce; function coerce(version3, options) { if (version3 instanceof SemVer) { return version3; } if (typeof version3 === "number") { version3 = String(version3); } if (typeof version3 !== "string") { return null; } options = options || {}; var match = null; if (!options.rtl) { match = version3.match(re[t.COERCE]); } else { var next; while ((next = re[t.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; } re[t.COERCERTL].lastIndex = -1; } if (match === null) { return null; } return parse3(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options); } } }); // node_modules/@actions/tool-cache/lib/manifest.js var require_manifest = __commonJS({ "node_modules/@actions/tool-cache/lib/manifest.js"(exports, module2) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__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._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0; var semver = __importStar2(require_semver()); var core_1 = require_core(); var os = require("os"); var cp2 = require("child_process"); var fs = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter2(this, void 0, void 0, function* () { const platFilter = os.platform(); let result; let match; let file; for (const candidate of candidates) { const version3 = candidate.version; core_1.debug(`check ${version3} satisfies ${versionSpec}`); if (semver.satisfies(version3, versionSpec) && (!stable || candidate.stable === stable)) { file = candidate.files.find((item) => { core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`); let chk = item.arch === archFilter && item.platform === platFilter; if (chk && item.platform_version) { const osVersion = module2.exports._getOsVersion(); if (osVersion === item.platform_version) { chk = true; } else { chk = semver.satisfies(osVersion, item.platform_version); } } return chk; }); if (file) { core_1.debug(`matched ${candidate.version}`); match = candidate; break; } } } if (match && file) { result = Object.assign({}, match); result.files = [file]; } return result; }); } exports._findMatch = _findMatch; function _getOsVersion() { const plat = os.platform(); let version3 = ""; if (plat === "darwin") { version3 = cp2.execSync("sw_vers -productVersion").toString(); } else if (plat === "linux") { const lsbContents = module2.exports._readLinuxVersionFile(); if (lsbContents) { const lines = lsbContents.split("\n"); for (const line of lines) { const parts = line.split("="); if (parts.length === 2 && (parts[0].trim() === "VERSION_ID" || parts[0].trim() === "DISTRIB_RELEASE")) { version3 = parts[1].trim().replace(/^"/, "").replace(/"$/, ""); break; } } } } return version3; } exports._getOsVersion = _getOsVersion; function _readLinuxVersionFile() { const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; if (fs.existsSync(lsbReleaseFile)) { contents = fs.readFileSync(lsbReleaseFile).toString(); } else if (fs.existsSync(osReleaseFile)) { contents = fs.readFileSync(osReleaseFile).toString(); } return contents; } exports._readLinuxVersionFile = _readLinuxVersionFile; } }); // node_modules/uuid/lib/rng.js var require_rng = __commonJS({ "node_modules/uuid/lib/rng.js"(exports, module2) { var crypto7 = require("crypto"); module2.exports = function nodeRNG() { return crypto7.randomBytes(16); }; } }); // node_modules/uuid/lib/bytesToUuid.js var require_bytesToUuid = __commonJS({ "node_modules/uuid/lib/bytesToUuid.js"(exports, module2) { var byteToHex3 = []; for (i = 0; i < 256; ++i) { byteToHex3[i] = (i + 256).toString(16).substr(1); } var i; function bytesToUuid(buf, offset) { var i2 = offset || 0; var bth = byteToHex3; return [ bth[buf[i2++]], bth[buf[i2++]], bth[buf[i2++]], bth[buf[i2++]], "-", bth[buf[i2++]], bth[buf[i2++]], "-", bth[buf[i2++]], bth[buf[i2++]], "-", bth[buf[i2++]], bth[buf[i2++]], "-", bth[buf[i2++]], bth[buf[i2++]], bth[buf[i2++]], bth[buf[i2++]], bth[buf[i2++]], bth[buf[i2++]] ].join(""); } module2.exports = bytesToUuid; } }); // node_modules/uuid/v4.js var require_v4 = __commonJS({ "node_modules/uuid/v4.js"(exports, module2) { var rng3 = require_rng(); var bytesToUuid = require_bytesToUuid(); function v43(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 || rng3)(); rnds[6] = rnds[6] & 15 | 64; rnds[8] = rnds[8] & 63 | 128; if (buf) { for (var ii = 0; ii < 16; ++ii) { buf[i + ii] = rnds[ii]; } } return buf || bytesToUuid(rnds); } module2.exports = v43; } }); // node_modules/@actions/exec/lib/toolrunner.js var require_toolrunner = __commonJS({ "node_modules/@actions/exec/lib/toolrunner.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__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.argStringToArray = exports.ToolRunner = void 0; var os = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); var path = __importStar2(require("path")); var io = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); var IS_WINDOWS = process.platform === "win32"; var ToolRunner = class extends events.EventEmitter { constructor(toolPath, args, options) { super(); if (!toolPath) { throw new Error("Parameter 'toolPath' cannot be null or empty."); } this.toolPath = toolPath; this.args = args || []; this.options = options || {}; } _debug(message) { if (this.options.listeners && this.options.listeners.debug) { this.options.listeners.debug(message); } } _getCommandString(options, noPrefix) { const toolPath = this._getSpawnFileName(); const args = this._getSpawnArgs(options); let cmd = noPrefix ? "" : "[command]"; if (IS_WINDOWS) { if (this._isCmdFile()) { cmd += toolPath; for (const a of args) { cmd += ` ${a}`; } } else if (options.windowsVerbatimArguments) { cmd += `"${toolPath}"`; for (const a of args) { cmd += ` ${a}`; } } else { cmd += this._windowsQuoteCmdArg(toolPath); for (const a of args) { cmd += ` ${this._windowsQuoteCmdArg(a)}`; } } } else { cmd += toolPath; for (const a of args) { cmd += ` ${a}`; } } return cmd; } _processLineBuffer(data, strBuffer, onLine) { try { let s = strBuffer + data.toString(); let n = s.indexOf(os.EOL); while (n > -1) { const line = s.substring(0, n); onLine(line); s = s.substring(n + os.EOL.length); n = s.indexOf(os.EOL); } return s; } catch (err) { this._debug(`error processing line. Failed with error ${err}`); return ""; } } _getSpawnFileName() { if (IS_WINDOWS) { if (this._isCmdFile()) { return process.env["COMSPEC"] || "cmd.exe"; } } return this.toolPath; } _getSpawnArgs(options) { if (IS_WINDOWS) { if (this._isCmdFile()) { let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; for (const a of this.args) { argline += " "; argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); } argline += '"'; return [argline]; } } return this.args; } _endsWith(str, end) { return str.endsWith(end); } _isCmdFile() { const upperToolPath = this.toolPath.toUpperCase(); return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); } _windowsQuoteCmdArg(arg) { if (!this._isCmdFile()) { return this._uvQuoteCmdArg(arg); } if (!arg) { return '""'; } const cmdSpecialChars = [ " ", " ", "&", "(", ")", "[", "]", "{", "}", "^", "=", ";", "!", "'", "+", ",", "`", "~", "|", "<", ">", '"' ]; let needsQuotes = false; for (const char of arg) { if (cmdSpecialChars.some((x) => x === char)) { needsQuotes = true; break; } } if (!needsQuotes) { return arg; } let reverse = '"'; let quoteHit = true; for (let i = arg.length; i > 0; i--) { reverse += arg[i - 1]; if (quoteHit && arg[i - 1] === "\\") { reverse += "\\"; } else if (arg[i - 1] === '"') { quoteHit = true; reverse += '"'; } else { quoteHit = false; } } reverse += '"'; return reverse.split("").reverse().join(""); } _uvQuoteCmdArg(arg) { if (!arg) { return '""'; } if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { return arg; } if (!arg.includes('"') && !arg.includes("\\")) { return `"${arg}"`; } let reverse = '"'; let quoteHit = true; for (let i = arg.length; i > 0; i--) { reverse += arg[i - 1]; if (quoteHit && arg[i - 1] === "\\") { reverse += "\\"; } else if (arg[i - 1] === '"') { quoteHit = true; reverse += "\\"; } else { quoteHit = false; } } reverse += '"'; return reverse.split("").reverse().join(""); } _cloneExecOptions(options) { options = options || {}; const result = { cwd: options.cwd || process.cwd(), env: options.env || process.env, silent: options.silent || false, windowsVerbatimArguments: options.windowsVerbatimArguments || false, failOnStdErr: options.failOnStdErr || false, ignoreReturnCode: options.ignoreReturnCode || false, delay: options.delay || 1e4 }; result.outStream = options.outStream || process.stdout; result.errStream = options.errStream || process.stderr; return result; } _getSpawnOptions(options, toolPath) { options = options || {}; const result = {}; result.cwd = options.cwd; result.env = options.env; result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); if (options.windowsVerbatimArguments) { result.argv0 = `"${toolPath}"`; } return result; } /** * Exec a tool. * Output will be streamed to the live console. * Returns promise with return code * * @param tool path to tool to exec * @param options optional exec options. See ExecOptions * @returns number */ exec() { return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io.which(this.toolPath, true); return new Promise((resolve, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { this._debug(` ${arg}`); } const optionsNonNull = this._cloneExecOptions(this.options); if (!optionsNonNull.silent && optionsNonNull.outStream) { optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); } const state = new ExecState(optionsNonNull, this.toolPath); state.on("debug", (message) => { this._debug(message); }); if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); } const fileName = this._getSpawnFileName(); const cp2 = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); let stdbuffer = ""; if (cp2.stdout) { cp2.stdout.on("data", (data) => { if (this.options.listeners && this.options.listeners.stdout) { this.options.listeners.stdout(data); } if (!optionsNonNull.silent && optionsNonNull.outStream) { optionsNonNull.outStream.write(data); } stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { if (this.options.listeners && this.options.listeners.stdline) { this.options.listeners.stdline(line); } }); }); } let errbuffer = ""; if (cp2.stderr) { cp2.stderr.on("data", (data) => { state.processStderr = true; if (this.options.listeners && this.options.listeners.stderr) { this.options.listeners.stderr(data); } if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; s.write(data); } errbuffer = this._processLineBuffer(data, errbuffer, (line) => { if (this.options.listeners && this.options.listeners.errline) { this.options.listeners.errline(line); } }); }); } cp2.on("error", (err) => { state.processError = err.message; state.processExited = true; state.processClosed = true; state.CheckComplete(); }); cp2.on("exit", (code) => { state.processExitCode = code; state.processExited = true; this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); state.CheckComplete(); }); cp2.on("close", (code) => { state.processExitCode = code; state.processExited = true; state.processClosed = true; this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); state.CheckComplete(); }); state.on("done", (error, exitCode) => { if (stdbuffer.length > 0) { this.emit("stdline", stdbuffer); } if (errbuffer.length > 0) { this.emit("errline", errbuffer); } cp2.removeAllListeners(); if (error) { reject(error); } else { resolve(exitCode); } }); if (this.options.input) { if (!cp2.stdin) { throw new Error("child process missing stdin"); } cp2.stdin.end(this.options.input); } })); }); } }; exports.ToolRunner = ToolRunner; function argStringToArray(argString) { const args = []; let inQuotes = false; let escaped = false; let arg = ""; function append(c) { if (escaped && c !== '"') { arg += "\\"; } arg += c; escaped = false; } for (let i = 0; i < argString.length; i++) { const c = argString.charAt(i); if (c === '"') { if (!escaped) { inQuotes = !inQuotes; } else { append(c); } continue; } if (c === "\\" && escaped) { append(c); continue; } if (c === "\\" && inQuotes) { escaped = true; continue; } if (c === " " && !inQuotes) { if (arg.length > 0) { args.push(arg); arg = ""; } continue; } append(c); } if (arg.length > 0) { args.push(arg.trim()); } return args; } exports.argStringToArray = argStringToArray; var ExecState = class _ExecState extends events.EventEmitter { constructor(options, toolPath) { super(); this.processClosed = false; this.processError = ""; this.processExitCode = 0; this.processExited = false; this.processStderr = false; this.delay = 1e4; this.done = false; this.timeout = null; if (!toolPath) { throw new Error("toolPath must not be empty"); } this.options = options; this.toolPath = toolPath; if (options.delay) { this.delay = options.delay; } } CheckComplete() { if (this.done) { return; } if (this.processClosed) { this._setResult(); } else if (this.processExited) { this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); } } _debug(message) { this.emit("debug", message); } _setResult() { let error; if (this.processExited) { if (this.processError) { error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); } else if (this.processStderr && this.options.failOnStdErr) { error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); } } if (this.timeout) { clearTimeout(this.timeout); this.timeout = null; } this.done = true; this.emit("done", error, this.processExitCode); } static HandleTimeout(state) { if (state.done) { return; } if (!state.processClosed && state.processExited) { const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; state._debug(message); } state._setResult(); } }; } }); // node_modules/@actions/exec/lib/exec.js var require_exec = __commonJS({ "node_modules/@actions/exec/lib/exec.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__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.getExecOutput = exports.exec = void 0; var string_decoder_1 = require("string_decoder"); var tr = __importStar2(require_toolrunner()); function exec(commandLine, args, options) { return __awaiter2(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { throw new Error(`Parameter 'commandLine' cannot be null or empty.`); } const toolPath = commandArgs[0]; args = commandArgs.slice(1).concat(args || []); const runner = new tr.ToolRunner(toolPath, args, options); return runner.exec(); }); } exports.exec = exec; function getExecOutput2(commandLine, args, options) { var _a, _b; return __awaiter2(this, void 0, void 0, function* () { let stdout = ""; let stderr = ""; const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; const stdErrListener = (data) => { stderr += stderrDecoder.write(data); if (originalStdErrListener) { originalStdErrListener(data); } }; const stdOutListener = (data) => { stdout += stdoutDecoder.write(data); if (originalStdoutListener) { originalStdoutListener(data); } }; const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); stdout += stdoutDecoder.end(); stderr += stderrDecoder.end(); return { exitCode, stdout, stderr }; }); } exports.getExecOutput = getExecOutput2; } }); // node_modules/@actions/tool-cache/lib/retry-helper.js var require_retry_helper = __commonJS({ "node_modules/@actions/tool-cache/lib/retry-helper.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__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.RetryHelper = void 0; var core = __importStar2(require_core()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { throw new Error("max attempts should be greater than or equal to 1"); } this.maxAttempts = maxAttempts; this.minSeconds = Math.floor(minSeconds); this.maxSeconds = Math.floor(maxSeconds); if (this.minSeconds > this.maxSeconds) { throw new Error("min seconds should be less than or equal to max seconds"); } } execute(action3, isRetryable) { return __awaiter2(this, void 0, void 0, function* () { let attempt = 1; while (attempt < this.maxAttempts) { try { return yield action3(); } catch (err) { if (isRetryable && !isRetryable(err)) { throw err; } core.info(err.message); } const seconds = this.getSleepAmount(); core.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } return yield action3(); }); } getSleepAmount() { return Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) + this.minSeconds; } sleep(seconds) { return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); }); } }; exports.RetryHelper = RetryHelper; } }); // node_modules/@actions/tool-cache/lib/tool-cache.js var require_tool_cache = __commonJS({ "node_modules/@actions/tool-cache/lib/tool-cache.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__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 __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0; var core = __importStar2(require_core()); var io = __importStar2(require_io()); var fs = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os = __importStar2(require("os")); var path = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver = __importStar2(require_semver()); var stream = __importStar2(require("stream")); var util = __importStar2(require("util")); var assert_1 = require("assert"); var v4_1 = __importDefault2(require_v4()); var exec_1 = require_exec(); var retry_helper_1 = require_retry_helper(); var HTTPError = class extends Error { constructor(httpStatusCode) { super(`Unexpected HTTP response: ${httpStatusCode}`); this.httpStatusCode = httpStatusCode; Object.setPrototypeOf(this, new.target.prototype); } }; exports.HTTPError = HTTPError; var IS_WINDOWS = process.platform === "win32"; var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; function downloadTool2(url, dest, auth, headers) { return __awaiter2(this, void 0, void 0, function* () { dest = dest || path.join(_getTempDirectory(), v4_1.default()); yield io.mkdirP(path.dirname(dest)); core.debug(`Downloading ${url}`); core.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); return yield retryHelper.execute(() => __awaiter2(this, void 0, void 0, function* () { return yield downloadToolAttempt(url, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { return false; } } return true; }); }); } exports.downloadTool = downloadTool2; function downloadToolAttempt(url, dest, auth, headers) { return __awaiter2(this, void 0, void 0, function* () { if (fs.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { allowRetries: false }); if (auth) { core.debug("set auth"); if (headers === void 0) { headers = {}; } headers.authorization = auth; } const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream.pipeline); const responseMessageFactory = _getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY", () => response.message); const readStream = responseMessageFactory(); let succeeded = false; try { yield pipeline(readStream, fs.createWriteStream(dest)); core.debug("download complete"); succeeded = true; return dest; } finally { if (!succeeded) { core.debug("download failed"); try { yield io.rmRF(dest); } catch (err) { core.debug(`Failed to delete '${dest}'. ${err.message}`); } } } }); } function extract7z(file, dest, _7zPath) { return __awaiter2(this, void 0, void 0, function* () { assert_1.ok(IS_WINDOWS, "extract7z() not supported on current OS"); assert_1.ok(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); const originalCwd = process.cwd(); process.chdir(dest); if (_7zPath) { try { const logLevel = core.isDebug() ? "-bb1" : "-bb0"; const args = [ "x", logLevel, "-bd", "-sccUTF-8", file ]; const options = { silent: true }; yield exec_1.exec(`"${_7zPath}"`, args, options); } finally { process.chdir(originalCwd); } } else { const escapedScript = path.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; const args = [ "-NoLogo", "-Sta", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Unrestricted", "-Command", command ]; const options = { silent: true }; try { const powershellPath = yield io.which("powershell", true); yield exec_1.exec(`"${powershellPath}"`, args, options); } finally { process.chdir(originalCwd); } } return dest; }); } exports.extract7z = extract7z; function extractTar(file, dest, flags = "xz") { return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); core.debug("Checking tar --version"); let versionOutput = ""; yield exec_1.exec("tar --version", [], { ignoreReturnCode: true, silent: true, listeners: { stdout: (data) => versionOutput += data.toString(), stderr: (data) => versionOutput += data.toString() } }); core.debug(versionOutput.trim()); const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); let args; if (flags instanceof Array) { args = flags; } else { args = [flags]; } if (core.isDebug() && !flags.includes("v")) { args.push("-v"); } let destArg = dest; let fileArg = file; if (IS_WINDOWS && isGnuTar) { args.push("--force-local"); destArg = dest.replace(/\\/g, "/"); fileArg = file.replace(/\\/g, "/"); } if (isGnuTar) { args.push("--warning=no-unknown-keyword"); args.push("--overwrite"); } args.push("-C", destArg, "-f", fileArg); yield exec_1.exec(`tar`, args); return dest; }); } exports.extractTar = extractTar; function extractXar(file, dest, flags = []) { return __awaiter2(this, void 0, void 0, function* () { assert_1.ok(IS_MAC, "extractXar() not supported on current OS"); assert_1.ok(file, 'parameter "file" is required'); dest = yield _createExtractFolder(dest); let args; if (flags instanceof Array) { args = flags; } else { args = [flags]; } args.push("-x", "-C", dest, "-f", file); if (core.isDebug()) { args.push("-v"); } const xarPath = yield io.which("xar", true); yield exec_1.exec(`"${xarPath}"`, _unique(args)); return dest; }); } exports.extractXar = extractXar; function extractZip2(file, dest) { return __awaiter2(this, void 0, void 0, function* () { if (!file) { throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); if (IS_WINDOWS) { yield extractZipWin(file, dest); } else { yield extractZipNix(file, dest); } return dest; }); } exports.extractZip = extractZip2; function extractZipWin(file, dest) { return __awaiter2(this, void 0, void 0, function* () { const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const pwshPath = yield io.which("pwsh", false); if (pwshPath) { const pwshCommand = [ `$ErrorActionPreference = 'Stop' ;`, `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`, `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`, `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;` ].join(" "); const args = [ "-NoLogo", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Unrestricted", "-Command", pwshCommand ]; core.debug(`Using pwsh at path: ${pwshPath}`); yield exec_1.exec(`"${pwshPath}"`, args); } else { const powershellCommand = [ `$ErrorActionPreference = 'Stop' ;`, `try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`, `if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`, `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }` ].join(" "); const args = [ "-NoLogo", "-Sta", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Unrestricted", "-Command", powershellCommand ]; const powershellPath = yield io.which("powershell", true); core.debug(`Using powershell at path: ${powershellPath}`); yield exec_1.exec(`"${powershellPath}"`, args); } }); } function extractZipNix(file, dest) { return __awaiter2(this, void 0, void 0, function* () { const unzipPath = yield io.which("unzip", true); const args = [file]; if (!core.isDebug()) { args.unshift("-q"); } args.unshift("-o"); yield exec_1.exec(`"${unzipPath}"`, args, { cwd: dest }); }); } function cacheDir(sourceDir, tool, version3, arch) { return __awaiter2(this, void 0, void 0, function* () { version3 = semver.clean(version3) || version3; arch = arch || os.arch(); core.debug(`Caching tool ${tool} ${version3} ${arch}`); core.debug(`source dir: ${sourceDir}`); if (!fs.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version3, arch); for (const itemName of fs.readdirSync(sourceDir)) { const s = path.join(sourceDir, itemName); yield io.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version3, arch); return destPath; }); } exports.cacheDir = cacheDir; function cacheFile(sourceFile, targetFile, tool, version3, arch) { return __awaiter2(this, void 0, void 0, function* () { version3 = semver.clean(version3) || version3; arch = arch || os.arch(); core.debug(`Caching tool ${tool} ${version3} ${arch}`); core.debug(`source file: ${sourceFile}`); if (!fs.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version3, arch); const destPath = path.join(destFolder, targetFile); core.debug(`destination file ${destPath}`); yield io.cp(sourceFile, destPath); _completeToolPath(tool, version3, arch); return destFolder; }); } exports.cacheFile = cacheFile; function find(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(); if (!isExplicitVersion(versionSpec)) { const localVersions = findAllVersions(toolName, arch); const match = evaluateVersions(localVersions, versionSpec); versionSpec = match; } let toolPath = ""; if (versionSpec) { versionSpec = semver.clean(versionSpec) || ""; const cachePath = path.join(_getCacheDirectory(), toolName, versionSpec, arch); core.debug(`checking cache: ${cachePath}`); if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) { core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); toolPath = cachePath; } else { core.debug("not found"); } } return toolPath; } exports.find = find; function findAllVersions(toolName, arch) { const versions = []; arch = arch || os.arch(); const toolPath = path.join(_getCacheDirectory(), toolName); if (fs.existsSync(toolPath)) { const children2 = fs.readdirSync(toolPath); for (const child of children2) { if (isExplicitVersion(child)) { const fullPath = path.join(toolPath, child, arch || ""); if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) { versions.push(child); } } } } return versions; } exports.findAllVersions = findAllVersions; function getManifestFromRepo(owner, repo, auth, branch = "master") { return __awaiter2(this, void 0, void 0, function* () { let releases = []; const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`; const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { core.debug("set auth"); headers.authorization = auth; } const response = yield http.getJson(treeUrl, headers); if (!response.result) { return releases; } let manifestUrl = ""; for (const item of response.result.tree) { if (item.path === "versions-manifest.json") { manifestUrl = item.url; break; } } headers["accept"] = "application/vnd.github.VERSION.raw"; let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody(); if (versionsRaw) { versionsRaw = versionsRaw.replace(/^\uFEFF/, ""); try { releases = JSON.parse(versionsRaw); } catch (_a) { core.debug("Invalid json"); } } return releases; }); } exports.getManifestFromRepo = getManifestFromRepo; function findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) { return __awaiter2(this, void 0, void 0, function* () { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); } exports.findFromManifest = findFromManifest; function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { dest = path.join(_getTempDirectory(), v4_1.default()); } yield io.mkdirP(dest); return dest; }); } function _createToolPath(tool, version3, arch) { return __awaiter2(this, void 0, void 0, function* () { const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version3) || version3, arch || ""); core.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io.rmRF(folderPath); yield io.rmRF(markerPath); yield io.mkdirP(folderPath); return folderPath; }); } function _completeToolPath(tool, version3, arch) { const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version3) || version3, arch || ""); const markerPath = `${folderPath}.complete`; fs.writeFileSync(markerPath, ""); core.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { const c = semver.clean(versionSpec) || ""; core.debug(`isExplicit: ${c}`); const valid = semver.valid(c) != null; core.debug(`explicit? ${valid}`); return valid; } exports.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { let version3 = ""; core.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver.gt(a, b)) { return 1; } return -1; }); for (let i = versions.length - 1; i >= 0; i--) { const potential = versions[i]; const satisfied = semver.satisfies(potential, versionSpec); if (satisfied) { version3 = potential; break; } } if (version3) { core.debug(`matched: ${version3}`); } else { core.debug("match not found"); } return version3; } exports.evaluateVersions = evaluateVersions; function _getCacheDirectory() { const cacheDirectory = process.env["RUNNER_TOOL_CACHE"] || ""; assert_1.ok(cacheDirectory, "Expected RUNNER_TOOL_CACHE to be defined"); return cacheDirectory; } function _getTempDirectory() { const tempDirectory = process.env["RUNNER_TEMP"] || ""; assert_1.ok(tempDirectory, "Expected RUNNER_TEMP to be defined"); return tempDirectory; } function _getGlobal(key, defaultValue) { const value = global[key]; return value !== void 0 ? value : defaultValue; } function _unique(values) { return Array.from(new Set(values)); } } }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js var require_internal_glob_options_helper = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getOptions = void 0; var core = __importStar2(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, implicitDescendants: true, omitBrokenSymbolicLinks: true }; if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; core.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } } return result; } exports.getOptions = getOptions; } }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js var require_internal_path_helper = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path-helper.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.safeTrimTrailingSeparator = exports.normalizeSeparators = exports.hasRoot = exports.hasAbsoluteRoot = exports.ensureAbsoluteRoot = exports.dirname = void 0; var path = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname(p) { p = safeTrimTrailingSeparator(p); if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } let result = path.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } return result; } exports.dirname = dirname; function ensureAbsoluteRoot(root, itemPath) { assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); if (hasAbsoluteRoot(itemPath)) { return itemPath; } if (IS_WINDOWS) { if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) { let cwd = process.cwd(); assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) { if (itemPath.length === 2) { return `${itemPath[0]}:\\${cwd.substr(3)}`; } else { if (!cwd.endsWith("\\")) { cwd += "\\"; } return `${itemPath[0]}:\\${cwd.substr(3)}${itemPath.substr(2)}`; } } else { return `${itemPath[0]}:\\${itemPath.substr(2)}`; } } else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) { const cwd = process.cwd(); assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`); return `${cwd[0]}:\\${itemPath.substr(1)}`; } } assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { root += path.sep; } return root + itemPath; } exports.ensureAbsoluteRoot = ensureAbsoluteRoot; function hasAbsoluteRoot(itemPath) { assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\\\") || /^[A-Z]:\\/i.test(itemPath); } return itemPath.startsWith("/"); } exports.hasAbsoluteRoot = hasAbsoluteRoot; function hasRoot(itemPath) { assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`); itemPath = normalizeSeparators(itemPath); if (IS_WINDOWS) { return itemPath.startsWith("\\") || /^[A-Z]:/i.test(itemPath); } return itemPath.startsWith("/"); } exports.hasRoot = hasRoot; function normalizeSeparators(p) { p = p || ""; if (IS_WINDOWS) { p = p.replace(/\//g, "\\"); const isUnc = /^\\\\+[^\\]/.test(p); return (isUnc ? "\\" : "") + p.replace(/\\\\+/g, "\\"); } return p.replace(/\/\/+/g, "/"); } exports.normalizeSeparators = normalizeSeparators; function safeTrimTrailingSeparator(p) { if (!p) { return ""; } p = normalizeSeparators(p); if (!p.endsWith(path.sep)) { return p; } if (p === path.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { return p; } return p.substr(0, p.length - 1); } exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator; } }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js var require_internal_match_kind = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-match-kind.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MatchKind = void 0; var MatchKind; (function(MatchKind2) { MatchKind2[MatchKind2["None"] = 0] = "None"; MatchKind2[MatchKind2["Directory"] = 1] = "Directory"; MatchKind2[MatchKind2["File"] = 2] = "File"; MatchKind2[MatchKind2["All"] = 3] = "All"; })(MatchKind = exports.MatchKind || (exports.MatchKind = {})); } }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js var require_internal_pattern_helper = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern-helper.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.partialMatch = exports.match = exports.getSearchPaths = void 0; var pathHelper = __importStar2(require_internal_path_helper()); var internal_match_kind_1 = require_internal_match_kind(); var IS_WINDOWS = process.platform === "win32"; function getSearchPaths(patterns) { patterns = patterns.filter((x) => !x.negate); const searchPathMap = {}; for (const pattern of patterns) { const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; searchPathMap[key] = "candidate"; } const result = []; for (const pattern of patterns) { const key = IS_WINDOWS ? pattern.searchPath.toUpperCase() : pattern.searchPath; if (searchPathMap[key] === "included") { continue; } let foundAncestor = false; let tempKey = key; let parent = pathHelper.dirname(tempKey); while (parent !== tempKey) { if (searchPathMap[parent]) { foundAncestor = true; break; } tempKey = parent; parent = pathHelper.dirname(tempKey); } if (!foundAncestor) { result.push(pattern.searchPath); searchPathMap[key] = "included"; } } return result; } exports.getSearchPaths = getSearchPaths; function match(patterns, itemPath) { let result = internal_match_kind_1.MatchKind.None; for (const pattern of patterns) { if (pattern.negate) { result &= ~pattern.match(itemPath); } else { result |= pattern.match(itemPath); } } return result; } exports.match = match; function partialMatch(patterns, itemPath) { return patterns.some((x) => !x.negate && x.partialMatch(itemPath)); } exports.partialMatch = partialMatch; } }); // node_modules/concat-map/index.js var require_concat_map = __commonJS({ "node_modules/concat-map/index.js"(exports, module2) { module2.exports = function(xs, fn) { var res = []; for (var i = 0; i < xs.length; i++) { var x = fn(xs[i], i); if (isArray(x)) res.push.apply(res, x); else res.push(x); } return res; }; var isArray = Array.isArray || function(xs) { return Object.prototype.toString.call(xs) === "[object Array]"; }; } }); // node_modules/balanced-match/index.js var require_balanced_match = __commonJS({ "node_modules/balanced-match/index.js"(exports, module2) { "use strict"; module2.exports = balanced; function balanced(a, b, str) { if (a instanceof RegExp) a = maybeMatch(a, str); if (b instanceof RegExp) b = maybeMatch(b, str); var r = range(a, b, str); return r && { start: r[0], end: r[1], pre: str.slice(0, r[0]), body: str.slice(r[0] + a.length, r[1]), post: str.slice(r[1] + b.length) }; } function maybeMatch(reg, str) { var m = str.match(reg); return m ? m[0] : null; } balanced.range = range; function range(a, b, str) { var begs, beg, left, right, result; var ai = str.indexOf(a); var bi = str.indexOf(b, ai + 1); var i = ai; if (ai >= 0 && bi > 0) { if (a === b) { return [ai, bi]; } begs = []; left = str.length; while (i >= 0 && !result) { if (i == ai) { begs.push(i); ai = str.indexOf(a, i + 1); } else if (begs.length == 1) { result = [begs.pop(), bi]; } else { beg = begs.pop(); if (beg < left) { left = beg; right = bi; } bi = str.indexOf(b, i + 1); } i = ai < bi && ai >= 0 ? ai : bi; } if (begs.length) { result = [left, right]; } } return result; } } }); // node_modules/brace-expansion/index.js var require_brace_expansion = __commonJS({ "node_modules/brace-expansion/index.js"(exports, module2) { var concatMap = require_concat_map(); var balanced = require_balanced_match(); module2.exports = expandTop; var escSlash = "\0SLASH" + Math.random() + "\0"; var escOpen = "\0OPEN" + Math.random() + "\0"; var escClose = "\0CLOSE" + Math.random() + "\0"; var escComma = "\0COMMA" + Math.random() + "\0"; var escPeriod = "\0PERIOD" + Math.random() + "\0"; function numeric(str) { return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); } function escapeBraces(str) { return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); } function unescapeBraces(str) { return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); } function parseCommaParts(str) { if (!str) return [""]; var parts = []; var m = balanced("{", "}", str); if (!m) return str.split(","); var pre = m.pre; var body = m.body; var post = m.post; var p = pre.split(","); p[p.length - 1] += "{" + body + "}"; var postParts = parseCommaParts(post); if (post.length) { p[p.length - 1] += postParts.shift(); p.push.apply(p, postParts); } parts.push.apply(parts, p); return parts; } function expandTop(str) { if (!str) return []; if (str.substr(0, 2) === "{}") { str = "\\{\\}" + str.substr(2); } return expand(escapeBraces(str), true).map(unescapeBraces); } function embrace(str) { return "{" + str + "}"; } function isPadded(el) { return /^-?0\d/.test(el); } function lte(i, y) { return i <= y; } function gte(i, y) { return i >= y; } function expand(str, isTop) { var expansions = []; var m = balanced("{", "}", str); if (!m || /\$$/.test(m.pre)) return [str]; var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { if (m.post.match(/,.*\}/)) { str = m.pre + "{" + m.body + escClose + m.post; return expand(str); } return [str]; } var n; if (isSequence) { n = m.body.split(/\.\./); } else { n = parseCommaParts(m.body); if (n.length === 1) { n = expand(n[0], false).map(embrace); if (n.length === 1) { var post = m.post.length ? expand(m.post, false) : [""]; return post.map(function(p) { return m.pre + n[0] + p; }); } } } var pre = m.pre; var post = m.post.length ? expand(m.post, false) : [""]; var N; if (isSequence) { var x = numeric(n[0]); var y = numeric(n[1]); var width = Math.max(n[0].length, n[1].length); var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; var test = lte; var reverse = y < x; if (reverse) { incr *= -1; test = gte; } var pad = n.some(isPadded); N = []; for (var i = x; test(i, y); i += incr) { var c; if (isAlphaSequence) { c = String.fromCharCode(i); if (c === "\\") c = ""; } else { c = String(i); if (pad) { var need = width - c.length; if (need > 0) { var z = new Array(need + 1).join("0"); if (i < 0) c = "-" + z + c.slice(1); else c = z + c; } } } N.push(c); } } else { N = concatMap(n, function(el) { return expand(el, false); }); } for (var j = 0; j < N.length; j++) { for (var k = 0; k < post.length; k++) { var expansion = pre + N[j] + post[k]; if (!isTop || isSequence || expansion) expansions.push(expansion); } } return expansions; } } }); // node_modules/minimatch/minimatch.js var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; var path = function() { try { return require("path"); } catch (e) { } }() || { sep: "/" }; minimatch.sep = path.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand = require_brace_expansion(); var plTypes = { "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, "?": { open: "(?:", close: ")?" }, "+": { open: "(?:", close: ")+" }, "*": { open: "(?:", close: ")*" }, "@": { open: "(?:", close: ")" } }; var qmark = "[^/]"; var star = qmark + "*?"; var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; var reSpecials = charSet("().*{}+?[]^$\\!"); function charSet(s) { return s.split("").reduce(function(set, c) { set[c] = true; return set; }, {}); } var slashSplit = /\/+/; minimatch.filter = filter; function filter(pattern, options) { options = options || {}; return function(p, i, list) { return minimatch(p, pattern, options); }; } function ext(a, b) { b = b || {}; var t = {}; Object.keys(a).forEach(function(k) { t[k] = a[k]; }); Object.keys(b).forEach(function(k) { t[k] = b[k]; }); return t; } minimatch.defaults = function(def) { if (!def || typeof def !== "object" || !Object.keys(def).length) { return minimatch; } var orig = minimatch; var m = function minimatch2(p, pattern, options) { return orig(p, pattern, ext(def, options)); }; m.Minimatch = function Minimatch2(pattern, options) { return new orig.Minimatch(pattern, ext(def, options)); }; m.Minimatch.defaults = function defaults(options) { return orig.defaults(ext(def, options)).Minimatch; }; m.filter = function filter2(pattern, options) { return orig.filter(pattern, ext(def, options)); }; m.defaults = function defaults(options) { return orig.defaults(ext(def, options)); }; m.makeRe = function makeRe2(pattern, options) { return orig.makeRe(pattern, ext(def, options)); }; m.braceExpand = function braceExpand2(pattern, options) { return orig.braceExpand(pattern, ext(def, options)); }; m.match = function(list, pattern, options) { return orig.match(list, pattern, ext(def, options)); }; return m; }; Minimatch.defaults = function(def) { return minimatch.defaults(def).Minimatch; }; function minimatch(p, pattern, options) { assertValidPattern(pattern); if (!options) options = {}; if (!options.nocomment && pattern.charAt(0) === "#") { return false; } return new Minimatch(pattern, options).match(p); } function Minimatch(pattern, options) { if (!(this instanceof Minimatch)) { return new Minimatch(pattern, options); } assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); if (path.sep !== "/") { pattern = pattern.split(path.sep).join("/"); } this.options = options; this.set = []; this.pattern = pattern; this.regexp = null; this.negate = false; this.comment = false; this.empty = false; this.partial = !!options.partial; this.make(); } Minimatch.prototype.debug = function() { }; Minimatch.prototype.make = make; function make() { var pattern = this.pattern; var options = this.options; if (!options.nocomment && pattern.charAt(0) === "#") { this.comment = true; return; } if (!pattern) { this.empty = true; return; } this.parseNegate(); var set = this.globSet = this.braceExpand(); if (options.debug) this.debug = function debug() { console.error.apply(console, arguments); }; this.debug(this.pattern, set); set = this.globParts = set.map(function(s) { return s.split(slashSplit); }); this.debug(this.pattern, set); set = set.map(function(s, si, set2) { return s.map(this.parse, this); }, this); this.debug(this.pattern, set); set = set.filter(function(s) { return s.indexOf(false) === -1; }); this.debug(this.pattern, set); this.set = set; } Minimatch.prototype.parseNegate = parseNegate; function parseNegate() { var pattern = this.pattern; var negate = false; var options = this.options; var negateOffset = 0; if (options.nonegate) return; for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { negate = !negate; negateOffset++; } if (negateOffset) this.pattern = pattern.substr(negateOffset); this.negate = negate; } minimatch.braceExpand = function(pattern, options) { return braceExpand(pattern, options); }; Minimatch.prototype.braceExpand = braceExpand; function braceExpand(pattern, options) { if (!options) { if (this instanceof Minimatch) { options = this.options; } else { options = {}; } } pattern = typeof pattern === "undefined" ? this.pattern : pattern; assertValidPattern(pattern); if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { return [pattern]; } return expand(pattern); } var MAX_PATTERN_LENGTH = 1024 * 64; var assertValidPattern = function(pattern) { if (typeof pattern !== "string") { throw new TypeError("invalid pattern"); } if (pattern.length > MAX_PATTERN_LENGTH) { throw new TypeError("pattern is too long"); } }; Minimatch.prototype.parse = parse3; var SUBPARSE = {}; function parse3(pattern, isSub) { assertValidPattern(pattern); var options = this.options; if (pattern === "**") { if (!options.noglobstar) return GLOBSTAR; else pattern = "*"; } if (pattern === "") return ""; var re = ""; var hasMagic = !!options.nocase; var escaping = false; var patternListStack = []; var negativeLists = []; var stateChar; var inClass = false; var reClassStart = -1; var classStart = -1; var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; var self2 = this; function clearStateChar() { if (stateChar) { switch (stateChar) { case "*": re += star; hasMagic = true; break; case "?": re += qmark; hasMagic = true; break; default: re += "\\" + stateChar; break; } self2.debug("clearStateChar %j %j", stateChar, re); stateChar = false; } } for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { this.debug("%s %s %s %j", pattern, i, re, c); if (escaping && reSpecials[c]) { re += "\\" + c; escaping = false; continue; } switch (c) { case "/": { return false; } case "\\": clearStateChar(); escaping = true; continue; case "?": case "*": case "+": case "@": case "!": this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); if (inClass) { this.debug(" in class"); if (c === "!" && i === classStart + 1) c = "^"; re += c; continue; } self2.debug("call clearStateChar %j", stateChar); clearStateChar(); stateChar = c; if (options.noext) clearStateChar(); continue; case "(": if (inClass) { re += "("; continue; } if (!stateChar) { re += "\\("; continue; } patternListStack.push({ type: stateChar, start: i - 1, reStart: re.length, open: plTypes[stateChar].open, close: plTypes[stateChar].close }); re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; this.debug("plType %j %j", stateChar, re); stateChar = false; continue; case ")": if (inClass || !patternListStack.length) { re += "\\)"; continue; } clearStateChar(); hasMagic = true; var pl = patternListStack.pop(); re += pl.close; if (pl.type === "!") { negativeLists.push(pl); } pl.reEnd = re.length; continue; case "|": if (inClass || !patternListStack.length || escaping) { re += "\\|"; escaping = false; continue; } clearStateChar(); re += "|"; continue; case "[": clearStateChar(); if (inClass) { re += "\\" + c; continue; } inClass = true; classStart = i; reClassStart = re.length; re += c; continue; case "]": if (i === classStart + 1 || !inClass) { re += "\\" + c; escaping = false; continue; } var cs = pattern.substring(classStart + 1, i); try { RegExp("[" + cs + "]"); } catch (er) { var sp = this.parse(cs, SUBPARSE); re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; hasMagic = hasMagic || sp[1]; inClass = false; continue; } hasMagic = true; inClass = false; re += c; continue; default: clearStateChar(); if (escaping) { escaping = false; } else if (reSpecials[c] && !(c === "^" && inClass)) { re += "\\"; } re += c; } } if (inClass) { cs = pattern.substr(classStart + 1); sp = this.parse(cs, SUBPARSE); re = re.substr(0, reClassStart) + "\\[" + sp[0]; hasMagic = hasMagic || sp[1]; } for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { var tail = re.slice(pl.reStart + pl.open.length); this.debug("setting tail", re, pl); tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { if (!$2) { $2 = "\\"; } return $1 + $1 + $2 + "|"; }); this.debug("tail=%j\n %s", tail, tail, pl, re); var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; hasMagic = true; re = re.slice(0, pl.reStart) + t + "\\(" + tail; } clearStateChar(); if (escaping) { re += "\\\\"; } var addPatternStart = false; switch (re.charAt(0)) { case "[": case ".": case "(": addPatternStart = true; } for (var n = negativeLists.length - 1; n > -1; n--) { var nl = negativeLists[n]; var nlBefore = re.slice(0, nl.reStart); var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); var nlAfter = re.slice(nl.reEnd); nlLast += nlAfter; var openParensBefore = nlBefore.split("(").length - 1; var cleanAfter = nlAfter; for (i = 0; i < openParensBefore; i++) { cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); } nlAfter = cleanAfter; var dollar = ""; if (nlAfter === "" && isSub !== SUBPARSE) { dollar = "$"; } var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; re = newRe; } if (re !== "" && hasMagic) { re = "(?=.)" + re; } if (addPatternStart) { re = patternStart + re; } if (isSub === SUBPARSE) { return [re, hasMagic]; } if (!hasMagic) { return globUnescape(pattern); } var flags = options.nocase ? "i" : ""; try { var regExp = new RegExp("^" + re + "$", flags); } catch (er) { return new RegExp("$."); } regExp._glob = pattern; regExp._src = re; return regExp; } minimatch.makeRe = function(pattern, options) { return new Minimatch(pattern, options || {}).makeRe(); }; Minimatch.prototype.makeRe = makeRe; function makeRe() { if (this.regexp || this.regexp === false) return this.regexp; var set = this.set; if (!set.length) { this.regexp = false; return this.regexp; } var options = this.options; var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; var flags = options.nocase ? "i" : ""; var re = set.map(function(pattern) { return pattern.map(function(p) { return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; }).join("\\/"); }).join("|"); re = "^(?:" + re + ")$"; if (this.negate) re = "^(?!" + re + ").*$"; try { this.regexp = new RegExp(re, flags); } catch (ex) { this.regexp = false; } return this.regexp; } minimatch.match = function(list, pattern, options) { options = options || {}; var mm = new Minimatch(pattern, options); list = list.filter(function(f) { return mm.match(f); }); if (mm.options.nonull && !list.length) { list.push(pattern); } return list; }; Minimatch.prototype.match = function match(f, partial) { if (typeof partial === "undefined") partial = this.partial; this.debug("match", f, this.pattern); if (this.comment) return false; if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; if (path.sep !== "/") { f = f.split(path.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); var set = this.set; this.debug(this.pattern, "set", set); var filename; var i; for (i = f.length - 1; i >= 0; i--) { filename = f[i]; if (filename) break; } for (i = 0; i < set.length; i++) { var pattern = set[i]; var file = f; if (options.matchBase && pattern.length === 1) { file = [filename]; } var hit = this.matchOne(file, pattern, partial); if (hit) { if (options.flipNegate) return true; return !this.negate; } } if (options.flipNegate) return false; return this.negate; }; Minimatch.prototype.matchOne = function(file, pattern, partial) { var options = this.options; this.debug( "matchOne", { "this": this, file, pattern } ); this.debug("matchOne", file.length, pattern.length); for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { this.debug("matchOne loop"); var p = pattern[pi]; var f = file[fi]; this.debug(pattern, p, f); if (p === false) return false; if (p === GLOBSTAR) { this.debug("GLOBSTAR", [pattern, p, f]); var fr = fi; var pr = pi + 1; if (pr === pl) { this.debug("** at the end"); for (; fi < fl; fi++) { if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; } return true; } while (fr < fl) { var swallowee = file[fr]; this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { this.debug("globstar found match!", fr, fl, swallowee); return true; } else { if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { this.debug("dot detected!", file, fr, pattern, pr); break; } this.debug("globstar swallow a segment, and continue"); fr++; } } if (partial) { this.debug("\n>>> no match, partial?", file, fr, pattern, pr); if (fr === fl) return true; } return false; } var hit; if (typeof p === "string") { hit = f === p; this.debug("string match", p, f, hit); } else { hit = f.match(p); this.debug("pattern match", p, f, hit); } if (!hit) return false; } if (fi === fl && pi === pl) { return true; } else if (fi === fl) { return partial; } else if (pi === pl) { return fi === fl - 1 && file[fi] === ""; } throw new Error("wtf?"); }; function globUnescape(s) { return s.replace(/\\(.)/g, "$1"); } function regExpEscape(s) { return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } } }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Path = void 0; var path = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; var Path = class { /** * Constructs a Path * @param itemPath Path or array of segments */ constructor(itemPath) { this.segments = []; if (typeof itemPath === "string") { assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { this.segments = itemPath.split(path.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { const basename = path.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); } this.segments.unshift(remaining); } } else { assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`); for (let i = 0; i < itemPath.length; i++) { let segment = itemPath[i]; assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`); segment = pathHelper.normalizeSeparators(itemPath[i]); if (i === 0 && pathHelper.hasRoot(segment)) { segment = pathHelper.safeTrimTrailingSeparator(segment); assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } } } /** * Converts the path to it's string representation */ toString() { let result = this.segments[0]; let skipSlash = result.endsWith(path.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { result += path.sep; } result += this.segments[i]; } return result; } }; exports.Path = Path; } }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js var require_internal_pattern = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-pattern.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __importDefault2 = exports && exports.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Pattern = void 0; var os = __importStar2(require("os")); var path = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); var IS_WINDOWS = process.platform === "win32"; var Pattern = class _Pattern { constructor(patternOrNegate, isImplicitPattern = false, segments, homedir2) { this.negate = false; let pattern; if (typeof patternOrNegate === "string") { pattern = patternOrNegate.trim(); } else { segments = segments || []; assert_1.default(segments.length, `Parameter 'segments' must not empty`); const root = _Pattern.getLiteral(segments[0]); assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`); pattern = new internal_path_1.Path(segments).toString().trim(); if (patternOrNegate) { pattern = `!${pattern}`; } } while (pattern.startsWith("!")) { this.negate = !this.negate; pattern = pattern.substr(1).trim(); } pattern = _Pattern.fixupPattern(pattern, homedir2); this.segments = new internal_path_1.Path(pattern).segments; this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); this.searchPath = new internal_path_1.Path(searchSegments).toString(); this.rootRegExp = new RegExp(_Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? "i" : ""); this.isImplicitPattern = isImplicitPattern; const minimatchOptions = { dot: true, nobrace: true, nocase: IS_WINDOWS, nocomment: true, noext: true, nonegate: true }; pattern = IS_WINDOWS ? pattern.replace(/\\/g, "/") : pattern; this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions); } /** * Matches the pattern against the specified path */ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); if (!itemPath.endsWith(path.sep) && this.isImplicitPattern === false) { itemPath = `${itemPath}${path.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); } if (this.minimatch.match(itemPath)) { return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All; } return internal_match_kind_1.MatchKind.None; } /** * Indicates whether the pattern may match descendants of the specified path */ partialMatch(itemPath) { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (pathHelper.dirname(itemPath) === itemPath) { return this.rootRegExp.test(itemPath); } return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\+/ : /\/+/), this.minimatch.set[0], true); } /** * Escapes glob patterns within a path */ static globEscape(s) { return (IS_WINDOWS ? s : s.replace(/\\/g, "\\\\")).replace(/(\[)(?=[^/]+\])/g, "[[]").replace(/\?/g, "[?]").replace(/\*/g, "[*]"); } /** * Normalizes slashes and ensures absolute root */ static fixupPattern(pattern, homedir2) { assert_1.default(pattern, "pattern cannot be empty"); const literalSegments = new internal_path_1.Path(pattern).segments.map((x) => _Pattern.getLiteral(x)); assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); if (pattern === "." || pattern.startsWith(`.${path.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); } else if (pattern === "~" || pattern.startsWith(`~${path.sep}`)) { homedir2 = homedir2 || os.homedir(); assert_1.default(homedir2, "Unable to determine HOME directory"); assert_1.default(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); pattern = _Pattern.globEscape(homedir2) + pattern.substr(1); } else if (IS_WINDOWS && (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\]/i))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", pattern.substr(0, 2)); if (pattern.length > 2 && !root.endsWith("\\")) { root += "\\"; } pattern = _Pattern.globEscape(root) + pattern.substr(2); } else if (IS_WINDOWS && (pattern === "\\" || pattern.match(/^\\[^\\]/))) { let root = pathHelper.ensureAbsoluteRoot("C:\\dummy-root", "\\"); if (!root.endsWith("\\")) { root += "\\"; } pattern = _Pattern.globEscape(root) + pattern.substr(1); } else { pattern = pathHelper.ensureAbsoluteRoot(_Pattern.globEscape(process.cwd()), pattern); } return pathHelper.normalizeSeparators(pattern); } /** * Attempts to unescape a pattern segment to create a literal path segment. * Otherwise returns empty string. */ static getLiteral(segment) { let literal = ""; for (let i = 0; i < segment.length; i++) { const c = segment[i]; if (c === "\\" && !IS_WINDOWS && i + 1 < segment.length) { literal += segment[++i]; continue; } else if (c === "*" || c === "?") { return ""; } else if (c === "[" && i + 1 < segment.length) { let set = ""; let closed = -1; for (let i2 = i + 1; i2 < segment.length; i2++) { const c2 = segment[i2]; if (c2 === "\\" && !IS_WINDOWS && i2 + 1 < segment.length) { set += segment[++i2]; continue; } else if (c2 === "]") { closed = i2; break; } else { set += c2; } } if (closed >= 0) { if (set.length > 1) { return ""; } if (set) { literal += set; i = closed; continue; } } } literal += c; } return literal; } /** * Escapes regexp special characters * https://javascript.info/regexp-escaping */ static regExpEscape(s) { return s.replace(/[[\\^$.|?*+()]/g, "\\$&"); } }; exports.Pattern = Pattern; } }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js var require_internal_search_state = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-search-state.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SearchState = void 0; var SearchState = class { constructor(path, level) { this.path = path; this.level = level; } }; exports.SearchState = SearchState; } }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js var require_internal_globber = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-globber.js"(exports) { "use strict"; var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __awaiter2 = exports && exports.__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 __asyncValues2 = exports && exports.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i); function verb(n) { i[n] = o[n] && function(v) { return new Promise(function(resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v2) { resolve({ value: v2, done: d }); }, reject); } }; var __await2 = exports && exports.__await || function(v) { return this instanceof __await2 ? (this.v = v, this) : new __await2(v); }; var __asyncGenerator2 = exports && exports.__asyncGenerator || function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i; function verb(n) { if (g[n]) i[n] = function(v) { return new Promise(function(a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } }; Object.defineProperty(exports, "__esModule", { value: true }); exports.DefaultGlobber = void 0; var core = __importStar2(require_core()); var fs = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); var path = __importStar2(require("path")); var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); var internal_search_state_1 = require_internal_search_state(); var IS_WINDOWS = process.platform === "win32"; var DefaultGlobber = class _DefaultGlobber { constructor(options) { this.patterns = []; this.searchPaths = []; this.options = globOptionsHelper.getOptions(options); } getSearchPaths() { return this.searchPaths.slice(); } glob() { var e_1, _a; return __awaiter2(this, void 0, void 0, function* () { const result = []; try { for (var _b = __asyncValues2(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { const itemPath = _c.value; result.push(itemPath); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); } finally { if (e_1) throw e_1.error; } } return result; }); } globGenerator() { return __asyncGenerator2(this, arguments, function* globGenerator_1() { const options = globOptionsHelper.getOptions(this.options); const patterns = []; for (const pattern of this.patterns) { patterns.push(pattern); if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); } } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { core.debug(`Search path '${searchPath}'`); try { yield __await2(fs.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; } throw err; } stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); } const traversalChain = []; while (stack.length) { const item = stack.pop(); const match = patternHelper.match(patterns, item.path); const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); if (!match && !partialMatch) { continue; } const stats = yield __await2( _DefaultGlobber.stat(item, options, traversalChain) // Broken symlink, or symlink cycle detected, or no longer exists ); if (!stats) { continue; } if (stats.isDirectory()) { if (match & internal_match_kind_1.MatchKind.Directory) { yield yield __await2(item.path); } else if (!partialMatch) { continue; } const childLevel = item.level + 1; const childItems = (yield __await2(fs.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); } } }); } /** * Constructs a DefaultGlobber */ static create(patterns, options) { return __awaiter2(this, void 0, void 0, function* () { const result = new _DefaultGlobber(options); if (IS_WINDOWS) { patterns = patterns.replace(/\r\n/g, "\n"); patterns = patterns.replace(/\r/g, "\n"); } const lines = patterns.split("\n").map((x) => x.trim()); for (const line of lines) { if (!line || line.startsWith("#")) { continue; } else { result.patterns.push(new internal_pattern_1.Pattern(line)); } } result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; }); } static stat(item, options, traversalChain) { return __awaiter2(this, void 0, void 0, function* () { let stats; if (options.followSymbolicLinks) { try { stats = yield fs.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { core.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); } throw err; } } else { stats = yield fs.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { const realPath = yield fs.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); } return stats; }); } }; exports.DefaultGlobber = DefaultGlobber; } }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js var require_glob = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports) { "use strict"; var __awaiter2 = exports && exports.__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.create = void 0; var internal_globber_1 = require_internal_globber(); function create(patterns, options) { return __awaiter2(this, void 0, void 0, function* () { return yield internal_globber_1.DefaultGlobber.create(patterns, options); }); } exports.create = create; } }); // node_modules/uuid/v1.js var require_v1 = __commonJS({ "node_modules/uuid/v1.js"(exports, module2) { var rng3 = require_rng(); var bytesToUuid = require_bytesToUuid(); var _nodeId3; var _clockseq3; var _lastMSecs3 = 0; var _lastNSecs3 = 0; function v13(options, buf, offset) { var i = buf && offset || 0; var b = buf || []; options = options || {}; var node = options.node || _nodeId3; var clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq3; if (node == null || clockseq == null) { var seedBytes = rng3(); if (node == null) { node = _nodeId3 = [ seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] ]; } if (clockseq == null) { clockseq = _clockseq3 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; } } var msecs = options.msecs !== void 0 ? options.msecs : (/* @__PURE__ */ new Date()).getTime(); var nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs3 + 1; var dt = msecs - _lastMSecs3 + (nsecs - _lastNSecs3) / 1e4; if (dt < 0 && options.clockseq === void 0) { clockseq = clockseq + 1 & 16383; } if ((dt < 0 || msecs > _lastMSecs3) && options.nsecs === void 0) { nsecs = 0; } if (nsecs >= 1e4) { throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } _lastMSecs3 = msecs; _lastNSecs3 = nsecs; _clockseq3 = clockseq; msecs += 122192928e5; var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; b[i++] = tl >>> 24 & 255; b[i++] = tl >>> 16 & 255; b[i++] = tl >>> 8 & 255; b[i++] = tl & 255; var tmh = msecs / 4294967296 * 1e4 & 268435455; b[i++] = tmh >>> 8 & 255; b[i++] = tmh & 255; b[i++] = tmh >>> 24 & 15 | 16; b[i++] = tmh >>> 16 & 255; b[i++] = clockseq >>> 8 | 128; b[i++] = clockseq & 255; for (var n = 0; n < 6; ++n) { b[i + n] = node[n]; } return buf ? buf : bytesToUuid(b); } module2.exports = v13; } }); // node_modules/uuid/index.js var require_uuid = __commonJS({ "node_modules/uuid/index.js"(exports, module2) { var v13 = require_v1(); var v43 = require_v4(); var uuid = v43; uuid.v1 = v13; uuid.v4 = v43; module2.exports = uuid; } }); // node_modules/@actions/cache/lib/internal/constants.js var require_constants = __commonJS({ "node_modules/@actions/cache/lib/internal/constants.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var CacheFilename; (function(CacheFilename2) { CacheFilename2["Gzip"] = "cache.tgz"; CacheFilename2["Zstd"] = "cache.tzst"; })(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {})); var CompressionMethod; (function(CompressionMethod2) { CompressionMethod2["Gzip"] = "gzip"; CompressionMethod2["ZstdWithoutLong"] = "zstd-without-long"; CompressionMethod2["Zstd"] = "zstd"; })(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {})); var ArchiveToolType; (function(ArchiveToolType2) { ArchiveToolType2["GNU"] = "gnu"; ArchiveToolType2["BSD"] = "bsd"; })(ArchiveToolType = exports.ArchiveToolType || (exports.ArchiveToolType = {})); exports.DefaultRetryAttempts = 2; exports.DefaultRetryDelay = 5e3; exports.SocketTimeout = 5e3; exports.GnuTarPathOnWindows = `${process.env["PROGRAMFILES"]}\\Git\\usr\\bin\\tar.exe`; exports.SystemTarPathOnWindows = `${process.env["SYSTEMDRIVE"]}\\Windows\\System32\\tar.exe`; exports.TarFilename = "cache.tar"; exports.ManifestFilename = "manifest.txt"; } }); // node_modules/@actions/cache/lib/internal/cacheUtils.js var require_cacheUtils = __commonJS({ "node_modules/@actions/cache/lib/internal/cacheUtils.js"(exports) { "use strict"; var __awaiter2 = exports && exports.__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 __asyncValues2 = exports && exports.__asyncValues || function(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i); function verb(n) { i[n] = o[n] && function(v) { return new Promise(function(resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v2) { resolve({ value: v2, done: d }); }, reject); } }; var __importStar2 = exports && exports.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; } result["default"] = mod; return result; }; Object.defineProperty(exports, "__esModule", { value: true }); var core = __importStar2(require_core()); var exec = __importStar2(require_exec()); var glob = __importStar2(require_glob()); var io = __importStar2(require_io()); var fs = __importStar2(require("fs")); var path = __importStar2(require("path")); var semver = __importStar2(require_semver()); var util = __importStar2(require("util")); var uuid_1 = require_uuid(); var constants_1 = require_constants(); function createTempDirectory() { return __awaiter2(this, void 0, void 0, function* () { const IS_WINDOWS = process.platform === "win32"; let tempDirectory = process.env["RUNNER_TEMP"] || ""; if (!tempDirectory) { let baseLocation; if (IS_WINDOWS) { baseLocation = process.env["USERPROFILE"] || "C:\\"; } else { if (process.platform === "darwin") { baseLocation = "/Users"; } else { baseLocation = "/home"; } } tempDirectory = path.join(baseLocation, "actions", "temp"); } const dest = path.join(tempDirectory, uuid_1.v4()); yield io.mkdirP(dest); return dest; }); } exports.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { return fs.statSync(filePath).size; } exports.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { var e_1, _a; var _b; return __awaiter2(this, void 0, void 0, function* () { const paths = []; const workspace = (_b = process.env["GITHUB_WORKSPACE"]) !== null && _b !== void 0 ? _b : process.cwd(); const globber = yield glob.create(patterns.join("\n"), { implicitDescendants: false }); try { for (var _c = __asyncValues2(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done; ) { const file = _d.value; const relativeFile = path.relative(workspace, file).replace(new RegExp(`\\${path.sep}`, "g"), "/"); core.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); } else { paths.push(`${relativeFile}`); } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c); } finally { if (e_1) throw e_1.error; } } return paths; }); } exports.resolvePaths = resolvePaths; function unlinkFile(filePath) { return __awaiter2(this, void 0, void 0, function* () { return util.promisify(fs.unlink)(filePath); }); } exports.unlinkFile = unlinkFile; function getVersion(app, additionalArgs = []) { return __awaiter2(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); core.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { yield exec.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, silent: true, listeners: { stdout: (data) => versionOutput += data.toString(), stderr: (data) => versionOutput += data.toString() } }); } catch (err) { core.debug(err.message); } versionOutput = versionOutput.trim(); core.debug(versionOutput); return versionOutput; }); } function getCompressionMethod() { return __awaiter2(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version3 = semver.clean(versionOutput); core.debug(`zstd version: ${version3}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { return constants_1.CompressionMethod.ZstdWithoutLong; } }); } exports.getCompressionMethod = getCompressionMethod; function getCacheFileName(compressionMethod) { return compressionMethod === constants_1.CompressionMethod.Gzip ? constants_1.CacheFilename.Gzip : constants_1.CacheFilename.Zstd; } exports.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { return __awaiter2(this, void 0, void 0, function* () { if (fs.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); return versionOutput.toLowerCase().includes("gnu tar") ? io.which("tar") : ""; }); } exports.getGnuTarPathOnWindows = getGnuTarPathOnWindows; function assertDefined(name, value) { if (value === void 0) { throw Error(`Expected ${name} but value was undefiend`); } return value; } exports.assertDefined = assertDefined; function isGhes() { const ghUrl = new URL(process.env["GITHUB_SERVER_URL"] || "https://github.com"); return ghUrl.hostname.toUpperCase() !== "GITHUB.COM"; } exports.isGhes = isGhes; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/rng.js function rng2() { if (poolPtr2 > rnds8Pool2.length - 16) { import_crypto4.default.randomFillSync(rnds8Pool2); poolPtr2 = 0; } return rnds8Pool2.slice(poolPtr2, poolPtr2 += 16); } var import_crypto4, rnds8Pool2, poolPtr2; var init_rng2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/rng.js"() { import_crypto4 = __toESM(require("crypto")); rnds8Pool2 = new Uint8Array(256); poolPtr2 = rnds8Pool2.length; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/regex.js var regex_default2; var init_regex2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/regex.js"() { regex_default2 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/validate.js function validate2(uuid) { return typeof uuid === "string" && regex_default2.test(uuid); } var validate_default2; var init_validate2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/validate.js"() { init_regex2(); validate_default2 = validate2; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/stringify.js function stringify2(arr, offset = 0) { const uuid = (byteToHex2[arr[offset + 0]] + byteToHex2[arr[offset + 1]] + byteToHex2[arr[offset + 2]] + byteToHex2[arr[offset + 3]] + "-" + byteToHex2[arr[offset + 4]] + byteToHex2[arr[offset + 5]] + "-" + byteToHex2[arr[offset + 6]] + byteToHex2[arr[offset + 7]] + "-" + byteToHex2[arr[offset + 8]] + byteToHex2[arr[offset + 9]] + "-" + byteToHex2[arr[offset + 10]] + byteToHex2[arr[offset + 11]] + byteToHex2[arr[offset + 12]] + byteToHex2[arr[offset + 13]] + byteToHex2[arr[offset + 14]] + byteToHex2[arr[offset + 15]]).toLowerCase(); if (!validate_default2(uuid)) { throw TypeError("Stringified UUID is invalid"); } return uuid; } var byteToHex2, stringify_default2; var init_stringify2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/stringify.js"() { init_validate2(); byteToHex2 = []; for (let i = 0; i < 256; ++i) { byteToHex2.push((i + 256).toString(16).substr(1)); } stringify_default2 = stringify2; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v1.js function v12(options, buf, offset) { let i = buf && offset || 0; const b = buf || new Array(16); options = options || {}; let node = options.node || _nodeId2; let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq2; if (node == null || clockseq == null) { const seedBytes = options.random || (options.rng || rng2)(); if (node == null) { node = _nodeId2 = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; } if (clockseq == null) { clockseq = _clockseq2 = (seedBytes[6] << 8 | seedBytes[7]) & 16383; } } let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs2 + 1; const dt = msecs - _lastMSecs2 + (nsecs - _lastNSecs2) / 1e4; if (dt < 0 && options.clockseq === void 0) { clockseq = clockseq + 1 & 16383; } if ((dt < 0 || msecs > _lastMSecs2) && options.nsecs === void 0) { nsecs = 0; } if (nsecs >= 1e4) { throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } _lastMSecs2 = msecs; _lastNSecs2 = nsecs; _clockseq2 = clockseq; msecs += 122192928e5; const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; b[i++] = tl >>> 24 & 255; b[i++] = tl >>> 16 & 255; b[i++] = tl >>> 8 & 255; b[i++] = tl & 255; const tmh = msecs / 4294967296 * 1e4 & 268435455; b[i++] = tmh >>> 8 & 255; b[i++] = tmh & 255; b[i++] = tmh >>> 24 & 15 | 16; b[i++] = tmh >>> 16 & 255; b[i++] = clockseq >>> 8 | 128; b[i++] = clockseq & 255; for (let n = 0; n < 6; ++n) { b[i + n] = node[n]; } return buf || stringify_default2(b); } var _nodeId2, _clockseq2, _lastMSecs2, _lastNSecs2, v1_default2; var init_v12 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v1.js"() { init_rng2(); init_stringify2(); _lastMSecs2 = 0; _lastNSecs2 = 0; v1_default2 = v12; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/parse.js function parse2(uuid) { if (!validate_default2(uuid)) { throw TypeError("Invalid UUID"); } let v; const arr = new Uint8Array(16); arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; arr[1] = v >>> 16 & 255; arr[2] = v >>> 8 & 255; arr[3] = v & 255; arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; arr[5] = v & 255; arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; arr[7] = v & 255; arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; arr[9] = v & 255; arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; arr[11] = v / 4294967296 & 255; arr[12] = v >>> 24 & 255; arr[13] = v >>> 16 & 255; arr[14] = v >>> 8 & 255; arr[15] = v & 255; return arr; } var parse_default2; var init_parse2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/parse.js"() { init_validate2(); parse_default2 = parse2; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v35.js function stringToBytes2(str) { str = unescape(encodeURIComponent(str)); const bytes = []; for (let i = 0; i < str.length; ++i) { bytes.push(str.charCodeAt(i)); } return bytes; } function v35_default2(name, version3, hashfunc) { function generateUUID(value, namespace, buf, offset) { if (typeof value === "string") { value = stringToBytes2(value); } if (typeof namespace === "string") { namespace = parse_default2(namespace); } if (namespace.length !== 16) { throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); } let bytes = new Uint8Array(16 + value.length); bytes.set(namespace); bytes.set(value, namespace.length); bytes = hashfunc(bytes); bytes[6] = bytes[6] & 15 | version3; bytes[8] = bytes[8] & 63 | 128; if (buf) { offset = offset || 0; for (let i = 0; i < 16; ++i) { buf[offset + i] = bytes[i]; } return buf; } return stringify_default2(bytes); } try { generateUUID.name = name; } catch (err) { } generateUUID.DNS = DNS2; generateUUID.URL = URL3; return generateUUID; } var DNS2, URL3; var init_v352 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v35.js"() { init_stringify2(); init_parse2(); DNS2 = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; URL3 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/md5.js function md52(bytes) { if (Array.isArray(bytes)) { bytes = Buffer.from(bytes); } else if (typeof bytes === "string") { bytes = Buffer.from(bytes, "utf8"); } return import_crypto5.default.createHash("md5").update(bytes).digest(); } var import_crypto5, md5_default2; var init_md52 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/md5.js"() { import_crypto5 = __toESM(require("crypto")); md5_default2 = md52; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v3.js var v32, v3_default2; var init_v32 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v3.js"() { init_v352(); init_md52(); v32 = v35_default2("v3", 48, md5_default2); v3_default2 = v32; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v4.js function v42(options, buf, offset) { options = options || {}; const rnds = options.random || (options.rng || rng2)(); rnds[6] = rnds[6] & 15 | 64; rnds[8] = rnds[8] & 63 | 128; if (buf) { offset = offset || 0; for (let i = 0; i < 16; ++i) { buf[offset + i] = rnds[i]; } return buf; } return stringify_default2(rnds); } var v4_default2; var init_v42 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v4.js"() { init_rng2(); init_stringify2(); v4_default2 = v42; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/sha1.js function sha12(bytes) { if (Array.isArray(bytes)) { bytes = Buffer.from(bytes); } else if (typeof bytes === "string") { bytes = Buffer.from(bytes, "utf8"); } return import_crypto6.default.createHash("sha1").update(bytes).digest(); } var import_crypto6, sha1_default2; var init_sha12 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/sha1.js"() { import_crypto6 = __toESM(require("crypto")); sha1_default2 = sha12; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v5.js var v52, v5_default2; var init_v52 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/v5.js"() { init_v352(); init_sha12(); v52 = v35_default2("v5", 80, sha1_default2); v5_default2 = v52; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/nil.js var nil_default2; var init_nil2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/nil.js"() { nil_default2 = "00000000-0000-0000-0000-000000000000"; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/version.js function version2(uuid) { if (!validate_default2(uuid)) { throw TypeError("Invalid UUID"); } return parseInt(uuid.substr(14, 1), 16); } var version_default2; var init_version2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/version.js"() { init_validate2(); version_default2 = version2; } }); // node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/index.js var esm_node_exports2 = {}; __export(esm_node_exports2, { NIL: () => nil_default2, parse: () => parse_default2, stringify: () => stringify_default2, v1: () => v1_default2, v3: () => v3_default2, v4: () => v4_default2, v5: () => v5_default2, validate: () => validate_default2, version: () => version_default2 }); var init_esm_node2 = __esm({ "node_modules/@azure/core-http/node_modules/uuid/dist/esm-node/index.js"() { init_v12(); init_v32(); init_v42(); init_v52(); init_nil2(); init_version2(); init_validate2(); init_stringify2(); init_parse2(); } }); // node_modules/tslib/tslib.es6.js var tslib_es6_exports = {}; __export(tslib_es6_exports, { __assign: () => __assign, __asyncDelegator: () => __asyncDelegator, __asyncGenerator: () => __asyncGenerator, __asyncValues: () => __asyncValues, __await: () => __await, __awaiter: () => __awaiter, __classPrivateFieldGet: () => __classPrivateFieldGet, __classPrivateFieldIn: () => __classPrivateFieldIn, __classPrivateFieldSet: () => __classPrivateFieldSet, __createBinding: () => __createBinding, __decorate: () => __decorate, __esDecorate: () => __esDecorate, __exportStar: () => __exportStar, __extends: () => __extends, __generator: () => __generator, __importDefault: () => __importDefault, __importStar: () => __importStar, __makeTemplateObject: () => __makeTemplateObject, __metadata: () => __metadata, __param: () => __param, __propKey: () => __propKey, __read: () => __read, __rest: () => __rest, __runInitializers: () => __runInitializers, __setFunctionName: () => __setFunctionName, __spread: () => __spread, __spreadArray: () => __spreadArray, __spreadArrays: () => __spreadArrays, __values: () => __values2 }); function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function(target, key) { decorator(target, key, paramIndex); }; } function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); var _, done = false; for (var i = decorators.length - 1; i >= 0; i--) { var context = {}; for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; for (var p in contextIn.access) context.access[p] = contextIn.access[p]; context.addInitializer = function(f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); if (kind === "accessor") { if (result === void 0) continue; if (result === null || typeof result !== "object") throw new TypeError("Object expected"); if (_ = accept(result.get)) descriptor.get = _; if (_ = accept(result.set)) descriptor.set = _; if (_ = accept(result.init)) initializers.push(_); } else if (_ = accept(result)) { if (kind === "field") initializers.push(_); else descriptor[key] = _; } } if (target) Object.defineProperty(target, contextIn.name, descriptor); done = true; } function __runInitializers(thisArg, initializers, value) { var useValue = arguments.length > 2; for (var i = 0; i < initializers.length; i++) { value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); } return useValue ? value : void 0; } function __propKey(x) { return typeof x === "symbol" ? x : "".concat(x); } function __setFunctionName(f, name, prefix) { if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(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()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function(v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); } function __values2(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function() { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i; function verb(n) { if (g[n]) i[n] = function(v) { return new Promise(function(a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function(e) { throw e; }), verb("return"), i[Symbol.iterator] = function() { return this; }, i; function verb(n, f) { i[n] = o[n] ? function(v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values2 === "function" ? __values2(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { return this; }, i); function verb(n) { i[n] = o[n] && function(v) { return new Promise(function(resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v2) { resolve({ value: v2, done: d }); }, reject); } } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; } function __importStar(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; } function __importDefault(mod) { return mod && mod.__esModule ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } function __classPrivateFieldSet(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; } function __classPrivateFieldIn(state, receiver) { if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); return typeof state === "function" ? receiver === state : state.has(receiver); } var extendStatics, __assign, __createBinding, __setModuleDefault; var init_tslib_es6 = __esm({ "node_modules/tslib/tslib.es6.js"() { extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; } || function(d2, b2) { for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; }; return extendStatics(d, b); }; __assign = function() { __assign = Object.assign || function __assign2(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; __createBinding = Object.create ? function(o, m, k, k2) { if (k2 === void 0) 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 === void 0) k2 = k; o[k2] = m[k]; }; __setModuleDefault = Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }; } }); // node_modules/xml2js/lib/defaults.js var require_defaults = __commonJS({ "node_modules/xml2js/lib/defaults.js"(exports) { (function() { exports.defaults = { "0.1": { explicitCharkey: false, trim: true, normalize: true, normalizeTags: false, attrkey: "@", charkey: "#", explicitArray: false, ignoreAttrs: false, mergeAttrs: false, explicitRoot: false, validator: null, xmlns: false, explicitChildren: false, childkey: "@@", charsAsChildren: false, includeWhiteChars: false, async: false, strict: true, attrNameProcessors: null, attrValueProcessors: null, tagNameProcessors: null, valueProcessors: null, emptyTag: "" }, "0.2": { explicitCharkey: false, trim: false, normalize: false, normalizeTags: false, attrkey: "$", charkey: "_", explicitArray: true, ignoreAttrs: false, mergeAttrs: false, explicitRoot: true, validator: null, xmlns: false, explicitChildren: false, preserveChildrenOrder: false, childkey: "$$", charsAsChildren: false, includeWhiteChars: false, async: false, strict: true, attrNameProcessors: null, attrValueProcessors: null, tagNameProcessors: null, valueProcessors: null, rootName: "root", xmldec: { "version": "1.0", "encoding": "UTF-8", "standalone": true }, doctype: null, renderOpts: { "pretty": true, "indent": " ", "newline": "\n" }, headless: false, chunkSize: 1e4, emptyTag: "", cdata: false } }; }).call(exports); } }); // node_modules/xmlbuilder/lib/Utility.js var require_Utility = __commonJS({ "node_modules/xmlbuilder/lib/Utility.js"(exports, module2) { (function() { var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject, slice = [].slice, hasProp = {}.hasOwnProperty; assign = function() { var i, key, len, source, sources, target; target = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : []; if (isFunction(Object.assign)) { Object.assign.apply(null, arguments); } else { for (i = 0, len = sources.length; i < len; i++) { source = sources[i]; if (source != null) { for (key in source) { if (!hasProp.call(source, key)) continue; target[key] = source[key]; } } } } return target; }; isFunction = function(val) { return !!val && Object.prototype.toString.call(val) === "[object Function]"; }; isObject = function(val) { var ref; return !!val && ((ref = typeof val) === "function" || ref === "object"); }; isArray = function(val) { if (isFunction(Array.isArray)) { return Array.isArray(val); } else { return Object.prototype.toString.call(val) === "[object Array]"; } }; isEmpty = function(val) { var key; if (isArray(val)) { return !val.length; } else { for (key in val) { if (!hasProp.call(val, key)) continue; return false; } return true; } }; isPlainObject = function(val) { var ctor, proto; return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && typeof ctor === "function" && ctor instanceof ctor && Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object); }; getValue = function(obj) { if (isFunction(obj.valueOf)) { return obj.valueOf(); } else { return obj; } }; module2.exports.assign = assign; module2.exports.isFunction = isFunction; module2.exports.isObject = isObject; module2.exports.isArray = isArray; module2.exports.isEmpty = isEmpty; module2.exports.isPlainObject = isPlainObject; module2.exports.getValue = getValue; }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDOMImplementation.js var require_XMLDOMImplementation = __commonJS({ "node_modules/xmlbuilder/lib/XMLDOMImplementation.js"(exports, module2) { (function() { var XMLDOMImplementation; module2.exports = XMLDOMImplementation = function() { function XMLDOMImplementation2() { } XMLDOMImplementation2.prototype.hasFeature = function(feature, version3) { return true; }; XMLDOMImplementation2.prototype.createDocumentType = function(qualifiedName, publicId, systemId) { throw new Error("This DOM method is not implemented."); }; XMLDOMImplementation2.prototype.createDocument = function(namespaceURI, qualifiedName, doctype) { throw new Error("This DOM method is not implemented."); }; XMLDOMImplementation2.prototype.createHTMLDocument = function(title) { throw new Error("This DOM method is not implemented."); }; XMLDOMImplementation2.prototype.getFeature = function(feature, version3) { throw new Error("This DOM method is not implemented."); }; return XMLDOMImplementation2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js var require_XMLDOMErrorHandler = __commonJS({ "node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js"(exports, module2) { (function() { var XMLDOMErrorHandler; module2.exports = XMLDOMErrorHandler = function() { function XMLDOMErrorHandler2() { } XMLDOMErrorHandler2.prototype.handleError = function(error) { throw new Error(error); }; return XMLDOMErrorHandler2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDOMStringList.js var require_XMLDOMStringList = __commonJS({ "node_modules/xmlbuilder/lib/XMLDOMStringList.js"(exports, module2) { (function() { var XMLDOMStringList; module2.exports = XMLDOMStringList = function() { function XMLDOMStringList2(arr) { this.arr = arr || []; } Object.defineProperty(XMLDOMStringList2.prototype, "length", { get: function() { return this.arr.length; } }); XMLDOMStringList2.prototype.item = function(index) { return this.arr[index] || null; }; XMLDOMStringList2.prototype.contains = function(str) { return this.arr.indexOf(str) !== -1; }; return XMLDOMStringList2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDOMConfiguration.js var require_XMLDOMConfiguration = __commonJS({ "node_modules/xmlbuilder/lib/XMLDOMConfiguration.js"(exports, module2) { (function() { var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList; XMLDOMErrorHandler = require_XMLDOMErrorHandler(); XMLDOMStringList = require_XMLDOMStringList(); module2.exports = XMLDOMConfiguration = function() { function XMLDOMConfiguration2() { var clonedSelf; this.defaultParams = { "canonical-form": false, "cdata-sections": false, "comments": false, "datatype-normalization": false, "element-content-whitespace": true, "entities": true, "error-handler": new XMLDOMErrorHandler(), "infoset": true, "validate-if-schema": false, "namespaces": true, "namespace-declarations": true, "normalize-characters": false, "schema-location": "", "schema-type": "", "split-cdata-sections": true, "validate": false, "well-formed": true }; this.params = clonedSelf = Object.create(this.defaultParams); } Object.defineProperty(XMLDOMConfiguration2.prototype, "parameterNames", { get: function() { return new XMLDOMStringList(Object.keys(this.defaultParams)); } }); XMLDOMConfiguration2.prototype.getParameter = function(name) { if (this.params.hasOwnProperty(name)) { return this.params[name]; } else { return null; } }; XMLDOMConfiguration2.prototype.canSetParameter = function(name, value) { return true; }; XMLDOMConfiguration2.prototype.setParameter = function(name, value) { if (value != null) { return this.params[name] = value; } else { return delete this.params[name]; } }; return XMLDOMConfiguration2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/NodeType.js var require_NodeType = __commonJS({ "node_modules/xmlbuilder/lib/NodeType.js"(exports, module2) { (function() { module2.exports = { Element: 1, Attribute: 2, Text: 3, CData: 4, EntityReference: 5, EntityDeclaration: 6, ProcessingInstruction: 7, Comment: 8, Document: 9, DocType: 10, DocumentFragment: 11, NotationDeclaration: 12, Declaration: 201, Raw: 202, AttributeDeclaration: 203, ElementDeclaration: 204, Dummy: 205 }; }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLAttribute.js var require_XMLAttribute = __commonJS({ "node_modules/xmlbuilder/lib/XMLAttribute.js"(exports, module2) { (function() { var NodeType, XMLAttribute, XMLNode; NodeType = require_NodeType(); XMLNode = require_XMLNode(); module2.exports = XMLAttribute = function() { function XMLAttribute2(parent, name, value) { this.parent = parent; if (this.parent) { this.options = this.parent.options; this.stringify = this.parent.stringify; } if (name == null) { throw new Error("Missing attribute name. " + this.debugInfo(name)); } this.name = this.stringify.name(name); this.value = this.stringify.attValue(value); this.type = NodeType.Attribute; this.isId = false; this.schemaTypeInfo = null; } Object.defineProperty(XMLAttribute2.prototype, "nodeType", { get: function() { return this.type; } }); Object.defineProperty(XMLAttribute2.prototype, "ownerElement", { get: function() { return this.parent; } }); Object.defineProperty(XMLAttribute2.prototype, "textContent", { get: function() { return this.value; }, set: function(value) { return this.value = value || ""; } }); Object.defineProperty(XMLAttribute2.prototype, "namespaceURI", { get: function() { return ""; } }); Object.defineProperty(XMLAttribute2.prototype, "prefix", { get: function() { return ""; } }); Object.defineProperty(XMLAttribute2.prototype, "localName", { get: function() { return this.name; } }); Object.defineProperty(XMLAttribute2.prototype, "specified", { get: function() { return true; } }); XMLAttribute2.prototype.clone = function() { return Object.create(this); }; XMLAttribute2.prototype.toString = function(options) { return this.options.writer.attribute(this, this.options.writer.filterOptions(options)); }; XMLAttribute2.prototype.debugInfo = function(name) { name = name || this.name; if (name == null) { return "parent: <" + this.parent.name + ">"; } else { return "attribute: {" + name + "}, parent: <" + this.parent.name + ">"; } }; XMLAttribute2.prototype.isEqualNode = function(node) { if (node.namespaceURI !== this.namespaceURI) { return false; } if (node.prefix !== this.prefix) { return false; } if (node.localName !== this.localName) { return false; } if (node.value !== this.value) { return false; } return true; }; return XMLAttribute2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLNamedNodeMap.js var require_XMLNamedNodeMap = __commonJS({ "node_modules/xmlbuilder/lib/XMLNamedNodeMap.js"(exports, module2) { (function() { var XMLNamedNodeMap; module2.exports = XMLNamedNodeMap = function() { function XMLNamedNodeMap2(nodes) { this.nodes = nodes; } Object.defineProperty(XMLNamedNodeMap2.prototype, "length", { get: function() { return Object.keys(this.nodes).length || 0; } }); XMLNamedNodeMap2.prototype.clone = function() { return this.nodes = null; }; XMLNamedNodeMap2.prototype.getNamedItem = function(name) { return this.nodes[name]; }; XMLNamedNodeMap2.prototype.setNamedItem = function(node) { var oldNode; oldNode = this.nodes[node.nodeName]; this.nodes[node.nodeName] = node; return oldNode || null; }; XMLNamedNodeMap2.prototype.removeNamedItem = function(name) { var oldNode; oldNode = this.nodes[name]; delete this.nodes[name]; return oldNode || null; }; XMLNamedNodeMap2.prototype.item = function(index) { return this.nodes[Object.keys(this.nodes)[index]] || null; }; XMLNamedNodeMap2.prototype.getNamedItemNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented."); }; XMLNamedNodeMap2.prototype.setNamedItemNS = function(node) { throw new Error("This DOM method is not implemented."); }; XMLNamedNodeMap2.prototype.removeNamedItemNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented."); }; return XMLNamedNodeMap2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLElement.js var require_XMLElement = __commonJS({ "node_modules/xmlbuilder/lib/XMLElement.js"(exports, module2) { (function() { var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; ref = require_Utility(), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue; XMLNode = require_XMLNode(); NodeType = require_NodeType(); XMLAttribute = require_XMLAttribute(); XMLNamedNodeMap = require_XMLNamedNodeMap(); module2.exports = XMLElement = function(superClass) { extend(XMLElement2, superClass); function XMLElement2(parent, name, attributes) { var child, j, len, ref1; XMLElement2.__super__.constructor.call(this, parent); if (name == null) { throw new Error("Missing element name. " + this.debugInfo()); } this.name = this.stringify.name(name); this.type = NodeType.Element; this.attribs = {}; this.schemaTypeInfo = null; if (attributes != null) { this.attribute(attributes); } if (parent.type === NodeType.Document) { this.isRoot = true; this.documentObject = parent; parent.rootObject = this; if (parent.children) { ref1 = parent.children; for (j = 0, len = ref1.length; j < len; j++) { child = ref1[j]; if (child.type === NodeType.DocType) { child.name = this.name; break; } } } } } Object.defineProperty(XMLElement2.prototype, "tagName", { get: function() { return this.name; } }); Object.defineProperty(XMLElement2.prototype, "namespaceURI", { get: function() { return ""; } }); Object.defineProperty(XMLElement2.prototype, "prefix", { get: function() { return ""; } }); Object.defineProperty(XMLElement2.prototype, "localName", { get: function() { return this.name; } }); Object.defineProperty(XMLElement2.prototype, "id", { get: function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); } }); Object.defineProperty(XMLElement2.prototype, "className", { get: function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); } }); Object.defineProperty(XMLElement2.prototype, "classList", { get: function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); } }); Object.defineProperty(XMLElement2.prototype, "attributes", { get: function() { if (!this.attributeMap || !this.attributeMap.nodes) { this.attributeMap = new XMLNamedNodeMap(this.attribs); } return this.attributeMap; } }); XMLElement2.prototype.clone = function() { var att, attName, clonedSelf, ref1; clonedSelf = Object.create(this); if (clonedSelf.isRoot) { clonedSelf.documentObject = null; } clonedSelf.attribs = {}; ref1 = this.attribs; for (attName in ref1) { if (!hasProp.call(ref1, attName)) continue; att = ref1[attName]; clonedSelf.attribs[attName] = att.clone(); } clonedSelf.children = []; this.children.forEach(function(child) { var clonedChild; clonedChild = child.clone(); clonedChild.parent = clonedSelf; return clonedSelf.children.push(clonedChild); }); return clonedSelf; }; XMLElement2.prototype.attribute = function(name, value) { var attName, attValue; if (name != null) { name = getValue(name); } if (isObject(name)) { for (attName in name) { if (!hasProp.call(name, attName)) continue; attValue = name[attName]; this.attribute(attName, attValue); } } else { if (isFunction(value)) { value = value.apply(); } if (this.options.keepNullAttributes && value == null) { this.attribs[name] = new XMLAttribute(this, name, ""); } else if (value != null) { this.attribs[name] = new XMLAttribute(this, name, value); } } return this; }; XMLElement2.prototype.removeAttribute = function(name) { var attName, j, len; if (name == null) { throw new Error("Missing attribute name. " + this.debugInfo()); } name = getValue(name); if (Array.isArray(name)) { for (j = 0, len = name.length; j < len; j++) { attName = name[j]; delete this.attribs[attName]; } } else { delete this.attribs[name]; } return this; }; XMLElement2.prototype.toString = function(options) { return this.options.writer.element(this, this.options.writer.filterOptions(options)); }; XMLElement2.prototype.att = function(name, value) { return this.attribute(name, value); }; XMLElement2.prototype.a = function(name, value) { return this.attribute(name, value); }; XMLElement2.prototype.getAttribute = function(name) { if (this.attribs.hasOwnProperty(name)) { return this.attribs[name].value; } else { return null; } }; XMLElement2.prototype.setAttribute = function(name, value) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getAttributeNode = function(name) { if (this.attribs.hasOwnProperty(name)) { return this.attribs[name]; } else { return null; } }; XMLElement2.prototype.setAttributeNode = function(newAttr) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.removeAttributeNode = function(oldAttr) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getElementsByTagName = function(name) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getAttributeNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.removeAttributeNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getAttributeNodeNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.setAttributeNodeNS = function(newAttr) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.hasAttribute = function(name) { return this.attribs.hasOwnProperty(name); }; XMLElement2.prototype.hasAttributeNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.setIdAttribute = function(name, isId) { if (this.attribs.hasOwnProperty(name)) { return this.attribs[name].isId; } else { return isId; } }; XMLElement2.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.setIdAttributeNode = function(idAttr, isId) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getElementsByTagName = function(tagname) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.getElementsByClassName = function(classNames) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLElement2.prototype.isEqualNode = function(node) { var i, j, ref1; if (!XMLElement2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { return false; } if (node.namespaceURI !== this.namespaceURI) { return false; } if (node.prefix !== this.prefix) { return false; } if (node.localName !== this.localName) { return false; } if (node.attribs.length !== this.attribs.length) { return false; } for (i = j = 0, ref1 = this.attribs.length - 1; 0 <= ref1 ? j <= ref1 : j >= ref1; i = 0 <= ref1 ? ++j : --j) { if (!this.attribs[i].isEqualNode(node.attribs[i])) { return false; } } return true; }; return XMLElement2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLCharacterData.js var require_XMLCharacterData = __commonJS({ "node_modules/xmlbuilder/lib/XMLCharacterData.js"(exports, module2) { (function() { var XMLCharacterData, XMLNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); module2.exports = XMLCharacterData = function(superClass) { extend(XMLCharacterData2, superClass); function XMLCharacterData2(parent) { XMLCharacterData2.__super__.constructor.call(this, parent); this.value = ""; } Object.defineProperty(XMLCharacterData2.prototype, "data", { get: function() { return this.value; }, set: function(value) { return this.value = value || ""; } }); Object.defineProperty(XMLCharacterData2.prototype, "length", { get: function() { return this.value.length; } }); Object.defineProperty(XMLCharacterData2.prototype, "textContent", { get: function() { return this.value; }, set: function(value) { return this.value = value || ""; } }); XMLCharacterData2.prototype.clone = function() { return Object.create(this); }; XMLCharacterData2.prototype.substringData = function(offset, count) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLCharacterData2.prototype.appendData = function(arg) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLCharacterData2.prototype.insertData = function(offset, arg) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLCharacterData2.prototype.deleteData = function(offset, count) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLCharacterData2.prototype.replaceData = function(offset, count, arg) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLCharacterData2.prototype.isEqualNode = function(node) { if (!XMLCharacterData2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { return false; } if (node.data !== this.data) { return false; } return true; }; return XMLCharacterData2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLCData.js var require_XMLCData = __commonJS({ "node_modules/xmlbuilder/lib/XMLCData.js"(exports, module2) { (function() { var NodeType, XMLCData, XMLCharacterData, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLCharacterData = require_XMLCharacterData(); module2.exports = XMLCData = function(superClass) { extend(XMLCData2, superClass); function XMLCData2(parent, text) { XMLCData2.__super__.constructor.call(this, parent); if (text == null) { throw new Error("Missing CDATA text. " + this.debugInfo()); } this.name = "#cdata-section"; this.type = NodeType.CData; this.value = this.stringify.cdata(text); } XMLCData2.prototype.clone = function() { return Object.create(this); }; XMLCData2.prototype.toString = function(options) { return this.options.writer.cdata(this, this.options.writer.filterOptions(options)); }; return XMLCData2; }(XMLCharacterData); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLComment.js var require_XMLComment = __commonJS({ "node_modules/xmlbuilder/lib/XMLComment.js"(exports, module2) { (function() { var NodeType, XMLCharacterData, XMLComment, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLCharacterData = require_XMLCharacterData(); module2.exports = XMLComment = function(superClass) { extend(XMLComment2, superClass); function XMLComment2(parent, text) { XMLComment2.__super__.constructor.call(this, parent); if (text == null) { throw new Error("Missing comment text. " + this.debugInfo()); } this.name = "#comment"; this.type = NodeType.Comment; this.value = this.stringify.comment(text); } XMLComment2.prototype.clone = function() { return Object.create(this); }; XMLComment2.prototype.toString = function(options) { return this.options.writer.comment(this, this.options.writer.filterOptions(options)); }; return XMLComment2; }(XMLCharacterData); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDeclaration.js var require_XMLDeclaration = __commonJS({ "node_modules/xmlbuilder/lib/XMLDeclaration.js"(exports, module2) { (function() { var NodeType, XMLDeclaration, XMLNode, isObject, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; isObject = require_Utility().isObject; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDeclaration = function(superClass) { extend(XMLDeclaration2, superClass); function XMLDeclaration2(parent, version3, encoding, standalone) { var ref; XMLDeclaration2.__super__.constructor.call(this, parent); if (isObject(version3)) { ref = version3, version3 = ref.version, encoding = ref.encoding, standalone = ref.standalone; } if (!version3) { version3 = "1.0"; } this.type = NodeType.Declaration; this.version = this.stringify.xmlVersion(version3); if (encoding != null) { this.encoding = this.stringify.xmlEncoding(encoding); } if (standalone != null) { this.standalone = this.stringify.xmlStandalone(standalone); } } XMLDeclaration2.prototype.toString = function(options) { return this.options.writer.declaration(this, this.options.writer.filterOptions(options)); }; return XMLDeclaration2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDTDAttList.js var require_XMLDTDAttList = __commonJS({ "node_modules/xmlbuilder/lib/XMLDTDAttList.js"(exports, module2) { (function() { var NodeType, XMLDTDAttList, XMLNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDTDAttList = function(superClass) { extend(XMLDTDAttList2, superClass); function XMLDTDAttList2(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { XMLDTDAttList2.__super__.constructor.call(this, parent); if (elementName == null) { throw new Error("Missing DTD element name. " + this.debugInfo()); } if (attributeName == null) { throw new Error("Missing DTD attribute name. " + this.debugInfo(elementName)); } if (!attributeType) { throw new Error("Missing DTD attribute type. " + this.debugInfo(elementName)); } if (!defaultValueType) { throw new Error("Missing DTD attribute default. " + this.debugInfo(elementName)); } if (defaultValueType.indexOf("#") !== 0) { defaultValueType = "#" + defaultValueType; } if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. " + this.debugInfo(elementName)); } if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { throw new Error("Default value only applies to #FIXED or #DEFAULT. " + this.debugInfo(elementName)); } this.elementName = this.stringify.name(elementName); this.type = NodeType.AttributeDeclaration; this.attributeName = this.stringify.name(attributeName); this.attributeType = this.stringify.dtdAttType(attributeType); if (defaultValue) { this.defaultValue = this.stringify.dtdAttDefault(defaultValue); } this.defaultValueType = defaultValueType; } XMLDTDAttList2.prototype.toString = function(options) { return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options)); }; return XMLDTDAttList2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDTDEntity.js var require_XMLDTDEntity = __commonJS({ "node_modules/xmlbuilder/lib/XMLDTDEntity.js"(exports, module2) { (function() { var NodeType, XMLDTDEntity, XMLNode, isObject, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; isObject = require_Utility().isObject; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDTDEntity = function(superClass) { extend(XMLDTDEntity2, superClass); function XMLDTDEntity2(parent, pe, name, value) { XMLDTDEntity2.__super__.constructor.call(this, parent); if (name == null) { throw new Error("Missing DTD entity name. " + this.debugInfo(name)); } if (value == null) { throw new Error("Missing DTD entity value. " + this.debugInfo(name)); } this.pe = !!pe; this.name = this.stringify.name(name); this.type = NodeType.EntityDeclaration; if (!isObject(value)) { this.value = this.stringify.dtdEntityValue(value); this.internal = true; } else { if (!value.pubID && !value.sysID) { throw new Error("Public and/or system identifiers are required for an external entity. " + this.debugInfo(name)); } if (value.pubID && !value.sysID) { throw new Error("System identifier is required for a public external entity. " + this.debugInfo(name)); } this.internal = false; if (value.pubID != null) { this.pubID = this.stringify.dtdPubID(value.pubID); } if (value.sysID != null) { this.sysID = this.stringify.dtdSysID(value.sysID); } if (value.nData != null) { this.nData = this.stringify.dtdNData(value.nData); } if (this.pe && this.nData) { throw new Error("Notation declaration is not allowed in a parameter entity. " + this.debugInfo(name)); } } } Object.defineProperty(XMLDTDEntity2.prototype, "publicId", { get: function() { return this.pubID; } }); Object.defineProperty(XMLDTDEntity2.prototype, "systemId", { get: function() { return this.sysID; } }); Object.defineProperty(XMLDTDEntity2.prototype, "notationName", { get: function() { return this.nData || null; } }); Object.defineProperty(XMLDTDEntity2.prototype, "inputEncoding", { get: function() { return null; } }); Object.defineProperty(XMLDTDEntity2.prototype, "xmlEncoding", { get: function() { return null; } }); Object.defineProperty(XMLDTDEntity2.prototype, "xmlVersion", { get: function() { return null; } }); XMLDTDEntity2.prototype.toString = function(options) { return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options)); }; return XMLDTDEntity2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDTDElement.js var require_XMLDTDElement = __commonJS({ "node_modules/xmlbuilder/lib/XMLDTDElement.js"(exports, module2) { (function() { var NodeType, XMLDTDElement, XMLNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDTDElement = function(superClass) { extend(XMLDTDElement2, superClass); function XMLDTDElement2(parent, name, value) { XMLDTDElement2.__super__.constructor.call(this, parent); if (name == null) { throw new Error("Missing DTD element name. " + this.debugInfo()); } if (!value) { value = "(#PCDATA)"; } if (Array.isArray(value)) { value = "(" + value.join(",") + ")"; } this.name = this.stringify.name(name); this.type = NodeType.ElementDeclaration; this.value = this.stringify.dtdElementValue(value); } XMLDTDElement2.prototype.toString = function(options) { return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options)); }; return XMLDTDElement2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDTDNotation.js var require_XMLDTDNotation = __commonJS({ "node_modules/xmlbuilder/lib/XMLDTDNotation.js"(exports, module2) { (function() { var NodeType, XMLDTDNotation, XMLNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDTDNotation = function(superClass) { extend(XMLDTDNotation2, superClass); function XMLDTDNotation2(parent, name, value) { XMLDTDNotation2.__super__.constructor.call(this, parent); if (name == null) { throw new Error("Missing DTD notation name. " + this.debugInfo(name)); } if (!value.pubID && !value.sysID) { throw new Error("Public or system identifiers are required for an external entity. " + this.debugInfo(name)); } this.name = this.stringify.name(name); this.type = NodeType.NotationDeclaration; if (value.pubID != null) { this.pubID = this.stringify.dtdPubID(value.pubID); } if (value.sysID != null) { this.sysID = this.stringify.dtdSysID(value.sysID); } } Object.defineProperty(XMLDTDNotation2.prototype, "publicId", { get: function() { return this.pubID; } }); Object.defineProperty(XMLDTDNotation2.prototype, "systemId", { get: function() { return this.sysID; } }); XMLDTDNotation2.prototype.toString = function(options) { return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options)); }; return XMLDTDNotation2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDocType.js var require_XMLDocType = __commonJS({ "node_modules/xmlbuilder/lib/XMLDocType.js"(exports, module2) { (function() { var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; isObject = require_Utility().isObject; XMLNode = require_XMLNode(); NodeType = require_NodeType(); XMLDTDAttList = require_XMLDTDAttList(); XMLDTDEntity = require_XMLDTDEntity(); XMLDTDElement = require_XMLDTDElement(); XMLDTDNotation = require_XMLDTDNotation(); XMLNamedNodeMap = require_XMLNamedNodeMap(); module2.exports = XMLDocType = function(superClass) { extend(XMLDocType2, superClass); function XMLDocType2(parent, pubID, sysID) { var child, i, len, ref, ref1, ref2; XMLDocType2.__super__.constructor.call(this, parent); this.type = NodeType.DocType; if (parent.children) { ref = parent.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; if (child.type === NodeType.Element) { this.name = child.name; break; } } } this.documentObject = parent; if (isObject(pubID)) { ref1 = pubID, pubID = ref1.pubID, sysID = ref1.sysID; } if (sysID == null) { ref2 = [pubID, sysID], sysID = ref2[0], pubID = ref2[1]; } if (pubID != null) { this.pubID = this.stringify.dtdPubID(pubID); } if (sysID != null) { this.sysID = this.stringify.dtdSysID(sysID); } } Object.defineProperty(XMLDocType2.prototype, "entities", { get: function() { var child, i, len, nodes, ref; nodes = {}; ref = this.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; if (child.type === NodeType.EntityDeclaration && !child.pe) { nodes[child.name] = child; } } return new XMLNamedNodeMap(nodes); } }); Object.defineProperty(XMLDocType2.prototype, "notations", { get: function() { var child, i, len, nodes, ref; nodes = {}; ref = this.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; if (child.type === NodeType.NotationDeclaration) { nodes[child.name] = child; } } return new XMLNamedNodeMap(nodes); } }); Object.defineProperty(XMLDocType2.prototype, "publicId", { get: function() { return this.pubID; } }); Object.defineProperty(XMLDocType2.prototype, "systemId", { get: function() { return this.sysID; } }); Object.defineProperty(XMLDocType2.prototype, "internalSubset", { get: function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); } }); XMLDocType2.prototype.element = function(name, value) { var child; child = new XMLDTDElement(this, name, value); this.children.push(child); return this; }; XMLDocType2.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { var child; child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); this.children.push(child); return this; }; XMLDocType2.prototype.entity = function(name, value) { var child; child = new XMLDTDEntity(this, false, name, value); this.children.push(child); return this; }; XMLDocType2.prototype.pEntity = function(name, value) { var child; child = new XMLDTDEntity(this, true, name, value); this.children.push(child); return this; }; XMLDocType2.prototype.notation = function(name, value) { var child; child = new XMLDTDNotation(this, name, value); this.children.push(child); return this; }; XMLDocType2.prototype.toString = function(options) { return this.options.writer.docType(this, this.options.writer.filterOptions(options)); }; XMLDocType2.prototype.ele = function(name, value) { return this.element(name, value); }; XMLDocType2.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); }; XMLDocType2.prototype.ent = function(name, value) { return this.entity(name, value); }; XMLDocType2.prototype.pent = function(name, value) { return this.pEntity(name, value); }; XMLDocType2.prototype.not = function(name, value) { return this.notation(name, value); }; XMLDocType2.prototype.up = function() { return this.root() || this.documentObject; }; XMLDocType2.prototype.isEqualNode = function(node) { if (!XMLDocType2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { return false; } if (node.name !== this.name) { return false; } if (node.publicId !== this.publicId) { return false; } if (node.systemId !== this.systemId) { return false; } return true; }; return XMLDocType2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLRaw.js var require_XMLRaw = __commonJS({ "node_modules/xmlbuilder/lib/XMLRaw.js"(exports, module2) { (function() { var NodeType, XMLNode, XMLRaw, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLNode = require_XMLNode(); module2.exports = XMLRaw = function(superClass) { extend(XMLRaw2, superClass); function XMLRaw2(parent, text) { XMLRaw2.__super__.constructor.call(this, parent); if (text == null) { throw new Error("Missing raw text. " + this.debugInfo()); } this.type = NodeType.Raw; this.value = this.stringify.raw(text); } XMLRaw2.prototype.clone = function() { return Object.create(this); }; XMLRaw2.prototype.toString = function(options) { return this.options.writer.raw(this, this.options.writer.filterOptions(options)); }; return XMLRaw2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLText.js var require_XMLText = __commonJS({ "node_modules/xmlbuilder/lib/XMLText.js"(exports, module2) { (function() { var NodeType, XMLCharacterData, XMLText, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLCharacterData = require_XMLCharacterData(); module2.exports = XMLText = function(superClass) { extend(XMLText2, superClass); function XMLText2(parent, text) { XMLText2.__super__.constructor.call(this, parent); if (text == null) { throw new Error("Missing element text. " + this.debugInfo()); } this.name = "#text"; this.type = NodeType.Text; this.value = this.stringify.text(text); } Object.defineProperty(XMLText2.prototype, "isElementContentWhitespace", { get: function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); } }); Object.defineProperty(XMLText2.prototype, "wholeText", { get: function() { var next, prev, str; str = ""; prev = this.previousSibling; while (prev) { str = prev.data + str; prev = prev.previousSibling; } str += this.data; next = this.nextSibling; while (next) { str = str + next.data; next = next.nextSibling; } return str; } }); XMLText2.prototype.clone = function() { return Object.create(this); }; XMLText2.prototype.toString = function(options) { return this.options.writer.text(this, this.options.writer.filterOptions(options)); }; XMLText2.prototype.splitText = function(offset) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLText2.prototype.replaceWholeText = function(content) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; return XMLText2; }(XMLCharacterData); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLProcessingInstruction.js var require_XMLProcessingInstruction = __commonJS({ "node_modules/xmlbuilder/lib/XMLProcessingInstruction.js"(exports, module2) { (function() { var NodeType, XMLCharacterData, XMLProcessingInstruction, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLCharacterData = require_XMLCharacterData(); module2.exports = XMLProcessingInstruction = function(superClass) { extend(XMLProcessingInstruction2, superClass); function XMLProcessingInstruction2(parent, target, value) { XMLProcessingInstruction2.__super__.constructor.call(this, parent); if (target == null) { throw new Error("Missing instruction target. " + this.debugInfo()); } this.type = NodeType.ProcessingInstruction; this.target = this.stringify.insTarget(target); this.name = this.target; if (value) { this.value = this.stringify.insValue(value); } } XMLProcessingInstruction2.prototype.clone = function() { return Object.create(this); }; XMLProcessingInstruction2.prototype.toString = function(options) { return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options)); }; XMLProcessingInstruction2.prototype.isEqualNode = function(node) { if (!XMLProcessingInstruction2.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) { return false; } if (node.target !== this.target) { return false; } return true; }; return XMLProcessingInstruction2; }(XMLCharacterData); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDummy.js var require_XMLDummy = __commonJS({ "node_modules/xmlbuilder/lib/XMLDummy.js"(exports, module2) { (function() { var NodeType, XMLDummy, XMLNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = require_XMLNode(); NodeType = require_NodeType(); module2.exports = XMLDummy = function(superClass) { extend(XMLDummy2, superClass); function XMLDummy2(parent) { XMLDummy2.__super__.constructor.call(this, parent); this.type = NodeType.Dummy; } XMLDummy2.prototype.clone = function() { return Object.create(this); }; XMLDummy2.prototype.toString = function(options) { return ""; }; return XMLDummy2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLNodeList.js var require_XMLNodeList = __commonJS({ "node_modules/xmlbuilder/lib/XMLNodeList.js"(exports, module2) { (function() { var XMLNodeList; module2.exports = XMLNodeList = function() { function XMLNodeList2(nodes) { this.nodes = nodes; } Object.defineProperty(XMLNodeList2.prototype, "length", { get: function() { return this.nodes.length || 0; } }); XMLNodeList2.prototype.clone = function() { return this.nodes = null; }; XMLNodeList2.prototype.item = function(index) { return this.nodes[index] || null; }; return XMLNodeList2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/DocumentPosition.js var require_DocumentPosition = __commonJS({ "node_modules/xmlbuilder/lib/DocumentPosition.js"(exports, module2) { (function() { module2.exports = { Disconnected: 1, Preceding: 2, Following: 4, Contains: 8, ContainedBy: 16, ImplementationSpecific: 32 }; }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLNode.js var require_XMLNode = __commonJS({ "node_modules/xmlbuilder/lib/XMLNode.js"(exports, module2) { (function() { var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1, hasProp = {}.hasOwnProperty; ref1 = require_Utility(), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue; XMLElement = null; XMLCData = null; XMLComment = null; XMLDeclaration = null; XMLDocType = null; XMLRaw = null; XMLText = null; XMLProcessingInstruction = null; XMLDummy = null; NodeType = null; XMLNodeList = null; XMLNamedNodeMap = null; DocumentPosition = null; module2.exports = XMLNode = function() { function XMLNode2(parent1) { this.parent = parent1; if (this.parent) { this.options = this.parent.options; this.stringify = this.parent.stringify; } this.value = null; this.children = []; this.baseURI = null; if (!XMLElement) { XMLElement = require_XMLElement(); XMLCData = require_XMLCData(); XMLComment = require_XMLComment(); XMLDeclaration = require_XMLDeclaration(); XMLDocType = require_XMLDocType(); XMLRaw = require_XMLRaw(); XMLText = require_XMLText(); XMLProcessingInstruction = require_XMLProcessingInstruction(); XMLDummy = require_XMLDummy(); NodeType = require_NodeType(); XMLNodeList = require_XMLNodeList(); XMLNamedNodeMap = require_XMLNamedNodeMap(); DocumentPosition = require_DocumentPosition(); } } Object.defineProperty(XMLNode2.prototype, "nodeName", { get: function() { return this.name; } }); Object.defineProperty(XMLNode2.prototype, "nodeType", { get: function() { return this.type; } }); Object.defineProperty(XMLNode2.prototype, "nodeValue", { get: function() { return this.value; } }); Object.defineProperty(XMLNode2.prototype, "parentNode", { get: function() { return this.parent; } }); Object.defineProperty(XMLNode2.prototype, "childNodes", { get: function() { if (!this.childNodeList || !this.childNodeList.nodes) { this.childNodeList = new XMLNodeList(this.children); } return this.childNodeList; } }); Object.defineProperty(XMLNode2.prototype, "firstChild", { get: function() { return this.children[0] || null; } }); Object.defineProperty(XMLNode2.prototype, "lastChild", { get: function() { return this.children[this.children.length - 1] || null; } }); Object.defineProperty(XMLNode2.prototype, "previousSibling", { get: function() { var i; i = this.parent.children.indexOf(this); return this.parent.children[i - 1] || null; } }); Object.defineProperty(XMLNode2.prototype, "nextSibling", { get: function() { var i; i = this.parent.children.indexOf(this); return this.parent.children[i + 1] || null; } }); Object.defineProperty(XMLNode2.prototype, "ownerDocument", { get: function() { return this.document() || null; } }); Object.defineProperty(XMLNode2.prototype, "textContent", { get: function() { var child, j, len, ref2, str; if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) { str = ""; ref2 = this.children; for (j = 0, len = ref2.length; j < len; j++) { child = ref2[j]; if (child.textContent) { str += child.textContent; } } return str; } else { return null; } }, set: function(value) { throw new Error("This DOM method is not implemented." + this.debugInfo()); } }); XMLNode2.prototype.setParent = function(parent) { var child, j, len, ref2, results; this.parent = parent; if (parent) { this.options = parent.options; this.stringify = parent.stringify; } ref2 = this.children; results = []; for (j = 0, len = ref2.length; j < len; j++) { child = ref2[j]; results.push(child.setParent(this)); } return results; }; XMLNode2.prototype.element = function(name, attributes, text) { var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val; lastChild = null; if (attributes === null && text == null) { ref2 = [{}, null], attributes = ref2[0], text = ref2[1]; } if (attributes == null) { attributes = {}; } attributes = getValue(attributes); if (!isObject(attributes)) { ref3 = [attributes, text], text = ref3[0], attributes = ref3[1]; } if (name != null) { name = getValue(name); } if (Array.isArray(name)) { for (j = 0, len = name.length; j < len; j++) { item = name[j]; lastChild = this.element(item); } } else if (isFunction(name)) { lastChild = this.element(name.apply()); } else if (isObject(name)) { for (key in name) { if (!hasProp.call(name, key)) continue; val = name[key]; if (isFunction(val)) { val = val.apply(); } if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) { lastChild = this.dummy(); } else if (isObject(val) && isEmpty(val)) { lastChild = this.element(key); } else if (!this.options.keepNullNodes && val == null) { lastChild = this.dummy(); } else if (!this.options.separateArrayItems && Array.isArray(val)) { for (k = 0, len1 = val.length; k < len1; k++) { item = val[k]; childNode = {}; childNode[key] = item; lastChild = this.element(childNode); } } else if (isObject(val)) { if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) { lastChild = this.element(val); } else { lastChild = this.element(key); lastChild.element(val); } } else { lastChild = this.element(key, val); } } } else if (!this.options.keepNullNodes && text === null) { lastChild = this.dummy(); } else { if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { lastChild = this.text(text); } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { lastChild = this.cdata(text); } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { lastChild = this.comment(text); } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { lastChild = this.raw(text); } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); } else { lastChild = this.node(name, attributes, text); } } if (lastChild == null) { throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo()); } return lastChild; }; XMLNode2.prototype.insertBefore = function(name, attributes, text) { var child, i, newChild, refChild, removed; if (name != null ? name.type : void 0) { newChild = name; refChild = attributes; newChild.setParent(this); if (refChild) { i = children.indexOf(refChild); removed = children.splice(i); children.push(newChild); Array.prototype.push.apply(children, removed); } else { children.push(newChild); } return newChild; } else { if (this.isRoot) { throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); } i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i); child = this.parent.element(name, attributes, text); Array.prototype.push.apply(this.parent.children, removed); return child; } }; XMLNode2.prototype.insertAfter = function(name, attributes, text) { var child, i, removed; if (this.isRoot) { throw new Error("Cannot insert elements at root level. " + this.debugInfo(name)); } i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i + 1); child = this.parent.element(name, attributes, text); Array.prototype.push.apply(this.parent.children, removed); return child; }; XMLNode2.prototype.remove = function() { var i, ref2; if (this.isRoot) { throw new Error("Cannot remove the root element. " + this.debugInfo()); } i = this.parent.children.indexOf(this); [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2; return this.parent; }; XMLNode2.prototype.node = function(name, attributes, text) { var child, ref2; if (name != null) { name = getValue(name); } attributes || (attributes = {}); attributes = getValue(attributes); if (!isObject(attributes)) { ref2 = [attributes, text], text = ref2[0], attributes = ref2[1]; } child = new XMLElement(this, name, attributes); if (text != null) { child.text(text); } this.children.push(child); return child; }; XMLNode2.prototype.text = function(value) { var child; if (isObject(value)) { this.element(value); } child = new XMLText(this, value); this.children.push(child); return this; }; XMLNode2.prototype.cdata = function(value) { var child; child = new XMLCData(this, value); this.children.push(child); return this; }; XMLNode2.prototype.comment = function(value) { var child; child = new XMLComment(this, value); this.children.push(child); return this; }; XMLNode2.prototype.commentBefore = function(value) { var child, i, removed; i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i); child = this.parent.comment(value); Array.prototype.push.apply(this.parent.children, removed); return this; }; XMLNode2.prototype.commentAfter = function(value) { var child, i, removed; i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i + 1); child = this.parent.comment(value); Array.prototype.push.apply(this.parent.children, removed); return this; }; XMLNode2.prototype.raw = function(value) { var child; child = new XMLRaw(this, value); this.children.push(child); return this; }; XMLNode2.prototype.dummy = function() { var child; child = new XMLDummy(this); return child; }; XMLNode2.prototype.instruction = function(target, value) { var insTarget, insValue, instruction, j, len; if (target != null) { target = getValue(target); } if (value != null) { value = getValue(value); } if (Array.isArray(target)) { for (j = 0, len = target.length; j < len; j++) { insTarget = target[j]; this.instruction(insTarget); } } else if (isObject(target)) { for (insTarget in target) { if (!hasProp.call(target, insTarget)) continue; insValue = target[insTarget]; this.instruction(insTarget, insValue); } } else { if (isFunction(value)) { value = value.apply(); } instruction = new XMLProcessingInstruction(this, target, value); this.children.push(instruction); } return this; }; XMLNode2.prototype.instructionBefore = function(target, value) { var child, i, removed; i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i); child = this.parent.instruction(target, value); Array.prototype.push.apply(this.parent.children, removed); return this; }; XMLNode2.prototype.instructionAfter = function(target, value) { var child, i, removed; i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i + 1); child = this.parent.instruction(target, value); Array.prototype.push.apply(this.parent.children, removed); return this; }; XMLNode2.prototype.declaration = function(version3, encoding, standalone) { var doc, xmldec; doc = this.document(); xmldec = new XMLDeclaration(doc, version3, encoding, standalone); if (doc.children.length === 0) { doc.children.unshift(xmldec); } else if (doc.children[0].type === NodeType.Declaration) { doc.children[0] = xmldec; } else { doc.children.unshift(xmldec); } return doc.root() || doc; }; XMLNode2.prototype.dtd = function(pubID, sysID) { var child, doc, doctype, i, j, k, len, len1, ref2, ref3; doc = this.document(); doctype = new XMLDocType(doc, pubID, sysID); ref2 = doc.children; for (i = j = 0, len = ref2.length; j < len; i = ++j) { child = ref2[i]; if (child.type === NodeType.DocType) { doc.children[i] = doctype; return doctype; } } ref3 = doc.children; for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) { child = ref3[i]; if (child.isRoot) { doc.children.splice(i, 0, doctype); return doctype; } } doc.children.push(doctype); return doctype; }; XMLNode2.prototype.up = function() { if (this.isRoot) { throw new Error("The root node has no parent. Use doc() if you need to get the document object."); } return this.parent; }; XMLNode2.prototype.root = function() { var node; node = this; while (node) { if (node.type === NodeType.Document) { return node.rootObject; } else if (node.isRoot) { return node; } else { node = node.parent; } } }; XMLNode2.prototype.document = function() { var node; node = this; while (node) { if (node.type === NodeType.Document) { return node; } else { node = node.parent; } } }; XMLNode2.prototype.end = function(options) { return this.document().end(options); }; XMLNode2.prototype.prev = function() { var i; i = this.parent.children.indexOf(this); if (i < 1) { throw new Error("Already at the first node. " + this.debugInfo()); } return this.parent.children[i - 1]; }; XMLNode2.prototype.next = function() { var i; i = this.parent.children.indexOf(this); if (i === -1 || i === this.parent.children.length - 1) { throw new Error("Already at the last node. " + this.debugInfo()); } return this.parent.children[i + 1]; }; XMLNode2.prototype.importDocument = function(doc) { var clonedRoot; clonedRoot = doc.root().clone(); clonedRoot.parent = this; clonedRoot.isRoot = false; this.children.push(clonedRoot); return this; }; XMLNode2.prototype.debugInfo = function(name) { var ref2, ref3; name = name || this.name; if (name == null && !((ref2 = this.parent) != null ? ref2.name : void 0)) { return ""; } else if (name == null) { return "parent: <" + this.parent.name + ">"; } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) { return "node: <" + name + ">"; } else { return "node: <" + name + ">, parent: <" + this.parent.name + ">"; } }; XMLNode2.prototype.ele = function(name, attributes, text) { return this.element(name, attributes, text); }; XMLNode2.prototype.nod = function(name, attributes, text) { return this.node(name, attributes, text); }; XMLNode2.prototype.txt = function(value) { return this.text(value); }; XMLNode2.prototype.dat = function(value) { return this.cdata(value); }; XMLNode2.prototype.com = function(value) { return this.comment(value); }; XMLNode2.prototype.ins = function(target, value) { return this.instruction(target, value); }; XMLNode2.prototype.doc = function() { return this.document(); }; XMLNode2.prototype.dec = function(version3, encoding, standalone) { return this.declaration(version3, encoding, standalone); }; XMLNode2.prototype.e = function(name, attributes, text) { return this.element(name, attributes, text); }; XMLNode2.prototype.n = function(name, attributes, text) { return this.node(name, attributes, text); }; XMLNode2.prototype.t = function(value) { return this.text(value); }; XMLNode2.prototype.d = function(value) { return this.cdata(value); }; XMLNode2.prototype.c = function(value) { return this.comment(value); }; XMLNode2.prototype.r = function(value) { return this.raw(value); }; XMLNode2.prototype.i = function(target, value) { return this.instruction(target, value); }; XMLNode2.prototype.u = function() { return this.up(); }; XMLNode2.prototype.importXMLBuilder = function(doc) { return this.importDocument(doc); }; XMLNode2.prototype.replaceChild = function(newChild, oldChild) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.removeChild = function(oldChild) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.appendChild = function(newChild) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.hasChildNodes = function() { return this.children.length !== 0; }; XMLNode2.prototype.cloneNode = function(deep) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.normalize = function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.isSupported = function(feature, version3) { return true; }; XMLNode2.prototype.hasAttributes = function() { return this.attribs.length !== 0; }; XMLNode2.prototype.compareDocumentPosition = function(other) { var ref, res; ref = this; if (ref === other) { return 0; } else if (this.document() !== other.document()) { res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific; if (Math.random() < 0.5) { res |= DocumentPosition.Preceding; } else { res |= DocumentPosition.Following; } return res; } else if (ref.isAncestor(other)) { return DocumentPosition.Contains | DocumentPosition.Preceding; } else if (ref.isDescendant(other)) { return DocumentPosition.Contains | DocumentPosition.Following; } else if (ref.isPreceding(other)) { return DocumentPosition.Preceding; } else { return DocumentPosition.Following; } }; XMLNode2.prototype.isSameNode = function(other) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.lookupPrefix = function(namespaceURI) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.isDefaultNamespace = function(namespaceURI) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.lookupNamespaceURI = function(prefix) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.isEqualNode = function(node) { var i, j, ref2; if (node.nodeType !== this.nodeType) { return false; } if (node.children.length !== this.children.length) { return false; } for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) { if (!this.children[i].isEqualNode(node.children[i])) { return false; } } return true; }; XMLNode2.prototype.getFeature = function(feature, version3) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.setUserData = function(key, data, handler) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.getUserData = function(key) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLNode2.prototype.contains = function(other) { if (!other) { return false; } return other === this || this.isDescendant(other); }; XMLNode2.prototype.isDescendant = function(node) { var child, isDescendantChild, j, len, ref2; ref2 = this.children; for (j = 0, len = ref2.length; j < len; j++) { child = ref2[j]; if (node === child) { return true; } isDescendantChild = child.isDescendant(node); if (isDescendantChild) { return true; } } return false; }; XMLNode2.prototype.isAncestor = function(node) { return node.isDescendant(this); }; XMLNode2.prototype.isPreceding = function(node) { var nodePos, thisPos; nodePos = this.treePosition(node); thisPos = this.treePosition(this); if (nodePos === -1 || thisPos === -1) { return false; } else { return nodePos < thisPos; } }; XMLNode2.prototype.isFollowing = function(node) { var nodePos, thisPos; nodePos = this.treePosition(node); thisPos = this.treePosition(this); if (nodePos === -1 || thisPos === -1) { return false; } else { return nodePos > thisPos; } }; XMLNode2.prototype.treePosition = function(node) { var found, pos; pos = 0; found = false; this.foreachTreeNode(this.document(), function(childNode) { pos++; if (!found && childNode === node) { return found = true; } }); if (found) { return pos; } else { return -1; } }; XMLNode2.prototype.foreachTreeNode = function(node, func) { var child, j, len, ref2, res; node || (node = this.document()); ref2 = node.children; for (j = 0, len = ref2.length; j < len; j++) { child = ref2[j]; if (res = func(child)) { return res; } else { res = this.foreachTreeNode(child, func); if (res) { return res; } } } }; return XMLNode2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLStringifier.js var require_XMLStringifier = __commonJS({ "node_modules/xmlbuilder/lib/XMLStringifier.js"(exports, module2) { (function() { var XMLStringifier, bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; }, hasProp = {}.hasOwnProperty; module2.exports = XMLStringifier = function() { function XMLStringifier2(options) { this.assertLegalName = bind(this.assertLegalName, this); this.assertLegalChar = bind(this.assertLegalChar, this); var key, ref, value; options || (options = {}); this.options = options; if (!this.options.version) { this.options.version = "1.0"; } ref = options.stringify || {}; for (key in ref) { if (!hasProp.call(ref, key)) continue; value = ref[key]; this[key] = value; } } XMLStringifier2.prototype.name = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalName("" + val || ""); }; XMLStringifier2.prototype.text = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar(this.textEscape("" + val || "")); }; XMLStringifier2.prototype.cdata = function(val) { if (this.options.noValidation) { return val; } val = "" + val || ""; val = val.replace("]]>", "]]]]>"); return this.assertLegalChar(val); }; XMLStringifier2.prototype.comment = function(val) { if (this.options.noValidation) { return val; } val = "" + val || ""; if (val.match(/--/)) { throw new Error("Comment text cannot contain double-hypen: " + val); } return this.assertLegalChar(val); }; XMLStringifier2.prototype.raw = function(val) { if (this.options.noValidation) { return val; } return "" + val || ""; }; XMLStringifier2.prototype.attValue = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar(this.attEscape(val = "" + val || "")); }; XMLStringifier2.prototype.insTarget = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.insValue = function(val) { if (this.options.noValidation) { return val; } val = "" + val || ""; if (val.match(/\?>/)) { throw new Error("Invalid processing instruction value: " + val); } return this.assertLegalChar(val); }; XMLStringifier2.prototype.xmlVersion = function(val) { if (this.options.noValidation) { return val; } val = "" + val || ""; if (!val.match(/1\.[0-9]+/)) { throw new Error("Invalid version number: " + val); } return val; }; XMLStringifier2.prototype.xmlEncoding = function(val) { if (this.options.noValidation) { return val; } val = "" + val || ""; if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) { throw new Error("Invalid encoding: " + val); } return this.assertLegalChar(val); }; XMLStringifier2.prototype.xmlStandalone = function(val) { if (this.options.noValidation) { return val; } if (val) { return "yes"; } else { return "no"; } }; XMLStringifier2.prototype.dtdPubID = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.dtdSysID = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.dtdElementValue = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.dtdAttType = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.dtdAttDefault = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.dtdEntityValue = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.dtdNData = function(val) { if (this.options.noValidation) { return val; } return this.assertLegalChar("" + val || ""); }; XMLStringifier2.prototype.convertAttKey = "@"; XMLStringifier2.prototype.convertPIKey = "?"; XMLStringifier2.prototype.convertTextKey = "#text"; XMLStringifier2.prototype.convertCDataKey = "#cdata"; XMLStringifier2.prototype.convertCommentKey = "#comment"; XMLStringifier2.prototype.convertRawKey = "#raw"; XMLStringifier2.prototype.assertLegalChar = function(str) { var regex, res; if (this.options.noValidation) { return str; } regex = ""; if (this.options.version === "1.0") { regex = /[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; if (res = str.match(regex)) { throw new Error("Invalid character in string: " + str + " at index " + res.index); } } else if (this.options.version === "1.1") { regex = /[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; if (res = str.match(regex)) { throw new Error("Invalid character in string: " + str + " at index " + res.index); } } return str; }; XMLStringifier2.prototype.assertLegalName = function(str) { var regex; if (this.options.noValidation) { return str; } this.assertLegalChar(str); regex = /^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/; if (!str.match(regex)) { throw new Error("Invalid character in name"); } return str; }; XMLStringifier2.prototype.textEscape = function(str) { var ampregex; if (this.options.noValidation) { return str; } ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; return str.replace(ampregex, "&").replace(//g, ">").replace(/\r/g, " "); }; XMLStringifier2.prototype.attEscape = function(str) { var ampregex; if (this.options.noValidation) { return str; } ampregex = this.options.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; return str.replace(ampregex, "&").replace(/ 0) { return new Array(indentLevel).join(options.indent); } } return ""; }; XMLWriterBase2.prototype.endline = function(node, options, level) { if (!options.pretty || options.suppressPrettyCount) { return ""; } else { return options.newline; } }; XMLWriterBase2.prototype.attribute = function(att, options, level) { var r; this.openAttribute(att, options, level); r = " " + att.name + '="' + att.value + '"'; this.closeAttribute(att, options, level); return r; }; XMLWriterBase2.prototype.cdata = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + "" + this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.comment = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + "" + this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.declaration = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + ""; r += this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.docType = function(node, options, level) { var child, i, len, r, ref; level || (level = 0); this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level); r += " 0) { r += " ["; r += this.endline(node, options, level); options.state = WriterState.InsideTag; ref = node.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; r += this.writeChildNode(child, options, level + 1); } options.state = WriterState.CloseTag; r += "]"; } options.state = WriterState.CloseTag; r += options.spaceBeforeSlash + ">"; r += this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.element = function(node, options, level) { var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2; level || (level = 0); prettySuppressed = false; r = ""; this.openNode(node, options, level); options.state = WriterState.OpenTag; r += this.indent(node, options, level) + "<" + node.name; ref = node.attribs; for (name in ref) { if (!hasProp.call(ref, name)) continue; att = ref[name]; r += this.attribute(att, options, level); } childNodeCount = node.children.length; firstChildNode = childNodeCount === 0 ? null : node.children[0]; if (childNodeCount === 0 || node.children.every(function(e) { return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ""; })) { if (options.allowEmpty) { r += ">"; options.state = WriterState.CloseTag; r += "" + this.endline(node, options, level); } else { options.state = WriterState.CloseTag; r += options.spaceBeforeSlash + "/>" + this.endline(node, options, level); } } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && firstChildNode.value != null) { r += ">"; options.state = WriterState.InsideTag; options.suppressPrettyCount++; prettySuppressed = true; r += this.writeChildNode(firstChildNode, options, level + 1); options.suppressPrettyCount--; prettySuppressed = false; options.state = WriterState.CloseTag; r += "" + this.endline(node, options, level); } else { if (options.dontPrettyTextNodes) { ref1 = node.children; for (i = 0, len = ref1.length; i < len; i++) { child = ref1[i]; if ((child.type === NodeType.Text || child.type === NodeType.Raw) && child.value != null) { options.suppressPrettyCount++; prettySuppressed = true; break; } } } r += ">" + this.endline(node, options, level); options.state = WriterState.InsideTag; ref2 = node.children; for (j = 0, len1 = ref2.length; j < len1; j++) { child = ref2[j]; r += this.writeChildNode(child, options, level + 1); } options.state = WriterState.CloseTag; r += this.indent(node, options, level) + ""; if (prettySuppressed) { options.suppressPrettyCount--; } r += this.endline(node, options, level); options.state = WriterState.None; } this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.writeChildNode = function(node, options, level) { switch (node.type) { case NodeType.CData: return this.cdata(node, options, level); case NodeType.Comment: return this.comment(node, options, level); case NodeType.Element: return this.element(node, options, level); case NodeType.Raw: return this.raw(node, options, level); case NodeType.Text: return this.text(node, options, level); case NodeType.ProcessingInstruction: return this.processingInstruction(node, options, level); case NodeType.Dummy: return ""; case NodeType.Declaration: return this.declaration(node, options, level); case NodeType.DocType: return this.docType(node, options, level); case NodeType.AttributeDeclaration: return this.dtdAttList(node, options, level); case NodeType.ElementDeclaration: return this.dtdElement(node, options, level); case NodeType.EntityDeclaration: return this.dtdEntity(node, options, level); case NodeType.NotationDeclaration: return this.dtdNotation(node, options, level); default: throw new Error("Unknown XML node type: " + node.constructor.name); } }; XMLWriterBase2.prototype.processingInstruction = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + ""; r += this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.raw = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level); options.state = WriterState.InsideTag; r += node.value; options.state = WriterState.CloseTag; r += this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.text = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level); options.state = WriterState.InsideTag; r += node.value; options.state = WriterState.CloseTag; r += this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.dtdAttList = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + "" + this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.dtdElement = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + "" + this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.dtdEntity = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + "" + this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.dtdNotation = function(node, options, level) { var r; this.openNode(node, options, level); options.state = WriterState.OpenTag; r = this.indent(node, options, level) + "" + this.endline(node, options, level); options.state = WriterState.None; this.closeNode(node, options, level); return r; }; XMLWriterBase2.prototype.openNode = function(node, options, level) { }; XMLWriterBase2.prototype.closeNode = function(node, options, level) { }; XMLWriterBase2.prototype.openAttribute = function(att, options, level) { }; XMLWriterBase2.prototype.closeAttribute = function(att, options, level) { }; return XMLWriterBase2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLStringWriter.js var require_XMLStringWriter = __commonJS({ "node_modules/xmlbuilder/lib/XMLStringWriter.js"(exports, module2) { (function() { var XMLStringWriter, XMLWriterBase, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLWriterBase = require_XMLWriterBase(); module2.exports = XMLStringWriter = function(superClass) { extend(XMLStringWriter2, superClass); function XMLStringWriter2(options) { XMLStringWriter2.__super__.constructor.call(this, options); } XMLStringWriter2.prototype.document = function(doc, options) { var child, i, len, r, ref; options = this.filterOptions(options); r = ""; ref = doc.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; r += this.writeChildNode(child, options, 0); } if (options.pretty && r.slice(-options.newline.length) === options.newline) { r = r.slice(0, -options.newline.length); } return r; }; return XMLStringWriter2; }(XMLWriterBase); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDocument.js var require_XMLDocument = __commonJS({ "node_modules/xmlbuilder/lib/XMLDocument.js"(exports, module2) { (function() { var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; isPlainObject = require_Utility().isPlainObject; XMLDOMImplementation = require_XMLDOMImplementation(); XMLDOMConfiguration = require_XMLDOMConfiguration(); XMLNode = require_XMLNode(); NodeType = require_NodeType(); XMLStringifier = require_XMLStringifier(); XMLStringWriter = require_XMLStringWriter(); module2.exports = XMLDocument = function(superClass) { extend(XMLDocument2, superClass); function XMLDocument2(options) { XMLDocument2.__super__.constructor.call(this, null); this.name = "#document"; this.type = NodeType.Document; this.documentURI = null; this.domConfig = new XMLDOMConfiguration(); options || (options = {}); if (!options.writer) { options.writer = new XMLStringWriter(); } this.options = options; this.stringify = new XMLStringifier(options); } Object.defineProperty(XMLDocument2.prototype, "implementation", { value: new XMLDOMImplementation() }); Object.defineProperty(XMLDocument2.prototype, "doctype", { get: function() { var child, i, len, ref; ref = this.children; for (i = 0, len = ref.length; i < len; i++) { child = ref[i]; if (child.type === NodeType.DocType) { return child; } } return null; } }); Object.defineProperty(XMLDocument2.prototype, "documentElement", { get: function() { return this.rootObject || null; } }); Object.defineProperty(XMLDocument2.prototype, "inputEncoding", { get: function() { return null; } }); Object.defineProperty(XMLDocument2.prototype, "strictErrorChecking", { get: function() { return false; } }); Object.defineProperty(XMLDocument2.prototype, "xmlEncoding", { get: function() { if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { return this.children[0].encoding; } else { return null; } } }); Object.defineProperty(XMLDocument2.prototype, "xmlStandalone", { get: function() { if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { return this.children[0].standalone === "yes"; } else { return false; } } }); Object.defineProperty(XMLDocument2.prototype, "xmlVersion", { get: function() { if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) { return this.children[0].version; } else { return "1.0"; } } }); Object.defineProperty(XMLDocument2.prototype, "URL", { get: function() { return this.documentURI; } }); Object.defineProperty(XMLDocument2.prototype, "origin", { get: function() { return null; } }); Object.defineProperty(XMLDocument2.prototype, "compatMode", { get: function() { return null; } }); Object.defineProperty(XMLDocument2.prototype, "characterSet", { get: function() { return null; } }); Object.defineProperty(XMLDocument2.prototype, "contentType", { get: function() { return null; } }); XMLDocument2.prototype.end = function(writer) { var writerOptions; writerOptions = {}; if (!writer) { writer = this.options.writer; } else if (isPlainObject(writer)) { writerOptions = writer; writer = this.options.writer; } return writer.document(this, writer.filterOptions(writerOptions)); }; XMLDocument2.prototype.toString = function(options) { return this.options.writer.document(this, this.options.writer.filterOptions(options)); }; XMLDocument2.prototype.createElement = function(tagName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createDocumentFragment = function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createTextNode = function(data) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createComment = function(data) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createCDATASection = function(data) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createProcessingInstruction = function(target, data) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createAttribute = function(name) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createEntityReference = function(name) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.getElementsByTagName = function(tagname) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.importNode = function(importedNode, deep) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createElementNS = function(namespaceURI, qualifiedName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createAttributeNS = function(namespaceURI, qualifiedName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.getElementsByTagNameNS = function(namespaceURI, localName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.getElementById = function(elementId) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.adoptNode = function(source) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.normalizeDocument = function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.renameNode = function(node, namespaceURI, qualifiedName) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.getElementsByClassName = function(classNames) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createEvent = function(eventInterface) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createRange = function() { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createNodeIterator = function(root, whatToShow, filter) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; XMLDocument2.prototype.createTreeWalker = function(root, whatToShow, filter) { throw new Error("This DOM method is not implemented." + this.debugInfo()); }; return XMLDocument2; }(XMLNode); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLDocumentCB.js var require_XMLDocumentCB = __commonJS({ "node_modules/xmlbuilder/lib/XMLDocumentCB.js"(exports, module2) { (function() { var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, ref, hasProp = {}.hasOwnProperty; ref = require_Utility(), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject, getValue = ref.getValue; NodeType = require_NodeType(); XMLDocument = require_XMLDocument(); XMLElement = require_XMLElement(); XMLCData = require_XMLCData(); XMLComment = require_XMLComment(); XMLRaw = require_XMLRaw(); XMLText = require_XMLText(); XMLProcessingInstruction = require_XMLProcessingInstruction(); XMLDeclaration = require_XMLDeclaration(); XMLDocType = require_XMLDocType(); XMLDTDAttList = require_XMLDTDAttList(); XMLDTDEntity = require_XMLDTDEntity(); XMLDTDElement = require_XMLDTDElement(); XMLDTDNotation = require_XMLDTDNotation(); XMLAttribute = require_XMLAttribute(); XMLStringifier = require_XMLStringifier(); XMLStringWriter = require_XMLStringWriter(); WriterState = require_WriterState(); module2.exports = XMLDocumentCB = function() { function XMLDocumentCB2(options, onData, onEnd) { var writerOptions; this.name = "?xml"; this.type = NodeType.Document; options || (options = {}); writerOptions = {}; if (!options.writer) { options.writer = new XMLStringWriter(); } else if (isPlainObject(options.writer)) { writerOptions = options.writer; options.writer = new XMLStringWriter(); } this.options = options; this.writer = options.writer; this.writerOptions = this.writer.filterOptions(writerOptions); this.stringify = new XMLStringifier(options); this.onDataCallback = onData || function() { }; this.onEndCallback = onEnd || function() { }; this.currentNode = null; this.currentLevel = -1; this.openTags = {}; this.documentStarted = false; this.documentCompleted = false; this.root = null; } XMLDocumentCB2.prototype.createChildNode = function(node) { var att, attName, attributes, child, i, len, ref1, ref2; switch (node.type) { case NodeType.CData: this.cdata(node.value); break; case NodeType.Comment: this.comment(node.value); break; case NodeType.Element: attributes = {}; ref1 = node.attribs; for (attName in ref1) { if (!hasProp.call(ref1, attName)) continue; att = ref1[attName]; attributes[attName] = att.value; } this.node(node.name, attributes); break; case NodeType.Dummy: this.dummy(); break; case NodeType.Raw: this.raw(node.value); break; case NodeType.Text: this.text(node.value); break; case NodeType.ProcessingInstruction: this.instruction(node.target, node.value); break; default: throw new Error("This XML node type is not supported in a JS object: " + node.constructor.name); } ref2 = node.children; for (i = 0, len = ref2.length; i < len; i++) { child = ref2[i]; this.createChildNode(child); if (child.type === NodeType.Element) { this.up(); } } return this; }; XMLDocumentCB2.prototype.dummy = function() { return this; }; XMLDocumentCB2.prototype.node = function(name, attributes, text) { var ref1; if (name == null) { throw new Error("Missing node name."); } if (this.root && this.currentLevel === -1) { throw new Error("Document can only have one root node. " + this.debugInfo(name)); } this.openCurrent(); name = getValue(name); if (attributes == null) { attributes = {}; } attributes = getValue(attributes); if (!isObject(attributes)) { ref1 = [attributes, text], text = ref1[0], attributes = ref1[1]; } this.currentNode = new XMLElement(this, name, attributes); this.currentNode.children = false; this.currentLevel++; this.openTags[this.currentLevel] = this.currentNode; if (text != null) { this.text(text); } return this; }; XMLDocumentCB2.prototype.element = function(name, attributes, text) { var child, i, len, oldValidationFlag, ref1, root; if (this.currentNode && this.currentNode.type === NodeType.DocType) { this.dtdElement.apply(this, arguments); } else { if (Array.isArray(name) || isObject(name) || isFunction(name)) { oldValidationFlag = this.options.noValidation; this.options.noValidation = true; root = new XMLDocument(this.options).element("TEMP_ROOT"); root.element(name); this.options.noValidation = oldValidationFlag; ref1 = root.children; for (i = 0, len = ref1.length; i < len; i++) { child = ref1[i]; this.createChildNode(child); if (child.type === NodeType.Element) { this.up(); } } } else { this.node(name, attributes, text); } } return this; }; XMLDocumentCB2.prototype.attribute = function(name, value) { var attName, attValue; if (!this.currentNode || this.currentNode.children) { throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(name)); } if (name != null) { name = getValue(name); } if (isObject(name)) { for (attName in name) { if (!hasProp.call(name, attName)) continue; attValue = name[attName]; this.attribute(attName, attValue); } } else { if (isFunction(value)) { value = value.apply(); } if (this.options.keepNullAttributes && value == null) { this.currentNode.attribs[name] = new XMLAttribute(this, name, ""); } else if (value != null) { this.currentNode.attribs[name] = new XMLAttribute(this, name, value); } } return this; }; XMLDocumentCB2.prototype.text = function(value) { var node; this.openCurrent(); node = new XMLText(this, value); this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.cdata = function(value) { var node; this.openCurrent(); node = new XMLCData(this, value); this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.comment = function(value) { var node; this.openCurrent(); node = new XMLComment(this, value); this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.raw = function(value) { var node; this.openCurrent(); node = new XMLRaw(this, value); this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.instruction = function(target, value) { var i, insTarget, insValue, len, node; this.openCurrent(); if (target != null) { target = getValue(target); } if (value != null) { value = getValue(value); } if (Array.isArray(target)) { for (i = 0, len = target.length; i < len; i++) { insTarget = target[i]; this.instruction(insTarget); } } else if (isObject(target)) { for (insTarget in target) { if (!hasProp.call(target, insTarget)) continue; insValue = target[insTarget]; this.instruction(insTarget, insValue); } } else { if (isFunction(value)) { value = value.apply(); } node = new XMLProcessingInstruction(this, target, value); this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); } return this; }; XMLDocumentCB2.prototype.declaration = function(version3, encoding, standalone) { var node; this.openCurrent(); if (this.documentStarted) { throw new Error("declaration() must be the first node."); } node = new XMLDeclaration(this, version3, encoding, standalone); this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.doctype = function(root, pubID, sysID) { this.openCurrent(); if (root == null) { throw new Error("Missing root node name."); } if (this.root) { throw new Error("dtd() must come before the root node."); } this.currentNode = new XMLDocType(this, pubID, sysID); this.currentNode.rootNodeName = root; this.currentNode.children = false; this.currentLevel++; this.openTags[this.currentLevel] = this.currentNode; return this; }; XMLDocumentCB2.prototype.dtdElement = function(name, value) { var node; this.openCurrent(); node = new XMLDTDElement(this, name, value); this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { var node; this.openCurrent(); node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.entity = function(name, value) { var node; this.openCurrent(); node = new XMLDTDEntity(this, false, name, value); this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.pEntity = function(name, value) { var node; this.openCurrent(); node = new XMLDTDEntity(this, true, name, value); this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.notation = function(name, value) { var node; this.openCurrent(); node = new XMLDTDNotation(this, name, value); this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1); return this; }; XMLDocumentCB2.prototype.up = function() { if (this.currentLevel < 0) { throw new Error("The document node has no parent."); } if (this.currentNode) { if (this.currentNode.children) { this.closeNode(this.currentNode); } else { this.openNode(this.currentNode); } this.currentNode = null; } else { this.closeNode(this.openTags[this.currentLevel]); } delete this.openTags[this.currentLevel]; this.currentLevel--; return this; }; XMLDocumentCB2.prototype.end = function() { while (this.currentLevel >= 0) { this.up(); } return this.onEnd(); }; XMLDocumentCB2.prototype.openCurrent = function() { if (this.currentNode) { this.currentNode.children = true; return this.openNode(this.currentNode); } }; XMLDocumentCB2.prototype.openNode = function(node) { var att, chunk, name, ref1; if (!node.isOpen) { if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) { this.root = node; } chunk = ""; if (node.type === NodeType.Element) { this.writerOptions.state = WriterState.OpenTag; chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + "<" + node.name; ref1 = node.attribs; for (name in ref1) { if (!hasProp.call(ref1, name)) continue; att = ref1[name]; chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel); } chunk += (node.children ? ">" : "/>") + this.writer.endline(node, this.writerOptions, this.currentLevel); this.writerOptions.state = WriterState.InsideTag; } else { this.writerOptions.state = WriterState.OpenTag; chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ""; } chunk += this.writer.endline(node, this.writerOptions, this.currentLevel); } this.onData(chunk, this.currentLevel); return node.isOpen = true; } }; XMLDocumentCB2.prototype.closeNode = function(node) { var chunk; if (!node.isClosed) { chunk = ""; this.writerOptions.state = WriterState.CloseTag; if (node.type === NodeType.Element) { chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + "" + this.writer.endline(node, this.writerOptions, this.currentLevel); } else { chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + "]>" + this.writer.endline(node, this.writerOptions, this.currentLevel); } this.writerOptions.state = WriterState.None; this.onData(chunk, this.currentLevel); return node.isClosed = true; } }; XMLDocumentCB2.prototype.onData = function(chunk, level) { this.documentStarted = true; return this.onDataCallback(chunk, level + 1); }; XMLDocumentCB2.prototype.onEnd = function() { this.documentCompleted = true; return this.onEndCallback(); }; XMLDocumentCB2.prototype.debugInfo = function(name) { if (name == null) { return ""; } else { return "node: <" + name + ">"; } }; XMLDocumentCB2.prototype.ele = function() { return this.element.apply(this, arguments); }; XMLDocumentCB2.prototype.nod = function(name, attributes, text) { return this.node(name, attributes, text); }; XMLDocumentCB2.prototype.txt = function(value) { return this.text(value); }; XMLDocumentCB2.prototype.dat = function(value) { return this.cdata(value); }; XMLDocumentCB2.prototype.com = function(value) { return this.comment(value); }; XMLDocumentCB2.prototype.ins = function(target, value) { return this.instruction(target, value); }; XMLDocumentCB2.prototype.dec = function(version3, encoding, standalone) { return this.declaration(version3, encoding, standalone); }; XMLDocumentCB2.prototype.dtd = function(root, pubID, sysID) { return this.doctype(root, pubID, sysID); }; XMLDocumentCB2.prototype.e = function(name, attributes, text) { return this.element(name, attributes, text); }; XMLDocumentCB2.prototype.n = function(name, attributes, text) { return this.node(name, attributes, text); }; XMLDocumentCB2.prototype.t = function(value) { return this.text(value); }; XMLDocumentCB2.prototype.d = function(value) { return this.cdata(value); }; XMLDocumentCB2.prototype.c = function(value) { return this.comment(value); }; XMLDocumentCB2.prototype.r = function(value) { return this.raw(value); }; XMLDocumentCB2.prototype.i = function(target, value) { return this.instruction(target, value); }; XMLDocumentCB2.prototype.att = function() { if (this.currentNode && this.currentNode.type === NodeType.DocType) { return this.attList.apply(this, arguments); } else { return this.attribute.apply(this, arguments); } }; XMLDocumentCB2.prototype.a = function() { if (this.currentNode && this.currentNode.type === NodeType.DocType) { return this.attList.apply(this, arguments); } else { return this.attribute.apply(this, arguments); } }; XMLDocumentCB2.prototype.ent = function(name, value) { return this.entity(name, value); }; XMLDocumentCB2.prototype.pent = function(name, value) { return this.pEntity(name, value); }; XMLDocumentCB2.prototype.not = function(name, value) { return this.notation(name, value); }; return XMLDocumentCB2; }(); }).call(exports); } }); // node_modules/xmlbuilder/lib/XMLStreamWriter.js var require_XMLStreamWriter = __commonJS({ "node_modules/xmlbuilder/lib/XMLStreamWriter.js"(exports, module2) { (function() { var NodeType, WriterState, XMLStreamWriter, XMLWriterBase, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; NodeType = require_NodeType(); XMLWriterBase = require_XMLWriterBase(); WriterState = require_WriterState(); module2.exports = XMLStreamWriter = function(superClass) { extend(XMLStreamWriter2, superClass); function XMLStreamWriter2(stream, options) { this.stream = stream; XMLStreamWriter2.__super__.constructor.call(this, options); } XMLStreamWriter2.prototype.endline = function(node, options, level) { if (node.isLastRootNode && options.state === WriterState.CloseTag) { return ""; } else { return XMLStreamWriter2.__super__.endline.call(this, node, options, level); } }; XMLStreamWriter2.prototype.document = function(doc, options) { var child, i, j, k, len, len1, ref, ref1, results; ref = doc.children; for (i = j = 0, len = ref.length; j < len; i = ++j) { child = ref[i]; child.isLastRootNode = i === doc.children.length - 1; } options = this.filterOptions(options); ref1 = doc.children; results = []; for (k = 0, len1 = ref1.length; k < len1; k++) { child = ref1[k]; results.push(this.writeChildNode(child, options, 0)); } return results; }; XMLStreamWriter2.prototype.attribute = function(att, options, level) { return this.stream.write(XMLStreamWriter2.__super__.attribute.call(this, att, options, level)); }; XMLStreamWriter2.prototype.cdata = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.cdata.call(this, node, options, level)); }; XMLStreamWriter2.prototype.comment = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.comment.call(this, node, options, level)); }; XMLStreamWriter2.prototype.declaration = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.declaration.call(this, node, options, level)); }; XMLStreamWriter2.prototype.docType = function(node, options, level) { var child, j, len, ref; level || (level = 0); this.openNode(node, options, level); options.state = WriterState.OpenTag; this.stream.write(this.indent(node, options, level)); this.stream.write(" 0) { this.stream.write(" ["); this.stream.write(this.endline(node, options, level)); options.state = WriterState.InsideTag; ref = node.children; for (j = 0, len = ref.length; j < len; j++) { child = ref[j]; this.writeChildNode(child, options, level + 1); } options.state = WriterState.CloseTag; this.stream.write("]"); } options.state = WriterState.CloseTag; this.stream.write(options.spaceBeforeSlash + ">"); this.stream.write(this.endline(node, options, level)); options.state = WriterState.None; return this.closeNode(node, options, level); }; XMLStreamWriter2.prototype.element = function(node, options, level) { var att, child, childNodeCount, firstChildNode, j, len, name, prettySuppressed, ref, ref1; level || (level = 0); this.openNode(node, options, level); options.state = WriterState.OpenTag; this.stream.write(this.indent(node, options, level) + "<" + node.name); ref = node.attribs; for (name in ref) { if (!hasProp.call(ref, name)) continue; att = ref[name]; this.attribute(att, options, level); } childNodeCount = node.children.length; firstChildNode = childNodeCount === 0 ? null : node.children[0]; if (childNodeCount === 0 || node.children.every(function(e) { return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === ""; })) { if (options.allowEmpty) { this.stream.write(">"); options.state = WriterState.CloseTag; this.stream.write(""); } else { options.state = WriterState.CloseTag; this.stream.write(options.spaceBeforeSlash + "/>"); } } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && firstChildNode.value != null) { this.stream.write(">"); options.state = WriterState.InsideTag; options.suppressPrettyCount++; prettySuppressed = true; this.writeChildNode(firstChildNode, options, level + 1); options.suppressPrettyCount--; prettySuppressed = false; options.state = WriterState.CloseTag; this.stream.write(""); } else { this.stream.write(">" + this.endline(node, options, level)); options.state = WriterState.InsideTag; ref1 = node.children; for (j = 0, len = ref1.length; j < len; j++) { child = ref1[j]; this.writeChildNode(child, options, level + 1); } options.state = WriterState.CloseTag; this.stream.write(this.indent(node, options, level) + ""); } this.stream.write(this.endline(node, options, level)); options.state = WriterState.None; return this.closeNode(node, options, level); }; XMLStreamWriter2.prototype.processingInstruction = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.processingInstruction.call(this, node, options, level)); }; XMLStreamWriter2.prototype.raw = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.raw.call(this, node, options, level)); }; XMLStreamWriter2.prototype.text = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.text.call(this, node, options, level)); }; XMLStreamWriter2.prototype.dtdAttList = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.dtdAttList.call(this, node, options, level)); }; XMLStreamWriter2.prototype.dtdElement = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.dtdElement.call(this, node, options, level)); }; XMLStreamWriter2.prototype.dtdEntity = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.dtdEntity.call(this, node, options, level)); }; XMLStreamWriter2.prototype.dtdNotation = function(node, options, level) { return this.stream.write(XMLStreamWriter2.__super__.dtdNotation.call(this, node, options, level)); }; return XMLStreamWriter2; }(XMLWriterBase); }).call(exports); } }); // node_modules/xmlbuilder/lib/index.js var require_lib2 = __commonJS({ "node_modules/xmlbuilder/lib/index.js"(exports, module2) { (function() { var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref; ref = require_Utility(), assign = ref.assign, isFunction = ref.isFunction; XMLDOMImplementation = require_XMLDOMImplementation(); XMLDocument = require_XMLDocument(); XMLDocumentCB = require_XMLDocumentCB(); XMLStringWriter = require_XMLStringWriter(); XMLStreamWriter = require_XMLStreamWriter(); NodeType = require_NodeType(); WriterState = require_WriterState(); module2.exports.create = function(name, xmldec, doctype, options) { var doc, root; if (name == null) { throw new Error("Root element needs a name."); } options = assign({}, xmldec, doctype, options); doc = new XMLDocument(options); root = doc.element(name); if (!options.headless) { doc.declaration(options); if (options.pubID != null || options.sysID != null) { doc.dtd(options); } } return root; }; module2.exports.begin = function(options, onData, onEnd) { var ref1; if (isFunction(options)) { ref1 = [options, onData], onData = ref1[0], onEnd = ref1[1]; options = {}; } if (onData) { return new XMLDocumentCB(options, onData, onEnd); } else { return new XMLDocument(options); } }; module2.exports.stringWriter = function(options) { return new XMLStringWriter(options); }; module2.exports.streamWriter = function(stream, options) { return new XMLStreamWriter(stream, options); }; module2.exports.implementation = new XMLDOMImplementation(); module2.exports.nodeType = NodeType; module2.exports.writerState = WriterState; }).call(exports); } }); // node_modules/xml2js/lib/builder.js var require_builder = __commonJS({ "node_modules/xml2js/lib/builder.js"(exports) { (function() { "use strict"; var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA, hasProp = {}.hasOwnProperty; builder = require_lib2(); defaults = require_defaults().defaults; requiresCDATA = function(entry) { return typeof entry === "string" && (entry.indexOf("&") >= 0 || entry.indexOf(">") >= 0 || entry.indexOf("<") >= 0); }; wrapCDATA = function(entry) { return ""; }; escapeCDATA = function(entry) { return entry.replace("]]>", "]]]]>"); }; exports.Builder = function() { function Builder(opts) { var key, ref, value; this.options = {}; ref = defaults["0.2"]; for (key in ref) { if (!hasProp.call(ref, key)) continue; value = ref[key]; this.options[key] = value; } for (key in opts) { if (!hasProp.call(opts, key)) continue; value = opts[key]; this.options[key] = value; } } Builder.prototype.buildObject = function(rootObj) { var attrkey, charkey, render, rootElement, rootName; attrkey = this.options.attrkey; charkey = this.options.charkey; if (Object.keys(rootObj).length === 1 && this.options.rootName === defaults["0.2"].rootName) { rootName = Object.keys(rootObj)[0]; rootObj = rootObj[rootName]; } else { rootName = this.options.rootName; } render = function(_this) { return function(element, obj) { var attr, child, entry, index, key, value; if (typeof obj !== "object") { if (_this.options.cdata && requiresCDATA(obj)) { element.raw(wrapCDATA(obj)); } else { element.txt(obj); } } else if (Array.isArray(obj)) { for (index in obj) { if (!hasProp.call(obj, index)) continue; child = obj[index]; for (key in child) { entry = child[key]; element = render(element.ele(key), entry).up(); } } } else { for (key in obj) { if (!hasProp.call(obj, key)) continue; child = obj[key]; if (key === attrkey) { if (typeof child === "object") { for (attr in child) { value = child[attr]; element = element.att(attr, value); } } } else if (key === charkey) { if (_this.options.cdata && requiresCDATA(child)) { element = element.raw(wrapCDATA(child)); } else { element = element.txt(child); } } else if (Array.isArray(child)) { for (index in child) { if (!hasProp.call(child, index)) continue; entry = child[index]; if (typeof entry === "string") { if (_this.options.cdata && requiresCDATA(entry)) { element = element.ele(key).raw(wrapCDATA(entry)).up(); } else { element = element.ele(key, entry).up(); } } else { element = render(element.ele(key), entry).up(); } } } else if (typeof child === "object") { element = render(element.ele(key), child).up(); } else { if (typeof child === "string" && _this.options.cdata && requiresCDATA(child)) { element = element.ele(key).raw(wrapCDATA(child)).up(); } else { if (child == null) { child = ""; } element = element.ele(key, child.toString()).up(); } } } } return element; }; }(this); rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, { headless: this.options.headless, allowSurrogateChars: this.options.allowSurrogateChars }); return render(rootElement, rootObj).end(this.options.renderOpts); }; return Builder; }(); }).call(exports); } }); // node_modules/sax/lib/sax.js var require_sax = __commonJS({ "node_modules/sax/lib/sax.js"(exports) { (function(sax) { sax.parser = function(strict, opt) { return new SAXParser(strict, opt); }; sax.SAXParser = SAXParser; sax.SAXStream = SAXStream; sax.createStream = createStream; sax.MAX_BUFFER_LENGTH = 64 * 1024; var buffers = [ "comment", "sgmlDecl", "textNode", "tagName", "doctype", "procInstName", "procInstBody", "entity", "attribName", "attribValue", "cdata", "script" ]; sax.EVENTS = [ "text", "processinginstruction", "sgmldeclaration", "doctype", "comment", "opentagstart", "attribute", "opentag", "closetag", "opencdata", "cdata", "closecdata", "error", "end", "ready", "script", "opennamespace", "closenamespace" ]; function SAXParser(strict, opt) { if (!(this instanceof SAXParser)) { return new SAXParser(strict, opt); } var parser = this; clearBuffers(parser); parser.q = parser.c = ""; parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH; parser.opt = opt || {}; parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags; parser.looseCase = parser.opt.lowercase ? "toLowerCase" : "toUpperCase"; parser.tags = []; parser.closed = parser.closedRoot = parser.sawRoot = false; parser.tag = parser.error = null; parser.strict = !!strict; parser.noscript = !!(strict || parser.opt.noscript); parser.state = S.BEGIN; parser.strictEntities = parser.opt.strictEntities; parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES); parser.attribList = []; if (parser.opt.xmlns) { parser.ns = Object.create(rootNS); } parser.trackPosition = parser.opt.position !== false; if (parser.trackPosition) { parser.position = parser.line = parser.column = 0; } emit(parser, "onready"); } if (!Object.create) { Object.create = function(o) { function F() { } F.prototype = o; var newf = new F(); return newf; }; } if (!Object.keys) { Object.keys = function(o) { var a = []; for (var i in o) if (o.hasOwnProperty(i)) a.push(i); return a; }; } function checkBufferLength(parser) { var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10); var maxActual = 0; for (var i = 0, l = buffers.length; i < l; i++) { var len = parser[buffers[i]].length; if (len > maxAllowed) { switch (buffers[i]) { case "textNode": closeText(parser); break; case "cdata": emitNode(parser, "oncdata", parser.cdata); parser.cdata = ""; break; case "script": emitNode(parser, "onscript", parser.script); parser.script = ""; break; default: error(parser, "Max buffer length exceeded: " + buffers[i]); } } maxActual = Math.max(maxActual, len); } var m = sax.MAX_BUFFER_LENGTH - maxActual; parser.bufferCheckPosition = m + parser.position; } function clearBuffers(parser) { for (var i = 0, l = buffers.length; i < l; i++) { parser[buffers[i]] = ""; } } function flushBuffers(parser) { closeText(parser); if (parser.cdata !== "") { emitNode(parser, "oncdata", parser.cdata); parser.cdata = ""; } if (parser.script !== "") { emitNode(parser, "onscript", parser.script); parser.script = ""; } } SAXParser.prototype = { end: function() { end(this); }, write, resume: function() { this.error = null; return this; }, close: function() { return this.write(null); }, flush: function() { flushBuffers(this); } }; var Stream; try { Stream = require("stream").Stream; } catch (ex) { Stream = function() { }; } var streamWraps = sax.EVENTS.filter(function(ev) { return ev !== "error" && ev !== "end"; }); function createStream(strict, opt) { return new SAXStream(strict, opt); } function SAXStream(strict, opt) { if (!(this instanceof SAXStream)) { return new SAXStream(strict, opt); } Stream.apply(this); this._parser = new SAXParser(strict, opt); this.writable = true; this.readable = true; var me = this; this._parser.onend = function() { me.emit("end"); }; this._parser.onerror = function(er) { me.emit("error", er); me._parser.error = null; }; this._decoder = null; streamWraps.forEach(function(ev) { Object.defineProperty(me, "on" + ev, { get: function() { return me._parser["on" + ev]; }, set: function(h) { if (!h) { me.removeAllListeners(ev); me._parser["on" + ev] = h; return h; } me.on(ev, h); }, enumerable: true, configurable: false }); }); } SAXStream.prototype = Object.create(Stream.prototype, { constructor: { value: SAXStream } }); SAXStream.prototype.write = function(data) { if (typeof Buffer === "function" && typeof Buffer.isBuffer === "function" && Buffer.isBuffer(data)) { if (!this._decoder) { var SD = require("string_decoder").StringDecoder; this._decoder = new SD("utf8"); } data = this._decoder.write(data); } this._parser.write(data.toString()); this.emit("data", data); return true; }; SAXStream.prototype.end = function(chunk) { if (chunk && chunk.length) { this.write(chunk); } this._parser.end(); return true; }; SAXStream.prototype.on = function(ev, handler) { var me = this; if (!me._parser["on" + ev] && streamWraps.indexOf(ev) !== -1) { me._parser["on" + ev] = function() { var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments); args.splice(0, 0, ev); me.emit.apply(me, args); }; } return Stream.prototype.on.call(me, ev, handler); }; var CDATA = "[CDATA["; var DOCTYPE = "DOCTYPE"; var XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"; var XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/"; var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }; var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/; var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/; function isWhitespace(c) { return c === " " || c === "\n" || c === "\r" || c === " "; } function isQuote(c) { return c === '"' || c === "'"; } function isAttribEnd(c) { return c === ">" || isWhitespace(c); } function isMatch(regex, c) { return regex.test(c); } function notMatch(regex, c) { return !isMatch(regex, c); } var S = 0; sax.STATE = { BEGIN: S++, // leading byte order mark or whitespace BEGIN_WHITESPACE: S++, // leading whitespace TEXT: S++, // general stuff TEXT_ENTITY: S++, // & and such. OPEN_WAKA: S++, // < SGML_DECL: S++, // SCRIPT: S++, //