diff --git a/lazygit b/lazygit new file mode 100755 index 000000000..a7fda6a19 Binary files /dev/null and b/lazygit differ diff --git a/lazygit.tar.gz b/lazygit.tar.gz new file mode 100644 index 000000000..9106a309a Binary files /dev/null and b/lazygit.tar.gz differ diff --git a/package.json b/package.json index d7abed002..a05fba991 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,10 @@ "prettier": "3.0.3", "ts-node": "^10.9.2", "tsc-alias": "^1.8.10", - "tslib": "^2.6.3", - "tsup": "^8.1.0", + "tslib": "^2.7.0", + "tsup": "^8.2.4", "tsx": "^3.14.0", - "turbo": "^2.0.3", + "turbo": "^2.1.1", "typedoc": "^0.25.13" }, "repository": "git@github.com:fukaoi/solana-suite.git", @@ -34,8 +34,8 @@ "npm": "Only pnpm" }, "dependencies": { - "@types/node": "^20.14.2", - "typedoc-material-theme": "^1.0.2" + "@types/node": "^20.16.4", + "typedoc-material-theme": "^1.1.0" }, "name": "solana-suite" } diff --git a/packages/account/dist/index.js b/packages/account/dist/index.js index 61c8c7730..8d30d3e8d 100644 --- a/packages/account/dist/index.js +++ b/packages/account/dist/index.js @@ -54,7 +54,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -90,7 +90,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -146,13 +147,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1122,4 +1123,4 @@ var Account = { 0 && (module.exports = { Account }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wcmlvcml0eS1mZWUudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tcHV0ZS11bml0LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcmV0cnkudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi9zc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29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgQ29uc3RhbnRzLCBkZWJ1Z0xvZywgUmVzdWx0IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBDb21taXRtZW50LCBDb25uZWN0aW9uLCBGaW5hbGl0eSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgTm9kZSB7XG4gIGNvbnN0IHNldHRlZCA9IHtcbiAgICBjbHVzdGVyVXJsOiAnJyxcbiAgICBjb21taXRtZW50OiBDb25zdGFudHMuQ09NTUlUTUVOVCxcbiAgICBjdX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lTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZUJ5U2xvdCkuc29ydChcbiAgICAgICAgKGE6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcywgYjogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKSA9PlxuICAgICAgICAgIGEuc2xvdCAtIGIuc2xvdCxcbiAgICAgICkgYXMgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW107XG5cbiAgICAgIC8vIGdldCBtZWRpYW4gb2YgbGFzdCAyMCBmZWVzXG4gICAgICBjb25zdCByZWNlbnRGZWVzID0gbWF4aW11bUZlZXMuc2xpY2UoXG4gICAgICAgIE1hdGgubWF4KG1heGltdW1GZWVzLmxlbmd0aCAtIDIwLCAwKSxcbiAgICAgICk7XG4gICAgICBjb25zdCBtaWQgPSBNYXRoLmZsb29yKHJlY2VudEZlZXMubGVuZ3RoIC8gMik7XG4gICAgICBjb25zdCBtZWRpYW5GZWUgPVxuICAgICAgICByZWNlbnRGZWVzLmxlbmd0aCAlIDIgIT09IDBcbiAgICAgICAgICA/IHJlY2VudEZlZXNbbWlkXS5wcmlvcml0aXphdGlvbkZlZVxuICAgICAgICAgIDogKHJlY2VudEZlZXNbbWlkIC0gMV0ucHJpb3JpdGl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ICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQge1xuICBDb25maXJtT3B0aW9ucyxcbiAgS2V5cGFpcixcbiAgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbixcbi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cbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5cbmltcG9ydCB7IENvbnN0YW50cywgUmVzd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AgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBrZXlwYWlyL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RlIiwgImltcG9ydF93ZWIzIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJDb21wdXRlVW5pdCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUHJpb3JpdHlGZWUiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJldHJ5IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiQWNjb3VudCIsICJBc3NvY2lhdGVkIiwgImltcG9ydF93ZWIzIiwgImltcG9ydF9iczU4IiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJicyIsICJPcmlnaW5hbCIsICJpbXBvcnRfd2ViMyIsICJBY2NvdW50IiwgIlBkYSIsICJNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQiLCAiQk4iLCAiQWNjb3VudCJdCn0K \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wcmlvcml0eS1mZWUudHMiLCAiLi4vLi4vdHJhbnNhY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AgICAgICFDb25maWcuZmlsZWJhc2Uuc2VjcmV0IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5GSUxFQkFTRV9DUkVERU5USUFMKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmtleSAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5zZWNyZXQgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEZpbGViYXNlQ3JlZGVudGlhbC5kZXY7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBsb2FkQ29uZmlnID0gYXN5bmMgKCkgPT4ge1xuICAgIGNvbnN0IHsgZGVmYXVsdDogbG9hZGVkQ29uZmlnIH0gPSBhd2FpdCBpbXBvcnQoXG4gICAgICAnQHNvbGFuYS1zdWl0ZS9jb25maWcvbG9hZCcsXG4gICAgICB7XG4gICAgICAgIHdpdGg6IHsgdHlwZTogJ2pzb24nIH0sXG4gICAgICB9XG4gICAgKTtcbiAgICBDb25maWcgPSBsb2FkZWRDb25maWc7XG4gICAgY29uc29sZS5sb2coJyMjIyMjIyMjIyMjIyMjJywgQ29uZmlnKTtcbiAgfTtcblxuICBleHBvcnQgY29uc3QgV1JBUFBFRF9UT0tFTl9QUk9HUkFNX0lEID0gbmV3IFB1YmxpY0tleShcbiAgICAnU28xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMicsXG4gICk7XG4gIG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XQgY2FuIHVzZSBiYXRjaFN1Ym1pdCgpLlxuICAgICAgICAgICAgSW5kZXg6ICR7aX0sIFNldCB2YWx1ZTogJHtKU09OLnN0cmluZ2lmeShpbnN0KX1gLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaSsrO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0Lmluc3RydWN0aW9ucyxcbiAgICAgICAgKTtcbiAgICAgICAgY29uc3Qgc2lnbmVycyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcCgoaW5zdCkgPT4gaW5zdC5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gY29tbW9uT3JNaW50SW5zdC5maWx0ZXIoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVU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BOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH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cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0l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yYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiQWNjb3VudCIsICJBc3NvY2lhdGVkIiwgImltcG9ydF93ZWIzIiwgImltcG9ydF9iczU4IiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJicyIsICJPcmlnaW5hbCIsICJpbXBvcnRfd2ViMyIsICJBY2NvdW50IiwgIlBkYSIsICJNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQiLCAiQk4iLCAiQWNjb3VudCJdCn0K \ No newline at end of file diff --git a/packages/account/dist/index.mjs b/packages/account/dist/index.mjs index 383c2f59a..89e30c7cb 100644 --- a/packages/account/dist/index.mjs +++ b/packages/account/dist/index.mjs @@ -18,7 +18,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -54,7 +54,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -110,13 +111,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1113,4 +1114,4 @@ var Account = { export { Account }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3ByaW9yaXR5LWZlZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21wdXRlLXVuaXQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9yZXRyeS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uL3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uL3NyYy9rZXlwYWlyLnRzIiwgIi4uL3NyYy9wZ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zLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmICghQ29uZmlnLmZpbGViYXNlLmtleSB8fCAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgaWYgKENvbmZpZy5maWxlYmFzZS5rZXkgfHwgQ29uZmlnLmZpbGViYXNlLnNlY3JldCkge1xuICAgICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEZpbGViYXNlQ3JlZGVudGlhbC5kZXY7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBsb2FkQ29uZmlnID0gYXN5bmMgKCkgPT4ge1xuICAgIGNvbnN0IHsgZGVmYXVsdDogbG9hZGVkQ29uZmlnIH0gPSBhd2FpdCBpbXBvcnQoXG4gICAgICAnQHNvbGFuYS1zdWl0ZS9jb25maWcvbG9hZCcsXG4gICAgICB7XG4gICAgICAgIHdpdGg6IHsgdHlwZTogJ2pzb24nIH0sXG4gICAgICB9XG4gICAgKTtcbiAgICBDb25maWcgPSBsb2FkZWRDb25maWc7XG4gICAgY29uc29sZS5sb2coJyMjIyMjIyMjIyMjIyMjJywgQ29uZmlnKTtcbiAgfTtcblxuICBleHBvcnQgY29uc3QgV1JBUFBFRF9UT0tFTl9QUk9HUkFNX0lEID0gbmV3IFB1YmxpY0tleShcbiAgICAnU28xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMicsXG4gICk7XG4gIGV4cG9ydCBjb25zdCBNRU1PX1BST0dSQU1fSUQgPSBuZXcgUHVibGljS2V5KFxuICAgICdNZW1vMVVoa0pS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ZTogJHtKU09OLnN0cmluZ2lmeShpbnN0KX1gLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaSsrO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0Lmluc3RydWN0aW9ucyxcbiAgICAgICAgKTtcbiAgICAgICAgY29uc3Qgc2lnbmVycyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcCgoaW5zdCkgPT4gaW5zdC5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gY29tbW9uT3JNaW50SW5zdC5maWx0ZXIoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSB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GxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4g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dGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZ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AiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJBY2NvdW50IiwgIkFzc29jaWF0ZWQiLCAiUHVibGljS2V5IiwgImJzIiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJQdWJsaWNLZXkiLCAiQWNjb3VudCIsICJQZGEiLCAiQWNjb3VudCJdCn0K \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3ByaW9yaXR5LWZlZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21wdXRlLXVuaXQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9yZXRyeS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uL3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uL3NyYy9rZXlwYW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gICBidWNrZXQ6IHN0cmluZztcbiAgfSA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLmtleSB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uuc2VjcmV0IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5GSUxFQkFTRV9DUkVERU5USUFMKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmtleSAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5zZWNyZXQgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEZpbGViYXNlQ3JlZGVudGlhbC5kZXY7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBsb2FkQ29uZmlnID0gYXN5bmMgKCkgPT4ge1xuICAgIGNvbnN0IHsgZGVmYXVsdDogbG9hZGVkQ29uZmlnIH0gPSBhd2FpdCBpbXBvcnQoXG4gICAgICAnQHNvbGFuYS1zdWl0ZS9jb25maWcvbG9hZCcsXG4gICAgICB7XG4gICAgICAgIHdpdGg6IHsgdHlwZTogJ2pzb24nIH0sXG4gICAgICB9XG4gICAgKTtcbiAgICBDb25maWcgPSBsb2FkZWRDb25maWc7XG4gICAgY29uc29sZS5sb2coJyMjIyMjIy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y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZUJ5U2xvdCkuc29ydChcbiAgICAgICAgKGE6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcywgYjogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKSA9PlxuICAgICAgICAgIGEuc2xvdCAtIGIuc2xvdCxcbiAgICAgICkgYXMgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW107XG5cbiAgICAgIC8vIGdldCBtZWRpYW4gb2YgbGFzdCAyMCBmZWVzXG4gICAgICBjb25zdCByZWNlbnRGZWVzID0gbWF4aW11bUZlZXMuc2xpY2UoXG4gICAgICAgIE1hdGgubWF4KG1heGltdW1GZWVzLmxlbmd0aCAtIDIwLCAwKSxcbiAgICAgICk7XG4gICAgICBjb25zdCBtaWQgPSBNYXRoLmZsb29yKHJlY2VudEZlZXMubGVuZ3RoIC8gMik7XG4gICAgICBjb25zdCBtZWRpYW5GZWUgPVxuICAgICAgICByZWNlbnRGZWVzLmxlbmd0aCAlIDIgIT09IDBcbiAgICAgICAgICA/IHJlY2VudEZlZXNbbWlkXS5wcmlvcml0aXphdGlvbkZlZVxuICAgICAgICAgIDogKHJlY2VudEZlZXNbbWlkIC0gMV0ucHJpb3JpdGl6YXRpb25GZWUgK1xuICAgICAgICAgICAgICByZWNlbnRGZWVzW21pZF0ucHJpb3JpdGl6YXRpb25GZWUpIC9cbiAgICAgICAgICAgIDI7XG5cbiAgICAgIGR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RoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQge1xuICBDb25maXJtT3B0aW9ucyxcbiAgS2V5cGFpcixcbiAgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb24sXG4gIFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24sXG4gIFRyYW5zYWN0aW9uU2lnbmF0dXJlLFxufSBmcm9tICdAc29sYW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pbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5cbmltcG9ydCB7IENvbnN0YW50cywgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb3J0IHsgUHVia2V5IH0gZn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VE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBrZXlwYWlyLnB1YmxpY0tleS50b1N0cmluZygpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBwYXJhbXMucHVia2V5O1xuICAgICAgfVxuICAgIC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JUcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgInNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgInNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJBY2NvdW50IiwgIkFzc29jaWF0ZWQiLCAiUHVibGljS2V5IiwgImJzIiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJQdWJsaWNLZXkiLCAiQWNjb3VudCIsICJQZGEiLCAiQWNjb3VudCJdCn0K \ No newline at end of file diff --git a/packages/converter/dist/index.js b/packages/converter/dist/index.js index 546ff6996..8375907b7 100644 --- a/packages/converter/dist/index.js +++ b/packages/converter/dist/index.js @@ -175,7 +175,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -211,7 +211,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -267,13 +268,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1530,4 +1531,4 @@ var Converter14 = { 0 && (module.exports = { Converter }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb2xsZWN0aW9uLnRzIiwgIi4uL3NyYy9jcmVhdG9ycy50cyIsICIuLi9zcmMvY29tcHJlc3NlZC1uZnQtbWV0YWRhdGEudHMiLCAiLi4vc3JjL3JveWFsdHkudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcHJpb3JpdHktZmVlLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbXB1dGUtdW5pdC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3JldHJ5LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuL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BTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBrZXlwYWlyLnB1YmxpY0tleS50b1N0cmluZygpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBwYXJhbXMucHVia2V5O1xuICAgICAgfVxuICAgICAgdGhpcy5zZWNyZ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gIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyh7XG4gICAgICAgICAgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiA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YmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRz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IG1ldGFwbGV4IGNsdXN0ZXIgb24gbWFpbm5ldC1iZXRhJyk7XG4gICAgICAgICAgTm9kZS5jaGFuZ2VDb25uZWN0aW9uKHsgY2x1c3RlcjogQ29uc3RhbnRzLkNsdXN0ZXIucHJkTWV0YXBsZXggfSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJ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iAgICBleHBvcnQgY29uc3QgaW50b0luZnJhID0gYXN5bmMgKFxuICAgICAgaW5wdXQ6IFByb3BlcnRpZXMgfCB1bmRlZmluZWQsXG4gICAgICBjYWxsYmFja0Z1bmM6IChcbiAgICAgICAgZmlsZVBhdGg6IEZpbGVUeXBlLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIG9wdGlvbnM6IFBhcnRpYWw8U3RvcmFnZU9wdGlvbnM+LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBvcHRpb25zOiBQYXJ0aWFsPFN0b3JhZ2VPcHRpb25zPiA9IHt9LFxuICAgICk6IFByb21pc2U8UHJvcGVydGllcz4gPT4ge1xuICAgICAgaWYgKCFpbnB1dCB8fCAhaW5wdXQuZmlsZXMpIHtcbiAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgfVxuXG4gICAgICBjb25zdCBmaWxlcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgICBpbnB1dC5maWxlcy5tYXAoYXN5bmMgKGZpbGUpID0+IHtcbiAgICAgICAgICBpZiAoIWZpbGUuZmlsZVBhdGggJiYgIWZpbGUudXJpKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoXG4gICAgICAgICAgICAgIGZpbGUuZmlsZVBhdGghLFxuICAgICAgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICAgICAgb3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtc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yB8IEluc3RydWN0aW9uPlxuICovXG5leHBvcnQgbmFtZXNwYWNlIEFjY291bnQge1xuICBleHBvcnQgbmFtZXNwYWNlIEFzc29jaWF0ZWQge1xuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgp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AgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICA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ICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd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0aW9uKHsgY2x1c3RlcjogQ29uc3RhbnRzLkNsdXN0ZXIucHJkTWV0YXBsZXggfSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0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mluZWQsXG4gICAgICBjYWxsYmFja0Z1bmM6IChcbiAgICAgICAgZmlsZVBhdGg6IEZpbGVUeXBlLFxuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIG9wdGlvbnM6IFBhcnRpYWw8U3RvcmFnZU9wdGlvbnM+LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBvcHRpb25zOiBQYXJ0aWFsPFN0b3JhZ2VPcHRpb25zPiA9IHt9LFxuICAgICk6IFByb21pc2U8UHJvcGVydGllcz4gPT4ge1xuICAgICAgaWYgKCFpbnB1dCB8fCAhaW5wdXQuZmlsZXMpIHtcbiAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgfVxuXG4gICAgICBjb25zdCBmaWxlcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgICBpbnB1dC5maWxlcy5tYXAoYXN5bmMgKGZpbGUpID0+IHtcbiAgICAgICAgICBpZiAoIWZpbGUuZmlsZVBhdGggJiYgIWZpbGUudXJpKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoXG4gICAgICAgICAgICAgIGZpbGUuZmlsZVBhdGghLFxuICAgICAgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICAgICAgb3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAgIC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JCTEVHVU1fUFJPR1JBTV9JRCIsICJCTiIsICJBY2NvdW50IiwgImltcG9ydF9iczU4IiwgIkFjY291bnQiLCAiYnMiLCAiaW1wb3J0X3dlYjMiLCAiaW1wb3J0X3dlYjMiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIkNvbXB1dGVVbml0IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJQcmlvcml0eUZlZSIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmV0cnkiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJDb252ZXJ0ZXIiLCAiTmZ0IiwgIkNvbnZlcnRlciIsICJNZW1vIiwgIkNvbnZlcnRlciIsICJNaW50IiwgIkNvbnZlcnRlciIsICJSZWd1bGFyTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlByb3BlcnRpZXMiLCAiQ29udmVydGVyIiwgIlVzZXMiLCAiQ29udmVydGVyIiwgIlRva2VuTWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyQ2hlY2tlZCIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXIiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/converter/dist/index.mjs b/packages/converter/dist/index.mjs index 6a378f308..0df717b59 100644 --- a/packages/converter/dist/index.mjs +++ b/packages/converter/dist/index.mjs @@ -142,7 +142,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -178,7 +178,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -234,13 +235,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1524,4 +1525,4 @@ var Converter14 = { export { Converter14 as Converter }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbGxlY3Rpb24udHMiLCAiLi4vc3JjL2NyZWF0b3JzLnRzIiwgIi4uL3NyYy9jb21wcmVzc2VkLW5mdC1tZXRhZGF0YS50cyIsICIuLi9zcmMvcm95YWx0eS50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2N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GF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoIUNvbmZpZy5maWxlYmFzZS5rZXkgfHwgIUNvbmZpZy5maWxlYmFzZS5zZWNyZXQpIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcihDb25zdGFudHMuV2Fybm5pbmdNZXNzYWdlLkZJTEVCQVNFX0NSRURFTlRJQUwpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGlmIChDb25maWcuZmlsZWJhc2Uua2V5IHx8IENvbmZpZy5maWxlYmFzZS5zZWNyZXQpIHtcbiAgICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBGaWxlYmFzZUNyZWRlbnRpYWwuZGV2O1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3QgbG9hZENvbmZpZyA9IGFzeW5jICgpID0+IHtcbiAgICBjb25zd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2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291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iAgICAgICAgbGV0IGkgPSAwO1xuICAgICAgICBmb3IgKGNvbnN0IGluc3Qgb2YgY29tbW9uT3JNaW50SW5zdCkge1xuICAgICAgICAgIGlmICghaW5zdC5pbnN0cnVjdGlvbnMgJiYgIWluc3Quc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoaW5zdCl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcChcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoKGluc3QpID0+IGluc3Quc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGNvbW1vbk9yTWludEluc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0LmZlZVBheWVyICE9PSB1bmRlZmluZWQsXG4gICAgICAgICk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQ2FsY3VsYXRlVHhzaXplLmlzTWF4VHJhbnNhY3Rpb25TaXplKHRyYW5zYWN0aW9uLCBmZWVQYXllci5wdWJsaWNLZXkpO1xuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQ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UZlZXMgPVxuICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAg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ICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5cbmltcG9ydCB7IENvbnN0YW50cywgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb3J0IHsgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7XG4gIFBhcnRpYWxTaWduU3RydWN0dXJlLFxuICBTdWJtaXRPcHRpb25zLFxufSBmcm9tICd+L3R5cGVzL3RyYW5zYWN0aW9uLWJ1aWxkZXInO1xua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ICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGRhdGEudmVyaWZpZWQsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgQ29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H1cbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5rZXkgJiZcbiAgIC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xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20gJ2JzNTgnO1xuXG5leHBvcnQgbmFtZXNwYWNlIEFjY291bnQge1xuICBleHBvcnQgY2xhc3MgS2V5cGFpciB7XG4gICAgc2VjcmV0OiBTZWNyZXQ7XG4gICAgcHVia2V5OiBQdWJrZXk7X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Wx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBpZiAoIW9wdGlvbnMuaW5zdHJ1Y3Rpb25zKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ05vdCBmb3VuZCBvcHRpb25zLmluc3RydWN0aW9ucycpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGNvbW1vbk9yTWludEluc3QgPSBvcHRpb25zLmluc3RydWN0aW9ucztcbiAgICAgICAgbGV0IGkgPSAwO1xuICAgICAgICBmb3IgKGNvbnN0IGluc3Qgb2YgY29tbW9uT3JNaW50SW5zdCkge1xuICAgICAgICAgIGlmICghaW5zdC5pbnN0cnVjdGlvbnMgJiYgIWluc3Quc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoaW5zdCl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcChcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoKGluc3QpID0+IGluc3Quc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGNvbW1vbk9yTWludEluc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0LmZlZVBheWVyICE9PSB1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WF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbXB1dGVCdWRnZXRQcm9ncmFtLFxuICBLZXlwYWlyLFxuICBSZWNlbnRQcmlvcml0aXphdG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HVuaXFXcml0YWJsZUFjY291bnRzID0gW1xuICAgICAgICAuLi5uZXcgU2V0KHdyaXRhYmxlQWNjb3VudHMubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvQmFzZTU4KCkpKSxcbiAgICAgIF1cbiAgICAgICAgLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b1B1YmxpY0tleSgpKVxuICAgICAgICAuc2xpY2UoMCwgTUFYX1JFQ0VOVF9QUklPUklUWV9GRUVfQUNDT1VOVFMpO1xuXG4gICAgICBjb25zdCBwcmlvcml0eUZlZXMgPVxuICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZUJ5U2xvdCkuc29ydChcbiAgICAgICAgKGE6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcywgYjogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKSA9PlxuICAgICAgICAgIGEuc2xvdCAtIGIuc2xvdCxcbiAgICAgICkgYXMgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW107XG5cbiAgICAgIC8vIGdldCBtZWRpYW4gb2YgbGFzdCAyMCBmZWVzXG4gICAgICBjb25zdCByZWNlbnRGZWVzID0gbWF4aW11bUZlZXMuc2xpY2UoXG4gICAgICAgIE1hdGgubWF4KG1heGltdW1GZWVzLmxlbmd0aCAtIDIwLCAwKSxcbiAgICAgICk7XG4gICAgICBjb25zdCBtaWQgPSBNYXRoLmZsb29yKHJlY2VudEZlZXMubGVuZ3RoIC8gMik7XG4gICAgICBjb25zdCBtZWRpYW5GZWUgPVxuICAgICAgICByZWNlbnRGZWVzLmxlbmd0aCAlIDIgIT09IDBcbiAgICAgICAgICA/IHJlY2VudEZlZXNbbWlkXS5wcmlvcml0aXphdGlvbkZlZVxuICAgICAgICAgIDogK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aXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQge1xuICBDb25maXJtT3B0aW9ucyxcbiAgS2V5cGFpcixcbiA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xcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20gJ0Bzb2xhbmEvd2ViMy5q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9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZmlsZTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlm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9dd1af754..c01107a54 100644 --- a/packages/das-api/dist/index.d.mts +++ b/packages/das-api/dist/index.d.mts @@ -417,9 +417,9 @@ declare const DasApi: { changeDasUri: (url: string) => void; getAssetProof: (assetId: string) => Promise>; getAsset: (assetId: Pubkey) => Promise>; - getAssetsByOwner: (ownerAddress: Pubkey, limit?: number, page?: number, sortBy?: Sortable | undefined, before?: string | undefined, after?: string | undefined) => Promise>; - getAssetsByGroup: (groupKey: string, groupValue: Pubkey, limit?: number, page?: number, sortBy?: Sortable | undefined, before?: string | undefined, after?: string | undefined) => Promise>; - getPriorityFeeEstimate: (accountOrTransaction: _solana_web3_js.Transaction | Pubkey[]) => Promise>; + getAssetsByOwner: (ownerAddress: Pubkey, limit?: number, page?: number, sortBy?: Sortable, before?: string, after?: string) => Promise>; + getAssetsByGroup: (groupKey: string, groupValue: Pubkey, limit?: number, page?: number, sortBy?: Sortable, before?: string, after?: string) => Promise>; + getPriorityFeeEstimate: (accountOrTransaction: Pubkey[] | _solana_web3_js.Transaction) => Promise>; }; export { DasApi }; diff --git a/packages/das-api/dist/index.d.ts b/packages/das-api/dist/index.d.ts index 9dd1af754..c01107a54 100644 --- a/packages/das-api/dist/index.d.ts +++ b/packages/das-api/dist/index.d.ts @@ -417,9 +417,9 @@ declare const DasApi: { changeDasUri: (url: string) => void; getAssetProof: (assetId: string) => Promise>; getAsset: (assetId: Pubkey) => Promise>; - getAssetsByOwner: (ownerAddress: Pubkey, limit?: number, page?: number, sortBy?: Sortable | undefined, before?: string | undefined, after?: string | undefined) => Promise>; - getAssetsByGroup: (groupKey: string, groupValue: Pubkey, limit?: number, page?: number, sortBy?: Sortable | undefined, before?: string | undefined, after?: string | undefined) => Promise>; - getPriorityFeeEstimate: (accountOrTransaction: _solana_web3_js.Transaction | Pubkey[]) => Promise>; + getAssetsByOwner: (ownerAddress: Pubkey, limit?: number, page?: number, sortBy?: Sortable, before?: string, after?: string) => Promise>; + getAssetsByGroup: (groupKey: string, groupValue: Pubkey, limit?: number, page?: number, sortBy?: Sortable, before?: string, after?: string) => Promise>; + getPriorityFeeEstimate: (accountOrTransaction: Pubkey[] | _solana_web3_js.Transaction) => Promise>; }; export { DasApi }; diff --git a/packages/das-api/dist/index.js b/packages/das-api/dist/index.js index d4ce557e4..7eed12887 100644 --- a/packages/das-api/dist/index.js +++ b/packages/das-api/dist/index.js @@ -54,7 +54,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -90,7 +90,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -146,13 +147,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1732,4 +1733,4 @@ var DasApi3 = { 0 && (module.exports = { DasApi }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L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oKSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRvU3RyaW5nKCk7XG4gICAgICB9IGVsc2Uge1xuIC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JbnN0ID0gb3B0aW9ucy5pbnN0cnVjdGlvbnM7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBpbnN0IG9mIGNvbW1vbk9yTWludEluc3QpIHtcbiAgICAgICAgICBpZiAoIWluc3QuaW5zdHJ1Y3Rpb25zICYmICFpbnN0LnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGluc3QpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICApO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKChpbnN0KSA9PiBpbnN0LnNpZ25lcnMpO1xuICAgICAgICBjb25zdCBmZWVQYXllcnMgPSBjb21tb25Pck1pbnRJbnN0LmZpbHRlcihcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5mZWVQYXllciAhPT0gdW5kZWZpbmVkLFxuICAgICAgICApO1xuICAgICAgICBsZXQgZmVlUGF5ZXIgPSBzaWduZXJzWzBdO1xuICAgICAgICBpZiAoZmVlUGF5ZXJzLmxlbmd0aCA+IDAgJiYgZmVlUGF5ZXJzWzBdLmZlZVBheWVyKSB7XG4gICAgICAgICAgZmVlUGF5ZXIgPSBmZWVQYXllcnNbMF0uZmVlUGF5ZXI7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IG5ldyBUcmFuc2FjdGlvbigpO1xuICAgICAgICBsZXQgZmluYWxTaWduZXJzID0gc2lnbmVycztcbiAgICAgICAgaWYgKGZlZVBheWVyKSB7XG4gICAgICAgICAgdHJhbnNhY3Rpb24uZmVlUGF5ZXIgPSBmZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW2ZlZVBheWVyLCAuLi5zaWduZXJzXTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIENhbGN1bGF0ZVR4c2l6ZS5pc01heFRyYW5zYWN0aW9uU2l6ZSh0cmFuc2FjdGlvbiwgZmVlUGF5ZXIucHVibGljS2V5KTtcblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgICBhd2FpdCBQcmlvcml0eUZlZS5Qcmlvcml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtc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+IG1heC5wcmlvcml0aXphdGlvbkZlZSA/IGZlZSA6IG1heDtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXM+LFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1heGltdW1GZWVzID0gT2JqZWN0LnZhbHVlcyhtYXhGZWVCeVNsb3QpLnNvcnQoXG4gICAgICAgIChhOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMsIGI6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcykgPT5cbiAgICAgICAgICBhLnNsb3QgLSBiLnNsb3QsXG4gICAgICApIGFzIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdO1xuXG4gICAgICAvLyBnZXQgbWVkaWFuIG9mIGxhc3QgMjAgZmVlc1xuICAgICAgY29uc3QgcmVjZW50RmVlcyA9IG1heGltdW1GZWVzLnNsaWNlKFxuICAgICAgICBNYXRoLm1heChtYXhpbXVtRmVlcy5sZW5ndGggLSAyMCwgMCksXG4gICAgICApO1xuICAgICAgY29uc3QgbWlkID0gTWF0aC5mbG9vcihyZWNlbnRGZWVzLmxlbmd0aCAvIDIpO1xuICAgICAgY29uc3QgbWVkaWFuRmVlID1cbiAgICAgICAgcmVjZW50RmVlcy5sZW5ndGggJSAyICE9PSAwXG4gICAgICAgICAgPyByZWNlbnRGZWVzW21pZF0ucHJpb3JpdGl6YXRpb25GZWVcbiAgICAgICAgICA6IChyZWNlbnRGZWVzW21pZCAtIDFdLnByaW9yaXRpemF0aW9uRmVlICtcbiAgICAgICAgICAgICAgcmVjZW50RmVlc1ttaWRdLnByaW9yaXRpemF0aW9uRmVlKSAvXG4gICAgICAgICAgICAyO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBtZWRpYW4gZmVlOiAnLCBtZWRpYW5GZWUpO1xuXG4gICAgICByZXR1cm4gTW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dGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIEtleXBhaXIsXG4gIHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24sXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbkluc3RydWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25hdHVyZSxcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgQ29uc3RhbnRzLCBkZWJ1Z0xv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aW9uLCAnaGV4Jyk7XG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gVHJhbnNhY3Rpb24uZnJvbShkZWNvZGUpO1xuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgdHJhbnNhY3Rpb24ucGFydGlhbFNpZ24ob3B0aW9ucy5mZWVQYXllci50b0tleXBhaXIoKSk7XG4gICAgICAgICAgY29uc3Qgd2lyZVRyYW5zYWN0aW9uID0gdHJhbnNhY3Rpb24uc2VyaWFsaXplKCk7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLnNlbmRSYXdUcmFuc2FjdGlvbihcbiAgICAgICAgICAgIHdpcmVUcmFuc2FjdGlvbixcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdEZvclBhcnRpYWxTaWduKFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgb3B0aW9ucy5mZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IFB1YmxpY0tleSwgVHJhbnNhY3Rpb24g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bnB1dC5maWxlcy5tYXAoYXN5bmMgKGZpbGUpID0+IHtcbiAgICAgICAgICBpZiAoIWZpbGUuZmlsZVBhdGggJiYgIWZpbGUudXJpKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoXG4gICAgICAgICAgICAgIGZpbGUuZmlsZVBhdGghLFxuICAgICAgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICAgICAgb3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZXhpc3RzS2V5OiAnZmlsZVBhdGgnLFxuICAgICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgXSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmaWxlO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm9wZXJ0aWVzO1xuICAgIH07XG4gIH1cbn1cbiIsICIvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi9cbmltcG9ydCB7IE9wdGlvbiwgVXNlcyB9IGZyb20gJ34vdHlwZXMvcmVndWxhci1uZnQnO1xuXG5leHBvcnQgbmFtZXNwYWNlIENvbnZlcnRlciB7XG4gIGV4cG9ydCBuY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gKTtcbiAgICBpZiAoYXNzZXRzLmlzRXJyKSB7XG4gICAgICB0aHJvdyBhc3NldHMuZXJyb3I7XG4gICAgfVxuXG4gICAgY29uc3QgaXRlbXMgPSBhc3NldHMudmFsdWUuaXRlbXM7XG5cbiAgICBjb25zdCBtZXRhZGF0YXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgIGl0ZW1zXG4gICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMud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0FwaSJdCn0K \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3ByaW9yaXR5LWZlZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21wdXRlLXVuaXQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9yZXRyeS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uL3NyYy9hcGkudHMiLCAiLi4vLi4vY29udmVyd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2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgaWYgKGN1c3RvbURhc0FwaVVybC5sZW5ndGggPCAxKSB7XG4gICAgICAgICAgY29uc29sZS53YXJuKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaEZpbGViYXNlQ3JlZGVudGlhbCA9IChcbiAgICBlbnY6IHN0cmluZyxcbiAgKToge1xuICAgIGtleTogc3RyaW5nO1xuICAgIHNlY3JldDogc3RyaW5nO1xuICAgIGJ1Y2tldDogc3RyaW5nO1xuICB9ID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uua2V5IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5zZWNyZXQgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcihDb25zdGFudHMuV2Fybm5pbmdNZXNzYWdlLkZJTEVCQVNFX0NSRURFTlRJQUwpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uua2V5ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLnNlY3JldCAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gRmlsZWJhc2VDcmVkZW50aWFsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IGxvYWRDb25maWcgPSBhc3luYyAoKSA9PiB7XG4gICAgY29uc3QgeyBkZWZhdWx0OiBsb2FkZWRDb25maWcgfSA9IGF3YWl0IGltcG9ydChcbiAgICAgICdAc29sYW5hLXN1aXRlL2NvbmZpZy9sb2FkJyxcbiAgICAgIHtcbiAgICAgICAgd2l0aDogeyB0eXBlOiAnanNvbicgfSxcbiAgICAgIH1cbiAgICApO1xuICAgIENvbmZpZyA9IGxvYWRlZENvbmZpZztcbiAgICBjb25zb2xlLmxvZygnIyMjIyMjIyMjIyMjIyMnLCBDb25maWcpO1xuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBXUkFQUEVEX1RPS0VOX1BST0dSQU1fSUQgPSBuZXcgUHVibGljS2V5KFxuICAgICdTbzExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEyJyxcbiAgKTtcbiAgZXhwb3J0IGNvbnN0IE1FTU9fUFJPR1JBTV9JRCA9IG5ldyBQdWJsaWNLZXkoXG4gICAgJ01lbW8xVWhrSlJmSHl2TE1jVnVjSnd4WGV1RDcyOEVxVkREd1FEeEZNTm8nLF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9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvb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CBuYW1lc3BhY2UgVHJhbnNhY3Rpb25CdWlsZGVyIHtcbiAgZXhwb3J0IGNsYXNzIEJhdGNoIHtcbiAgICBzdWJtaXQgPSBhc3luYyAoXG4gICAgICBvcHRpb25zOiBQYXJ0aWFsPEJhdGNoU3VibWl0T3B0aW9ucz4gPSB7fSxcbiAgICApOiBQcm9taXNlPFJlc3VsdDxUcmFuc2FjdGlvblNpZ25hdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgICByZXR1cm4gVHJ5KGFzeW5jICgpID0+IHtcbiAgICAgICAgaWYgKCFvcHRpb25zLmluc3RydWN0aW9ucykge1xuICAgICAgICAgIHRocm93IEVycm9yKCdOb3QgZm91bmQgb3B0aW9ucy5pbnN0cnVjdGlvbnMnKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBjb21tb25Pck1pbnRJbnN0ID0gb3B0aW9ucy5pbnN0cnVjdGlvbnM7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBpbnN0IG9mIGNvbW1vbk9yTWludEluc3QpIHtcbiAgICAgICAgICBpZiAoIWluc3QuaW5zdHJ1Y3Rpb25zICYmICFpbnN0LnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGluc3QpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICApO1xuICAgICAgICBjb25zdCBzaWduZXJzID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R5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgIC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N0aW9uc1xuICAgICAgICAubWFwKChpbnN0KSA9PlxuICAgICAgICAgIGluc3Qua2V5c1xuICAgICAgICAgICAgLmZpbHRlcigoYWNjb3VudCkgPT4gYWNjb3VudC5pc1dyaXRhYmxlKVxuICAgICAgICAgICAgLm1hcCgoa2V5KSA9PiBrZXkucHVia2V5KSxcbiAgICAgICAgKVxuICAgICAgICAuZmxhdCgpO1xuXG4gICAgICBjb25zdCB1bmlxV3JpdGFibGVBY2NvdW50cyA9IFtcbiAgICAgICAgLi4ubmV3IFNldCh3cml0YWJsZUFjY291bnRzLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b0Jhc2U1OCgpKSksXG4gICAgICBdXG4gICAgICAgIC5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9QdWJsaWNLZXkoKSlcbiAgICAgICAgLnNsaWNlKDAsIE1BWF9SRUNFTlRfUFJJT1JJVFlfRkVFX0FDQ09VTlRTKTtcblxuICAgICAgY29uc3QgcHJpb3JpdHlGZWVzID1cbiAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0UmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKHtcbiAgICAgICAgICBsb2NrZWRXcml0YWJsZUFjY291bnRzOiB1bmlxV3JpdGFibGVBY2NvdW50cyxcbiAgICAgICAgfSk7XG5cbiAgICAgIGlmIChwcmlvcml0eUZlZXMubGVuZ3RoIDwgMSkge1xuICAgICAgICBkZWJ1Z0xvZygnIyBnZXQgcmVjZW50IHByaW9yaXR5IGZlZXM6ICcsIHByaW9yaXR5RmVlcyk7XG4gICAgICAgIHJldHVybiAwO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBncm91cEJ5U2xvdCA9IHByaW9yaXR5RmVlcy5yZWR1Y2UoXG4gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGFjY1trZXldLnB1c2goZmVlKTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXT4sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtYXhGZWVCeVNsb3QgPSBPYmplY3Qua2V5cyhncm91cEJ5U2xvdCkucmVkdWNlKFxuICAgICAgICAoYWNjLCBzbG90KSA9PiB7XG4gICAgICAgICAgYWNjW3Nsb3RdID0gZ3JvdXBCeVNsb3Rbc2xvdF0ucmVkdWNlKChtYXgsIGZlZSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIGZlZS5wcmlvcml0aXphdGlvbkZlZSA+IG1heC5wcmlvcml0aXphdGlvbkZlZSA/IGZlZSA6IG1heDtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXM+LFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1heGltdW1GZWVzID0gT2JqZWN0LnZhbHVlcyhtYXhGZWVCeVNsb3QpLnNvcnQoXG4gICAgICAgIChhOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMsIGI6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcykgPT5cbiAgICAgICAgICBhLnNsb3QgLSBiLnNsb3QsXG4gICAgICApIGFzIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdO1xuXG4gICAgICAvLyBnZXQgbWVkaWFuIG9mIGxhc3QgMjAgZmVlc1xuICAgICAgY29uc3QgcmVjZW50RmVlcyA9IG1heGltdW1GZWVzLnNsaWNlKFxuICAgICAgICBNYXRoLm1heChtYXhpbXVtRmVlcy5sZW5ndGggLSAyMCwgMCksX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zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc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gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAg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AgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR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xuICAgICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICAgIG9wdGlvbnM6IFBhcnRpYWw8U3RvcmFnZU9wdGlvbnM+LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBvcHRpb25zOiBQYXJ0aWFsPFN0b3JhZ2VPcHRpb25zPiA9IHt9LFxuICAgICk6IFByb21pc2U8UHJvcGVydGllcz4gPT4ge1xuICAgICAgaWYgKCFpbnB1dCB8fCAhaW5wdXQuZmlsZXMpIHtcbiAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgfVxuXG4gICAgICBjb25zdCBmaWxlcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgICBpbnB1dC5maWxlcy5tYXAoYXN5bmMgKGZpbGUpID0+IHtcbiAgICAgICAgICBpZiAoIWZpbGUuZmlsZVBhdGggJiYgIWZpbGUudXJpKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoXG4gICAgICAgICAgICAgIGZpbGUuZmlsZVBhdGghLFxuICAgICAgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICAgICAgb3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZXhpc3RzS2V5OiAnZmlsZVBhdGgnLFxuICAgICAgICAgICAgICAgIHd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BvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgbWV0YWRhdGFzLFxuICAgIH07XG4gIH07XG5cbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IGNvbGxlY3Rpb24gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gY29sbGVjdGlvbk1pbnRcbiAgICogQHBhcmFtIHtib29sZWFufSBpc0NvbXByZXNzZWQsXG4gICAqIEBwYXJhbSB7UGFydGlhbDxGaW5kT3B0aW9ucz59IG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxDb21wcmVzc2VkTmZ0TWV0YWRhdGEsIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlDb2xsZWN0aW9uID0gYXN5bmMgKFxuICAgIGNvbGxlY3Rpb25NaW50OiBQdWJrZXksXG4gICAgaXNDb21wcmVzc2VkOiBib29sZWFuLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8RmluZE9wdGlvb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9uTWludCIsICJDb252ZXJ0ZXIiLCAiQ3JlYXRvcnMiLCAiaW1wb3J0X21wbF9idWJibGVndW1faW5zdHJ1Y3Rpb25zIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJEYXNBcGkiLCAiQ29udmVydGVyIiwgIkRhc0FwaSJdCn0K \ No newline at end of file diff --git a/packages/das-api/dist/index.mjs b/packages/das-api/dist/index.mjs index 8d2c4e8ea..12dc34988 100644 --- a/packages/das-api/dist/index.mjs +++ b/packages/das-api/dist/index.mjs @@ -18,7 +18,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -54,7 +54,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -110,13 +111,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1726,4 +1727,4 @@ var DasApi3 = { export { DasApi3 as DasApi }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcHJpb3JpdHktZmVlLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbXB1dGUtdW5pdC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3JldHJ5LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi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VyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGF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gZmVlUGF5ZXJzID0gY29tbW9uT3JNaW50SW5zdC5maWx0ZXIoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xu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ZSlcbiAgICAgICAgICAgIC5tYXAoKGtleSkgPT4ga2V5LnB1YmtleSksXG4gICAgICAgIClcbiAgICAgICAgLmZsYXQoKTtcblxuICAgICAgY29uc3QgdW5pcVdyaXRhYmxlQWNjb3VudHMgPSBbXG4gICAgICAgIC4uLm5ldyBTZXQod3JpdGFibGVBY2NvdW50cy5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9CYXNlNTgoKSkpLFxuICAgICAgXVxuICAgICAgICAubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvUHVibGljS2V5KCkpXG4gICAgICAgIC5zbGljZSgwLCBNQVhfUkVDRU5UX1BSSU9SSVRZX0ZFRV9BQ0NPVU5UUyk7XG5cbiAgICAgIGNvbnN0IHByaW9yaXR5RmVlcyA9XG4gICAgICAgIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyh7XG4gICAgICAgICAgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgIC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pIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIHRoaXMnKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IG5ldyBUcmFuc2FjdGlvbigpO1xuXG4gICAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVx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GlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ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yYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+IHtcbiAgICBjb25zdCByZXMgPSB0aGlzLm1hcChcbiAgICAgIGFzeW5jIChvaykgPT4ge1xuICAgICAgICAvLyBwYXJhbWV0ZXI6IHBhcnRpYWxTaWduIGhleEluc3RydWN0dXJlXG4gICAgICAgIGNvbnN0IGhleFJlZ2V4ID0gL15bMC05YS1mQS1GXSskLztcbiAgICAgICAgaWYgKHR5cGVvZiBvayA9PT0gJ3N0cmluZycgJiYgaGV4UmVnZXgudGVzdChvaykpIHtcbiAgICAgICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5QYXJ0aWFsU2lnbihvaykuc3VibWl0KG9wdGlvbnMpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGNvbnN0IG9iaiA9IG9rIGFzXG4gICAgICAgICAgICB8IENvbW1vblN0cnVjdHVyZVxuICAgICAgICAgICAgfCBNaW50U3RydWN0dXJlXG4gICAgICAgICAgICB8IFBhcnRpYWxTaWduU3RydWN0dXJlO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBvYmouc3VibWl0KG9wdGlvbnMpO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgKGVycikgPT4ge1xuICAgICAgICByZXR1cm4gZXJyO1xuICAgICAgfSxcbiAgICApO1xuICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgIHJldHVybiBSZXN1bHQuZXJyKHJlcy5lcnJvcik7XG4gICAgfVxuICAgIHJldHVybiByZXMudmFsdWU7XG4gIH1cbn1cblxuZGVjbGFyZSBnbG9iYWwge1xuICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi9cbiAgaW50ZXJmYWNlIEFycmF5PFQ+IHtcbiAgICBzdWJtaXQoXG4gICAgICBvcHRpb25zPzogUGFydGlhbDxTdWJtaXRPcHRpb25zPixcbiAgICApOiBQcm9taXNlPFJlc3V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lT3B0aW9ucz4gPSB7fSxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoICYmICFmaWxlLnVyaSkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZmlsZTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG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LmRlZmF1bHRPcHRpb25zLFxuICAgICAgLi4ub3B0aW9ucyxcbiAgICB9O1xuXG4gICAgY29uc3QgYXNzZXRzID0gYXdhaXQgQXBpLmdldEFzc2V0c0J5T3duZXIoXG4gICAgICBvd25lcixcbiAgICAgIGxpbWl0LFxuICAgICAgcGFnZSxcbiAgICAgIHNvcnRCeSxcbiAgICAgIGJlZm9yZSxcbiAgICAgIGFmdGVyLFxuICAgICk7XG4gICAgaWYgKGFzc2V0cy5pc0Vycikge1xuICAgICAgdGhyb3cgYXNzZXRzLmVycm9yO1xuICAgIH1cblxuICAgIGNvbnN0IGl0ZW1zID0gYXNzZXRzLnZhbHVlLml0ZW1zO1xuXG4gICAgY29uc3QgbWV0YWRhdGFzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICBpdGVtc1xuICAgICAgICAuZmlsdGVyKChpdGVtKSA9PiBpdGVtLmNvbXByZXNzaW9uLmNvbXByZXNzZWQgPT09IGlzQ29tcHJlc3NlZClcbiAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0uY29udGVudC5qc29uX3VyaS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ZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwuZGV2LnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBzd2l0Y2hGaWxlYmFzZUNyZWRlbnRpYWwgPSAoXG4gICAgZW52OiBzdHJpbmcsXG4gICk6IHtcbiAgICBrZXk6IHN0cmluZztcbiAgICBzZWNyZXQ6IHN0cmluZztcbiAgICBidWNrZXQ6IHN0cmluZztcbiAgfSA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLmtleSB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uuc2VjcmV0IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5GSUxFQkFTRV9DUkVERU5USUFMKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmtleSAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5zZWNyZXQgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHJldHVybi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1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAg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ICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVib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sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29tcHV0ZUJ1ZGdldFByb2dyYW0sXG4gIEtleXBhaXIsXG4gIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyxcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0I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ID0+IGFjY291bnQudG9CYXNlNTgoKSkpLFxuICAgICAgXVxuICAgICAgICAubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvUHVibGljS2V5KCkpXG4gICAgICAgIC5zbGljZSgwLCBNQVhfUkVDRU5UX1BSSU9SSVRZX0ZFRV9BQ0NPVU5UUyk7XG5cbiAgICAgIGNvbnN0IHByaW9yaXR5RmVlcyA9XG4gICAgICAgIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyh7XG4gICAgICAgICAgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAg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9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLFxuICBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbiAgVHJhbnNhY3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3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25hdHVyZSxcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgQ29uc3RhbnRzLCBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBQdWJrZXkgfSBmcm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BFcnJvcignTmVlZCBmZWVQYXllcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgZGVjb2RlID0gQnVmZmVyLmZyb20odGhpcy5oZXhJbnN0cnVjdGlvbiwgJ2hleCcpO1xuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IFRyYW5zYWN0aW9uLmZyb20oZGVjb2RlKTtcbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLnBhcnRpYWxTaWduKG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIGNvbnN0IHdpcmVUcmFuc2FjdGlvbiA9IHRyYW5zYWN0aW9uLnNlcmlhbGl6ZSgpO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5zZW5kUmF3VHJhbnNhY3Rpb24oXG4gICAgICAgICAgICB3aXJlVHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXRGb3JQYXJ0aWFsU2lnbihcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGh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gICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoICYmICFmaWxlLnVyaSkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZmlsZTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgb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lZm9yZSxcbiAgICAgIGFmdGVyLFxuICAgICk7XG4gICAgaWYgKGFzc2V0cy5pc0Vycikge1xuICAgICAgdGhyb3cgYXNzZXRzLmVycm9yO1xuICAgIH1cblxuICAgIGNvbnN0IGl0ZW1zID0gYXNzZXRzLnZhbHVlLml0ZW1zO1xuXG4gICAgY29uc3QgbWV0YWRhdGFzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICBpdGVtc1xuICAgICAgICAuZmlsdGVyKChpdGVtKSA9PiBpdGVtLmNvbXByZXNzaW9uLmNvbXByZXNzZWQgPT09IGlzQ29tcHJlc3NlZClcbiAgICAgICAgLm1hcChhc3luYyAoaXRlbSkgPT4ge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjb25zdCBvZmZjaGFpbjogT2ZmY2hhaW4gPSBhd2FpdCBmZXRjaE9mZmNoYWluKFxuICAgICAgICAgICAgICBpdGVtLmNvbnRlbnQuanNvbl91cmksXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgY29uc3QgbWVyZ2VkID0ge1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjogb2ZmY2hhaW4sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIobWVyZ2VkKTtcbiAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgIGRlYnVnTG9nKCcjIEZhaWxlZCBmZXRjaCBvZmZjaGFpbiB1cmw6ICcsIGl0ZW0uY29udGVudC5qc29uX3VyaSk7XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcih7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiB7fSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSksXG4gICAgKTtcbiAgICByZXR1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AiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJEYXNBcGkiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJEYXNBcGkiLCAiQ29udmVydGVyIiwgIkRhc0FwaSJdCn0K \ No newline at end of file diff --git a/packages/global/dist/index.js b/packages/global/dist/index.js index a075f38ec..0cc29eae7 100644 --- a/packages/global/dist/index.js +++ b/packages/global/dist/index.js @@ -45,7 +45,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -81,7 +81,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -137,13 +138,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1108,4 +1109,4 @@ Number.prototype.toSol = function() { Number.prototype.toLamports = function() { return (0, import_bignumber.BigNumber)(this).times(import_web312.LAMPORTS_PER_SOL).toNumber(); }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcHJpb3JpdHktZmVlLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbXB1dGUtdW5pdC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3JldHJ5LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW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c3Rlci5wcmQ6IHtcbiAgICAgICAgaWYgKGN1c3RvbURhc0FwaVVybC5sZW5ndGggPCAxKSB7XG4gICAgICAgICAgY29uc29sZS53YXJuKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaEZpbGViYXNlQ3JlZGVudGlhbCA9IChcbiAgICBlbnY6IHN0cmluZyxcbiAgKToge1xuICAgIGtleTogc3RyaW5nO1xuICAgIHNlY3JldDogc3RyaW5nO1xuICB9ID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgaWYgKCFDb25maWcuZmlsZWJhc2Uua2V5IHx8ICFDb25maWcuZmlsZWJhc2Uuc2VjcmV0KSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5GSUxFQkFTRV9DUkVERU5USUFMKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBpZ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gb2YgY29tbW9uT3JNaW50SW5zdCkge1xuICAgICAgICAgIGlmICghaW5zdC5pbnN0cnVjdGlvbnMgJiYgIWluc3Quc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoaW5zdCl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcChcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoKGluc3QpID0+IGluc3Quc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGNvbW1vbk9yTWludEluc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0LmZlZVBheWVyICE9PSB1bmRlZmluZWQsXG4gICAgICAgICk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQ2FsY3VsYXRlVHhzaXplLmlzTWF4VHJhbnNhY3Rpb25TaXplKHRyYW5zYWN0aW9uLCBmZWVQYXllci5wdWJsaWNLZXkpO1xuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IENvbnN0YW50cywgZGVidWdMb2csIFJlc3VsdCB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgQ29tbWl0bWVudCwgQ29ubmVjdGlvbiwgRmluYWxpdHkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuXG5leHBvcnQgbmFtZXNwYWNlIE5vZGUge1xuICBjb25zdCBzZXR0ZWQgPSB7XG4gICAgY2x1c3RlclVybDogJycsXG4gICAgY29tbWl0bWVudDogQ29uc3RhbnRzLkNPTU1JVE1FTlQsXG4gICAgY3VzdG9tQ2x1c3RlclVybDogW10gYXMgc3RyaW5nW10sXG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IGdldENvbm5lY3Rpb24gPSAoKTogQ29ubmVjdGlvbiA9PiB7XG4gICAgaWYg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4gYWNjb3VudC50b0Jhc2U1OCgpKSksXG4gICAgICBdXG4gICAgICAgIC5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9QdWJsaWNLZXkoKSlcbiAgICAgICAgLnNsaWNlKDAsIE1BWF9SRUNFTlRfUFJJT1JJVFlfRkVFX0FDQ09VTlRTKTtcblxuICAgICAgY29uc3QgcHJpb3JpdHlGZWVzID1cbiAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0UmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKHtcbiAgICAgICAgICBsb2NrZWRXcml0YWJsZUFjY291bnRzOiB1bmlxV3JpdGFibGVBY2NvdW50cyxcbiAgICAgICAgfSk7XG5cbiAgICAgIGlmIChwcmlvcml0eUZlZXMubGVuZ3RoIDwgMSkge1xuICAgICAgICBkZWJ1Z0xvZygnIyBnZXQgcmVjZW50IHByaW9yaXR5IGZlZXM6ICcsIHByaW9yaXR5RmVlcyk7XG4gICAgICAgIHJldHVybiAwO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBncm91cEJ5U2xvdCA9IHByaW9yaXR5RmVlcy5yZWR1Y2UoXG4gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGFjY1trZXldLnB1c2goZmVlKTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXT4sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtYXhGZWVCeVNsb3QgPSBPYmplY3Qua2V5cyhncm91cEJ5U2xvdCkucmVkdWNlKFxuICAgICAgICAoYWNjLCBzbG90KSA9PiB7XG4gICAgICAgICAgYWNj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BmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIEtleXBhaXIsXG4gIHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24sXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbkluc3R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WVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoTm9kZS5nZXRDb25uZWN0aW9uKCkucnBjRW5kcG9pbnQgPT09IENvbnN0YW50cy5FbmRQb2ludFVybC5wcmQpIHtcbiAgICAgICAgICBkZWJ1Z0xvZygnIyBDaGFuZ2UgbWV0YXBsZXggY2x1c3RlciBvbiBtYWlubmV0LWJldGEnKTtcbiAgICAgICAgICBOb2RlLmNoYW5nZUNvbm5lY3Rpb24oeyBjbHVzdGVyOiBDb25zdGFudHMuQ2x1c3Rlci5wcmRNZXRhcGxleCB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9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gICAgIHRocm93IEVycm9yKCdOZWVkIGZlZVBheWVyJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBkZWNvZGUgPSBCdWZmZXIuZnJvbSh0aGlzLmhleEluc3RydWN0aW9uLCAnaGV4Jyk7XG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gVHJhbnNhY3Rpb24uZnJvbShkZWNvZGUpO1xuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgdHJhbnNhY3Rpb24ucGFydGlhbFNpZ24ob3B0aW9ucy5mZWVQYXllci50b0tleXBhaXIoKSk7XG4gICAgICAgICAgY29uc3Qgd2lyZVRyYW5zYWN0aW9uID0gdHJhbnNhY3Rpb24uc2VyaWFsaXplKCk7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLnNlbmRSYXdUcmFuc2FjdGlvbihcbiAgICAgICAgICAgIHdpcmVUcmFuc2FjdGlvbixcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdEZvclBhcnRpYWxTaWduKFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgb3B0aW9ucy5mZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbi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0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkI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XVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaEZpbGViYXNlQ3JlZGVudGlhbCA9IChcbiAgICBlbnY6IHN0cmluZyxcbiAgKToge1xuICAgIGtleTogc3RyaW5nO1xuICAgIHNlY3JldDogc3RyaW5nO1xuICAgIGJ1Y2tldDogc3RyaW5nO1xuICB9ID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uua2V5IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5zZWNyZXQgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcihDb25zdGFudHMuV2Fybm5pbmdNZXNzYWdlLkZJTEVCQVNFX0NSRURFTlRJQUwpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uua2V5ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLnNlY3JldCAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gRmlsZWJhc2VDcmVkZW50aWF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ICAgLy8gQ2FsY3VsYXRlVHhzaXplLmlzTWF4VHJhbnNhY3Rpb25TaXplKHRyYW5zYWN0aW9uLCBmZWVQYXllci5wdWJsaWNLZXkpO1xuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpb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VTlRTKTtcblxuICAgICAgY29uc3QgcHJpb3JpdHlGZWVzID1cbiAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0UmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKHtcbiAgICAgICAgICBsb2NrZWRXcml0YWJsZUFjY291bnRzOiB1bmlxV3JpdGFibGVBY2NvdW50cyxcbiAgICAgICAgfSk7XG5cbiAgICAgIGlmIChwcmlvcml0eUZlZXMubGVuZ3RoIDwgMSkge1xuICAgICAgICBkZWJ1Z0xvZygnIyBnZXQgcmVjZW50IHByaW9yaXR5IGZlZXM6ICcsIHByaW9yaXR5RmVlcyk7XG4gICAgICAgIHJldHVybiAwO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBncm91cEJ5U2xvdCA9IHByaW9yaXR5RmVlcy5yZWR1Y2UoXG4gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGFjY1trZXldLnB1c2goZmVlKTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXT4sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtYXhGZWVCeVNsb3QgPSBPYmplY3Qua2V5cyhncm91cEJ5U2xvdCkucmVkdWNlKFxuICAgICAgICAoYWNjLCBzbG90KSA9PiB7XG4gICAgICAgICAgYWNjW3Nsb3RdID0gZ3JvdXBCeVNsb3Rbc2xvdF0ucmVkdWNlKChtYXgsIGZlZSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIGZlZS5wcmlvcml0aXphdGlvbkZlZSA+IG1heC5wcmlvcml0aXphdGlvbkZlZSA/IGZlZSA6IG1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0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIEtleXBhaXIsXG4gIHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24sXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbkluc3RydWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25hdHVyZSxcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgQ29uc3RhbnRzLCBkZWJ1Z0xvZywgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV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5zYWN0aW9uID0gVHJhbnNhY3Rpb24uZnJvbShkZWNvZGUpO1xuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgdHJhbnNhY3Rpb24ucGFydGlhbFNpZ24ob3B0aW9ucy5mZWVQYXllci50b0tleXBhaXIoKSk7XG4gICAgICAgICAgY29uc3Qgd2lyZVRyYW5zYWN0aW9uID0gdHJhbnNhY3Rpb24uc2VyaWFsaXplKCk7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLnNlbmRSYXdUcmFuc2FjdGlvbihcbiAgICAgICAgICAgIHdpcmVUcmFuc2FjdGlvbixcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdEZvclBhcnRpYWxTaWduKFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgb3B0aW9ucy5mZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IFB1YmxpY0tleSwgVHJhbnNhY3Rpb24gfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuXG4vLyBA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mUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0c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end of file diff --git a/packages/global/dist/index.mjs b/packages/global/dist/index.mjs index 2ce7d8b5a..a9441df0f 100644 --- a/packages/global/dist/index.mjs +++ b/packages/global/dist/index.mjs @@ -21,7 +21,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -57,7 +57,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -113,13 +114,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1112,4 +1113,4 @@ Number.prototype.toSol = function() { Number.prototype.toLamports = function() { return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcHJpb3JpdH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BFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBpZiAoIW9wdGlvbnMuaW5zdHJ1Y3Rpb25zKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ05vdCBmb3VuZCBvcHRpb25zLmluc3RydWN0aW9ucycpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGNvbW1vbk9yTWludEluc3QgPSBvcHRpb25zLmluc3RydWN0aW9ucztcbiAgICAgICAgbGV0IGkgPSAwO1xuICAgICAgICBmb3IgKGNvbnN0IGluc3Qgb2YgY29tbW9uT3JNaW50SW5zdCkge1xuICAgICAgICAgIGlmICghaW5zdC5pbnN0cnVjdGlvbnMgJiYgIWluc3Quc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoaW5zdCl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcChcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoKGluc3QpID0+IGluc3Quc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGNvbW1vbk9yTWludEluc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0LmZlZVBheWVyICE9PSB1bmRlZmluZWQsXG4gICAgICAgICk7XG4gICAgICA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gaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IENvbnN0YW50cywgZGVidWdMb2csIFJlc3VsdCB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgQ29tbWl0bWVudCwgQ29ubmVjdGlvb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xuICAgICAgICAubWFwKChpbnN0KSA9PlxuICAgICAgICAgIGluc3Qua2V5c1xuICAgICAgICAgICAgLmZpbHRlcigoYWNjb3VudCkgPT4gYWNjb3VudC5pc1dyaXRhYmxlKVxuICAgICAgICAgICAgLm1hcCgoa2V5KSA9PiBrZXkucHVia2V5KSxcbiAgICAgICAgKVxuICAgICAgICAuZmxhdCgpO1xuXG4gICAgICBjb25zdCB1bmlxV3JpdGFibGVBY2NvdW50cyA9IFtcbiAgICAgICAgLi4ubmV3IFNldCh3cml0YWJsZUFjY291bnRzLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b0Jhc2U1OCgpKSksXG4gICAgICBdXG4gICAgICAgIC5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9QdWJsaWNLZXkoKSlcbiAgICAgICAgLnNsaWNlKDAsIE1BWF9SRUNFTlRfUFJJT1JJVFlfRkVFX0FDQ09VTlRTKTtcblxuICAgICAgY29uc3QgcHJpb3JpdHlGZWVzID1cbiAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0UmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKHtcbiAgICAgICAgICBsb2NrZWRXcml0YWJsZUFjY291bnRzOiB1bmlxV3JpdGFibGVBY2NvdW50cyxcbiAgICAgICAgfSk7XG5cbiAgICAgIGlmIChwcmlvcml0eUZlZXMubGVuZ3RoIDwgMSkge1xuICAgICAgICBkZWJ1Z0xvZygnIyBnZXQgcmVjZW50IHByaW9yaXR5IGZlZXM6ICcsIHByaW9yaXR5RmVlcyk7XG4gICAgICAgIHJldHVybiAwO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBncm91cEJ5U2xvdCA9IHByaW9yaXR5RmVlcy5yZWR1Y2UoXG4gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGFjY1trZXldLnB1c2goZmVlKTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXT4sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtYXhGZWVCeVNsb3QgPSBPYmplY3Qua2V5cyhncm91cEJ5U2xvdCkucmVkdWNlKFxuICAgICAgICAoYWNjLCBzbG90KSA9PiB7XG4gICAgICAgICAgYWNjW3Nsb3RdID0gZ3JvdXBCeVNsb3Rbc2xvdF0ucmVkdWNlKChtYXgsIGZlZSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIGZlZS5wcmlvcml0aXphdGlvbkZlZSA+IG1heC5wcmlvcml0aXphdGlvbkZlZSA/IGZlZSA6IG1heDtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXM+LFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1heGltdW1GZWVzID0gT2JqZWN0LnZhbHVlcyhtYXhGZWVCeVNsb3QpLnNvcnQoXG4gICAgICAgIChhOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMsIGI6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcykgPT5cbiAgICAgICAgICBhLnNsb3QgLSBiLnNsb3QsXG4gICAgICApIGFzIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdO1xuXG4gICAgICAvLyBnZXQgbWVkaWFuIG9mIGxhc3QgMjAgZmVlc1xuICAgICAgY29uc3QgcmVjZW50RmVlcyA9IG1heGltdW1GZWVzLnNsaWNlKFxuICAgICAgICBNYXRoLm1heChtYXhpbXVtRmVlcy5sZW5ndGggLSAyMCwgMCksXG4gICAgICAp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3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvb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AgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG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nVjdGlvbiA9IGFzeW5jIChcbiAgICAgIG1pbnQ6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcj86IFB1YmtleSxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5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gdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaEZpbGViYXNlQ3JlZGVudGlhbCA9IChcbiAgICBlbnY6IHN0cmluZyxcbiAgKToge1xuICAgIGtleTogc3RyaW5nO1xuICAgIHNlY3JldDogc3RyaW5nO1xuICAgIGJ1Y2tldDogc3RyaW5nO1xuICB9ID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uua2V5IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5zZWNyZXQgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcihDb25zdGFudHMuV2Fybm5pbmdNZXNzYWdlLkZJTEVCQVNFX0NSRURFTlRJQUwpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uua2V5ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLnNlY3JldCAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gRmlsZWJhc2VDcmVkZW50aWFsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IGxvYWRDb25maWcgPSBhc3luYyAoKSA9PiB7XG4gICAgY29uc3QgeyBkZWZhdWx0OiBs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pb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ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ZWVzKHtcbiAgICAgICAgICBsb2NrZWRXcml0YWJsZUFjY291bnRzOiB1bmlxV3JpdGFibGVBY2NvdW50cyxcbiAgICAgICAgfSk7XG5cbiAgICAgIGlmIChwcmlvcml0eUZlZXMubGVuZ3RoIDwgMSkge1xuICAgICAgICBkZWJ1Z0xvZygnIyBnZXQgcmVjZW50IHByaW9yaXR5IGZlZXM6ICcsIHByaW9yaXR5RmVlcyk7XG4gICAgICAgIHJldHVybiAwO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBncm91cEJ5U2xvdCA9IHByaW9yaXR5RmVlcy5yZWR1Y2UoXG4gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGFjY1trZXldLnB1c2goZmVlKTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXT4sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtYXhGZWVCeVNsb3QgPSBPYmplY3Qua2V5cyhncm91cEJ5U2xvdCkucmVkdWNlKFxuICAgICAgICAoYWNjLCBzbG90KSA9PiB7XG4gICAgICAgICAgYWNjW3Nsb3RdID0gZ3JvdXBCeVNsb3Rbc2xvdF0ucmVkdWNlKChtYXgsIGZlZSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIGZlZS5wcmlvcml0aXphdGlvbkZlZSA+IG1heC5wcmlvcml0aXphdGlvbkZlZSA/IGZlZSA6IG1heDtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdG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IGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXk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uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiQWNjb3VudCIsICJBc3NvY2lhdGVkIiwgIlB1YmxpY0tleSIsICJBY2NvdW50IiwgIktleXBhaXIiLCAiUHVibGljS2V5IiwgIkFjY291bnQiLCAiUGRhIiwgIkFjY291bnQiLCAiYnMiLCAiQWNjb3VudCIsICJQdWJsaWNLZXkiLCAiS2V5cGFpciJdCn0K \ No newline at end of file diff --git a/packages/node/dist/index.js b/packages/node/dist/index.js index 4dc17fd50..65a942de3 100644 --- a/packages/node/dist/index.js +++ b/packages/node/dist/index.js @@ -54,7 +54,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -90,7 +90,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -146,13 +147,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1124,4 +1125,4 @@ var Node; 0 && (module.exports = { Node }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3ByaW9yaXR5LWZlZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21wdXRlLXVuaXQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9yZXRyeS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL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ICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY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yxcbiAgICAgICAgKTtcbiAgICAgICAgY29uc3Qgc2lnbmVycyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcCgoaW5zdCkgPT4gaW5zdC5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gY29tbW9uT3JNaW50SW5zdC5maWx0ZXIoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxu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0cnVjdGlvbnNcbiAgICAgICAgLm1hcCgoaW5zdCkgPT5cbiAgICAgICAgICBpbnN0LmtleXNcbiAgICAgICAgICAgIC5maWx0ZXIoKGFjY291bnQpID0+IGFjY291bnQuaXNXcml0YWJsZSlcbiAgICAgICAgICAgIC5tYXAoKGtleSkgPT4ga2V5LnB1YmtleSksXG4gICAgICAgIClcbiAgICAgICAgLmZsYXQoKTtcblxuICAgICAgY29uc3QgdW5pcVdyaXRhYmxlQWNjb3VudHMgPSBbXG4gICAgICAgIC4uLm5ldyBTZXQod3JpdGFibGVBY2NvdW50cy5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9CYXNlNTgoKSkpLFxuICAgICAgXVxuICAgICAgICAubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvUHVibGljS2V5KCkpXG4gICAgICAgIC5zbGljZSgwLCBNQVhfUkVDRU5UX1BSSU9SSVRZX0ZFRV9BQ0NPVU5UUyk7XG5cbiAgICAgIGNvbnN0IHByaW9yaXR5RmVlcyA9XG4gICAgICAgIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyh7XG4gICAgICAgICAgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICAgICAoYTogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzLCBiOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMpID0+XG4gICAgICAgICAgYS5zbG90IC0gYi5zbG90LFxuICAgICAgKSBhcyBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXTtcblxuICAgICAgLy8gZ2V0IG1lZGlhbiBvZiBsYXN0IDIwIGZlZXNcbiAgICAgIGNvbnN0IHJlY2VudEZlZXMgPSBtYXhpbXVtRmVlcy5zbGljZShcbiAgICAgICAgTWF0aC5tYXgobWF4aW11bUZlZXMubGVuZ3RoIC0gMjAs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AgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgI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uICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xu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8tZXhwbGljaXQtYW55ICovXG4gIGFzeW5jIHN1Ym1pdChcbiAgICBvcHRpb25zOiBQYXJ0aWFsPFN1Ym1pdE9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+IHtcbiAgICBjb25zdCByZXMgPSB0aGlzLm1hcChcbiAgICAgIGFzeW5jIChvaykgPT4ge1xuICAgICAgICAvLyBwYXJhbWV0ZXI6IHBhcnRpYWxTaWduIGhleEluc3RydWN0dXJlXG4gICAgICAgIGNvbnN0IGhleFJlZ2V4ID0gL15bMC05YS1mQS1GXSskLztcbiAgICAgICAgaWYgKHR5cGVvZiBvayA9PT0gJ3N0cmluZycgJiYgaGV4UmVnZXgudGVzdChvaykpIHtcbiAgICAgICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5QYXJ0aWFsU2lnbihvaykuc3VibWl0KG9wdGlvbnMpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGNvbnN0IG9iaiA9IG9rIGFzXG4gICAgICAgICAgICB8IENvbW1vblN0cnVjdHVyZVxuICAgICAgICAgICAgfCBNaW50U3RydWN0dXJlXG4gICAgICAgICAgICB8IFBhcnRpYWxTaWduU3RydWN0dXJlO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBvYmouc3VibWl0KG9wdGlvbnMpO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgKGVycikgPT4ge1xuICAgICAgICByZXR1cm4gZXJyO1xuICAgICAgfSxcbiAgICApO1xuICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgIHJldHVybiBSZXN1bHQuZXJyKHJlcy5lcnJvcik7XG4gICAgfVxuICAgIHJldHVybiByZXMudmFsdWU7XG4gIH1cbn1cblxuZGVjbGFyZSBnbG9iYWwge1xuICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcn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uICAgIH1cblxuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoY3VzdG9tRGFzQXBpVXJsLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgICBjb25zb2xlLndhcm4oQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5EQVNfQVBJX1VSTCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIH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IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczog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FtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhw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W5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29tcHV0ZUJ1ZGdldFByb2dyYW0sXG4gIEtleXBhaXIsXG4gIFJlY2VudFByaW9yaXRpemF0aW9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W5pcVdyaXRhYmxlQWNjb3VudHMgPSBbXG4gICAgICAgIC4uLm5ldyBTZXQod3JpdGFibGVBY2NvdW50cy5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9CYXNlNTgoKSkpLFxuICAgICAgXVxuICAgICAgICAubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvUHVibGljS2V5KCkpXG4gICAgICAgIC5zbGljZSgwLCBNQVhfUkVDRU5UX1BSSU9SSVRZX0ZFRV9BQ0NPVU5UUyk7XG5cbiAgICAgIGNvbnN0IHByaW9yaXR5RmVlcyA9XG4gICAgICAgIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyh7XG4gICAgICAgICAgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQn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uICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IG5ldyBUcmFuc2FjdGlvbigpO1xuXG4gICAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLFxuICBzZW5kQW5kQ29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AgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25hdHVyZSxcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgQ29uc3RhbnRzLCBSZXN1bHQsIFRyeSB9IGZyb20gJ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WNjb3VudCIsICJicyIsICJpbXBvcnRfd2ViMyIsICJpbXBvcnRfd2ViMyIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiQ29tcHV0ZVVuaXQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlByaW9yaXR5RmVlIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXRyeSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVzdWx0IiwgImltcG9ydF93ZWIzIiwgIk5vZGUiXQp9Cg== \ No newline at end of file diff --git a/packages/node/dist/index.mjs b/packages/node/dist/index.mjs index dd4dcf74b..a4de57f5f 100644 --- a/packages/node/dist/index.mjs +++ b/packages/node/dist/index.mjs @@ -18,7 +18,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -54,7 +54,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -110,13 +111,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1115,4 +1116,4 @@ var Node; export { Node }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcHJpb3JpdHktZmVlLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbXB1dGUtdW5pdC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3JldHJ5LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxh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SxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlc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Y2UgVHJhbnNhY3Rpb25CdWlsZGVyIHtcbiAgZXhwb3J0IGNsYXNzIEJhdGNoIHtcbiAgICBzdWJtaXQgPSBhc3luYyAoXG4gICAgICBvcHRpb25zOiBQYXJ0aWFsPEJhdGNoU3VibWl0T3B0aW9ucz4gPSB7fSxcbiAgICApOiBQcm9taXNlPFJlc3VsdDxUcmFuc2FjdGlvblNpZ25hdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgICByZXR1cm4gVHJ5KGFzeW5jICgpID0+IHtcbiAgICAgICAgaWYgKCFvcHRpb25zLmluc3RydWN0aW9ucykge1xuICAgICAgICAgIHRocm93IEVycm9yKCdOb3QgZm91bmQgb3B0aW9ucy5pbnN0cnVjdGlvbnMnKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBjb21tb25Pck1pbnRJbnN0ID0gb3B0aW9ucy5pbnN0cnVjdGlvbnM7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBpbnN0IG9mIGNvbW1vbk9yTWludEluc3QpIHtcbiAgICAgICAgICBpZiAoIWluc3QuaW5zdHJ1Y3Rpb25zICYmICFpbnN0LnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGluc3QpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICApO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gY29tbW9uT3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AgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTt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AgICAgICAubWFwKChpbnN0KSA9PlxuICAgICAgICAgIGluc3Qua2V5c1xuICAgICAgICAgICAgLmZpbHRlcigoYWNjb3VudCkgPT4gYWNjb3VudC5pc1dyaXRhYmxlKVxuICAgICAgICAgICAgLm1hcCgoa2V5KSA9PiBrZXkucHVia2V5KSxcbiAgICAgICAgKVxuICAgICAgICAuZmxhdCgpO1xuXG4gICAgICBjb25zdCB1bmlxV3JpdGFibGVBY2NvdW50cyA9IFtcbiAgICAgICAgLi4ubmV3IFNldCh3cml0YWJsZUFjY291bnRzLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b0Jhc2U1OCgpKSksXG4gICAgICBdXG4gICAgICAgIC5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9QdWJsaWNLZXkoKSlcbiAgICAgICAgLnNsaWNlKDAsIE1BWF9SRUNFTlRfUFJJT1JJVFlfRkVFX0FDQ09VTlRTKTtcblxuICAgICAgY29uc3QgcHJpb3JpdHlGZWVzID1cbiAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0UmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKHtcbiAgICAgICAgICBsb2NrZWRXcml0YWJsZUFjY291bnRzOiB1bmlxV3JpdGFibGVBY2NvdW50cyxcbiAgICAgICAgfSk7XG5cbiAgICAgIGlmIChwcmlvcml0eUZlZXMubGVuZ3RoIDwgMSkge1xuICAgICAgICBkZWJ1Z0xvZygnIyBnZXQgcmVjZW50IHByaW9yaXR5IGZlZXM6ICcsIHByaW9yaXR5RmVlcyk7XG4gICAgICAgIHJldHVybiAwO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBncm91cEJ5U2xvdCA9IHByaW9yaXR5RmVlcy5yZWR1Y2UoXG4gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGFjY1trZXldLnB1c2goZmVlKTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXT4sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtYXhGZWVCeVNsb3QgPSBPYmplY3Qua2V5cyhncm91cEJ5U2xvdCkucmVkdWNlKFxuICAgICAgICAoYWNjLCBzbG90KSA9PiB7XG4gICAgICAgICAgYWNjW3Nsb3RdID0gZ3JvdXBCeVNsb3Rbc2xvdF0ucmVkdWNlKChtYXgsIGZlZSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIGZlZS5wcmlvcml0aXphdGlvbkZlZSA+IG1heC5wcmlvcml0aXphdGlvbkZlZSA/IGZlZSA6IG1heDtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXM+LFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1heGltdW1GZWVzID0gT2JqZWN0LnZhbHVlcyhtYXhGZWVCeVNsb3QpLnNvcnQoXG4gICAgICAgIChhOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMsIGI6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcykgPT5cbiAgICAgICAgICBhLnNsb3QgLSBiLnNsb3QsXG4gICAgICApIGFzIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdO1xuXG4gICAgICAvLyBnZXQgbWVkaWFuIG9mIGxhc3QgMjAgZmVlc1xuICAgICAgY29uc3QgcmVjZW50RmVlcyA9IG1heGltdW1GZWVzLnNsaWNlKFxuICAgICAgICBNYXRoLm1heChtYXhpbXVtRmVlcy5sZW5ndGggLSAyMCwgMCksXG4gICAgICApO1x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pb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcb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ApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gIC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6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwuZGV2LnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBzd2l0Y2hGaWxlYmFzZUNyZWRlbnRpYWwgPSAoXG4gICAgZW52OiBzdHJpbmcsXG4gICk6IHtcbiAgICBrZXk6IHN0cmluZztcbiAgICBzZWNyZXQ6IHN0cmluZztcbiAgICBidWNrZXQ6IHN0cmluZztcbiAgfSA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLmtleSB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uuc2VjcmV0IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5GSUxFQkFTRV9DUkVERU5USUFMKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmtleSAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5zZWNyZXQgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEZpbGViYXNlQ3JlZGVudG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ICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRvU3RyaW5nKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLnB1YmtleSA9IHBhcmFtcy5wdWJrZXk7XG4gICAgICB9XG4gICAgICB0aGlzLnNlY3JldCA9IHBhcmFtcy5zZWNyZXQ7XG4gICAgfVxuXG4gICAgdG9QdWJs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ICAgICBpZiAoIWluc3QuaW5zdHJ1Y3Rpb25zICYmICFpbnN0LnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGluc3QpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICApO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKChpbnN0KSA9PiBpbnN0LnNpZ25lcnMpO1xuICAgICAgICBjb25zdCBmZWVQYXllcnMgPSBjb21tb25Pck1pbnRJbnN0LmZpbHRlcihcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5mZWVQYXllciAhPT0gdW5kZWZpbmVkLFxuICAgICAgICApO1xuICAgICAgICBsZXQgZmVlUGF5ZXIgPSBzaWduZXJzWzBdO1xuICAgICAgICBpZiAoZmVlUGF5ZXJzLmxlbmd0aCA+IDAgJiYgZmVlUGF5ZXJzWzBdLmZlZVBheWVyKSB7XG4gICAgICAgICAgZmVlUGF5ZXIgPSBmZWVQYXllcnNbMF0uZmVlUGF5ZXI7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IG5ldyBUcmFuc2FjdGlvbigpO1xuICAgICAgICBsZXQgZmluYWxTaWduZXJzID0gc2lnbmVycztcbiAgICAgICAgaWYgKGZlZVBheWVyKSB7XG4gICAgICAgICAgdHJhbnNhY3Rpb24uZmVlUGF5ZXIgPSBmZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW2ZlZVBheWVyLCAuLi5zaWduZXJzXTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIENhbGN1bGF0ZVR4c2l6ZS5pc01heFRyYW5zYWN0aW9uU2l6ZSh0cmFuc2FjdGlvbiwgZmVlUGF5ZXIucHVibGljS2V5KTtcblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgICBhd2FpdCBQcmlvcml0eUZlZS5Qcmlvcml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm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uKCkuZ2V0UmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKHtcbiAgICAgICAgICBsb2NrZWRXcml0YWJsZUFjY291bnRzOiB1bmlxV3JpdGFibGVBY2NvdW50cyxcbiAgICAgICAgfSk7XG5cbiAgICAgIGlmIChwcmlvcml0eUZlZXMubGVuZ3RoIDwgMSkge1xuICAgICAgICBkZWJ1Z0xvZygnIyBnZXQgcmVjZW50IHByaW9yaXR5IGZlZXM6ICcsIHByaW9yaXR5RmVlcyk7XG4gICAgICAgIHJldHVybiAwO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBncm91cEJ5U2xvdCA9IHByaW9yaXR5RmVlcy5yZWR1Y2UoXG4gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGFjY1trZXldLnB1c2goZmVlKTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXT4sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtYXhGZWVCeVNsb3QgPSBPYmplY3Qua2V5cyhncm91cEJ5U2xvdCkucmVkdWNlKFxuICAgICAgICAoYWNjLCBzbG90KSA9PiB7XG4gICAgICAgICAgYWNjW3Nsb3RdID0gZ3JvdXBCeVNsb3Rbc2xvdF0ucmVkdWNlKChtYXgsIGZlZSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIGZlZS5wcmlvcml0aXphdGlvbkZlZSA+IG1heC5wcmlvcml0aXphdGlvbkZlZSA/IGZlZSA6IG1heDtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvc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ouYmxvY2toYXNoO1xuICAgICAgICBsZXQgZmluYWxTaWduZXJzID0gdGhpcy5zaWduZXJzO1xuXG4gICAgICAgIGlmICh0aGlzLmZlZVBheWVyKSB7XG4gICAgICAgICAgdHJhbnNhY3Rpb24uZmVlUGF5ZXIgPSB0aGlzLmZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbdGhpcy5mZWVQYXllciwgLi4udGhpcy5zaWduZXJzXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHM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--git a/packages/suite-airdrop/dist/index.js b/packages/suite-airdrop/dist/index.js index e00ca5645..df6f1dd2d 100644 --- a/packages/suite-airdrop/dist/index.js +++ b/packages/suite-airdrop/dist/index.js @@ -54,7 +54,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -90,7 +90,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -146,13 +147,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1148,4 +1149,4 @@ var Airdrop; 0 && (module.exports = { Airdrop }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3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FJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS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ml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQo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gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGFjY1trZXldLnB1c2goZmVlKTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXT4sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtYXhGZWVCeVNsb3QgPSBPYmplY3Qua2V5cyhncm91cEJ5U2xvdCkucmVkdWNlKFxuICAgICAgICAoYWNjLCBzbG90KSA9PiB7XG4gICAgICAgICAgYWNjW3Nsb3RdID0gZ3JvdXBCeVNsb3Rbc2xvdF0ucmVkdWNlKChtYXgsIGZlZSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIGZlZS5wcmlvcml0aXphdGlvbkZlZSA+IG1heC5wcmlvcml0aXphdGlvbkZlZSA/IGZlZSA6IG1heDtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXM+LFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1heGltdW1GZWVzID0gT2JqZWN0LnZhbHVlcyhtYXhGZWVCeVNsb3QpLnNvcnQoXG4gICAgICAgIChhOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMsIGI6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcykgPT5cbiAgICAgICAgICBhLnNsb3QgLSBiLnNsb3QsXG4gICAgICApIGFzIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdO1xuXG4gICAgICAvLyBnZXQgbWVkaWFuIG9mIGxhc3QgMjAgZmVlc1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0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wd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uaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHR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luZGV4ID0gRGF0ZS5ub3coKSAlIGN1c3RvbURhc0FwaVVybC5sZW5ndGg7XG4gICAgICByZXR1cm4gY3VzdG9tRGFzQXBpVXJsW2luZGV4XTtcbiAgICB9XG5cbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgaWYgKGN1c3RvbURhc0FwaVVybC5sZW5ndGggPCAxKSB7XG4gICAgICAgICAgY29uc29sZS53YXJuKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaEZpbGViYXNlQ3JlZGVudGlhbCA9IChcbiAgICBlbnY6IHN0cmluZyxcbiAgKToge1xuICAgIGtleTogc3RyaW5nO1xuICAgIHNlY3JldDogc3RyaW5nO1xuICAgIGJ1Y2tldDogc3RyaW5nO1xuICB9ID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uua2V5IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5zZWNyZXQgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcihDb25zdGFudHMuV2Fybm5pbmdNZXNzYWdlLkZJTEVCQVNFX0NSRURFTlRJQUwpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uua2V5ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLnNlY3JldCAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gRmlsZWJhc2VDcmVkZW50aWFsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IGxvYWRDb25maWcgPSBhc3luYyAoKSA9PiB7XG4gICAgY29uc3QgeyBkZWZhdWx0OiBsb2FkZWRDb25maWcgfSA9IGF3YWl0IGltcG9ydChcbiAgICAgICdAc29sYW5hLXN1aXRlL2NvbmZpZy9sb2FkJyxcbiAgICAgIHtcbiAgICAgICAgd2l0aDogeyB0eXBlOiAnanNvbicgfSxcbiAgICAgIH1cbiAgICApO1xuICAgIENvbmZpZyA9IGxvYWRlZENvbmZpZztcbiAgICBjb25zb2xlLmxvZygnIyMjIyMjIyMjIyMjIyMnLCBDb25maWcpO1xuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBXUkFQUEVEX1RPS0VOX1BST0dSQU1fSUQgPSBuZXcgUHVibGljS2V5KFxuICAgICdTbzExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEyJyxcbiAgKTtcbiAgZXhwb3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ICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAia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ZlZS5Qcmlvcml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRy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ZWR1Y2UoXG4gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGFjY1trZXldLnB1c2goZmVlKTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXT4sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtYXhGZWVCeVNsb3QgPSBPYmplY3Qua2V5cyhncm91cEJ5U2xvdCkucmVkdWNlKFxuICAgICAgICAoYWNjLCBzbG90KSA9PiB7XG4gICAgICAgICAgYWNjW3Nsb3RdID0gZ3JvdXBCeVNsb3Rbc2xvdF0ucmVkdWNlKChtYXgsIGZlZSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIGZlZS5wcmlvcml0aXphdGlvbkZlZSA+IG1heC5wcmlvcml0aXphdGlvbkZlZSA/IGZlZSA6IG1heDtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXM+LFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1heGltdW1GZWVzID0gT2JqZWN0LnZhbHVlcyhtYXhGZWVCeVNsb3QpLnNvcnQoXG4gICAgICAgIChhOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMsIGI6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcykgPT5cbiAgICAgICAgICBhLnNsb3QgLSBiLnNsb3QsXG4gICAgICApIGFzIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdO1xuXG4gICAgICAvLyBnZXQgbWVkaWFuIG9mIGxhc3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ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0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AgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAg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nQiLCAiUGRhIiwgIk1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRCIsICJCTiIsICJBY2NvdW50IiwgImltcG9ydF9iczU4IiwgIkFjY291bnQiLCAiYnMiLCAiaW1wb3J0X3dlYjMiLCAiaW1wb3J0X3dlYjMiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIkNvbXB1dGVVbml0IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJQcmlvcml0eUZlZSIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmV0cnkiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJBaXJkcm9wIl0KfQo= \ No newline at end of file diff --git a/packages/suite-airdrop/dist/index.mjs b/packages/suite-airdrop/dist/index.mjs index 8f2a5447b..be48ebb65 100644 --- a/packages/suite-airdrop/dist/index.mjs +++ b/packages/suite-airdrop/dist/index.mjs @@ -18,7 +18,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -54,7 +54,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -110,13 +111,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1139,4 +1140,4 @@ var Airdrop; export { Airdrop }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcHJpb3JpdHktZmVlLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbXB1dGUtdW5pdC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3JldHJ5LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvb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lxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUF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0IHRoYXQgY2FuIHVzZSBiYXRjaFN1Ym1pdCgpLlxuICAgICAgICAgICAgSW5kZXg6ICR7aX0sIFNldCB2YWx1ZTogJHtKU09OLnN0cmluZ2lmeShpbnN0KX1gLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaSsrO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0Lmluc3RydWN0aW9ucyxcbiAgICAgICAgKTtcbiAgICAgICAgY29uc3Qgc2lnbmVycyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcCgoaW5zdCkgPT4gaW5zdC5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gY29tbW9uT3JNaW50SW5zdC5maWx0ZXIoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdW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bmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICAgICAoYTogUmVjZW50UHJpb3J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gICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlv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aW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZ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gICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwuZGV2LnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBzd2l0Y2hGaWxlYmFzZUNyZWRlbnRpYWwgPSAoXG4gICAgZW52OiBzdHJpbmcsXG4gICk6IHtcbiAgICBrZXk6IHN0cmluZztcbiAgICBzZWNyZXQ6IHN0cmluZztcbiAgICBidWNrZXQ6IHN0cmluZztcbiAgfSA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLmtleSB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uuc2VjcmV0IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5GSUxFQkFTRV9DUkVERU5USUFMKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmtleSAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5zZWNyZXQgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHJldHVybiBDb25maWcuZmlsZW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QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlw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mVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQ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mIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29tcHV0ZUJ1ZGdldFByb2dyYW0sXG4gIEtleXBhaXIsXG4gIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyxcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgZGVidWdMb2cg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IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLFxuICBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1c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AgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25hdHVyZSxcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgQ29uc3RhbnRzLCBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBQdWJrZXkgfSBmcm9tICd+L3R5cGVzL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BmZWVQYXllcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgZGVjb2RlID0gQnVmZmVyLmZyb20odGhpcy5oZXhJbnN0cnVjdGlvbiwgJ2hleCcpO1xuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IFRyYW5zYWN0aW9uLmZyb20oZGVjb2RlKTtcbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLnBhcnRpYWxTaWduKG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIGNvbnN0IHdpcmVUcmFuc2FjdGlvbiA9IHRyYW5zYWN0aW9uLnNlcmlhbGl6ZSgpO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5zZW5kUmF3VHJhbnNhY3Rpb24oXG4gICAgICAgICAgICB3aXJlVHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXRGb3JQYXJ0aWFsU2lnbihcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7X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FjY291bnQiLCAiS2V5cGFpciIsICJQdWJsaWNLZXkiLCAiQWNjb3VudCIsICJQZGEiLCAiQWNjb3VudCIsICJicyIsICJBY2NvdW50IiwgIlB1YmxpY0tleSIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIkNvbXB1dGVCdWRnZXRQcm9ncmFtIiwgIlB1YmxpY0tleSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiQ29tcHV0ZVVuaXQiLCAiUHVibGljS2V5IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJQcmlvcml0eUZlZSIsICJDb21wdXRlQnVkZ2V0UHJvZ3JhbSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmV0cnkiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgInNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24iLCAic2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb24iLCAic2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiQWlyZHJvcCJdCn0K \ No newline at end of file diff --git a/packages/suite-compressed-nft/dist/index.d.mts b/packages/suite-compressed-nft/dist/index.d.mts index 777f6fb4c..6d65f1aaa 100644 --- a/packages/suite-compressed-nft/dist/index.d.mts +++ b/packages/suite-compressed-nft/dist/index.d.mts @@ -443,7 +443,7 @@ declare namespace CompressedNft$1 { /** @namespace */ declare const CompressedNft: { - createTransfer: (assetId: Pubkey, assetIdOwner: Pubkey, dest: Pubkey, delegate?: Pubkey | undefined) => Promise<_solana_web3_js.TransactionInstruction>; + createTransfer: (assetId: Pubkey, assetIdOwner: Pubkey, dest: Pubkey, delegate?: Pubkey) => Promise<_solana_web3_js.TransactionInstruction>; transfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[]) => Promise>; mintCollection: (owner: Secret$1, input: InputNftMetadata, options?: Partial) => Promise>; Space: typeof CompressedNft$1.Space; diff --git a/packages/suite-compressed-nft/dist/index.d.ts b/packages/suite-compressed-nft/dist/index.d.ts index 777f6fb4c..6d65f1aaa 100644 --- a/packages/suite-compressed-nft/dist/index.d.ts +++ b/packages/suite-compressed-nft/dist/index.d.ts @@ -443,7 +443,7 @@ declare namespace CompressedNft$1 { /** @namespace */ declare const CompressedNft: { - createTransfer: (assetId: Pubkey, assetIdOwner: Pubkey, dest: Pubkey, delegate?: Pubkey | undefined) => Promise<_solana_web3_js.TransactionInstruction>; + createTransfer: (assetId: Pubkey, assetIdOwner: Pubkey, dest: Pubkey, delegate?: Pubkey) => Promise<_solana_web3_js.TransactionInstruction>; transfer: (mint: Pubkey, owner: Pubkey, dest: Pubkey, ownerOrMultisig: Secret[]) => Promise>; mintCollection: (owner: Secret$1, input: InputNftMetadata, options?: Partial) => Promise>; Space: typeof CompressedNft$1.Space; diff --git a/packages/suite-compressed-nft/dist/index.js b/packages/suite-compressed-nft/dist/index.js index 11f8d2c31..9aaa1f461 100644 --- a/packages/suite-compressed-nft/dist/index.js +++ b/packages/suite-compressed-nft/dist/index.js @@ -54,7 +54,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -90,7 +90,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -146,13 +147,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -2154,7 +2155,6 @@ var import_client_s3 = require("@aws-sdk/client-s3"); var import_pino = __toESM(require("pino")); var Filebase; ((Filebase2) => { - const BUCKET_NAME = "solana-suite"; const LOG_LEVEL = Constants.isDebugging == "true" || process.env.DEBUG === "true" ? "debug" : "warn"; const createGatewayUrl = (cid) => `${Constants.FILEBADE_GATEWAY_URL}/${cid}`; const connect = () => { @@ -2172,7 +2172,7 @@ var Filebase; debugLog("# fileName: ", fileName); debugLog("# file: ", file); const putCommand = new import_client_s3.PutObjectCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Key: fileName, Body: file }); @@ -2193,7 +2193,9 @@ var Filebase; }; Filebase2.remove = async () => { return Try(async () => { - const listCommand = new import_client_s3.ListObjectsV2Command({ Bucket: BUCKET_NAME }); + const listCommand = new import_client_s3.ListObjectsV2Command({ + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket + }); const lists = await connect().send(listCommand); debugLog("#lists: ", lists); if (!lists.Contents) { @@ -2203,7 +2205,7 @@ var Filebase; return { Key: list.Key?.toString() }; }); const command = new import_client_s3.DeleteObjectsCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Delete: { Objects: fileNames } @@ -3829,4 +3831,4 @@ var CompressedNft9 = { 0 && (module.exports = { CompressedNft }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3ByaW9yaXR5LWZlZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21wdXRlLXVuaXQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9yZXRyeS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi90cm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Xhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldC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iAgICAgICAgKTtcbiAgICAgICAgY29uc3Qgc2lnbmVycyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcCgoaW5zdCkgPT4gaW5zdC5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gY29tbW9uT3JNaW50SW5zdC5maWx0ZXIoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgIC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jdGlvbnNcbiAgICAgICAgLm1hcCgoaW5zdCkgPT5cbiAgICAgICAgICBpbnN0LmtleXNcbiAgICAgICAgICAgIC5maWx0ZXIoKGFjY291bnQpID0+IGFjY291bnQuaXNXcml0YWJsZSlcbiAgICAgICAgICAgIC5tYXAoKGtleSkgPT4ga2V5LnB1YmtleSksXG4gICAgICAgIClcbiAgICAgICAgLmZsYXQoKTtcblxuICAgICAgY29uc3QgdW5pcVdyaXRhYmxlQWNjb3VudHMgPSBbXG4gICAgICAgIC4uLm5ldyBTZXQod3JpdGFibGVBY2NvdW50cy5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9CYXNlNTgoKSkpLFxuICAgICAgXVxuICAgICAgICAubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvUHVibGljS2V5KCkpXG4gICAgICAgIC5zbGljZSgwLCBNQVhfUkVDRU5UX1BSSU9SSVRZX0ZFRV9BQ0NPVU5UUyk7XG5cbiAgICAgIGNvbnN0IHByaW9yaXR5RmVlcyA9XG4gICAgICAgIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyh7XG4gICAgICAgICAgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICAgICAoYTogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzLCBiOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMpID0+XG4gICAgICAgICAgYS5zbG90IC0gYi5zbG90LFxuICAgICAgKSBhcyBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXTtcblxuICAgICAgLy8gZ2V0IG1lZGlhbiBvZiBsYXN0IDIwIGZlZXNcbiAgICAgIGNvbnN0IHJlY2VudEZlZXMgPSBtYXhpbXVtRmVlcy5zbGljZShcbiAgICAgICAgTWF0aC5tYXgobWF4aW11bUZlZXMubGVuZ3RoIC0gMjAsIDApL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gICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpb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ICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgIC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hwbGljaXQtYW55ICovXG4gIGFzeW5jIHN1Ym1pdChcbiAgICBvcHRpb25zOiBQYXJ0aWFsPFN1Ym1pdE9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+IHtcbiAgICBjb25zdCByZXMgPSB0aGlzLm1hcChcbiAgICAgIGFzeW5jIChvaykgPT4ge1xuICAgICAgICAvLyBwYXJhbWV0ZXI6IHBhcnRpYWxTaWduIGhleEluc3RydWN0dXJlXG4gICAgICAgIGNvbnN0IGhleFJlZ2V4ID0gL15bMC05YS1mQS1GXSskLztcbiAgICAgICAgaWYgKHR5cGVvZiBvayA9PT0gJ3N0cmluZycgJiYgaGV4UmVnZXgudGVzdChvaykpIHtcbiAgICAgICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5QYXJ0aWFsU2lnbihvaykuc3VibWl0KG9wdGlvbnMpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGNvbnN0IG9iaiA9IG9rIGFzXG4gICAgICAgICAgICB8IENvbW1vblN0cnVjdHVyZVxuICAgICAgICAgICAgfCBNaW50U3RydWN0dXJlXG4gICAgICAgICAgICB8IFBhcnRpYWxTaWduU3RydWN0dXJlO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBvYmouc3VibWl0KG9wdGlvbnMpO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgKGVycikgPT4ge1xuICAgICAgICByZXR1cm4gZXJyO1xuICAgICAgfSxcbiAgICApO1xuICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgIHJldHVybiBSZXN1bHQuZXJyKHJlcy5lcnJvcik7XG4gICAgfVxuICAgIHJldHVybiByZXMudmFsdWU7XG4gIH1cbn1cblxuZGVjbGFyZSBnbG9iYWwge1xuICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi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nB1dDogUHJvcGVydGllcyB8IHVuZGVmaW5lZCxcbiAgICAgIGNhbGxiYWNrRnVuYzogKFxuICAgICAgICBmaWxlUGF0aDogRmlsZVR5cGUsXG4gICAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgICAgb3B0aW9uczogUGFydGlhbDxTdG9yYWdlT3B0aW9ucz4sXG4gICAgICApID0+IFByb21pc2U8UmVzdWx0PHN0cmluZywgRXJyb3I+PixcbiAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgIG9wdGlvbnM6IFBhcnRpYWw8U3RvcmFnZU9wdGlvbnM+ID0ge30sXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCAmJiAhZmlsZS51cmkpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0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eFJlc3BvbnNlIHByb3ZpZGVkJyk7XG5cbiAgICAgIGNvbnN0IGFjY291bnRLZXlzID0gdHhSZXNwb25zZS50cmFuc2FjdGlvbi5tZXNzYWdlXG4gICAgICAgIC5nZXRBY2NvdW50S2V5cygpXG4gICAgICAgIC5rZXlTZWdtZW50cygpXG4gICAgICAgIC5mbGF0KCk7XG5cbiAgICAgIGNvbnN0IGNoYW5nZUxvZ0V2ZW50czogQ2hhbmdlTG9nRXZlbnRWMVtdID0gW107XG5cbiAgICAgIHR4UmVzcG9uc2UhLm1ldGE/LmlubmVySW5zdHJ1Y3Rpb25zPy5mb3JFYWNoKChjb21waWxlZEl4KSA9PiB7XG4gICAgICAgIGNvbXBpbGVkSXguaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGlubmVySXgpID0+IHtcbiAgICAgICAgICBpZiAoXG4gICAgICAgICAgICBTUExfTk9PUF9QUk9HUkFNX0lELnRvQmFzZTU4KCkgIT09XG4gICAgICAgICAgICBhY2NvdW50S2V5c1tpbm5lckl4LnByb2dyYW1JZEluZGV4XS50b0Jhc2U1OCgpXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjaGFuZ2VMb2dFdmVudHMucHVzaChcbiAgICAgICAgICAgICAgZGVzZXJpYWxpemVDaGFuZ2VMb2dFdmVudFYxKFxuICAgICAgICAgICAgICAgIEJ1ZmZlci5mcm9tKGJzNTguZGVjb2RlKGlubmVySXguZGF0YSkpLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9IGNhdGNoIChfKSB7XG4gICAgICAgICAgICAvL25vb3AsIGNhdGNoIGVycm9yIGRlc2VyaWFsaXplZFxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgICAgIGNvbnN0IGxlYWZJbmRleCA9IGNoYW5nZUxvZ0V2ZW50c1swXS5pbmRle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ZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bH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Y2NvdW50LmdldENhbm9weURlcHRoKCk7XG4gICAgY29uc3Qgc2xpY2VkUHJvb2Y6IEFjY291bnRNZXRhW10gPSBhc3NldFByb29mLnByb29mXG4gICAgICAubWFwKChub2RlOiBzdHJpbmcpID0+ICh7XG4gICAgICAgIHB1YmtleTogbm9kZS50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc1NpZ25lcjogZmFsc2UsXG4gICAgICAgIGlzV3JpdGFibGU6IGZhbHNlLFxuICAgICAgfSkpXG4gICAgICAuc2xpY2UoMCwgYXNzZXRQcm9vZi5wcm9vZi5sZW5ndGggLSAoY2Fub3B5RGVwdGggPyBjYW5vcHlEZXB0aCA6IDApKTtcblxuICAgIHJldHVybiBjcmVhdGVWZXJpZnlDcmVhdG9ySW5zdHJ1Y3Rpb24oXG4gICAgICB7XG4gICAgICAgIHRyZWVBdXRob3JpdHk6IHRyZWVPd25lcixcbiAgICAgICAgbGVhZk93bmVyOiBvd25lcnNoaXAub3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbGVhZkRlbGVnYXRlOiAob3duZXJzaGlwLmRlbGVnYXRlIHx8IG93bmVyc2hpcC5vd25lcikudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgbWVya2xlVHJlZTogYXNzZXRQcm9vZi50cmVlX2lkLnRvUHVibGljS2V5KCksXG4gICAgICAgIHBheWVyOiBmZWVQYXllcixcblxuICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgIGNyZWF0b3I6IGZlZVBheWVyLFxuXG4gICAgICAgIC8vIHByb3ZpZGUgdGhlIHNsaWNlZCBwcm9vZlxuICAgICAgICBhbmNob3JSZW1haW5pbmdBY2NvdW50czogc2xpY2VkUHJvb2YsXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICByb290OiBbL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XG4gICAgICB7XG4gICAgICAgIG9uY2hhaW46IG1ldGFkYXRhLFxuICAgICAgICBvZmZjaGFpbjoganNvbixcbiAgICAgIH0sXG4gICAgICB0b2tlbkFtb3VudCxcbiAgICApO1xuICB9O1xuXG4gIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgY29uc3QgZmV0Y2hSZXRyeSA9IGFzeW5jICh1cmw6IHN0cmluZywgcmV0cmllcyA9IDApOiBQcm9taXNlPGFueT4gPT4ge1xuICAgIHRyeSB7XG4gICAgICBjb25zdCByZXNwb25zZSA9IGF3YWl0IGZldGNoKHVybCk7XG5cbiAgICAgIGlmICghcmVzcG9uc2Uub2spIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBIVFRQIGVycm9yISBTdGF0dXM6ICR7cmVzcG9uc2Uuc3RhdHVzfWApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gYXdhaXQgcmVzcG9uc2UuanNvbigpO1xuICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICBpZiAocmV0cmllcyA8IE1BWF9SRVRSSUVTKSB7XG4gICAgICAgIGRlYnVnTG9nKGBFcnJvciBmZXRjaGluZyBkYXRhIGZyb20gJHt1cmx9LCAke3JldHJpZXN9LCAke2Vycm9yfWApO1xuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9ERUxBWSk7XG4gICAgICAgIHJldHVybiBmZXRjaFJldHJ5KHVybCwgcmV0cmllcyArIDEpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coYE1heCByZXRyaWVzIHJlYWNoZWQgKCR7TUFYX1JFVFJJRVN9KWApO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICAvKipcbiAgICogRmV0Y2ggbWludGVkIG1ldGFkYXRhIGJ5IG93bmVyIFB1YmtleVxuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICogQ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RhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gZmlsdGVycyBhcyBUb2tlbk1ldGFkYXRhW107XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBtaW50IGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxVc2VyU2lkZU91dHB1dC5Ub2tlbk1ldGFkYXRhLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgZmluZEJ5TWludCA9IGFzeW5jIChcbiAgICBtaW50OiBQdWJrZXksXG4gICk6IFByb21pc2U8UmVzdWx0PFRva2VuTWV0YWRhdGEsIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgY29ubmVjdGlvbiA9IE5vZGUuZ2V0Q29ubmVjdGlvbigpO1xuXG4gICAgICBjb25zdCBtZ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ICAgICAgZmVlUGF5ZXI6IGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICB9KTtcblxuICAgICAgY29uc3QgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgKTtcblxuICAgICAgLy8gcmV0dXJuIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgICAgaWYgKCFkZXN0VG9rZW4uaW5zdCkge1xuICAgICAgICB0eC5hZGQoaW5zdDIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gcmV0dXJuIGluc3RydWN0aW9uIGFuZCB1bmRlY2lkZWQgYXNzb2NpYXRlZCB0b2tlbiBhY2NvdW50XG4gICAgICAgIHR4LmFkZChkZXN0VG9rZW4uaW5zdCkuYWRkKGluc3QyKTtcbiAgICAgIH1cblxuICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICB0eC5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBUcmFuc2FjdGlvbkJ1aWxkZXIuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0eC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICksXG4gICAgICA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ICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCAvLyB0b3RhbCBudW1iZXJcbiAgICogQHBhcmFtIHtudW1iZXJ9IG1pbnREZWNpbWFsIC8vIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtJbnB1dFRva2VuTWV0YWRhdGF9IGlucHV0ICAgICAgIC8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HtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnN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IGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lci50b1N0cmluZygpLFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQubWFrZU9yQ3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIGRlc3QsXG4gICAgICAgIHBheWVyUHVia2V5LnB1YmtleSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gZGVzdFRva2VuLmluc3QgPyBbZGVzdFRva2VuLmluc3QsIGluc3RdIDogW2luc3RdO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAga2V5cGFpcnMsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQ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G4gICAgICAgICAgdGhyb3cgdXBsb2FkZWQ7XG4gICAgICAgIH1cbiAgICAgICAgdXJpID0gdXBsb2FkZWQudmFsdWU7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aHJvdyBFcnJvcihgTXVzdCBzZXQgZmlsZVBhdGgnIG9yICd1cmknYCk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGRhdGF2MiA9IENvbnZlcnRlci5SZWd1bGFyTmZ0TWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1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gICBjb25zdCBjb2xsZWN0aW9uTWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIH07XG5c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AgICAgICAgIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldE1pbmltdW1CYWxhbmNlRm9yUmVudEV4ZW1wdGlvbihzcGFjZSksXG4gICAgICAgICAgc3BhY2U6IHNwYWNlLFxuICAgICAgICAgIHByb2dyYW1JZDogU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlQ3JlYXRlVHJlZUluc3RydWN0aW9uKFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIG1lcmtsZVRyZWU6IHRyZWVPd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZUNyZWF0b3I6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWF4QnVmZmVyU2l6ZSxcbiAgICAgICAgICAgIG1heERlcHRoLFxuICAgICAgICAgICAgcHVibGljOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbdHJlZU93bmVyLnRvS2V5cGF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ICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5rZXkgJiZcbiAgICAgICAgICBDb25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HVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBrZXlwYWlyLnB1YmxpY0tleS50b1N0cmluZygpO1xuICAgICAgfSBlbHNlIHtcbi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lybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29tcHV0ZUJ1ZGdldFByb2dyYW0sXG4gIEtleXBhaXIsXG4gIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyxcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgZGVidWdMb2cgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb3J0IHsgVHJhbnNhY3Rpb25CdWlsZGVyIGFzIENvbXB1dGVVbml0I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YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICAgICAoYTogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzLCBiOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMpID0+XG4gICAgICAgICAgYS5zbG90IC0gYi5zbG90LFxuICAgICAgKSBhcyBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXTtcblxuICAgICAgLy8gZ2V0IG1lZGlhbiBvZiBsYXN0IDIwIGZlZXNcbiAgICAgIGNvbnN0IHJlY2VudEZlZXMgPSBtYXhpbXVtRmVlcy5zbGljZShcbiAgICAgICAgTWF0aC5tYXgobWF4aW11bUZlZXMubGVuZ3RoIC0gMjAsIDApLFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1pZCA9IE1hdGguZmxvb3IocmVjZW50RmVlcy5sZW5ndGggLyAyKTtcbiAgICAgIGNvbnN0IG1lZGlhbkZlZSA9XG4gICAgICAgIHJlY2VudEZlZXMubGVuZ3RoICUgMiAhPT0gMFxuICAgICAgICAgID8gcmVjZW50RmVlc1ttaWRdLnByaW9yaXRpemF0aW9uRmVlXG4gICAgICAgICAgOiAocmVjZW50RmVlc1ttaWQgLSAxXS5wcmlvcml0aXphdGlvbkZlZSArXG4gICAgICAgICAgICAgIHJlY2VudEZlZXNbbWlkXS5wcmlvcml0aXphdGlvbkZlZSkgL1xuICAgICAgICAgICAgMjtcblxuICAgICAgZGVidWdMb2coJyMgbWVkaWFuIGZlZTogJywgbWVkaWFuRmVlKTtcblxuICAgICAgcmV0dXJuIE1hdGguY2VpbChtZWRpYW5GZW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sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLFxuICBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5cbmltcG9ydCB7IENvbnN0YW50cywgZGVidWdMb2csIFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7X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ID09PSBDb25zdGFudHMuRW5kUG9pbnRVcmwucHJkKSB7XG4gICAgICAgICAgZGVidWdMb2coJyMgQ2hhbmdlIG1ldGFwbGV4IGNsdXN0ZXIgb24gbWFpbm5ldC1iZXRhJyk7XG4gICAgICAgICAgTm9kZS5jaGFuZ2VDb25uZWN0aW9uKHsgY2x1c3RlcjogQ29uc3RhbnRzLkNsdXN0ZXIucHJkTWV0YXBsZXggfSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICA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307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCAmJiAhZmlsZS51cmkpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZpbGU7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgfTtcbiAgfVxufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZWQtdmFycyAqL1xuaW1wb3J0IHsgT3B0aW9uLCBVc2VzIH0gZnJvbS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gICAgIHBhZ2UsXG4gICAgICBzb3J0QnksXG4gICAgICBiZWZvcmUsXG4gICAgICBhZnRlcixcbiAgICApO1xuICAgIGlmIChhc3NldHMuaXNFcnIpIHtcbiAgICAgIHRocm93IGFzc2V0cy5lcnJvcjtcbiAgICB9XG5cbiAgICBjb25zdCBpdGVtcyA9IGFzc2V0cy52YWx1ZS5pdGVtcztcblxuICAgIGNvbnN0IG1ldGFkYXRhcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgaXRlbXNcbiAgICAgICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbS5jb21wcmVzc2lvbi5jb21wcmVzc2VkID09PSBpc0NvbXByZXNzZWQpXG4gICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICB9KTtcbiA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k9PUF9QUk9HUkFNX0lELnRvQmFzZTU4KCkgIT09XG4gICAgICAgICAgICBhY2NvdW50S2V5c1tpbm5lckl4LnByb2dyYW1JZEluZGV4XS50b0Jhc2U1OCgpXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjaGFuZ2VMb2dFdmVudHMucHVzaChcbiAgICAgICAgICAgICAgZGVzZXJpYWxpemVDaGFuZ2VMb2dFdmVudFYxKFxuICAgICAgICAgICAgICAgIEJ1ZmZlci5mcm9tKGJzNTguZGVjb2RlKGlubmVySXguZGF0YSkpLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9IGNhdGNoIChfKSB7XG4gICAgICAgICAgICAvL25vb3AsIGNhdGNoIGVycm9yIGRlc2VyaWFsaXplZFxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgICAgIGNvbnN0IGxlYWZJbmRleCA9IGNoYW5nZUxvZ0V2ZW50c1swXS5pbmRleDtcbiAgICAgIGNvbnN0IHNwYWNlT3duZXIgPSBjaGFuZ2VMb2dFdmVudHNbMF0udHJlZUlkO1xuICAgICAgcmV0dXJuIEFjY291bnQuUGRhLmdldEFzc2V0SWQoc3BhY2VPd25lci50b1N0cmluZygpLCBsZWFmSW5kZXgpO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IENvbXByZXNzZWROZnQgYXMgRGVsZWdhdGUgfSBmcm9tICcuL2RlbGVnYXRlJztcbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb3J0IHsgVHJhbnNhY3Rpb24gfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgVHJhbnNhY3Rpb25CdWlsZGVyIH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ja2hhc2hPYmouYmxvY2toYXNoLFxuICAgICAgICBmZWVQYXllcjogZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgIH0pO1xuXG4gICAgICB0eC5hZGQoXG4gICAgICAgIGF3YWl0IFRyYW5zZmVyLmNyZWF0ZVRyYW5zZmVyKFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbmV3IEFjY291bnQuS2V5cGFpcih7IHNlY3JldDogb3duZXIgfSkucHVia2V5LFxuICAgICAgICAgIGRlc3QsXG4gICAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgIHR4Lmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IFRyYW5zYWN0aW9uQnVpbGRlci5Qcmlvcml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHR4Lmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgdHguaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgIGF3YWl0IFRyYW5zYWN0aW9uQnVpbGRlci5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICB0eC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgb3duZXIudG9LZXlwYWlyKCksXG4gICAgICAgICksXG4gICAgICApO1xuICAgICAgdHgucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuUGFydGlhbFNpZ24oXG4gICAgICAgIHR4XG4gICAgICAgICAgLnNlcmlhbGl6ZSh7XG4gICAgICAgICAgICByZXF1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gICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2U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3VudDogY29sbGVjdGlvbk1hc3RlckVkaXRpb25BY2NvdW50LFxuICAgICAgICAgICAgYnViYmxlZ3VtU2lnbmVyLFxuICAgICAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHlSZWNvcmRQZGE6IEJVQkJMRUdVTV9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgICAgdG9rZW5NZXRhZGF0YVByb2dyYW06IFRPS0VOX01FVEFEQVRBX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgfSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgLy8gICBjb25zdCBhc3NldElkID0gYXdhaXQgbmV3IFNwYWNlLlNwYWNlKHNwYWNlT3duZXIpLmdldEFzc2V0SWQoKTtcbiAgICAgIC8vICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAvLyAgICAgYXdhaXQgY3JlYXRlVmVyaWZ5Q3JlYXRvcihcbiAgICAgIC8vICAgICAgIG1ldGFkYXRhQXJncy5jcmVhdG9ycyxcbiAgICAgIC8vICAgICAgIGFzc2V0SWQudG9QdWJsaWNLZXkoKSxcbiAgICAgIC8vICAgICAgIHNwYWNlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgIC8vICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgIC8vICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIC8vICAgICApLFxuICAgICAgLy8gICApO1xuICAgICAgLy8gfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYW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pdCBjb25uZWN0aW9uLmdldFBhcnNlZFRva2VuQWNjb3VudHNCeU93bmVyKFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICB7XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGF0YXMgPSBpbmZvLnZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnIpID0+IGRlYnVnTG9nKCcj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ZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBzcGFjZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBTUEwtVE9LRU4gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAvLyB0b2tlbiBvd25lciBTZWNyZXRcbiAgICogQHBhcmFtIHtudW1iZXJ9IHRvdGFsQW1vdW50IC8vIHRvdGFsIG51bWJlclxuICAgKiBAcGFyYW0ge251bWJlcn0gbWludERlY2ltYWwgLy8gdG9rZW4gZGVjaW1hbFxuICAgKiBAcGFyYW0ge0lucHV0VG9rZW5NZXRhZGF0YX0gaW5wdXQgICAgICAgLy8gdG9rZW4gbWV0YWRhdGFcbiAgICogQHBhcmFtIHtQYXJ0aWFsPE1pbnRPcHRpb25zPn0gb3B0aW9ucyAgIC8vIG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxNaW50SW5zdHJ1Y3Rpb24sIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBtaW50ID0gYXN5bmMgKFxuICAgIG93bmVyOiBTZWNyZXQsXG4gICAgdG90YWxBbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICAgIGlucHV0OiBJbnB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4gICAgICBkZWJ1Z0xvZygnIyB1cGxvYWQgY29udGVudCB1cmw6ICcsIHVyaSk7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IFRyYW5zYWN0aW9uQnVpbGRlciB9IGZyb20gJ34vdH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VNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24obWludCwgYXRhLCBvd25lciwgMSwgMCkpO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3RlckVkaXRpb25BcmdzOiB7XG4gICAgICAgICAgICBtYXhTdXBwbHk6IDAs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lckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzLnRvUHVibGljS2V5KCk7XG4gICAgICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVmVyaWZ5Q3JlYXRvcihtaW50LnRvUHVibGljS2V5KCksIGNyZWF0b3JQdWJrZXkpO1xuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goaW5zdCk7XG4gICAgICAgICAgICBrZXlwYWlycy5wdXNoKGNyZWF0b3Iuc2VjcmV0LnRvS2V5cGFpcigpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IGRlYnVnTG9nLCBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgUHVia2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nQoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVNldENvbGxlY3Rpb25TaXplSW5zdHJ1Y3Rpb24oY29sbGVjdGlvbnMsIHtcbiAgICAgICAgICBzZXRDb2xsZWN0aW9uU2l6ZUFyZ3M6IHtcbiAgICAgICAgICAgIHNpemU6IGNvbGxlY3Rpb25TaXplIHx8IERFRkFVTFRfQ09MTEVDVElPTl9TSVpFLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0pLFx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ICB9KSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDcmVhdGVUcmVlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHRyZWVBdXRob3JpdHksXG4gICAgICAgICAgICB0cmVlQ3JlYXRvcjogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgcGF5ZXI6IHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIGxvZ1dyYXBwZXI6IFNQTF9OT09QX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtYXhCdWZmZXJTaXplLFxuICAgICAgICAgICAgbWF4RGVwdGgsXG4gICAgICAgICAgICBwdWJsaWM6IGZhbHNlLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFt0cmVlT3duZXIudG9LZXlwYWlyKCksIG93bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIHRyZWVPd25lci5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xuXG4gIC8qKlxuICAgKiBjcmVhdGUgYSBuZXcgbmZ0IHNwYWNlXG4gICAqIFRoaXMgZnVuY3Rpb24gbmVlZ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3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiLCAiUmVndWxhck5mdCIsICJpbXBvcnRfc3BsX2FjY291bnRfY29tcHJlc3Npb24iLCAiaW1wb3J0X3dlYjMiLCAiaW1wb3J0X21wbF9idWJibGVndW1faW5zdHJ1Y3Rpb25zIiwgIkNvbXByZXNzZWROZnQiLCAiQWNjb3VudCIsICJNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIkNvbXByZXNzZWROZnQiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-compressed-nft/dist/index.mjs b/packages/suite-compressed-nft/dist/index.mjs index 89153d707..5d5ea7511 100644 --- a/packages/suite-compressed-nft/dist/index.mjs +++ b/packages/suite-compressed-nft/dist/index.mjs @@ -18,7 +18,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -54,7 +54,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -110,13 +111,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -2165,7 +2166,6 @@ import { import pino from "pino"; var Filebase; ((Filebase2) => { - const BUCKET_NAME = "solana-suite"; const LOG_LEVEL = Constants.isDebugging == "true" || process.env.DEBUG === "true" ? "debug" : "warn"; const createGatewayUrl = (cid) => `${Constants.FILEBADE_GATEWAY_URL}/${cid}`; const connect = () => { @@ -2183,7 +2183,7 @@ var Filebase; debugLog("# fileName: ", fileName); debugLog("# file: ", file); const putCommand = new PutObjectCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Key: fileName, Body: file }); @@ -2204,7 +2204,9 @@ var Filebase; }; Filebase2.remove = async () => { return Try(async () => { - const listCommand = new ListObjectsV2Command({ Bucket: BUCKET_NAME }); + const listCommand = new ListObjectsV2Command({ + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket + }); const lists = await connect().send(listCommand); debugLog("#lists: ", lists); if (!lists.Contents) { @@ -2214,7 +2216,7 @@ var Filebase; return { Key: list.Key?.toString() }; }); const command = new DeleteObjectsCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Delete: { Objects: fileNames } @@ -3896,4 +3898,4 @@ var CompressedNft9 = { export { CompressedNft9 as CompressedNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24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Y29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCB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YWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZ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gICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29tcHV0ZUJ1ZGdldFByb2dyYW0sXG4gIEtleXBhaXIsXG4gIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyxcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgZGVidWd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3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLFxuICBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWdu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uICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25hdHVyZSxcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgQ29uc3RhbnRzLCBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBQdWJrZXkgfSBmcm9tICd+L3R5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mVlZCBmZWVQYXllcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgZGVjb2RlID0gQnVmZmVyLmZyb20odGhpcy5oZXhJbnN0cnVjdGlvbiwgJ2hleCcpO1xuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IFRyYW5zYWN0aW9uLmZyb20oZGVjb2RlKTtcbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLnBhcnRpYWxTaWduKG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIGNvbnN0IHdpcmVUcmFuc2FjdGlvbiA9IHRyYW5zYWN0aW9uLnNlcmlhbGl6ZSgpO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5zZW5kUmF3VHJhbnNhY3Rpb24oXG4gICAgICAgICAgICB3aXJlVHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXRGb3JQYXJ0aWFsU2lnbihcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJy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cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaW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RvcmFnZU9wdGlvbnM+ID0ge30sXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCAmJiAhZmlsZS51cmkpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZpbGU7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG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WNoKChjb21waWxlZEl4KSA9PiB7XG4gICAgICAgIGNvbXBpbGVkSXguaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGlubmVySXgpID0+IHtcbiAgICAgICAgICBpZiAoXG4gICAgICAgICAgICBTUExfTk9PUF9QUk9HUkFNX0lELnRvQmFzZTU4KCkgIT09XG4gICAgICAgICAgICBhY2NvdW50S2V5c1tpbm5lckl4LnByb2dyYW1JZEluZGV4XS50b0Jhc2U1OCgpXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjaGFuZ2VMb2dFdmVudHMucHVzaChcbiAgICAgICAgICAgICAgZGVzZXJpYWxpemVDaGFuZ2VMb2dFdmVudFYxKFxuICAgICAgICAgICAgICAgIEJ1ZmZlci5mcm9tKGJzNTguZGVjb2RlKGlubmVySXguZGF0YSkpLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9IGNhdGNoIChfKSB7XG4gICAgICAgICAgICAvL25vb3AsIGNhdGNoIGVycm9yIGRlc2VyaWFsaXplZFxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgICAgIGNvbnN0IGxlYWZJbmRleCA9IGNoYW5nZUxvZ0V2ZW50c1swXS5pbmRleDtcbiAgICAgIGNvbnN0IHNwYWNlT3duZXIgPSBjaGFuZ2VMb2dFdmVudHNbMF0udHJlZUlkO1xuICAgICAgcmV0dXJuIEFjY291bnQuUGRhLmdldEFzc2V0SWQoc3BhY2VPd25lci50b1N0cmluZygpLCBsZWFmSW5kZXgpO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IENvbXByZXNzZWROZnQgYXMgRGVsZWdhdGUgfSBmcm9tICcuL2RlbGVnYXRlJztcbmltcG9ydC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XRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiA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iAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtZXRhZGF0YUFyZ3M6IE1ldGFkYXRhQXJncyA9IHtcbiAgICAgICAgLi4uY29udmVydGVkLFxuICAgICAgICBjb2xsZWN0aW9uOiB7IGtleTogY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSwgdmVyaWZpZWQ6IGZhbHNlIH0sXG4gICAgICB9O1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgbWV0YWRhdGFBcmdzOiAnLCBtZXRhZGF0YUFyZ3MpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVNaW50VG9Db2xsZWN0aW9uVjFJbnN0cnVjdGlvbihcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXJrbGVUcmVlOiBzcGFjZU93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZURlbGVnYXRlOiBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsZWFmT3duZXI6IGxlYWZPd25lciwgLy8gcmVjZWl2ZXJcbiAgICAgICAgICAgIGxlYWZEZWxlZ2F0ZTogbGVhZkRlbGVnYXRlLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgY29sbGVjdGlvbk1ldGFkYXR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ID0gYXdhaXQgY29ubmVjdGlvbi5nZXRQYXJzZWRUb2tlbkFjY291bnRzQnlPd25lcihcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAge1xuICAgICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgfSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRhdGFzID0gaW5mby52YWx1ZS5tYXAoYXN5bmMgKGQpID0+IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiB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biAgICAgICAgbmV3QWNjb3VudFB1YmtleTogbWludCxcbiAgICAgICAgc3BhY2U6IE1JTlRfU0laRSxcbiAgICAgICAgbGFtcG9ydHM6IGxhbXBvcnRzLFxuICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICB9KSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVJbml0aWFsaXplTWludEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCAvLyB0b3RhbCBudW1iZXJcbiAgICogQHBhcmFtIHtudW1iZXJ9IG1pbnREZWNpbWFsIC8vIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtJbnB1dFRva2VuTWV0YWRhdGF9IGlucHV0ICAgICAgIC8vIHRva2VuIG1ldGFkYXRhXG4gICAqIEBwYXJhbSB7UGFydGlhbDxNaW50T3B0aW9ucz59IG9wdGlvbnMgICAvLyBvcHRpb25zXG4gICAqIEByZXR1cm4gUHJvbWlzZTxSZXN1bHQ8TWludEluc3RydWN0aW9uLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgbWludCA9IGFzeW5jIChcbiAgICBvd25lcjogU2VjcmV0LFxuICAgIHRvdGFsQW1vdW50OiBudW1iZXIsXG4gICAgbWludERlY2ltYWw6IG51bWJlcixcbiAgICBpbnB1dDogSW5wdXRUb2tlbk1ldGFkYXRh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pO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkJ1aWxkZXIgfSBmcm9tICd+L3RyYW5zYWN0aW9uLWJ1a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0aW9uKG1pbnQsIGF0YSwgb3duZXIsIDEsIDApKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgI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vaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBkZWJ1Z0xvZywgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi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ICAgY29uc3Qgb3duZXJQdWJsaWNrZXkgPSBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXk7XG5cbiAgICAgIC8vLS0tIHBvcnBlcnRpZXMsIFVwbG9hZCBjb250ZW50IC0tLVxuICAgICAgbGV0IHByb3BlcnRpZXM7XG4gICAgICBpZiAoaW5wdXQucHJvcGVydGllcykge1xuICAgICAgICBwcm9wZXJ0aWVzID0gYXdhaXQgQ29udmVydGVyLlByb3BlcnRpZXMuaW50b0luZnJhKFxuICAgICAgICAgIGlucHV0LnByb3BlcnRpZXMsXG4gICAgICAgICAgU3RvcmFnZS51cGxvYWRGaWxlLFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBpbnB1dCA9IHtcbiAgICAgICAgLi4uaW5wdXQsXG4gICAgICAgIHByb3BlcnRpZXMsXG4gICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgfTtcblxuICAgICAgY29uc3Qgcm95YWx0eSA9IGlucHV0LnJveWFsdHkgPyBpbnB1dC5yb3lhbHR5IDogMDtcbiAgICAgIGNvbnN0IHNlbGxlckZlZUJhc2lzUG9pbnRzID0gQ29udmVydGVyLlJveWFsdHkuaW50b0luZnJhKHJveWFsdHkpO1xuXG4gICAgICBjb25zdCBzdG9yYWdlTWV0YWRhdGEgPSBTdG9yYWdlLnRvQ29udmVydE9mZmNoYWluZGF0YShcbiAgICAgICAgeyAuLi5pbnB1dCwgcHJvcGVydGllcyB9LFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGxldCB1cmkhOiBzdHJpbmc7XG4gICAgICAvLyB1cGxvYWQgZmlsZVxuICAgICAgaWYgKGlucHV0LmZpbGVQYXRoKSB7XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWQoXG4gICAgICAgICAgc3RvcmFnZU1ldGFkYXRhLFxuICAgICA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gIGxldCBjb2xsZWN0aW9uO1xuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24gJiYgaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBjb2xsZWN0aW9uID0gQ29udmVydGVyLkNvbGxlY3Rpb24uaW50b0luZnJhKGlucHV0LmNvbGxlY3Rpb24pO1xuICAgICAgICBkYXRhdjIgPSB7IC4uLmRhdGF2MiwgY29sbGVjdGlvbiB9O1xuICAgICAgfVxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1Ymxp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Y0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIH07XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVTZXRDb2xsZWN0aW9uU2l6ZUluc3RydWN0aW9uKGNvbGxlY3Rpb25zLCB7XG4gICAgICAgICAgc2V0Q29sbGVjdGlvblNpemVBcmdzOiB7XG4gICAgICAgICAgICBzaXplOiBjb2xsZWN0aW9uU2l6ZSB8fCBERUZBVUxUX0NPTExFQ1RJT05fU0laRSxcbiAgICAgICAgICB9LFxuICAgICAgICB9KSxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG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AgICAgICAgIG1lcmtsZVRyZWU6IHRyZWVPd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICB0cmVlQXV0aG9yaXR5LFxuICAgICAgICAgICAgdHJlZUNyZWF0b3I6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHBheWVyOiBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgICBsb2dXcmFwcGVyOiBTUExfTk9PUF9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgIH0sXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWF4QnVmZmVyU2l6ZSxcbiAgICAgICAgICAgIG1heERlcHRoLFxuICAgICAgICAgICAgcHVibGljOiBmYWxzZSxcbiAgICAgICAgICB9LFxuICAgICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICBbdHJlZU93bmVyLnRvS2V5cGFpcigpLCBvd25lci50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICB0cmVlT3duZXIucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcblxuICAvKipcbiAgICogY3JlYXRlIGEgbmV3IG5mdCBzcGFjZVxuICAgKiBUaGlzIGZ1bmN0aW9uIG5lZWRzIG9ubHkgMSBjYWxsXG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lclxuICAgKiBAcGFyYW0ge1NwYWNlTnVtYmVyfSBzcGFjZVNpemVcbiAgICogQHBhcmFtIH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nTWVzc2FnZS5EQVNfQVBJX1VSTCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgaWYgKFxuICAgIC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AgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBrZXlwYW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luc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29tcHV0ZUJ1ZGdldFByb2dyYW0sXG4gIEtleXBhaXIsXG4gIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyxcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgZGVidWdMb2cgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb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VybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICAgICAoYTogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzLCBiOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMpID0+XG4gICAgICAgICAgYS5zbG90IC0gYi5zbG90LFxuICAgICAgKSBhcyBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXTtcblxuICAgICAgLy8gZ2V0IG1lZGlhbiBvZiBsYXN0IDIwIGZlZXNcbiAgICAgIGNvbnN0IHJlY2VudEZlZXMgPSBtYXhpbXVtRmVlcy5zbGljZShcbiAgICAgICAgTWF0aC5tYXgobWF4aW11bUZlZXMubGVuZ3RoIC0gMjAsIDApLFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1pZCA9IE1hdGguZmxvb3IocmVjZW50RmVlcy5sZW5ndGggLyAyKTtcbiAgICAgIGNvbnN0IG1lZGlhbkZlZSA9XG4gICAgICAgIHJlY2VudEZlZXMubGVuZ3RoICUgMiAhPT0gMFxuICAgICAgICAgID8gcmVjZW50RmVlc1ttaWRdLnByaW9yaXRpemF0aW9uRmVlXG4gICAgICAgICAgOiAocmVjZW50RmVlc1ttaWQgLSAxXS5wcmlvcml0aXphdGlvbkZlZSArXG4gICAgICAgICAgICAgIHJlY2VudEZlZXNbbWlkXS5wcmlvcml0aXphdGlvbkZlZSkgL1xuICAgICAgICAgICAgMjtcblxuICAgICAgZGVidWdMb2coJyMgbWVkaWFuIGZlZTogJywgbWVkaWF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lvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLFxuICBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5cbmltcG9ydCB7IENvbnN0YW50cywgZGVidWdMb2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AgaWYgKE5vZGUuZ2V0Q29ubmVjdGlvbigpLnJwY0VuZHBvaW50ID09PSBDb25zdGFudHMuRW5kUG9pbnRVcmwucHJkKSB7XG4gICAgICAgICAgZGVidWdMb2coJyMgQ2hhbmdlIG1ldGFwbGV4IGNsdXN0ZXIgb24gbWFpbm5ldC1iZXRhJyk7XG4gICAgICAgICAgTm9kZS5jaGFuZ2VDb25uZWN0aW9uKHsgY2x1c3RlcjogQ29uc3RhbnRzLkNsdXN0ZXIucHJkTWV0YXBsZXggfSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllcz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y5oZXhJbnN0cnVjdGlvbiwgJ2hleCcpO1xuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IFRyYW5zYWN0aW9uLmZyb20oZGVjb2RlKTtcbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLnBhcnRpYWxTaWduKG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIGNvbnN0IHdpcmVUcmFuc2FjdGlvbiA9IHRyYW5zYWN0aW9uLnNlcmlhbGl6ZSgpO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5zZW5kUmF3VHJhbnNhY3Rpb24oXG4gICAgICAgICAgICB3aXJlVHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXRGb3JQYXJ0aWFsU2lnbihcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBQdWJsaWNLZXks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xcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Db21wcmVzc2VkTmZ0SW5mcmEgPSAoXG4gICAgICBpbnB1dDogT3B0aW9uPElucHV0Q3JlYXRvcnNbXT4gfCB1bmRlZmluZWQsXG4gICAgKTogSW50ZXJuYWxDcmVhdG9yc1tdID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0IS5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJlc3MudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBzaGFyZTogZGF0YS5zaGFyZSxcbiAgICAgICAgICB2ZXJpZmllZDogZmFsc2UsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKFxuICAgICAgb3V0cHV0OiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPixcbiAgICApOiBDcmVhdG9yc1tdIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBvdXRwdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvU3RyaW5nKCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGRhdGEudmVyaWZpZWQsXG4gICAgICAgIH07XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1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oIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCAmJiAhZmlsZS51cmkpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZpbGU7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgfTtcbiAgfVxufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZWQ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NldHNCeU93bmVyKFxuICAgICAgb3duZXIsXG4gICAgICBsaW1pdCxcbiAgICAgIHBhZ2UsXG4gICAgICBzb3J0QnksXG4gICAgICBiZWZvcmUsXG4gICAgICBhZnRlcixcbiAgICApO1xuICAgIGlmIChhc3NldHMuaXNFcnIpIHtcbiAgICAgIHRocm93IGFzc2V0cy5lcnJvcjtcbiAgICB9XG5cbiAgICBjb25zdCBpdGVtcyA9IGFzc2V0cy52YWx1ZS5pdGVtcztcblxuICAgIGNvbnN0IG1ldGFkYXRhcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgaXRlbXNcbiAgICAgICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbS5jb21wcmVzc2lvbi5jb21wcmVzc2VkID09PSBpc0NvbXByZXNzZWQpXG4gICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICA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mVySXgpID0+IHtcbiAgICAgICAgICBpZiAoXG4gICAgICAgICAgICBTUExfTk9PUF9QUk9HUkFNX0lELnRvQmFzZTU4KCkgIT09XG4gICAgICAgICAgICBhY2NvdW50S2V5c1tpbm5lckl4LnByb2dyYW1JZEluZGV4XS50b0Jhc2U1OCgpXG4gICAgICAgICAgKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICBjaGFuZ2VMb2dFdmVudHMucHVzaChcbiAgICAgICAgICAgICAgZGVzZXJpYWxpemVDaGFuZ2VMb2dFdmVudFYxKFxuICAgICAgICAgICAgICAgIEJ1ZmZlci5mcm9tKGJzNTguZGVjb2RlKGlubmVySXguZGF0YSkpLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9IGNhdGNoIChfKSB7XG4gICAgICAgICAgICAvL25vb3AsIGNhdGNoIGVycm9yIGRlc2VyaWFsaXplZFxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgICAgIGNvbnN0IGxlYWZJbmRleCA9IGNoYW5nZUxvZ0V2ZW50c1swXS5pbmRleDtcbiAgICAgIGNvbnN0IHNwYWNlT3duZXIgPSBjaGFuZ2VMb2dFdmVudHNbMF0udHJlZUlkO1xuICAgICAgcmV0dXJuIEFjY291bnQuUGRhLmdldEFzc2V0SWQoc3BhY2VPd25lci50b1N0cmluZygpLCBsZWFmSW5kZXgpO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IENvbXByZXNzZWROZnQgYXMgRGVsZWdhdGUgfSBmcm9tICcuL2RlbGVnYXRlJztcbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb3J0IHsgVHJhbnNhY3Rpb24gfSBmcm9tICdAc29sYW5hL3d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VmFsaWRCbG9ja0hlaWdodCxcbiAgICAgICAgYmxvY2toYXNoOiBibG9ja2hhc2hPYmouYmxvY2toYXNoLFxuICAgICAgICBmZWVQYXllcjogZmVlUGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgIH0pO1xuXG4gICAgICB0eC5hZGQoXG4gICAgICAgIGF3YWl0IFRyYW5zZmVyLmNyZWF0ZVRyYW5zZmVyKFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbmV3IEFjY291bnQuS2V5cGFpcih7IHNlY3JldDogb3duZXIgfSkucHVia2V5LFxuICAgICAgICAgIGRlc3QsXG4gICAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgIHR4Lmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IFRyYW5zYWN0aW9uQnVpbGRlci5Qcmlvcml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHR4Lmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgdHguaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgIGF3YWl0IFRyYW5zYWN0aW9uQnVpbGRlci5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICB0eC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgb3duZXIudG9LZXlwYWlyKCksXG4gICAgICAgICksXG4gICAgICApO1xuICAgICAgdHgucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuUGFydGlhbFNpZ24oXG4gICAgICAgIHR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G1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIH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sZWN0aW9uTWV0YWRhdGEsXG4gICAgICAgICAgICBlZGl0aW9uQWNjb3VudDogY29sbGVjdGlvbk1hc3RlckVkaXRpb25BY2NvdW50LFxuICAgICAgICAgICAgYnViYmxlZ3VtU2lnbmVyLFxuICAgICAgICAgICAgbG9nV3JhcHBlcjogU1BMX05PT1BfUFJPR1JBTV9JRCxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHlSZWNvcmRQZGE6IEJVQkJMRUdVTV9QUk9HUkFNX0lELFxuICAgICAgICAgICAgY29tcHJlc3Npb25Qcm9ncmFtOiBTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICAgICAgdG9rZW5NZXRhZGF0YVByb2dyYW06IFRPS0VOX01FVEFEQVRBX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtZXRhZGF0YUFyZ3MsXG4gICAgICAgICAgfSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgLy8gICBjb25zdCBhc3NldElkID0gYXdhaXQgbmV3IFNwYWNlLlNwYWNlKHNwYWNlT3duZXIpLmdldEFzc2V0SWQoKTtcbiAgICAgIC8vICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAvLyAgICAgYXdhaXQgY3JlYXRlVmVyaWZ5Q3JlYXRvcihcbiAgICAgIC8vICAgICAgIG1ldGFkYXRhQXJncy5jcmVhdG9ycyxcbiAgICAgIC8vICAgICAgIGFzc2V0SWQudG9QdWJsaWNLZXkoKSxcbiAgICAgIC8vICAgICAgIHNwYWNlT3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgIC8vICAgICAgIG1ldGFkYXRhQXJncyxcbiAgICAgIC8vICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIC8vICAgICApLFxuICAgICAgLy8gIC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mdldENvbm5lY3Rpb24oKTtcbiAgICAgIGNvbnN0IGluZm8gPSBhd2FpdCBjb25uZWN0aW9uLmdldFBhcnNlZFRva2VuQWNjb3VudHNCeU93bmVyKFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICB7XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGF0YXMgPSBpbmZvLnZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgI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VByb2dyYW0uY3JlYXRlQWNjb3VudCh7XG4gICAgICAgIGZyb21QdWJrZXk6IGZlZVBheWVyLFxuICAgICAgICBuZXdBY2NvdW50UHVia2V5OiBtaW50LFxuICAgICAgICBzcGFjZTogTUlOVF9TSVpFLFxuICAgICAgICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiB0b2tlbk1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcbiAgICByZXR1cm4gaW5zdHJ1Y3Rpb25zO1xuICB9O1xuXG4gIC8qKlxuICAgKiBTUEwtVE9LRU4gbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAvLyB0b2tlbiBvd25lciBTZWNyZXRcbiAgICogQHBhcmFtIHtudW1iZXJ9IHRvdGFsQW1vdW50IC8vIHRvdGFsIG51bWJlclxuICAgKiBAcGFyYW0ge251bWJlcn0gbWludERlY2ltYWwgLy8gdG9rZW4gZGVjaW1hbFxuICAgKiBAcGFyYW0ge0lucHV0VG9rZW5NZXRhZGF0YX0gaW5wdXQgICAgICAgLy8gdG9rZW4gbWV0YWRhdGFcbiAgICogQHBhcmFtIHtQYXJ0aWFsPE1pbnRPcHRpb25zPn0gb3B0aW9ucyAgIC8vIG9wdGlvbnNcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxNaW50SW5zdHJ1Y3Rpb24sIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBtaW50ID0gYXN5bmMgKFxuICAgIG93bmVyOiBTZWNyZXQsXG4gICAgdG90YWxBbW91bnQ6IG51bWJlcixc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gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG4gICAgICBkZWJ1Z0xvZygnIyB1cGxvYWQgY29udGVudCB1cmw6ICcsIHVyaSk7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcb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pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24obWludCwgYXRhLCBvd25lciwgMSwgMCkpO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogbmZ0TWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNYXN0ZXJFZGl0aW9uVjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIGVkaXRpb246IG1hc3RlckVkaXRpb25QdWJrZXksXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1hc3Rl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XG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgLy8gY29sbGVjdGlvbiAtLS1cbiAgICAgIGlmIChpbnB1dC5jb2xsZWN0aW9uKSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZVZlcmlmeVNpemVkQ29sbGVjdGlvbihcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIGlucHV0LmNvbGxlY3Rpb24udG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBrZXlwYWlycyA9IFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV07XG5cbiAgICAgIC8vIGNyZWF0b3IgLS0tXG4gICAgICBpZiAoaW5wdXQuY3JlYXRvcnMpIHtcbiAgICAgICAgaW5wdXQuY3JlYXRvcnMuZm9yRWFjaCgoY3JlYXRvcikgPT4ge1xuICAgICAgICAgIGlmIChBY2NvdW50LktleXBhaXIuaXNTZWNyZXQoY3JlYXRvci5zZWNyZXQpKSB7XG4gICAgICAgICAgICBjb25zdCBjcmVhdG9yUHVia2V5ID0gY3JlYXRvci5hZGRyZXNzLnRvUHVibGljS2V5KCk7XG4gICAgICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVmVyaWZ5Q3JlYXRvcihtaW50LnRvUHVibGljS2V5KCksIGNyZWF0b3JQdWJrZXkpO1xuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goaW5zdCk7XG4gICAgICAgICAgICBrZXlwYWlycy5wdXNoKGNyZWF0b3Iuc2VjcmV0LnRvS2V5cGFpcigpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IGRlYnVnTG9nLCBSZXN1bHQsIFRyeS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zdCBpbnN0cnVjdGlvbnMgPSBhd2FpdCBNaW50LmNyZWF0ZU1pbnQoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgY29sbGVjdGlvbnMgPSB7XG4gICAgICAgIGNvbGxlY3Rpb25NZXRhZGF0YTogY29sbGVjdGlvbk1ldGFkYXRhQWNjb3VudCxcbiAgICAgICAgY29sbGVjdGlvbkF1dGhvcml0eTogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBjb2xsZWN0aW9uTWludDogY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgfTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVNldENvbGxlY3Rpb25TaXplSW5zdHJ1Y3Rpb24oY29sbGVjdGlvbnMsIHtcbiAgICAgICAgICBzZXRDb2xsZWN0aW9uU2l6ZUFyZ3M6IHtcbiAgICAgICAgICAgIHNpemU6IGNvbGxlY3Rpb25TaXplIHx8IERFRkFVTFRfQ09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ExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lELFxuICAgICAgICB9KSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDcmVhdGVUcmVlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAge1xuICAgICAgICAgICAgbWVya2xlVHJlZTogdHJlZU93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIHRyZWVBdXRob3JpdHksXG4gICAgICAgICAgICB0cmVlQ3JlYXRvcjogb3duZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICAgcGF5ZXI6IHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgICAgIGxvZ1dyYXBwZXI6IFNQTF9OT09QX1BST0dSQU1fSUQsXG4gICAgICAgICAgICBjb21wcmVzc2lvblByb2dyYW06IFNQTF9BQ0NPVU5UX0NPTVBSRVNTSU9OX1BST0dSQU1fSUQsXG4gICAgICAgICAgfSxcbiAgICAgICAgICB7XG4gICAgICAgICAgICBtYXhCdWZmZXJTaXplLFxuICAgICAgICAgICAgbWF4RGVwdGgsXG4gICAgICAgICAgICBwdWJsaWM6IGZhbHNlLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFt0cmVlT3duZXIudG9LZXlwYWlyKCksIG93bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIHRyZWVPd25lci5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xuXG4gIC8qKlxuICAgKiBjcmVhdGUgYSB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CAiQ29udmVydGVyIiwgIlN0b3JhZ2UiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJTdG9yYWdlIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbXByZXNzZWROZnQiLCAiUmVndWxhck5mdCIsICJTUExfQUNDT1VOVF9DT01QUkVTU0lPTl9QUk9HUkFNX0lEIiwgIlNQTF9OT09QX1BST0dSQU1fSUQiLCAiUHVibGljS2V5IiwgIlN5c3RlbVByb2dyYW0iLCAiTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lEIiwgIkNvbXByZXNzZWROZnQiLCAiQWNjb3VudCIsICJQdWJsaWNLZXkiLCAiTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lEIiwgIlN5c3RlbVByb2dyYW0iLCAiU1BMX0FDQ09VTlRfQ09NUFJFU1NJT05fUFJPR1JBTV9JRCIsICJTUExfTk9PUF9QUk9HUkFNX0lEIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJDb21wcmVzc2VkTmZ0Il0KfQo= \ No newline at end of file diff --git a/packages/suite-config/dist/config-script.js b/packages/suite-config/dist/config-script.js index b30104e95..4f9fabc00 100755 --- a/packages/suite-config/dist/config-script.js +++ b/packages/suite-config/dist/config-script.js @@ -106,8 +106,8 @@ program.option( "-d --debug ", 'display debug log on terminal. defalut "false" ' ).option( - "-f --filebase ", - 'Set filebase key and secret. "9CA51CEFF9FF98CB91CF" "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" ' + "-f --filebase ", + 'Set filebase key and secret. "9CA51CEFF9FF98CB91CF" "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" "MyStorage" ' ).option( "-das --das-api-url ", 'connect to digital asset api url. "https://...", if you set more than one url, please separate them with a space' @@ -157,11 +157,15 @@ var execDebug = (bool) => { updateDebugConfigFile(bool); }; var execFilebase = (filebase) => { - if (filebase.length < 2) { + if (filebase.length < 3) { warnMessage("Not found filebase key or secret"); process.exit(0); } - updateFilebaseConfigFile({ key: filebase[0], secret: filebase[1] }); + updateFilebaseConfigFile({ + key: filebase[0], + secret: filebase[1], + bucket: filebase[2] + }); }; var execDasApiUrl = (url) => { const validation = (u) => { @@ -197,4 +201,4 @@ if (options.cluster) { } else { warnMessage("No match parameter"); } -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbmZpZy1zY3JpcHQudHMiLCAiLi4vc3JjL3NlYXJjaC1jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIiMhL3Vzci9iaW4vZW52IG5vZGVcblxuaW1wb3J0IHsgZXhpc3RzU3luYywgcmVhZEZpbGVTeW5jLCBybWRpclN5bmMsIHdyaXRlRmlsZVN5bmMgfSBmcm9tICdub2RlOmZzJztcbmltcG9ydCB7IENvbW1hbmQgfSBmcm9tICdjb21tYW5kZXInO1xuaW1wb3J0IHsgQ29uZmlnIH0gZnJvbSAnLi9zZWFyY2gtY29uZmlnJztcblxuY29uc3QgcHJvZ3JhbSA9IG5ldyBDb21tYW5kKCk7XG5cbnR5cGUgRmlsZWJhc2UgPSB7XG4gIGtleTogc3RyaW5nO1xuICBzZWNyZXQ6IHN0cmluZztcbn07XG5cbmxldCBjb25maWdQYXRoOiBzdHJpbmc7XG5sZXQgcGFyc2VkOiB7XG4gIGNsdXN0ZXI6IHsgdHlwZTogc3RyaW5nOyBjdXN0b21DbHVzdGVyVXJsOiBzdHJpbmdbXSB9O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UFjLFFBQVEsU0FBUztBQUNqQyxXQUFXLFFBQVEsTUFBTTtBQUN2QixXQUFTO0FBQ1gsT0FBTztBQUNMLGNBQVksb0JBQW9CO0FBQ2xDOyIsCiAgIm5hbWVzIjogWyJpbXBvcnRfbm9kZV9mcyIsICJDb25maWciXQp9Cg== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbmZpZy1zY3JpcHQudHMiLCAiLi4vc3JjL3NlYXJjaC1jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIiMhL3Vzci9iaW4vZW52IG5vZGVcblxuaW1wb3J0IHsgZXhpc3RzU3luYywgcmVhZEZpbGVTeW5jLCBybWRpclN5bmMsIHdyaXRlRmlsZVN5bmMgfSBmcm9tICdub2RlOmZzJztcbmltcG9ydCB7IENvbW1hbmQgfSBmcm9tICdjb21tYW5kZXInO1xuaW1wb3J0IHsgQ29uZmlnIH0gZnJvbSAnLi9zZWFyY2gtY29uZmlnJztcblxuY29uc3QgcHJvZ3JhbSA9IG5ldyBDb21tYW5kKCk7XG5cbnR5cGUgRmlsZWJhc2UgPSB7XG4gIGtleTogc3RyaW5nO1xuICBzZWNyZXQ6IHN0cmluZztcbiAgYnVja2V0OiBzdHJpbmc7XG59O1xuXG5sZXQgY29uZmlnUGF0aDogc3RyaW5nO1xubGV0IHBhcnNlZDoge1xuICBjbHVzdGVyOiB7IHR5cGU6IHN0cmluZzsgY3VzdG9tQ2x1c3RlclVybDogc3RyaW5nW10gfTtcbiAgZGVidWdnaW5nOiBzdHJpbmc7XG4gIGZpbGViYXNlOiBGaWxlYmFzZTtcbiAgZGFzQXBpVXJsOiBzdHJpbmdbXTtcbn07XG5jb25zdCBWRVJTSU9OID0gJzAuNSc7XG5cbi8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy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SxTQUFTO0FBQ2pDLFdBQVcsUUFBUSxNQUFNO0FBQ3ZCLFdBQVM7QUFDWCxPQUFPO0FBQ0wsY0FBWSxvQkFBb0I7QUFDbEM7IiwKICAibmFtZXMiOiBbImltcG9ydF9ub2RlX2ZzIiwgIkNvbmZpZyJdCn0K \ No newline at end of file diff --git a/packages/suite-config/dist/config-script.mjs b/packages/suite-config/dist/config-script.mjs index 3e7e1f51b..c6a68ccc2 100755 --- a/packages/suite-config/dist/config-script.mjs +++ b/packages/suite-config/dist/config-script.mjs @@ -105,8 +105,8 @@ program.option( "-d --debug ", 'display debug log on terminal. defalut "false" ' ).option( - "-f --filebase ", - 'Set filebase key and secret. "9CA51CEFF9FF98CB91CF" "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" ' + "-f --filebase ", + 'Set filebase key and secret. "9CA51CEFF9FF98CB91CF" "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" "MyStorage" ' ).option( "-das --das-api-url ", 'connect to digital asset api url. "https://...", if you set more than one url, please separate them with a space' @@ -156,11 +156,15 @@ var execDebug = (bool) => { updateDebugConfigFile(bool); }; var execFilebase = (filebase) => { - if (filebase.length < 2) { + if (filebase.length < 3) { warnMessage("Not found filebase key or secret"); process.exit(0); } - updateFilebaseConfigFile({ key: filebase[0], secret: filebase[1] }); + updateFilebaseConfigFile({ + key: filebase[0], + secret: filebase[1], + bucket: filebase[2] + }); }; var execDasApiUrl = (url) => { const validation = (u) => { @@ -196,4 +200,4 @@ if (options.cluster) { } else { warnMessage("No match parameter"); } -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbmZpZy1zY3JpcHQudHMiLCAiLi4vc3JjL3NlYXJjaC1jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIiMhL3Vzci9iaW4vZW52IG5vZGVcblxuaW1wb3J0IHsgZXhpc3RzU3luYywgcmVhZEZp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LGNBQVEsS0FBSyxDQUFDO0FBQUEsSUFDaEI7QUFBQSxFQUNGLENBQUM7QUFFRCw0QkFBMEIsR0FBRztBQUMvQjtBQUVBLElBQU0sV0FBVyxNQUFZO0FBQzNCLHdCQUFzQjtBQUN4QjtBQU1BLElBQU0sVUFBVSxRQUFRLEtBQUs7QUFDN0IsSUFBSSxRQUFRLFNBQVM7QUFDbkIsYUFBVyxRQUFRLE9BQU87QUFDNUIsV0FBVyxRQUFRLGVBQWU7QUFDaEMsb0JBQWtCLFFBQVEsYUFBYTtBQUN6QyxXQUFXLFFBQVEsT0FBTztBQUN4QixZQUFVLFFBQVEsS0FBSztBQUN6QixXQUFXLFFBQVEsVUFBVTtBQUMzQixVQUFRLElBQUksT0FBTztBQUNuQixlQUFhLFFBQVEsUUFBUTtBQUMvQixXQUFXLFFBQVEsV0FBVztBQUM1QixnQkFBYyxRQUFRLFNBQVM7QUFDakMsV0FBVyxRQUFRLE1BQU07QUFDdkIsV0FBUztBQUNYLE9BQU87QUFDTCxjQUFZLG9CQUFvQjtBQUNsQzsiLAogICJuYW1lcyI6IFsiQ29uZmlnIl0KfQo= \ No newline at end of file diff --git a/packages/suite-config/package.json b/packages/suite-config/package.json index a968b8586..5f78aeecd 100644 --- a/packages/suite-config/package.json +++ b/packages/suite-config/package.json @@ -61,14 +61,14 @@ }, "exports": { "./search": { + "types": "./dist/index.d.ts", "require": "./dist/index.js", - "import": "./dist/index.mjs", - "types": "./dist/index.d.ts" + "import": "./dist/index.mjs" }, "./load": { + "types": "./solana-suite.json", "require": "./solana-suite.json", - "import": "./solana-suite.json", - "types": "./solana-suite.json" + "import": "./solana-suite.json" } } } diff --git a/packages/suite-config/solana-suite.json b/packages/suite-config/solana-suite.json index 10f87a821..b120649d2 100644 --- a/packages/suite-config/solana-suite.json +++ b/packages/suite-config/solana-suite.json @@ -1 +1,6 @@ -{"cluster":{"type":"localhost-devnet","customClusterUrl":[]},"debugging":"false","dasApiUrl":[],"filebase":{"key":"","secret":""}} +{ + "cluster": { "type": "localhost-devnet", "customClusterUrl": [] }, + "debugging": "false", + "dasApiUrl": [], + "filebase": { "key": "", "secret": "", "bucket": "" } +} diff --git a/packages/suite-config/src/config-script.ts b/packages/suite-config/src/config-script.ts index 189de4fee..34829ed8e 100755 --- a/packages/suite-config/src/config-script.ts +++ b/packages/suite-config/src/config-script.ts @@ -9,6 +9,7 @@ const program = new Command(); type Filebase = { key: string; secret: string; + bucket: string; }; let configPath: string; @@ -114,8 +115,8 @@ program 'display debug log on terminal. defalut "false" ', ) .option( - '-f --filebase ', - 'Set filebase key and secret. "9CA51CEFF9FF98CB91CF" "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" ', + '-f --filebase ', + 'Set filebase key and secret. "9CA51CEFF9FF98CB91CF" "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" "MyStorage" ', ) .option( '-das --das-api-url ', @@ -177,11 +178,15 @@ const execDebug = (bool: string): void => { }; const execFilebase = (filebase: string[]): void => { - if (filebase.length < 2) { + if (filebase.length < 3) { warnMessage('Not found filebase key or secret'); process.exit(0); } - updateFilebaseConfigFile({ key: filebase[0], secret: filebase[1] }); + updateFilebaseConfigFile({ + key: filebase[0], + secret: filebase[1], + bucket: filebase[2], + }); }; const execDasApiUrl = (url: string[]): void => { diff --git a/packages/suite-multisig/dist/index.js b/packages/suite-multisig/dist/index.js index d2add30eb..ff620c5ab 100644 --- a/packages/suite-multisig/dist/index.js +++ b/packages/suite-multisig/dist/index.js @@ -59,7 +59,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -95,7 +95,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -151,13 +152,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1285,4 +1286,4 @@ var Multisig4 = { ...Multisig, ...Multisig2, ...Multisig3 }; 0 && (module.exports = { Multisig }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jcmVhdGUudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcHJpb3JpdHktZmVlLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbXB1dGUtdW5pdC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4u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LFxuICAgICk6IFByb21pc2U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20gJ2JzNTgnO1xuXG5leHBvcnQgbmFtZXNwYWNlIEFjY291bnQge1xuICBleHBvcnQgY2xhc3MgS2V5cGFpciB7XG4gICAgc2VjcmV0OiBTZWNyZXQ7XG4gIC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uICAgICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBpZiAoIW9wdGlvbnMuaW5zdHJ1Y3Rpb25zKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ05vdCBmb3VuZCBvcHRpb25zLmluc3RydWN0aW9ucycpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGNvbW1vbk9yTWludEluc3QgPSBvcHRpb25zLmluc3RydWN0aW9ucztcbiAgICAgICAgbGV0IGkgPSAwO1xuICAgICAgICBmb3IgKGNvbnN0IGluc3Qgb2YgY29tbW9uT3JNaW50SW5zdCkge1xuICAgICAgICAgIGlmICghaW5zdC5pbnN0cnVjdGlvbnMgJiYgIWluc3Quc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoaW5zdCl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcChcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoKGluc3QpID0+IGluc3Quc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGNvbW1vbk9yTWludEluc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiBp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ml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbXB1dGVCdWRnZXRQcm9ncmFtLFxuICBLZXlwYWlyLFxuIC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k7XG5cbiAgICAgIGNvbnN0IHVuaXFXcml0YWJsZUFjY291bnRzID0gW1xuICAgICAgICAuLi5uZXcgU2V0KHdyaXRhYmxlQWNjb3VudHMubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvQmFzZTU4KCkpKSxcbiAgICAgIF1cbiAgICAgICAgLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b1B1YmxpY0tleSgpKVxuICAgICAgICAuc2xpY2UoMCwgTUFYX1JFQ0VOVF9QUklPUklUWV9GRUVfQUNDT1VOVFMpO1xuXG4gICAgICBjb25zdCBwcmlvcml0eUZlZXMgPVxuICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cb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ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQge1xuICBDb25maXJtT3B0aW9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B0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20g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udjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5rZXkgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uuc2VjcmV0ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBGaWxlYmFzZUNyZWRlbnRpYWwuZGV2O1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3QgbG9hZENvbmZpZyA9IGFzeW5jICgpID0+IHtcbiAgICBjb25zdCB7IGRlZmF1bHQ6IGxvYWRlZENvbmZpZyB9ID0gYXdhaXQgaW1wb3J0KFxuICAgICAgJ0Bzb2xhbmEtc3VpdGUvY29uZmlnL2xvYWQnLFxuICAgICAge1xuICAgICAgICB3aXRoOiB7IHR5cGU6ICdqc29uJyB9LFxuICAgICAgfVxuIC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Fzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KC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RXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoaW5zdCl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcChcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoKGluc3QpID0+IGluc3Quc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGNvbW1vbk9yTWludEluc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0LmZlZVBheWVyICE9PSB1bmRlZmluZWQsXG4gICAgICAgICk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQ2FsY3VsYXRlVHhzaXplLmlzTWF4VHJhbnNhY3Rpb25TaXplKHRyYW5zYWN0aW9uLCBmZWVQYXllci5wdWJsaWNLZXkpO1xuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4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gICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZU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bnN0YW50cy5DbHVzdGVyLnByZE1ldGFwbGV4IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgICBhd2FpdCBQcmlvcml0eUZlZS5Qcmlvcml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICA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gICBjb25zdCBmZWVQYXllclBrID0gW2ZlZVBheWVyLnRvQmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vI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hY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJlc3VsdCIsICJNdWx0aXNpZyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiTXVsdGlzaWdJbnN0cnVjdGlvbiIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF93ZWIzIiwgIk11bHRpc2lnIiwgIk11bHRpc2lnIiwgIk11bHRpc2lnIl0KfQo= \ No newline at end of file diff --git a/packages/suite-multisig/dist/index.mjs b/packages/suite-multisig/dist/index.mjs index 82f571bfb..e3d2ee7c6 100644 --- a/packages/suite-multisig/dist/index.mjs +++ b/packages/suite-multisig/dist/index.mjs @@ -28,7 +28,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -64,7 +64,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -120,13 +121,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1281,4 +1282,4 @@ var Multisig4 = { ...Multisig, ...Multisig2, ...Multisig3 }; export { Multisig4 as Multisig }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NyZWF0ZS50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wcmlvcml0eS1mZWUudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tcHV0ZS11bml0LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcmV0cnkudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL21pbnQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcGFydGlhbC1zaWduLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvaW5kZXgudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3Jlc3VsdC50cyIsICIuLi9zcmMvZ2V0LW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cbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2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KGluc3QpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICApO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKChpbnN0KSA9PiBpbnN0LnNpZ25lcnMpO1xuICAgICAgICBjb25zdCBmZWVQYXllcnMgPSBjb21tb25Pck1pbnRJbnN0LmZpbHRlcihcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5mZWVQYXllciAhPT0gdW5kZWZpbmVkLFxuICAgICAgICApO1xuICAgICAgICBsZXQgZmVlUGF5ZXIgPSBzaWduZXJzWzBdO1xuICAgICAgICBpZiAoZmVlUGF5ZXJzLmxlbmd0aCA+IDAgJiYgZmVlUGF5ZXJzWzBdLmZlZVBheWVyKSB7XG4gICAgICAgICAgZmVlUGF5ZXIgPSBmZWVQYXllcnNbMF0uZmVlUGF5ZXI7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IG5ldyBUcmFuc2FjdGlvbigpO1xuICAgICAgICBsZXQgZmluYWxTaWduZXJzID0gc2lnbmVycztcbiAgICAgICAgaWYgKGZlZVBheWVyKSB7XG4gICAgICAgICAgdHJhbnNhY3Rpb24uZmVlUGF5ZXIgPSBmZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW2ZlZVBheWVyLCAuLi5zaWduZXJzXTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIENhbGN1bGF0ZVR4c2l6ZS5pc01heFRyYW5zYWN0aW9uU2l6ZSh0cmFuc2FjdGlvbiwgZmVlUGF5ZXIucHVibGljS2V5KTtcblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgICBhd2FpdCBQcmlvcml0eUZlZS5Qcmlvcml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICA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ICcsIHByaW9yaXR5RmVlcyk7XG4gICAgICAgIHJldHVybiAwO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBncm91cEJ5U2xvdCA9IHByaW9yaXR5RmVlcy5yZWR1Y2UoXG4gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGFjY1trZXldLnB1c2goZmVlKTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXT4sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtYXhGZWVCeVNsb3QgPSBPYmplY3Qua2V5cyhncm91cEJ5U2xvdCkucmVkdWNlKFxuICAgICAgICAoYWNjLCBzbG90KSA9PiB7XG4gICAgICAgICAgYWNjW3Nsb3RdID0gZ3JvdXBCeVNsb3Rbc2xvdF0ucmVkdWNlKChtYXgsIGZlZSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIGZlZS5wcmlvcml0aXphdGlvbkZlZSA+IG1heC5wcmlvcml0aXphdGlvbkZlZSA/IGZlZSA6IG1heDtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXM+LFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1heGltdW1GZWVzID0gT2JqZWN0LnZhbHVlcyhtYXhGZWVCeVNsb3QpLnNvcnQoXG4gICAgICAgIChhOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMsIGI6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcykgPT5cbiAgICAgICAgIC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pcy5zaWduZXJzXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICA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W9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5S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cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaEZpbGViYXNlQ3JlZGVudGlhbCA9IChcbiAgICBlbnY6IHN0cmluZyxcbiAgKToge1xuICAgIGtleTogc3RyaW5nO1xuICAgIHNlY3JldDogc3RyaW5nO1xuICAgIGJ1Y2tldDogc3RyaW5nO1xuICB9ID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uua2V5IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5zZWNyZXQgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcihDb25zdGFudHMuV2Fybm5pbmdNZXNzYWdlLkZJTEVCQVNFX0NSRURFTlRJQUwpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uua2V5ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLnNlY3JldCAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gRmlsZWJhc2VDcmVkZW50aWFsLmRldjtcbiAgICAgIH1cbiAgICB9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3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgYWxsb3dPd25lck9mZkN1cnZlLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIG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b25zdCBjb21tb25Pck1pbnRJbnN0ID0gb3B0aW9ucy5pbnN0cnVjdGlvbnM7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBpbnN0IG9mIGNvbW1vbk9yTWludEluc3QpIHtcbiAgICAgICAgICBpZiAoIWluc3QuaW5zdHJ1Y3Rpb25zICYmICFpbnN0LnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGluc3QpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICApO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKChpbnN0KSA9PiBpbnN0LnNpZ25lcnMpO1xuICAgICAgICBjb25zdCBmZWVQYXllcnMgPSBjb21tb25Pck1pbnRJbnN0LmZpbHRlcihcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5mZWVQYXllciAhPT0gdW5kZWZpbmVkLFxuICAgICAgICApO1xuICAgICAgICBsZXQgZmVlUGF5ZXIgPSBzaWduZXJzWzBdO1xuICAgICAgICBpZiAoZmVlUGF5ZXJzLmxlbmd0aCA+IDAgJiYgZmVlUGF5ZXJzWzBdLmZlZVBheWVyKSB7XG4gICAgICAgICAgZmVlUGF5ZXIgPSBmZWVQYXllcnNbMF0uZmVlUGF5ZXI7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IG5ldyBUcmFuc2FjdGlvbigpO1xuICAgICAgICBsZXQgZmluYWxTaWduZXJzID0gc2lnbmVycztcbiAgICAgICAgaWYgKGZlZVBheWVyKSB7XG4gICAgICAgICAgdHJhbnNhY3Rpb24uZmVlUGF5ZXIgPSBmZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW2ZlZVBheWVyLCAuLi5zaWduZXJzXTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIENhbGN1bGF0ZVR4c2l6ZS5pc01heFRyYW5zYWN0aW9uU2l6ZSh0cmFuc2FjdGlvbiwgZmVlUGF5ZXIucHVibGljS2V5KTtcblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgICBhd2FpdCBQcmlvcml0eUZlZS5Qcmlvcml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25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bnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIEtleXBhaXIsXG4gIHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24sXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbkluc3RydWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25hdHVyZSxcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgQ29uc3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Sh0aGlzLmhleEluc3RydWN0aW9uLCAnaGV4Jyk7XG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gVHJhbnNhY3Rpb24uZnJvbShkZWNvZGUpO1xuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgdHJhbnNhY3Rpb24ucGFydGlhbFNpZ24ob3B0aW9ucy5mZWVQYXllci50b0tleXBhaXIoKSk7XG4gICAgICAgICAgY29uc3Qgd2lyZVRyYW5zYWN0aW9uID0gdHJhbnNhY3Rpb24uc2VyaWFsaXplKCk7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLnNlbmRSYXdUcmFuc2FjdGlvbihcbiAgICAgICAgICAgIHdpcmVUcmFuc2FjdGlvbixcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdEZvclBhcnRpYWxTaWduKFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgb3B0aW9ucy5mZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IFB1YmxpY0t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IiLCAiVHJhbnNhY3Rpb24iLCAic2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiTXVsdGlzaWciLCAiS2V5cGFpciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiTXVsdGlzaWdJbnN0cnVjdGlvbiIsICJUT0tFTl9QUk9HUkFNX0lEIiwgIlRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24iLCAiVE9LRU5fUFJPR1JBTV9JRCIsICJQdWJsaWNLZXkiLCAiTXVsdGlzaWciLCAiVE9LRU5fUFJPR1JBTV9JRCIsICJQdWJsaWNLZXkiLCAiTXVsdGlzaWciLCAiTXVsdGlzaWciXQp9Cg== \ No newline at end of file diff --git a/packages/suite-phantom/dist/index.d.mts b/packages/suite-phantom/dist/index.d.mts deleted file mode 100644 index 592900d5b..000000000 --- a/packages/suite-phantom/dist/index.d.mts +++ /dev/null @@ -1,389 +0,0 @@ -import { TransactionSignature, Keypair, Transaction, PublicKey } from '@solana/web3.js'; -import BN from 'bn.js'; - -declare const pubKeyNominality: unique symbol; -declare const secretNominality: unique symbol; -type Pubkey = (string & { - [pubKeyNominality]: never; -}) | string; -type Secret = (string & { - [secretNominality]: never; -}) | string; - -type SubmitOptions = { - feePayer: Secret; - isPriorityFee: boolean; - addSolPriorityFee: number; -}; - -declare abstract class AbstractResult { - protected abstract _chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - unwrap(): T; - unwrap(ok: (value: T) => U): U; - unwrap(ok: (value: T) => U, err: (error: E) => V): U | V; - unwrap(ok: (value: T) => U, err: (error: E) => U): U; - map(ok: (value: T) => U): Result; - map(ok: (value: T) => U, err: (error: E) => F): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result): Result; - chain(ok: (value: T) => Result, err: (error: E) => Result): Result; - match(ok: (value: T) => U, err: (error: E) => F): void | Promise; - submit(options?: Partial): Promise>; -} -declare global { - interface Array { - submit(options?: Partial): Promise>; - } -} -declare class InternalOk extends AbstractResult { - readonly value: T; - readonly isOk = true; - readonly isErr = false; - constructor(value: T); - protected _chain(ok: (value: T) => Result, _err: (error: E) => Result): Result; -} -declare class InternalErr extends AbstractResult { - readonly error: E; - readonly isOk = false; - readonly isErr = true; - constructor(error: E); - protected _chain(_ok: (value: T) => Result, err: (error: E) => Result): Result; -} -declare namespace Result { - export type Ok = InternalOk; - export type Err = InternalErr; - export function ok(value: T): Result; - export function err(error?: E): Result; - type U = Result; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8, R9]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7, R8]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6, R7]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5, R6]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4, R5]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3, R4]): Result<[ - OkType, - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2, R3]): Result<[ - OkType, - OkType, - OkType, - OkType - ], ErrType>; - export function all(obj: [R0, R1, R2]): Result<[OkType, OkType, OkType], ErrType>; - export function all(obj: [R0, R1]): Result<[OkType, OkType], ErrType>; - export function all(obj: [R0]): Result<[OkType], ErrType>; - export function all(obj: []): Result<[]>; - export function all>(obj: T): Result<{ - [K in keyof T]: T[K] extends Result ? I : never; - }, { - [K in keyof T]: T[K] extends Result ? E : never; - }[keyof T]>; - export { }; -} -type Result = Result.Ok | Result.Err; -type OkType> = R extends Result ? O : never; -type ErrType> = R extends Result ? E : never; - -type Condition = 'overMax' | 'underMin'; -interface Limit { - threshold: number; - condition: Condition; -} -interface Details { - key: string; - message: string; - actual: string | number; - limit?: Limit; -} - -type BurnOptions = { - feePayer: Secret; -}; - -type bignum = number | BN; -type Option = T | null; -declare enum UseMethod { - Burn = 0, - Multiple = 1, - Single = 2 -} -type Uses = { - useMethod: UseMethod; - remaining: bignum; - total: bignum; -}; -type Creators = { - address: Pubkey; - share: number; - verified: boolean; -}; -type InputCreators = { - address: Pubkey; - secret: Secret; - share: number; -}; - -type ThawOptions = { - feePayer: Secret; -}; - -type InitializeMint = { - mint: Keypair; - tx: Transaction; -}; - -type connectOption = { - onlyIfTrusted: false; -}; -type PhantomProvider = { - isPhantom?: boolean; - publicKey: PublicKey | null; - signTransaction(transaction: Transaction): Promise; - signAllTransactions(transactions: Transaction[]): Promise; - signMessage(message: Uint8Array): Promise; - connect(): Promise; - disconnect(): Promise; -}; - -type FileType = string | File; - -type StorageType = 'filebase' | 'arweave' | string; -type Properties = { - creators?: { - address?: string; - share?: number; - [key: string]: unknown; - }[]; - files?: { - type?: string; - filePath?: FileType; - uri?: string; - [key: string]: unknown; - }[]; - category?: string; - [key: string]: unknown; -}; -type Attribute = { - trait_type?: string; - value?: string; - [key: string]: unknown; -}; - -type InputCollection = Pubkey; -type Options = { - [key: string]: unknown; -}; -type InputNftMetadata = { - name: string; - symbol: string; - royalty?: number; - storageType?: StorageType; - filePath?: FileType; - uri?: string; - isMutable?: boolean; - description?: string; - external_url?: string; - animation_url?: string; - attributes?: Attribute[]; - properties?: Properties; - maxSupply?: bignum; - creators?: InputCreators[]; - uses?: Uses; - collection?: InputCollection; - options?: Options; -}; -type MintOptions = { - freezeAuthority: Pubkey; - feePayer: Secret; -}; - -type MintCollectionOptions = { - feePayer: Secret; - freezeAuthority: Pubkey; - collectionSize: number; -}; -type Collection = { - address: Pubkey; - verified: boolean; -}; - -type FreezeOptions = { - feePayer: Secret; -}; - -type TransferOptions = { - feePayer: Secret; -}; - -declare class ValidatorError extends Error { - details: Details[]; - constructor(message: string, details: Details[]); -} - -/** @namespace */ -declare const PhantomRegularNft: { - mint: (input: InputNftMetadata, cluster: string, phantom: PhantomProvider) => Promise>; -}; - -type InputTokenMetadata = { - name: string; - symbol: string; - filePath?: FileType; - uri?: string; - storageType?: StorageType; - description?: string; - royalty?: number; - uses?: Uses; - creators?: InputCreators[]; - attributes?: Attribute[]; - options?: Options; -}; - -/** @namespace */ -declare const PhantomSplToken: { - mint: (input: InputTokenMetadata, owner: Pubkey, cluster: string, totalAmount: number, mintDecimal: number, phantom: PhantomProvider) => Promise>; - add: (token: Pubkey, owner: Pubkey, cluster: string, totalAmount: number, mintDecimal: number, phantom: PhantomProvider) => Promise>; -}; - -export { type BurnOptions, type Collection, type Creators, type FreezeOptions, type InitializeMint, type InputCollection, type InputCreators, type InputNftMetadata, type MintCollectionOptions, type MintOptions, type Option, type Options, type PhantomProvider, PhantomRegularNft, PhantomSplToken, type ThawOptions, type TransferOptions, UseMethod, type Uses, type bignum, type connectOption }; diff --git a/packages/suite-phantom/dist/index.mjs b/packages/suite-phantom/dist/index.mjs deleted file mode 100644 index cf32246fc..000000000 --- a/packages/suite-phantom/dist/index.mjs +++ /dev/null @@ -1,3508 +0,0 @@ -// src/regular-nft/mint.ts -import { Transaction as Transaction9 } from "@solana/web3.js"; - -// ../suite-spl-token/src/add.ts -import { createMintToCheckedInstruction } from "@solana/spl-token"; - -// ../suite-utils/src/constants.ts -import { PublicKey } from "@solana/web3.js"; -import SolanaJsonConfig from "@solana-suite/config/load"; -var Config = SolanaJsonConfig; -var Constants; -((Constants2) => { - let WarnningMessage; - ((WarnningMessage2) => { - WarnningMessage2.FILEBASE_CREDENTIAL = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update Filebase credential(accessKey and secret) define parameter in solana-suite.json. - Can get credential from https://filebase.com/ - -------------------------------------- - `; - WarnningMessage2.DAS_API_URL = ` - [YOU HAVE TO DO] - -------------------------------------- - You need to update dasApiUrl define parameter in solana-suite.json. - can get api url from https://www.helius.dev/ - -------------------------------------- - `; - })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); -})(Constants || (Constants = {})); -((Constants2) => { - Constants2.currentCluster = Config.cluster.type; - Constants2.customClusterUrl = Config.cluster.customClusterUrl; - Constants2.isDebugging = Config.debugging; - Constants2.customDasApiUrl = Config.dasApiUrl; - let Cluster; - ((Cluster2) => { - Cluster2["prd"] = "mainnet-beta"; - Cluster2["prdMetaplex"] = "mainnet-beta-metaplex"; - Cluster2["dev"] = "devnet"; - Cluster2["localhost"] = "localhost-devnet"; - })(Cluster = Constants2.Cluster || (Constants2.Cluster = {})); - let EndPointUrl; - ((EndPointUrl2) => { - EndPointUrl2["prd"] = "https://api.mainnet-beta.solana.com"; - EndPointUrl2["prdMetaplex"] = "https://api.metaplex.solana.com"; - EndPointUrl2["dev"] = "https://api.devnet.solana.com"; - EndPointUrl2["localhost"] = "http://api.devnet.solana.com"; - })(EndPointUrl = Constants2.EndPointUrl || (Constants2.EndPointUrl = {})); - let BundlrUrl; - ((BundlrUrl2) => { - BundlrUrl2["prd"] = "https://node1.irys.xyz,https://node2.irys.xyz"; - BundlrUrl2["dev"] = "https://devnet.irys.xyz"; - })(BundlrUrl = Constants2.BundlrUrl || (Constants2.BundlrUrl = {})); - let DasApiUrl; - ((DasApiUrl2) => { - DasApiUrl2["prd"] = "https://mainnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92"; - DasApiUrl2["dev"] = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92"; - })(DasApiUrl = Constants2.DasApiUrl || (Constants2.DasApiUrl = {})); - Constants2.FilebaseCredential = { - dev: { - key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" - } - }; - Constants2.switchCluster = (param) => { - const { cluster: env, customClusterUrl: customClusterUrl2 } = param; - if (customClusterUrl2 && customClusterUrl2.length > 0) { - const index = Date.now() % customClusterUrl2.length; - return customClusterUrl2[index]; - } - switch (env) { - case "mainnet-beta" /* prd */: - return "https://api.mainnet-beta.solana.com" /* prd */; - case "mainnet-beta-metaplex" /* prdMetaplex */: - return "https://api.metaplex.solana.com" /* prdMetaplex */; - case "devnet" /* dev */: - return "https://api.devnet.solana.com" /* dev */; - default: - return "http://api.devnet.solana.com" /* localhost */; - } - }; - Constants2.switchBundlr = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - const urls = "https://node1.irys.xyz,https://node2.irys.xyz" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - return "https://devnet.irys.xyz" /* dev */; - } - } - }; - Constants2.switchDasApi = (env) => { - if (Constants2.customDasApiUrl && Constants2.customDasApiUrl.length > 0) { - const index = Date.now() % Constants2.customDasApiUrl.length; - return Constants2.customDasApiUrl[index]; - } - switch (env) { - case "mainnet-beta" /* prd */: { - if (Constants2.customDasApiUrl.length < 1) { - console.warn(Constants2.WarnningMessage.DAS_API_URL); - } - const urls = "https://mainnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92" /* prd */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - default: { - const urls = "https://devnet.helius-rpc.com/?api-key=15319bf4-5b40-4958-ac8d-6313aa55eb92" /* dev */.split(","); - const index = Date.now() % urls.length; - return urls[index]; - } - } - }; - Constants2.switchFilebaseCredential = (env) => { - switch (env) { - case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { - throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); - } - return Config.filebase; - } - default: { - if (Config.filebase.key || Config.filebase.secret) { - return Config.filebase; - } - return Constants2.FilebaseCredential.dev; - } - } - }; - Constants2.loadConfig = async () => { - const { default: loadedConfig } = await import("@solana-suite/config/load", { with: { type: "json" } }); - Config = loadedConfig; - console.log("##############", Config); - }; - Constants2.WRAPPED_TOKEN_PROGRAM_ID = new PublicKey( - "So11111111111111111111111111111111111111112" - ); - Constants2.MEMO_PROGRAM_ID = new PublicKey( - "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo" - ); - Constants2.METAPLEX_PROGRAM_ID = new PublicKey( - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" - ); - Constants2.COMMITMENT = "confirmed"; - Constants2.MAX_TRANSACTION_VERSION = 0; - Constants2.MAX_TRANSACTION_RETRIES = 1; - Constants2.FILEBADE_GATEWAY_URL = "https://ipfs.filebase.io/ipfs"; - Constants2.IRYS_GATEWAY_URL = "https://gateway.irys.xyz"; - Constants2.BUNDLR_NETWORK_URL = (0, Constants2.switchBundlr)(Config.cluster.type); - Constants2.FILEBASE_ACCESS_KEYS = (0, Constants2.switchFilebaseCredential)( - Config.cluster.type - ); - Constants2.DAS_API_URL = (0, Constants2.switchDasApi)(Config.cluster.type); - Constants2.EXPLORER_SOLSCAN_URL = "https://solscan.io"; - Constants2.EXPLORER_SOLANAFM_URL = "https://solana.fm"; - Constants2.EXPLORER_XRAY_URL = "https://xray.helius.xyz"; -})(Constants || (Constants = {})); - -// ../global/src/index.ts -import { Keypair, LAMPORTS_PER_SOL, PublicKey as PublicKey4 } from "@solana/web3.js"; - -// ../node/src/index.ts -import { Connection } from "@solana/web3.js"; -var Node; -((Node2) => { - const setted = { - clusterUrl: "", - commitment: Constants.COMMITMENT, - customClusterUrl: [] - }; - Node2.getConnection = () => { - if (setted.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: setted.customClusterUrl - }); - } else if (Constants.customClusterUrl.length > 0) { - setted.clusterUrl = Constants.switchCluster({ - customClusterUrl: Constants.customClusterUrl - }); - } else if (!setted.clusterUrl) { - setted.clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - } - if (!setted.commitment) { - setted.commitment = Constants.COMMITMENT; - } - return new Connection(setted.clusterUrl, setted.commitment); - }; - Node2.changeConnection = (param) => { - setted.clusterUrl = ""; - setted.customClusterUrl = []; - setted.commitment = Constants.COMMITMENT; - const { cluster, commitment, customClusterUrl } = param; - if (commitment) { - setted.commitment = commitment; - debugLog("# Node change commitment: ", setted.commitment); - } - if (cluster) { - setted.clusterUrl = Constants.switchCluster({ cluster }); - debugLog("# Node change clusterUrl: ", setted.clusterUrl); - } - if (customClusterUrl) { - debugLog("# customClusterUrl: ", customClusterUrl); - setted.clusterUrl = Constants.switchCluster({ customClusterUrl }); - setted.customClusterUrl = customClusterUrl; - debugLog( - "# Node change cluster, custom cluster url: ", - setted.clusterUrl - ); - } - }; - Node2.confirmedSig = async (signature, commitment = Constants.COMMITMENT) => { - const connection = Node2.getConnection(); - const latestBlockhash = await connection.getLatestBlockhash(); - return await connection.confirmTransaction( - { - blockhash: latestBlockhash.blockhash, - lastValidBlockHeight: latestBlockhash.lastValidBlockHeight, - signature - }, - commitment - ).then(Result.ok).catch(Result.err); - }; -})(Node || (Node = {})); - -// ../account/src/associated.ts -import { - ASSOCIATED_TOKEN_PROGRAM_ID, - createAssociatedTokenAccountInstruction, - getAccount, - getAssociatedTokenAddressSync, - TOKEN_PROGRAM_ID, - TokenAccountNotFoundError, - TokenInvalidAccountOwnerError -} from "@solana/spl-token"; -var Account; -((Account5) => { - let Associated; - ((Associated2) => { - Associated2.makeOrCreateInstruction = async (mint, owner, feePayer, allowOwnerOffCurve = false) => { - const associatedTokenAccount = getAssociatedTokenAddressSync( - mint.toPublicKey(), - owner.toPublicKey(), - allowOwnerOffCurve, - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - debugLog("# associatedTokenAccount: ", associatedTokenAccount.toString()); - try { - await getAccount( - Node.getConnection(), - associatedTokenAccount, - Node.getConnection().commitment, - TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst: void 0 - }; - } catch (error) { - if (!(error instanceof TokenAccountNotFoundError) && !(error instanceof TokenInvalidAccountOwnerError)) { - throw Error("Unexpected error"); - } - const payer = !feePayer ? owner : feePayer; - const inst = createAssociatedTokenAccountInstruction( - payer.toPublicKey(), - associatedTokenAccount, - owner.toPublicKey(), - mint.toPublicKey(), - TOKEN_PROGRAM_ID, - ASSOCIATED_TOKEN_PROGRAM_ID - ); - return { - tokenAccount: associatedTokenAccount.toString(), - inst - }; - } - }; - })(Associated = Account5.Associated || (Account5.Associated = {})); -})(Account || (Account = {})); - -// ../account/src/keypair.ts -import { Keypair as Original, PublicKey as PublicKey2 } from "@solana/web3.js"; -import bs from "bs58"; -var Account2; -((Account5) => { - class Keypair8 { - secret; - pubkey; - constructor(params) { - if (!params.pubkey) { - const keypair = params.secret.toKeypair(); - this.pubkey = keypair.publicKey.toString(); - } else { - this.pubkey = params.pubkey; - } - this.secret = params.secret; - } - toPublicKey() { - return new PublicKey2(this.pubkey); - } - toKeypair() { - const decoded = bs.decode(this.secret); - return Original.fromSecretKey(decoded); - } - static isPubkey = (value) => /^[0-9a-zA-Z]{32,44}$/.test(value); - static isSecret = (value) => /^[0-9a-zA-Z]{87,88}$/.test(value); - static create = () => { - const keypair = Original.generate(); - return new Keypair8({ - pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey) - }); - }; - static toKeyPair = (keypair) => { - return new Keypair8({ - pubkey: keypair.publicKey.toString(), - secret: bs.encode(keypair.secretKey) - }); - }; - } - Account5.Keypair = Keypair8; -})(Account2 || (Account2 = {})); - -// ../account/src/pda.ts -import { PublicKey as PublicKey3 } from "@solana/web3.js"; -import { PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; -import { PROGRAM_ADDRESS as MPL_BUBBLEGUM_PROGRAM_ID } from "mpl-bubblegum-instructions"; -import BN from "bn.js"; -var Account3; -((Account5) => { - let Pda; - ((Pda2) => { - Pda2.getMetadata = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("metadata"), - PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer() - ], - PROGRAM_ID - ); - return publicKey; - }; - Pda2.getMasterEdition = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("metadata"), - PROGRAM_ID.toBuffer(), - address.toPublicKey().toBuffer(), - Buffer.from("edition") - ], - PROGRAM_ID - ); - return publicKey; - }; - Pda2.getTreeAuthority = (address) => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [address.toPublicKey().toBuffer()], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getBgumSigner = () => { - const [publicKey] = PublicKey3.findProgramAddressSync( - [Buffer.from("collection_cpi", "utf8")], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return publicKey; - }; - Pda2.getAssetId = (address, leafIndex) => { - const node = new BN.BN(leafIndex); - const [assetId] = PublicKey3.findProgramAddressSync( - [ - Buffer.from("asset", "utf8"), - address.toPublicKey().toBuffer(), - Uint8Array.from(node.toArray("le", 8)) - ], - MPL_BUBBLEGUM_PROGRAM_ID.toPublicKey() - ); - return assetId.toString(); - }; - })(Pda = Account5.Pda || (Account5.Pda = {})); -})(Account3 || (Account3 = {})); - -// ../account/src/index.ts -var Account4 = { - ...Account, - ...Account2, - ...Account3 -}; - -// ../global/src/index.ts -import { BigNumber } from "bignumber.js"; -import bs2 from "bs58"; -String.prototype.toExplorerUrl = function(explorer = "solscan" /* Solscan */, options = {}) { - console.log("# config in global", Config); - let cluster = Config.cluster.type; - debugLog("# clusterType:", cluster); - if (cluster !== Constants.Cluster.prd) { - cluster = Constants.Cluster.dev; - } - const addressOrSignature = this.toString(); - let url = ""; - if (options.replacePath) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/${options.replacePath}/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/${options.replacePath}/${addressOrSignature}?cluster=${cluster}`; - } - return url; - } - if (Account4.Keypair.isPubkey(addressOrSignature)) { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/address/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/account/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/account/${addressOrSignature}?cluster=${cluster}`; - } - } else { - if (explorer === "solanafm" /* SolanaFM */) { - url = `${Constants.EXPLORER_SOLANAFM_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } else if (explorer === "xray" /* Xray */) { - url = `${Constants.EXPLORER_XRAY_URL}/tx/${addressOrSignature}?network=${cluster}`; - } else { - url = `${Constants.EXPLORER_SOLSCAN_URL}/tx/${addressOrSignature}?cluster=${cluster}`; - } - } - return url; -}; -String.prototype.toPublicKey = function() { - if (!Account4.Keypair.isPubkey(this.toString())) { - throw Error(`No match KeyPair.PubKey: ${this.toString()}`); - } - return new PublicKey4(this.toString()); -}; -String.prototype.toKeypair = function() { - if (!Account4.Keypair.isSecret(this.toString())) { - throw Error(`No match KeyPair.Secret: ${this.toString()}`); - } - const decoded = bs2.decode(this.toString()); - return Keypair.fromSecretKey(decoded); -}; -Number.prototype.toSol = function() { - return BigNumber(this).div(LAMPORTS_PER_SOL).toNumber(); -}; -Number.prototype.toLamports = function() { - return BigNumber(this).times(LAMPORTS_PER_SOL).toNumber(); -}; - -// ../transaction-builder/src/batch.ts -import { - sendAndConfirmTransaction as sendAndConfirmTransaction2, - Transaction as Transaction3 -} from "@solana/web3.js"; - -// ../transaction-builder/src/priority-fee.ts -import { - ComputeBudgetProgram as ComputeBudgetProgram2 -} from "@solana/web3.js"; - -// ../transaction-builder/src/compute-unit.ts -import { - ComputeBudgetProgram, - PublicKey as PublicKey5, - Transaction -} from "@solana/web3.js"; - -// ../suite-utils/src/shared.ts -var overwriteObject = (object, targets) => { - const that = object; - targets.forEach((target) => { - delete that[target.existsKey]; - that[target.will.key] = target.will.value; - }); - return that; -}; -var debugLog = (data1, data2 = "", data3 = "", data4 = "") => { - if (Constants.isDebugging === "true" || process.env.DEBUG === "true") { - console.log("[DEBUG]", data1, data2, data3, data4); - } -}; -var sleep = async (sec) => { - return new Promise((r) => setTimeout(r, sec * 1e3)); -}; -var isBrowser = () => { - return typeof window !== "undefined" && typeof window.document !== "undefined"; -}; -var isNode = () => { - return typeof process !== "undefined" && process.versions != null && process.versions.node != null; -}; -var isPromise = (obj) => { - return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function"; -}; -function Try(input, finallyInput) { - try { - const v = input(); - if (isPromise(v)) { - return v.then( - (x) => Result.ok(x), - (err) => Result.err(err) - ); - } else { - return Result.ok(v); - } - } catch (e) { - if (e instanceof Error) { - return Result.err(e); - } - return Result.err(Error(e)); - } finally { - if (finallyInput) { - debugLog("# finally input:", finallyInput); - finallyInput(); - } - } -} -var convertTimestampToDateTime = (created_at) => { - if (created_at) { - return new Date(created_at * 1e3); - } - return; -}; -var unixTimestamp = () => { - return Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); -}; - -// ../transaction-builder/src/compute-unit.ts -var TransactionBuilder; -((TransactionBuilder10) => { - const DEFAULUT_COMPUTE_UNIT = 2e5; - const DEFAULUT_THRESHOLD_MULTIPLIED = 1.1; - const MINIMUM_COMPUTE_UNIT = 450; - let ComputeUnit; - ((ComputeUnit2) => { - ComputeUnit2.createInstruction = async (instructions, payer, thresholdMultiplied) => { - const units = await (0, ComputeUnit2.simulate)(instructions, payer, thresholdMultiplied); - return ComputeBudgetProgram.setComputeUnitLimit({ - units - }); - }; - ComputeUnit2.simulate = async (instructions, payer, thresholdMultiplied = DEFAULUT_THRESHOLD_MULTIPLIED) => { - const tx = new Transaction(); - tx.recentBlockhash = PublicKey5.default.toString(); - instructions.forEach((inst) => tx.add(inst)); - tx.feePayer = payer.publicKey; - tx.verifySignatures(false); - const simulation = await Node.getConnection().simulateTransaction(tx); - const units = simulation.value.unitsConsumed || DEFAULUT_COMPUTE_UNIT; - debugLog("# get simulate transaction: ", units); - let cu = 0; - if (units === 0) { - cu = DEFAULUT_COMPUTE_UNIT; - } else if (units < MINIMUM_COMPUTE_UNIT) { - cu = MINIMUM_COMPUTE_UNIT; - } else { - cu = Math.trunc(units * thresholdMultiplied); - } - debugLog("# simulate cu: ", cu); - return cu; - }; - })(ComputeUnit = TransactionBuilder10.ComputeUnit || (TransactionBuilder10.ComputeUnit = {})); -})(TransactionBuilder || (TransactionBuilder = {})); - -// ../transaction-builder/src/priority-fee.ts -var TransactionBuilder2; -((TransactionBuilder10) => { - let PriorityFee; - ((PriorityFee2) => { - const MAX_RECENT_PRIORITY_FEE_ACCOUNTS = 128; - const MICRO_LAMPORTS_PER_LAMPORT = 1e6; - PriorityFee2.createInstruction = async (instructions, addSolPriorityFee, feePayer) => { - let unitPrice = 0; - if (addSolPriorityFee && feePayer) { - const microLamports = addSolPriorityFee.toLamports() * MICRO_LAMPORTS_PER_LAMPORT; - const cu = await TransactionBuilder.ComputeUnit.simulate( - instructions, - feePayer - ); - unitPrice = Math.trunc(microLamports / cu); - } else { - unitPrice = await (0, PriorityFee2.estimatePriorityFee)(instructions); - } - debugLog("# unit price(microLamports): ", unitPrice); - return ComputeBudgetProgram2.setComputeUnitPrice({ - microLamports: unitPrice - }); - }; - PriorityFee2.estimatePriorityFee = async (instructions) => { - const writableAccounts = instructions.map( - (inst) => inst.keys.filter((account) => account.isWritable).map((key) => key.pubkey) - ).flat(); - const uniqWritableAccounts = [ - ...new Set(writableAccounts.map((account) => account.toBase58())) - ].map((account) => account.toPublicKey()).slice(0, MAX_RECENT_PRIORITY_FEE_ACCOUNTS); - const priorityFees = await Node.getConnection().getRecentPrioritizationFees({ - lockedWritableAccounts: uniqWritableAccounts - }); - if (priorityFees.length < 1) { - debugLog("# get recent priority fees: ", priorityFees); - return 0; - } - const groupBySlot = priorityFees.reduce( - (acc, fee) => { - const key = fee.slot; - if (!acc[key]) { - acc[key] = []; - } - acc[key].push(fee); - return acc; - }, - {} - ); - const maxFeeBySlot = Object.keys(groupBySlot).reduce( - (acc, slot) => { - acc[slot] = groupBySlot[slot].reduce((max, fee) => { - return fee.prioritizationFee > max.prioritizationFee ? fee : max; - }); - return acc; - }, - {} - ); - const maximumFees = Object.values(maxFeeBySlot).sort( - (a, b) => a.slot - b.slot - ); - const recentFees = maximumFees.slice( - Math.max(maximumFees.length - 20, 0) - ); - const mid = Math.floor(recentFees.length / 2); - const medianFee = recentFees.length % 2 !== 0 ? recentFees[mid].prioritizationFee : (recentFees[mid - 1].prioritizationFee + recentFees[mid].prioritizationFee) / 2; - debugLog("# median fee: ", medianFee); - return Math.ceil(medianFee); - }; - })(PriorityFee = TransactionBuilder10.PriorityFee || (TransactionBuilder10.PriorityFee = {})); -})(TransactionBuilder2 || (TransactionBuilder2 = {})); - -// ../transaction-builder/src/retry.ts -import { - sendAndConfirmTransaction, - SendTransactionError -} from "@solana/web3.js"; -var TransactionBuilder3; -((TransactionBuilder10) => { - let Retry; - ((Retry2) => { - const RETRY_MULTIPLIED = 1.6; - Retry2.isComputeBudgetError = (error) => { - if (typeof error === "object" && error instanceof SendTransactionError) { - if (error.logs?.some((item) => item.includes("ComputeBudget"))) { - return true; - } - } - return false; - }; - Retry2.submit = async (transaction, finalSigners, confirmOptions) => { - debugLog("# Retry the Transaction due to a compute budget error"); - transaction.instructions[0] = await TransactionBuilder.ComputeUnit.createInstruction( - transaction.instructions, - finalSigners[0], - RETRY_MULTIPLIED - ); - return await sendAndConfirmTransaction( - Node.getConnection(), - transaction, - finalSigners, - confirmOptions - ); - }; - Retry2.submitForPartialSign = async (transaction, finalSigner, confirmOptions) => { - debugLog("# Retry the Transaction due to a compute budget error"); - transaction.instructions[0] = await TransactionBuilder.ComputeUnit.createInstruction( - transaction.instructions, - finalSigner, - RETRY_MULTIPLIED - ); - transaction.partialSign(finalSigner); - const wireTransaction = transaction.serialize(); - return await Node.getConnection().sendRawTransaction( - wireTransaction, - confirmOptions - ); - }; - })(Retry = TransactionBuilder10.Retry || (TransactionBuilder10.Retry = {})); -})(TransactionBuilder3 || (TransactionBuilder3 = {})); - -// ../transaction-builder/src/batch.ts -var TransactionBuilder4; -((TransactionBuilder10) => { - class Batch { - submit = async (options = {}) => { - return Try(async () => { - if (!options.instructions) { - throw Error("Not found options.instructions"); - } - const commonOrMintInst = options.instructions; - let i = 0; - for (const inst of commonOrMintInst) { - if (!inst.instructions && !inst.signers) { - throw Error( - `only Instruction object that can use batchSubmit(). - Index: ${i}, Set value: ${JSON.stringify(inst)}` - ); - } - i++; - } - const instructions = commonOrMintInst.flatMap( - (inst) => inst.instructions - ); - const signers = commonOrMintInst.flatMap((inst) => inst.signers); - const feePayers = commonOrMintInst.filter( - (inst) => inst.feePayer !== void 0 - ); - let feePayer = signers[0]; - if (feePayers.length > 0 && feePayers[0].feePayer) { - feePayer = feePayers[0].feePayer; - } - const transaction = new Transaction3(); - let finalSigners = signers; - if (feePayer) { - transaction.feePayer = feePayer.publicKey; - finalSigners = [feePayer, ...signers]; - } - if (options.isPriorityFee) { - instructions.unshift( - await TransactionBuilder2.PriorityFee.createInstruction( - instructions, - options.addSolPriorityFee, - finalSigners[0] - ) - ); - } - instructions.unshift( - await TransactionBuilder.ComputeUnit.createInstruction( - instructions, - finalSigners[0] - ) - ); - instructions.map((inst) => transaction.add(inst)); - const confirmOptions = { - maxRetries: Constants.MAX_TRANSACTION_RETRIES - }; - try { - return await sendAndConfirmTransaction2( - Node.getConnection(), - transaction, - finalSigners, - confirmOptions - ); - } catch (error) { - if (TransactionBuilder3.Retry.isComputeBudgetError(error)) { - return await TransactionBuilder3.Retry.submit( - transaction, - finalSigners, - confirmOptions - ); - } - throw error; - } - }); - }; - } - TransactionBuilder10.Batch = Batch; -})(TransactionBuilder4 || (TransactionBuilder4 = {})); - -// ../transaction-builder/src/common.ts -import { - sendAndConfirmTransaction as sendAndConfirmTransaction3, - Transaction as Transaction4 -} from "@solana/web3.js"; -var TransactionBuilder5; -((TransactionBuilder10) => { - class Common { - static MAX_TRANSACTION_SIZE = 1232; - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.feePayer = feePayer; - this.data = data; - } - submit = async (options = {}) => { - return Try(async () => { - if (!(this instanceof Common)) { - throw Error("only Instruction object that can use this"); - } - const transaction = new Transaction4(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - if (options.isPriorityFee) { - this.instructions.unshift( - await TransactionBuilder2.PriorityFee.createInstruction( - this.instructions, - options.addSolPriorityFee, - finalSigners[0] - ) - ); - } - this.instructions.unshift( - await TransactionBuilder.ComputeUnit.createInstruction( - this.instructions, - finalSigners[0] - ) - ); - this.instructions.forEach((inst) => transaction.add(inst)); - const confirmOptions = { - maxRetries: Constants.MAX_TRANSACTION_RETRIES - }; - try { - return await sendAndConfirmTransaction3( - Node.getConnection(), - transaction, - finalSigners, - confirmOptions - ); - } catch (error) { - if (TransactionBuilder3.Retry.isComputeBudgetError(error)) { - return await TransactionBuilder3.Retry.submit( - transaction, - finalSigners, - confirmOptions - ); - } - throw error; - } - }); - }; - } - TransactionBuilder10.Common = Common; -})(TransactionBuilder5 || (TransactionBuilder5 = {})); - -// ../transaction-builder/src/mint.ts -import { - sendAndConfirmTransaction as sendAndConfirmTransaction4, - Transaction as Transaction5 -} from "@solana/web3.js"; -var TransactionBuilder6; -((TransactionBuilder10) => { - class Mint { - instructions; - signers; - feePayer; - data; - constructor(instructions, signers, feePayer, data) { - this.instructions = instructions; - this.signers = signers; - this.data = data; - this.feePayer = feePayer; - } - submit = async (options = {}) => { - return Try(async () => { - if (!(this instanceof Mint)) { - throw Error("only MintInstruction object that can use this"); - } - const transaction = new Transaction5(); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - transaction.lastValidBlockHeight = blockhashObj.lastValidBlockHeight; - transaction.recentBlockhash = blockhashObj.blockhash; - let finalSigners = this.signers; - if (this.feePayer) { - transaction.feePayer = this.feePayer.publicKey; - finalSigners = [this.feePayer, ...this.signers]; - } - if (Node.getConnection().rpcEndpoint === Constants.EndPointUrl.prd) { - debugLog("# Change metaplex cluster on mainnet-beta"); - Node.changeConnection({ cluster: Constants.Cluster.prdMetaplex }); - } - if (options.isPriorityFee) { - this.instructions.unshift( - await TransactionBuilder2.PriorityFee.createInstruction( - this.instructions, - options.addSolPriorityFee, - finalSigners[0] - ) - ); - } - this.instructions.unshift( - await TransactionBuilder.ComputeUnit.createInstruction( - this.instructions, - finalSigners[0] - ) - ); - this.instructions.forEach((inst) => transaction.add(inst)); - const confirmOptions = { - maxRetries: Constants.MAX_TRANSACTION_RETRIES - }; - try { - return await sendAndConfirmTransaction4( - Node.getConnection(), - transaction, - finalSigners, - confirmOptions - ); - } catch (error) { - if (TransactionBuilder3.Retry.isComputeBudgetError(error)) { - return await TransactionBuilder3.Retry.submit( - transaction, - finalSigners, - confirmOptions - ); - } - throw error; - } - }); - }; - } - TransactionBuilder10.Mint = Mint; -})(TransactionBuilder6 || (TransactionBuilder6 = {})); - -// ../transaction-builder/src/partial-sign.ts -import { - Transaction as Transaction6 -} from "@solana/web3.js"; -var TransactionBuilder7; -((TransactionBuilder10) => { - class PartialSign { - hexInstruction; - data; - constructor(instructions, mint) { - this.hexInstruction = instructions; - this.data = mint; - } - submit = async (options = {}) => { - return Try(async () => { - if (!(this instanceof PartialSign)) { - throw Error("only PartialSignInstruction object that can use this"); - } - if (!options.feePayer) { - throw Error("Need feePayer"); - } - const decode = Buffer.from(this.hexInstruction, "hex"); - const transaction = Transaction6.from(decode); - const confirmOptions = { - maxRetries: Constants.MAX_TRANSACTION_RETRIES - }; - try { - transaction.partialSign(options.feePayer.toKeypair()); - const wireTransaction = transaction.serialize(); - return await Node.getConnection().sendRawTransaction( - wireTransaction, - confirmOptions - ); - } catch (error) { - if (TransactionBuilder3.Retry.isComputeBudgetError(error)) { - return await TransactionBuilder3.Retry.submitForPartialSign( - transaction, - options.feePayer.toKeypair(), - confirmOptions - ); - } - throw error; - } - }); - }; - } - TransactionBuilder10.PartialSign = PartialSign; -})(TransactionBuilder7 || (TransactionBuilder7 = {})); - -// ../transaction-builder/src/calculate-txsize.ts -var TransactionBuilder8; -((TransactionBuilder10) => { - const LOW_VALUE = 127; - const HIGH_VALUE = 16383; - const MAX_TRANSACTION_SIZE = 1232; - const compactHeader = (n) => n <= LOW_VALUE ? 1 : n <= HIGH_VALUE ? 2 : 3; - const compactArraySize = (n, size) => compactHeader(n) + n * size; - TransactionBuilder10.calculateTxSize = (transaction, feePayer) => { - const feePayerPk = [feePayer.toBase58()]; - const signers = new Set(feePayerPk); - const accounts = new Set(feePayerPk); - const ixsSize = transaction.instructions.reduce((acc, ix) => { - ix.keys.forEach(({ pubkey, isSigner }) => { - const pk = pubkey.toBase58(); - if (isSigner) signers.add(pk); - accounts.add(pk); - }); - accounts.add(ix.programId.toBase58()); - const nIndexes = ix.keys.length; - const opaqueData = ix.data.length; - return acc + 1 + // PID index - compactArraySize(nIndexes, 1) + compactArraySize(opaqueData, 1); - }, 0); - return compactArraySize(signers.size, 64) + // signatures - 3 + // header - compactArraySize(accounts.size, 32) + // accounts - 32 + // blockhash - compactHeader(transaction.instructions.length) + // instructions - ixsSize; - }; - TransactionBuilder10.isOverTransactionSize = (transaction, feePayer) => { - return (0, TransactionBuilder10.calculateTxSize)(transaction, feePayer) > MAX_TRANSACTION_SIZE; - }; -})(TransactionBuilder8 || (TransactionBuilder8 = {})); - -// ../transaction-builder/src/index.ts -var TransactionBuilder9 = { - ...TransactionBuilder4, - ...TransactionBuilder8, - ...TransactionBuilder5, - ...TransactionBuilder, - ...TransactionBuilder6, - ...TransactionBuilder7, - ...TransactionBuilder2, - ...TransactionBuilder3 -}; - -// ../suite-utils/src/result.ts -var AbstractResult = class { - unwrap(ok, err) { - const r = this._chain( - (value) => Result.ok(ok ? ok(value) : value), - (error) => err ? Result.ok(err(error)) : Result.err(error) - ); - if (r.isErr) { - throw r.error; - } - return r.value; - } - map(ok, err) { - return this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err ? err(error) : error) - ); - } - chain(ok, err) { - return this._chain(ok, err || ((error) => Result.err(error))); - } - match(ok, err) { - this._chain( - (value) => Result.ok(ok(value)), - (error) => Result.err(err(error)) - ); - } - /// single TransactionBuilder //// - /* eslint-disable @typescript-eslint/no-explicit-any */ - async submit(options = {}) { - const res = this.map( - async (ok) => { - const hexRegex = /^[0-9a-fA-F]+$/; - if (typeof ok === "string" && hexRegex.test(ok)) { - return new TransactionBuilder9.PartialSign(ok).submit(options); - } else { - const obj = ok; - return await obj.submit(options); - } - }, - (err) => { - return err; - } - ); - if (res.isErr) { - return Result.err(res.error); - } - return res.value; - } -}; -Array.prototype.submit = async function(options = {}) { - const instructions = []; - for (const obj of this) { - if (obj.isErr) { - return obj; - } else if (obj.isOk) { - instructions.push(obj.value); - } else { - return Result.err(Error("Only Array Instruction object")); - } - } - const batchOptions = { - feePayer: options.feePayer, - isPriorityFee: options.isPriorityFee, - instructions - }; - debugLog("# Result batch submit()"); - return new TransactionBuilder9.Batch().submit(batchOptions); -}; -var InternalOk = class extends AbstractResult { - constructor(value) { - super(); - this.value = value; - } - isOk = true; - isErr = false; - /* eslint-disable @typescript-eslint/no-unused-vars */ - _chain(ok, _err) { - return ok(this.value); - } -}; -var InternalErr = class extends AbstractResult { - constructor(error) { - super(); - this.error = error; - } - isOk = false; - isErr = true; - _chain(_ok, err) { - return err(this.error); - } -}; -var Result; -((Result28) => { - function ok(value) { - return new InternalOk(value); - } - Result28.ok = ok; - function err(error) { - return new InternalErr(error || Error()); - } - Result28.err = err; - function all(obj) { - if (Array.isArray(obj)) { - const resArr = []; - for (const item of obj) { - if (item.isErr) { - return item; - } - resArr.push(item.value); - } - return Result28.ok(resArr); - } - const res = {}; - const keys = Object.keys(obj); - for (const key of keys) { - const item = obj[key]; - if (item.isErr) { - return item; - } - res[key] = item.value; - } - return Result28.ok(res); - } - Result28.all = all; -})(Result || (Result = {})); - -// ../suite-spl-token/src/calculate-amount.ts -var SplToken; -((SplToken11) => { - SplToken11.calculateAmount = (amount, mintDecimal) => { - return amount * 10 ** mintDecimal; - }; -})(SplToken || (SplToken = {})); - -// ../suite-spl-token/src/add.ts -var SplToken2; -((SplToken11) => { - SplToken11.add = async (token, owner, ownerOrMultisig, totalAmount, mintDecimal, options = {}) => { - return Try(async () => { - const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; - const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const associated = await Account4.Associated.makeOrCreateInstruction( - token, - owner, - payer - ); - const inst = createMintToCheckedInstruction( - token.toPublicKey(), - associated.tokenAccount.toPublicKey(), - owner.toPublicKey(), - SplToken.calculateAmount(totalAmount, mintDecimal), - mintDecimal, - keypairs - ); - const instructions = associated.inst ? [associated.inst, inst] : [inst]; - return new TransactionBuilder9.Common( - instructions, - keypairs, - payer.toKeypair(), - token - ); - }); - }; -})(SplToken2 || (SplToken2 = {})); - -// ../suite-spl-token/src/burn.ts -import { - createBurnCheckedInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync2 -} from "@solana/spl-token"; -var SplToken3; -((SplToken11) => { - SplToken11.burn = (mint, owner, ownerOrMultisig, burnAmount, tokenDecimals, options = {}) => { - return Try(() => { - const tokenAccount = getAssociatedTokenAddressSync2( - mint.toPublicKey(), - owner.toPublicKey() - ); - const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; - const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const inst = createBurnCheckedInstruction( - tokenAccount, - mint.toPublicKey(), - owner.toPublicKey(), - SplToken.calculateAmount(burnAmount, tokenDecimals), - tokenDecimals, - keypairs - ); - return new TransactionBuilder9.Common([inst], keypairs, payer.toKeypair()); - }); - }; -})(SplToken3 || (SplToken3 = {})); - -// ../converter/src/collection.ts -var Converter; -((Converter15) => { - let Collection; - ((Collection2) => { - Collection2.intoInfra = (input) => { - if (!input) { - return null; - } - return { - key: input.toPublicKey(), - verified: false - }; - }; - Collection2.intoUser = (output) => { - if (!output) { - return void 0; - } - return { - address: output.key.toString(), - verified: output.verified - }; - }; - })(Collection = Converter15.Collection || (Converter15.Collection = {})); - let CollectionMint; - ((CollectionMint2) => { - CollectionMint2.intoUser = (output) => { - const res = output.find((value) => { - if (value.group_key === "collection") { - return value.group_value; - } - }); - return res ? res.group_value : ""; - }; - })(CollectionMint = Converter15.CollectionMint || (Converter15.CollectionMint = {})); -})(Converter || (Converter = {})); - -// ../converter/src/creators.ts -var Converter2; -((Converter15) => { - let Creators; - ((Creators2) => { - Creators2.intoInfra = (input) => { - if (!input) { - return null; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoCompressedNftInfra = (input) => { - if (!input) { - return []; - } - return input.map((data) => { - return { - address: data.address.toPublicKey(), - share: data.share, - verified: false - }; - }); - }; - Creators2.intoUser = (output) => { - if (!output) { - return void 0; - } - return output.map((data) => { - return { - address: data.address.toString(), - share: data.share, - verified: data.verified - }; - }); - }; - })(Creators = Converter15.Creators || (Converter15.Creators = {})); -})(Converter2 || (Converter2 = {})); - -// ../converter/src/compressed-nft-metadata.ts -import { - TokenProgramVersion, - TokenStandard -} from "mpl-bubblegum-instructions"; -var Converter3; -((Converter15) => { - let CompressedNftMetadata; - ((CompressedNftMetadata2) => { - CompressedNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoCompressedNftInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null, - primarySaleHappened: false, - isMutable: input.isMutable ?? false, - editionNonce: 0, - tokenStandard: TokenStandard.NonFungible, - tokenProgramVersion: TokenProgramVersion.Original - }; - }; - })(CompressedNftMetadata = Converter15.CompressedNftMetadata || (Converter15.CompressedNftMetadata = {})); -})(Converter3 || (Converter3 = {})); - -// ../converter/src/royalty.ts -var Converter4; -((Converter15) => { - let Royalty; - ((Royalty2) => { - Royalty2.THRESHOLD = 100; - Royalty2.intoInfra = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - Royalty2.intoUser = (percentage) => { - return percentage * Royalty2.THRESHOLD; - }; - })(Royalty = Converter15.Royalty || (Converter15.Royalty = {})); -})(Converter4 || (Converter4 = {})); - -// ../converter/src/nft.ts -var Converter5; -((Converter15) => { - let Nft; - ((Nft2) => { - Nft2.intoUser = (output) => { - return { - mint: output.onchain.id.toString(), - collectionMint: Converter.CollectionMint.intoUser( - output.onchain.grouping - ), - authorities: output.onchain.authorities, - royalty: Converter4.Royalty.intoUser(output.onchain.royalty.percent), - name: output.onchain.content.metadata.name, - symbol: output.onchain.content.metadata.symbol, - uri: output.onchain.content.json_uri, - creators: Converter2.Creators.intoUser(output.onchain.creators), - treeAddress: output.onchain.compression.tree, - isCompressed: output.onchain.compression.compressed, - isMutable: output.onchain.mutable, - isBurn: output.onchain.burnt, - editionNonce: output.onchain.supply.edition_nonce, - primarySaleHappened: output.onchain.royalty.primary_sale_happened, - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - })(Nft = Converter15.Nft || (Converter15.Nft = {})); -})(Converter5 || (Converter5 = {})); - -// ../converter/src/memo.ts -var Converter6; -((Converter15) => { - let Memo; - ((Memo2) => { - Memo2.intoUserSide = (output, meta, outputTransfer, mappingTokenAccount) => { - const history = {}; - if (outputTransfer && outputTransfer.program !== "") { - if (mappingTokenAccount && outputTransfer.program === "spl-token") { - const foundSource = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === outputTransfer.parsed.info.destination - ); - history.mint = outputTransfer.parsed.info.mint; - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } else { - history.source = outputTransfer.parsed.info.source; - history.destination = outputTransfer.parsed.info.destination; - } - } - history.memo = output.parsed; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Memo = Converter15.Memo || (Converter15.Memo = {})); -})(Converter6 || (Converter6 = {})); - -// ../converter/src/mint.ts -var Converter7; -((Converter15) => { - let Mint; - ((Mint2) => { - Mint2.intoUserSide = (output, meta) => { - const history = {}; - history.mint = output.parsed.info.mint; - history.mintAuthority = output.parsed.info.mintAuthority; - history.tokenAmount = output.parsed.info.tokenAmount; - history.account = output.parsed.info.account; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Mint = Converter15.Mint || (Converter15.Mint = {})); -})(Converter7 || (Converter7 = {})); - -// ../converter/src/regular-nft-metadata.ts -var Converter8; -((Converter15) => { - let RegularNftMetadata; - ((RegularNftMetadata2) => { - RegularNftMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: Converter.Collection.intoInfra(input.collection), - uses: input.uses || null - }; - }; - })(RegularNftMetadata = Converter15.RegularNftMetadata || (Converter15.RegularNftMetadata = {})); -})(Converter8 || (Converter8 = {})); - -// ../converter/src/properties.ts -var Converter9; -((Converter15) => { - let Properties; - ((Properties2) => { - Properties2.intoInfra = async (input, callbackFunc, storageType, options = {}) => { - if (!input || !input.files) { - return {}; - } - const files = await Promise.all( - input.files.map(async (file) => { - if (!file.filePath && !file.uri) { - return {}; - } - if (file.filePath) { - const res = await callbackFunc( - file.filePath, - storageType, - options - ); - if (res.isErr) { - throw Error(res.error.message); - } - return overwriteObject(file, [ - { - existsKey: "filePath", - will: { key: "uri", value: res.value } - } - ]); - } - return file; - }) - ); - return { ...input, files }; - }; - })(Properties = Converter15.Properties || (Converter15.Properties = {})); -})(Converter9 || (Converter9 = {})); - -// ../converter/src/uses.ts -var Converter10; -((Converter15) => { - let Uses; - ((Uses2) => { - Uses2.intoUserSide = (output) => { - if (!output) { - return void 0; - } - return output; - }; - })(Uses = Converter15.Uses || (Converter15.Uses = {})); -})(Converter10 || (Converter10 = {})); - -// ../converter/src/token-metadata.ts -var Converter11; -((Converter15) => { - let TokenMetadata; - ((TokenMetadata2) => { - TokenMetadata2.intoInfra = (input, uri, sellerFeeBasisPoints) => { - return { - name: input.name, - symbol: input.symbol, - uri, - sellerFeeBasisPoints, - creators: Converter2.Creators.intoInfra(input.creators), - collection: null, - uses: input.uses || null - }; - }; - TokenMetadata2.intoUser = (output, tokenAmount) => { - return { - mint: output.onchain.mint.toString(), - royalty: output.onchain.data.sellerFeeBasisPoints, - name: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.name), - symbol: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.symbol), - tokenAmount, - uri: (0, TokenMetadata2.deleteNullStrings)(output.onchain.data.uri), - creators: Converter2.Creators.intoUser(output.onchain.data.creators), - uses: Converter10.Uses.intoUserSide(output.onchain.uses), - dateTime: convertTimestampToDateTime(output.offchain.created_at), - offchain: output.offchain - }; - }; - TokenMetadata2.deleteNullStrings = (str) => { - return str.replace(/\0/g, ""); - }; - })(TokenMetadata = Converter15.TokenMetadata || (Converter15.TokenMetadata = {})); -})(Converter11 || (Converter11 = {})); - -// ../converter/src/transfer-checked.ts -var Converter12; -((Converter15) => { - let TransferChecked; - ((TransferChecked2) => { - TransferChecked2.intoUserSide = (output, meta, mappingTokenAccount) => { - const history = {}; - if (mappingTokenAccount) { - const foundSource = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.source - ); - const foundDest = mappingTokenAccount.find( - (m) => m.account === output.parsed.info.destination - ); - foundSource && (history.source = foundSource.owner); - foundDest && (history.destination = foundDest.owner); - } - history.tokenAmount = output.parsed.info.tokenAmount; - history.mint = output.parsed.info.mint; - history.multisigAuthority = output.parsed.info.multisigAuthority; - history.signers = output.parsed.info.signers; - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(TransferChecked = Converter15.TransferChecked || (Converter15.TransferChecked = {})); -})(Converter12 || (Converter12 = {})); - -// ../converter/src/transfer.ts -var Converter13; -((Converter15) => { - let Transfer; - ((Transfer2) => { - Transfer2.intoUserSide = (output, meta) => { - const history = {}; - if (!output.parsed.info.destination || !output.parsed.info.lamports) { - return; - } - history.source = output.parsed.info.source; - history.destination = output.parsed.info.destination; - history.sol = output.parsed.info.lamports?.toSol().toString(); - history.type = output.program; - history.dateTime = convertTimestampToDateTime(meta.blockTime); - history.sig = meta.transaction.signatures[0]; - history.innerInstruction = false; - if (meta.meta?.innerInstructions && meta.meta?.innerInstructions.length !== 0) { - history.innerInstruction = true; - } - return history; - }; - })(Transfer = Converter15.Transfer || (Converter15.Transfer = {})); -})(Converter13 || (Converter13 = {})); - -// ../converter/src/index.ts -var Converter14 = { - ...Converter3, - ...Converter, - ...Converter2, - ...Converter5, - ...Converter6, - ...Converter7, - ...Converter8, - ...Converter9, - ...Converter4, - ...Converter11, - ...Converter12, - ...Converter13, - ...Converter10 -}; - -// ../suite-spl-token/src/find.ts -import { Metadata } from "@metaplex-foundation/mpl-token-metadata"; -import { TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID2 } from "@solana/spl-token"; -import fetch2 from "cross-fetch"; -var SplToken4; -((SplToken11) => { - const MAX_RETRIES = 10; - const RETRY_DELAY = 5; - const converter = (metadata, json, tokenAmount) => { - return Converter14.TokenMetadata.intoUser( - { - onchain: metadata, - offchain: json - }, - tokenAmount - ); - }; - const fetchRetry = async (url, retries = 0) => { - try { - const response = await fetch2(url); - if (!response.ok) { - throw new Error(`HTTP error! Status: ${response.status}`); - } - return await response.json(); - } catch (error) { - if (retries < MAX_RETRIES) { - debugLog(`Error fetching data from ${url}, ${retries}, ${error}`); - await sleep(RETRY_DELAY); - return fetchRetry(url, retries + 1); - } else { - debugLog(`Max retries reached (${MAX_RETRIES})`); - } - } - }; - SplToken11.findByOwner = async (owner) => { - return Try(async () => { - const connection = Node.getConnection(); - const info = await connection.getParsedTokenAccountsByOwner( - owner.toPublicKey(), - { - programId: TOKEN_PROGRAM_ID2 - } - ); - const datas = info.value.map(async (d) => { - const mint = d.account.data.parsed.info.mint; - const tokenAmount = d.account.data.parsed.info.tokenAmount.amount; - if (tokenAmount === "1") { - return; - } - return Metadata.fromAccountAddress( - connection, - Account4.Pda.getMetadata(mint) - ).then(async (metadata) => { - return fetchRetry(metadata.data.uri).then((json) => { - return converter(metadata, json, tokenAmount); - }); - }).catch((err) => debugLog("# [Fetch error]", err)); - }); - const filters = (await Promise.all(datas)).filter( - (data) => data !== void 0 - ); - return filters; - }); - }; - SplToken11.findByMint = async (mint) => { - return Try(async () => { - const connection = Node.getConnection(); - const metadata = await Metadata.fromAccountAddress( - connection, - Account4.Pda.getMetadata(mint) - ); - debugLog("# findByMint metadata: ", metadata); - if (metadata.tokenStandard === 0) { - throw Error( - `This mint is not SPL-TOKEN, tokenStandard:${metadata.tokenStandard}` - ); - } - const info = await connection.getParsedAccountInfo(mint.toPublicKey()); - const tokenAmount = (info.value?.data).parsed.info.supply; - const response = await (await fetch2(metadata.data.uri)).json(); - return converter(metadata, response, tokenAmount); - }); - }; -})(SplToken4 || (SplToken4 = {})); - -// ../suite-spl-token/src/freeze.ts -import { - createFreezeAccountInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync3 -} from "@solana/spl-token"; -var SplToken5; -((SplToken11) => { - SplToken11.freeze = (mint, owner, freezeAuthority, options = {}) => { - return Try(() => { - const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = getAssociatedTokenAddressSync3( - mint.toPublicKey(), - owner.toPublicKey() - ); - const inst = createFreezeAccountInstruction( - tokenAccount, - mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() - ); - return new TransactionBuilder9.Common( - [inst], - [freezeAuthority.toKeypair()], - payer.toKeypair() - ); - }); - }; -})(SplToken5 || (SplToken5 = {})); - -// ../suite-spl-token/src/gas-less-transfer.ts -import { createTransferCheckedInstruction } from "@solana/spl-token"; -import { Transaction as Transaction7 } from "@solana/web3.js"; -var SplToken6; -((SplToken11) => { - SplToken11.gasLessTransfer = async (mint, owner, dest, amount, mintDecimal, feePayer, options = {}) => { - return Try(async () => { - const ownerPublicKey = owner.toKeypair().publicKey; - const sourceToken = await Account4.Associated.makeOrCreateInstruction( - mint, - ownerPublicKey.toString(), - feePayer - ); - const destToken = await Account4.Associated.makeOrCreateInstruction( - mint, - dest, - feePayer - ); - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - const tx = new Transaction7({ - lastValidBlockHeight: blockhashObj.lastValidBlockHeight, - blockhash: blockhashObj.blockhash, - feePayer: feePayer.toPublicKey() - }); - const inst2 = createTransferCheckedInstruction( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - ownerPublicKey, - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - [owner.toKeypair()] - ); - if (!destToken.inst) { - tx.add(inst2); - } else { - tx.add(destToken.inst).add(inst2); - } - if (options.isPriorityFee) { - tx.instructions.unshift( - await TransactionBuilder9.PriorityFee.createInstruction( - tx.instructions, - options.addSolPriorityFee - ) - ); - } - tx.instructions.unshift( - await TransactionBuilder9.ComputeUnit.createInstruction( - tx.instructions, - owner.toKeypair() - ) - ); - tx.recentBlockhash = blockhashObj.blockhash; - tx.partialSign(owner.toKeypair()); - const serializedTx = tx.serialize({ - requireAllSignatures: false - }); - const hex = serializedTx.toString("hex"); - return new TransactionBuilder9.PartialSign(hex); - }); - }; -})(SplToken6 || (SplToken6 = {})); - -// ../suite-spl-token/src/mint.ts -import { - SystemProgram -} from "@solana/web3.js"; -import { - AuthorityType, - createAssociatedTokenAccountInstruction as createAssociatedTokenAccountInstruction2, - createInitializeMintInstruction, - createMintToCheckedInstruction as createMintToCheckedInstruction2, - createSetAuthorityInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync4, - getMinimumBalanceForRentExemptMint, - MINT_SIZE, - TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID3 -} from "@solana/spl-token"; -import { - createCreateMetadataAccountV3Instruction -} from "@metaplex-foundation/mpl-token-metadata"; - -// ../validator/src/index.ts -var Validator; -((Validator2) => { - let Message; - ((Message2) => { - Message2.SUCCESS = "success"; - Message2.SMALL_NUMBER = "too small"; - Message2.BIG_NUMBER = "too big"; - Message2.LONG_LENGTH = "too long"; - Message2.EMPTY = "invalid empty value"; - Message2.INVALID_URL = "invalid url"; - Message2.ONLY_NODE_JS = "`string` type is only Node.js"; - })(Message = Validator2.Message || (Validator2.Message = {})); - Validator2.NAME_LENGTH = 32; - Validator2.SYMBOL_LENGTH = 10; - Validator2.URL_LENGTH = 200; - Validator2.ROYALTY_MAX = 100; - Validator2.SELLER_FEE_BASIS_POINTS_MAX = 1e4; - Validator2.ROYALTY_MIN = 0; - Validator2.isRoyalty = (royalty) => { - return Try(() => { - const key = "royalty"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSellerFeeBasisPoints = (royalty) => { - return Try(() => { - const key = "sellerFeeBasisPoints/seller_fee_basis_points"; - if (royalty !== 0 && !royalty) { - throw createError(key, Message.EMPTY, royalty); - } - if (royalty < Validator2.ROYALTY_MIN) { - throw createError(key, Message.SMALL_NUMBER, royalty, { - threshold: Validator2.ROYALTY_MIN, - condition: "underMin" - }); - } else if (royalty > Validator2.ROYALTY_MAX * Converter14.Royalty.THRESHOLD) { - throw createError(key, Message.BIG_NUMBER, royalty, { - threshold: Validator2.SELLER_FEE_BASIS_POINTS_MAX, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isName = (name) => { - return Try(() => { - const key = "name"; - if (!name) { - throw createError(key, Message.EMPTY, name); - } - if (byteLength(name) > Validator2.NAME_LENGTH) { - throw createError(key, Message.LONG_LENGTH, name, { - threshold: Validator2.NAME_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isSymbol = (symbol) => { - return Try(() => { - const key = "symbol"; - if (!symbol) { - throw createError(key, Message.EMPTY, symbol); - } - if (byteLength(symbol) > Validator2.SYMBOL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, symbol, { - threshold: Validator2.SYMBOL_LENGTH, - condition: "overMax" - }); - } - return Message.SUCCESS; - }); - }; - Validator2.isImageUrl = (image) => isUriOrImage(image, "image"); - Validator2.checkAll = (metadata) => { - return Try(() => { - const keys = Object.keys(metadata); - const results = []; - keys.map((key) => { - let res; - switch (key) { - case "image": - if (key in metadata && metadata.image) { - res = (0, Validator2.isImageUrl)(metadata.image); - } - break; - case "royalty": - if (key in metadata && metadata.royalty) { - res = (0, Validator2.isRoyalty)(metadata.royalty); - } - break; - case "seller_fee_basis_points": - if (key in metadata && metadata.seller_fee_basis_points) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.seller_fee_basis_points); - } - break; - case "sellerFeeBasisPoints": - if (key in metadata) { - res = (0, Validator2.isSellerFeeBasisPoints)(metadata.sellerFeeBasisPoints); - } - break; - case "name": - if (metadata.name) { - res = (0, Validator2.isName)(metadata.name); - } - break; - case "symbol": - if (metadata.symbol) { - res = (0, Validator2.isSymbol)(metadata.symbol); - } - break; - } - if (res && res.isErr) { - results.push(...res.error.details); - } - }); - if (results.length > 0) { - const message = "Caught in the validation errors. see information e.g: err.details"; - throw new ValidatorError(message, results); - } - return Message.SUCCESS; - }); - }; - const byteLength = (value) => { - const text = new TextEncoder(); - return text.encode(value).length; - }; - const createError = (key, message, actual, limit) => { - let error; - if (limit) { - error = new ValidatorError(message, [{ key, message, actual, limit }]); - } else { - error = new ValidatorError(message, [{ key, message, actual }]); - } - return error; - }; - const isUriOrImage = (imageOrUri, key) => { - return Try(() => { - if (!imageOrUri) { - throw createError(key, Message.EMPTY, imageOrUri); - } - if (byteLength(imageOrUri) > Validator2.URL_LENGTH) { - throw createError(key, Message.LONG_LENGTH, imageOrUri, { - threshold: Validator2.URL_LENGTH, - condition: "overMax" - }); - } - if (!/https?:\/\/[-_.!~*\\()a-zA-Z0-9;?:&=+,%#]+/g.test(imageOrUri)) { - throw createError(key, Message.INVALID_URL, imageOrUri); - } - return Message.SUCCESS; - }); - }; -})(Validator || (Validator = {})); -var ValidatorError = class extends Error { - details; - constructor(message, details) { - super(message); - this.details = details; - } -}; - -// ../suite-storage/src/provenance-layer.ts -import Irys, { WebIrys } from "@irys/sdk"; -var ProvenanceLayer; -((ProvenanceLayer2) => { - const TOKEN = "solana"; - ProvenanceLayer2.uploadFile = async (uploadFile2, identity, tags) => { - const irys = await (0, ProvenanceLayer2.getIrys)(identity); - let receipt; - if ((0, ProvenanceLayer2.isUploadable)(uploadFile2)) { - receipt = await irys.uploadFile(uploadFile2, { tags }); - } else { - throw Error("No match file type or enviroment"); - } - return `${Constants.IRYS_GATEWAY_URL}/${receipt.id}`; - }; - ProvenanceLayer2.uploadData = async (data, identity, tags) => { - const irys = await (0, ProvenanceLayer2.getIrys)(identity); - const receipt = await irys.upload(data, { tags }); - return `${Constants.IRYS_GATEWAY_URL}/${receipt.id}`; - }; - ProvenanceLayer2.isNodeable = (value) => { - if (isNode()) { - return typeof value === "string"; - } - return false; - }; - ProvenanceLayer2.isBrowserable = (value) => { - if (isBrowser()) { - return value instanceof File; - } - return false; - }; - ProvenanceLayer2.isUploadable = (value) => { - if (isNode()) { - return typeof value === "string"; - } else if (isBrowser()) { - return value instanceof File; - } - return false; - }; - ProvenanceLayer2.fundArweave = async (uploadFile2, identity) => { - const irys = await (0, ProvenanceLayer2.getIrys)(identity); - const byteLength = await (0, ProvenanceLayer2.toByteLength)(uploadFile2); - const willPay = await calculateCost(byteLength, identity); - const fundTx = await irys.fund(irys.utils.toAtomic(willPay)); - debugLog("# fundTx: ", fundTx); - }; - ProvenanceLayer2.toByteLength = async (content) => { - let length = 100; - if ((0, ProvenanceLayer2.isNodeable)(content)) { - length = (await import("fs")).readFileSync(content).length; - } else if ((0, ProvenanceLayer2.isBrowserable)(content)) { - length = content.size; - } else { - throw Error("No match content type"); - } - return length; - }; - ProvenanceLayer2.getIrys = async (identity) => { - if (isNode()) { - return await (0, ProvenanceLayer2.getNodeIrys)(identity); - } else if (isBrowser()) { - return await (0, ProvenanceLayer2.getBrowserIrys)(identity); - } else { - throw Error("Only Node.js or Browser"); - } - }; - ProvenanceLayer2.getNodeIrys = async (secret) => { - const clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - const url = Constants.BUNDLR_NETWORK_URL; - const token = TOKEN; - const key = secret; - const irys = new Irys({ - url, - token, - key, - config: { providerUrl: clusterUrl } - }); - return irys; - }; - ProvenanceLayer2.getBrowserIrys = async (provider) => { - const clusterUrl = Constants.switchCluster({ - cluster: Constants.currentCluster - }); - const url = Constants.BUNDLR_NETWORK_URL; - const token = TOKEN; - const wallet = { rpcUrl: clusterUrl, name: TOKEN, provider }; - const webIrys = new WebIrys({ url, token, wallet }); - await webIrys.ready(); - return webIrys; - }; - const calculateCost = async (size, identity) => { - const irys = await (0, ProvenanceLayer2.getIrys)(identity); - const priceAtomic = await irys.getPrice(size); - const priceConverted = irys.utils.fromAtomic(priceAtomic); - debugLog("# size: ", size); - debugLog(`# price: ${priceConverted}`); - return priceConverted; - }; -})(ProvenanceLayer || (ProvenanceLayer = {})); - -// ../suite-storage/src/arweave.ts -var Arweave; -((Arweave2) => { - Arweave2.uploadFile = (filePath, feePayer) => { - return Try(async () => { - debugLog("# upload file: ", filePath); - await ProvenanceLayer.fundArweave(filePath, feePayer); - return await ProvenanceLayer.uploadFile(filePath, feePayer); - }); - }; - Arweave2.uploadData = (storageData, feePayer) => { - return Try(async () => { - storageData.created_at = unixTimestamp(); - debugLog("# Will upload offchain: ", storageData); - return await ProvenanceLayer.uploadData( - JSON.stringify(storageData), - feePayer - ); - }); - }; -})(Arweave || (Arweave = {})); - -// ../suite-storage/src/filebase.ts -import { - DeleteObjectsCommand, - ListObjectsV2Command, - PutObjectCommand, - S3Client -} from "@aws-sdk/client-s3"; -import pino from "pino"; -var Filebase; -((Filebase2) => { - const BUCKET_NAME = "solana-suite"; - const LOG_LEVEL = Constants.isDebugging == "true" || process.env.DEBUG === "true" ? "debug" : "warn"; - const createGatewayUrl = (cid) => `${Constants.FILEBADE_GATEWAY_URL}/${cid}`; - const connect = () => { - return new S3Client({ - credentials: { - accessKeyId: Constants.FILEBASE_ACCESS_KEYS.key, - secretAccessKey: Constants.FILEBASE_ACCESS_KEYS.secret - }, - endpoint: "https://s3.filebase.com", - region: "us-east-1", - logger: pino({ level: LOG_LEVEL }) - }); - }; - const put = async (fileName, file) => { - debugLog("# fileName: ", fileName); - debugLog("# file: ", file); - const putCommand = new PutObjectCommand({ - Bucket: BUCKET_NAME, - Key: fileName, - Body: file - }); - putCommand.middlewareStack.add((next) => async (args) => { - const response = await next(args); - const httpsResponse = response.response; - const cid = httpsResponse.headers["x-amz-meta-cid"]; - debugLog("#cid: ", cid); - response.output.$metadata.cfId = cid; - debugLog("#response: ", response); - return response; - }); - const res = await connect().send(putCommand); - if (!res.$metadata.cfId) { - throw Error("Not fetch CID"); - } - return createGatewayUrl(res.$metadata.cfId); - }; - Filebase2.remove = async () => { - return Try(async () => { - const listCommand = new ListObjectsV2Command({ Bucket: BUCKET_NAME }); - const lists = await connect().send(listCommand); - debugLog("#lists: ", lists); - if (!lists.Contents) { - return false; - } - const fileNames = lists?.Contents?.map((list) => { - return { Key: list.Key?.toString() }; - }); - const command = new DeleteObjectsCommand({ - Bucket: BUCKET_NAME, - Delete: { - Objects: fileNames - } - }); - try { - await connect().send(command); - } catch { - } - return true; - }); - }; - Filebase2.uploadFile = async (fileType) => { - return Try(async () => { - let file; - let fileName; - if (ProvenanceLayer.isNodeable(fileType)) { - fileName = fileType.split("/").pop(); - file = (await import("fs")).readFileSync(fileType); - } else if (ProvenanceLayer.isBrowserable(fileType)) { - fileName = fileType.name; - file = Buffer.from(await fileType.arrayBuffer()); - } else { - fileName = `${Date.now()}`; - file = Buffer.from(fileType); - } - return put(fileName, file); - }); - }; - Filebase2.uploadData = async (storageData) => { - return Try(async () => { - storageData.created_at = unixTimestamp(); - return put( - `${storageData.name}(metadata.json)`, - JSON.stringify(storageData) - ); - }); - }; -})(Filebase || (Filebase = {})); - -// ../suite-storage/src/storage.ts -var Storage; -((Storage3) => { - Storage3.toConvertOffchaindata = (input, sellerFeeBasisPoints) => { - const data = { - name: input.name, - symbol: input.symbol, - description: input.description, - seller_fee_basis_points: sellerFeeBasisPoints, - animation_url: input.animation_url, - external_url: input.external_url, - attributes: input.attributes, - properties: input.properties, - image: "", - options: input.options - }; - return data; - }; - Storage3.uploadFile = async (filePath, storageType, options = {}) => { - if (storageType === "arweave") { - if (!options.feePayer) { - throw Error("Arweave needs to have feepayer"); - } - return await Arweave.uploadFile(filePath, options.feePayer); - } else if (storageType === "filebase") { - return await Filebase.uploadFile(filePath); - } else { - throw Error("Not found storageType"); - } - }; - Storage3.uploadData = async (input, storageType, options = {}) => { - if (storageType === "arweave") { - if (!options.feePayer) { - throw Error("Arweave needs to have feepayer"); - } - return await Arweave.uploadData(input, options.feePayer); - } else if (storageType === "filebase") { - return await Filebase.uploadData(input); - } else { - throw Error("Not found storageType"); - } - }; - Storage3.upload = async (input, filePath, storageType, options = {}) => { - if (storageType === "arweave" && !options.feePayer) { - throw Error("Arweave needs to have feepayer"); - } - const storage = await (await (0, Storage3.uploadFile)(filePath, storageType, options)).unwrap( - async (ok) => { - input.image = ok; - return await (0, Storage3.uploadData)(input, storageType, options); - }, - (err) => { - throw err; - } - ); - if (!storage) { - throw Error("Empty storage object"); - } - return storage; - }; -})(Storage || (Storage = {})); - -// ../suite-storage/src/index.ts -var Storage2 = { - ...Storage -}; - -// ../suite-spl-token/src/mint.ts -var SplToken7; -((SplToken11) => { - const DEFAULT_STORAGE_TYPE = "filebase"; - SplToken11.createFreezeAuthority = (mint2, owner, freezeAuthority) => { - return createSetAuthorityInstruction( - mint2, - owner, - AuthorityType.FreezeAccount, - freezeAuthority - ); - }; - SplToken11.createMint = async (mint2, owner, totalAmount, mintDecimal, tokenMetadata, feePayer, isMutable) => { - const connection = Node.getConnection(); - const lamports = await getMinimumBalanceForRentExemptMint(connection); - const metadataPda = Account4.Pda.getMetadata(mint2.toString()); - const tokenAssociated = getAssociatedTokenAddressSync4(mint2, owner); - const instructions = []; - instructions.push( - SystemProgram.createAccount({ - fromPubkey: feePayer, - newAccountPubkey: mint2, - space: MINT_SIZE, - lamports, - programId: TOKEN_PROGRAM_ID3 - }) - ); - instructions.push( - createInitializeMintInstruction( - mint2, - mintDecimal, - owner, - owner, - TOKEN_PROGRAM_ID3 - ) - ); - instructions.push( - createAssociatedTokenAccountInstruction2( - feePayer, - tokenAssociated, - owner, - mint2 - ) - ); - instructions.push( - createMintToCheckedInstruction2( - mint2, - tokenAssociated, - owner, - SplToken.calculateAmount(totalAmount, mintDecimal), - mintDecimal - ) - ); - instructions.push( - createCreateMetadataAccountV3Instruction( - { - metadata: metadataPda, - mint: mint2, - mintAuthority: owner, - payer: feePayer, - updateAuthority: owner - }, - { - createMetadataAccountArgsV3: { - data: tokenMetadata, - isMutable, - collectionDetails: null - } - } - ) - ); - return instructions; - }; - SplToken11.mint = async (owner, totalAmount, mintDecimal, input, options = {}) => { - return Try(async () => { - const valid = Validator.checkAll(input); - if (valid.isErr) { - throw valid.error; - } - const { feePayer, freezeAuthority } = options; - const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const payer = feePayer ? feePayer : owner; - input.royalty = 0; - const sellerFeeBasisPoints = 0; - const ownerPublicKey = owner.toKeypair().publicKey; - const storageMetadata = Storage2.toConvertOffchaindata( - input, - input.royalty - ); - let uri; - if (input.filePath) { - const uploaded = await Storage2.upload( - storageMetadata, - input.filePath, - storageType, - { feePayer: payer } - ); - if (uploaded.isErr) { - throw uploaded; - } - uri = uploaded.value; - } else if (input.uri) { - const image = { image: input.uri }; - const uploaded = await Storage2.uploadData( - { ...storageMetadata, ...image }, - storageType, - { feePayer: payer } - ); - if (uploaded.isErr) { - throw uploaded; - } - uri = uploaded.value; - } else { - throw Error(`Must set filePath' or 'uri'`); - } - const isMutable = true; - const datav2 = Converter14.TokenMetadata.intoInfra( - input, - uri, - sellerFeeBasisPoints - ); - debugLog("# datav2: ", datav2); - debugLog("# upload content url: ", uri); - const mint2 = Account4.Keypair.create(); - const insts = await (0, SplToken11.createMint)( - mint2.toPublicKey(), - ownerPublicKey, - totalAmount, - mintDecimal, - datav2, - payer.toKeypair().publicKey, - isMutable - ); - if (freezeAuthority) { - insts.push( - (0, SplToken11.createFreezeAuthority)( - mint2.toPublicKey(), - ownerPublicKey, - freezeAuthority.toPublicKey() - ) - ); - } - return new TransactionBuilder9.Mint( - insts, - [owner.toKeypair(), mint2.toKeypair()], - payer.toKeypair(), - mint2.pubkey - ); - }); - }; -})(SplToken7 || (SplToken7 = {})); - -// ../suite-spl-token/src/thaw.ts -import { - createThawAccountInstruction, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync5 -} from "@solana/spl-token"; -var SplToken8; -((SplToken11) => { - SplToken11.thaw = (mint, owner, freezeAuthority, options = {}) => { - const payer = options.feePayer ? options.feePayer : freezeAuthority; - return Try(() => { - const tokenAccount = getAssociatedTokenAddressSync5( - mint.toPublicKey(), - owner.toPublicKey() - ); - const inst = createThawAccountInstruction( - tokenAccount, - mint.toPublicKey(), - new Account4.Keypair({ secret: freezeAuthority }).toPublicKey() - ); - return new TransactionBuilder9.Common( - [inst], - [freezeAuthority.toKeypair()], - payer.toKeypair() - ); - }); - }; -})(SplToken8 || (SplToken8 = {})); - -// ../suite-spl-token/src/transfer.ts -import { createTransferCheckedInstruction as createTransferCheckedInstruction2 } from "@solana/spl-token"; -var SplToken9; -((SplToken11) => { - SplToken11.transfer = async (mint, owner, dest, ownerOrMultisig, amount, mintDecimal, options = {}) => { - return Try(async () => { - const payer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; - const payerPubkey = new Account4.Keypair({ secret: payer }); - const keypairs = ownerOrMultisig.map((s) => s.toKeypair()); - const sourceToken = await Account4.Associated.makeOrCreateInstruction( - mint, - owner.toString(), - payerPubkey.pubkey - ); - const destToken = await Account4.Associated.makeOrCreateInstruction( - mint, - dest, - payerPubkey.pubkey - ); - const inst = createTransferCheckedInstruction2( - sourceToken.tokenAccount.toPublicKey(), - mint.toPublicKey(), - destToken.tokenAccount.toPublicKey(), - owner.toPublicKey(), - SplToken.calculateAmount(amount, mintDecimal), - mintDecimal, - keypairs - ); - const instructions = destToken.inst ? [destToken.inst, inst] : [inst]; - return new TransactionBuilder9.Common( - instructions, - keypairs, - payer.toKeypair() - ); - }); - }; -})(SplToken9 || (SplToken9 = {})); - -// ../suite-spl-token/src/index.ts -var SplToken10 = { - ...SplToken2, - ...SplToken3, - ...SplToken4, - ...SplToken5, - ...SplToken6, - ...SplToken7, - ...SplToken8, - ...SplToken9 -}; - -// ../suite-regular-nft/src/burn.ts -var RegularNft; -((RegularNft11) => { - const NFT_AMOUNT = 1; - const NFT_DECIMALS = 0; - RegularNft11.burn = (mint, owner, ownerOrMultisig, options = {}) => { - const feePayer = options.feePayer ? options.feePayer : ownerOrMultisig[0]; - return SplToken10.burn( - mint, - owner, - ownerOrMultisig, - NFT_AMOUNT, - NFT_DECIMALS, - { - feePayer - } - ); - }; -})(RegularNft || (RegularNft = {})); - -// ../das-api/src/api.ts -var DasApi; -((DasApi4) => { - let dasUri; - const connect = async (method, params) => { - dasUri = dasUri ? dasUri : Constants.DAS_API_URL; - debugLog("# dasUri: ", dasUri); - const response = await fetch(dasUri, { - method: "POST", - headers: { "content-type": "application/json" }, - body: JSON.stringify({ - jsonrpc: "2.0", - method, - id: "das-api", - params - }) - }); - if (response.status !== 200) { - const err = (await response.json()).error.message; - throw Error(err); - } - return (await response.json()).result; - }; - DasApi4.changeDasUri = (url) => { - dasUri = url; - }; - DasApi4.getAssetProof = async (assetId) => { - return Try(async () => { - return await connect("getAssetProof", [assetId]); - }); - }; - DasApi4.getAsset = async (assetId) => { - return Try(async () => { - return await connect("getAsset", [assetId]); - }); - }; - DasApi4.getAssetsByOwner = async (ownerAddress, limit = 1e3, page = 1, sortBy, before, after) => { - return Try(async () => { - return await connect("getAssetsByOwner", [ - ownerAddress, - sortBy, - limit, - page, - before, - after - ]); - }); - }; - DasApi4.getAssetsByGroup = async (groupKey, groupValue, limit = 1e3, page = 1, sortBy, before, after) => { - return Try(async () => { - return await connect("getAssetsByGroup", [ - groupKey, - groupValue, - sortBy, - limit, - page, - before, - after - ]); - }); - }; - DasApi4.getPriorityFeeEstimate = async (accountOrTransaction) => { - return Try(async () => { - const options = { includeAllPriorityFeeLevels: true }; - return (await connect("getPriorityFeeEstimate", [ - { - accountOrTransaction, - options - } - ])).priorityFeeLevels; - }); - }; -})(DasApi || (DasApi = {})); - -// ../das-api/src/find.ts -var DasApi2; -((DasApi4) => { - DasApi4.defaultSortBy = { - sortBy: "recent_action" /* Recent */, - sortDirection: "desc" /* Desc */ - }; - DasApi4.fetchOffchain = async (uri) => { - const response = await fetch(uri); - if (response.status !== 200) { - return {}; - } - return await response.json(); - }; - DasApi4.findByMint = async (mint, isCompressed) => { - const asset = await DasApi.getAsset(mint); - if (asset.isErr) { - throw asset.error; - } - if (asset.value.compression.compressed === isCompressed) { - const offchain = await (0, DasApi4.fetchOffchain)( - asset.value.content.json_uri - ); - const merged = { - onchain: asset.value, - offchain - }; - return Converter14.Nft.intoUser(merged); - } - return {}; - }; - DasApi4.findByOwner = async (owner, isCompressed, options = {}) => { - const defaultOptions = { - limit: 1e3, - page: 1, - sortBy: DasApi4.defaultSortBy - }; - const { limit, page, sortBy, before, after } = { - ...defaultOptions, - ...options - }; - const assets = await DasApi.getAssetsByOwner( - owner, - limit, - page, - sortBy, - before, - after - ); - if (assets.isErr) { - throw assets.error; - } - const items = assets.value.items; - const metadatas = await Promise.all( - items.filter((item) => item.compression.compressed === isCompressed).map(async (item) => { - try { - const offchain = await (0, DasApi4.fetchOffchain)( - item.content.json_uri - ); - const merged = { - onchain: item, - offchain - }; - return Converter14.Nft.intoUser(merged); - } catch (err) { - debugLog("# Failed fetch offchain url: ", item.content.json_uri); - return Converter14.Nft.intoUser({ - onchain: item, - offchain: {} - }); - } - }) - ); - return { - page: assets.value.page, - total: assets.value.total, - limit: assets.value.limit, - metadatas - }; - }; - DasApi4.findByCollection = async (collectionMint, isCompressed, options = {}) => { - const defaultOptions = { - limit: 1e3, - page: 1, - sortBy: DasApi4.defaultSortBy - }; - const { limit, page, sortBy, before, after } = { - ...defaultOptions, - ...options - }; - const assets = await DasApi.getAssetsByGroup( - "collection", - collectionMint, - limit, - page, - sortBy, - before, - after - ); - if (assets.isErr) { - throw assets.error; - } - const items = assets.value.items; - const metadatas = await Promise.all( - items.filter((item) => item.compression.compressed === isCompressed).map(async (item) => { - const offchain = await (0, DasApi4.fetchOffchain)(item.content.json_uri); - const merged = { - onchain: item, - offchain - }; - return Converter14.Nft.intoUser(merged); - }) - ); - return { - page: assets.value.page, - total: assets.value.total, - limit: assets.value.limit, - metadatas - }; - }; -})(DasApi2 || (DasApi2 = {})); - -// ../das-api/src/index.ts -var DasApi3 = { - ...DasApi, - ...DasApi2 -}; - -// ../suite-regular-nft/src/find.ts -var RegularNft2; -((RegularNft11) => { - RegularNft11.findByOwner = async (owner, options = {}) => { - return Try(async () => { - return await DasApi3.findByOwner(owner, false, options); - }); - }; - RegularNft11.findByMint = async (mint) => { - return Try(async () => { - return await DasApi3.findByMint(mint, false); - }); - }; - RegularNft11.findByCollection = async (collectionMint, options = {}) => { - return Try(async () => { - return DasApi3.findByCollection(collectionMint, false, options); - }); - }; -})(RegularNft2 || (RegularNft2 = {})); - -// ../suite-regular-nft/src/freeze.ts -import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync6 } from "@solana/spl-token"; -import { createFreezeDelegatedAccountInstruction } from "@metaplex-foundation/mpl-token-metadata"; -var RegularNft3; -((RegularNft11) => { - RegularNft11.freeze = (mint, owner, freezeAuthority, options = {}) => { - return Try(() => { - const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = getAssociatedTokenAddressSync6( - mint.toPublicKey(), - owner.toPublicKey() - ); - const editionAddress = Account4.Pda.getMasterEdition(mint); - const inst = createFreezeDelegatedAccountInstruction({ - delegate: new Account4.Keypair({ - secret: freezeAuthority - }).toPublicKey(), - tokenAccount, - edition: editionAddress, - mint: mint.toPublicKey() - }); - return new TransactionBuilder9.Common( - [inst], - [freezeAuthority.toKeypair()], - payer.toKeypair() - ); - }); - }; -})(RegularNft3 || (RegularNft3 = {})); - -// ../suite-regular-nft/src/mint.ts -import { - SystemProgram as SystemProgram2 -} from "@solana/web3.js"; -import { - createApproveInstruction, - createAssociatedTokenAccountInstruction as createAssociatedTokenAccountInstruction3, - createInitializeMintInstruction as createInitializeMintInstruction2, - createMintToCheckedInstruction as createMintToCheckedInstruction3, - getAssociatedTokenAddressSync as getAssociatedTokenAddressSync7, - getMinimumBalanceForRentExemptMint as getMinimumBalanceForRentExemptMint2, - MINT_SIZE as MINT_SIZE2, - TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID4 -} from "@solana/spl-token"; -import { - createCreateMasterEditionV3Instruction, - createCreateMetadataAccountV3Instruction as createCreateMetadataAccountV3Instruction2, - createSignMetadataInstruction, - createVerifySizedCollectionItemInstruction -} from "@metaplex-foundation/mpl-token-metadata"; -var RegularNft4; -((RegularNft11) => { - const NFT_AMOUNT = 1; - const DEFAULT_STORAGE_TYPE = "filebase"; - RegularNft11.createVerifyCreator = (mint2, creator) => { - const metadata = Account4.Pda.getMetadata(mint2.toString()); - return createSignMetadataInstruction({ - metadata, - creator - }); - }; - RegularNft11.createDeleagate = (mint2, owner, delegateAuthority) => { - const tokenAccount = getAssociatedTokenAddressSync7(mint2, owner); - return createApproveInstruction( - tokenAccount, - delegateAuthority, - owner, - NFT_AMOUNT - ); - }; - RegularNft11.createVerifySizedCollection = (collectionChild, collectionParent, feePayer) => { - const collectionMetadata = Account4.Pda.getMetadata( - collectionParent.toString() - ); - const collectionMasterEditionAccount = Account4.Pda.getMasterEdition( - collectionParent.toString() - ); - return createVerifySizedCollectionItemInstruction({ - collection: collectionMetadata, - collectionMasterEditionAccount, - collectionMint: collectionParent, - metadata: Account4.Pda.getMetadata(collectionChild.toString()), - payer: feePayer, - collectionAuthority: feePayer - }); - }; - RegularNft11.createMint = async (mint2, owner, nftMetadata, feePayer, isMutable) => { - const ata = getAssociatedTokenAddressSync7(mint2, owner); - const tokenMetadataPubkey = Account4.Pda.getMetadata(mint2.toString()); - const masterEditionPubkey = Account4.Pda.getMasterEdition(mint2.toString()); - const connection = Node.getConnection(); - const instructions = []; - instructions.push( - SystemProgram2.createAccount({ - fromPubkey: feePayer, - newAccountPubkey: mint2, - lamports: await getMinimumBalanceForRentExemptMint2(connection), - space: MINT_SIZE2, - programId: TOKEN_PROGRAM_ID4 - }) - ); - instructions.push(createInitializeMintInstruction2(mint2, 0, owner, owner)); - instructions.push( - createAssociatedTokenAccountInstruction3(feePayer, ata, owner, mint2) - ); - instructions.push(createMintToCheckedInstruction3(mint2, ata, owner, 1, 0)); - instructions.push( - createCreateMetadataAccountV3Instruction2( - { - metadata: tokenMetadataPubkey, - mint: mint2, - mintAuthority: owner, - payer: feePayer, - updateAuthority: owner - }, - { - createMetadataAccountArgsV3: { - data: nftMetadata, - isMutable, - collectionDetails: null - } - } - ) - ); - instructions.push( - createCreateMasterEditionV3Instruction( - { - edition: masterEditionPubkey, - mint: mint2, - updateAuthority: owner, - mintAuthority: owner, - payer: feePayer, - metadata: tokenMetadataPubkey - }, - { - createMasterEditionArgs: { - maxSupply: 0 - } - } - ) - ); - return instructions; - }; - RegularNft11.mint = async (owner, input, options = {}) => { - return Try(async () => { - const valid = Validator.checkAll(input); - if (valid.isErr) { - throw valid.error; - } - const { feePayer, freezeAuthority } = options; - const payer = feePayer ? feePayer : owner; - const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const ownerPublicKey = owner.toKeypair().publicKey; - let properties; - if (input.properties) { - properties = await Converter14.Properties.intoInfra( - input.properties, - Storage2.uploadFile, - storageType, - { feePayer: payer } - ); - } - input = { - ...input, - properties, - storageType - }; - const royalty = input.royalty ? input.royalty : 0; - const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(royalty); - const storageMetadata = Storage2.toConvertOffchaindata( - input, - sellerFeeBasisPoints - ); - let uri; - if (input.filePath) { - const uploaded = await Storage2.upload( - storageMetadata, - input.filePath, - storageType, - { feePayer: payer } - ); - debugLog("# upload content url: ", uploaded); - if (uploaded.isErr) { - throw uploaded; - } - uri = uploaded.value; - } else if (input.uri) { - const image = { image: input.uri }; - const uploaded = await Storage2.uploadData( - { ...storageMetadata, ...image }, - storageType, - { feePayer: payer } - ); - if (uploaded.isErr) { - throw uploaded; - } - uri = uploaded.value; - } else { - throw Error(`Must set filePath' or 'uri'`); - } - const datav2 = Converter14.RegularNftMetadata.intoInfra( - input, - uri, - sellerFeeBasisPoints - ); - const isMutable = input.isMutable === void 0 ? true : input.isMutable; - debugLog("# input: ", input); - debugLog("# datav2: ", datav2); - const mint2 = Account4.Keypair.create(); - const instructions = await (0, RegularNft11.createMint)( - mint2.toPublicKey(), - ownerPublicKey, - datav2, - payer.toKeypair().publicKey, - isMutable - ); - if (freezeAuthority) { - instructions.push( - (0, RegularNft11.createDeleagate)( - mint2.toPublicKey(), - ownerPublicKey, - freezeAuthority.toPublicKey() - ) - ); - } - if (input.collection) { - instructions.push( - (0, RegularNft11.createVerifySizedCollection)( - mint2.toPublicKey(), - input.collection.toPublicKey(), - payer.toKeypair().publicKey - ) - ); - } - const keypairs = [owner.toKeypair(), mint2.toKeypair()]; - if (input.creators) { - input.creators.forEach((creator) => { - if (Account4.Keypair.isSecret(creator.secret)) { - const creatorPubkey = creator.address.toPublicKey(); - const inst = (0, RegularNft11.createVerifyCreator)(mint2.toPublicKey(), creatorPubkey); - instructions.push(inst); - keypairs.push(creator.secret.toKeypair()); - } - }); - } - return new TransactionBuilder9.Mint( - instructions, - keypairs, - payer.toKeypair(), - mint2.pubkey - ); - }); - }; -})(RegularNft4 || (RegularNft4 = {})); - -// ../suite-regular-nft/src/gas-less-mint.ts -import { Transaction as Transaction8 } from "@solana/web3.js"; -var RegularNft5; -((RegularNft11) => { - const DEFAULT_STORAGE_TYPE = "filebase"; - RegularNft11.gasLessMint = async (owner, input, feePayer, options = {}) => { - return Try(async () => { - const valid = Validator.checkAll(input); - if (valid.isErr) { - throw valid.error; - } - const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const ownerPublickey = owner.toKeypair().publicKey; - let properties; - if (input.properties) { - properties = await Converter14.Properties.intoInfra( - input.properties, - Storage2.uploadFile, - storageType - ); - } - input = { - ...input, - properties, - storageType - }; - const royalty = input.royalty ? input.royalty : 0; - const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(royalty); - const storageMetadata = Storage2.toConvertOffchaindata( - { ...input, properties }, - sellerFeeBasisPoints - ); - let uri; - if (input.filePath) { - const uploaded = await Storage2.upload( - storageMetadata, - input.filePath, - storageType - ); - debugLog("# upload content url: ", uploaded); - if (uploaded.isErr) { - throw uploaded; - } - uri = uploaded.value; - } else if (input.uri) { - const image = { image: input.uri }; - const uploaded = await Storage2.uploadData( - { ...storageMetadata, ...image }, - storageType - ); - if (uploaded.isErr) { - throw uploaded; - } - uri = uploaded.value; - } else { - throw Error(`Must set filePath' or 'uri'`); - } - let datav2 = Converter14.RegularNftMetadata.intoInfra( - input, - uri, - sellerFeeBasisPoints - ); - let collection; - if (input.collection && input.collection) { - collection = Converter14.Collection.intoInfra(input.collection); - datav2 = { ...datav2, collection }; - } - const isMutable = input.isMutable === void 0 ? true : input.isMutable; - debugLog("# input: ", input); - debugLog("# sellerFeeBasisPoints: ", sellerFeeBasisPoints); - debugLog("# datav2: ", datav2); - const mint = Account4.Keypair.create(); - const insts = await RegularNft4.createMint( - mint.toPublicKey(), - ownerPublickey, - datav2, - feePayer.toPublicKey(), - isMutable - ); - if (options.freezeAuthority) { - insts.push( - RegularNft4.createDeleagate( - mint.toPublicKey(), - ownerPublickey, - options.freezeAuthority.toPublicKey() - ) - ); - } - const blockhashObj = await Node.getConnection().getLatestBlockhash(); - const tx = new Transaction8({ - lastValidBlockHeight: blockhashObj.lastValidBlockHeight, - blockhash: blockhashObj.blockhash, - feePayer: feePayer.toPublicKey() - }); - insts.forEach((inst) => tx.add(inst)); - if (options.isPriorityFee) { - tx.instructions.unshift( - await TransactionBuilder9.PriorityFee.createInstruction( - tx.instructions, - options.addSolPriorityFee - ) - ); - } - tx.instructions.unshift( - await TransactionBuilder9.ComputeUnit.createInstruction( - tx.instructions, - owner.toKeypair() - ) - ); - tx.recentBlockhash = blockhashObj.blockhash; - [owner, mint].forEach((signer) => tx.partialSign(signer.toKeypair())); - const serializedTx = tx.serialize({ - requireAllSignatures: false - }); - const hex = serializedTx.toString("hex"); - return new TransactionBuilder9.PartialSign(hex, mint.pubkey); - }); - }; -})(RegularNft5 || (RegularNft5 = {})); - -// ../suite-regular-nft/src/gas-less-transfer.ts -var RegularNft6; -((RegularNft11) => { - const NFT_AMOUNT = 1; - const NFT_DECIMALS = 0; - RegularNft11.gasLessTransfer = async (mint, owner, dest, feePayer, options = {}) => { - return SplToken10.gasLessTransfer( - mint, - owner, - dest, - NFT_AMOUNT, - NFT_DECIMALS, - feePayer, - options - ); - }; -})(RegularNft6 || (RegularNft6 = {})); - -// ../suite-regular-nft/src/mint-collection.ts -import { createSetCollectionSizeInstruction } from "@metaplex-foundation/mpl-token-metadata"; -var RegularNft7; -((RegularNft11) => { - const DEFAULT_COLLECTION_SIZE = 0; - const DEFAULT_STORAGE_TYPE = "filebase"; - RegularNft11.mintCollection = (owner, input, options = {}) => { - return Try(async () => { - const valid = Validator.checkAll(input); - if (valid.isErr) { - throw valid.error; - } - const { freezeAuthority, feePayer, collectionSize } = options; - const payer = feePayer ? feePayer : owner; - const storageType = input.storageType || DEFAULT_STORAGE_TYPE; - const ownerPublicKey = owner.toKeypair().publicKey; - let properties; - if (input.properties) { - properties = await Converter14.Properties.intoInfra( - input.properties, - Storage2.uploadFile, - storageType, - { feePayer: payer } - ); - } - input = { - ...input, - properties - }; - const storageMetadata = Storage2.toConvertOffchaindata(input, 0); - storageMetadata.created_at = unixTimestamp(); - let uri; - if (input.filePath && input.storageType) { - const uploaded = await Storage2.upload( - storageMetadata, - input.filePath, - storageType, - { feePayer: payer } - ); - debugLog("# upload content url: ", uploaded); - if (uploaded.isErr) { - throw uploaded; - } - uri = uploaded.value; - } else if (input.uri) { - const image = { image: input.uri }; - const uploaded = await Storage2.uploadData( - { ...storageMetadata, ...image }, - storageType, - { feePayer: payer } - ); - if (uploaded.isErr) { - throw uploaded; - } - uri = uploaded.value; - } else { - throw Error(`Must set filePath' or 'uri'`); - } - const datav2 = Converter14.RegularNftMetadata.intoInfra(input, uri, 0); - const isMutable = input.isMutable === void 0 ? true : input.isMutable; - debugLog("# input: ", input); - debugLog("# datav2: ", datav2); - const collectionMint = Account4.Keypair.create(); - const collectionMetadataAccount = Account4.Pda.getMetadata( - collectionMint.pubkey - ); - const instructions = await RegularNft4.createMint( - collectionMint.toPublicKey(), - ownerPublicKey, - datav2, - payer.toKeypair().publicKey, - isMutable - ); - if (freezeAuthority) { - instructions.push( - RegularNft4.createDeleagate( - collectionMint.toPublicKey(), - ownerPublicKey, - freezeAuthority.toPublicKey() - ) - ); - } - const collections = { - collectionMetadata: collectionMetadataAccount, - collectionAuthority: owner.toKeypair().publicKey, - collectionMint: collectionMint.toKeypair().publicKey - }; - instructions.push( - createSetCollectionSizeInstruction(collections, { - setCollectionSizeArgs: { - size: collectionSize || DEFAULT_COLLECTION_SIZE - } - }) - ); - return new TransactionBuilder9.Mint( - instructions, - [owner.toKeypair(), collectionMint.toKeypair()], - payer.toKeypair(), - collectionMint.pubkey - ); - }); - }; -})(RegularNft7 || (RegularNft7 = {})); - -// ../suite-regular-nft/src/thaw.ts -import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync8 } from "@solana/spl-token"; -import { createThawDelegatedAccountInstruction } from "@metaplex-foundation/mpl-token-metadata"; -var RegularNft8; -((RegularNft11) => { - RegularNft11.thaw = (mint, owner, freezeAuthority, options = {}) => { - return Try(() => { - const payer = options.feePayer ? options.feePayer : freezeAuthority; - const tokenAccount = getAssociatedTokenAddressSync8( - mint.toPublicKey(), - owner.toPublicKey() - ); - const editionAddress = Account4.Pda.getMasterEdition(mint); - const inst = createThawDelegatedAccountInstruction({ - delegate: new Account4.Keypair({ - secret: freezeAuthority - }).toPublicKey(), - tokenAccount, - edition: editionAddress, - mint: mint.toPublicKey() - }); - return new TransactionBuilder9.Common( - [inst], - [freezeAuthority.toKeypair()], - payer.toKeypair() - ); - }); - }; -})(RegularNft8 || (RegularNft8 = {})); - -// ../suite-regular-nft/src/transfer.ts -var RegularNft9; -((RegularNft11) => { - const NFT_AMOUNT = 1; - const NFT_DECIMALS = 0; - RegularNft11.transfer = (mint, owner, dest, ownerOrMultisig, options = {}) => { - return SplToken10.transfer( - mint, - owner, - dest, - ownerOrMultisig, - NFT_AMOUNT, - NFT_DECIMALS, - options - ); - }; -})(RegularNft9 || (RegularNft9 = {})); - -// ../suite-regular-nft/src/index.ts -var RegularNft10 = { - ...RegularNft, - ...RegularNft2, - ...RegularNft3, - ...RegularNft5, - ...RegularNft6, - ...RegularNft4, - ...RegularNft7, - ...RegularNft8, - ...RegularNft9 -}; - -// src/regular-nft/mint.ts -var PhantomRegularNft; -((PhantomRegularNft3) => { - PhantomRegularNft3.mint = async (input, cluster, phantom) => { - return Try(async () => { - const valid = Validator.checkAll(input); - if (valid.isErr) { - throw valid.error; - } - if (!input.filePath || !input.storageType) { - throw Error("Not found filePath or storageType"); - } - Node.changeConnection({ cluster }); - const properties = await Converter14.Properties.intoInfra( - input.properties, - Storage2.uploadFile, - input.storageType - ); - const royalty = input.royalty ? input.royalty : 0; - const sellerFeeBasisPoints = Converter14.Royalty.intoInfra(royalty); - const nftStorageMetadata = Storage2.toConvertOffchaindata( - { ...input, properties }, - sellerFeeBasisPoints - ); - const uploaded = await Storage2.upload( - nftStorageMetadata, - input.filePath, - input.storageType - ); - if (uploaded.isErr) { - throw uploaded; - } - const uri = uploaded.value; - const datav2 = Converter14.RegularNftMetadata.intoInfra( - input, - uri, - sellerFeeBasisPoints - ); - const connection = Node.getConnection(); - const mint2 = Account4.Keypair.create(); - const isMutable = true; - debugLog("# properties: ", properties); - debugLog("# sellerFeeBasisPoints: ", sellerFeeBasisPoints); - debugLog("# mint: ", mint2.pubkey); - const tx = new Transaction9(); - const insts = await RegularNft10.createMint( - mint2.toPublicKey(), - phantom.publicKey, - datav2, - phantom.publicKey, - isMutable - ); - insts.forEach((inst) => { - tx.add(inst); - }); - tx.feePayer = phantom.publicKey; - const blockhashObj = await connection.getLatestBlockhashAndContext(); - tx.recentBlockhash = blockhashObj.value.blockhash; - tx.partialSign(mint2.toKeypair()); - const signed = await phantom.signTransaction(tx); - debugLog( - "# signed, signed.signatures: ", - signed, - signed.signatures.map((sig2) => sig2.publicKey.toString()) - ); - const sig = await connection.sendRawTransaction(signed.serialize()); - await Node.confirmedSig(sig); - return mint2.pubkey; - }); - }; -})(PhantomRegularNft || (PhantomRegularNft = {})); - -// src/regular-nft/index.ts -var PhantomRegularNft2 = { ...PhantomRegularNft }; - -// src/spl-token/add.ts -import { - createMintToCheckedInstruction as createMintToCheckedInstruction4, - TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID5 -} from "@solana/spl-token"; -import { Transaction as Transaction10 } from "@solana/web3.js"; -var PhantomSplToken; -((PhantomSplToken4) => { - PhantomSplToken4.add = async (token, owner, cluster, totalAmount, mintDecimal, phantom) => { - return Try(async () => { - Node.changeConnection({ cluster }); - const connection = Node.getConnection(); - const transaction = new Transaction10(); - const makeInstruction = await Account4.Associated.makeOrCreateInstruction( - token, - owner - ); - transaction.add(makeInstruction.inst); - transaction.add( - createMintToCheckedInstruction4( - token.toPublicKey(), - makeInstruction.tokenAccount.toPublicKey(), - owner.toPublicKey(), - totalAmount, - mintDecimal, - [], - TOKEN_PROGRAM_ID5 - ) - ); - transaction.feePayer = owner.toPublicKey(); - const blockhashObj = await connection.getLatestBlockhashAndContext(); - transaction.recentBlockhash = blockhashObj.value.blockhash; - const signed = await phantom.signAllTransactions([transaction]); - for (const sign of signed) { - const sig = await connection.sendRawTransaction(sign.serialize()); - await Node.confirmedSig(sig); - } - return token; - }); - }; -})(PhantomSplToken || (PhantomSplToken = {})); - -// src/spl-token/mint.ts -import { Keypair as Keypair7, Transaction as Transaction11 } from "@solana/web3.js"; -var PhantomSplToken2; -((PhantomSplToken4) => { - PhantomSplToken4.mint = async (input, owner, cluster, totalAmount, mintDecimal, phantom) => { - return Try(async () => { - Node.changeConnection({ cluster }); - const connection = Node.getConnection(); - const transaction = new Transaction11(); - const mint2 = Keypair7.generate(); - input.royalty = 0; - const sellerFeeBasisPoints = 0; - const tokenStorageMetadata = Storage2.toConvertOffchaindata( - input, - input.royalty - ); - let uri; - if (input.filePath && input.storageType) { - const uploaded = await Storage2.upload( - tokenStorageMetadata, - input.filePath, - input.storageType - ); - if (uploaded.isErr) { - throw uploaded; - } - uri = uploaded.value; - } else if (input.uri) { - uri = input.uri; - } else { - throw Error(`Must set 'storageType + filePath' or 'uri'`); - } - const isMutable = true; - const datav2 = Converter14.TokenMetadata.intoInfra( - input, - uri, - sellerFeeBasisPoints - ); - debugLog("# datav2: ", datav2); - debugLog("# upload content url: ", uri); - const insturctions = await SplToken10.createMint( - mint2.publicKey, - owner.toPublicKey(), - totalAmount, - mintDecimal, - datav2, - owner.toPublicKey(), - isMutable - ); - insturctions.forEach( - (inst) => transaction.add(inst) - ); - transaction.feePayer = owner.toPublicKey(); - const blockhashObj = await connection.getLatestBlockhashAndContext(); - transaction.recentBlockhash = blockhashObj.value.blockhash; - transaction.partialSign(mint2); - const signed = await phantom.signTransaction(transaction); - debugLog( - "# signed, signed.signatures: ", - signed, - signed.signatures.map((sig2) => sig2.publicKey.toString()) - ); - const sig = await connection.sendRawTransaction(signed.serialize()); - await Node.confirmedSig(sig); - return mint2.publicKey.toString(); - }); - }; -})(PhantomSplToken2 || (PhantomSplToken2 = {})); - -// src/spl-token/index.ts -var PhantomSplToken3 = { - ...PhantomSplToken, - ...PhantomSplToken2 -}; - -// ../types/src/regular-nft/common.ts -var UseMethod = /* @__PURE__ */ ((UseMethod2) => { - UseMethod2[UseMethod2["Burn"] = 0] = "Burn"; - UseMethod2[UseMethod2["Multiple"] = 1] = "Multiple"; - UseMethod2[UseMethod2["Single"] = 2] = "Single"; - return UseMethod2; -})(UseMethod || {}); -export { - PhantomRegularNft2 as PhantomRegularNft, - PhantomSplToken3 as PhantomSplToken, - UseMethod -}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlZ3VsYXItbmZ0L21pbnQudHMiLCAiLi4vLi4vc3VpdGUtc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gICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAg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UuZ2V0Q29ubmVjdGlvbigpLmdldFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyh7XG4gICAgICAgICAgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAg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LmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0F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sdXN0ZXIgb24gbWFpbm5ldC1iZXRhJyk7XG4gICAgICAgICAgTm9kZS5jaGFuZ2VDb25uZWN0aW9uKHsgY2x1c3RlcjogQ29uc3RhbnRzLkNsdXN0ZXIucHJkTWV0YXBsZXggfSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb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lZCxcbiAgICAgIGNhbGxiYWNrRnVuYzogKFxuICAgICAgICBmaWxlUGF0aDogRmlsZVR5cGUsXG4gICAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgICAgb3B0aW9uczogUGFydGlhbDxTdG9yYWdlT3B0aW9ucz4sXG4gICAgICApID0+IFByb21pc2U8UmVzdWx0PHN0cmluZywgRXJyb3I+PixcbiAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgIG9wdGlvbnM6IFBhcnRpYWw8U3RvcmFnZU9wdGlvbnM+ID0ge30sXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCAmJiAhZmlsZS51cmkpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAg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gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBpbmZvID0gYXdhaXQgY29ubmVjdGlvbi5nZXRQYXJzZWRUb2tlbkFjY291bnRzQnlPd25lcihcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAge1xuICAgICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgfSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRhdGFzID0gaW5mby52YWx1ZS5tYXAoYXN5bmMgKGQpID0+IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29ud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ICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBTeXN0ZW1Qcm9ncmFtLmNyZWF0ZUFjY291bnQoe1xuICAgICAgICBmcm9tUHVia2V5OiBmZWVQYXllcixcbiAgICAgICAgbmV3QWNjb3VudFB1YmtleTogbWludCxcbiAgICAgICAgc3BhY2U6IE1JTlRfU0laRSxcbiAgICAgICAgbGFtcG9ydHM6IGxhbXBvcnRzLFxuICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICB9KSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVJbml0aWFsaXplTWludEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCAvLyB0b3RhbCBudW1iZXJcbiAgICogQHBhcmFtIHtudW1iZXJ9IG1pbnREZWNpbWFsIC8vIHRva2VuIGRlY2ltYWxcbiAgICogQHBhcmFtIHtJbnB1dFRva2VuTWV0YWRhdGF9IGlucHV0ICAgICAgIC8vIHRva2VuIG1ldGFkYXRhXG4gICAqIEBwYXJhbSB7UGFydGlhbDxNaW50T3B0aW9ucz59IG9wdGlvbnMgICAvLyBvcHRpb25zXG4gICAqIEByZXR1cm4gUHJvbWlzZTxSZXN1bHQ8TWludEluc3RydWN0aW9uLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgbWludCA9IGFzeW5jIChcbiAgICBvd25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LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFJlc3Vsd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AgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5zeW1ib2wpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTeW1ib2wobWV0YWRhdGEuc3ltYm9sKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXMgJiYgcmVzLmlzRXJyKSB7XG4gICAgICAgICAgcmVzdWx0cy5wdXNoKC4uLnJlcy5lcnJvci5kZXRhaWxzKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICBpZiAocmVzdWx0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgI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gICB9XG5cbiAgICBjb25zdCBpdGVtcyA9IGFzc2V0cy52YWx1ZS5pdGVtcztcblxuICAgIGNvbnN0IG1ldGFkYXRhcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgaXRlbXNcbiAgICAgICAgLmZpbHRlcigoaXRlbSkgPT4gaXRlbS5jb21wcmVzc2lvbi5jb21wcmVzc2VkID09PSBpc0NvbXByZXNzZWQpXG4gICAgICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pLFxuICAgICk7XG4gICAgcmV0dXJuIHtcbiAgICAgIHBhZ2U6IGFzc2V0cy52YWx1ZS5wYWdlLFxuICAgICAgdG90YWw6IGFzc2V0cy52YWx1ZS50b3RhbCxcbiA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1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAg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xuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgYmxvY2toYXNoT2JqID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0TGF0ZXN0QmxvY2toYXNoKCk7XG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbih7XG4gICAgICAgIGxhc3RWYWxpZEJsb2NrSGVpZ2h0OiBibG9ja2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlUGF5ZXI6IGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICB9KTtcblxuICAgICAgaW5zdHMuZm9yRWFjaCgoaW5zdCkgPT4gdHguYWRkKGluc3QpKTtcblxuICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZ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mluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rp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IlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiLCAiUGhhbnRvbVJlZ3VsYXJOZnQiLCAiQ29udmVydGVyIiwgIlN0b3JhZ2UiLCAibWludCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uIiwgIlJlZ3VsYXJOZnQiLCAic2lnIiwgIlBoYW50b21SZWd1bGFyTmZ0IiwgImNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbiIsICJUT0tFTl9QUk9HUkFNX0lEIiwgIlRyYW5zYWN0aW9uIiwgIlBoYW50b21TcGxUb2tlbiIsICJUcmFuc2FjdGlvbiIsICJBY2NvdW50IiwgImNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbiIsICJUT0tFTl9QUk9HUkFNX0lEIiwgIktleXBhaXIiLCAiVHJhbnNhY3Rpb24iLCAiUGhhbnRvbVNwbFRva2VuIiwgIlRyYW5zYWN0aW9uIiwgIm1pbnQiLCAiS2V5cGFpciIsICJTdG9yYWdlIiwgIkNvbnZlcnRlciIsICJTcGxUb2tlbiIsICJzaWciLCAiUGhhbnRvbVNwbFRva2VuIiwgIlVzZU1ldGhvZCJdCn0K \ No newline at end of file diff --git a/packages/suite-phantom/package.json b/packages/suite-phantom/package.json deleted file mode 100644 index 70e437515..000000000 --- a/packages/suite-phantom/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "@solana-suite/phantom", - "version": "0.7.20", - "description": "Library spl-token/nft mint for phantom wallet", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "keywords": [ - "api", - "blockchain", - "solana", - "sdk", - "web3.js", - "nft", - "phantom" - ], - "engines": { - "node": ">=18.*" - }, - "files": [ - "dist" - ], - "license": "MIT", - "author": "fukaoi ", - "homepage": "https://fukaoi.github.io/solana-suite", - "repository": { - "type": "git", - "url": "https://github.com/fukaoi/solana-suite.git" - }, - "bugs": { - "url": "https://github.com/fukaoi/solana-suite/issues" - }, - "publishConfig": { - "access": "public" - }, - "scripts": { - "build": "tsup --config tsup.config.ts", - "clean": "rm -rf dist/ && rm -rf node_modules", - "eslint": "eslint -c node_modules/build-configs/eslint/base.json ./src", - "prettier": "prettier --config node_modules/build-configs/prettier/base.json ./src/ -c", - "prettier:fix": "prettier --config node_modules/build-configs/prettier/base.json ./src/ -c --write", - "depcheck": "depcheck --ignores='build-configs/*, @typescript-eslint/*, build-configs, ~'", - "prepublishOnly": "../../scripts/before-publish.mjs", - "publish": "../../scripts/after-publish.mjs" - }, - "dependencies": { - "@aws-sdk/client-s3": "^3.590.0", - "@metaplex-foundation/mpl-token-metadata": "^2.13.0", - "@solana-suite/config": "workspace:^", - "@solana/spl-token": "^0.3.8", - "@solana/web3.js": "^1.78.5", - "bignumber.js": "^9.1.2", - "bn.js": "^5.2.1", - "bs58": "^4.0.1", - "@irys/sdk": "^0.0.3", - "mpl-bubblegum-instructions": "github:fukaoi/mpl-bubblegum-instructions", - "cross-fetch": "^4.0.0" - }, - "devDependencies": { - "build-configs/eslint": "workspace:*", - "build-configs/prettier": "workspace:*", - "build-configs/tsconfig": "workspace:*", - "build-configs/tsup": "workspace:*", - "build-configs/typedoc": "workspace:*" - } -} diff --git a/packages/suite-phantom/src/index.ts b/packages/suite-phantom/src/index.ts deleted file mode 100644 index 1848d6021..000000000 --- a/packages/suite-phantom/src/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './regular-nft'; -export * from './spl-token'; -export * from '~/types/phantom'; -export * from '~/types/regular-nft'; diff --git a/packages/suite-phantom/src/regular-nft/index.ts b/packages/suite-phantom/src/regular-nft/index.ts deleted file mode 100644 index 7391a720b..000000000 --- a/packages/suite-phantom/src/regular-nft/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { PhantomRegularNft as Mint } from './mint'; - -/** @namespace */ -export const PhantomRegularNft = { ...Mint }; diff --git a/packages/suite-phantom/src/regular-nft/mint.ts b/packages/suite-phantom/src/regular-nft/mint.ts deleted file mode 100644 index 952823dc8..000000000 --- a/packages/suite-phantom/src/regular-nft/mint.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Transaction, TransactionInstruction } from '@solana/web3.js'; -import { RegularNft } from '~/suite-regular-nft'; -import { Storage } from '~/suite-storage'; -import { Node } from '~/node'; -import { debugLog, Result, Try } from '~/suite-utils'; -import { Account } from '~/account'; -import { Validator, ValidatorError } from '~/validator'; -import { Converter } from '~/converter'; -import { PhantomProvider } from '~/types/phantom'; -import { InputNftMetadata } from '~/types/regular-nft'; - -export namespace PhantomRegularNft { - /** - * Upload content and NFT mint - * - * @param {InputNftMetadata} input - * @param {string} cluster - * @param {Phantom} phantom //phantom wallet object - * @return Promise> - */ - export const mint = async ( - input: InputNftMetadata, - cluster: string, - phantom: PhantomProvider, - ): Promise> => { - return Try(async () => { - const valid = Validator.checkAll(input); - if (valid.isErr) { - throw valid.error; - } - - if (!input.filePath || !input.storageType) { - throw Error('Not found filePath or storageType'); - } - - Node.changeConnection({ cluster }); - - //Convert porperties, Upload content - const properties = await Converter.Properties.intoInfra( - input.properties, - Storage.uploadFile, - input.storageType, - ); - - const royalty = input.royalty ? input.royalty : 0; - const sellerFeeBasisPoints = Converter.Royalty.intoInfra(royalty); - const nftStorageMetadata = Storage.toConvertOffchaindata( - { ...input, properties }, - sellerFeeBasisPoints, - ); - const uploaded = await Storage.upload( - nftStorageMetadata, - input.filePath, - input.storageType, - ); - - if (uploaded.isErr) { - throw uploaded; - } - const uri = uploaded.value; - - const datav2 = Converter.RegularNftMetadata.intoInfra( - input, - uri, - sellerFeeBasisPoints, - ); - - const connection = Node.getConnection(); - const mint = Account.Keypair.create(); - const isMutable = true; - - debugLog('# properties: ', properties); - debugLog('# sellerFeeBasisPoints: ', sellerFeeBasisPoints); - debugLog('# mint: ', mint.pubkey); - - const tx = new Transaction(); - - const insts = await RegularNft.createMint( - mint.toPublicKey(), - phantom.publicKey!, - datav2, - phantom.publicKey!, - isMutable, - ); - - insts.forEach((inst: TransactionInstruction) => { - tx.add(inst); - }); - tx.feePayer = phantom.publicKey!; - const blockhashObj = await connection.getLatestBlockhashAndContext(); - tx.recentBlockhash = blockhashObj.value.blockhash; - tx.partialSign(mint.toKeypair()); - const signed = await phantom.signTransaction(tx); - debugLog( - '# signed, signed.signatures: ', - signed, - signed.signatures.map((sig) => sig.publicKey.toString()), - ); - const sig = await connection.sendRawTransaction(signed.serialize()); - await Node.confirmedSig(sig); - return mint.pubkey; - }); - }; -} diff --git a/packages/suite-phantom/src/spl-token/add.ts b/packages/suite-phantom/src/spl-token/add.ts deleted file mode 100644 index cdffeeef4..000000000 --- a/packages/suite-phantom/src/spl-token/add.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { - createMintToCheckedInstruction, - TOKEN_PROGRAM_ID, -} from '@solana/spl-token'; - -import { Transaction, TransactionInstruction } from '@solana/web3.js'; - -import { Result, Try } from '~/suite-utils'; -import { Node } from '~/node'; -import { Pubkey } from '~/types/account'; -import { Account } from '~/account'; -import { PhantomProvider } from '~/types/phantom'; - -export namespace PhantomSplToken { - /** - * Adding new token to existing token - * - * @param {Pubkey} token - * @param {Pubkey} owner - * @param {string} cluster - * @param {number} totalAmount - * @param {number} mintDecimal - * @param {Phantom} phantom //phantom wallet object - * @return Promise> - */ - export const add = async ( - token: Pubkey, - owner: Pubkey, - cluster: string, - totalAmount: number, - mintDecimal: number, - phantom: PhantomProvider, - ): Promise> => { - return Try(async () => { - Node.changeConnection({ cluster }); - const connection = Node.getConnection(); - const transaction = new Transaction(); - - const makeInstruction = await Account.Associated.makeOrCreateInstruction( - token, - owner, - ); - transaction.add(makeInstruction.inst as TransactionInstruction); - transaction.add( - createMintToCheckedInstruction( - token.toPublicKey(), - makeInstruction.tokenAccount.toPublicKey(), - owner.toPublicKey(), - totalAmount, - mintDecimal, - [], - TOKEN_PROGRAM_ID, - ), - ); - - transaction.feePayer = owner.toPublicKey(); - const blockhashObj = await connection.getLatestBlockhashAndContext(); - transaction.recentBlockhash = blockhashObj.value.blockhash; - - const signed = await phantom.signAllTransactions([transaction]); - - // TODO: refactoring - for (const sign of signed) { - const sig = await connection.sendRawTransaction(sign.serialize()); - await Node.confirmedSig(sig); - } - return token; - }); - }; -} diff --git a/packages/suite-phantom/src/spl-token/index.ts b/packages/suite-phantom/src/spl-token/index.ts deleted file mode 100644 index d8d6ddcef..000000000 --- a/packages/suite-phantom/src/spl-token/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { PhantomSplToken as Add } from './add'; -import { PhantomSplToken as Mint } from './mint'; - -/** @namespace */ -export const PhantomSplToken = { - ...Add, - ...Mint, -}; diff --git a/packages/suite-phantom/src/spl-token/mint.ts b/packages/suite-phantom/src/spl-token/mint.ts deleted file mode 100644 index 1000b0211..000000000 --- a/packages/suite-phantom/src/spl-token/mint.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { Keypair, Transaction, TransactionInstruction } from '@solana/web3.js'; - -import { debugLog, Result, Try } from '~/suite-utils'; -import { Node } from '~/node'; -import { Pubkey } from '~/types/account'; -import { Storage } from '~/suite-storage'; -import { SplToken } from '~/suite-spl-token'; -import { PhantomProvider } from '~/types/phantom'; -import { InputTokenMetadata } from '~/types/spl-token'; -import { InputNftMetadata } from '~/types/regular-nft'; -import { Converter } from '~/converter'; - -export namespace PhantomSplToken { - /** - * Mint new spl-token - * - * @param {InputNftMetadata} input - * @param {Pubkey} owner - * @param {string} cluster - * @param {number} totalAmount - * @param {number} mintDecimal - * @param {Phantom} phantom //phantom wallet object - * @return Promise> - */ - export const mint = async ( - input: InputTokenMetadata, - owner: Pubkey, - cluster: string, - totalAmount: number, - mintDecimal: number, - phantom: PhantomProvider, - ): Promise> => { - return Try(async () => { - Node.changeConnection({ cluster }); - const connection = Node.getConnection(); - const transaction = new Transaction(); - const mint = Keypair.generate(); - - input.royalty = 0; - const sellerFeeBasisPoints = 0; - const tokenStorageMetadata = Storage.toConvertOffchaindata( - input as InputNftMetadata, - input.royalty, - ); - - let uri!: string; - if (input.filePath && input.storageType) { - const uploaded = await Storage.upload( - tokenStorageMetadata, - input.filePath, - input.storageType, - ); - - if (uploaded.isErr) { - throw uploaded; - } - uri = uploaded.value; - } else if (input.uri) { - uri = input.uri; - } else { - throw Error(`Must set 'storageType + filePath' or 'uri'`); - } - - const isMutable = true; - - const datav2 = Converter.TokenMetadata.intoInfra( - input, - uri, - sellerFeeBasisPoints, - ); - - debugLog('# datav2: ', datav2); - debugLog('# upload content url: ', uri); - - const insturctions = await SplToken.createMint( - mint.publicKey, - owner.toPublicKey(), - totalAmount, - mintDecimal, - datav2, - owner.toPublicKey(), - isMutable, - ); - - insturctions.forEach((inst: TransactionInstruction) => - transaction.add(inst), - ); - transaction.feePayer = owner.toPublicKey(); - const blockhashObj = await connection.getLatestBlockhashAndContext(); - transaction.recentBlockhash = blockhashObj.value.blockhash; - transaction.partialSign(mint); - const signed = await phantom.signTransaction(transaction); - debugLog( - '# signed, signed.signatures: ', - signed, - signed.signatures.map((sig) => sig.publicKey.toString()), - ); - const sig = await connection.sendRawTransaction(signed.serialize()); - await Node.confirmedSig(sig); - return mint.publicKey.toString(); - }); - }; -} diff --git a/packages/suite-phantom/tsconfig.json b/packages/suite-phantom/tsconfig.json deleted file mode 100644 index 42108c777..000000000 --- a/packages/suite-phantom/tsconfig.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "extends": "build-configs/tsconfig/base.json", - "display": "@solana-suite/phantom", - "compilerOptions": { - "paths": { - "~/types/*": [ - "../types/src/*/index.ts" - ], - "~/*": [ - "../*/src/index.ts" - ] - } - }, - "include": [ - "src/**/*.ts", - "test/**/*.ts" - ], - "exclude": [ - "node_modules", - "dist" - ] -} diff --git a/packages/suite-phantom/tsup.config.ts b/packages/suite-phantom/tsup.config.ts deleted file mode 100644 index aa93cc703..000000000 --- a/packages/suite-phantom/tsup.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -import defineConfig from "../build-configs/tsup/base"; - -const format = ["esm"]; -defineConfig.format = format; -const config = defineConfig; -export default config; diff --git a/packages/suite-phantom/typedoc.json b/packages/suite-phantom/typedoc.json deleted file mode 100644 index e272ce936..000000000 --- a/packages/suite-phantom/typedoc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "build-configs/typedoc/base.json", - "entryPoints": ["src/index.ts"] -} diff --git a/packages/suite-regular-nft/dist/index.js b/packages/suite-regular-nft/dist/index.js index 46b7b8670..60d27275a 100644 --- a/packages/suite-regular-nft/dist/index.js +++ b/packages/suite-regular-nft/dist/index.js @@ -57,7 +57,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -93,7 +93,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -149,13 +150,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -2092,7 +2093,6 @@ var import_client_s3 = require("@aws-sdk/client-s3"); var import_pino = __toESM(require("pino")); var Filebase; ((Filebase2) => { - const BUCKET_NAME = "solana-suite"; const LOG_LEVEL = Constants.isDebugging == "true" || process.env.DEBUG === "true" ? "debug" : "warn"; const createGatewayUrl = (cid) => `${Constants.FILEBADE_GATEWAY_URL}/${cid}`; const connect = () => { @@ -2110,7 +2110,7 @@ var Filebase; debugLog("# fileName: ", fileName); debugLog("# file: ", file); const putCommand = new import_client_s3.PutObjectCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Key: fileName, Body: file }); @@ -2131,7 +2131,9 @@ var Filebase; }; Filebase2.remove = async () => { return Try(async () => { - const listCommand = new import_client_s3.ListObjectsV2Command({ Bucket: BUCKET_NAME }); + const listCommand = new import_client_s3.ListObjectsV2Command({ + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket + }); const lists = await connect().send(listCommand); debugLog("#lists: ", lists); if (!lists.Contents) { @@ -2141,7 +2143,7 @@ var Filebase; return { Key: list.Key?.toString() }; }); const command = new import_client_s3.DeleteObjectsCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Delete: { Objects: fileNames } @@ -3262,4 +3264,4 @@ var RegularNft10 = { 0 && (module.exports = { RegularNft }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXNwbC10b2tlbi9zcmMvYWRkLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzI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IGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXk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c3Quc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoaW5zdCl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcChcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoKGluc3QpID0+IGluc3Quc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGNvbW1vbk9yTWludEluc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0LmZlZVBheWVyICE9PSB1bmRlZmluZWQsXG4gICAgICAgICk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQ2FsY3VsYXRlVHhzaXplLmlzTWF4VHJhbnNhY3Rpb25TaXplKHRyYW5zYWN0aW9uLCBmZWVQYXllci5wdWJsaWNLZXkpO1xuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgIC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HM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4a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1YmxpY0tleSxcbiAgKTogbnVtYmVyID0+IHtcbiAgICBjb25zdCBmZWVQYXllclBrID0gW2ZlZVBheWVyLnRvQmFzZTU4KCldO1xuXG4gICAgY29uc3Qgc2lnbmVycyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsID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dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+ID0+IHtcbiAgICAgIGlmICghaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVx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cmFnZVR5cGUsXG4gICAgICAgIG9wdGlvbnM6IFBhcnRpYWw8U3RvcmFnZU9wdGlvbnM+LFxuICAgICAgKSA9PiBQcm9taXNlPFJlc3VsdDxzdHJpbmcsIEVycm9yPj4sXG4gICAgICBzdG9yYWdlVHlwZTogU3RvcmFnZVR5cGUsXG4gICAgICBvcHRpb25zOiBQYXJ0aWFsPFN0b3JhZ2VPcHRpb25zPiA9IHt9LFxuICAgICk6IFByb21pc2U8UHJvcGVydGllcz4gPT4ge1xuICAgICAgaWYgKCFpbnB1dCB8fCAhaW5wdXQuZmlsZXMpIHtcbiAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgfVxuXG4gICAgICBjb25zdCBmaWxlcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgICBpbnB1dC5maWxlcy5tYXAoYXN5bmMgKGZpbGUpID0+IHtcbiAgICAgICAgICBpZiAoIWZpbGUuZmlsZVBhdGggJiYgIWZpbGUudXJpKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoXG4gICAgICAgICAgICAgIGZpbGUuZmlsZVBhdGghLFxuICAgICAgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICAgICAgb3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZXhpc3RzS2V5OiAnZmlsZVBhdGgnLFxuICAgICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6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AgY29uc3QgY29ubmVjdGlvbiA9IE5vZGUuZ2V0Q29ubmVjdGlvbigpO1xuICAgICAgY29uc3QgaW5mbyA9IGF3YWl0IGNvbm5lY3Rpb24uZ2V0UGFyc2VkVG9rZW5BY2NvdW50c0J5T3duZXIoXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHtcbiAgICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIH0sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO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lc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgdHguYWRkKGluc3QyKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIHJldHVybiBpbnN0cnVjdGlvbiBhbmQgdW5kZWNpZGVkIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgICAgICB0eC5hZGQoZGVzdFRva2VuLmluc3QpLmFkZChpbnN0Mik7XG4gICAgICB9XG5cbiAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgdHguaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgVHJhbnNhY3Rpb25CdWlsZGVyLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdHguaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICB0eC5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgYXdhaXQgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgIHR4Lmluc3RydWN0aW9ucyxcbiAgICAgICAgICBvd25lci50b0tleXBhaXIoKSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgIC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JvZ3JhbS5jcmVhdGVBY2NvdW50KHtcbiAgICAgICAgZnJvbVB1YmtleTogZmVlUGF5ZXIsXG4gICAgICAgIG5ld0FjY291bnRQdWJrZXk6IG1pbnQsXG4gICAgICAgIHNwYWNlOiBNSU5UX1NJWkUsXG4gICAgICAgIGxhbXBvcnRzOiBsYW1wb3J0cyxcbiAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB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cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cyxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgQ29udmVyd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ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluI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biAgICAgIGl0ZW1zXG4gICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IHt9LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICApO1xuICAgIHJldHVybiB7XG4gICAgICBwYWdlOiBhc3NldHMudmFsdWUucGFnZSxcbiAgICAgIHRvdGFsOiBhc3NldHMudmFsdWUudG90YWwsXG4gICAgICBsaW1pdDogYXNzZXRzLnZhbHVlLmxpbWl0LFxuICAgICAgbWV0YWRhdGFzLFxuICAgIH07XG4gIH07XG5cbiAgLyoqXG4gICAqIEZpbmQgbmZ0IGJ5IGNvbGxlY3Rpb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SksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24obWludCwgMCwgb3duZXIsIG93bmVyKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihmZWVQYXllciwgYXRhLCBvd25lciwgbWludCksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihtaW50LCBhdGEsIG93bmVyLCAxLCAwKSk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogdG9rZW5NZXRhZGF0YVB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpdGlvbkFyZ3M6IHtcbiAgICAgICAgICAgIG1heFN1cHBseTogMCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFVwbG9hZCBjb250ZW50IGFuZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhdGF9IGlucHV0ICAvLyBuZnQgbWV0YWRhdGFcbiAgICogQHBhcmFtIHtQYXJ0aWFsPE1pbnRPcHRpb25zPn0gb3B0aW9ucyAvLyBvcHRpb25zXG4gICAqIEByZXR1cm4gUHJvbWlzZTxSZXN1bHQ8TWludEluc3RydWN0aW9uLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgbWludCA9IGFzeW5jIChcbiAgICBvd25lcjogU2VjcmV0LFxuICAgIGlucHV0OiBJbnB1dE5mdE1ldGFkYXRhLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8TWludE9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PE1pbnRTdHJ1Y3R1cmUsIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgdmFsaWQgPSBWYWxpZGF0b3IuY2hlY2tBbGw8S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wbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShcbiAgICAgICAgaW5wdXQsXG4gICAgICAgIHVyaSxcbiAgICAgICAgc2VsbGVyRmVlQmFzaXNQb2ludHMsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpc011dGFibGUgPSBpbnB1dC5pc011dGFibGUgPT09IHVuZGVmaW5lZCA/IHRydWUgOiBpbnB1dC5pc011dGFibGU7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGlucHV0OiAnLCBpbnB1dCk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5cGFpci5pc1NlY3JldChjcmVhdG9yLnNlY3JldCkpIHtcbiAgICAgICAgICAgIGNvbnN0IGNyZWF0b3JQdWJrZXkgPSBjcmVhdG9yLmFkZHJlc3MudG9QdWJsaWNLZXkoKTtcbiAgICAgICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVWZXJpZnlDcmVhdG9yKG1pbnQudG9QdWJsaWNLZXkoKSwgY3JlYXRvclB1YmtleSk7XG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChpbnN0KTtcbiAgICAgICAgICAgIGtleXBhaXJzLnB1c2goY3JlYXRvci5zZWNyZXQudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cb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Y3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGluc3RzLmZvckVhY2goKGluc3QpID0+IHR4LmFkZChpbnN0KSk7XG5cbiAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgdHguaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgVHJhbnNhY3Rpb25CdWlsZGVyLlByaW9yaXR5Rm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AgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgY29sbGVjdGlvbk1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50ID0gQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEoXG4gICAgICAgIGNvbGxlY3Rpb25NaW50LnB1YmtleSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgY29sbGVjdGlvbk1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9u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QVBJX1VSTCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgIENvbmZpZy5maW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lLFxuICAgICk6IFByb21pc2U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20gJ2JzNTgnO1xuXG5leHBvcnQgbmFtZXNwYWNlIEFjY291bnQge1xuICBleHBvcnQgY2xhc3MgS2V5cGFpciB7XG4gICAgc2VjcmV0OiBTZWNyZXQ7XG4g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xuICAgICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBpZiAoIW9wdGlvbnMuaW5zdHJ1Y3Rpb25zKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ05vdCBmb3VuZCBvcHRpb25zLmluc3RydWN0aW9ucycpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGNvbW1vbk9yTWludEluc3QgPSBvcHRpb25zLmluc3RydWN0aW9ucztcbiAgICAgICAgbGV0IGkgPSAwO1xuICAgICAgICBmb3IgKGNvbnN0IGluc3Qgb2YgY29tbW9uT3JNaW50SW5zdCkge1xuICAgICAgICAgIGlmICghaW5zdC5pbnN0cnVjdGlvbnMgJiYgIWluc3Quc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoaW5zdCl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcChcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoKGluc3QpID0+IGluc3Quc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGNvbW1vbk9yTWludEluc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiB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bml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbXB1dGVCdWRnZXRQcm9ncmFtLFxuICBLZXlwYWlyLFxu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Ck7XG5cbiAgICAgIGNvbnN0IHVuaXFXcml0YWJsZUFjY291bnRzID0gW1xuICAgICAgICAuLi5uZXcgU2V0KHdyaXRhYmxlQWNjb3VudHMubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvQmFzZTU4KCkpKSxcbiAgICAgIF1cbiAgICAgICAgLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b1B1YmxpY0tleSgpKVxuICAgICAgICAuc2xpY2UoMCwgTUFYX1JFQ0VOVF9QUklPUklUWV9GRUVfQUNDT1VOVFMpO1xuXG4gICAgICBjb25zdCBwcmlvcml0eUZlZXMgPVxuICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5c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0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQge1xuICBDb25maXJtT3B0aW9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ICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20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gICAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoXG4gICAgICAgICAgICAgIGZpbGUuZmlsZVBhdGghLFxuICAgICAgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICAgICAgb3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZXhpc3RzS2V5OiAnZmlsZVBhdGgnLFxuICAgICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgXSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmaWxlO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm9wZXJ0aWVzO1xuICAgIH07XG4gIH1cbn1cbiIsICIvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi9cbmltcG9ydCB7IE9wdGlvbiwgVXNlcyB9IGZyb20gJ34vdHlwZXMvcmVndWxhci1uZnQnO1xuXG5leHBvcnQgbmFtZXNwYWNlIENvbnZlcnRlciB7XG4gIGV4cG9ydCBuYW1lc3BhY2UgVXNlcyB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyU2lkZSA9IChvdXRwdXQ6IE9wdGlvbjxVc2VzPik6IFVzZXMgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5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XG4gICAgICBjb25zdCBoaXN0b3J5OiBIaXN0b3J5ID0ge307XG5cbiAgICAgIGlmIChtYXBwaW5nVG9rZW5BY2NvdW50KSB7XG4gICAgICAgIGNvbnN0IGZvdW5kU291cmNlID0gbWFwcGluZ1Rva2VuQWNjb3VudC5maW5kKFxuICAgICAgICAgIChtKSA9PiBtLmFjY291bnQgPT09IG91dHB1dC5wYXJzZWQuaW5mby5zb3VyY2UsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IGZvdW5kRGVzdCA9IG1hcHBpbmdUb2tlbkFjY291bnQuZmluZChcbiAgICAgICAgICAobSkgPT4gbS5hY2NvdW50ID09PSBvdXRwdXQucGFyc2VkLmluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICk7XG4gICAgICAgIGZvdW5kU291cmNlICYmIChoaXN0b3J5LnNvdXJjZSA9IGZvdW5kU291cmNlLm93bmVyKTtcbiAgICAgICAgZm91bmREZXN0ICYmIChoaXN0b3J5LmRlc3RpbmF0aW9uID0gZm91bmREZXN0Lm93bmVyKTtcbiAgICAgIH1cblxuICAgICAgaGlzdG9yeS50b2tlbkFtb3VudCA9IG91dHB1dC5wYXJzZWQuaW5mby50b2tlbkFtb3VudDtcbiAgICAgIGhpc3RvcnkubWludCA9IG91dHB1dC5wYXJzZWQuaW5mby5taW50O1xuICAgICAgaGlzdG9yeS5tdWx0aXNpZ0F1dGhvcml0eSA9IG91dHB1dC5wYXJzZWQuaW5mby5tdWx0aXNpZ0F1dGhvcml0eTtcbiAgICAgIGhpc3Rvcnkuc2lnbmVycyA9IG91dHB1dC5wYXJzZWQuaW5mby5zaWduZXJzO1xuICAgICAgaGlzdG9yeS50eXBlID0gb3V0cHV0LnByb2dyYW07XG4gICAgICBoaXN0b3J5LmRhdGVUaW1lID0gY29udmVydFRpbWVzdGFtcFRvRGF0ZVRpbWUobWV0YS5ibG9ja1RpbWUgYXMgbnVtYmVyKTtcbiAgICAgIGhpc3Rvcnkuc2lnID0gbWV0YS50cmF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TG9nKGBNYXggcmV0cmllcyByZWFjaGVkICgke01BWF9SRVRSSUVTfSlgKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBvd25lciBQdWJrZXlcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAqIEByZXR1cm4ge1Byb21pc2U8UmVzdWx0PFRva2VuTWV0YWRhdGFbXXwgRXJyb3I+Pn1cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlPd25lciA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxUb2tlbk1ldGFkYXRhW10sIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgY29ubmVjdGlvbiA9IE5vZGUuZ2V0Q29ubmVjdGlvbigpO1xuICAgICAgY29uc3QgaW5mbyA9IGF3YWl0IGNvbm5lY3Rpb24uZ2V0UGFyc2VkVG9rZW5BY2NvdW50c0J5T3duZXIoXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHtcbiAgICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIH0sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtc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Rlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgdHguYWRkKGluc3QyKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIHJldHVybiBpbnN0cnVjdGlvbiBhbmQgdW5kZWNpZGVkIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgICAgICB0eC5hZGQoZGVzdFRva2VuLmluc3QpLmFkZChpbnN0Mik7XG4gICAgICB9XG5cbiAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgdHguaW5zdHJ1Y3Rpb25zLn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ZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgIC8vIHRva2VuIG93bmVyIFNlY3JldFxuICAgKiBAcGFyYW0ge251b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WVyOiBwYXllciB9LFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1Ymx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tcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtc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c3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3QgcGF5ZXJQdWJrZXkgPSBuZXcgQWNjb3VudC5LZXlwYWlyKHsgc2VjcmV0OiBwYXllciB9KTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gb3duZXJPck11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXJQdWJrZXkucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBrZXlwYWlycyxcbiAgICAgICk7XG5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JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgbWV0YWRhdGE6IHRva2VuTWV0YWRhdGFQdWJrZXksXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNYXN0ZXJFZGl0aW9uQXJnczoge1xuICAgICAgICAgICAgbWF4U3VwcGx5OiAwLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiA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bmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtc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vcnBlcnRpZXMsIFVwbG9hZCBjb250ZW50IC0tLVxuICAgICAgbGV0IHByb3BlcnRpZXM7XG4gICAgICBpZiAoaW5wdXQucHJvcGVydGllcykge1xuICAgICAgICBwcm9wZXJ0aWVzID0gYXdhaXQgQ29udmVydGVyLlByb3BlcnRpZXMuaW50b0luZnJhKFxuICAgICAgICAgIGlucHV0LnByb3BlcnRpZXMsXG4gICAgICAgICAgU3RvcmFnZS51cGxvYWRGaWxlLFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBpbnB1dCA9IHtcbiAgICAgICAgLi4uaW5wdXQsXG4gICAgICAgIHByb3BlcnRpZXMsXG4gICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgfTtcblxuICAgICAgY29uc3Qgcm95YWx0eSA9IGlucHV0LnJveWFsdHkgPyBpbnB1dC5yb3lhbHR5IDogMDtcbiAgICAgIGNvbnN0IHNlbGxlckZlZUJhc2lzUG9pbnRzID0gQ29udmVydGVyLlJveWFsdHkuaW50b0luZnJhKHJveWFsdHkpO1xuXG4gICAgICBjb25zdCBzdG9yYWdlTWV0YWRhdGEgPSBTdG9yYWdlLnRvQ29udmVydE9mZmNoYWluZGF0YShcbiAgICAgICAgeyAuLi5pbnB1dCwgcHJvcGVydGllcyB9LFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGxldCB1cmkhOiBzdHJpbmc7XG4gICAgICAvLyB1cGxvYWQgZmlsZVxuICAgICAgaWYgKGlucHV0LmZpbGVQYXRoKSB7XG4gICAgICAgIGNvbnN0IHVwbG9hZGVkID0gYXdhaXQgU3RvcmFnZS51cGxvYWQoXG4gICAgICAgICAgc3RvcmFnZU1ldGFkYXRhLFxuICAgICAgICAgIGlucHV0LmZpbGVQYXRoLFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICApO1xuICAgICAgICBkZWJ1Z0xv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gICAgICBjb2xsZWN0aW9uID0gQ29udmVydGVyLkNvbGxlY3Rpb24uaW50b0luZnJhKGlucHV0LmNvbGxlY3Rpb24pO1xuICAgICAgICBkYXRhdjIgPSB7IC4uLmRhdGF2MiwgY29sbGVjdGlvbiB9O1xuICAgICAgfVxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgTWludC5jcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgICAgIG9wdGlvbnMuZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiA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WFnZSB9LFxuICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgIHsgZmVlUGF5ZXI6IHBheWVyIH0sXG4gICAgICAgICk7XG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuUmVndWxhck5mdE1ldGFkYXRhLmludG9JbmZyYShpbnB1dCwgdXJpLCAwKTtcblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuXG4gICAgICBjb25zdCBjb2xsZWN0aW9uTWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIH07XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVTZXRDb2xsZWN0aW9uU2l6ZUluc3RydWN0aW9uKGNvbGxlY3Rpb25zLCB7XG4gICAgICAgICAgc2V0Q29sbGVjdGlvblNpemVBcmdzOiB7XG4gICAgICAgICAgICBzaXplOiBjb2xsZWN0aW9uU2l6ZSB8fCBERUZBVUxUX0NPTExFQ1RJT05fU0laRSxcbiAgICAgICAgICB9LFxuICAgICAgICB9KSxcbiAgICAgICk7XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpLCBjb2xsZWN0aW9uTWludC50b0tleXBhaXI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IsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiU3RvcmFnZSIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJDb252ZXJ0ZXIiLCAiU3RvcmFnZSIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfc3BsX3Rva2VuIiwgImltcG9ydF9tcGxfdG9rZW5fbWV0YWRhdGEiLCAiUmVndWxhck5mdCIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZWd1bGFyTmZ0IiwgIlNwbFRva2VuIiwgIlJlZ3VsYXJOZnQiXQp9Cg== \ No newline at end of file diff --git a/packages/suite-regular-nft/dist/index.mjs b/packages/suite-regular-nft/dist/index.mjs index be348e5e4..51676ce0c 100644 --- a/packages/suite-regular-nft/dist/index.mjs +++ b/packages/suite-regular-nft/dist/index.mjs @@ -21,7 +21,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -57,7 +57,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -113,13 +114,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -2112,7 +2113,6 @@ import { import pino from "pino"; var Filebase; ((Filebase2) => { - const BUCKET_NAME = "solana-suite"; const LOG_LEVEL = Constants.isDebugging == "true" || process.env.DEBUG === "true" ? "debug" : "warn"; const createGatewayUrl = (cid) => `${Constants.FILEBADE_GATEWAY_URL}/${cid}`; const connect = () => { @@ -2130,7 +2130,7 @@ var Filebase; debugLog("# fileName: ", fileName); debugLog("# file: ", file); const putCommand = new PutObjectCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Key: fileName, Body: file }); @@ -2151,7 +2151,9 @@ var Filebase; }; Filebase2.remove = async () => { return Try(async () => { - const listCommand = new ListObjectsV2Command({ Bucket: BUCKET_NAME }); + const listCommand = new ListObjectsV2Command({ + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket + }); const lists = await connect().send(listCommand); debugLog("#lists: ", lists); if (!lists.Contents) { @@ -2161,7 +2163,7 @@ var Filebase; return { Key: list.Key?.toString() }; }); const command = new DeleteObjectsCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Delete: { Objects: fileNames } @@ -3300,4 +3302,4 @@ var RegularNft10 = { export { RegularNft10 as RegularNft }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtc3BsLXRva2VuL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgI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ByZDoge1xuICAgICAgICBpZiAoY3VzdG9tRGFzQXBpVXJsLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgICBjb25zb2xlLndhcm4oQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5EQVNfQVBJX1VSTCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoIUNvbmZpZy5maWxlYmFzZS5rZXkgfHwgIUNvbmZpZy5maWxlYmFzZS5zZWNyZXQpIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcihDb25zdGFudHMuV2Fybm5pbmdNZXNzYWdlLkZJTEVCQVNFX0NSRURFTlRJQUwpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGlmIChDb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4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3R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Jvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBpZiAoIW9wdGlvbnMuaW5zdHJ1Y3Rpb25zKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ05vdCBmb3VuZCBvcHRpb25zLmluc3RydWN0aW9ucycpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGNvbW1vbk9yTWludEluc3QgPSBvcHRpb25zLmluc3RydWN0aW9ucztcbiAgICAgICAgbGV0IGkgPSAwO1xuICAgICAgICBmb3IgKGNvbnN0IGluc3Qgb2YgY29tbW9uT3JNaW50SW5zdCkge1xuICAgICAgICAgIGlmICghaW5zdC5pbnN0cnVjdGlvbnMgJiYgIWluc3Quc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoaW5zdCl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcChcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoKGluc3QpID0+IGluc3Quc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGNvbW1vbk9yTWludEluc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0LmZlZVBheWVyICE9PSB1bmRlZmluZWQsXG4gICAgICAgICk7XG4gICAgICAgIGx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zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbXB1dGVCdWRnZXRQcm9ncmFtLFxuICBLZXlwYWlyLFxuICBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMsXG4gIFRyYW5zYWN0aW9uSW5zdHJ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lTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZUJ5U2xvdCkuc29ydChcbiAgICAgICAgKGE6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcywgYjogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKSA9PlxuICAgICAgICAgIGEuc2xvdCAtIGIuc2xvdCxcbiAgICAgICkgYXMgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW107XG5cbiAgICAgIC8vIGdldCBtZWRpYW4gb2YgbGFzdCAyMCBmZWVzXG4gICAgICBjb25zdCByZWNlbnRGZWVzID0gbWF4aW11bUZlZXMuc2xpY2UoXG4gICAgICAgIE1hdGgubWF4KG1heGltdW1GZWVzLmxlbmd0aCAtIDIwLCAwKSxcbiAgICAgICk7XG4gICAgICBjb25zdCBtaWQgPSBNYXRoLmZsb29yKHJlY2VudEZlZXMubGVuZ3RoIC8gMik7XG4gICAgICBjb25zdCBtZWRpYW5GZWUgPVxuICAgICAgICByZWNlbnRGZWVzLmxlbmd0aCAlIDIgIT09IDBcbiAgICAgICAgICA/IHJlY2VudEZlZXNbbWlkXS5wcmlvcml0aXphdGlvbkZlZVxuICAgICAgICAgIDogKHJlY2VudEZlZXNbbWlkIC0gMV0ucHJpb3JpdGl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ICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQge1xuICBDb25maXJtT3B0aW9ucyxcbiAgS2V5cGFpcixcbiAgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbixcbi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cbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5cbmltcG9ydCB7IENvbnN0YW50cywgUmVzd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gICAgICAgIGZpbGUuZmlsZVBhdGghLFxuICAgICAgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICAgICAgb3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZXhpc3RzS2V5OiAnZmlsZVBhdGgnLFxuICAgICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgXSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmaWxlO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm9wZXJ0aWVzO1xuICAgIH07XG4gIH1cbn1cbiIsICIvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi9cbmltcG9ydCB7IE9wdGlvbiwgVXNlcyB9IGZyb20gJ34vdHlwZXMvcmVndWxhci1uZnQnO1xuXG5leHBvcnQgbmFtZXNwYWNlIENvbnZlcnRlciB7XG4gIGV4cG9ydCBuYW1lc3BhY2UgVXNlcyB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyU2lkZSA9IChvdXRwdXQ6IE9wdGlvbjxVc2VzPik6IFVzZXMgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cbiAgICAgIHJldHVybiBvdXRwdXQ7XG4gICAgfTtcbiAgfVx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gIH1cbiAgICB9XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBvd25lciBQdWJrZXlcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAqIEByZXR1cm4ge1Byb21pc2U8UmVzdWx0PFRva2VuTWV0YWRhdGFbXXwgRXJyb3I+Pn1cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlPd25lciA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxUb2tlbk1ldGFkYXRhW10sIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgY29ubmVjdGlvbiA9IE5vZGUuZ2V0Q29ubmVjdGlvbigpO1xuICAgICAgY29uc3QgaW5mbyA9IGF3YWl0IGNvbm5lY3Rpb24uZ2V0UGFyc2VkVG9rZW5BY2NvdW50c0J5T3duZXIoXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIHtcbiAgICAgICAgICBwcm9ncmFtSWQ6IFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIH0sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRy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pb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhdGVkIHRva2VuIGFjY291bnRcbiAgICAgIGlmICghZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgdHguYWRkKGluc3QyKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIHJldHVybiBpbnN0cnVjdGlvbiBhbmQgdW5kZWNpZGVkIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgICAgICB0eC5hZGQoZGVzdFRva2VuLmluc3QpLmFkZChpbnN0Mik7XG4gICAgICB9XG5cbiAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgdHguaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgVHJhbnNhY3Rpb25CdWlsZGVyLlByaW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ksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IHRva2VuTWV0YWRhdGEsXG4gICAgICAgICAgICBpc011dGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uRGV0YWlsczogbnVsbCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFNQTC1UT0tFTiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7U2VjcmV0fSBvd25lciAgICAgIC8vIHRva2VuIG93bmVyIFNlY3JldFxuICAgKiBAcGFyYW0ge251bWJlcn0gdG90YWxBbW91bnQgLy8gdG90YWwgbnVtYmVyXG4gICAqIEBwYXJhbSB7b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pIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcm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ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ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AgICAuLi5vcHRpb25zLFxuICAgIH07XG5cbiAgICBjb25zdCBhc3NldHMgPSBhd2FpdCBBcGkuZ2V0QXNzZXRzQnlPd25lcihcbiAgICAgIG93bmVyLFxuICAgICAgbGltaXQsXG4gICAgICBwYWdlLFxuICAgICAgc29ydEJ5LFxuICAgICAgYmVmb3JlLFxuICAgICAgYWZ0ZXIsXG4gICAgKTtcbiAgICBpZiAoYXNzZXRzLmlzRXJyKSB7XG4gICAgICB0aHJvdyBhc3NldHMuZXJyb3I7XG4gICAgfVxuXG4gICAgY29uc3QgaXRlbXMgPSBhc3NldHMudmFsdWUuaXRlbXM7XG5cbiAgICBjb25zdCBtZXRhZGF0YXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgIGl0ZW1zXG4gICAgICAgIC5maWx0ZXIoKGl0ZW0pID0+IGl0ZW0uY29tcHJlc3Npb24uY29tcHJlc3NlZCA9PT0gaXNDb21wcmVzc2VkKVxuICAgICAgICAubWFwKGFzeW5jIChpdGVtKSA9PiB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IG9mZmNoYWluOiBPZmZjaGFpbiA9IGF3YWl0IGZldGNoT2ZmY2hhaW4oXG4gICAgICAgICAgICAgIGl0ZW0uY29udGVudC5qc29uX3VyaSxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBjb25zdCBtZXJnZWQgPSB7XG4gICAgICAgICAgICAgIG9uY2hhaW46IGl0ZW0sXG4gICAgICAgICAgICAgIG9mZmNoYWluOiBvZmZjaGFpbixcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gQ29udmVydGVyLk5mdC5pbnRvVXNlcihtZXJnZWQpO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgZGVidWdMb2coJyMgRmFpbGVkIGZldGNoIG9mZmNoYWluIHVybDogJywgaXRlbS5jb250ZW50Lmpzb25fdXJpKTtcbiAgICAgICAgICAgIHJldHVybiBD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uICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICBkYXRhOiBuZnRNZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1hc3RlckVkaXRpb25WM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgZWRpdGlvbjogbWFzdGVyRWRpdGlvblB1YmtleSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWFzdGVyRWRpdGlvbkFyZ3M6IHtcbiAgICAgICAgICAgIG1heFN1cHBseTogMCxcbiAgICAgICAgICB9LFxuICAgICAgICB9LFxuICAgICAgKSxcbiAgICApO1xuICAgIHJldHVybiBpbnN0cnVjdGlvbnM7XG4gIH07XG5cbiAgLyoqXG4gICAqIFVwbG9hZCBjb250ZW50IGFuZCBORlQgbWludFxuICAgKlxuICAgKiBAcGFyYW0ge1NlY3JldH0gb3duZXIgICAgICAgICAgICAvLyBvd25lcidzIFNlY3JldFxuICAgKiBAcGFyYW0ge0lucHV0TmZ0TWV0YWRhdGF9IGlucHV0ICAvLyBuZnQgbWV0YWRhdGFcbiAgICogQHBhcmFtIHtQYXJ0aWFsPE1pbnRPcHRpb25zPn0gb3B0aW9ucyAvLyBvcH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4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICAvLyBjb2xsZWN0aW9uIC0tLVxuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24pIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgICAgY3JlYXRlVmVyaWZ5U2l6ZWRDb2xsZWN0aW9uKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgaW5wdXQuY29sbGVjdGlvbi50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGtleXBhaXJzID0gW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXTtcblxuICAgICAgLy8gY3JlYXRvciAtLS1cbiAgICAgIGlmIChpbnB1dC5jcmVhdG9ycykge1xuICAgICAgICBpbnB1dC5jcmVhdG9ycy5mb3JFYWNoKChjcmVhdG9yKSA9PiB7XG4gICAgICAgICAgaWYgKEFjY291bnQuS2V5c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NvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIHNlbGxlckZlZUJhc2lzUG9pbnRzOiAnLCBzZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICBkZWJ1Z0xvZygnIyBkYXRhdjI6ICcsIGRhdGF2Mik7XG5cbiAgICAgIGNvbnN0IG1pbnQgPSBBY2NvdW50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IE1pbnQuY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY2tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChvcHRpb25zLmZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIE1pbnQuY3JlYXRlRGVsZWFnYXRlKFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNrZXksXG4gICAgICAgICAgICBvcHRpb25zLmZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCb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Bjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBjb2xsZWN0aW9ucyA9IHtcbiAgICAgICAgY29sbGVjdGlvbk1ldGFkYXRhOiBjb2xsZWN0aW9uTWV0YWRhdGFBY2NvdW50LFxuICAgICAgICBjb2xsZWN0aW9uQXV0aG9yaXR5OiBvd25lci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGNvbGxlY3Rpb25NaW50OiBjb2xsZWN0aW9uTWludC50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICB9O1xuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlU2V0Q29sbGVjdGlvblNpemVJbnN0cnVjdGlvbihjb2xsZWN0aW9ucywge1xuICAgICAgICAgIHNldENvbGxlY3Rpb25TaXplQXJnczoge1xuICAgICAgICAgICAgc2l6ZTogY29sbGVjdGlvblNpemUgfHwgREVGQVVMVF9DT0xMRUNUSU9OX1NJWkUsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgY29sbGVjdGlvbk1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgUHVia2V5L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wubGVuZ3RoID4gMCkge1xuICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgY3VzdG9tRGFzQXBpVXJsLmxlbmd0aDtcbiAgICAgIHJldHVybiBjdXN0b21EYXNBcGlVcmxbaW5kZXhdO1xuICAgIH1cblxuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoY3VzdG9tRGFzQXBpVXJsLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgICBjb25zb2xlLndhcm4oQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5EQVNfQVBJX1VSTCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5rZXkgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uuc2VjcmV0ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBGaWxlYmFzZUNyZWRlbnRpYWwuZGV2O1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3QgbG9hZENvbmZpZyA9IGFzeW5jICgpID0+IHtcbiAgICBjb25zdCB7IGRlZmF1bHQ6IGxvYWRlZENvbmZpZyB9ID0gYXdhaXQgaW1wb3J0KFxuICAgICAgJ0Bzb2xhbmEtc3VpdGUvY29uZmlnL2xvYWQnLFxuICAgICAge1xuICAgICAgICB3aXRoOiB7IHR5cGU6ICdqc29uJyB9LFxuICAgICAgfVxuICAgICk7XG4gICAgQ29uZmlnID0gbG9hZGVkQ29uZmlnO1xuICAgIGNvbnNvbGUubG9nKCcjIyMjIyMjIyMjIyMjIycsIENvbmZpZyk7XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IFdSQVBQRURfVE9LRU5fUFJPR1JBTV9JRCA9IG5ldyBQdWJsaWNLZXkoXG4gICAgJ1NvMTExMTExMTExMTExMTExMTEx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XG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICB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cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9y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AgICAgIGluc3RydWN0aW9uczogVHJhbnNhY3Rpb25JbnN0cnVjdGlvbltdLFxuICAgICk6IFByb21pc2U8bnVtYmVyPiA9PiB7XG4gICAgICBjb25zdCB3cml0YWJsZUFjY291bnRzID0gaW5zdHJ1Y3Rpb25zXG4gICAgICAgIC5tYXAoKGluc3QpID0+XG4gICAgICAgICAgaW5zdC5rZXlzXG4gICAgICAgICAgICAuZmlsdGVyKChhY2NvdW50KSA9PiBhY2NvdW50LmlzV3JpdGFibGUpXG4gICAgICAgICAgICAubWFwKChrZXkpID0+IGtleS5wdWJrZXkpLFxuICAgICAgICApXG4gICAgICAgIC5mbGF0KCk7XG5cbiAgICAgIGNvbnN0IHVuaXFXcml0YWJsZUFjY291bnRzID0gW1xuICAgICAgICAuLi5uZXcgU2V0KHdyaXRhYmxlQWNjb3VudHMubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvQmFzZTU4KCkpKSxcbiAgICAgIF1cbiAgICAgICAgLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b1B1YmxpY0tleSgpKVxuICAgICAgICAuc2xpY2UoMCwgTUFYX1JFQ0VOVF9QUklPUklUWV9GRUVfQUNDT1VOVFMpO1xuXG4gICAgICBjb25zdCBwcmlvcml0eUZlZXMgPVxuICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZUJ5U2xvdCkuc29ydChcbiAgICAgICAgKGE6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcywgYjogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKSA9PlxuICAgICAgICAgIGEuc2xvdCAtIGIuc2xvdCxcbiAgICAgICkgYXMgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW107XG5cbiAgICAgIC8vIGdldCBtZWRpYW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pZnQoXG4gICAgICAgICAgICBhd2FpdCBQcmlvcml0eUZlZS5Qcmlvcml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0N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VJbnN0cnVjdGlvbihcbiAgICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl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cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIGluc3RydWN0aW9uc1xuICAgICAgaXhzU2l6ZVxuICAgICk7XG4gIH07XG5cbiAgLyoqXG4gICAqIElzIG1heCB0cmFuc2FjdGlvbiBzaXplXG4gICAqIEBwYXJhbSB0cmFuc2Fjd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UHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvQ29tcHJlc3NlZE5mdEluZnJhID0gKFxuICAgICAgaW5wdXQ6IE9wdGlvbjxJbnB1dENyZWF0b3JzW10+IHwgdW5kZWZpbmVkLFxuICAgICk6IEludGVybmFsQ3JlYXRvcnNbXSA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBbXTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBpbnB1dCEubWFwKChkYXRhKSA9PiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgYWRkcmVzczogZGF0YS5hZGRyZXNzLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgc2hhcmU6IGRhdGEuc2hhcmUsXG4gICAgICAgICAgdmVyaWZpZWQ6IGZhbHNlLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ3JlYXRvcnNbXT4sXG4gICAgKTogQ3JlYXRvcnNbXSB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gb3V0cHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1N0cmluZygpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBkYXRhLnZlcmlmaWVkLFxuICAgICAgICB9O1xuICAgICAgfSk7XG4gICAgfTtcbiAgfVx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ydGllcz4gPT4ge1xuICAgICAgaWYgKCFpbnB1dCB8fCAhaW5wdXQuZmlsZXMpIHtcbiAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgfVxuXG4gICAgICBjb25zdCBmaWxlcyA9IGF3YWl0IFByb21pc2UuYWxsKFxuICAgICAgICBpbnB1dC5maWxlcy5tYXAoYXN5bmMgKGZpbGUpID0+IHtcbiAgICAgICAgICBpZiAoIWZpbGUuZmlsZVBhdGggJiYgIWZpbGUudXJpKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChmaWxlLmZpbGVQYXRoKSB7XG4gICAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCBjYWxsYmFja0Z1bmMoXG4gICAgICAgICAgICAgIGZpbGUuZmlsZVBhdGghLFxuICAgICAgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICAgICAgb3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAocmVzLmlzRXJyKSB7XG4gICAgICAgICAgICAgIHRocm93IEVycm9yKHJlcy5lcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBvdmVyd3JpdGVPYmplY3QoZmlsZSwgW1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZXhpc3RzS2V5OiAnZmlsZVBhdGgnLFxuICAgICAgICAgICAgICAgIHdpbGw6IHsga2V5OiAndXJpJywgdmFsdWU6IHJlcy52YWx1ZSB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgXSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiBmaWxlO1xuICAgICAgICB9KSxcbiAgICAgICk7XG4gICAgICByZXR1cm4geyAuLi5pbnB1dCwgZmlsZXMgfSBhcyBQcm9wZXJ0aWVzO1xuICAgIH07XG4gIH1cbn1cbiIsICIvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlw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H0sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkYXRhcyA9IGluZm8udmFsdWUubWFwKGFzeW5jIChkKSA9PiB7XG4gICAgICAgIGNvbnN0IG1pbnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby5taW50IGFzIFB1YmtleTtcbiAgICAgICAgY29uc3QgdG9rZW5BbW91bnQgPSBkLmFjY291bnQuZGF0YS5wYXJzZWQuaW5mby50b2tlbkFtb3VudFxuICAgICAgICAgIC5hbW91bnQgYXMgc3RyaW5nO1xuICAgICAgICBpZiAodG9rZW5BbW91bnQgPT09ICcxJykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gTWV0YWRhdGEuZnJvbUFjY291bnRBZGRyZXNzKFxuICAgICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgICAgQWNjb3VudC5QZGEuZ2V0TWV0YWRhdGEobWludCksXG4gICAgICAgIClcbiAgICAgICAgICAudGhlbihhc3luYyAobWV0YWRhdGEpID0+IHtcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgICAgICAgICAgIHJldHVybiBmZXRjaFJldHJ5KG1ldGFkYXRhLmRhdGEudXJpKS50aGVuKChqc29uOiBhbnkpID0+IHtcbiAgICAgICAgICAgICAgcmV0dXJuIGNvbnZlcnRlcihtZXRhZGF0YSwganNvbiwgdG9rZW5BbW91bnQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSlcbiAgICAgICAgICAuY2F0Y2goKGVycikgPT4gZGVidWdMb2coJyMgW0ZldGNoIGVycm9yXScsIGVycikpO1xuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGZpbHRlcnMgPSAoYXdhaXQgUHJvbWlzZS5hbGwoZGF0YXMpKS5maWx0ZXIoXG4gICAgICAgIChkYXRhKSA9PiBkYXRhICE9PSB1bmRlZmluZWQsXG4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9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lclB1YmxpY0tleS50b1N0cmluZygpLFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGRlc3RUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgZGVzdCxcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICApO1xuXG4gICAgICBjb25zdCBibG9ja2hhc2hPYmogPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRMYXRlc3RCbG9ja2hhc2goKTtcblxuICAgICAgY29uc3QgdHggPSBuZXcgVHJhbnNhY3Rpb24oe1xuICAgICAgICBsYXN0VmFsaWRCbG9ja0hlaWdodDogYmxvY2toYXNoT2JqLmxhc3RWYWxpZEJsb2NrSGVpZ2h0LFxuICAgICAgICBibG9ja2hhc2g6IGJsb2NraGFzaE9iai5ibG9ja2hhc2gsXG4gICAgICAgIGZlZVBheWVyOiBmZWVQYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgfSk7XG5cbiAgICAgIGNvbnN0IGluc3QyID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIGRlc3RUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIENhbGN1bGF0b3IuY2FsY3VsYXRlQW1vdW50KGFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpXSxcbiAgICAgICk7XG5cbiAgICAgIC8vIHJldHVybiBhc3NvY2lhd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cblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlSW5pdGlhbGl6ZU1pbnRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBvd25lcixcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbWludCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBDYWxjdWxhdGUuY2FsY3VsYXRlQW1vdW50KHRvdGFsQW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVDcmVhdGVNZXRhZGF0YUFjY291bnRWM0luc3RydWN0aW9uKFxuICAgICAgICB7XG4gICAgICAgICAgbWV0YWRhdGE6IG1ldGFkYXRhUGRhLFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVj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b3cgdXBsb2FkZWQ7XG4gICAgICAgIH1cbiAgICAgICAgdXJpID0gdXBsb2FkZWQudmFsdWU7XG4gICAgICB9IGVsc2UgaWYgKGlucHV0LnVyaSkge1xuICAgICAgICBjb25zdCBpbWFnZSA9IHsgaW1hZ2U6IGlucHV0LnVyaSB9O1xuICAgICAgICBjb25zdCB1cGxvYWRlZCA9IGF3YWl0IFN0b3JhZ2UudXBsb2FkRGF0YShcbiAgICAgICAgICB7IC4uLnN0b3JhZ2VNZXRhZGF0YSwgLi4uaW1hZ2UgfSxcbiAgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICB7IGZlZVBheWVyOiBwYXllciB9LFxuICAgICAgICApO1xuICAgICAgICBpZiAodXBsb2FkZWQuaXNFcnIpIHtcbiAgICAgICAgICB0aHJvdyB1cGxvYWRlZDtcbiAgICAgICAgfVxuICAgICAgICB1cmkgPSB1cGxvYWRlZC52YWx1ZTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IEVycm9yKGBNdXN0IHNldCBmaWxlUGF0aCcgb3IgJ3VyaSdgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gdHJ1ZTtcblxuICAgICAgY29uc3QgZGF0YXYyID0gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcbiAgICAgIGRlYnVnTG9nKCcjIHVwbG9hZCBjb250ZW50IHVybDogJywgdXJpKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgdG90YWxBbW91bnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgKTtcblxuICAgICAgLy8gZnJlZXplQXV0aG9yaXR5XG4gICAgICBpZiAoZnJlZXplQXV0aG9yaXR5KSB7XG4gICAgICAgIGluc3RzLnB1c2goXG4gICAgICAgICAgY3JlYXRlRnJlZXplQXV0aG9yaXR5KFxuICAgICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgICAgICBmcmVlemVBdXRob3JpdHkudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5NaW50KFxuICAgICAgICBpbnN0cyxcbiAgICAgICAgW293bmVyLnRvS2V5cGFpcigpLCBtaW50LnRvS2V5cGFpcigpXSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgIG1pbnQucHVia2V5LFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgQ29udmVydGVyIH0gZnJvbSAnfi9jb252ZXJ0ZXInO1xuaW1wb3J0IHsgRGV0YWlscywgTGltaXQgfSBmcm9tICd+L3R5cGVzL3ZhbGlkYXRvcic7XG5pbXBvcnQgeyBJbnB1dE5mdE1ldGFkYXRhIH0gZnJvbSAnfi90eXBlcy9yZWd1bGFyLW5mdCc7XG5pbXBvcnQgeyBPZmZjaGFpbiB9IGZyb20gJ34vdHlwZXMvc3RvcmFnZSc7XG5pbXBvcnQgeyB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cbiAgPihcbiAgICBtZXRhZGF0YTogVCxcbiAgKTogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGtleXMgPSBPYmplY3Qua2V5cyhtZXRhZGF0YSk7XG4gICAgICBjb25zdCByZXN1bHRzOiBEZXRhaWxzW10gPSBbXTtcbiAgICAgIGtleXMubWFwKChrZXkpID0+IHtcbiAgICAgICAgbGV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWYgKHJlc3VsdHMubGVuZ3RoID4gMCkge1xuICAgICAgICBjb25zdCBtZXNzYWdlID1cbiAgICAgICAgICAnQ2F1Z2h0IGluIHRoZSB2YWxpZGF0aW9uIGVycm9ycy4gc2VlIGluZm9ybWF0aW9uIGUuZzogZXJyPFZhbGlkYXRvckVycm9yPi5kZXRhaWxzJztcbiAgICAgICAgdGhyb3cgbmV3IFZhbGlkYXRvckVycm9yKG1lc3NhZ2UsIHJlc3VsdHMpO1xuICAgICAgfVxuICAgICAgcmV0dXJuIE1lc3NhZ2UuU1VDQ0VTUztcbiAgICB9KTtcbiAgfTtcblxuICB0eXBlIFBpY2tO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9ydCBjb25zdCB0cmFuc2ZlciA9IGFzeW5jIChcbiAgICBtaW50OiBQdWJrZXksXG4gICAgb3duZXI6IFB1YmtleSxcbiAgICBkZXN0OiBQdWJrZXksXG4gICAgb3duZXJPck11bHRpc2lnOiBTZWNyZXRbXSxcbiAgICBhbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8TWludE9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3QgcGF5ZXJQdWJrZXkgPSBuZXcgQWNjb3VudC5LZXlwYWlyKHsgc2VjcmV0OiBwYXllciB9KTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gb3duZXJPck11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXJQdWJrZXkucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2V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gICAgIC5tYXAoYXN5bmMgKGl0ZW0pID0+IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb2ZmY2hhaW46IE9mZmNoYWluID0gYXdhaXQgZmV0Y2hPZmZjaGFpbihcbiAgICAgICAgICAgICAgaXRlbS5jb250ZW50Lmpzb25fdXJpLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGNvbnN0IG1lcmdlZCA9IHtcbiAgICAgICAgICAgICAgb25jaGFpbjogaXRlbSxcbiAgICAgICAgICAgICAgb2ZmY2hhaW46IG9mZmNoYWluLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBDb252ZXJ0ZXIuTmZ0LmludG9Vc2VyKG1lcmdlZCk7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBkZWJ1Z0xvZygnIyBGYWlsZWQgZmV0Y2ggb2ZmY2hhaW4gdXJsOiAnLCBpdGVtLmNvbnRlbnQuanNvbl91cmkpO1xuICAgICAgICAgICAgcmV0dXJuIENvbnZlcnRlci5OZnQuaW50b1VzZXIoe1xuICAgICAgICAgICAgICBvbmNoYWluOiBpdGVtLFxuICAgICAgICAgICAgICBvZmZjaGFpbjoge30sXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pLFxuICAgICk7XG4gICAgcmV0dXJuIHtcbiAgICAgIHBhZ2U6IGFzc2V0cy52YWx1ZS5wYWdlLFxuICAgICAgdG90YWw6IGFzc2V0cy52YWx1ZS50b3RhbCxcbiAgICAgIGxpbWl0OiBhc3NldHMudmFsdWUubGltaXQsXG4gICAgICBtZXRhZGF0YXMsXG4gICAgfTtcbiAgfTtcblxuICAvKipcbiAgICogRmluZCBuZnQgYnkgY29sbGVjdGlvbiBtaW50XG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBjb2xsZWN0aW9uTWludFxuICAgKiBAcGFyYW0ge2Jvb2xlYW59IGlzQ29tcHJlc3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U1pbnRJbnN0cnVjdGlvbihtaW50LCAwLCBvd25lciwgb3duZXIpKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKGZlZVBheWVyLCBhdGEsIG93bmVyLCBtaW50KSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goY3JlYXRlTWludFRvQ2hlY2tlZEluc3RydWN0aW9uKG1pbnQsIGF0YSwgb3duZXIsIDEsIDApKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiB0b2tlbk1ldGFkYXRhUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgbWludEF1dGhvcml0eTogb3duZXIsXG4gICAgICAgICAgcGF5ZXI6IGZlZVBheWVyLFxuICAgICAgICAgIHVwZGF0ZUF1dGhvcml0eTogb3duZXIsXG4gICAgICAgIH0sXG4gICAgICAgIHtcbiAgICAgICAgICBjcmVhdGVNZXRhZGF0YUFjY291bnRBcmdzVjM6IHtcbiAgICAgICAgICAgIGRhdGE6IG5mdE1ldGFkYXRhLFxuICAgICAgICAgICAgaXNNdXRhYmxlLFxuICAgICAgICAgICAgY29sbGVjdGlvbkRldGFpbHM6IG51bGwsXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWFzdGVyRWRpdGlvblYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBlZGl0aW9uOiBtYXN0ZXJFZGl0aW9uUHVia2V5LFxuICAgICAgICAgIG1pbnQsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5Oi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FsdWU7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aHJvdyBFcnJvcihgTXVzdCBzZXQgZmlsZVBhdGgnIG9yICd1cmknYCk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGRhdGF2MiA9IENvbnZlcnRlci5SZWd1bGFyTmZ0TWV0YWRhdGEuaW50b0luZnJhKFxuICAgICAgICBpbnB1dCxcbiAgICAgICAgdXJpLFxuICAgICAgICBzZWxsZXJGZWVCYXNpc1BvaW50cyxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGlzTXV0YWJsZSA9IGlucHV0LmlzTXV0YWJsZSA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlucHV0LmlzTXV0YWJsZTtcblxuICAgICAgZGVidWdMb2coJyMgaW5wdXQ6ICcsIGlucHV0KTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgY3JlYXRlTWludChcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVEZWxlYWdhdGUoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIC8vIGNvbGxlY3Rpb24gLS0tXG4gICAgICBpZiAoaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBjcmVhdGVWZXJpZnlTaXplZENvbGxlY3Rpb24oXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBpbnB1dC5jb2xsZWN0aW9uLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgY29uc3Qga2V5cGFpcnMgPSBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldO1xuXG4gICAgICAvLyBjcmVhdG9yIC0tLVxuICAgICAgaWYgKGlucHV0LmNyZWF0b3JzKSB7XG4gICAgICAgIGlucHV0LmNyZWF0b3JzLmZvckVhY2goKGNyZWF0b3IpID0+IHtcbiAgICAgICAgICBpZiAoQWNjb3VudC5LZXlwYWlyLmlzU2VjcmV0KGNyZWF0b3Iuc2VjcmV0KSkge1xuICAgICAgICAgICAgY29uc3QgY3JlYXRvclB1YmtleSA9IGNyZWF0b3IuYWRkcmVzcy50b1B1YmxpY0tleSgpO1xuICAgICAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZVZlcmlmeUNyZWF0b3IobWludC50b1B1YmxpY0tleSgpLCBjcmVhdG9yUHVia2V5KTtcbiAgICAgICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGluc3QpO1xuICAgICAgICAgICAga2V5cGFpcnMucHVzaChjcmVhdG9yLnNlY3JldC50b0tleXBhaXIoKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHJ1Y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S0tIHBvcnBlcnRpZXMsIFVwbG9hZCBjb250ZW50IC0tLVxuXG4gICAgICBsZXQgZGF0YXYyID0gQ29udmVydGVyLlJlZ3VsYXJOZnRNZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cbiAgICAgIGxldCBjb2xsZWN0aW9uO1xuICAgICAgaWYgKGlucHV0LmNvbGxlY3Rpb24gJiYgaW5wdXQuY29sbGVjdGlvbikge1xuICAgICAgICBjb2xsZWN0aW9uID0gQ29udmVydGVyLkNvbGxlY3Rpb24uaW50b0luZnJhKGlucHV0LmNvbGxlY3Rpb24pO1xuICAgICAgICBkYXRhdjIgPSB7IC4uLmRhdGF2MiwgY29sbGVjdGlvbiB9O1xuICAgICAgfVxuICAgICAgLy8tLS0gY29sbGVjdGlvbiAtLS1cblxuICAgICAgY29uc3QgaXNNdXRhYmxlID0gaW5wdXQuaXNNdXRhYmxlID09PSB1bmRlZmluZWQgPyB0cnVlIDogaW5wdXQuaXNNdXRhYmxlO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBpbnB1dDogJywgaW5wdXQpO1xuICAgICAgZGVidWdMb2coJyMgc2VsbGVyRmVlQmFzaXNQb2ludHM6ICcsIHNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgIGRlYnVnTG9nKCcjIGRhdGF2MjogJywgZGF0YXYyKTtcblxuICAgICAgY29uc3QgbWludCA9IEFjY291bnQuS2V5cGFpci5jcmVhdGUoKTtcbiAgICAgIGNvbnN0IGluc3RzID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGlja2V5LFxuICAgICAgICBkYXRhdjIsXG4gICAgICAgIGZlZVBheWVyLnRvUHVibGljS2V5K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IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQgPSBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShcbiAgICAgICAgY29sbGVjdGlvbk1pbnQucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXdhaXQgTWludC5jcmVhdGVNaW50KFxuICAgICAgICBjb2xsZWN0aW9uTWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgICBNaW50LmNyZWF0ZURlbGVhZ2F0ZShcbiAgICAgICAgICAgIGNvbGxlY3Rpb25NaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGNvbGxlY3Rpb25zID0ge1xuICAgICAgICBjb2xsZWN0aW9uTWV0YWRhdGE6IGNvbGxlY3Rpb25NZXRhZGF0YUFjY291bnQsXG4gICAgICAgIGNvbGxlY3Rpb25BdXRob3JpdHk6IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgICAgY29sbGVjdGlvbk1pbnQ6IGNvbGxlY3Rpb25NaW50LnRvS2V5cGFpcigpLnB1YmxpY0tleSxcbiAgICAgIH07XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVTZXRDb2xsZWN0aW9uU2l6ZUluc3R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ml0aWFsaXplTWludEluc3RydWN0aW9uIiwgImNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbiIsICJjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24iLCAiQ29udmVydGVyIiwgIlN0b3JhZ2UiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgIlJlZ3VsYXJOZnQiLCAiQ29udmVydGVyIiwgIlN0b3JhZ2UiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0IiwgIkNvbnZlcnRlciIsICJTdG9yYWdlIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlJlZ3VsYXJOZnQiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUmVndWxhck5mdCIsICJTcGxUb2tlbiIsICJSZWd1bGFyTmZ0Il0KfQo= \ No newline at end of file diff --git a/packages/suite-sol-native/dist/index.js b/packages/suite-sol-native/dist/index.js index 8aad08d73..35dcb5f49 100644 --- a/packages/suite-sol-native/dist/index.js +++ b/packages/suite-sol-native/dist/index.js @@ -54,7 +54,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -90,7 +90,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -146,13 +147,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1870,4 +1871,4 @@ var SolNative5 = { 0 && (module.exports = { SolNative }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3ByaW9yaXR5LWZlZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21wdXRlLXVuaXQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9yZXRyeS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcm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NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gc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heWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29tcHV0ZUJ1ZGdldFByb2dyYW0sXG4gIEtleXBhaXIsXG4gIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyxcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgZGVidWdMb2cgfSBmcm9t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Z2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLFxuICBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IG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dCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25hdHVyZSxcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgQ29uc3RhbnRzLCBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBQdWJrZXkgfSBmcm9tICd+L3R5cGVzL2FjY291bnQ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llcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgZGVjb2RlID0gQnVmZmVyLmZyb20odGhpcy5oZXhJbnN0cnVjdGlvbiwgJ2hleCcpO1xuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IFRyYW5zYWN0aW9uLmZyb20oZGVjb2RlKTtcbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLnBhcnRpYWxTaWduKG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIGNvbnN0IHdpcmVUcmFuc2FjdGlvbiA9IHRyYW5zYWN0aW9uLnNlcmlhbGl6ZSgpO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5zZW5kUmF3VHJhbnNhY3Rpb24oXG4gICAgICAgICAgICB3aXJlVHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXRGb3JQYXJ0aWFsU2lnbihcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICA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IGFzeW5jIChcbiAgICAgIGlucHV0OiBQcm9wZXJ0aWVzIHwgdW5kZWZpbmVkLFxuICAgICAgY2FsbGJhY2tGdW5jOiAoXG4gICAgICAgIGZpbGVQYXRoOiBGaWxlVHlwZSxcbiAgICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBvcHRpb25zOiBQYXJ0aWFsPFN0b3JhZ2VPcHRpb25zPixcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgb3B0aW9uczogUGFydGlhbDxTdG9yYWdlT3B0aW9ucz4gPSB7fSxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoICYmICFmaWxlLnVyaSkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAg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cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi9ub2RlJztcbmltcG9ydCB7IE93bmVySW5mbywgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5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iAgICogQHJldHVybiB7UmVzdWx0PENvbW1vblN0cnVjdHVyZTx1bmtub3duPiwgRXJyb3I+IH1cbiAgICovXG4gIGV4cG9ydCBjb25zdCB0cmFuc2ZlcldpdGhNdWx0aXNpZyA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICAgIGRlc3Q6IFB1YmtleSxcbiAgICBtdWx0aXNpZzogU2VjcmV0W10sXG4gICAgYW1vdW50OiBudW1iZXIsXG4gICAgb3B0aW9uczogUGFydGlhbDxUcmFuc2Zlck9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogbXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCB3cmFwcGVkID0gYXdhaXQgY3JlYXRlV3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEFjY291bnQuS2V5cGFpcih7IHNlY3JldDogcGF5ZXIgfSkucHVia2V5LFxuICAgICAgICB0cnVlLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIG5ldyBBY2NvdW50LktleXBhaXIoeyBzZWNyZXQ6IHBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgdHJ1ZSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaWYgKHNvdXJjZVRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goc291cmNlVG9rZW4uaW5zdCk7XG4gICAgICB9XG4gICAgICBpZiAoZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goZGVzdFRva2VuLmluc3QpO1xuICAgICAgfVxuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZ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luZyB8IEluc3RydWN0aW9uPlxuICovXG5leHBvcnQgbmFtZXNwYWNlIEFjY291bnQge1xuICBleHBvcnQgbmFtZXNwYWNlIEFzc29jaWF0ZWQge1xuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleS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gICAgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAg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xuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiB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WN0aW9uKHsgY2x1c3RlcjogQ29uc3RhbnRzLkNsdXN0ZXIucHJkTWV0YXBsZXggfSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYW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ICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG91dHB1dC5tYXAoKGRhdGEpID0+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBhZGRyZXNzOiBkYXRhLmFkZHJl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vcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgb3B0aW9uczogUGFydGlhbDxTdG9yYWdlT3B0aW9ucz4gPSB7fSxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoICYmICFmaWxlLnVyaSkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZmlsZTtcbiAgICAgICAgfSksXG4gIC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AgICBjYXNlIEZpbHRlclR5cGUuTWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIC8vIGZldGNoICB0cmFuc2ZlciB0cmFuc2FjdGlvbiBmb3IgcmVsYXRpb25hbCBtZW1vXG4gICAgICAgICAgICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi9ub2RlJztcbmltcG9ydCB7IE93bmVySW5mbywgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIFNvbE5hdGl2ZSB7XG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBvd25lciBhZGRyZXNzXG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgKiBAcmV0dXJuIFByb21pc2U8UmVzdWx0PE93bmVySW5mbywgRXJyb3I+PlxuICAgKi9cbiAgZXhwb3J0IGNvbnN0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wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogbXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCB3cmFwcGVkID0gYXdhaXQgY3JlYXRlV3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEFjY291bnQuS2V5cGFpcih7IHNlY3JldDogcGF5ZXIgfSkucHVia2V5LFxuICAgICAgICB0cnVlLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIG5ldyBBY2NvdW50LktleXBhaXIoeyBzZWNyZXQ6IHBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgdHJ1ZSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaWYgKHNvdXJjZVRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goc291cmNlVG9rZW4uaW5zdCk7XG4gICAgICB9XG4gICAgICBpZiAoZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goZGVzdFRva2VuLmluc3QpO1xuICAgICAgfVxuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxu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AiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVHJhbnNhY3Rpb25GaWx0ZXIiLCAiaW5zdHJ1Y3Rpb24iLCAiQ29udmVydGVyIiwgIlNvbE5hdGl2ZSIsICJpbXBvcnRfd2ViMyIsICJTb2xOYXRpdmUiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlNvbE5hdGl2ZSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJTb2xOYXRpdmUiLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIl0KfQo= \ No newline at end of file diff --git a/packages/suite-sol-native/dist/index.mjs b/packages/suite-sol-native/dist/index.mjs index 531a7f107..508785fc1 100644 --- a/packages/suite-sol-native/dist/index.mjs +++ b/packages/suite-sol-native/dist/index.mjs @@ -18,7 +18,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -54,7 +54,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -110,13 +111,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1869,4 +1870,4 @@ var SolNative5 = { export { SolNative5 as SolNative }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcHJpb3JpdHktZmVlLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbXB1dGUtdW5pdC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3JldHJ5LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvb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2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge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ICAgICAgSW5kZXg6ICR7aX0sIFNldCB2YWx1ZTogJHtKU09OLnN0cmluZ2lmeShpbnN0KX1gLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaSsrO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0Lmluc3RydWN0aW9ucyxcbiAgICAgICAgKTtcbiAgICAgICAgY29uc3Qgc2lnbmVycyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcCgoaW5zdCkgPT4gaW5zdC5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gY29tbW9uT3JNaW50SW5zdC5maWx0ZXIoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3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lY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICAgICAoYTogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzLCBiOiBSZWNlbnRQcmlvcml0aXphdGlvbk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uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAg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vbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXND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ICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoICYmICFmaWxlLnVyaSkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZmlsZTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5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gaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIC8vIGZldGNoICB0cmFuc2ZlciB0cmFuc2FjdGlvbiBmb3IgcmVsYXRpb25hbCBtZW1vXG4gICAgICAgICAgICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi9ub2RlJztcbmltcG9ydCB7IE93bmVySW5mbywgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIFNvbE5hdGl2ZSB7XG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBvd25lciBhZGRyZXNzXG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgKiBAcmV0dXJuIFByb21pc2U8UmVzdWx0PE93bmVySW5mbywgRXJyb3I+PlxuICAgKi9cbiAgZXhwb3J0IGNvbnN0IGZpbmRCeU93bmVyID0gYXN5bmMgKFxuICAgIG93bmVyOiBQdWJrZXksXG4gICk6IFByb21pc2U8UmVzdWx0PE93bmVySW5mbywgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBy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Db25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogbXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCB3cmFwcGVkID0gYXdhaXQgY3JlYXRlV3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEFjY291bnQuS2V5cGFpcih7IHNlY3JldDogcGF5ZXIgfSkucHVia2V5LFxuICAgICAgICB0cnVlLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIG5ldyBBY2NvdW50LktleXBhaXIoeyBzZWNyZXQ6IHBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgdHJ1ZSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaWYgKHNvdXJjZVRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goc291cmNlVG9rZW4uaW5zdCk7XG4gICAgICB9XG4gICAgICBpZiAoZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goZGVzdFRva2VuLmluc3QpO1xuICAgICAgfVxuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNsb3NlQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHdyYXBwZWQsXG4gICAgICAgICAgZGVzdC50b1B1YmxpY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N0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBzd2l0Y2hGaWxlYmFzZUNyZWRlbnRpYWwgPSAoXG4gICAgZW52OiBzdHJpbmcsXG4gICk6IHtcbiAgICBrZXk6IHN0cmluZztcbiAgICBzZWNyZXQ6IHN0cmluZztcbiAgICBidWNrZXQ6IHN0cmluZztcbiAgfSA9PiB7XG4gICAgc3dpdGNoIChlbnYpIHtcbiAgICAgIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLmtleSB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uuc2VjcmV0IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5GSUxFQkFTRV9DUkVERU5USUFMKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmtleSAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5zZWNyZXQgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEZpbGViYXNlQ3JlZGVudGlhbC5kZXY7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBsb2FkQ29uZmlnID0gYXN5bmMgKCkgPT4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FsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBrZXlwYWlyLnB1YmxpY0tleS50b1N0cmluZygpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhpcy5wdWJrZXkg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ICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29tcHV0ZUJ1ZGdldFByb2dyYW0sXG4gIEtleXBhaXIsXG4gIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyxcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgZGVidWdMb2cgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb3J0IHsgVHJhbnNhY3Rpb25CdWlsZGVyIGFzIENvbXB1dGVVbml0IH0gZnJvbSAnLi9jb21wdXRlLX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Xg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICAgICAoYTogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzLCBiOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMpID0+XG4gICAgICAgICAgYS5zbG90IC0gYi5zbG90LFxuICAgICAgKSBhcyBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXTtcblxuICAgICAgLy8gZ2V0IG1lZGlhbiBvZiBsYXN0IDIwIGZlZXNcbiAgICAgIGNvbnN0IHJlY2VudEZlZXMgPSBtYXhpbXVtRmVlcy5zbGljZShcbiAgICAgICAgTWF0aC5tYXgobWF4aW11bUZlZXMubGVuZ3RoIC0gMjAsIDApLFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1pZCA9IE1hdGguZmxvb3IocmVjZW50RmVlcy5sZW5ndGggLyAyKTtcbiAgICAgIGNvbnN0IG1lZGlhbkZlZSA9XG4gICAgICAgIHJlY2VudEZlZXMubGVuZ3RoICUgMiAhPT0gMFxuICAgICAgICAgID8gcmVjZW50RmVlc1ttaWRdLnByaW9yaXRpemF0aW9uRmVlXG4gICAgICAgICAgOiAocmVjZW50RmVlc1ttaWQgLSAxXS5wcmlvcml0aXphdGlvbkZlZSArXG4gICAgICAgICAgICAgIHJlY2VudEZlZXNbbWlkXS5wcmlvcml0aXphdGlvbkZlZSkgL1xuICAgICAgICAgICAgMjtcblxuICAgICAgZGVidWdMb2coJyMgbWVkaWFuIGZlZTogJywgbWVkaWFuRmVlKTtcblxuICAgICAgcmV0dXJuIE1hdGguY2VpbChtZWRpYW5GZWUpO1xuICAgIH07XG4gIH1cbn1c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odDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9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bnRVcmwucHJkKSB7XG4gICAgICAgICAgZGVidWdMb2coJyMgQ2hhbmdlIG1ldGFwbGV4IGNsdXN0ZXIgb24gbWFpbm5ldC1iZXRhJyk7XG4gICAgICAgICAgTm9kZS5jaGFuZ2VDb25uZWN0aW9uKHsgY2x1c3RlcjogQ29uc3RhbnRzLkNsdXN0ZXIucHJkTWV0YXBsZXggfSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHR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zYWN0aW9uLmZyb20oZGVjb2RlKTtcbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLnBhcnRpYWxTaWduKG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIGNvbnN0IHdpcmVUcmFuc2FjdGlvbiA9IHRyYW5zYWN0aW9uLnNlcmlhbGl6ZSgpO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5zZW5kUmF3VHJhbnNhY3Rpb24oXG4gICAgICAgICAgICB3aXJlVHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXRGb3JQYXJ0aWFsU2lnbihcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBQdWJsaWNLZXksIFRyYW5zYWN0aW9uIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuLy8gQGludGVybmFsXG5leHBv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HV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJu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FnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBvcHRpb25zOiBQYXJ0aWFsPFN0b3JhZ2VPcHRpb25zPixcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgb3B0aW9uczogUGFydGlhbDxTdG9yYWdlT3B0aW9ucz4gPSB7fSxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoICYmICFmaWxlLnVyaSkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ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y3Rpb24pID0+IHtcbiAgICAgICAgaWYgKGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pKSB7XG4gICAgICAgICAgc3dpdGNoIChmaWx0ZXJUeXBlKSB7XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIC8vIGZldGNoICB0cmFuc2ZlciB0cmFuc2FjdGlvbiBmb3IgcmVsYXRpb25hbCBtZW1vXG4gICAgICAgICAgICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi9ub2RlJztcbmltcG9ydCB7IE93bmVySW5mbywgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIFNvbE5hdGl2ZSB7XG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBvd25lciBhZGR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d25lcjogUHVia2V5LFxuICAgIGRlc3Q6IFB1YmtleSxcbiAgICBtdWx0aXNpZzogU2VjcmV0W10sXG4gICAgYW1vdW50OiBudW1iZXIsXG4gICAgb3B0aW9uczogUGFydGlhbDxUcmFuc2Zlck9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogbXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCB3cmFwcGVkID0gYXdhaXQgY3JlYXRlV3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEFjY291bnQuS2V5cGFpcih7IHNlY3JldDogcGF5ZXIgfSkucHVia2V5LFxuICAgICAgICB0cnVlLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIG5ldyBBY2NvdW50LktleXBhaXIoeyBzZWNyZXQ6IHBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgdHJ1ZSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaWYgKHNvdXJjZVRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goc291cmNlVG9rZW4uaW5zdCk7XG4gICAgICB9XG4gICAgICBpZiAoZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goZGVzdFRva2VuLmluc3QpO1xuICAgICAgfVxuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAg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mVydGVyIiwgIkNyZWF0b3JzIiwgIkNvbnZlcnRlciIsICJDb21wcmVzc2VkTmZ0TWV0YWRhdGEiLCAiQ29udmVydGVyIiwgIlJveWFsdHkiLCAiQ29udmVydGVyIiwgIk5mdCIsICJDb252ZXJ0ZXIiLCAiTWVtbyIsICJDb252ZXJ0ZXIiLCAiTWludCIsICJDb252ZXJ0ZXIiLCAiUmVndWxhck5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJQcm9wZXJ0aWVzIiwgIkNvbnZlcnRlciIsICJVc2VzIiwgIkNvbnZlcnRlciIsICJUb2tlbk1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlckNoZWNrZWQiLCAiQ29udmVydGVyIiwgIlRyYW5zZmVyIiwgIkNvbnZlcnRlciIsICJUcmFuc2FjdGlvbkZpbHRlciIsICJpbnN0cnVjdGlvbiIsICJDb252ZXJ0ZXIiLCAiU29sTmF0aXZlIiwgIlRyYW5zYWN0aW9uIiwgIlNvbE5hdGl2ZSIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU3lzdGVtUHJvZ3JhbSIsICJTb2xOYXRpdmUiLCAiU3lzdGVtUHJvZ3JhbSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU29sTmF0aXZlIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNvbE5hdGl2ZSJdCn0K \ No newline at end of file diff --git a/packages/suite-spl-token/dist/index.js b/packages/suite-spl-token/dist/index.js index e9c2bd7f9..61eb6527e 100644 --- a/packages/suite-spl-token/dist/index.js +++ b/packages/suite-spl-token/dist/index.js @@ -57,7 +57,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -93,7 +93,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -149,13 +150,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -2092,7 +2093,6 @@ var import_client_s3 = require("@aws-sdk/client-s3"); var import_pino = __toESM(require("pino")); var Filebase; ((Filebase2) => { - const BUCKET_NAME = "solana-suite"; const LOG_LEVEL = Constants.isDebugging == "true" || process.env.DEBUG === "true" ? "debug" : "warn"; const createGatewayUrl = (cid) => `${Constants.FILEBADE_GATEWAY_URL}/${cid}`; const connect = () => { @@ -2110,7 +2110,7 @@ var Filebase; debugLog("# fileName: ", fileName); debugLog("# file: ", file); const putCommand = new import_client_s3.PutObjectCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Key: fileName, Body: file }); @@ -2131,7 +2131,9 @@ var Filebase; }; Filebase2.remove = async () => { return Try(async () => { - const listCommand = new import_client_s3.ListObjectsV2Command({ Bucket: BUCKET_NAME }); + const listCommand = new import_client_s3.ListObjectsV2Command({ + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket + }); const lists = await connect().send(listCommand); debugLog("#lists: ", lists); if (!lists.Contents) { @@ -2141,7 +2143,7 @@ var Filebase; return { Key: list.Key?.toString() }; }); const command = new import_client_s3.DeleteObjectsCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Delete: { Objects: fileNames } @@ -2478,4 +2480,4 @@ var SplToken10 = { 0 && (module.exports = { SplToken }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9hZGQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9wZGEudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcHJpb3JpdHktZmVlLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbXB1dGUtdW5pdC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3JldHJ5LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uL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pbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICA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ICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaSsrO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0Lmluc3RydWN0aW9ucyxcbiAgICAgICAgKTtcbiAgICAgICAgY29uc3Qgc2lnbmVycyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcCgoaW5zdCkgPT4gaW5zdC5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gY29tbW9uT3JNaW50SW5zdC5maWx0ZXIoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUm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ICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICAgICAoYTogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzLCBiOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMpID0+XG4gICAgICAgICAgYS5zbG90IC0gYi5zbG90LFxuICAgICAgKSBhcyBSZWNlbnRQcmlvcml0a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VlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gIC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ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnk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ZU9wdGlvbnM+ID0ge30sXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCAmJiAhZmlsZS51cmkpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZpbGU7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgf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biAgICAgIGNvbnN0IGRhdGFzID0gaW5mby52YWx1ZS5tYXAoYXN5bmMgKGQpID0+IHtcbiAgICAgICAgY29uc3QgbWludCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLm1pbnQgYXMgUHVia2V5O1xuICAgICAgICBjb25zdCB0b2tlbkFtb3VudCA9IGQuYWNjb3VudC5kYXRhLnBhcnNlZC5pbmZvLnRva2VuQW1vdW50XG4gICAgICAgICAgLmFtb3VudCBhcyBzdHJpbmc7XG4gICAgICAgIGlmICh0b2tlbkFtb3VudCA9PT0gJzEnKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBNZXRhZGF0YS5mcm9tQWNjb3VudEFkZHJlc3MoXG4gICAgICAgICAgY29ubmVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgIC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G93bmVyUHVibGljS2V5LnRvU3RyaW5nKCksXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBmZWVQYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuXG4gICAgICBjb25zdCB0eCA9IG5ldyBUcmFuc2FjdGlvbih7XG4gICAgICAgIGxhc3RWYWxpZEJsb2NrSGVpZ2h0OiBibG9ja2hhc2hPYmoubGFzdFZhbGlkQmxvY2tIZWlnaHQsXG4gICAgICAgIGJsb2NraGFzaDogYmxvY2toYXNoT2JqLmJsb2NraGFzaCxcbiAgICAgICAgZmVlUGF5ZXI6IGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICB9KTtcblxuICAgICAgY29uc3QgaW5zdDIgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgQ2FsY3VsYXRvci5jYWxjdWxhdGVBbW91bnQoYW1vdW50LCBtaW50RGVjaW1hbCksXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCldLFxuICAgICAgKTtcblxuICAgICAgLy8gcmV0dXJuIGFzc29jaWF0ZWQgdG9rZW4gYWNjb3VudFxuICAgIC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5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVJbml0aWFsaXplTWludEluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIGZlZVBheWVyLFxuICAgICAgICB0b2tlbkFzc29jaWF0ZWQsXG4gICAgICAgIG93bmVyLFxuICAgICAgICBtaW50LFxuICAgICAgKSxcbiAgICApO1xuXG4gICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3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nRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZWV6ZUF1dGhvcml0eS50b1B1YmxpY0tleSgpLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLk1pbnQoXG4gICAgICAgIGluc3RzLFxuICAgICAgICBbb3duZXIudG9LZXlwYWlyKCksIG1pbnQudG9LZXlwYWlyKCldLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgbWludC5wdWJrZXksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBDb252ZXJ0ZXIgfSBmcm9tICd+L2NvbnZlcnRlcic7XG5pbXBvcnQgeyBEZXRhaWxzLCBMaW1pdCB9IGZyb20gJ34vdHlwZXMvdmFsaWRhdG9yJztcbmltcG9ydCB7IElucHV0TmZ0TWV0YWRhdGEgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcbmltcG9ydCB7IE9mZmNoYWluIH0gZnJvbSAnfi90eXBlcy9zdG9yYWdlJztcbmltcG9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+KFxuICAgIG1ldGFkYXRhOiBULFxuICApOiBSZXN1bHQ8c3RyaW5nLCBWYWxpZGF0b3JFcnJvcj4gPT4ge1xuICAgIHJldHVybiBUcnkoKCkgPT4ge1xuICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKG1ldGFkYXRhKTtcbiAgICAgIGNvbnN0IHJlc3VsdHM6IERldGFpbHNbXSA9IFtdO1xuICAgICAga2V5cy5tYXAoKGtleSkgPT4ge1xuICAgICAgICBsZXQgcmVzITogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+O1xuICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgIGNhc2UgJ2ltYWdlJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2Vs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leSxcbiAgICBkZXN0OiBQdWJrZXksXG4gICAgb3duZXJPck11bHRpc2lnOiBTZWNyZXRbXSxcbiAgICBhbW91bnQ6IG51bWJlcixcbiAgICBtaW50RGVjaW1hbDogbnVtYmVyLFxuICAgIG9wdGlvbnM6IFBhcnRpYWw8TWludE9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3QgcGF5ZXJQdWJrZXkgPSBuZXcgQWNjb3VudC5LZXlwYWlyKHsgc2VjcmV0OiBwYXllciB9KTtcbiAgICAgIGNvbnN0IGtleXBhaXJzID0gb3duZXJPck11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCBzb3VyY2VUb2tlbiA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgb3duZXIudG9TdHJpbmcoKSxcbiAgICAgICAgcGF5ZXJQdWJrZXkucHVia2V5LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBkZXN0LFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbnN0ID0gY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHNvdXJjZVRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLF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ZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJ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ICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgIF0sXG4gICAgICAgIFBST0dSQU1fSUQsXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldE1hc3RlckVkaXRpb24gPSAoYWRkcmVzczogUHVia2V5KTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtcbiAgICAgICAgICBCdWZmZXIuZnJvbSgnbWV0YWRhdGEnKSxcbiAgICAgICAgICBQUk9HUkFNX0lELnRvQnVmZmVyKCksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgQnVmZmVyLmZyb20oJ2VkaXRpb24nKSxcbiAgICAgICAgXSxcbiAgICAgICAgUFJPR1JBTV9JRCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gcHVibGljS2V5O1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgZ2V0VHJlZUF1dGhvcml0eSA9IChhZGRyZXNzOiBQdWJrZXkpOiBQdWJsaWNLZXkgPT4ge1xuICAgICAgY29uc3QgW3B1YmxpY0tleV0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW2FkZHJlc3MudG9QdWJsaWNLZXkoKS50b0J1ZmZlcigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGN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rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29tcHV0ZUJ1ZGdldFByb2dyYW0sXG4gIEtleXBhaXIsXG4gIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcy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aXRhYmxlQWNjb3VudHMgPSBbXG4gICAgICAgIC4uLm5ldyBTZXQod3JpdGFibGVBY2NvdW50cy5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9CYXNlNTgoKSkpLFxuICAgICAgXVxuICAgICAgICAubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvUHVibGljS2V5KCkpXG4gICAgICAgIC5zbGljZSgwLCBNQVhfUkVDRU5UX1BSSU9SSVRZX0ZFRV9BQ0NPVU5UUyk7XG5cbiAgICAgIGNvbnN0IHByaW9yaXR5RmVlcyA9XG4gICAgICAgIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyh7XG4gICAgICAgICAgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID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ICBjb25zdCB0cmFuc2FjdGlvbiA9IG5ldyBUcmFuc2FjdGlvbigpO1xuXG4gICAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLFxuICBzZW5kQW5kQ29uZmlybVR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IpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IHRoaXMuZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFt0aGlzLmZlZVBheWVyLCAuLi50aGlzLnNpZ25lcnNdO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKE5vZGUuZ2V0Q29ubmVjdGlvbigpLnJwY0VuZHBvaW50ID09PSBDb25zdGFudHMuRW5kUG9pbnRVcmwucHJkKSB7XG4gICAgICAgICAgZGVidWdMb2coJyMgQ2hhbmdlIG1ldGFwbGV4IGNsdXN0ZXIgb24gbWFpbm5ldC1iZXRhJyk7XG4gICAgICAgICAgTm9kZS5jaGFuZ2VDb25uZWN0aW9uKHsgY2x1c3RlcjogQ29uc3RhbnRzLkNsdXN0ZXIucHJkTWV0YXBsZXggfSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25hdHVyZSxcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgQ29uc3RhbnRzLCBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3Vpd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ICAgZXhwb3J0IGNvbnN0IGludG9JbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDb2xsZWN0aW9uPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBf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3YWl0IGNhbGxiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZpbGU7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgfTtcbiAgfVxufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZWQtdmFycyAqL1xuaW1wb3J0IHsgT3B0aW9uLCBVc2VzIH0gZnJvbSAnfi90eXBlcy9yZWd1bGFyLW5mdCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQ29udmVydGVyIHtcbiAgZXhwb3J0IG5hbWVzcGFjZSBVc2VzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXJTaWRlID0gKG91dHB1dDogT3B0aW9uPFVzZXM+KTogVXNlcyB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuICAgICAgcmV0dXJ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Ftb3VudDogc3RyaW5nLFxuICApOiBUb2tlbk1ldGFkYXRhID0+IHtcbiAgICByZXR1cm4gQ29udmVydGVyLlRva2VuTWV0YWRhdGEuaW50b1VzZXIoXG4gICAgICB7XG4gICAgICAgIG9uY2hhaW46IG1ldGFkYXRhLFxuICAgICAgICBvZmZjaGFpbjoganNvbixcbiAgICAgIH0sXG4gICAgICB0b2tlbkFtb3VudCxcbiAgICApO1xuICB9O1xuXG4gIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnkgKi9cbiAgY29uc3QgZmV0Y2hSZXRyeSA9IGFzeW5jICh1cmw6IHN0cmluZywgcmV0cmllcyA9IDApOiBQcm9taXNlPGFueT4gPT4ge1xuICAgIHRyeSB7XG4gICAgICBjb25zdCByZXNwb25zZSA9IGF3YWl0IGZldGNoKHVybCk7XG5cbiAgICAgIGlmICghcmVzcG9uc2Uub2spIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBIVFRQIGVycm9yISBTdGF0dXM6ICR7cmVzcG9uc2Uuc3RhdHVzfWApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gYXdhaXQgcmVzcG9uc2UuanNvbigpO1xuICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICBpZiAocmV0cmllcyA8IE1BWF9SRVRSSUVTKSB7XG4gICAgICAgIGRlYnVnTG9nKGBFcnJvciBmZXRjaGluZyBkYXRhIGZyb20gJHt1cmx9LCAke3JldHJpZXN9LCAke2Vycm9yfWApO1xuICAgICAgICBhd2FpdCBzbGVlcChSRVRSWV9ERUxBWSk7XG4gICAgICAgIHJldHVybiBmZXRjaFJldHJ5KHVybCwgcmV0cmllcyArIDEpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZGVidWdMb2coYE1heCByZXRyaWVzIHJlYWNoZWQgKCR7TUFYX1JFVFJJRVN9KWApO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICAvKipc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mVjdGlvbixcbiAgICAgICAgICBBY2NvdW50LlBkYS5nZXRNZXRhZGF0YShtaW50KSxcbiAgICAgICAgKVxuICAgICAgICAgIC50aGVuKGFzeW5jIChtZXRhZGF0YSkgPT4ge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueSAqL1xuICAgICAgICAgICAgcmV0dXJuIGZldGNoUmV0cnkobWV0YWRhdGEuZGF0YS51cmkpLnRoZW4oKGpzb246IGFueSkgPT4ge1xuICAgICAgICAgICAgICByZXR1cm4gY29udmVydGVyKG1ldGFkYXRhLCBqc29uLCB0b2tlbkFtb3VudCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5jYXRjaCgoZXJyKSA9PiBkZWJ1Z0xvZygnIyBbRmV0Y2ggZXJyb3JdJywgZXJyKSk7XG4gICAgICB9KTtcblxuICAgICAgY29uc3QgZmlsdGVycyA9IChhd2FpdCBQcm9taXNlLmFsbChkYXRhcykpLmZpbHRlcihcbiAgICAgICAgKGRhdGEpID0+IGRhdGEgIT09IHVuZGVmaW5lZCxcbiAgICAgICk7XG4gICAgICByZXR1cm4gZmlsdGVycyBhcyBUb2tlbk1ldGFkYXRhW107XG4gICAgfSk7XG4gIH07XG5cbiAgLyoqXG4gICAqIEZldGNoIG1pbnRlZCBtZXRhZGF0YSBieSBtaW50IGFkZHJlc3NcbiAgICpcbiAgICogQHBhcmFtIHtQdWJrZXl9IG1pbnRcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxVc2VyU2lkZU91dHB1dC5Ub2tlbk1ldGFkYXRhLCBFcnJvcj4+XG4gICAqL1xuICBleHBvcnQgY29uc3QgZmluZEJ5TWludCA9IGFzeW5jIChcbiAgICBtaW50OiBQdWJrZXksXG4gICk6IFByb21pc2U8UmVzdWx0PFRva2VuTWV0YWRhdGEsIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiB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ICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUNyZWF0ZU1ldGFkYXRhQWNjb3VudFYzSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHtcbiAgICAgICAgICBtZXRhZGF0YTogbWV0YWRhdGFQZGEsXG4gICAgICAgICAgbWludCxcbiAgICAgICAgICBtaW50QXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgICBwYXllcjogZmVlUGF5ZXIsXG4gICAgICAgICAgdXBkYXRlQXV0aG9yaXR5OiBvd25lcixcbiAgICAgICAgfSxcbiAgICAgICAge1xuICAgICAgICAgIGNyZWF0ZU1ldGFkYXRhQWNjb3VudEFyZ3NWMzoge1xuICAgICAgICAgICAgZGF0YTogdG9rZW5NZXRhZGF0YSxcbiAgICAgICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICAgICAgIGNvbGxlY3Rpb25EZXRhaWxzOiBudWxsLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICApLFxuICAgICk7XG4gICAgcmV0dXJuIGluc3RydWN0aW9ucztcbiAgfTtcblxuICAvKipcbiAgICogU1BMLVRPS0VOIG1pbnRcbiAgICpcbiAgICogQHBhcmFtIHtTZWNyZXR9IG93bmVyICAgICAgLy8gdG9rZW4gb3duZXIgU2VjcmV0XG4gICAqIEBwYXJhbSB7bnVtYmVyfSB0b3RhbEFtb3VudCAvLyB0b3RhbCBudW1iZXJcbiAgICogQHBhcmFtIHtudW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ycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAgIHVyaSA9IHVwbG9hZGVkLnZhbHVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgRXJyb3IoYE11c3Qgc2V0IGZpbGVQYXRoJyBvciAndXJpJ2ApO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBpc011dGFibGUgPSB0cnVlO1xuXG4gICAgICBjb25zdCBkYXRhdjIgPSBDb252ZXJ0ZXIuVG9rZW5NZXRhZGF0YS5pbnRvSW5mcmEoXG4gICAgICAgIGlucHV0LFxuICAgICAgICB1cmksXG4gICAgICAgIHNlbGxlckZlZUJhc2lzUG9pbnRzLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgZGF0YXYyOiAnLCBkYXRhdjIpO1xuICAgICAgZGVidWdMb2coJyMgdXBsb2FkIGNvbnRlbnQgdXJsOiAnLCB1cmkpO1xuXG4gICAgICBjb25zdCBtaW50ID0gQWNjb3VudC5LZXlwYWlyLmNyZWF0ZSgpO1xuICAgICAgY29uc3QgaW5zdHMgPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICB0b3RhbEFtb3VudCxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGRhdGF2MixcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCkucHVibGljS2V5LFxuICAgICAgICBpc011dGFibGUsXG4gICAgICApO1xuXG4gICAgICAvLyBmcmVlemVBdXRob3JpdHlcbiAgICAgIGlmIChmcmVlemVBdXRob3JpdHkpIHtcbiAgICAgICAgaW5zdHMucHVzaChcbiAgICAgICAgICBjcmVhdGVGcmVlemVBdXRob3JpdHkoXG4gICAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgICBvd25lclB1YmxpY0tleSxcbiAgICAgICAgICAgIGZyZ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YWRhdGEuaW1hZ2UpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNJbWFnZVVybChtZXRhZGF0YS5pbWFnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdyb3lhbHR5JzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEucm95YWx0eSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1JveWFsdHkobWV0YWRhdGEucm95YWx0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyRmVlQmFzaXNQb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSkge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlckZlZUJhc2lzUG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ25hbWUnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLm5hbWUpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNOYW1lKG1ldGFkYXRhLm5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc3ltYm9sJzpcbiAgICAgICAgICAgIG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Bvd25lck9yTXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBwYXllclB1YmtleSA9IG5ldyBBY2NvdW50LktleXBhaXIoeyBzZWNyZXQ6IHBheWVyIH0pO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICBtaW50LFxuICAgICAgICBvd25lci50b1N0cmluZygpLFxuICAgICAgICBwYXllclB1YmtleS5wdWJrZXksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBkZXN0VG9rZW4gPSBhd2FpdCBBY2NvdW50LkFzc29jaWF0ZWQubWFrZU9yQ3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIGRlc3QsXG4gICAgICAgIHBheWVyUHVia2V5LnB1YmtleSxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBDYWxjdWxhdG9yLmNhbGN1bGF0ZUFtb3VudChhbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gZGVzdFRva2VuLmluc3QgPyBbZGVzdFRva2VuLmluc3QsIGluc3RdIDogW2luc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IsICJtaW50IiwgIkFjY291bnQiLCAiU3RvcmFnZSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiU3BsVG9rZW4iLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3NwbF90b2tlbiIsICJTcGxUb2tlbiIsICJBY2NvdW50IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJTcGxUb2tlbiJdCn0K \ No newline at end of file diff --git a/packages/suite-spl-token/dist/index.mjs b/packages/suite-spl-token/dist/index.mjs index 77541cf2e..306e91c09 100644 --- a/packages/suite-spl-token/dist/index.mjs +++ b/packages/suite-spl-token/dist/index.mjs @@ -21,7 +21,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -57,7 +57,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -113,13 +114,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -2112,7 +2113,6 @@ import { import pino from "pino"; var Filebase; ((Filebase2) => { - const BUCKET_NAME = "solana-suite"; const LOG_LEVEL = Constants.isDebugging == "true" || process.env.DEBUG === "true" ? "debug" : "warn"; const createGatewayUrl = (cid) => `${Constants.FILEBADE_GATEWAY_URL}/${cid}`; const connect = () => { @@ -2130,7 +2130,7 @@ var Filebase; debugLog("# fileName: ", fileName); debugLog("# file: ", file); const putCommand = new PutObjectCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Key: fileName, Body: file }); @@ -2151,7 +2151,9 @@ var Filebase; }; Filebase2.remove = async () => { return Try(async () => { - const listCommand = new ListObjectsV2Command({ Bucket: BUCKET_NAME }); + const listCommand = new ListObjectsV2Command({ + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket + }); const lists = await connect().send(listCommand); debugLog("#lists: ", lists); if (!lists.Contents) { @@ -2161,7 +2163,7 @@ var Filebase; return { Key: list.Key?.toString() }; }); const command = new DeleteObjectsCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Delete: { Objects: fileNames } @@ -2500,4 +2502,4 @@ var SplToken10 = { export { SplToken10 as SplToken }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2FkZC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3Ny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V0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogb3duZXJPck11bHRpc2lnWzBdO1xuICAgICAgY29uc3Qga2V5cGFpcnMgPSBvd25lck9yTXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3QgYXNzb2NpYXRlZCA9IGF3YWl0IEFjY291bnQuQXNzb2NpYXRlZC5tYWtlT3JDcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgdG9rZW4sXG4gICAgICAgIG93bmVyLFxuICAgICAgICBwYXllcixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVNaW50VG9DaGVja2VkSW5zdHJ1Y3Rpb24oXG4gICAgICAgIHRva2VuLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFzc29jaWF0ZWQudG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIENhbGN1bGF0ZS5jYWxjdWxhdGVBbW91bnQodG90YWxBbW91bnQsIG1pbnREZWNpbWFsKSxcbiAgICAgICAgbWludERlY2ltYWwsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgKTtcblxuICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gYXNzb2NpYXRlZC5pbnN0ID8gW2Fzc29jaWF0ZWQuaW5zdCwgaW5zdF0gOiBbaW5zdF07XG5cbiAgICAgIHJldHVybiBuZXcgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbW1vbjxQdWJrZXk+KFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIGtleXBhaXJzLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgdG9rZW4sXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IEZp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XG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdicz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gZXhwb3J0IGNsYXNzIEJhdGNoIHtcbiAgICBzdWJtaXQgPSBhc3luYyAoXG4gICAgICBvcHRpb25zOiBQYXJ0aWFsPEJhdGNoU3VibWl0T3B0aW9ucz4gPSB7fSxcbiAgICApOiBQcm9taXNlPFJlc3VsdDxUcmFuc2FjdGlvblNpZ25hdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgICByZXR1cm4gVHJ5KGFzeW5jICgpID0+IHtcbiAgICAgICAgaWYgKCFvcHRpb25zLmluc3RydWN0aW9ucykge1xuICAgICAgICAgIHRocm93IEVycm9yKCdOb3QgZm91bmQgb3B0aW9ucy5pbnN0cnVjdGlvbnMnKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBjb21tb25Pck1pbnRJbnN0ID0gb3B0aW9ucy5pbnN0cnVjdGlvbnM7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBpbnN0IG9mIGNvbW1vbk9yTWludEluc3QpIHtcbiAgICAgICAgICBpZiAoIWluc3QuaW5zdHJ1Y3Rpb25zICYmICFpbnN0LnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGluc3QpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICApO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKChpbnN0KSA9PiB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G4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cg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IGluc3Qua2V5c1xuICAgICAgICAgICAgLmZpbHRlcigoYWNjb3VudCkgPT4gYWNjb3VudC5pc1dyaXRhYmxlKVxuICAgICAgICAgICAgLm1hcCgoa2V5KSA9PiBrZXkucHVia2V5KSxcbiAgICAgICAgKVxuICAgICAgICAuZmxhdCgpO1xuXG4gICAgICBjb25zdCB1bmlxV3JpdGFibGVBY2NvdW50cyA9IFtcbiAgICAgICAgLi4ubmV3IFNldCh3cml0YWJsZUFjY291bnRzLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b0Jhc2U1OCgpKSksXG4gICAgICBdXG4gICAgICAgIC5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9QdWJsaWNLZXkoKSlcbiAgICAgICAgLnNsaWNlKDAsIE1BWF9SRUNFTlRfUFJJT1JJVFlfRkVFX0FDQ09VTlRTKTtcblxuICAgICAgY29uc3QgcHJpb3JpdHlGZWVzID1cbiAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0UmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKHtcbiAgICAgICAgICBsb2NrZWRXcml0YWJsZUFjY291bnRzOiB1bmlxV3JpdGFibGVBY2NvdW50cyxcbiAgICAgICAgfSk7XG5cbiAgICAgIGlmIChwcmlvcml0eUZlZXMubGVuZ3RoIDwgMSkge1xuICAgICAgICBkZWJ1Z0xvZygnIyBnZXQgcmVjZW50IHByaW9yaXR5IGZlZXM6ICcsIHByaW9yaXR5RmVlcyk7XG4gICAgICAgIHJldHVybiAwO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBncm91cEJ5U2xvdCA9IHByaW9yaXR5RmVlcy5yZWR1Y2UoXG4gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGF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FNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICA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AgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgI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KSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoICYmICFmaWxlLnVyaSkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZmlsZTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgf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yAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnIpID0+IGRlYnVnTG9nKCcjIFtGZXRjaCBlcnJvcl0nLCBlcnIpKTtcbiAgICAgIH0pO1xuXG4gICAgICBjb25zdCBmaWx0ZXJzID0gKGF3YWl0IFByb21pc2UuYWxsKGRhdGFzKSkuZmlsdGVyKFxuICAgICAgICAoZGF0YSkgPT4gZGF0YSAhPT0gdW5kZWZpbmVkLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBmaWx0ZXJzIGFzIFRva2VuTWV0YWR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gICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcbiAgICAgICAgICB1cGRhdGVBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgY3JlYXRlTWV0YWRhdGFBY2NvdW50QXJnc1YzOiB7XG4gICAgICAgICAgICB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dFRva2VuTWV0YWRhdGE+KGlucHV0KTtcbiAgICAgIGlmICh2YWxpZC5pc0Vycikge1xuICAgICAgICB0aHJvdyB2YWxpZC5lcnJvcjtcbiAgICAgIH1cblxuICAgICAgY29uc3QgeyBmZWVQYXllciwgZnJlZXplQXV0aG9yaXR5IH0gPSBvcHRpb25zO1xuICAgICAgY29uc3Qgc3RvcmFnZVR5cGUgPSBpbnB1dC5zdG9yYWdlVHlwZSB8fCBERUZBVUxUX1NUT1JBR0VfVFlQRTtcbiAgICAgIGNvbnN0IHBheWVyID0gZmVlUGF5ZXIgPyBmZWVQYXllciA6IG93bmVyO1xuICAgICAgaW5wdXQucm95YWx0eSA9IDA7XG4gICAgICBjb25zdCBzZWxsZXJGZWVCYXNpc1BvaW50cyA9IDA7XG4gICAgICBjb25zdCBvd25lclB1YmxpY0tleSA9IG93bmVyLnRvS2V5cGFpcigpLnB1YmxpY0tleTtcblxuICAgICAgY29uc3Qgc3RvcmFnZU1ldGFkYXRhID0gU3RvcmFnZS50b0NvbnZlcnRPZmZjaGFpbmRhdGEoXG4gICAgICAgIGlucHV0IGFzIElucHV0TmZ0TWV0YWRhdGEsXG4gICAgICAgIGlucHV0LnJveWFsdHksXG4gICAgICApO1xuXG4gICAgICBsZXQgdXJpITogc3RyaW5nO1xuICAgICAgLy8gdXBsb2FkIGZpbGVcbiAgICAgIGlmIChpbnB1dC5maWxlUGF0aCkge1xuICAgICAgICBjb25zdCB1cGxvYWRlZCA9IGF3YWl0IFN0b3JhZ2UudXBsb2FkKFxuICAgICAgICAgIHN0b3JhZ2VNZXRhZGF0YSxcbiAgICAgICAgICBpbnB1dC5maWxlUGF0aCxcbiAgICAgICAgICBzdG9yYWdlVHlwZSxcbiAgICAgICAgICB7IGZlZVBheWVyOiBwYXllciB9LFxuICAgICAgICApO1xuXG4gICAgICAgIGlmICh1cGxvYWRlZC5pc0Vycikge1xuICAgICAgICAgIHRocm93IHVwbG9hZGVkO1xuICAgICAgICB9XG4gICAgICAg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saWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IENvbnZlcnRlciB9IGZyb20gJ34vY29udmVydGVyJztcbmltcG9ydCB7IERldGFpbHMsIExpbWl0IH0gZnJvbSAnfi90eXBlcy92YWxpZGF0b3InO1xuaW1wb3J0IHsgSW5wdXROZnRNZXRhZGF0YSB9IGZyb20gJ34vdHlwZXMvcmVndWxhci1uZnQnO1xuaW1wb3J0IHsgT2ZmY2hhaW4gfSBmcm9tICd+L3R5cGVzL3N0b3JhZ2UnO1xuaW1wb3J0IHsgRGF0YVYyIH0gZnJvbS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dzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFcnJvcihtZXNzYWdlLCByZXN1bHRzKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBNZXNzYWdlLlNVQ0NFU1M7XG4gICAgfSk7XG4gIH07XG5cbiAgdHlwZSBQaWNrTmZ0U3RvcmFnZS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0FwaVVybC5sZW5ndGg7XG4gICAgICByZXR1cm4gY3VzdG9tRGFzQXBpVXJsW2luZGV4XTtcbiAgICB9XG5cbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgaWYgKGN1c3RvbURhc0FwaVVybC5sZW5ndGggPCAxKSB7XG4gICAgICAgICAgY29uc29sZS53YXJuKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuREFTX0FQSV9VUkwpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLnByZC5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBjb25zdCB1cmxzID0gQ29uc3RhbnRzLkRhc0FwaVVybC5kZXYuc3BsaXQoJywnKTtcbiAgICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgdXJscy5sZW5ndGg7XG4gICAgICAgIHJldHVybiB1cmxzW2luZGV4XTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaEZpbGViYXNlQ3JlZGVudGlhbCA9IChcbiAgICBlbnY6IHN0cmluZyxcbiAgKToge1xuICAgIGtleTogc3RyaW5nO1xuICAgIHNlY3JldDogc3RyaW5nO1xuICAgIGJ1Y2tldDogc3RyaW5nO1xuICB9ID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uua2V5IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5zZWNyZXQgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcihDb25zdGFudHMuV2Fybm5pbmdNZXNzYWdlLkZJTEVCQVNFX0NSRURFTlRJQUwpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uua2V5ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLnNlY3JldCAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gRmlsZWJhc2VDcmVkZW50aWFsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IGxvYWRDb25maWcgPSBhc3luYyAoKSA9PiB7XG4gICAgY29uc3QgeyBkZWZhdWx0OiBsb2FkZWRDb25maWcgfSA9IGF3YWl0IGltcG9ydChcbiAgICAgICdAc29sYW5hLXN1aXRlL2NvbmZpZy9sb2FkJyxcbiAgICAgIHtcbiAgICAgICAgd2l0aDogeyB0eXBlOiAnanNvbicgfSxcbiAgICAgIH1cbiAgICApO1xuICAgIENvbmZpZyA9IGxvYWRlZENvbmZpZztcbiAgICBjb25zb2xlLmxvZygnIyMjIyMjIyMjIyMjIyMnLCBDb25maWcpO1xuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBXUkFQUEVEX1RPS0VOX1BST0dSQU1fSUQgPSBuZXcgUHVibGljS2V5KFxuICAgICdTbzExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEyJyxcbiAgKTtcbiAgZXhwb3J0IGNvbnN0IE1FTU9fUFJPR1JBTV9JRCA9IG5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KTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCw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jdGlvbihcbiAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zY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bXSxcbiAgICApOiBQcm9taXNlPG51bWJlcj4gPT4ge1xuICAgICAgY29uc3Qgd3JpdGFibGVBY2NvdW50cyA9IGluc3RydWN0aW9uc1xuICAgICAgICAubWFwKChpbnN0KSA9PlxuICAgICAgICAgIGluc3Qua2V5c1xuICAgICAgICAgICAgLmZpbHRlcigoYWNjb3VudCkgPT4gYWNjb3VudC5pc1dyaXRhYmxlKVxuICAgICAgICAgICAgLm1hcCgoa2V5KSA9PiBrZXkucHVia2V5KSxcbiAgICAgICAgKVxuICAgICAgICAuZmxhdCgpO1xuXG4gICAgICBjb25zdCB1bmlxV3JpdGFibGVBY2NvdW50cyA9IFtcbiAgICAgICAgLi4ubmV3IFNldCh3cml0YWJsZUFjY291bnRzLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b0Jhc2U1OCgpKSksXG4gICAgICBdXG4gICAgICAgIC5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9QdWJsaWNLZXkoKSlcbiAgICAgICAgLnNsaWNlKDAsIE1BWF9SRUNFTlRfUFJJT1JJVFlfRkVFX0FDQ09VTlRTKTtcblxuICAgICAgY29uc3QgcHJpb3JpdHlGZWVzID1cbiAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0UmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKHtcbiAgICAgICAgICBsb2NrZWRXcml0YWJsZUFjY291bnRzOiB1bmlxV3JpdGFibGVBY2NvdW50cyxcbiAgICAgICAgfSk7XG5cbiAgICAgIGlmIChwcmlvcml0eUZlZXMubGVuZ3RoIDwgMSkge1xuICAgICAgICBkZWJ1Z0xvZygnIyBnZXQgcmVjZW50IHByaW9yaXR5IGZlZXM6ICcsIHByaW9yaXR5RmVlcyk7XG4gICAgICAgIHJldHVybiAwO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBncm91cEJ5U2xvdCA9IHByaW9yaXR5RmVlcy5yZWR1Y2UoXG4gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGFjY1trZXldLnB1c2goZmVlKTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXT4sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtYXhGZWVCeVNsb3QgPSBPYmplY3Qua2V5cyhncm91cEJ5U2xvdCkucmVkdWNlKFxuICAgICAgICAoYWNjLCBzbG90KSA9PiB7XG4gICAgICAgICAgYWNjW3Nsb3RdID0gZ3JvdXBCeVNsb3Rbc2xvdF0ucmVkdWNlKChtYXgsIGZlZSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIGZlZS5wcmlvcml0aXphdGlvbkZlZSA+IG1heC5wcmlvcml0aXphdGlvbkZlZSA/IGZlZSA6IG1heDtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXM+LFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1heGltdW1GZWVzID0gT2JqZWN0LnZhbHVlcyhtYXhGZWVCeVNsb3QpLnNvcnQoXG4gICAgICAgIChhOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMsIGI6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcykgPT5cbiAgICAgICAgICBhLnNsb3QgLSBiLnNsb3QsXG4gICAgICApIGFzIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdO1xuXG4gICAgICAvLyBnZXQgbWVkaWFuIG9mIGxhc3QgMjAgZmVlc1xuICAgICAgY29uc3QgcmVjZW50RmV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UHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb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gICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICA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Agb3B0aW9uczogUGFydGlhbDxTdG9yYWdlT3B0aW9ucz4gPSB7fSxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoICYmICFmaWxlLnVyaSkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZmlsZTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUH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gICB7XG4gICAgICAgICAgcHJvZ3JhbUlkOiBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICB9LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgZGF0YXMgPSBpbmZvLnZhbHVlLm1hcChhc3luYyAoZCkgPT4ge1xuICAgICAgICBjb25zdCBtaW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8ubWludCBhcyBQdWJrZXk7XG4gICAgICAgIGNvbnN0IHRva2VuQW1vdW50ID0gZC5hY2NvdW50LmRhdGEucGFyc2VkLmluZm8udG9rZW5BbW91bnRcbiAgICAgICAgICAuYW1vdW50IGFzIHN0cmluZztcbiAgICAgICAgaWYgKHRva2VuQW1vdW50ID09PSAnMScpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIE1ldGFkYXRhLmZyb21BY2NvdW50QWRkcmVzcyhcbiAgICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICAgIEFjY291bnQuUGRhLmdldE1ldGFkYXRhKG1pbnQpLFxuICAgICAgICApXG4gICAgICAgICAgLnRoZW4oYXN5bmMgKG1ldGFkYXRhKSA9PiB7XG4gICAgICAgICAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55ICovXG4gICAgICAgICAgICByZXR1cm4gZmV0Y2hSZXRyeShtZXRhZGF0YS5kYXRhLnVyaSkudGhlbigoanNvbjogYW55KSA9PiB7XG4gICAgICAgICAgICAgIHJldHVybiBjb252ZXJ0ZXIobWV0YWRhdGEsIGpzb24sIHRva2VuQW1vdW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pXG4gICAgICAgICAgLmNhdGNoKChlcnIpID0+IGRlYnVnTG9nKCcjIFtGZXRjaCBlcnJvcl0nLCBlcnIpKTtcbiAgICAgIH0pO1xuXG4gICAgICBjb25zdCBmaWx0ZXJzID0gKGF3YWl0IFByb21pc2Uu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gICBsYW1wb3J0czogbGFtcG9ydHMsXG4gICAgICAgIHByb2dyYW1JZDogVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUluaXRpYWxpemVNaW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgIG1pbnQsXG4gICAgICAgIG1pbnREZWNpbWFsLFxuICAgICAgICBvd25lcixcbiAgICAgICAgb3duZXIsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgZmVlUGF5ZXIsXG4gICAgICAgIHRva2VuQXNzb2NpYXRlZCxcbiAgICAgICAgb3duZXIsXG4gICAgICAgIG1pbnQsXG4gICAgICApLFxuICAgICk7XG5cbiAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgIGNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbihcbiAgICAgICAgbWludCxcbiAgICAgICAgdG9rZW5Bc3NvY2lhdGVkLFxuICAgICAgICBvd25lcixcbiAgICAgICAgQ2FsY3VsYXRlLmNhbGN1bGF0ZUFtb3VudCh0b3RhbEFtb3VudCwgbWludERlY2ltYWwpLFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICksXG4gICAgKTtcblxuICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgY3JlYXRlQ3JlYXRlTWV0YWRhdGFBY2NvdW50VjNJbnN0cnVjdGlvbihcbiAgICAgICAge1xuICAgICAgICAgIG1ldGFkYXRhOiBtZXRhZGF0YVBkYSxcbiAgICAgICAgICBtaW50LFxuICAgICAgICAgIG1pbnRBdXRob3JpdHk6IG93bmVyLFxuICAgICAgICAgIHBheWVyOiBmZWVQYXllcixcb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W50LktleXBhaXIuY3JlYXRlKCk7XG4gICAgICBjb25zdCBpbnN0cyA9IGF3YWl0IGNyZWF0ZU1pbnQoXG4gICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXJQdWJsaWNLZXksXG4gICAgICAgIHRvdGFsQW1vdW50LFxuICAgICAgICBtaW50RGVjaW1hbCxcbiAgICAgICAgZGF0YXYyLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKS5wdWJsaWNLZXksXG4gICAgICAgIGlzTXV0YWJsZSxcbiAgICAgICk7XG5cbiAgICAgIC8vIGZyZWV6ZUF1dGhvcml0eVxuICAgICAgaWYgKGZyZWV6ZUF1dGhvcml0eSkge1xuICAgICAgICBpbnN0cy5wdXNoKFxuICAgICAgICAgIGNyZWF0ZUZyZWV6ZUF1dGhvcml0eShcbiAgICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICAgIG93bmVyUHVibGljS2V5LFxuICAgICAgICAgICAgZnJlZXplQXV0aG9yaXR5LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuTWludChcbiAgICAgICAgaW5zdHMsXG4gICAgICAgIFtvd25lci50b0tleXBhaXIoKSwgbWludC50b0tleXBhaXIoKV0sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBtaW50LnB1YmtleSxcbiAgICAgICk7XG4gICAgfSk7XG4gIH07XG59XG4iLCAiaW1wb3J0IHsgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IENvbnZlcnRlciB9IGZyb20gJ34vY29udmVydGVyJztcbmltcG9ydCB7IERldGFpbHMsIExpbWl0IH0gZnJvbSAnfi90eXBlcy92YWxpZGF0b3InO1xuaW1wb3J0IHsgSW5wdXROZnRNZXRhZGF0Y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aXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJlcyAmJiByZXMuaXNFcnIpIHtcbiAgICAgICAgICByZXN1bHRzLnB1c2goLi4ucmVzLmVycm9yLmRldGFpbHMpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIGlmIChyZXN1bHRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9XG4gICAgICAgICAgJ0NhdWdodCBpbiB0aGUgdmFsaWRhdGlvbiBlcnJvcnMuIHNlZSBpbmZvcm1hdGlvbiBlLmc6IGVycjxWYWxpZGF0b3JFcnJvcj4uZGV0YWlscyc7XG4gICAgICAgIHRocm93IG5ldyBWYWxpZGF0b3JFc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IsICJTdG9yYWdlIiwgIlN0b3JhZ2UiLCAiU3BsVG9rZW4iLCAibWludCIsICJBY2NvdW50IiwgImdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jIiwgIlRPS0VOX1BST0dSQU1fSUQiLCAiY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uIiwgImNyZWF0ZU1pbnRUb0NoZWNrZWRJbnN0cnVjdGlvbiIsICJTdG9yYWdlIiwgIkNvbnZlcnRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiZ2V0QXNzb2NpYXRlZFRva2VuQWRkcmVzc1N5bmMiLCAiU3BsVG9rZW4iLCAiQWNjb3VudCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiY3JlYXRlVHJhbnNmZXJDaGVja2VkSW5zdHJ1Y3Rpb24iLCAiU3BsVG9rZW4iLCAiQWNjb3VudCIsICJjcmVhdGVUcmFuc2ZlckNoZWNrZWRJbnN0cnVjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiU3BsVG9rZW4iXQp9Cg== \ No newline at end of file diff --git a/packages/suite-storage/dist/index.d.mts b/packages/suite-storage/dist/index.d.mts index 2128e6511..559318721 100644 --- a/packages/suite-storage/dist/index.d.mts +++ b/packages/suite-storage/dist/index.d.mts @@ -316,9 +316,9 @@ type InputNftMetadata = { /** @namespace */ declare const Storage: { toConvertOffchaindata: (input: InputNftMetadata, sellerFeeBasisPoints: number) => Offchain; - uploadFile: (filePath: FileType, storageType: string, options?: Partial) => Promise>; - uploadData: (input: Offchain, storageType: string, options?: Partial) => Promise>; - upload: (input: Offchain, filePath: FileType, storageType: string, options?: Partial) => Promise>; + uploadFile: (filePath: FileType, storageType: StorageType, options?: Partial) => Promise>; + uploadData: (input: Offchain, storageType: StorageType, options?: Partial) => Promise>; + upload: (input: Offchain, filePath: FileType, storageType: StorageType, options?: Partial) => Promise>; }; export { Storage }; diff --git a/packages/suite-storage/dist/index.d.ts b/packages/suite-storage/dist/index.d.ts index 2128e6511..559318721 100644 --- a/packages/suite-storage/dist/index.d.ts +++ b/packages/suite-storage/dist/index.d.ts @@ -316,9 +316,9 @@ type InputNftMetadata = { /** @namespace */ declare const Storage: { toConvertOffchaindata: (input: InputNftMetadata, sellerFeeBasisPoints: number) => Offchain; - uploadFile: (filePath: FileType, storageType: string, options?: Partial) => Promise>; - uploadData: (input: Offchain, storageType: string, options?: Partial) => Promise>; - upload: (input: Offchain, filePath: FileType, storageType: string, options?: Partial) => Promise>; + uploadFile: (filePath: FileType, storageType: StorageType, options?: Partial) => Promise>; + uploadData: (input: Offchain, storageType: StorageType, options?: Partial) => Promise>; + upload: (input: Offchain, filePath: FileType, storageType: StorageType, options?: Partial) => Promise>; }; export { Storage }; diff --git a/packages/suite-storage/dist/index.js b/packages/suite-storage/dist/index.js index 9e4d8dc88..b2ddc2212 100644 --- a/packages/suite-storage/dist/index.js +++ b/packages/suite-storage/dist/index.js @@ -54,7 +54,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -90,7 +90,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -146,13 +147,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1260,7 +1261,6 @@ var import_client_s3 = require("@aws-sdk/client-s3"); var import_pino = __toESM(require("pino")); var Filebase; ((Filebase2) => { - const BUCKET_NAME = "solana-suite"; const LOG_LEVEL = Constants.isDebugging == "true" || process.env.DEBUG === "true" ? "debug" : "warn"; const createGatewayUrl = (cid) => `${Constants.FILEBADE_GATEWAY_URL}/${cid}`; const connect = () => { @@ -1278,7 +1278,7 @@ var Filebase; debugLog("# fileName: ", fileName); debugLog("# file: ", file); const putCommand = new import_client_s3.PutObjectCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Key: fileName, Body: file }); @@ -1299,7 +1299,9 @@ var Filebase; }; Filebase2.remove = async () => { return Try(async () => { - const listCommand = new import_client_s3.ListObjectsV2Command({ Bucket: BUCKET_NAME }); + const listCommand = new import_client_s3.ListObjectsV2Command({ + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket + }); const lists = await connect().send(listCommand); debugLog("#lists: ", lists); if (!lists.Contents) { @@ -1309,7 +1311,7 @@ var Filebase; return { Key: list.Key?.toString() }; }); const command = new import_client_s3.DeleteObjectsCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Delete: { Objects: fileNames } @@ -1419,4 +1421,4 @@ var Storage2 = { 0 && (module.exports = { Storage }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2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dWJrZXksXG4gICAgICBmZWVQYXllcj86IFB1YmtleSxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20gJ2JzNTgnO1xuXG5leHBvcnQgbmFtZX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AgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICA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FibGUpXG4gICAgICAgICAgICAubWFwKChrZXkpID0+IGtleS5wdWJrZXkpLFxuICAgICAgICApXG4gICAgICAgIC5mbGF0KCk7XG5cbiAgICAgIGNvbnN0IHVuaXFXcml0YWJsZUFjY291bnRzID0gW1xuICAgICAgICAuLi5uZXcgU2V0KHdyaXRhYmxlQWNjb3VudHMubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvQmFzZTU4KCkpKSxcbiAgICAgIF1cbiAgICAgICAgLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b1B1YmxpY0tleSgpKVxuICAgICAgICAuc2xpY2UoMCwgTUFYX1JFQ0VOVF9QUklPUklUWV9GRUVfQUNDT1VOVFMpO1xuXG4gICAgICBjb25zdCBwcmlvcml0eUZlZXMgPVxuICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZUJ5U2xvdCkuc29ydChcbiAgICAgICAgKGE6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcywgYjogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKSA9PlxuICAgICAgICAgIGEuc2xvdCAtIGIuc2xvdCxcbiAgICAgICkgYXMgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW107XG5cbiAgICAgIC8vIGdldCBtZWRpYW4gb2YgbGFzdCAyMCBmZWVzXG4gICAgICBjb25zdCByZWNlbnRGZWVzID0gbWF4aW11bUZlZXMuc2xpY2UoXG4gICAgICAgIE1hdGgubWF4KG1heGltdW1GZWVzLmxlbmd0aCAtIDIwLCAwKSxcbiAgICAgICk7XG4gICAgICBjb25zdCBtaWQgPSBNYXRoLmZsb29yKHJlY2VudEZlZXMubGVuZ3RoIC8gMik7XG4gICAgICBjb25zdCBtZWRpYW5GZWUgPVxuICAgICAgICByZWN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fVxuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7X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XdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4g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oY3VzdG9tRGFzQXBpVXJsLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgICBjb25zb2xlLndhcm4oQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5EQVNfQVBJX1VSTCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAg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B1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcj86IFB1YmtleSxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20gJ2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ICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiA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W50KSA9PiBhY2NvdW50LmlzV3JpdGFibGUpXG4gICAgICAgICAgICAubWFwKChrZXkpID0+IGtleS5wdWJrZXkpLFxuICAgICAgICApXG4gICAgICAgIC5mbGF0KCk7XG5cbiAgICAgIGNvbnN0IHVuaXFXcml0YWJsZUFjY291bnRzID0gW1xuICAgICAgICAuLi5uZXcgU2V0KHdyaXRhYmxlQWNjb3VudHMubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvQmFzZTU4KCkpKSxcbiAgICAgIF1cbiAgICAgICAgLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b1B1YmxpY0tleSgpKVxuICAgICAgICAuc2xpY2UoMCwgTUFYX1JFQ0VOVF9QUklPUklUWV9GRUVfQUNDT1VOVFMpO1xuXG4gICAgICBjb25zdCBwcmlvcml0eUZlZXMgPVxuICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybi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XG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4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zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbi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50IiwgIlBkYSIsICJNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQiLCAiQk4iLCAiQWNjb3VudCIsICJpbXBvcnRfYnM1OCIsICJBY2NvdW50IiwgImJzIiwgImltcG9ydF93ZWIzIiwgImltcG9ydF93ZWIzIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJDb21wdXRlVW5pdCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUHJpb3JpdHlGZWUiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJldHJ5IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJSZXN1bHQiLCAiUHJvdmVuYW5jZUxheWVyIiwgInVwbG9hZEZpbGUiLCAiSXJ5cyIsICJBcndlYXZlIiwgIkZpbGViYXNlIiwgInBpbm8iLCAiU3RvcmFnZSIsICJTdG9yYWdlIl0KfQo= \ No newline at end of file diff --git a/packages/suite-storage/dist/index.mjs b/packages/suite-storage/dist/index.mjs index efe27b422..09aea40d8 100644 --- a/packages/suite-storage/dist/index.mjs +++ b/packages/suite-storage/dist/index.mjs @@ -18,7 +18,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -54,7 +54,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -110,13 +111,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1257,7 +1258,6 @@ import { import pino from "pino"; var Filebase; ((Filebase2) => { - const BUCKET_NAME = "solana-suite"; const LOG_LEVEL = Constants.isDebugging == "true" || process.env.DEBUG === "true" ? "debug" : "warn"; const createGatewayUrl = (cid) => `${Constants.FILEBADE_GATEWAY_URL}/${cid}`; const connect = () => { @@ -1275,7 +1275,7 @@ var Filebase; debugLog("# fileName: ", fileName); debugLog("# file: ", file); const putCommand = new PutObjectCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Key: fileName, Body: file }); @@ -1296,7 +1296,9 @@ var Filebase; }; Filebase2.remove = async () => { return Try(async () => { - const listCommand = new ListObjectsV2Command({ Bucket: BUCKET_NAME }); + const listCommand = new ListObjectsV2Command({ + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket + }); const lists = await connect().send(listCommand); debugLog("#lists: ", lists); if (!lists.Contents) { @@ -1306,7 +1308,7 @@ var Filebase; return { Key: list.Key?.toString() }; }); const command = new DeleteObjectsCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Delete: { Objects: fileNames } @@ -1415,4 +1417,4 @@ var Storage2 = { export { Storage2 as Storage }; -//# sourceMapping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gICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5h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bnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc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uICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZUJ5U2xvdCkuc29ydChcbiAgICAgICAgKGE6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcywgYjogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKSA9PlxuICAgICAgICAgIGEuc2xvdCAtIGIuc2xvdCxcbiAgICAgICkgYXMgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW107XG5cbiAgICAgIC8vIGdldCBtZWRpYW4gb2YgbGFzdCAyMCBmZWVzXG4gICAgICBjb25zdCByZWNlbnRGZWVzID0gbWF4aW11bUZlZXMuc2xpY2UoXG4gICAgICAgIE1hdGgubWF4KG1heGltdW1GZWVzLmxlbmd0aCAtIDIw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ICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuIC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pbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvb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gICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5rZXkgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uuc2VjcmV0ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBGaWxlYmFzZUNyZWRlbnRpYWwuZGV2O1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3QgbG9hZENvbmZpZyA9IGFzeW5jICgpID0+IHt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hbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZW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ydWN0aW9ucztcbiAgICAgICAgbGV0IGkgPSAwO1xuICAgICAgICBmb3IgKGNvbnN0IGluc3Qgb2YgY29tbW9uT3JNaW50SW5zdCkge1xuICAgICAgICAgIGlmICghaW5zdC5pbnN0cnVjdGlvbnMgJiYgIWluc3Quc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoaW5zdCl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcChcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoKGluc3QpID0+IGluc3Quc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGNvbW1vbk9yTWludEluc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0LmZlZVBheWVyICE9PSB1bmRlZmluZWQsXG4gICAgICAgICk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQ2FsY3VsYXRlVHhzaXplLmlzTWF4VHJhbnNhY3Rpb25TaXplKHRyYW5zYWN0aW9uLCBmZWVQYXllci5wdWJsaWNLZXkpO1xuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENv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UUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5cbmltcG9ydCB7IENvbnN0YW50cywgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb3J0IHsgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7XG4gIFBhcnRpYWxTaWduU3RydWN0dXJlLFxuICBTdWJtaXRPcHRpb25zLFxufSBmcm9tICd+L3R5cGVzL3RyYW5zYWN0aW9uLWJ1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age/src/filebase.ts b/packages/suite-storage/src/filebase.ts index d559a2569..3f214135d 100644 --- a/packages/suite-storage/src/filebase.ts +++ b/packages/suite-storage/src/filebase.ts @@ -13,7 +13,6 @@ import type { HttpResponse } from '@smithy/protocol-http'; // @internal export namespace Filebase { - const BUCKET_NAME = 'solana-suite'; const LOG_LEVEL = Constants.isDebugging == 'true' || process.env.DEBUG === 'true' ? 'debug' @@ -38,7 +37,7 @@ export namespace Filebase { debugLog('# file: ', file); const putCommand = new PutObjectCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Key: fileName, Body: file, }); @@ -67,7 +66,9 @@ export namespace Filebase { */ export const remove = async (): Promise> => { return Try(async () => { - const listCommand = new ListObjectsV2Command({ Bucket: BUCKET_NAME }); + const listCommand = new ListObjectsV2Command({ + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, + }); const lists = await connect().send(listCommand); debugLog('#lists: ', lists); @@ -81,7 +82,7 @@ export namespace Filebase { }); const command = new DeleteObjectsCommand({ - Bucket: BUCKET_NAME, + Bucket: Constants.FILEBASE_ACCESS_KEYS.bucket, Delete: { Objects: fileNames, }, diff --git a/packages/suite-storage/test/filebase.test.ts b/packages/suite-storage/test/filebase.test.ts index f38d9c21c..af7f44978 100644 --- a/packages/suite-storage/test/filebase.test.ts +++ b/packages/suite-storage/test/filebase.test.ts @@ -1,6 +1,8 @@ import test from 'ava'; import { RandomAsset } from 'test-tools/setupAsset'; import { Filebase } from '../src/filebase'; +import { Constants } from '~/suite-utils'; +import { execSync } from 'child_process'; test('Upload file', async (t) => { const asset = RandomAsset.get(); @@ -47,3 +49,22 @@ test('Remove objects in buckets', async (t) => { }, ); }); + +test('Upload file with custom parameter', async (t) => { + execSync( + 'pnpm solana-suite-config -f 9CA51CEFF9FF98CB91CF CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo firedancer', + ); + const asset = RandomAsset.get(); + const res = await Filebase.uploadFile(asset.filePath!); + + res.match( + (ok) => { + t.pass(); + t.log(`# filebase ipfs url: ${ok}`); + }, + (err) => { + console.error(err); + t.fail(err.message); + }, + ); +}); diff --git a/packages/suite-utils/dist/index.d.mts b/packages/suite-utils/dist/index.d.mts index 62292d2ee..e750725e5 100644 --- a/packages/suite-utils/dist/index.d.mts +++ b/packages/suite-utils/dist/index.d.mts @@ -120,12 +120,13 @@ declare let Config: { filebase: { key: string; secret: string; + bucket: string; }; }; declare namespace Constants { namespace WarnningMessage { const FILEBASE_CREDENTIAL = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update Filebase credential(accessKey and secret) define parameter in solana-suite.json.\n Can get credential from https://filebase.com/\n --------------------------------------\n "; - const DAS_API_URL = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update dasApiUrl define parameter in solana-suite.json.\n can get api url from https://www.helius.dev/\n -------------------------------------- \n "; + const DAS_API_URL = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update dasApiUrl define parameter in solana-suite.json.\n can get api url from https://www.helius.dev/\n --------------------------------------\n "; } } declare namespace Constants { @@ -157,6 +158,7 @@ declare namespace Constants { dev: { key: string; secret: string; + bucket: string; }; }; const switchCluster: (param: { @@ -168,6 +170,7 @@ declare namespace Constants { const switchFilebaseCredential: (env: string) => { key: string; secret: string; + bucket: string; }; const loadConfig: () => Promise; const WRAPPED_TOKEN_PROGRAM_ID: PublicKey; @@ -182,6 +185,7 @@ declare namespace Constants { const FILEBASE_ACCESS_KEYS: { key: string; secret: string; + bucket: string; }; const DAS_API_URL: string; const EXPLORER_SOLSCAN_URL = "https://solscan.io"; diff --git a/packages/suite-utils/dist/index.d.ts b/packages/suite-utils/dist/index.d.ts index 62292d2ee..e750725e5 100644 --- a/packages/suite-utils/dist/index.d.ts +++ b/packages/suite-utils/dist/index.d.ts @@ -120,12 +120,13 @@ declare let Config: { filebase: { key: string; secret: string; + bucket: string; }; }; declare namespace Constants { namespace WarnningMessage { const FILEBASE_CREDENTIAL = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update Filebase credential(accessKey and secret) define parameter in solana-suite.json.\n Can get credential from https://filebase.com/\n --------------------------------------\n "; - const DAS_API_URL = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update dasApiUrl define parameter in solana-suite.json.\n can get api url from https://www.helius.dev/\n -------------------------------------- \n "; + const DAS_API_URL = "\n [YOU HAVE TO DO]\n --------------------------------------\n You need to update dasApiUrl define parameter in solana-suite.json.\n can get api url from https://www.helius.dev/\n --------------------------------------\n "; } } declare namespace Constants { @@ -157,6 +158,7 @@ declare namespace Constants { dev: { key: string; secret: string; + bucket: string; }; }; const switchCluster: (param: { @@ -168,6 +170,7 @@ declare namespace Constants { const switchFilebaseCredential: (env: string) => { key: string; secret: string; + bucket: string; }; const loadConfig: () => Promise; const WRAPPED_TOKEN_PROGRAM_ID: PublicKey; @@ -182,6 +185,7 @@ declare namespace Constants { const FILEBASE_ACCESS_KEYS: { key: string; secret: string; + bucket: string; }; const DAS_API_URL: string; const EXPLORER_SOLSCAN_URL = "https://solscan.io"; diff --git a/packages/suite-utils/dist/index.js b/packages/suite-utils/dist/index.js index 8210bbb54..6d49866ea 100644 --- a/packages/suite-utils/dist/index.js +++ b/packages/suite-utils/dist/index.js @@ -71,7 +71,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -107,7 +107,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -163,13 +164,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1769,4 +1770,4 @@ var ValidatorError = class extends Error { sleep, unixTimestamp }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2V4cG9ydHMudHMiLCAiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3R5cGVzL3NyYy9nbG9iYWwvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcHJpb3JpdHktZmVlLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbXB1dGUtdW5pdC50cyIsICIuLi9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3JldHJ5LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jYWxjdWxhdGUtdHhzaXplLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2luZGV4L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ICAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgICBhd2FpdCBQcmlvcml0eUZlZS5Qcmlvcml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1d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GFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb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pcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5k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RlcjogQ29uc3RhbnRzLkNsdXN0ZXIucHJkTWV0YXBsZXggfSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgIC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udChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVyb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IGNvbnN0IGludG9JbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDb2xsZWN0aW9uPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiA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xiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZpbGU7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgfTtcbiAgfVxufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZWQtdmFycyAqL1xuaW1wb3J0IHsgT3B0aW9uLCBVc2VzIH0gZnJvbSAnfi90eXBlcy9yZWd1bGFyLW5mdCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQ29udmVydGVyIHtcbiAgZXhwb3J0IG5hbWVzcGFjZSBVc2VzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXJTaWRlID0gKG91dHB1dDogT3B0aW9uPFVzZXM+KTogVXNlcyB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuICAgICAgcmV0dXJuIG91dHB1dDt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sdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzeW1ib2wnOlxuICAgICAgICAgICAgaWYgKG1ldGFkYXRhLnN5bWJvbCkge1xuICAgICAgICAgICAgICByZXMgPSBpc1N5bWJvbChtZXRhZGF0YS5zeW1ib2wpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAg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gICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IHN3aXRjaEZpbGViYXNlQ3JlZGVudGlhbCA9IChcbiAgICBlbnY6IHN0cmluZyxcbiAgKToge1xuICAgIGtleTogc3RyaW5nO1xuICAgIHNlY3JldDogc3RyaW5nO1xuICAgIGJ1Y2tldDogc3RyaW5nO1xuICB9ID0+IHtcbiAgICBzd2l0Y2ggKGVudikge1xuICAgICAgY2FzZSBDb25zdGFudHMuQ2x1c3Rlci5wcmQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uua2V5IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5zZWNyZXQgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcihDb25zdGFudHMuV2Fybm5pbmdNZXNzYWdlLkZJTEVCQVNFX0NSRURFTlRJQUwpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uua2V5ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLnNlY3JldCAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gRmlsZWJhc2VDcmVkZW50aWFsLmRldjtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IGxvYWRDb25maWcgPSBhc3luYyAoKSA9PiB7XG4gICAgY29uc3QgeyBkZWZhdWx0OiBsb2FkZWRDb25maWcgfSA9IGF3YWl0IGltcG9ydChcbiAgICAgICdAc29sYW5hL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gICAgICAgICBpZiAoIWluc3QuaW5zdHJ1Y3Rpb25zICYmICFpbnN0LnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGluc3QpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICApO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKChpbnN0KSA9PiBpbnN0LnNpZ25lcnMpO1xuICAgICAgICBjb25zdCBmZWVQYXllcnMgPSBjb21tb25Pck1pbnRJbnN0LmZpbHRlcihcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5mZWVQYXllciAhPT0gdW5kZWZpbmVkLFxuICAgICAgICApO1xuICAgICAgICBsZXQgZmVlUGF5ZXIgPSBzaWduZXJzWzBdO1xuICAgICAgICBpZiAoZmVlUGF5ZXJzLmxlbmd0aCA+IDAgJiYgZmVlUGF5ZXJzWzBdLmZlZVBheWVyKSB7XG4gICAgICAgICAgZmVlUGF5ZXIgPSBmZWVQYXllcnNbMF0uZmVlUGF5ZXI7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IG5ldyBUcmFuc2FjdGlvbigpO1xuICAgICAgICBsZXQgZmluYWxTaWduZXJzID0gc2lnbmVycztcbiAgICAgICAgaWYgKGZlZVBheWVyKSB7XG4gICAgICAgICAgdHJhbnNhY3Rpb24uZmVlUGF5ZXIgPSBmZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW2ZlZVBheWVyLCAuLi5zaWduZXJzXTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIENhbGN1bGF0ZVR4c2l6ZS5pc01heFRyYW5zYWN0aW9uU2l6ZSh0cmFuc2FjdGlvbiwgZmVlUGF5ZXIucHVibGljS2V5KTtcblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgICBhd2FpdCBQcmlvcml0eUZlZS5Qcmlvcml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZX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RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICAgICAoYTogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzLCBiOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMpID0+XG4gICAgICAgICAgYS5zbG90IC0gYi5zbG90LFxuICAgICAgKSBhcyBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXTtcblxuICAgICAgLy8gZ2V0IG1lZGlhbiBvZiBsYXN0IDIwIGZlZXNcbiAgICAgIGNvbnN0IHJlY2VudEZlZXMgPSBtYXhpbXVtRmVlcy5zbGljZShcbiAgICAgICAgTWF0aC5tYXgobWF4aW11bUZlZXMubGVuZ3RoIC0gMjAsIDApLFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1pZCA9IE1hdGguZmxvb3IocmVjZW50RmVlcy5sZW5ndGggLyAyKTtcbiAgICAgIGNvbnN0IG1lZGlhbkZlZSA9XG4gICAgICAgIHJlY2VudEZlZXMubGVuZ3RoICUgMiAhPT0gMFxuICAgICAgICAgID8gcmVjZW50RmVlc1ttaWRdLnByaW9yaXRpemF0aW9uRmVlXG4gICAgICAgICAgOiAocmVjZW50RmVlc1ttaWQgLSAxXS5wcmlvcml0aXphdGlvbkZlZSArXG4gICAgICAgICAgICAgIHJlY2VudEZlZXNbbWlkXS5wcmlvcml0aXphdGlvbkZlZSkgL1xuICAgICAgICAgICAgMj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igpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLFxuICBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20gJ0Bzb2xhbmE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czogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25hdHVyZSxcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgQ29uc3RhbnRzLCBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBQdWJrZXkgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IHtcb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G5cbiAgICAgICAgY29uc3QgZGVjb2RlID0gQnVmZmVyLmZyb20odGhpcy5oZXhJbnN0cnVjdGlvbiwgJ2hleCcpO1xuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IFRyYW5zYWN0aW9uLmZyb20oZGVjb2RlKTtcbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLnBhcnRpYWxTaWduKG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIGNvbnN0IHdpcmVUcmFuc2FjdGlvbiA9IHRyYW5zYWN0aW9uLnNlcmlhbGl6ZSgpO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5zZW5kUmF3VHJhbnNhY3Rpb24oXG4gICAgICAgICAgICB3aXJlVHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXRGb3JQYXJ0aWFsU2lnbihcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1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ICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICApO1xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRvU3RyaW5nKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLnB1YmtleSA9IHBhcmFtcy5wdWJrZXk7X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GNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCAmJiAhZmlsZS51cmkpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZpbGU7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgfTtcbiAgfVxufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZWQtdmFycyAqL1xuaW1wb3J0IHsgT3B0aW9uLCBVc2VzIH0gZnJvbSAnfi90eXBlcy9yZWd1bGFyLW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BWYWxpZGF0b3JFcnJvcj47XG4gICAgICAgIHN3aXRjaCAoa2V5KSB7XG4gICAgICAgICAgY2FzZSAnaW1hZ2UnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge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b3VudCIsICJQZGEiLCAiTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lEIiwgIkJOIiwgIkFjY291bnQiLCAiQ29udmVydGVyIiwgIkNvbGxlY3Rpb24iLCAiQ29sbGVjdGlvbk1pbnQiLCAiQ29udmVydGVyIiwgIkNyZWF0b3JzIiwgImltcG9ydF9tcGxfYnViYmxlZ3VtX2luc3RydWN0aW9ucyIsICJDb252ZXJ0ZXIiLCAiQ29tcHJlc3NlZE5mdE1ldGFkYXRhIiwgIkNvbnZlcnRlciIsICJSb3lhbHR5IiwgIkNvbnZlcnRlciIsICJOZnQiLCAiQ29udmVydGVyIiwgIk1lbW8iLCAiQ29udmVydGVyIiwgIk1pbnQiLCAiQ29udmVydGVyIiwgIlJlZ3VsYXJOZnRNZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiUHJvcGVydGllcyIsICJDb252ZXJ0ZXIiLCAiVXNlcyIsICJDb252ZXJ0ZXIiLCAiVG9rZW5NZXRhZGF0YSIsICJDb252ZXJ0ZXIiLCAiVHJhbnNmZXJDaGVja2VkIiwgIkNvbnZlcnRlciIsICJUcmFuc2ZlciIsICJDb252ZXJ0ZXIiLCAiVmFsaWRhdG9yIiwgIk1lc3NhZ2UiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/suite-utils/dist/index.mjs b/packages/suite-utils/dist/index.mjs index 6867f35ec..1fd994865 100644 --- a/packages/suite-utils/dist/index.mjs +++ b/packages/suite-utils/dist/index.mjs @@ -18,7 +18,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -54,7 +54,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -110,13 +111,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1746,4 +1747,4 @@ export { sleep, unixTimestamp }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3R5cGVzL3NyYy9nbG9iYWwvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvYmF0Y2gudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcHJpb3JpdHktZmVlLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbXB1dGUtdW5pdC50cyIsICIuLi9zcmMvc2hhcmVkLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3JldHJ5LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2NvbW1vbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9taW50LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1id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luc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0LmZlZVBheWVyICE9PSB1bmRlZmluZWQsXG4gICAgICAgICk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQ2FsY3VsYXRlVHhzaXplLmlzTWF4VHJhbnNhY3Rpb25TaXplKHRyYW5zYWN0aW9uLCBmZWVQYXllci5wdWJsaWNLZXkpO1xuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IENvbnN0YW50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pb25bXSxcbiAgICApOiBQcm9taXNlPG51bWJlcj4gPT4ge1xuICAgICAgY29uc3Qgd3JpdGFibGVBY2NvdW50cyA9IGluc3RydWN0aW9uc1xuICAgICAgICAubWFwKChpbnN0KSA9PlxuICAgICAgICAgIGluc3Qua2V5c1xuICAgICAgICAgICAgLmZpbHRlcigoYWNjb3VudCkgPT4gYWNjb3VudC5pc1dyaXRhYmxlKVxuICAgICAgICAgICAgLm1hcCgoa2V5KSA9PiBrZXkucHVia2V5KSxcbiAgICAgICAgKVxuICAgICAgICAuZmxhdCgpO1xuXG4gICAgICBjb25zdCB1bmlxV3JpdGFibGVBY2NvdW50cyA9IFtcbiAgICAgICAgLi4ubmV3IFNldCh3cml0YWJsZUFjY291bnRzLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b0Jhc2U1OCgpKSksXG4gICAgICBdXG4gICAgICAgIC5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9QdWJsaWNLZXkoKSlcbiAgICAgICAgLnNsaWNlKDAsIE1BWF9SRUNFTlRfUFJJT1JJVFlfRkVFX0FDQ09VTlRTKTtcblxuICAgICAgY29uc3QgcHJpb3JpdHlGZWVzID1cbiAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0UmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKHtcbiAgICAgICAgICBsb2NrZWRXcml0YWJsZUFjY291bnRzOiB1bmlxV3JpdGFibGVBY2NvdW50cyxcbiAgICAgICAgfSk7XG5cbiAgICAgIGlmIChwcmlvcml0eUZlZXMubGVuZ3RoIDwgMSkge1xuICAgICAgICBkZWJ1Z0xvZygnIyBnZXQgcmVjZW50IHByaW9yaXR5IGZlZXM6ICcsIHByaW9yaXR5RmVlcyk7XG4gICAgICAgIHJldHVybiAwO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBncm91cEJ5U2xvdCA9IHByaW9yaXR5RmVlcy5yZWR1Y2UoXG4gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGFjY1trZXldLnB1c2goZmVlKTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXT4sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtYXhGZWVCeVNsb3QgPSBPYmplY3Qua2V5cyhncm91cEJ5U2xvdCkucmVkdWNlKFxuICAgICAgICAoYWNjLCBzbG90KSA9PiB7XG4gICAgICAgICAgYWNjW3Nsb3RdID0gZ3JvdXBCeVNsb3Rbc2xvdF0ucmVkdWNlKChtYXgsIGZlZSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIGZlZS5wcmlvcml0aXphdGlvbkZlZSA+IG1heC5wcmlvcml0aXphdGlvbkZlZSA/IGZlZSA6IG1heDtcbiAgICAgICAgICB9KTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXM+LFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1heGltdW1GZWVzID0gT2JqZWN0LnZhbHVlcyhtYXhGZWVCeVNsb3QpLnNvcnQoXG4gICAgICAgIChhOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMsIGI6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcykgPT5cbiAgICAgICAgICBhLnNsb3QgLSBiLnNsb3QsXG4gICAgICApIGFzIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdO1xuXG4gICAgICAvLyBnZXQgbWVkaWFuIG9mIGxhc3QgMjAgZmVlc1xuICAgICAgY29uc3QgcmVjZW50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XQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZX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uICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICA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gICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmF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xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzICYmIHJlcy5pc0Vycikge1xuICAgICAgICAgIHJlc3VsdHMucHVzaCguLi5yZXMuZXJyb3IuZGV0YWlscyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgaWY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Aga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5rZXkgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uuc2VjcmV0ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBGaWxlYmFzZUNyZWRlbnRpYWwuZGV2O1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3QgbG9hZENvbmZpZyA9IGFzeW5jICgpID0+IHtcbiAgICBjb25zdCB7IGRlZmF1bHQ6IGxvYWRlZENvbmZpZyB9ID0gYXdhaXQgaW1wb3J0KFxuICAgICAgJ0Bzb2xhbmEtc3VpdGUvY29uZmlnL2xvYWQnLFxuICAgICAge1xuICAgICAgICB3aXRoOiB7IHR5cGU6ICdqc29uJyB9LFxuICAgICAgfVxuICAgICk7XG4gICAgQ29uZmlnID0gbG9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aXplLmlzTWF4VHJhbnNhY3Rpb25TaXplKHRyYW5zYWN0aW9uLCBmZWVQYXllci5wdWJsaWNLZXkpO1xuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAg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gcHJpb3JpdHlGZWVzID1cbiAgICAgICAgYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0UmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKHtcbiAgICAgICAgICBsb2NrZWRXcml0YWJsZUFjY291bnRzOiB1bmlxV3JpdGFibGVBY2NvdW50cyxcbiAgICAgICAgfSk7XG5cbiAgICAgIGlmIChwcmlvcml0eUZlZXMubGVuZ3RoIDwgMSkge1xuICAgICAgICBkZWJ1Z0xvZygnIyBnZXQgcmVjZW50IHByaW9yaXR5IGZlZXM6ICcsIHByaW9yaXR5RmVlcyk7XG4gICAgICAgIHJldHVybiAwO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBncm91cEJ5U2xvdCA9IHByaW9yaXR5RmVlcy5yZWR1Y2UoXG4gICAgICAgIChhY2MsIGZlZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IGtleSA9IGZlZS5zbG90O1xuICAgICAgICAgIGlmICghYWNjW2tleV0pIHtcbiAgICAgICAgICAgIGFjY1trZXldID0gW107XG4gICAgICAgICAgfVxuICAgICAgICAgIGFjY1trZXldLnB1c2goZmVlKTtcbiAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICB9LFxuICAgICAgICB7fSBhcyBSZWNvcmQ8c3RyaW5nLCBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXT4sXG4gICAgICApO1xuXG4gICAgICBjb25zdCBtYXhGZWVCeVNsb3QgPSBPYmplY3Qua2V5cyhncm91cEJ5U2xvdCkucmVkdWNlKFxuICAgICAgICAoYWNjLCBzbG90KSA9PiB7XG4gICAgICAgICAgYWNjW3Nsb3RdID0gZ3JvdXBCeVNsb3Rbc2xvdF0ucmVkdWNlKChtYXgsIGZlZSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIGZlZS5wcmlvcml0aXphdGlvbkZlZSA+IG1heC5wcmlvcml0aXphdGlvbkZlZSA/IGZlZSA6IG1heDtcbiAgICAgICAgICB9KTtcbiA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b25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIEtleXBhaXIsXG4gIHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24sXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbkluc3RydWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ25hdHVyZSxcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgQ29uc3RhbnRzLCBkZWJ1Z0xvZywgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IE5vZ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rpb24uZnJvbShkZWNvZGUpO1xuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgdHJhbnNhY3Rpb24ucGFydGlhbFNpZ24ob3B0aW9ucy5mZWVQYXllci50b0tleXBhaXIoKSk7XG4gICAgICAgICAgY29uc3Qgd2lyZVRyYW5zYWN0aW9uID0gdHJhbnNhY3Rpb24uc2VyaWFsaXplKCk7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLnNlbmRSYXdUcmFuc2FjdGlvbihcbiAgICAgICAgICAgIHdpcmVUcmFuc2FjdGlvbixcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdEZvclBhcnRpYWxTaWduKFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgb3B0aW9ucy5mZWVQYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IFB1YmxpY0tleSwgVHJhbnNhY3Rpb24gfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuXG4vLyBAaW50ZXJuYWxcbmV4cG9ydCBu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ST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwY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xuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoICYmICFmaWxlLnVyaSkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZmlsZTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0Jztcblx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ioa2V5LCBNZXNzYWdlLlNNQUxMX05VTUJFUiwgcm95YWx0eSwge1xuICAgICAgICAgIHRocmVzaG9sZDogUk9ZQUxUWV9NSU4sXG4gICAgICAgICAgY29uZGl0aW9uOiAndW5kZXJNaW4nLFxuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSBpZiAocm95YWx0eSA+IFJPWUFMVFlfTUFYKSB7XG4gICAgICAgIHRocm93IGNyZWF0ZUVycm9yKGtleSwgTWVzc2FnZS5CSUdfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01BWCxcbiAgICAgICAgICBjb25kaXRpb246ICdvdmVyTWF4JyxcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gTWVzc2FnZS5TVUNDRVNTO1xuICAgIH0pO1xuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBpc1NlbGxlckZlZUJhc2lzUG9pbnRzID0gKFxuICAgIHJveWFsdHk6IG51bWJlcixcbiAgKTogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGtleSA9ICdzZWxsZXJGZWVCYXNpc1BvaW50cy9zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc7XG4gICAgICBpZiAocm95YWx0eSAhPT0gMCAmJiAhcm95YWx0eSkge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuRU1QVFksIHJveWFsdHkpO1xuICAgICAgfVxuICAgICAgaWYgKHJveWFsdHkgPCBST1lBTFRZX01JTikge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuU01BTExfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01JTixcbiAgICAgICAgICBjb25kaXRpb246ICd1bmRlck1pbicsXG4gICAgICAg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GV0IHJlcyE6IFJlc3VsdDxzdHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIG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iQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/suite-utils/src/constants.ts b/packages/suite-utils/src/constants.ts index b394b2315..05781172d 100644 --- a/packages/suite-utils/src/constants.ts +++ b/packages/suite-utils/src/constants.ts @@ -17,7 +17,7 @@ export namespace Constants { -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; } } @@ -56,6 +56,7 @@ export namespace Constants { dev: { key: '9CA51CEFF9FF98CB91CF', secret: 'CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo', + bucket: 'solana-suite', }, }; @@ -125,16 +126,25 @@ export namespace Constants { ): { key: string; secret: string; + bucket: string; } => { switch (env) { case Constants.Cluster.prd: { - if (!Config.filebase.key || !Config.filebase.secret) { + if ( + !Config.filebase.key || + !Config.filebase.secret || + !Config.filebase.bucket + ) { throw Error(Constants.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if ( + Config.filebase.key && + Config.filebase.secret && + Config.filebase.bucket + ) { return Config.filebase; } return FilebaseCredential.dev; diff --git a/packages/test-tools/dist/index.js b/packages/test-tools/dist/index.js index 2dbcff06a..259ae29cb 100644 --- a/packages/test-tools/dist/index.js +++ b/packages/test-tools/dist/index.js @@ -58,7 +58,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -94,7 +94,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -150,13 +151,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1896,4 +1897,4 @@ var requestSol = async (pubkey, sol = 0.1) => { 0 && (module.exports = { requestSol }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9yZXF1ZXN0LXNvbC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9iYXRjaC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wcmlvcml0eS1mZWUudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tcHV0ZS11bml0LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvcmV0cnkudHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY29tbW9uLnRzIiwgIi4uL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U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20gJ2JzNTgnO1xuXG5leHBvcnQgbmFtZXNwYWNlIEFjY291bnQge1xuICBleHBvcnQgY2xhc3MgS2V5cGFpciB7XG4gICAgc2VjcmV0OiBTZWNyZXQ7XG4gICAgcHVia2V5OiBQdWJrZ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mVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+ID0+IHtcbiAgICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgICBpZiAoIW9wdGlvbnMuaW5zdHJ1Y3Rpb25zKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ05vdCBmb3VuZCBvcHRpb25zLmluc3RydWN0aW9ucycpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGNvbW1vbk9yTWludEluc3QgPSBvcHRpb25zLmluc3RydWN0aW9ucztcbiAgICAgICAgbGV0IGkgPSAwO1xuICAgICAgICBmb3IgKGNvbnN0IGluc3Qgb2YgY29tbW9uT3JNaW50SW5zdCkge1xuICAgICAgICAgIGlmICghaW5zdC5pbnN0cnVjdGlvbnMgJiYgIWluc3Quc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoaW5zdCl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcChcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoKGluc3QpID0+IGluc3Quc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGNvbW1vbk9yTWludEluc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0LmZlZVBheWVyICE9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mNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbXB1dGVCdWRnZXRQcm9ncmFtLFxuICBLZXlwYWlyLFxuICBSZWNlbnRQcmlvcml0a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nN0IHVuaXFXcml0YWJsZUFjY291bnRzID0gW1xuICAgICAgICAuLi5uZXcgU2V0KHdyaXRhYmxlQWNjb3VudHMubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvQmFzZTU4KCkpKSxcbiAgICAgIF1cbiAgICAgICAgLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b1B1YmxpY0tleSgpKVxuICAgICAgICAuc2xpY2UoMCwgTUFYX1JFQ0VOVF9QUklPUklUWV9GRUVfQUNDT1VOVFMpO1xuXG4gICAgICBjb25zdCBwcmlvcml0eUZlZXMgPVxuICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZUJ5U2xvdCkuc29ydChcbiAgICAgICAgKGE6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcywgYjogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKSA9PlxuICAgICAgICAgIGEuc2xvdCAtIGIuc2xvdCxcbiAgICAgICkgYXMgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW107XG5cbiAgICAgIC8vIGdldCBtZWRpYW4gb2YgbGFzdCAyMCBmZWVzXG4gICAgICBjb25zdCByZWNlbnRGZWVzID0gbWF4aW11bUZlZXMuc2xpY2UoXG4gICAgICAgIE1hdGgubWF4KG1heGltdW1GZWVzLmxlbmd0aCAtIDIwLCAwKSxcbiAgICAgICk7XG4gICAgICBjb25zdCBtaWQgPSBNYXRoLmZsb29yKHJlY2VudEZlZXMubGVuZ3RoIC8gMik7XG4gICAgICBjb25zdCBtZWRpYW5GZWUgPVxuICAgICAgICByZWNlbnRGZWVzLmxlbmd0aCAlIDIgIT09IDBcbiAgICAgICAgICA/IHJlY2VudEZlZXNbbWlkXS5wcmlvcml0aXphdGlvbkZlZVxuICAgICAgICAg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ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQge1xuICBDb25maXJtT3B0aW9ucyxcbiAgS2V5cGFpcix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9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20gJ0Bzb2xhbmEvd2Vi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xDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3JvdXBfdmFsdWUgOiAnJztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBDcmVhdG9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cbiAgICAgIGlmICghdHhNZXRhIHx8ICF0eE1ldGEudHJhbnNhY3Rpb24pIHtcbiAgICAgICAgcmV0dXJuIGhpc3Rvcnk7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IHBvc3RUb2tlbkFjY291bnQgPSBjcmVhdGVQb3N0VG9rZW5BY2NvdW50TGlzdCh0eE1ldGEpO1xuICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgIGlmIChpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSkge1xuICAgICAgICAgIHN3aXRjaCAoZmlsdGVyVHlwZSkge1xuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIGhpc3Rvcnk7XG4gICAgfTtcbn1cbiIsICJpbXBvcnQgeyBQYXJzZWRBY2NvdW50RGF0YSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBSZXN1bHQsIFRyeSB9IGZyb20gJ34vc3VpdGUtdXRpbHMnO1xuaW1wb3J0IHsgTm9kZSB9IGZyb20gJ34vbm9kZSc7XG5pbXBvcnQgeyBPd25lckluZm8sIFB1YmtleSB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgeyBUcmFuc2FjdGlvbkZpbHRlciB9IGZyb20gJ34vdHJhbnNhY3Rpb24tZmlsdGVyJztcblxuZXhwb3J0IG5hbWVzcGFjZSBTb2xOYXRpdmUge1xuICAvKipcbiAgICogRmluZCBuZnQgYnkgb3duZXIgYWRkcmVzc1xuICAgKlxuICAgKiBAcGFyYW0ge1B1YmtleX0gb3duZXJcbiAgICogQHJldHVybiBQcm9taXNlPFJlc3VsdDxPd25lckluZm8sIEVycm9yPj5cbiAgICovXG4gIGV4cG9ydCBjb25zdCBmaW5kQnlPd25lciA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICApOiBQcm9taXNlPFJlc3VsdDxPd25lckluZm8sIEVycm9yPj4gPT4ge1xuICAgIHJldHVybiBUcnkoYXN5bmMgKCkgPT4ge1xuICAgICAgY29uc3QgcmVzID0gYXdhaXQgTm9kZS5nZXRDb25uZWN0aW9uKCkuZ2V0UGFyc2VkQWNjb3VudEluZm8oXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICApO1xuXG4gICAgICBjb25zdCBpbmZvID0ge1xuICAgICAgICBzb2w6IDAsXG4gICAgICAgIGxhbXBvcnRzOiAwLFxuICAgICAgICBvd25lcjogb3duZXIudG9TdHJpbmcoKSxcbiAgICAgIH07XG5cbiAgICAgIGlmIChUcmFuc2FjdGlvbkZpbHRlci5pc1BhcnNlZEluc3RydWN0aW9uKHJlcy52YWx1ZT8uZGF0YSkpIHtcbiAgICAgICAgY29uc3QgcGFyc2VkQWNjb3VudERhdGEgPSByZXMudmFsdWU/LmRhdGEgYXMgUGFyc2VkQWNjb3VudERhdGE7XG4gICAgICAgIGluZm8ub3duZXIgPSBwYXJzZWRBY2NvdW50RGF0YS5wYXJz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ICAgICAgfVxuICAgICAgaWYgKGRlc3RUb2tlbi5pbnN0KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGRlc3RUb2tlbi5pbnN0KTtcbiAgICAgIH1cblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVRyYW5zZmVySW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50fWAsIFJBRElYKSwgLy8gTm8gbGFtcG9ydHMsIGl0cyBzb2xcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDbG9zZUFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICB3cmFwcGVkLFxuICAgICAgICAgIGRlc3QudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSksXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgKTtcbiAgICB9KTtcbiAgfTtcbn1cbiIsICJpbXBvcnQgeyBTb2xOYXRpdmUgYXMgRmluZCB9IGZyb20gJy4vZmluZCc7XG5pbXBvcnQgeyBTb2xOYXRpdmUgYXMgR2FzTGVzcyB9IGZyb20gJy4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ZiAoY3VzdG9tRGFzQXBpVXJsLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgICBjb25zb2xlLndhcm4oQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5EQVNfQVBJX1VSTCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAg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6IFB1YmtleSxcbiAgICAgIG93bmVyOiBQdWJrZXksXG4gICAgICBmZWVQYXllcj86IFB1YmtleSxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20g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ICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtc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NvdW50KSA9PiBhY2NvdW50LmlzV3JpdGFibGUpXG4gICAgICAgICAgICAubWFwKChrZXkpID0+IGtleS5wdWJrZXkpLFxuICAgICAgICApXG4gICAgICAgIC5mbGF0KCk7XG5cbiAgICAgIGNvbnN0IHVuaXFXcml0YWJsZUFjY291bnRzID0gW1xuICAgICAgICAuLi5uZXcgU2V0KHdyaXRhYmxlQWNjb3VudHMubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvQmFzZTU4KCkpKSxcbiAgICAgIF1cbiAgICAgICAgLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b1B1YmxpY0tleSgpKVxuICAgICAgICAuc2xpY2UoMCwgTUFYX1JFQ0VOVF9QUklPUklUWV9GRUVfQUNDT1VOVFMpO1xuXG4gICAgICBjb25zdCBwcmlvcml0eUZlZXMgPVxuICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZUJ5U2xvdCkuc29ydChcbiAgICAgICAgKGE6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcywgYjogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKSA9PlxuICAgICAgICAgIGEuc2xvdCAtIGIuc2xvdCxcbiAgICAgICkgYXMgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW107XG5cbiAgICAgIC8vIGdldCBtZWRpYW4gb2YgbGFzdCAyMCBmZWVzXG4gICAgICBjb25zdCByZWNlbnRGZWVzID0gbWF4aW11bUZlZXMuc2xpY2UoXG4gICAgICAgIE1hdGgubWF4KG1heGltdW1GZWVzLmxlbmd0aCAtIDIwLCAwKSxcbiAgICAgICk7XG4gICAgICBjb25zdCBtaWQgPSBNYXRoLmZsb29yKHJlY2VudEZlZXMubGVuZ3RoIC8gMik7XG4gICAgICBjb25zd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gICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9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pb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTt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G4gICAgZXhwb3J0IGNvbnN0IGludG9JbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDb2xsZWN0aW9uPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDb2xsZWN0aW9uPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBrZXk6IGlucHV0LnRvUHVibGljS2V5KCksXG4gICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgIH07XG4gICAgfTtcblxuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlciA9IChcbiAgICAgIG91dHB1dDogT3B0aW9uPEludGVybmFsQ29sbGVjdGlvbj4sXG4gICAgKTogQ29sbGVjdGlvblR5cGUgfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgYWRkcmVzczogb3V0cHV0LmtleS50b1N0cmluZygpLFxuICAgICAgICB2ZXJpZmllZDogb3V0cHV0LnZlcmlmaWVkLFxuICAgICAgfTtcbiAgICB9O1xuICB9XG5cbiAgZXhwb3J0IG5hbWVzcGFjZSBDb2xsZWN0aW9uTWludCB7XG4gICAgZXhwb3J0IGNvbnN0IGludG9Vc2VyID0gKG91dHB1dDogR3JvdXBpbmdbXSk6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBvdXRwdXQuZmluZCgodmFsdWUpID0+IHtcbiAgICAgICAgaWYgKHZhbHVlLmdyb3VwX2tleSA9PT0gJ2NvbGxlY3Rpb24nKSB7XG4gICAgICAgICAgcmV0dXJuIHZhbHVlLmdyb3VwX3ZhbHVlO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICAgIHJldHVybiByZXMgPyByZXMuZ3Jvd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IGF3YWl0IGNhbGxiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZpbGU7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgfTtcbiAgfVxufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZWQtdmFycyAqL1xuaW1wb3J0IHsgT3B0aW9uLCBVc2VzIH0gZnJvbSAnfi90eXBlcy9yZWd1bGFyLW5mdCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQ29udmVydGVyIHtcbiAgZXhwb3J0IG5hbWVzcGFjZSBVc2VzIHtcbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXJTaWRlID0gKG91dHB1dDogT3B0aW9uPFVzZXM+KTogVXNlcyB8IHVuZGVmaW5lZCA9PiB7XG4gICAgICBpZiAoIW91dHB1dCkge1xuICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgfVxuICAgICAgcmV0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ICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgcmV0dXJuIGhpc3Rvcnk7XG4gICAgfTtcbn1cbi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xcbiAgICAgICAgZmVlUGF5ZXI6IGZlZVBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICB9KS5hZGQoXG4gICAgICAgIFN5c3RlbVByb2dyYW0udHJhbnNmZXIoe1xuICAgICAgICAgIGZyb21QdWJrZXk6IG93bmVyUHVibGljS2V5LFxuICAgICAgICAgIHRvUHVia2V5OiBkZXN0LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbGFtcG9ydHM6IHBhcnNlSW50KGAke2Ftb3VudC50b0xhbXBvcnRzKCl9YCwgUkFESVgpLFxuICAgICAgICB9KSxcbiAgICAgICk7XG5cbiAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgdHguaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgVHJhbnNhY3Rpb25CdWlsZGVyLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdHguaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICB0eC5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgYXdhaXQgVHJhbnNhY3Rpb25CdWlsZGVyLkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgIHR4Lmluc3RydWN0aW9ucyxcbiAgICAgICAgICBvd25lci50b0tleXBhaXIoKSxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIHR4LnBhcnRpYWxTaWduKG93bmVyLnRvS2V5cGFpcigpKTtcblxuICAgICAgY29uc3Qgc2VyaWFsaXplZFR4ID0gdHguc2VyaWFsaXplKHtcbiAgICAgICAgcmVxdWlyZUFsbFNpZ25hdHVyZXM6IGZhbHNlLFxuICAgICAgfSk7XG4gICAgICBjb25zdCBoZXggPSBzZXJpYWx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XN0VG9rZW46ICcsIGRlc3RUb2tlbik7XG5cbiAgICAgIGlmIChzb3VyY2VUb2tlbi5pbnN0KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKHNvdXJjZVRva2VuLmluc3QpO1xuICAgICAgfVxuICAgICAgaWYgKGRlc3RUb2tlbi5pbnN0KSB7XG4gICAgICAgIGluc3RydWN0aW9ucy5wdXNoKGRlc3RUb2tlbi5pbnN0KTtcbiAgICAgIH1cblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZVRyYW5zZmVySW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgc291cmNlVG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgZGVzdFRva2VuLnRva2VuQWNjb3VudC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgcGFyc2VJbnQoYCR7YW1vdW50fWAsIFJBRElYKSwgLy8gTm8gbGFtcG9ydHMsIGl0cyBzb2xcbiAgICAgICAgICBrZXlwYWlycyxcbiAgICAgICAgKSxcbiAgICAgICk7XG5cbiAgICAgIGluc3RydWN0aW9ucy5wdXNoKFxuICAgICAgICBjcmVhdGVDbG9zZUFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICB3cmFwcGVkLFxuICAgICAgICAgIGRlc3QudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIG5ldyBUcmFuc2FjdGlvbkJ1aWxkZXIuQ29tbW9uKFxuICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgIG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSksXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgKTtcbiAgICB9K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mZXIiLCAiQ29udmVydGVyIiwgIlRyYW5zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciIsICJTb2xOYXRpdmUiLCAiaW1wb3J0X3dlYjMiLCAiU29sTmF0aXZlIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJTb2xOYXRpdmUiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF9zcGxfdG9rZW4iLCAiU29sTmF0aXZlIiwgIkFjY291bnQiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlNvbE5hdGl2ZSIsICJmcyIsICJTb2xOYXRpdmUiLCAiYXNzZXJ0Il0KfQo= \ No newline at end of file diff --git a/packages/test-tools/dist/index.mjs b/packages/test-tools/dist/index.mjs index c27432a87..580c99e9b 100644 --- a/packages/test-tools/dist/index.mjs +++ b/packages/test-tools/dist/index.mjs @@ -22,7 +22,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -58,7 +58,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -114,13 +115,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1895,4 +1896,4 @@ var requestSol = async (pubkey, sol = 0.1) => { export { requestSol }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlcXVlc3Qtc29sLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3ByaW9yaXR5LWZlZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21wdXRlLXVuaXQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9yZXRyeS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvbWludC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vLi4vdHJhbnNhY3Rpb24tYnVpbGRlci9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9pbmRleC50cyIsICIuLi8uLi9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S2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGFzcyBLZXlwYWlyIHtcbiAgICBzZWNyZXQ6IFNlY3JldDtcbiAgICBwdWJrZXk6IFB1YmtleTtcblxuICAgIGNvbnN0cnVjdG9yKHBhcmFtczogeyBwdWJrZXk/OiBQdWJrZXk7IHNlY3JldDogU2VjcmV0IH0pIHtcbiAgICAgIGlmICghcGFyYW1zLnB1YmtleSkge1xuICAgICAgICBjb25zdCBrZXlwYWlyID0gcGFyYW1zLnNlY3JldC50b0tleXBhaXIoKTtcbiAgICAgICAgdGhpcy5wdWJrZXkgPSBrZXlwYWlyLnB1YmxpY0tleS50b1N0c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b25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29tcHV0ZUJ1ZGdldFByb2dyYW0sXG4gIEtleXBhaXIsXG4gIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyxcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbn0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcblxuaW1wb3J0IHsgZGVidWdMb2cgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb3J0IHsgVHJhbnNhY3Rpb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XRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICAgICAoYTogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzLCBiOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMpID0+XG4gICAgICAgICAgYS5zbG90IC0gYi5zbG90LFxuICAgICAgKSBhcyBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXTtcblxuICAgICAgLy8gZ2V0IG1lZGlhbiBvZiBsYXN0IDIwIGZlZXNcbiAgICAgIGNvbnN0IHJlY2VudEZlZXMgPSBtYXhpbXVtRmVlcy5zbGljZShcbiAgICAgICAgTWF0aC5tYXgobWF4aW11bUZlZXMubGVuZ3RoIC0gMjAsIDApLFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1pZCA9IE1hdGguZmxvb3IocmVjZW50RmVlcy5sZW5ndGggLyAyKTtcbiAgICAgIGNvbnN0IG1lZGlhbkZlZSA9XG4gICAgICAgIHJlY2VudEZlZXMubGVuZ3RoICUgMiAhPT0gMFxuICAgICAgICAgID8gcmVjZW50RmVlc1ttaWRdLnByaW9yaXRpemF0aW9uRmVlXG4gICAgICAgICAgOiAocmVjZW50RmVlc1ttaWQgLSAxXS5wcmlvcml0aXphdGlvbkZlZSArXG4gICAgICAgICAgICAgIHJlY2VudEZlZXNbbWlkXS5wcmlvcml0aXphdGlvbkZlZSkgL1xuICAgICAgICAgICAgMjtcblxuICAgICAgZGVidWdMb2coJyMgbWVkaWFuIGZlZTogJywgbWVkaWFuRmVlKTtcblxuICAgICAgcmV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ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBLZXlwYWlyLFxuICBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25JbnN0cnVjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5cbmltcG9ydCB7IENvbnN0YW50cywgZGVidWdMb2csIFJlc3VsdCwgVHJ5IH0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29ubmVjdGlvbigpLnJwY0VuZHBvaW50ID09PSBDb25zdGFudHMuRW5kUG9pbnRVcmwucHJkKSB7XG4gICAgICAgICAgZGVidWdMb2coJyMgQ2hhbmdlIG1ldGFwbGV4IGNsdXN0ZXIgb24gbWFpbm5ldC1iZXRhJyk7XG4gICAgICAgICAgTm9kZS5jaGFuZ2VDb25uZWN0aW9uKHsgY2x1c3RlcjogQ29uc3RhbnRzLkNsdXN0ZXIucHJkTWV0YXBsZXggfSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9U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wgJ2hleCcpO1xuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IFRyYW5zYWN0aW9uLmZyb20oZGVjb2RlKTtcbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLnBhcnRpYWxTaWduKG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCkpO1xuICAgICAgICAgIGNvbnN0IHdpcmVUcmFuc2FjdGlvbiA9IHRyYW5zYWN0aW9uLnNlcmlhbGl6ZSgpO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5zZW5kUmF3VHJhbnNhY3Rpb24oXG4gICAgICAgICAgICB3aXJlVHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXRGb3JQYXJ0aWFsU2lnbihcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIG9wdGlvbnMuZmVlUGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBQdWJsaWNLZXksIFRyYW5zYWN0aW9uIH0gZ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B7XG4gICAgZXhwb3J0IGNvbnN0IGludG9JbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQ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G4gICAgICAgIGZpbGVQYXRoOiBGaWxlVHlwZSxcbiAgICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgICBvcHRpb25zOiBQYXJ0aWFsPFN0b3JhZ2VPcHRpb25zPixcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgb3B0aW9uczogUGFydGlhbDxTdG9yYWdlT3B0aW9ucz4gPSB7fSxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoICYmICFmaWxlLnVyaSkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleT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ICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi9ub2RlJztcbmltcG9ydCB7IE93bmVySW5mbywgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIFNvbE5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b25zdCB0cmFuc2ZlcldpdGhNdWx0aXNpZyA9IGFzeW5jIChcbiAgICBvd25lcjogUHVia2V5LFxuICAgIGRlc3Q6IFB1YmtleSxcbiAgICBtdWx0aXNpZzogU2VjcmV0W10sXG4gICAgYW1vdW50OiBudW1iZXIsXG4gICAgb3B0aW9uczogUGFydGlhbDxUcmFuc2Zlck9wdGlvbnM+ID0ge30sXG4gICk6IFByb21pc2U8UmVzdWx0PENvbW1vblN0cnVjdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCBjb25uZWN0aW9uID0gTm9kZS5nZXRDb25uZWN0aW9uKCk7XG4gICAgICBjb25zdCBwYXllciA9IG9wdGlvbnMuZmVlUGF5ZXIgPyBvcHRpb25zLmZlZVBheWVyIDogbXVsdGlzaWdbMF07XG4gICAgICBjb25zdCBrZXlwYWlycyA9IG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCB3cmFwcGVkID0gYXdhaXQgY3JlYXRlV3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEFjY291bnQuS2V5cGFpcih7IHNlY3JldDogcGF5ZXIgfSkucHVia2V5LFxuICAgICAgICB0cnVlLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIG5ldyBBY2NvdW50LktleXBhaXIoeyBzZWNyZXQ6IHBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgdHJ1ZSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaWYgKHNvdXJjZVRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goc291cmNlVG9rZW4uaW5zdCk7XG4gICAgICB9XG4gICAgICBpZiAoZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goZGVzdFRva2VuLmluc3QpO1xuICAgICAgfVxuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNsb3NlQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHdyYXBwZWQsXG4gICAgICAgICAgZGVzdC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5Db21tb24oXG4gICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgbXVsdGlzaWcubWFwKChzKSA9PiBzLnRvS2V5cGFpcigpKSxcbiAgICAgICAgcGF5ZXIudG9LZXlwYWlyKCksXG4gICAgICApO1xuICAgIH0pO1xuICB9O1xufVxuIiwgImltcG9ydCB7IFNvbE5hdGl2ZSBhcyBGaW5kIH0gZnJvbSAnLi9maW5kJztcbmltcG9ydCB7IFNvbE5hdGl2ZSBhcyBHYXNMZXNzIH0gZnJvbSAnLi9nYXMtbGVzcy10cmFuc2Zlcic7XG5pbXBvcnQgeyBTb2xOYXRpdmUgYXMgVHJhbnNmZXIgfSBmcm9tICcuL3RyYW5zZmVyJztcbmltcG9ydCB7IFNvbE5hdGl2ZSBhcyBUcmFuc2ZlcldpdGhNdWx0aXNpZyB9IGZyb20gJy4vdHJhbnNmZXItd2l0aC1tdWx0aXNpZyc7XG5cbi8qKiBAbmFtZXNwYWNlICovXG5leHBvcnQgY29uc3QgU29sTmF0aXZlID0ge1xuICAuLi5GaW5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GViYXNlLmtleSB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uuc2VjcmV0IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5GSUxFQkFTRV9DUkVERU5USUFMKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmtleSAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5zZWNyZXQgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEZpbGViYXNlQ3JlZGVudGlhbC5kZXY7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBsb2FkQ29uZmlnID0gYXN5bmMgKCkgPT4ge1xuICAgIGNvbnN0IHsgZGVmYXVsdDogbG9hZGVkQ29uZmlnIH0gPSBhd2FpdCBpbXBvcnQoXG4gICAgICAnQHNvbGFuYS1zdWl0ZS9jb25maWcvbG9hZCcsXG4gICAgICB7XG4gICAgICAgIHdpdGg6IHsgdHlwZTogJ2pzb24nIH0sXG4gICAgICB9XG4gICAgKTtcbiAgICBDb25maWcgPSBsb2FkZWRDb25maWc7XG4gICAgY29uc29sZS5sb2coJyMjIyMjIyMjIyMjIyMjJywgQ29uZmlnKTtcbiAgfTtcblxuICBleHBvcnQgY29uc3QgV1JBUFBFRF9UT0tFTl9QUk9HUkFNX0lEID0gbmV3IFB1YmxpY0tleShcbiAgICAnU28xMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExM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UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAg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AgICAgaSsrO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0Lmluc3RydWN0aW9ucyxcbiAgICAgICAgKTtcbiAgICAgICAgY29uc3Qgc2lnbmVycyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcCgoaW5zdCkgPT4gaW5zdC5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gY29tbW9uT3JNaW50SW5zdC5maWx0ZXIoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9uc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Nsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICAgICAoYTogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzLCBiOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMpID0+XG4gICAgICAgICAgYS5zbG90IC0gYi5zbG90LFxuICAgICAgKSBhcyBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXTtcblxuICAgICAgLy8gZ2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jdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ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aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB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XNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoICYmICFmaWxlLnVyaSkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZmlsZTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1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CBtZW1vXG4gICAgICAgICAgICAgICAgdHhNZXRhLnRyYW5zYWN0aW9uLm1lc3NhZ2UuaW5zdHJ1Y3Rpb25zLmZvckVhY2goXG4gICAgICAgICAgICAgICAgICAoaW5zdHJ1Y3Rpb24pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgIGlzUGFyc2VkSW5zdHJ1Y3Rpb24oaW5zdHJ1Y3Rpb24pICYmXG4gICAgICAgICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5UcmFuc2Zlci5wcm9ncmFtLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucHJvZ3JhbSxcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgPSBpbnN0cnVjdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgLy8gc3BsLXRva2VuIG9yIHN5c3RlbVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIgJiZcbiAgICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgIT09IGluc3RydWN0aW9uVHJhbnNmZXJbJ3Byb2dyYW0nXVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgZGVidWdMb2coXG4gICAgICAgICAgICAgICAgICAgICcjIEZpbHRlclR5cGUuTWVtbyBicmVhayBpbnN0cnVjdGlvbjogJyxcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCBtZW1vIG9ubHkgdHJhbnNhY3Rpb25cbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1lbW8uaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyLFxuICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk9ubHlNZW1vOiB7XG4gICAgICAgICAgICAgIGlmIChGaWx0ZXJPcHRpb25zLk1lbW8ucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSkge1xuICAgICAgICAgICAgICAgIGxldCBpbnN0cnVjdGlvblRyYW5zZmVyO1xuXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5NaW50OiB7XG4gICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQucHJvZ3JhbS5pbmNsdWRlcyhpbnN0cnVjdGlvbi5wcm9ncmFtKSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuTWludC5hY3Rpb24uaW5jbHVkZXMoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSBhcyBzdHJpbmcsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBoaXN0b3J5ID0gQ29udmVydGVyLk1pbnQuaW50b1VzZXJTaWRlKGluc3RydWN0aW9uLCB0eE1ldGEpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLlRyYW5zZmVyOlxuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgbW9kdWxlTmFtZSA9PT0gaW5zdHJ1Y3Rpb24ucHJvZ3JhbSAmJlxuICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluc3RydWN0aW9uLnBhcnNlZC50eXBlID09PSAndHJhbnNmZXJDaGVja2VkJykge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2ZlckNoZWNrZWQuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5UcmFuc2Zlci5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgICB0eE1ldGEsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgICByZXR1cm4gaGlzdG9yeTtcbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFBhcnNlZEFjY291bnREYXRhIH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFJlc3VsdCwgVHJ5IH0gZnJvbSAnfi9zdWl0ZS11dGlscyc7XG5pbXBvcnQgeyBOb2RlIH0gZnJvbSAnfi9ub2RlJztcbmltcG9ydCB7IE93bmVySW5mbywgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCB7IFRyYW5zYWN0aW9uRmlsdGVyIH0gZnJvbSAnfi90cmFuc2FjdGlvbi1maWx0ZXInO1xuXG5leHBvcnQgbmFtZXNwYWNlIFNvbE5hdGl2ZSB7XG4gIC8qKlxuICAgKiBGaW5kIG5mdCBieSBvd25lciBhZGRyZXNzXG4gICAqXG4gICAqIEBwYXJhbSB7UHVia2V5fSBvd25lclxuICAgKiBAcmV0dXJuIFByb21pc2U8UmVzdWx0PE93bmVySW5mbywgRXJyb3I+PlxuICAgKi9cbiAgZXhwb3J0IGNvbnN0IGZpbmRCeU93bmVyID0gYXN5bmMgKFxuICAgIG93bmVyOiBQdWJrZXksXG4gICk6IFByb21pc2U8UmVzdWx0PE93bmVySW5mbywgRXJyb3I+PiA9PiB7XG4gICAgcmV0dXJuIFRyeShhc3luYyAoKSA9PiB7XG4gICAgICBjb25zdCByZXMgPSBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRQYXJzZWRBY2NvdW50SW5mbyhcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiA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ICAgICBjb25zdCBrZXlwYWlycyA9IG11bHRpc2lnLm1hcCgocykgPT4gcy50b0tleXBhaXIoKSk7XG4gICAgICBjb25zdCB3cmFwcGVkID0gYXdhaXQgY3JlYXRlV3JhcHBlZE5hdGl2ZUFjY291bnQoXG4gICAgICAgIGNvbm5lY3Rpb24sXG4gICAgICAgIHBheWVyLnRvS2V5cGFpcigpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBwYXJzZUludChgJHthbW91bnQudG9MYW1wb3J0cygpfWAsIFJBRElYKSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIHdyYXBwZWQgc29sOiAnLCB3cmFwcGVkLnRvQmFzZTU4KCkpO1xuXG4gICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBbXTtcblxuICAgICAgY29uc3QgdG9rZW4gPSBhd2FpdCBjcmVhdGVNaW50KFxuICAgICAgICBjb25uZWN0aW9uLFxuICAgICAgICBwYXllci50b0tleXBhaXIoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgMCxcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IHNvdXJjZVRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICBvd25lcixcbiAgICAgICAgbmV3IEFjY291bnQuS2V5cGFpcih7IHNlY3JldDogcGF5ZXIgfSkucHVia2V5LFxuICAgICAgICB0cnVlLFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgc291cmNlVG9rZW46ICcsIHNvdXJjZVRva2VuKTtcblxuICAgICAgY29uc3QgZGVzdFRva2VuID0gYXdhaXQgQWNjb3VudC5Bc3NvY2lhdGVkLm1ha2VPckNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICB0b2tlbi50b1N0cmluZygpLFxuICAgICAgICB3cmFwcGVkLnRvU3RyaW5nKCksXG4gICAgICAgIG5ldyBBY2NvdW50LktleXBhaXIoeyBzZWNyZXQ6IHBheWVyIH0pLnB1YmtleSxcbiAgICAgICAgdHJ1ZSxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGRlc3RUb2tlbjogJywgZGVzdFRva2VuKTtcblxuICAgICAgaWYgKHNvdXJjZVRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goc291cmNlVG9rZW4uaW5zdCk7XG4gICAgICB9XG4gICAgICBpZiAoZGVzdFRva2VuLmluc3QpIHtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goZGVzdFRva2VuLmluc3QpO1xuICAgICAgfVxuXG4gICAgICBpbnN0cnVjdGlvbnMucHVzaChcbiAgICAgICAgY3JlYXRlVHJhbnNmZXJJbnN0cnVjdGlvbihcbiAgICAgICAgICBzb3VyY2VUb2tlbi50b2tlbkFjY291bnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBkZXN0VG9rZW4udG9rZW5BY2NvdW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBwYXJzZUludChgJHthbW91bnR9YCwgUkFESVgpLCAvLyBObyBsYW1wb3J0cywgaXRzIHNvbFxuICAgICAgICAgIGtleXBhaXJzLFxuICAgICAgICApLFxuICAgICAgKTtcblxuICAgICAgaW5zdHJ1Y3Rpb25zLnB1c2goXG4gICAgICAgIGNyZWF0ZUNsb3NlQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHdyYXBwZWQsXG4gICAgICAgICAgZGVzdC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAga2V5cGFpcnMsXG4gICAgICAgICksXG4gICAgICApO1xuXG4gICAgICByZXR1cm4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VpbGRlciIsICJTb2xOYXRpdmUiLCAiU29sTmF0aXZlIl0KfQo= \ No newline at end of file diff --git a/packages/test-tools/package.json b/packages/test-tools/package.json index db0c214ff..6c1c143d6 100644 --- a/packages/test-tools/package.json +++ b/packages/test-tools/package.json @@ -2,9 +2,9 @@ "name": "test-tools", "private": true, "version": "0.7.20", + "types": "dist/index.d.ts", "main": "dist/index.js", "module": "dist/index.mjs", - "types": "dist/index.d.ts", "scripts": { "build": "tsup --config build-configs/tsup/base.ts", "clean": "rm -rf dist/ && rm -rf node_modules", @@ -25,24 +25,24 @@ }, "exports": { ".": { + "types": "./dist/index.d.ts", "require": "./dist/index.js", - "import": "./dist/index.mjs", - "types": "./dist/index.d.ts" + "import": "./dist/index.mjs" }, "./setup": { + "types": "./setup.ts", "require": "./setup.ts", - "import": "./setup.ts", - "types": "./setup.ts" + "import": "./setup.ts" }, "./assets": { + "types": "./assets", "require": "./assets", - "import": "./assets", - "types": "./assets" + "import": "./assets" }, "./setupAsset": { + "types": "./setupAsset.ts", "require": "./setupAsset.ts", - "import": "./setupAsset.ts", - "types": "./setupAsset.ts" + "import": "./setupAsset.ts" } } } diff --git a/packages/transaction-builder/dist/index.js b/packages/transaction-builder/dist/index.js index 13c217dde..4b5ab4bd6 100644 --- a/packages/transaction-builder/dist/index.js +++ b/packages/transaction-builder/dist/index.js @@ -57,7 +57,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -93,7 +93,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -149,13 +150,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1122,4 +1123,4 @@ var TransactionBuilder = { 0 && (module.exports = { TransactionBuilder }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9iYXRjaC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9pbmRleC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvcmVzdWx0LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9zaGFyZWQudHMiLCAiLi4vLi4vbm9kZS9zcmMvaW5kZXgudHMiLCAiLi4vc3JjL3ByaW9yaXR5LWZlZS50cyIsICIuLi9zcmMvY29tcHV0ZS11bml0LnRzIiwgIi4uL3NyYy9yZXRyeS50cyIsICIuLi9zcmMvY29tbW9uLnRzIiwgIi4uL3NyYy9taW50LnRzIiwgIi4uL3NyYy9wYXJ0aWFsLXNpZ24udHMiLCAiLi4vc3JjL2NhbGN1bGF0ZS10eHNpemUudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCB7IFRyYW5z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pID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBpbnN0IG9mIGNvbW1vbk9yTWludEluc3QpIHtcbiAgICAgICAgICBpZiAoIWluc3QuaW5zdHJ1Y3Rpb25zICYmICFpbnN0LnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGluc3QpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICApO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKChpbnN0KSA9PiBpbnN0LnNpZ25lcnMpO1xuICAgICAgICBjb25zdCBmZWVQYXllcnMgPSBjb21tb25Pck1pbnRJbnN0LmZpbHRlcihcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5mZWVQYXllciAhPT0gdW5kZWZpbmVkLFxuICAgICAgICApO1xuICAgICAgICBsZXQgZmVlUGF5ZXIgPSBzaWduZXJzWzBdO1xuICAgICAgICBpZiAoZmVlUGF5ZXJzLmxlbmd0aCA+IDAgJiYgZmVlUGF5ZXJzWzBdLmZlZVBheWVyKSB7XG4gICAgICAgICAgZmVlUGF5ZXIgPSBmZWVQYXllcnNbMF0uZmVlUGF5ZXI7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IG5ldyBUcmFuc2FjdGlvbigpO1xuICAgICAgICBsZXQgZmluYWxTaWduZXJzID0gc2lnbmVycztcbiAgICAgICAgaWYgKGZlZVBheWVyKSB7XG4gICAgICAgICAgdHJhbnNhY3Rpb24uZmVlUGF5ZXIgPSBmZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW2ZlZVBheWVyLCAuLi5zaWduZXJzXTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIENhbGN1bGF0ZVR4c2l6ZS5pc01heFRyYW5zYWN0aW9uU2l6ZSh0cmFuc2FjdGlvbiwgZmVlUGF5ZXIucHVibGljS2V5KTtcblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgICBhd2FpdCBQcmlvcml0eUZlZS5Qcmlvcml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQU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xuXG4gICAgICBkZWJ1Z0xvZygnIyBhc3NvY2lhdGVkVG9rZW5BY2NvdW50OiAnLCBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCkpO1xuXG4gICAgICB0cnkge1xuICAgICAgICAvLyBEb250IHVzZSBSZXN1bHRcbiAgICAgICAgYXdhaXQgZ2V0QWNjb3VudChcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLmNvbW1pdG1lbnQsXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNvbGFuYS93ZWIzLmpzJztcbmltcG9ydCB7IFB1YmtleSwgU2VjcmV0IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50JztcbmltcG9ydCBicyBmcm9tICdiczU4JztcblxuZXhwb3J0IG5hbWVzcGFjZSBBY2NvdW50IHtcbiAgZXhwb3J0IGNsYXNzIEtleXBhaXIge1xuICAgIHNlY3JldDogU2VjcmV0O1xuICAgIHB1YmtleTogUHVia2V5O1xuXG4gICAgY29uc3RydWN0b3IocGFyYW1zOiB7IHB1YmtleT86IFB1YmtleTsgc2VjcmV0OiBTZWNyZXQgfSkge1xuICAgICAgaWYgKCFwYXJhbXMucHVia2V5KSB7XG4gICAgICAgIGNvbnN0IGtleXBhaXIgPSBwYXJhbXMuc2VjcmV0LnRvS2V5cGFpcigpO1xuICAgICAgICB0aGlzLnB1YmtleSA9IGtleXBhaXIucHVibGljS2V5LnRvU3RyaW5nKCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLnB1YmtleSA9IHBhcmFtcy5wdWJrZXk7XG4gICAgICB9XG4gICAgICB0aGlzLnNlY3JldCA9IHBhcmFtcy5zZWNyZXQ7XG4gICAgfVxuXG4gICAgdG9QdWJsaWNL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291bnQuaXNXcml0YWJsZSlcbiAgICAgICAgICAgIC5tYXAoKGtleSkgPT4ga2V5LnB1YmtleSksXG4gICAgICAgIClcbiAgICAgICAgLmZsYXQoKTtcblxuICAgICAgY29uc3QgdW5pcVdyaXRhYmxlQWNjb3VudHMgPSBbXG4gICAgICAgIC4uLm5ldyBTZXQod3JpdGFibGVBY2NvdW50cy5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9CYXNlNTgoKSkpLFxuICAgICAgXVxuICAgICAgICAubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvUHVibGljS2V5KCkpXG4gICAgICAgIC5zbGljZSgwLCBNQVhfUkVDRU5UX1BSSU9SSVRZX0ZFRV9BQ0NPVU5UUyk7XG5cbiAgICAgIGNvbnN0IHByaW9yaXR5RmVlcyA9XG4gICAgICAgIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyh7XG4gICAgICAgICAgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiA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Bc3NvY2lhdGVkIiwgImltcG9ydF93ZWIzIiwgIkFjY291bnQiLCAiS2V5cGFpciIsICJicyIsICJPcmlnaW5hbCIsICJpbXBvcnRfd2ViMyIsICJBY2NvdW50IiwgIlBkYSIsICJNUExfQlVCQkxFR1VNX1BST0dSQU1fSUQiLCAiQk4iLCAiQWNjb3VudCIsICJpbXBvcnRfYnM1OCIsICJBY2NvdW50IiwgImJzIiwgIlJlc3VsdCIsICJpbXBvcnRfd2ViMyIsICJOb2RlIiwgImltcG9ydF93ZWIzIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJDb21wdXRlVW5pdCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUHJpb3JpdHlGZWUiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJldHJ5IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIl0KfQo= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9iYXRjaC50cyIsICIuLi8uLi9zdWl0ZS11dGlscy9zcmMvY29uc3RhbnRzLnRzIiwgIi4uLy4uL2dsb2JhbC9zcmMvaW5kZXgudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvYXNzb2NpYXRlZC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9rZXlwYWlyLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL3BkYS50cyIsICIuLi8uLi9hY2NvdW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PSBhc3luYyAoXG4gICAgICBvcHRpb25zOiBQYXJ0aWFsPEJhdGNoU3VibWl0T3B0aW9ucz4gPSB7fSxcbiAgICApOiBQcm9taXNlPFJlc3VsdDxUcmFuc2FjdGlvblNpZ25hdHVyZSwgRXJyb3I+PiA9PiB7XG4gICAgICByZXR1cm4gVHJ5KGFzeW5jICgpID0+IHtcbiAgICAgICAgaWYgKCFvcHRpb25zLmluc3RydWN0aW9ucykge1xuICAgICAgICAgIHRocm93IEVycm9yKCdOb3QgZm91bmQgb3B0aW9ucy5pbnN0cnVjdGlvbnMnKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBjb21tb25Pck1pbnRJbnN0ID0gb3B0aW9ucy5pbnN0cnVjdGlvbnM7XG4gICAgICAgIGxldCBpID0gMDtcbiAgICAgICAgZm9yIChjb25zdCBpbnN0IG9mIGNvbW1vbk9yTWludEluc3QpIHtcbiAgICAgICAgICBpZiAoIWluc3QuaW5zdHJ1Y3Rpb25zICYmICFpbnN0LnNpZ25lcnMpIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICAgICBgb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIGJhdGNoU3VibWl0KCkuXG4gICAgICAgICAgICBJbmRleDogJHtpfSwgU2V0IHZhbHVlOiAke0pTT04uc3RyaW5naWZ5KGluc3QpfWAsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpKys7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBpbnN0cnVjdGlvbnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICApO1xuICAgICAgICBjb25zdCBzaWduZXJzID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKChpbnN0KSA9PiBpbnN0LnNpZ25lcnMpO1xuICAgICAgICBjb25zdCBmZWVQYXll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blxuICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuICAgICAgICBpbnN0cnVjdGlvbnMubWFwKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07X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gIGNhc2UgQ29uc3RhbnRzLkNsdXN0ZXIucHJkOiB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLmtleSB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2Uuc2VjcmV0IHx8XG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5idWNrZXRcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5GSUxFQkFTRV9DUkVERU5USUFMKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgfVxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmtleSAmJlxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5zZWNyZXQgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEZpbGViYXNlQ3JlZGVudGlhbC5kZXY7XG4gICAgICB9XG4gICAgfVxuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBsb2FkQ29uZmlnID0gYXN5bmMgKCkgPT4ge1xuICAgIGNvbnN0IHsgZGVmYXVsdDogbG9hZGVkQ29uZmlnIH0gPSBhd2FpdCBpbXBvcnQoXG4gICAgICAnQHNvbGFuYS1zdWl0ZS9jb25maWcvbG9hZCcsXG4gICAgICB7XG4gICAgICAgIHdpdGg6IHsgdHlwZTogJ2pzb24nIH0sXG4gICAgICB9XG4gICAgKTtcbiAgICBDb25maWcgPSBsb2FkZWRDb25maWc7XG4gICAgY29uc29sZS5sb2coJyMjIyMjIyMjIyMjIyMjJywgQ29uZmlnKTtcbiAgfTtcblxuICBleHBvcnQgY29uc3QgV1JBUFBFRF9UT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iAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0OiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgICB9IGNhdGNoIChlcnJvcjogdW5rbm93bikge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuQWNjb3VudE5vdEZvdW5kRXJyb3IpICYmXG4gICAgICAgICAgIShlcnJvciBpbnN0YW5jZW9mIFRva2VuSW52YWxpZEFjY291bnRPd25lckVycm9yKVxuICAgICAgICApIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignVW5leHBlY3RlZCBlcnJvcicpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgcGF5ZXIgPSAhZmVlUGF5ZXIgPyBvd25lciA6IGZlZVBheWVyO1xuXG4gICAgICAgIGNvbnN0IGluc3QgPSBjcmVhdGVBc3NvY2lhdGVkVG9rZW5BY2NvdW50SW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgcGF5ZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LFxuICAgICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgS2V5cGFpciBhcyBPcmlnaW5hbCwgUHVibGljS2V5IH0gZnJvbSAnQHNv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yaXR5RmVlcyA9XG4gICAgICAgIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyh7XG4gICAgICAgICAgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICAgICAoYTogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzLCBiOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMpID0+XG4gICAgICAgICAgYS5zbG90IC0gYi5zbG90LFxuICAgICAgKSBhcyBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXNbXTtcblxuICAgICAgLy8gZ2V0IG1lZGlhbiBvZiBsYXN0IDIwIGZlZXNcbiAgICAgIGNvbnN0IHJlY2VudEZlZXMgPSBtYXhpbXVtRmVlcy5zbGljZShcbiAgICAgICAgTWF0aC5tYXgobWF4aW11bUZlZXMubGVuZ3RoIC0gMjAsIDApLFxuICAgICAgKTtcbiAgICAgIGNvbnN0IG1pZCA9IE1hdGguZmxvb3IocmVjZW50RmVlcy5sZW5ndGggLyAyKTtcbiAgICAgIGNvbnN0IG1lZGlhbkZlZSA9XG4gICAgICAgIHJlY2VudEZlZXMubGVuZ3RoICUgMiAhPT0gMFxuICAgICAgICAgID8gcmVjZW50RmVlc1ttaWRdLnByaW9yaXRpemF0aW9uRmVlXG4gICAgICAgICAgOiAocmVjZW50RmVlc1ttaWQgLSAxXS5wcmlvcml0aXphdGlvbkZlZSArXG4gICAgICAgICAgICAgIHJlY2VudEZlZXNbbWlkXS5wcmlvcml0aXphdGlvbkZlZSkgL1xuICAgICAgICAgICAgMjtcblxuICAgICAgZGVidWdMb2coJyMgbWVkaWFuIGZlZTogJywgbWVkaWFuRmVlKTtcblxuICAgICAgcmV0dXJuIE1hdGguY2VpbChtZWRpYW5GZWUpO1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQge1xuICBDb21wdXRlQ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b25zLFxuICAgICAgICAgICAgICBvcHRpb25zLmFkZFNvbFByaW9yaXR5RmVlLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgICApLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbi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LFxuICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLmluc3RydWN0aW9ucy5mb3JFYWNoKChpbnN0KSA9PiB0cmFuc2FjdGlvbi5hZGQoaW5zdCkpO1xuXG4gICAgICAgIGNvbnN0IGNvbmZpcm1PcHRpb25zOiBDb25maXJtT3B0aW9ucyA9IHtcbiAgICAgICAgICBtYXhSZXRyaWVzOiBDb25zdGFudHMuTUFYX1RSQU5TQUNUSU9OX1JFVFJJRVMsXG4gICAgICAgIH07XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICA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dXRlVW5pdCIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUHJpb3JpdHlGZWUiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJldHJ5IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJpbXBvcnRfd2ViMyIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiaW1wb3J0X3dlYjMiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgImltcG9ydF93ZWIzIiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb25CdWlsZGVyIl0KfQo= \ No newline at end of file diff --git a/packages/transaction-builder/dist/index.mjs b/packages/transaction-builder/dist/index.mjs index 04d9678b5..d8e92d9f7 100644 --- a/packages/transaction-builder/dist/index.mjs +++ b/packages/transaction-builder/dist/index.mjs @@ -24,7 +24,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -60,7 +60,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -116,13 +117,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1113,4 +1114,4 @@ var TransactionBuilder = { export { TransactionBuilder }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9yZXN1bHQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi9zcmMvcHJpb3JpdHktZmVlLnRzIiwgIi4uL3NyYy9jb21wdXRlLXVuaXQudHMiLCAiLi4vc3JjL3JldHJ5LnRzIiwgIi4uL3NyYy9jb21tb24udHMiLCAiLi4vc3JjL21pbnQudHMiLCAiLi4vc3JjL3BhcnRpYWwtc2lnbi50cyIsICIuLi9zcmMvY2FsY3VsYXRlLXR4c2l6ZS50cyIsICIuLi9zcmMvaW5kZXgudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5cbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb3J0IHsgQ29uc3RhbnRzLCBSZXN1bHQsIFR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AgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHsgRmluYWxpdHksIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgU29sYW5hSnNvbkNvbmZpZyBmcm9tICdAc29sYW5hLXN1aXRlL2NvbmZpZy9sb2FkJztcblxuZXhwb3J0IGxldCBDb25maWcgPSBTb2xhbmFKc29uQ29uZmlnO1xuXG5leHBvcnQgbmFtZXNwYWNlIENvbnN0YW50cyB7XG4gIGV4cG9ydCBuYW1lc3BhY2UgV2Fybm5pbmdNZXNzYWdlIHtcbiAgICBleHBvcnQgY29uc3QgRklMRUJBU0VfQ1JFREVOVElBTCA9IGBcbiAgICAgICAgW1lPVSBIQVZFIFRPIERPXVxuICAgICAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuICAgICAgICBZb3UgbmVlZCB0byB1cGRhdGUgRmlsZWJhc2UgY3JlZGVudGlhbChhY2Nlc3NLZXkgYW5kIHNlY3Jld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G9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1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4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZUJ5U2xvdCkuc29ydChcbiAgICAgICAgKGE6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcywgYjogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKSA9PlxuICAgICAgICAgIGEuc2xvdCAtIGIuc2xvdCxcbiAgICAgICkgYXMgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW107XG5cbiAgICAgIC8vIGdldCBtZWRpYW4gb2YgbGFzdCAyMCBmZWVzXG4gICAgICBjb25zdCByZWNlbnRGZWVzID0gbWF4aW11bUZlZXMuc2xpY2UoXG4gICAgICAgIE1hdGgubWF4KG1heGltdW1GZWVzLmxlbmd0aCAtIDIwLCAwKSxcbiAgICAgICk7XG4gICAgICBjb25zdCBtaWQgPSBNYXRoLmZsb29yKHJlY2VudEZlZXMubGVuZ3RoIC8gMik7XG4gICAgICBjb25zdCBtZWRpYW5GZWUgPVxuICAgICAgICByZWNlbnRGZWVzLmxlbmd0aCAlIDIgIT09IDBcbiAgICAgICAgICA/IHJlY2VudEZlZXNbbWlkXS5wcmlvcml0aXphdGlvbkZlZVxuICAgICAgICAgIDogKHJlY2VudEZlZXNbbWlkIC0gMV0ucHJpb3JpdGl6YXRpb25GZWUgK1xuICAgICAgICAgICAgICByZWNlbnRGZWVzW21pZF0ucHJpb3JpdGl6YXRpb25GZWUpIC9cbiAgICAgICAgICAgIDI7XG5cbiAgICAgIGRlYnVnTG9nKCcjIG1lZGlhbiBmZWU6ICcsIG1lZGlhbkZlZSk7XG5cbiAgICAgIHJldHVybiBNYXR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RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0I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UZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb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cbiAgICAgICAgKTtcbiAgICAgICAgY29uc3Qgc2lnbmVycyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcCgoaW5zdCkgPT4gaW5zdC5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gY29tbW9uT3JNaW50SW5zdC5maWx0ZXIoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICA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VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5rZXkgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uuc2VjcmV0ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBGaWxlYmFzZUNyZWRlbnRpYWwuZGV2O1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3QgbG9hZENvbmZpZyA9IGFzeW5jICgpID0+IHtcbiAgICBjb25zdCB7IGRlZmF1bHQ6IGxvYWRlZENvbmZpZyB9ID0gYXdhaXQgaW1wb3J0KFxuICAgICAgJ0Bzb2xhbmEtc3VpdGUvY29uZmlnL2xvYWQnLFxuICAgICAge1xuICAgICAgICB3aXRoOiB7IHR5cGU6ICdqc29uJyB9LFxuICAgICAgfVxuICAgICk7XG4gICAgQ29uZmlnID0gbG9hZGVkQ29uZmlnO1xuICAgIGNvbn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rZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1Ymxp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KS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJl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gICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdG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MudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLC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25CdWlsZGVyIiwgIkNvbXB1dGVVbml0IiwgIlB1YmxpY0tleSIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiUHJpb3JpdHlGZWUiLCAiQ29tcHV0ZUJ1ZGdldFByb2dyYW0iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlJldHJ5IiwgIlRyYW5zYWN0aW9uQnVpbGRlciIsICJUcmFuc2FjdGlvbiIsICJzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uIiwgInNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uIiwgInNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24iLCAic2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb24iLCAic2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbiIsICJUcmFuc2FjdGlvbkJ1aWxkZXIiLCAiVHJhbnNhY3Rpb24iLCAiVHJhbnNhY3Rpb25CdWlsZGVyIiwgIlRyYW5zYWN0aW9uQnVpbGRlciJdCn0K \ No newline at end of file diff --git a/packages/transaction-filter/dist/index.js b/packages/transaction-filter/dist/index.js index 03e5f87fa..c78f784ee 100644 --- a/packages/transaction-filter/dist/index.js +++ b/packages/transaction-filter/dist/index.js @@ -55,7 +55,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -91,7 +91,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -147,13 +148,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1700,4 +1701,4 @@ var TransactionFilter; Signatures, TransactionFilter }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBhaXIudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMvcGRhLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2luZGV4LnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL2JhdGNoLnRzIiwgIi4uLy4uL3RyYW5zYWN0aW9uLWJ1aWxkZXIvc3JjL3ByaW9yaXR5LWZlZS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21wdXRlLXVuaXQudHMiLCAiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL3NoYXJlZC50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9yZXRyeS50cyIsICIuLi8uLi90cmFuc2FjdGlvbi1idWlsZGVyL3NyYy9jb21tb24ud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VyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWNjb3VudCB7XG4gIGV4cG9ydCBjbGF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gZmVlUGF5ZXJzID0gY29tbW9uT3JNaW50SW5zdC5maWx0ZXIoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xu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ZSlcbiAgICAgICAgICAgIC5tYXAoKGtleSkgPT4ga2V5LnB1YmtleSksXG4gICAgICAgIClcbiAgICAgICAgLmZsYXQoKTtcblxuICAgICAgY29uc3QgdW5pcVdyaXRhYmxlQWNjb3VudHMgPSBbXG4gICAgICAgIC4uLm5ldyBTZXQod3JpdGFibGVBY2NvdW50cy5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9CYXNlNTgoKSkpLFxuICAgICAgXVxuICAgICAgICAubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvUHVibGljS2V5KCkpXG4gICAgICAgIC5zbGljZSgwLCBNQVhfUkVDRU5UX1BSSU9SSVRZX0ZFRV9BQ0NPVU5UUyk7XG5cbiAgICAgIGNvbnN0IHByaW9yaXR5RmVlcyA9XG4gICAgICAgIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyh7XG4gICAgICAgICAgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgIC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pIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIHRoaXMnKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IG5ldyBUcmFuc2FjdGlvbigpO1xuXG4gICAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVx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GlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0aW9uLFxuICBUcmFuc2FjdGlvblNpZ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yYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+IHtcbiAgICBjb25zdCByZXMgPSB0aGlzLm1hcChcbiAgICAgIGFzeW5jIChvaykgPT4ge1xuICAgICAgICAvLyBwYXJhbWV0ZXI6IHBhcnRpYWxTaWduIGhleEluc3RydWN0dXJlXG4gICAgICAgIGNvbnN0IGhleFJlZ2V4ID0gL15bMC05YS1mQS1GXSskLztcbiAgICAgICAgaWYgKHR5cGVvZiBvayA9PT0gJ3N0cmluZycgJiYgaGV4UmVnZXgudGVzdChvaykpIHtcbiAgICAgICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5QYXJ0aWFsU2lnbihvaykuc3VibWl0KG9wdGlvbnMpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGNvbnN0IG9iaiA9IG9rIGFzXG4gICAgICAgICAgICB8IENvbW1vblN0cnVjdHVyZVxuICAgICAgICAgICAgfCBNaW50U3RydWN0dXJlXG4gICAgICAgICAgICB8IFBhcnRpYWxTaWduU3RydWN0dXJlO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBvYmouc3VibWl0KG9wdGlvbnMpO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgKGVycikgPT4ge1xuICAgICAgICByZXR1cm4gZXJyO1xuICAgICAgfSxcbiAgICApO1xuICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgIHJldHVybiBSZXN1bHQuZXJyKHJlcy5lcnJvcik7XG4gICAgfVxuICAgIHJldHVybiByZXMudmFsdWU7XG4gIH1cbn1cblxuZGVjbGFyZSBnbG9iYWwge1xuICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi9cbiAgaW50ZXJmYWNlIEFycmF5PFQ+IHtcbiAgICBzdWJtaXQoXG4gICAgICBvcHRpb25zPzogUGFydGlhbDxTdWJtaXRPcHRpb25zPixcbiAgICApOiBQcm9taXNlPFJlc3V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uICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCAmJiAhZmlsZS51cmkpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZpbGU7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgfTtcbiAgfVxufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZWQtdmFycyAqL1xuaW1wb3J0IHsgT3B0aW9uLCBVc2VzIH0gZnJvbSAnfi90eXBlcy9yZWd1bGFyLW5mdCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQ29udmVydGVyIHtcbiAgZXhwb3J0IG5hbWVzcGFjZSBVc2VzIHtcbiAgICBleHBvcn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3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgIC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cGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5rZXkgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uuc2VjcmV0ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBGaWxlYmFzZUNyZWRlbnRpYWwuZGV2O1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3QgbG9hZENvbmZp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jaWF0ZWQge1xuICAgIC8qKlxuICAgICAqIFtNYWluIGxvZ2ljXUdldCBBc3NvY2lhdGVkIHRva2VuIEFjY291bnQuXG4gICAgICogaWYgbm90IGNyZWF0ZWQsIGNyZWF0ZSBuZXcgdG9rZW4gYWNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIE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AocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICA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ci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAg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BpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbi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dG9yYWdlVHlwZSxcbiAgICAgICAgb3B0aW9uczogUGFydGlhbDxTdG9yYWdlT3B0aW9ucz4sXG4gICAgICApID0+IFByb21pc2U8UmVzdWx0PHN0cmluZywgRXJyb3I+PixcbiAgICAgIHN0b3JhZ2VUeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgIG9wdGlvbnM6IFBhcnRpYWw8U3RvcmFnZU9wdGlvbnM+ID0ge30sXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCAmJiAhZmlsZS51cmkpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2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gICAgICAgIGlmIChpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSkge1xuICAgICAgICAgIHN3aXRjaCAoZmlsdGVyVHlwZSkge1xuICAgICAgICAgICAgY2FzZSBGaWx0ZXJUeXBlLk1lbW86IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVj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zYWN0aW9uRmlsdGVyIiwgImluc3RydWN0aW9uIiwgIkNvbnZlcnRlciJdCn0K \ No newline at end of file diff --git a/packages/transaction-filter/dist/index.mjs b/packages/transaction-filter/dist/index.mjs index 014881552..e34a5a6df 100644 --- a/packages/transaction-filter/dist/index.mjs +++ b/packages/transaction-filter/dist/index.mjs @@ -18,7 +18,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -54,7 +54,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -110,13 +111,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1693,4 +1694,4 @@ export { Signatures, TransactionFilter }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2N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WNjb3VpbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7UHVia2V5fSBtaW50XG4gICAgICogQHBhcmFtIHtQdWJrZXl9IG93bmVyXG4gICAgICogQHBhcmFtIHtQdWJrZXl9IGZlZVBheWVyXG4gICAgICogQHJldHVybnMgUHJvbWlzZTxzdHJpbmc+XG4gICAgICovXG4gICAgZXhwb3J0IGNvbnN0IG1ha2VPckNyZWF0ZUluc3RydWN0aW9uID0gYXN5bmMgKFxuICAgICAgbWludDogUHVia2V5LFxuICAgICAgb3duZXI6IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygp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FxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaSsrO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgaW5zdHJ1Y3Rpb25zID0gY29tbW9uT3JNaW50SW5zdC5mbGF0TWFwKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0Lmluc3RydWN0aW9ucyxcbiAgICAgICAgKTtcbiAgICAgICAgY29uc3Qgc2lnbmVycyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcCgoaW5zdCkgPT4gaW5zdC5zaWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gY29tbW9uT3JNaW50SW5zdC5maWx0ZXIoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBp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tcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW10+LFxuICAgICAgKTtcblxuICAgICAgY29uc3QgbWF4RmVlQnlTbG90ID0gT2JqZWN0LmtleXMoZ3JvdXBCeVNsb3QpLnJlZHVjZShcbiAgICAgICAgKGFjYywgc2xvdCkgPT4ge1xuICAgICAgICAgIGFjY1tzbG90XSA9IGdyb3VwQnlTbG90W3Nsb3RdLnJlZHVjZSgobWF4LCBmZWUpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBmZWUucHJpb3JpdGl6YXRpb25GZWUgPiBtYXgucHJpb3JpdGl6YXRpb25GZWUgPyBmZWUgOiBtYXg7XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgfSxcbiAgICAgICAge30gYXMgUmVjb3JkPHN0cmluZywgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzPixcbiAgICAgICk7XG4gICAgICBjb25zdCBtYXhpbXVtRmVlcyA9IE9iamVjdC52YWx1ZXMobWF4RmVlQnlTbG90KS5zb3J0KFxuICAgICAgICAoYTogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzLCBiOiBSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMpID0+XG4gICAgICAgICAgYS5zbG90IC0gYi5zbG90LFxuICAgICAgKSBhcyBSZWNlbnRQcm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aXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB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NyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgU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UeXBlOiBTdG9yYWdlVHlwZSxcbiAgICAgIG9wdGlvbnM6IFBhcnRpYWw8U3RvcmFnZU9wdGlvbnM+ID0ge30sXG4gICAgKTogUHJvbWlzZTxQcm9wZXJ0aWVzPiA9PiB7XG4gICAgICBpZiAoIWlucHV0IHx8ICFpbnB1dC5maWxlcykge1xuICAgICAgICByZXR1cm4ge307XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGZpbGVzID0gYXdhaXQgUHJvbWlzZS5hbGwoXG4gICAgICAgIGlucHV0LmZpbGVzLm1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCAmJiAhZmlsZS51cmkpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZpbGU7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiA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IHtcbiAgICAgICAgICAgICAgaWYgKEZpbHRlck9wdGlvbnMuTWVtby5wcm9ncmFtLmluY2x1ZGVzKGluc3RydWN0aW9uLnByb2dyYW0pKSB7XG4gICAgICAgICAgICAgICAgbGV0IGluc3RydWN0aW9uVHJhbnNmZXI7XG5cbiAgICAgICAgICAgICAgICAvLyBmZXRjaCAgdHJhbnNmZXIgdHJhbnNhY3Rpb24gZm9yIHJlbGF0aW9uYWwgbWVtb1xuICAgICAgICAgICAgICAgIHR4TWV0YS50cmFuc2FjdGlvbi5tZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2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RoID4gMCkge1xuICAgICAgY29uc3QgaW5kZXggPSBEYXRlLm5vdygpICUgY3VzdG9tRGFzQXBpVXJsLmxlbmd0aDtcbiAgICAgIHJldHVybiBjdXN0b21EYXNBcGlVcmxbaW5kZXhdO1xuICAgIH1cblxuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoY3VzdG9tRGFzQXBpVXJsLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgICBjb25zb2xlLndhcm4oQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5EQVNfQVBJX1VSTCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgIH1cbiAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgIENvbmZpZy5maWxlYmFzZS5rZXkgJiZcbiAgICAgICAgICBDb25maWcuZmlsZWJhc2Uuc2VjcmV0ICYmXG4gICAgICAgICAgQ29uZmlnLmZpbGViYXNlLmJ1Y2tldFxuICAgICAgICApIHtcbiAgICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBGaWxlYmFzZUNyZWRlbnRpYWwuZGV2O1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3QgbG9hZENvbmZpZyA9IGFzeW5jICgpID0+IHtcbiAgICBjb25zdCB7IGRlZmF1bHQ6IGxvYWRlZENvbmZpZyB9ID0gYXdhaXQgaW1wb3J0KFxuICAgICAgJ0Bzb2xhbmEtc3VpdGUvY29uZmlnL2xvYWQnLFxuICAgICAge1xuICAgICAgICB3aXRoOiB7IHR5cGU6ICdqc29uJyB9LFxuICAgICAgfVxuICAgICk7XG4gICAgQ29uZmlnID0gbG9hZGVkQ29uZmlnO1xuICAgIGNvbnNvbGUubG9nKCcjIyMjIyMjIyMjIyMjIycsIENvbmZpZyk7XG4gIH07XG5cbiAgZXhwb3J0IGNvbnN0IFdSQVBQRURfVE9LRU5fUFJPR1JBTV9JRCA9IG5ldyBQdWJsaWNLZXkoXG4gICAgJ1NvMTExMTExMTExMTExMTExMTExMTExMTExMT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IFB1YmtleSxcbiAgICAgIGZlZVBheWVyPzogUHVia2V5LFxuICAgICAgYWxsb3dPd25lck9mZkN1cnZlID0gZmFsc2UsXG4gICAgKTogUHJvbWlzZTx7XG4gICAgICB0b2tlbkFjY291bnQ6IHN0cmluZztcbiAgICAgIGluc3Q6IFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24gfCB1bmRlZmluZWQ7XG4gICAgfT4gPT4ge1xuICAgICAgY29uc3QgYXNzb2NpYXRlZFRva2VuQWNjb3VudCA9IGdldEFzc29jaWF0ZWRUb2tlbkFkZHJlc3NTeW5jKFxuICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgIG93bmVyLnRvUHVibGljS2V5KCksXG4gICAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSxcbiAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgQVNTT0NJQVRFRF9UT0tFTl9QUk9HUkFNX0lELFxuICAgICAgKTtcblxuICAgICAgZGVidWdMb2coJyMgYXNzb2NpYXRlZFRva2VuQWNjb3VudDogJywgYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpKTtcblxuICAgICAgdHJ5IHtcbiAgICAgICAgLy8gRG9udCB1c2UgUmVzdWx0XG4gICAgICAgIGF3YWl0IGdldEFjY291bnQoXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKS5jb21taXRtZW50LFxuICAgICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdG9rZW5BY2NvdW50OiBhc3NvY2lhdGVkVG9rZW5BY2NvdW50LnRvU3RyaW5nKCksXG4gICAgICAgICAgaW5zdDogdW5kZWZpbmVkLFxuICAgICAgICB9O1xuICAgICAgfSBjYXRjaCAoZXJyb3I6IHVua25vd24pIHtcbiAgICAgICAgaWYgKFxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkFjY291bnROb3RGb3VuZEVycm9yKSAmJlxuICAgICAgICAgICEoZXJyb3IgaW5zdGFuY2VvZiBUb2tlbkludmFsaWRBY2NvdW50T3duZXJFcnJvcilcbiAgICAgICAgKSB7XG4gICAgICAgICAgdGhyb3cgRXJyb3IoJ1VuZXhwZWN0ZWQgZXJyb3InKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBheWVyID0gIWZlZVBheWVyID8gb3duZXIgOiBmZWVQYXllcjtcblxuICAgICAgICBjb25zdCBpbnN0ID0gY3JlYXRlQXNzb2NpYXRlZFRva2VuQWNjb3VudEluc3RydWN0aW9uKFxuICAgICAgICAgIHBheWVyLnRvUHVibGljS2V5KCksXG4gICAgICAgICAgYXNzb2NpYXRlZFRva2VuQWNjb3VudCxcbiAgICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIG1pbnQudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgKTtcblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3QsXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEtleXBhaXIgYXMgT3JpZ2luYWwsIFB1YmxpY0tleSB9IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5pbXBvcnQgeyBQdWJrZXksIFNlY3JldCB9IGZyb20gJ34vdHlwZXMvYWNjb3VudCc7XG5pbXBvcnQgYnMgZnJvbSAnYnM1OCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQWN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cigpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEJndW1TaWduZXIgPSAoKTogUHVibGljS2V5ID0+IHtcbiAgICAgIGNvbnN0IFtwdWJsaWNLZXldID0gUHVibGljS2V5LmZpbmRQcm9ncmFtQWRkcmVzc1N5bmMoXG4gICAgICAgIFtCdWZmZXIuZnJvbSgnY29sbGVjdGlvbl9jcGknLCAndXRmOCcpXSxcbiAgICAgICAgTVBMX0JVQkJMRUdVTV9QUk9HUkFNX0lELnRvUHVibGljS2V5KCksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHB1YmxpY0tleTtcbiAgICB9O1xuXG4gICAgZXhwb3J0IGNvbnN0IGdldEFzc2V0SWQgPSAoYWRkcmVzczogUHVia2V5LCBsZWFmSW5kZXg6IG51bWJlcik6IFB1YmtleSA9PiB7XG4gICAgICBjb25zdCBub2RlID0gbmV3IEJOLkJOKGxlYWZJbmRleCk7XG4gICAgICBjb25zdCBbYXNzZXRJZF0gPSBQdWJsaWNLZXkuZmluZFByb2dyYW1BZGRyZXNzU3luYyhcbiAgICAgICAgW1xuICAgICAgICAgIEJ1ZmZlci5mcm9tKCdhc3NldCcsICd1dGY4JyksXG4gICAgICAgICAgYWRkcmVzcy50b1B1YmxpY0tleSgpLnRvQnVmZmVyKCksXG4gICAgICAgICAgVWludDhBcnJheS5mcm9tKG5vZGUudG9BcnJheSgnbGUnLCA4KSksXG4gICAgICAgIF0sXG4gICAgICAgIE1QTF9CVUJCTEVHVU1fUFJPR1JBTV9JRC50b1B1YmxpY0tleSgpLFxuICAgICAgKTtcbiAgICAgIHJldHVybiBhc3NldElkLnRvU3RyaW5nKCk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7IEFjY291bnQgYXMgQWFzc29jaWF0ZWQgf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aWduZXJzKTtcbiAgICAgICAgY29uc3QgZmVlUGF5ZXJzID0gY29tbW9uT3JNaW50SW5zdC5maWx0ZXIoXG4gICAgICAgICAgKGluc3QpID0+IGluc3QuZmVlUGF5ZXIgIT09IHVuZGVmaW5lZCxcbiAgICAgICAgKTtcbiAgICAgICAgbGV0IGZlZVBheWVyID0gc2lnbmVyc1swXTtcbiAgICAgICAgaWYgKGZlZVBheWVycy5sZW5ndGggPiAwICYmIGZlZVBheWVyc1swXS5mZWVQYXllcikge1xuICAgICAgICAgIGZlZVBheWVyID0gZmVlUGF5ZXJzWzBdLmZlZVBheWVyO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgdHJhbnNhY3Rpb24gPSBuZXcgVHJhbnNhY3Rpb24oKTtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHNpZ25lcnM7XG4gICAgICAgIGlmIChmZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gZmVlUGF5ZXIucHVibGljS2V5O1xuICAgICAgICAgIGZpbmFsU2lnbmVycyA9IFtmZWVQYXllciwgLi4uc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDYWxjdWxhdGVUeHNpemUuaXNNYXhUcmFuc2FjdGlvblNpemUodHJhbnNhY3Rpb24sIGZlZVBheWVyLnB1YmxpY0tleSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMuaXNQcmlvcml0eUZlZSkge1xuICAgICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgICAgYXdhaXQgUHJpb3JpdHlGZWUuUHJpb3JpdHlGZWUuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICAgIGluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnNbMF0sXG4gICAgICAgICAgKSxcbiAgICAgICAgKTtcbiAgICAgICAgaW5zdHJ1Y3Rpb25zLm1hcCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgIC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nQpID0+IGFjY291bnQuaXNXcml0YWJsZSlcbiAgICAgICAgICAgIC5tYXAoKGtleSkgPT4ga2V5LnB1YmtleSksXG4gICAgICAgIClcbiAgICAgICAgLmZsYXQoKTtcblxuICAgICAgY29uc3QgdW5pcVdyaXRhYmxlQWNjb3VudHMgPSBbXG4gICAgICAgIC4uLm5ldyBTZXQod3JpdGFibGVBY2NvdW50cy5tYXAoKGFjY291bnQpID0+IGFjY291bnQudG9CYXNlNTgoKSkpLFxuICAgICAgXVxuICAgICAgICAubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvUHVibGljS2V5KCkpXG4gICAgICAgIC5zbGljZSgwLCBNQVhfUkVDRU5UX1BSSU9SSVRZX0ZFRV9BQ0NPVU5UUyk7XG5cbiAgICAgIGNvbnN0IHByaW9yaXR5RmVlcyA9XG4gICAgICAgIGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldFJlY2VudFByaW9yaXRpemF0aW9uRmVlcyh7XG4gICAgICAgICAgbG9ja2VkV3JpdGFibGVBY2NvdW50czogdW5pcVdyaXRhYmxlQWNjb3VudHMsXG4gICAgICAgIH0pO1xuXG4gICAgICBpZiAocHJpb3JpdHlGZWVzLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgZGVidWdMb2coJyMgZ2V0IHJlY2VudCBwcmlvcml0eSBmZWVzOiAnLCBwcmlvcml0eUZlZXMpO1xuICAgICAgICByZXR1cm4gMDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZ3JvdXBCeVNsb3QgPSBwcmlvcml0eUZlZXMucmVkdWNlKFxuICAgICAgICAoYWNjLCBmZWUpID0+IHtcbiAgICAgICAgICBjb25zdCBrZXkgPSBmZWUuc2xvdDtcbiAgICAgICAgICBpZiAoIWFjY1trZXldKSB7XG4gICAgICAgICAgICBhY2Nba2V5XSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgICBhY2Nba2V5XS5wdXNoKGZlZSk7XG4gICAgICAgICAgcmV0dXJ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hpcyBpbnN0YW5jZW9mIENvbW1vbikpIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcignb25seSBJbnN0cnVjdGlvbiBvYmplY3QgdGhhdCBjYW4gdXNlIHRoaXMnKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IG5ldyBUcmFuc2FjdGlvbigpO1xuXG4gICAgICAgIGNvbnN0IGJsb2NraGFzaE9iaiA9IGF3YWl0IE5vZGUuZ2V0Q29ubmVjdGlvbigpLmdldExhdGVzdEJsb2NraGFzaCgpO1xuICAgICAgICB0cmFuc2FjdGlvbi5sYXN0VmFsaWRCbG9ja0hlaWdodCA9IGJsb2NraGFzaE9iai5sYXN0VmFsaWRCbG9ja0hlaWdodDtcbiAgICAgICAgdHJhbnNhY3Rpb24ucmVjZW50QmxvY2toYXNoID0gYmxvY2toYXNoT2JqLmJsb2NraGFzaDtcbiAgICAgICAgbGV0IGZpbmFsU2lnbmVycyA9IHRoaXMuc2lnbmVycztcblxuICAgICAgICBpZiAodGhpcy5mZWVQYXllcikge1xuICAgICAgICAgIHRyYW5zYWN0aW9uLmZlZVBheWVyID0gdGhpcy5mZWVQYXllci5wdWJsaWNLZXk7XG4gICAgICAgICAgZmluYWxTaWduZXJzID0gW3RoaXMuZmVlUGF5ZXIsIC4uLnRoaXMuc2lnbmVyc107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5pc1ByaW9yaXR5RmVlKSB7XG4gICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgICAgb3B0aW9ucy5hZGRTb2xQcmlvcml0eUZlZSxcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICBhd2FpdCBDb21wdXRlVW5pdC5Db21wdXRlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aH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RlVW5pdC5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMuZm9yRWFjaCgoaW5zdCkgPT4gdHJhbnNhY3Rpb24uYWRkKGluc3QpKTtcblxuICAgICAgICBjb25zdCBjb25maXJtT3B0aW9uczogQ29uZmlybU9wdGlvbnMgPSB7XG4gICAgICAgICAgbWF4UmV0cmllczogQ29uc3RhbnRzLk1BWF9UUkFOU0FDVElPTl9SRVRSSUVTLFxuICAgICAgICB9O1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgcmV0dXJuIGF3YWl0IHNlbmRBbmRDb25maXJtVHJhbnNhY3Rpb24oXG4gICAgICAgICAgICBOb2RlLmdldENvbm5lY3Rpb24oKSxcbiAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICBpZiAoUmV0cnkuUmV0cnkuaXNDb21wdXRlQnVkZ2V0RXJyb3IoZXJyb3IpKSB7XG4gICAgICAgICAgICByZXR1cm4gYXdhaXQgUmV0cnkuUmV0cnkuc3VibWl0KFxuICAgICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgICAgZmluYWxTaWduZXJzLFxuICAgICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICB9XG59XG4iLCAiaW1wb3J0IHtcbiAgQ29uZmlybU9wdGlvbnMsXG4gIFRyYW5zYWN0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G4gICk6IFByb21pc2U8UmVzdWx0PFRyYW5zYWN0aW9uU2lnbmF0dXJlLCBFcnJvcj4+IHtcbiAgICBjb25zdCByZXMgPSB0aGlzLm1hcChcbiAgICAgIGFzeW5jIChvaykgPT4ge1xuICAgICAgICAvLyBwYXJhbWV0ZXI6IHBhcnRpYWxTaWduIGhleEluc3RydWN0dXJlXG4gICAgICAgIGNvbnN0IGhleFJlZ2V4ID0gL15bMC05YS1mQS1GXSskLztcbiAgICAgICAgaWYgKHR5cGVvZiBvayA9PT0gJ3N0cmluZycgJiYgaGV4UmVnZXgudGVzdChvaykpIHtcbiAgICAgICAgICByZXR1cm4gbmV3IFRyYW5zYWN0aW9uQnVpbGRlci5QYXJ0aWFsU2lnbihvaykuc3VibWl0KG9wdGlvbnMpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGNvbnN0IG9iaiA9IG9rIGFzXG4gICAgICAgICAgICB8IENvbW1vblN0cnVjdHVyZVxuICAgICAgICAgICAgfCBNaW50U3RydWN0dXJlXG4gICAgICAgICAgICB8IFBhcnRpYWxTaWduU3RydWN0dXJlO1xuICAgICAgICAgIHJldHVybiBhd2FpdCBvYmouc3VibWl0KG9wdGlvbnMpO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgKGVycikgPT4ge1xuICAgICAgICByZXR1cm4gZXJyO1xuICAgICAgfSxcbiAgICApO1xuICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgIHJldHVybiBSZXN1bHQuZXJyKHJlcy5lcnJvcik7XG4gICAgfVxuICAgIHJldHVybiByZXMudmFsdWU7XG4gIH1cbn1cblxuZGVjbGFyZSBnbG9iYWwge1xuICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdW51c2VkLXZhcnMgKi9cbiAgaW50ZXJmYWNlIEFycmF5PFQ+IHtcbiAgICBzdWJtaXQoXG4gICAgICBvcHRpb25zPzogUGFydGlhbDxTdWJtaXRPcHRpb25z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1hcChhc3luYyAoZmlsZSkgPT4ge1xuICAgICAgICAgIGlmICghZmlsZS5maWxlUGF0aCAmJiAhZmlsZS51cmkpIHtcbiAgICAgICAgICAgIHJldHVybiB7fTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGZpbGUuZmlsZVBhdGgpIHtcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGNhbGxiYWNrRnVuYyhcbiAgICAgICAgICAgICAgZmlsZS5maWxlUGF0aCEsXG4gICAgICAgICAgICAgIHN0b3JhZ2VUeXBlLFxuICAgICAgICAgICAgICBvcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyZXMuaXNFcnIpIHtcbiAgICAgICAgICAgICAgdGhyb3cgRXJyb3IocmVzLmVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG92ZXJ3cml0ZU9iamVjdChmaWxlLCBbXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBleGlzdHNLZXk6ICdmaWxlUGF0aCcsXG4gICAgICAgICAgICAgICAgd2lsbDogeyBrZXk6ICd1cmknLCB2YWx1ZTogcmVzLnZhbHVlIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIGZpbGU7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgICAgIHJldHVybiB7IC4uLmlucHV0LCBmaWxlcyB9IGFzIFByb3BlcnRpZXM7XG4gICAgfTtcbiAgfVxufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby11bnVzZWQtdmFycyAqL1xuaW1wb3J0IHsgT3B0aW9uLCBVc2VzIH0gZnJvbSAnfi90eXBlcy9yZWd1bGFyLW5mdCc7XG5cbmV4cG9ydCBuYW1lc3BhY2UgQ29udmVydGVyIHtcbiAgZXhwb3J0IG5hbWVzc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ZXNzYWdlLmluc3RydWN0aW9ucy5mb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgKGluc3RydWN0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICBpc1BhcnNlZEluc3RydWN0aW9uKGluc3RydWN0aW9uKSAmJlxuICAgICAgICAgICAgICAgICAgICAgIEZpbHRlck9wdGlvbnMuVHJhbnNmZXIucHJvZ3JhbS5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnByb2dyYW0sXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyID0gaW5zdHJ1Y3Rpb247XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgIC8vIHNwbC10b2tlbiBvciBzeXN0ZW1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvblRyYW5zZmVyICYmXG4gICAgICAgICAgICAgICAgICBtb2R1bGVOYW1lICE9PSBpbnN0cnVjdGlvblRyYW5zZmVyWydwcm9ncmFtJ11cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgIGRlYnVnTG9nKFxuICAgICAgICAgICAgICAgICAgICAnIyBGaWx0ZXJUeXBlLk1lbW8gYnJlYWsgaW5zdHJ1Y3Rpb246ICcsXG4gICAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZmV0Y2ggbWVtbyBvbmx5IHRyYW5zYWN0aW9uXG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NZW1vLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLFxuICAgICAgICAgICAgICAgICAgdHhNZXRhLFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb25UcmFuc2ZlcixcbiAgICAgICAgICAgICAgICAgIHBvc3RUb2tlbkFjY291bnQsXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5Pbmx5TWVtbzoge1xuICAgICAgICAgICAgICBpZiAoRmlsdGVyT3B0aW9ucy5NZW1vLnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkpIHtcbiAgICAgICAgICAgICAgICBsZXQgaW5zdHJ1Y3Rpb25UcmFuc2ZlcjtcblxuICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuTWVtby5pbnRvVXNlclNpZGUoXG4gICAgICAgICAgICAgICAgICBpbnN0cnVjdGlvbixcbiAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uVHJhbnNmZXIsXG4gICAgICAgICAgICAgICAgICBwb3N0VG9rZW5BY2NvdW50LFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXNlIEZpbHRlclR5cGUuTWludDoge1xuICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgRmlsdGVyT3B0aW9ucy5NaW50LnByb2dyYW0uaW5jbHVkZXMoaW5zdHJ1Y3Rpb24ucHJvZ3JhbSkgJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLk1pbnQuYWN0aW9uLmluY2x1ZGVzKFxuICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24ucGFyc2VkLnR5cGUgYXMgc3RyaW5nLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaGlzdG9yeSA9IENvbnZlcnRlci5NaW50LmludG9Vc2VyU2lkZShpbnN0cnVjdGlvbiwgdHhNZXRhKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhc2UgRmlsdGVyVHlwZS5UcmFuc2ZlcjpcbiAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIG1vZHVsZU5hbWUgPT09IGluc3RydWN0aW9uLnByb2dyYW0gJiZcbiAgICAgICAgICAgICAgICBGaWx0ZXJPcHRpb25zLlRyYW5zZmVyLmFjdGlvbi5pbmNsdWRlcyhcbiAgICAgICAgICAgICAgICAgIGluc3RydWN0aW9uLnBhcnNlZC50eXBlIGFzIHN0cmluZyxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbnN0cnVjdGlvbi5wYXJzZWQudHlwZSA9PT0gJ3RyYW5zZmVyQ2hlY2tlZCcpIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXJDaGVja2VkLmludG9Vc2VyU2lkZShcbiAgICAgICAgICAgICAgICAgICAgaW5zdHJ1Y3Rpb24sXG4gICAgICAgICAgICAgICAgICAgIHR4TWV0YSxcbiAgICAgICAgICAgICAgICAgICAgcG9zdFRva2VuQWNjb3VudCxcbiAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGhpc3RvcnkgPSBDb252ZXJ0ZXIuVHJhbnNmZXIuaW50b1VzZXJTaWRlKFxuICAgICAgICAgICAgICAgICAgICBpbnN0c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0cnVjdGlvbiIsICJDb252ZXJ0ZXIiXQp9Cg== \ No newline at end of file diff --git a/packages/validator/dist/index.js b/packages/validator/dist/index.js index 31a752c75..d68791276 100644 --- a/packages/validator/dist/index.js +++ b/packages/validator/dist/index.js @@ -55,7 +55,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -91,7 +91,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -147,13 +148,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1710,4 +1711,4 @@ var ValidatorError = class extends Error { Validator, ValidatorError }); -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uLy4uL3N1aXRlLXV0aWxzL3NyYy9jb25zdGFudHMudHMiLCAiLi4vLi4vZ2xvYmFsL3NyYy9pbmRleC50cyIsICIuLi8uLi9ub2RlL3NyYy9pbmRleC50cyIsICIuLi8uLi9hY2NvdW50L3NyYy9hc3NvY2lhdGVkLnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2tleXBh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1hZ2UnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgIC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VSTCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoIUNvbmZpZy5maWxlYmFzZS5rZXkgfHwgIUNvbmZpZy5maWxlYmFzZS5zZWNyZXQpIHtcbiAgICAgICAgICB0aHJvdyBFcnJvcihDb25zdGFudHMuV2Fybm5pbmdNZXNzYWdlLkZJTEVCQVNFX0NSRURFTlRJQUwpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBDb25maWcuZmlsZWJhc2U7XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGlmIChDb25maWcuZmlsZWJhc2Uua2V5IHx8IENvbmZpZy5maWxlYmFzZS5zZWNyZXQpIHtcbiAgICAgICAgICByZXR1cm4gQ29uZmlnLmZpbGViYXNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBGaW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vY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgIC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05vdCBmb3VuZCBvcHRpb25zLmluc3RydWN0aW9ucycpO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGNvbW1vbk9yTWludEluc3QgPSBvcHRpb25zLmluc3RydWN0aW9ucztcbiAgICAgICAgbGV0IGkgPSAwO1xuICAgICAgICBmb3IgKGNvbnN0IGluc3Qgb2YgY29tbW9uT3JNaW50SW5zdCkge1xuICAgICAgICAgIGlmICghaW5zdC5pbnN0cnVjdGlvbnMgJiYgIWluc3Quc2lnbmVycykge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoXG4gICAgICAgICAgICAgIGBvbmx5IEluc3RydWN0aW9uIG9iamVjdCB0aGF0IGNhbiB1c2UgYmF0Y2hTdWJtaXQoKS5cbiAgICAgICAgICAgIEluZGV4OiAke2l9LCBTZXQgdmFsdWU6ICR7SlNPTi5zdHJpbmdpZnkoaW5zdCl9YCxcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGkrKztcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGluc3RydWN0aW9ucyA9IGNvbW1vbk9yTWludEluc3QuZmxhdE1hcChcbiAgICAgICAgICAoaW5zdCkgPT4gaW5zdC5pbnN0cnVjdGlvbnMsXG4gICAgICAgICk7XG4gICAgICAgIGNvbnN0IHNpZ25lcnMgPSBjb21tb25Pck1pbnRJbnN0LmZsYXRNYXAoKGluc3QpID0+IGluc3Quc2lnbmVycyk7XG4gICAgICAgIGNvbnN0IGZlZVBheWVycyA9IGNvbW1vbk9yTWludEluc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0LmZlZVBheWVyICE9PSB1bmRlZmluZWQsXG4gICAgICAgICk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQ2FsY3VsYXRlVHhzaXplLmlzTWF4VHJhbnNhY3Rpb25TaXplKHRyYW5zYWN0aW9uLCBmZWVQYXllci5wdWJsaWNLZXkpO1xuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW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gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZUJ5U2xvdCkuc29ydChcbiAgICAgICAgKGE6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcywgYjogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKSA9PlxuICAgICAgICAgIGEuc2xvdCAtIGIuc2xvdCxcbiAgICAgICkgYXMgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW107XG5cbiAgICAgIC8vIGdldCBtZWRpYW4gb2YgbGFzdCAyMCBmZWVzXG4gICAgICBjb25zdCByZWNlbnRGZWVzID0gbWF4aW11bUZlZXMuc2xpY2UoXG4gICAgICAgIE1hdGgubWF4KG1heGltdW1GZWVzLmxlbmd0aCAtIDIwLCAwKSxcbiAgICAgICk7XG4gICAgICBjb25zdCBtaWQgPSBNYXRoLmZsb29yKHJlY2VudEZlZXMubGVuZ3RoIC8gMik7XG4gICAgICBjb25zdCBtZWRpYW5GZWUgPVxuICAgICAgICByZWNlbnRGZWVzLmxlbmd0aCAlIDIgIT09IDBcbiAgICAgICAgICA/IHJlY2VudEZlZXNbbWlkXS5wcmlvcml0aXphdGlvbkZlZVxuICAgICAgICAgIDogKHJlY2VudEZlZXNbbWlkIC0gMV0ucHJpb3JpdGl6YXRpb25GZWUgK1xuICAgICAgICAgICAgICByZWNlbnRGZWVzW21pZF0ucHJpb3JpdGl6YXRpb25GZWUpIC9cbiAgICAgICAgICAgIDI7XG5cbiAgICAgIGRlYnVnTG9nKCcjIG1lZGlhbiBmZ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ZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQge1xuICBDb25maXJtT3B0aW9ucyxcbiAgS2V5cGFpcixcbiAgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb24sXG4gIFRyYW5zYWN0aW9uSW5zdHJ1Y3Rpb24sXG4gIFRyYW5zYWN0aW9uU2lnbmF0dXJlLFxufSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuXG5pbXBvc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c3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBUcmFuc2FjdGlvbixcbiAgVHJhbnNhY3Rpb25TaWduYXR1cmUsXG59IGZyb20gJ0Bzb2xhbmEvd2ViMy5qcyc7XG5cbmltcG9ydCB7IENvbnN0YW50cywgUmVzdWx0LCBUcnkgfSBmcm9tICd+L3N1aXRlLXV0aWxzJztcbmltcG9ydCB7IE5vZGUgfSBmcm9tICd+L25vZGUnO1xuaW1wb3J0IHsgUHVia2V5IH0gZnJvbSAnfi90eXBlcy9hY2NvdW50Jzt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b248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBPcHRpb248SW50ZXJuYWxDcmVhdG9yc1tdPiA9PiB7XG4gICAgICBpZiAoIWlucHV0KSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGlucHV0Lm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b0NvbXByZXNzZWROZnRJbmZyYSA9IChcbiAgICAgIGlucHV0OiBPcHRpb248SW5wdXRDcmVhdG9yc1tdPiB8IHVuZGVmaW5lZCxcbiAgICApOiBJbnRlcm5hbENyZWF0b3JzW10gPT4ge1xuICAgICAgaWYgKCFpbnB1dCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICByZXR1cm4gaW5wdXQhLm1hcCgoZGF0YSkgPT4ge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGFkZHJlc3M6IGRhdGEuYWRkcmVzcy50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIHNoYXJlOiBkYXRhLnNoYXJlLFxuICAgICAgICAgIHZlcmlmaWVkOiBmYWxzZSxcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBleHBvcnQgY29uc3QgaW50b1VzZXIgPSAoXG4gICAgICBvdXRwdXQ6IE9wdGlvbjxJbnRlcm5hbENyZWF0b3JzW10+LFxuICAgICk6IENyZWF0b3JzW10gfCB1bmRlZmluZWQgPT4ge1xuICAgICAgaWYgKCFvdXRwdXQpIHtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5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FN0b3JhZ2VUeXBlLFxuICAgICAgICBvcHRpb25zOiBQYXJ0aWFsPFN0b3JhZ2VPcHRpb25zPixcbiAgICAgICkgPT4gUHJvbWlzZTxSZXN1bHQ8c3RyaW5nLCBFcnJvcj4+LFxuICAgICAgc3RvcmFnZVR5cGU6IFN0b3JhZ2VUeXBlLFxuICAgICAgb3B0aW9uczogUGFydGlhbDxTdG9yYWdlT3B0aW9ucz4gPSB7fSxcbiAgICApOiBQcm9taXNlPFByb3BlcnRpZXM+ID0+IHtcbiAgICAgIGlmICghaW5wdXQgfHwgIWlucHV0LmZpbGVzKSB7XG4gICAgICAgIHJldHVybiB7fTtcbiAgICAgIH1cblxuICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoICYmICFmaWxlLnVyaSkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZh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2UnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5pbWFnZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc0ltYWdlVXJsKG1ldGFkYXRhLmltYWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3JveWFsdHknOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5yb3lhbHR5KSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzUm95YWx0eShtZXRhZGF0YS5yb3lhbHR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlcl9mZWVfYmFzaXNfcG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEgJiYgbWV0YWRhdGEuc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICdzZWxsZXJGZWVCYXNpc1BvaW50cyc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU2VsbGVyRmVlQmFzaXNQb2ludHMobWV0YWRhdGEuc2VsbGVyRmVlQmFzaXNQb2ludHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnbmFtZSc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEubmFtZSkge1xuICAgICAgICAgICAgICByZXMgPSBpc05hbWUobWV0YWRhdGEubmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICA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b25zb2xlLndhcm4oQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5EQVNfQVBJX1VSTCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKENvbnN0YW50cy5XYXJubmluZ01lc3NhZ2UuRklMRUJBU0VfQ1JFREVOVElBTCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIENvbmZpZy5maWxlYmFzZTtcbiAgICAgIH1cbiAgICAgIGR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IFB1YmtleSxcbiAgICAgIGFsbG93T3duZXJPZmZDdXJ2ZSA9IGZhbHNlLFxuICAgICk6IFByb21pc2U8e1xuICAgICAgdG9rZW5BY2NvdW50OiBzdHJpbmc7XG4gICAgICBpbnN0OiBUcmFuc2FjdGlvbkluc3RydWN0aW9uIHwgdW5kZWZpbmVkO1xuICAgIH0+ID0+IHtcbiAgICAgIGNvbnN0IGFzc29jaWF0ZWRUb2tlbkFjY291bnQgPSBnZXRBc3NvY2lhdGVkVG9rZW5BZGRyZXNzU3luYyhcbiAgICAgICAgbWludC50b1B1YmxpY0tleSgpLFxuICAgICAgICBvd25lci50b1B1YmxpY0tleSgpLFxuICAgICAgICBhbGxvd093bmVyT2ZmQ3VydmUsXG4gICAgICAgIFRPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgIEFTU09DSUFURURfVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICk7XG5cbiAgICAgIGRlYnVnTG9nKCcjIGFzc29jaWF0ZWRUb2tlbkFjY291bnQ6ICcsIGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSk7XG5cbiAgICAgIHRyeSB7XG4gICAgICAgIC8vIERvbnQgdXNlIFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1wb3J0IHsgUHVia2V5LCBTZWNyZXQgfSBmcm9tICd+L3R5cGVzL2FjY291bnQnO1xuaW1wb3J0IGJzIGZyb20gJ2JzNTgnO1xuXG5leHBvcnQgbmFtZXNwYWNlIEFjY291bnQge1xuICBleHBvcn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vbW1vbk9yTWludEluc3QuZmlsdGVyKFxuICAgICAgICAgIChpbnN0KSA9PiBpbnN0LmZlZVBheWVyICE9PSB1bmRlZmluZWQsXG4gICAgICAgICk7XG4gICAgICAgIGxldCBmZWVQYXllciA9IHNpZ25lcnNbMF07XG4gICAgICAgIGlmIChmZWVQYXllcnMubGVuZ3RoID4gMCAmJiBmZWVQYXllcnNbMF0uZmVlUGF5ZXIpIHtcbiAgICAgICAgICBmZWVQYXllciA9IGZlZVBheWVyc1swXS5mZWVQYXllcjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRyYW5zYWN0aW9uID0gbmV3IFRyYW5zYWN0aW9uKCk7XG4gICAgICAgIGxldCBmaW5hbFNpZ25lcnMgPSBzaWduZXJzO1xuICAgICAgICBpZiAoZmVlUGF5ZXIpIHtcbiAgICAgICAgICB0cmFuc2FjdGlvbi5mZWVQYXllciA9IGZlZVBheWVyLnB1YmxpY0tleTtcbiAgICAgICAgICBmaW5hbFNpZ25lcnMgPSBbZmVlUGF5ZXIsIC4uLnNpZ25lcnNdO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQ2FsY3VsYXRlVHhzaXplLmlzTWF4VHJhbnNhY3Rpb25TaXplKHRyYW5zYWN0aW9uLCBmZWVQYXllci5wdWJsaWNLZXkpO1xuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9yd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ZXkpID0+IGtleS5wdWJrZXkpLFxuICAgICAgICApXG4gICAgICAgIC5mbGF0KCk7XG5cbiAgICAgIGNvbnN0IHVuaXFXcml0YWJsZUFjY291bnRzID0gW1xuICAgICAgICAuLi5uZXcgU2V0KHdyaXRhYmxlQWNjb3VudHMubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvQmFzZTU4KCkpKSxcbiAgICAgIF1cbiAgICAgICAgLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b1B1YmxpY0tleSgpKVxuICAgICAgICAuc2xpY2UoMCwgTUFYX1JFQ0VOVF9QUklPUklUWV9GRUVfQUNDT1VOVFMpO1xuXG4gICAgICBjb25zdCBwcmlvcml0eUZlZXMgPVxuICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpb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HJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgIH1cbiAgICAgIH0pO1x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tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgfVxufVxuIiwgImltcG9ydCB7XG4gIENvbmZpcm1PcHRpb25zLFxuICBUcm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Ik1lc3NhZ2UiLCAiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/packages/validator/dist/index.mjs b/packages/validator/dist/index.mjs index 3207bfec3..040ad2616 100644 --- a/packages/validator/dist/index.mjs +++ b/packages/validator/dist/index.mjs @@ -18,7 +18,7 @@ var Constants; -------------------------------------- You need to update dasApiUrl define parameter in solana-suite.json. can get api url from https://www.helius.dev/ - -------------------------------------- + -------------------------------------- `; })(WarnningMessage = Constants2.WarnningMessage || (Constants2.WarnningMessage = {})); })(Constants || (Constants = {})); @@ -54,7 +54,8 @@ var Constants; Constants2.FilebaseCredential = { dev: { key: "9CA51CEFF9FF98CB91CF", - secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo" + secret: "CgjYuMvs2NdFGbLPyFDSWESaO05nobQ9mp16PPDo", + bucket: "solana-suite" } }; Constants2.switchCluster = (param) => { @@ -110,13 +111,13 @@ var Constants; Constants2.switchFilebaseCredential = (env) => { switch (env) { case "mainnet-beta" /* prd */: { - if (!Config.filebase.key || !Config.filebase.secret) { + if (!Config.filebase.key || !Config.filebase.secret || !Config.filebase.bucket) { throw Error(Constants2.WarnningMessage.FILEBASE_CREDENTIAL); } return Config.filebase; } default: { - if (Config.filebase.key || Config.filebase.secret) { + if (Config.filebase.key && Config.filebase.secret && Config.filebase.bucket) { return Config.filebase; } return Constants2.FilebaseCredential.dev; @@ -1703,4 +1704,4 @@ export { Validator, ValidatorError }; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc3VpdGUtdXRpbHMvc3JjL2NvbnN0YW50cy50cyIsICIuLi8uLi9nbG9iYWwvc3JjL2luZGV4LnRzIiwgIi4uLy4uL25vZGUvc3JjL2luZGV4LnRzIiwgIi4uLy4uL2FjY291bnQvc3JjL2Fzc29jaWF0ZWQudHMiLCAiLi4vLi4vYWNjb3VudC9zcmMva2V5cGFpci50cyIsICIuLi8uLi9hY2NvdW50L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IFJlc3VsdFxuICAgICAgICBhd2FpdCBnZXRBY2NvdW50KFxuICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCkuY29tbWl0bWVudCxcbiAgICAgICAgICBUT0tFTl9QUk9HUkFNX0lELFxuICAgICAgICApO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHRva2VuQWNjb3VudDogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQs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NhY3Rpb25TaXplKHRyYW5zYWN0aW9uLCBmZWVQYXllci5wdWJsaWNLZXkpO1xuXG4gICAgICAgIGlmIChvcHRpb25zLmlzUHJpb3JpdHlGZWUpIHtcbiAgICAgICAgICBpbnN0cnVjdGlvbnMudW5zaGlmdChcbiAgICAgICAgICAgIGF3YWl0IFByaW9yaXR5RmVlLlByaW9yaXR5RmVlLmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgICBpbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcH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yYzQwMDhiZmU4OWNiZjA4YmEvdHMvY2xpZW50L3NyYy9jbGllbnQudHMjTDQ1NTJcbiAgICBleHBvcnQgY29uc3QgZXN0aW1hdGVQcmlvcml0eUZlZSA9IGFzeW5jIChcbiAgICAgIGluc3RydWN0aW9uczogVHJhbnNhY3Rpb25JbnN0cnVjdGlvbltdLFxuICAgICk6IFByb21pc2U8bnVtYmVyPiA9PiB7XG4gICAgICBjb25zdCB3cml0YWJsZUFjY291bnRzID0gaW5zdHJ1Y3Rpb25zXG4gICAgICAgIC5tYXAoKGluc3QpID0+XG4gICAgICAgICAgaW5zdC5rZXlzXG4gICAgICAgICAgICAuZmlsdGVyKChhY2NvdW50KSA9PiBhY2NvdW50LmlzV3JpdGFibGUpXG4gICAgICAgICAgICAubWFwKChrZXkpID0+IGtleS5wdWJrZXkpLFxuICAgICAgICApXG4gICAgICAgIC5mbGF0KCk7XG5cbiAgICAgIGNvbnN0IHVuaXFXcml0YWJsZUFjY291bnRzID0gW1xuICAgICAgICAuLi5uZXcgU2V0KHdyaXRhYmxlQWNjb3VudHMubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvQmFzZTU4KCkpKSxcbiAgICAgIF1cbiAgICAgICAgLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b1B1YmxpY0tleSgpKVxuICAgICAgICAuc2xpY2UoMCwgTUFYX1JFQ0VOVF9QUklPUklUWV9GRUVfQUNDT1VOVFMpO1xuXG4gICAgICBjb25zdCBwcmlvcml0eUZlZXMgPVxuICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZUJ5U2xvdCkuc29ydChcbiAgICAgICAgKGE6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcywgYjogUmVjZW50UHJpb3JpdGl6YX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lvcml0eUZlZSkge1xuICAgICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgICBhd2FpdCBQcmlvcml0eUZlZS5Qcmlvcml0eUZlZS5jcmVhdGVJbnN0cnVjdGlvbihcbiAgICAgICAgICAgICAgdGhpcy5pbnN0cnVjdGlvbnMsXG4gICAgICAgICAgICAgIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0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BTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcbiAgICBjb25zdCBhY2NvdW50cyA9IG5ldyBTZXQ8c3RyaW5nPihmZWVQYXllclBrKTtcblxuICAgIGNvbnN0IGl4c1NpemUgPSB0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMucmVkdWNlKChhY2MsIGl4KSA9PiB7XG4gICAgICBpeC5rZXlzLmZvckVhY2goKHsgcHVia2V5LCBpc1NpZ25lciB9KSA9PiB7XG4gICAgICAgIGNvbnN0IHBrID0gcHVia2V5LnRvQmFzZTU4KCk7XG4gICAgICAgIGlmIChpc1NpZ25lcikgc2lnbmVycy5hZGQocGspO1xuICAgICAgICBhY2NvdW50cy5hZGQocGspO1xuICAgICAgfSk7XG5cbiAgICAgIGFjY291bnRzLmFkZChpeC5wcm9ncmFtSWQudG9CYXNlNTgoKSk7XG5cbiAgICAgIGNvbnN0IG5JbmRleGVzID0gaXgua2V5cy5sZW5ndGg7XG4gICAgICBjb25zdCBvcGFxdWVEYXRhID0gaXguZGF0YS5sZW5ndGg7XG5cbiAgICAgIHJldHVybiAoXG4gICAgICAgIGFjYyArXG4gICAgICAgIDEgKyAvLyBQSUQgaW5kZXhcbiAgICAgICAgY29tcGFjdEFycmF5U2l6ZShuSW5kZXhlcywgMSkgK1xuICAgICAgICBjb21wYWN0QXJyYXlTaXplKG9wYXF1ZURhdGEsIDEpXG4gICAgICApO1xuICAgIH0sIDApO1xuXG4gICAgcmV0dXJuIChcbiAgICAgIGNvbXBhY3RBcnJheVNpemUoc2lnbmVycy5zaXplLCA2NCkgKyAvLyBzaWduYXR1cmVzXG4gICAgICAzICsgLy8gaGVhZGVyXG4gICAgICBjb21wYWN0QXJyYXlTaXplKGFjY291bnRzLnNpemUsIDMyKSArIC8vIGFjY291bnRzXG4gICAgICAzMiArIC8vIGJsb2NraGFzaFxuICAgICAgY29tcGFjdEhlYWRlcih0cmFuc2FjdGlvbi5pbnN0cnVjdGlvbnMubGVuZ3RoKSArIC8vIG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PSBhd2FpdCBQcm9taXNlLmFsbChcbiAgICAgICAgaW5wdXQuZmlsZXMubWFwKGFzeW5jIChmaWxlKSA9PiB7XG4gICAgICAgICAgaWYgKCFmaWxlLmZpbGVQYXRoICYmICFmaWxlLnVyaSkge1xuICAgICAgICAgICAgcmV0dXJuIHt9O1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoZmlsZS5maWxlUGF0aCkge1xuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgY2FsbGJhY2tGdW5jKFxuICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZmlsZTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZS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xMX05VTUJFUiwgcm95YWx0eSwge1xuICAgICAgICAgIHRocmVzaG9sZDogUk9ZQUxUWV9NSU4sXG4gICAgICAgICAgY29uZGl0aW9uOiAndW5kZXJNaW4nLFxuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSBpZiAocm95YWx0eSA+IFJPWUFMVFlfTUFYKSB7XG4gICAgICAgIHRocm93IGNyZWF0ZUVycm9yKGtleSwgTWVzc2FnZS5CSUdfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01BWCxcbiAgICAgICAgICBjb25kaXRpb246ICdvdmVyTWF4JyxcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gTWVzc2FnZS5TVUNDRVNTO1xuICAgIH0pO1xuICB9O1xuXG4gIGV4cG9ydCBjb25zdCBpc1NlbGxlckZlZUJhc2lzUG9pbnRzID0gKFxuICAgIHJveWFsdHk6IG51bWJlcixcbiAgKTogUmVzdWx0PHN0cmluZywgVmFsaWRhdG9yRXJyb3I+ID0+IHtcbiAgICByZXR1cm4gVHJ5KCgpID0+IHtcbiAgICAgIGNvbnN0IGtleSA9ICdzZWxsZXJGZWVCYXNpc1BvaW50cy9zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cyc7XG4gICAgICBpZiAocm95YWx0eSAhPT0gMCAmJiAhcm95YWx0eSkge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuRU1QVFksIHJveWFsdHkpO1xuICAgICAgfVxuICAgICAgaWYgKHJveWFsdHkgPCBST1lBTFRZX01JTikge1xuICAgICAgICB0aHJvdyBjcmVhdGVFcnJvcihrZXksIE1lc3NhZ2UuU01BTExfTlVNQkVSLCByb3lhbHR5LCB7XG4gICAgICAgICAgdGhyZXNob2xkOiBST1lBTFRZX01JTixcbiAgICAgICAgICBjb25kaXRpb246ICd1bmRlck1pbicsXG4gICAgICAgIH0pO1xuICAgICAgfSBlbHNlI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dHJpbmcsIFZhbGlkYXRvckVycm9yPjtcbiAgICAgICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgICBjYXNlICdpbWFnZSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLmltYWdlKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzSW1hZ2VVcmwobWV0YWRhdGEuaW1hZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKS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xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoY3VzdG9tRGFzQXBpVXJsLmxlbmd0aCA8IDEpIHtcbiAgICAgICAgICBjb25zb2xlLndhcm4oQ29uc3RhbnRzLldhcm5uaW5nTWVzc2FnZS5EQVNfQVBJX1VSTCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXJscyA9IENvbnN0YW50cy5EYXNBcGlVcmwucHJkLnNwbGl0KCcsJyk7XG4gICAgICAgIGNvbnN0IGluZGV4ID0gRGF0ZS5ub3coKSAlIHVybHMubGVuZ3RoO1xuICAgICAgICByZXR1cm4gdXJsc1tpbmRleF07XG4gICAgICB9XG4gICAgICBkZWZhdWx0OiB7XG4gICAgICAgIGNvbnN0IHVybHMgPSBDb25zdGFudHMuRGFzQXBpVXJsLmRldi5zcGxpdCgnLCcpO1xuICAgICAgICBjb25zdCBpbmRleCA9IERhdGUubm93KCkgJSB1cmxzLmxlbmd0aDtcbiAgICAgICAgcmV0dXJuIHVybHNbaW5kZXhdO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICBleHBvcnQgY29uc3Qgc3dpdGNoRmlsZWJhc2VDcmVkZW50aWFsID0gKFxuICAgIGVudjogc3RyaW5nLFxuICApOiB7XG4gICAga2V5OiBzdHJpbmc7XG4gICAgc2VjcmV0OiBzdHJpbmc7XG4gICAgYnVja2V0OiBzdHJpbmc7XG4gIH0gPT4ge1xuICAgIHN3aXRjaCAoZW52KSB7XG4gICAgICBjYXNlIENvbnN0YW50cy5DbHVzdGVyLnByZDoge1xuICAgICAgICBpZiAoXG4gICAgICAgICAgIUNvbmZpZy5maWxlYmFzZS5rZXkgfHxcbiAgICAgICAgICAhQ29uZmlnLmZpbGViYXNlLnNlY3JldCB8fFxuICAgICAgICAgICFDb25maWcuZmlsZWJhc2UuYnVja2V0XG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm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DogYXNzb2NpYXRlZFRva2VuQWNjb3VudC50b1N0cmluZygpLFxuICAgICAgICAgIGluc3Q6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICAgIH0gY2F0Y2ggKGVycm9yOiB1bmtub3duKSB7XG4gICAgICAgIGlmIChcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5BY2NvdW50Tm90Rm91bmRFcnJvcikgJiZcbiAgICAgICAgICAhKGVycm9yIGluc3RhbmNlb2YgVG9rZW5JbnZhbGlkQWNjb3VudE93bmVyRXJyb3IpXG4gICAgICAgICkge1xuICAgICAgICAgIHRocm93IEVycm9yKCdVbmV4cGVjdGVkIGVycm9yJyk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBwYXllciA9ICFmZWVQYXllciA/IG93bmVyIDogZmVlUGF5ZXI7XG5cbiAgICAgICAgY29uc3QgaW5zdCA9IGNyZWF0ZUFzc29jaWF0ZWRUb2tlbkFjY291bnRJbnN0cnVjdGlvbihcbiAgICAgICAgICBwYXllci50b1B1YmxpY0tleSgpLFxuICAgICAgICAgIGFzc29jaWF0ZWRUb2tlbkFjY291bnQsXG4gICAgICAgICAgb3duZXIudG9QdWJsaWNLZXkoKSxcbiAgICAgICAgICBtaW50LnRvUHVibGljS2V5KCksXG4gICAgICAgICAgVE9LRU5fUFJPR1JBTV9JRCxcbiAgICAgICAgICBBU1NPQ0lBVEVEX1RPS0VOX1BST0dSQU1fSUQsXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0b2tlbkFjY291bnQ6IGFzc29jaWF0ZWRUb2tlbkFjY291bnQudG9TdHJpbmcoKSxcbiAgICAgICAgICBpbnN0LFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH07XG4gIH1cbn1cbiIsICJpbXBvcnQgeyBLZXlwYWlyIGFzIE9yaWdpbmFsLCBQdWJsaWNLZXkgfSBmcm9tICdAc29sYW5hL3dlYjMuanMnO1xuaW1w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gIG9wdGlvbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGluc3RydWN0aW9ucy51bnNoaWZ0KFxuICAgICAgICAgIGF3YWl0IENvbXB1dGVVbml0LkNvbXB1dGVVbml0LmNyZWF0ZUluc3RydWN0aW9uKFxuICAgICAgICAgICAgaW5zdHJ1Y3Rpb25zLFxuICAgICAgICAgICAgZmluYWxTaWduZXJzWzBdLFxuICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgICAgIGluc3RydWN0aW9ucy5tYXAoKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAg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gICAgICAgIC5tYXAoKGluc3QpID0+XG4gICAgICAgICAgaW5zdC5rZXlzXG4gICAgICAgICAgICAuZmlsdGVyKChhY2NvdW50KSA9PiBhY2NvdW50LmlzV3JpdGFibGUpXG4gICAgICAgICAgICAubWFwKChrZXkpID0+IGtleS5wdWJrZXkpLFxuICAgICAgICApXG4gICAgICAgIC5mbGF0KCk7XG5cbiAgICAgIGNvbnN0IHVuaXFXcml0YWJsZUFjY291bnRzID0gW1xuICAgICAgICAuLi5uZXcgU2V0KHdyaXRhYmxlQWNjb3VudHMubWFwKChhY2NvdW50KSA9PiBhY2NvdW50LnRvQmFzZTU4KCkpKSxcbiAgICAgIF1cbiAgICAgICAgLm1hcCgoYWNjb3VudCkgPT4gYWNjb3VudC50b1B1YmxpY0tleSgpKVxuICAgICAgICAuc2xpY2UoMCwgTUFYX1JFQ0VOVF9QUklPUklUWV9GRUVfQUNDT1VOVFMpO1xuXG4gICAgICBjb25zdCBwcmlvcml0eUZlZXMgPVxuICAgICAgICBhd2FpdCBOb2RlLmdldENvbm5lY3Rpb24oKS5nZXRSZWNlbnRQcmlvcml0aXphdGlvbkZlZXMoe1xuICAgICAgICAgIGxvY2tlZFdyaXRhYmxlQWNjb3VudHM6IHVuaXFXcml0YWJsZUFjY291bnRzLFxuICAgICAgICB9KTtcblxuICAgICAgaWYgKHByaW9yaXR5RmVlcy5sZW5ndGggPCAxKSB7XG4gICAgICAgIGRlYnVnTG9nKCcjIGdldCByZWNlbnQgcHJpb3JpdHkgZmVlczogJywgcHJpb3JpdHlGZWVzKTtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgICB9XG5cbiAgICAgIGNvbnN0IGdyb3VwQnlTbG90ID0gcHJpb3JpdHlGZWVzLnJlZHVjZShcbiAgICAgICAgKGFjYywgZmVlKSA9PiB7XG4gICAgICAgICAgY29uc3Qga2V5ID0gZmVlLnNsb3Q7XG4gICAgICAgICAgaWYgKCFhY2Nba2V5XSkge1xuICAgICAgICAgICAgYWNjW2tleV0gPSBbXTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYWNjW2tleV0ucHVzaChmZWUpO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlc1tdPixcbiAgICAgICk7XG5cbiAgICAgIGNvbnN0IG1heEZlZUJ5U2xvdCA9IE9iamVjdC5rZXlzKGdyb3VwQnlTbG90KS5yZWR1Y2UoXG4gICAgICAgIChhY2MsIHNsb3QpID0+IHtcbiAgICAgICAgICBhY2Nbc2xvdF0gPSBncm91cEJ5U2xvdFtzbG90XS5yZWR1Y2UoKG1heCwgZmVlKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gZmVlLnByaW9yaXRpemF0aW9uRmVlID4gbWF4LnByaW9yaXRpemF0aW9uRmVlID8gZmVlIDogbWF4O1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgIH0sXG4gICAgICAgIHt9IGFzIFJlY29yZDxzdHJpbmcsIFJlY2VudFByaW9yaXRpemF0aW9uRmVlcz4sXG4gICAgICApO1xuICAgICAgY29uc3QgbWF4aW11bUZlZXMgPSBPYmplY3QudmFsdWVzKG1heEZlZUJ5U2xvdCkuc29ydChcbiAgICAgICAgKGE6IFJlY2VudFByaW9yaXRpemF0aW9uRmVlcywgYjogUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzKSA9PlxuICAgICAgICAgIGEuc2xvdCAtIGIuc2xvdCxcbiAgICAgICkgYXMgUmVjZW50UHJpb3JpdGl6YXRpb25GZWVzW107XG5cbiAgICAgIC8vIGdldCBtZWRpYW4gb2YgbGFzdCAyMCBmZWVzXG4gICAgICBjb25zdCByZWNlbnRGZWVzID0gbWF4aW11bUZlZXMuc2xpY2UoXG4gICAgICAgIE1hdGgubWF4KG1heGltdW1GZWVzLmxlbmd0aCAtIDIwLCAwKSxcbiAgICAgICk7X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vbnMuYWRkU29sUHJpb3JpdHlGZWUsXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICByZXR1cm4gYXdhaXQgc2VuZEFuZENvbmZpcm1UcmFuc2FjdGlvbihcbiAgICAgICAgICAgIE5vZGUuZ2V0Q29ubmVjdGlvbigpLFxuICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICBmaW5hbFNpZ25lcnMsXG4gICAgICAgICAgICBjb25maXJtT3B0aW9ucyxcbiAgICAgICAgICApO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgIGlmIChSZXRyeS5SZXRyeS5pc0NvbXB1dGVCdWRnZXRFcnJvcihlcnJvcikpIHtcbiAgICAgICAgICAgIHJldHVybiBhd2FpdCBSZXRyeS5SZXRyeS5zdWJtaXQoXG4gICAgICAgICAgICAgIHRyYW5zYWN0aW9uLFxuICAgICAgICAgICAgICBmaW5hb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cbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLnVuc2hpZnQoXG4gICAgICAgICAgYXdhaXQgQ29tcHV0ZVVuaXQuQ29tcHV0ZVVuaXQuY3JlYXRlSW5zdHJ1Y3Rpb24oXG4gICAgICAgICAgICB0aGlzLmluc3RydWN0aW9ucyxcbiAgICAgICAgICAgIGZpbmFsU2lnbmVyc1swXSxcbiAgICAgICAgICApLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuaW5zdHJ1Y3Rpb25zLmZvckVhY2goKGluc3QpID0+IHRyYW5zYWN0aW9uLmFkZChpbnN0KSk7XG5cbiAgICAgICAgY29uc3QgY29uZmlybU9wdGlvbnM6IENvbmZpcm1PcHRpb25zID0ge1xuICAgICAgICAgIG1heFJldHJpZXM6IENvbnN0YW50cy5NQVhfVFJBTlNBQ1RJT05fUkVUUklFUyxcbiAgICAgICAgfTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIHJldHVybiBhd2FpdCBzZW5kQW5kQ29uZmlybVRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgTm9kZS5nZXRDb25uZWN0aW9uKCksXG4gICAgICAgICAgICB0cmFuc2FjdGlvbixcbiAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgIGNvbmZpcm1PcHRpb25zLFxuICAgICAgICAgICk7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgaWYgKFJldHJ5LlJldHJ5LmlzQ29tcHV0ZUJ1ZGdldEVycm9yKGVycm9yKSkge1xuICAgICAgICAgICAgcmV0dXJuIGF3YWl0IFJldHJ5LlJldHJ5LnN1Ym1pdChcbiAgICAgICAgICAgICAgdHJhbnNhY3Rpb24sXG4gICAgICAgICAgICAgIGZpbmFsU2lnbmVycyxcbiAgICAgICAgICAgICAgY29uZmlybU9wdGlvbnMsXG4gICAgICAgICAgICApO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ICAgICAgICAgICAgICBmaWxlLmZpbGVQYXRoISxcbiAgICAgICAgICAgICAgc3RvcmFnZVR5cGUsXG4gICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJlcy5pc0Vycikge1xuICAgICAgICAgICAgICB0aHJvdyBFcnJvcihyZXMuZXJyb3IubWVzc2FnZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb3ZlcndyaXRlT2JqZWN0KGZpbGUsIFtcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGV4aXN0c0tleTogJ2ZpbGVQYXRoJyxcbiAgICAgICAgICAgICAgICB3aWxsOiB7IGtleTogJ3VyaScsIHZhbHVlOiByZXMudmFsdWUgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gZmlsZTtcbiAgICAgICAgfSksXG4gICAgICApO1xuICAgICAgcmV0dXJuIHsgLi4uaW5wdXQsIGZpbGVzIH0gYXMgUHJvcGVydGllcztcbiAgICB9O1xuICB9XG59XG4iLCAiLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLXVudXNlZC12YXJzICovXG5pbXBvcnQgeyBPcHRpb24sIFVzZXMgfSBmcm9tICd+L3R5cGVzL3JlZ3VsYXItbmZ0JztcblxuZXhwb3J0IG5hbWVzcGFjZSBDb252ZXJ0ZXIge1xuICBleHBvcnQgbmFtZXNwYWNlIFVzZXMge1xuICAgIGV4cG9ydCBjb25zdCBpbnRvVXNlclNpZGUgPSAob3V0cHV0OiBPcHRpb248VXNlcz4pOiBVc2VzIHwgdW5kZWZpbmVkID0+IHtcbiAgICAgIGlmICghb3V0cHV0KSB7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICB9XG4gICAgICByZXR1cm4gb3V0cHV0O1xuICAgIH07XG4gIH1cbn1cbiIsICJpb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ZSAncm95YWx0eSc6XG4gICAgICAgICAgICBpZiAoa2V5IGluIG1ldGFkYXRhICYmIG1ldGFkYXRhLnJveWFsdHkpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNSb3lhbHR5KG1ldGFkYXRhLnJveWFsdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAnc2VsbGVyX2ZlZV9iYXNpc19wb2ludHMnOlxuICAgICAgICAgICAgaWYgKGtleSBpbiBtZXRhZGF0YSAmJiBtZXRhZGF0YS5zZWxsZXJfZmVlX2Jhc2lzX3BvaW50cykge1xuICAgICAgICAgICAgICByZXMgPSBpc1NlbGxlckZlZUJhc2lzUG9pbnRzKG1ldGFkYXRhLnNlbGxlcl9mZWVfYmFzaXNfcG9pbnRzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3NlbGxlckZlZUJhc2lzUG9pbnRzJzpcbiAgICAgICAgICAgIGlmIChrZXkgaW4gbWV0YWRhdGEpIHtcbiAgICAgICAgICAgICAgcmVzID0gaXNTZWxsZXJGZWVCYXNpc1BvaW50cyhtZXRhZGF0YS5zZWxsZXJGZWVCYXNpc1BvaW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlICduYW1lJzpcbiAgICAgICAgICAgIGlmIChtZXRhZGF0YS5uYW1lKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzTmFtZShtZXRhZGF0YS5uYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgJ3N5bWJvbCc6XG4gICAgICAgICAgICBpZiAobWV0YWRhdGEuc3ltYm9sKSB7XG4gICAgICAgICAgICAgIHJlcyA9IGlzU3ltYm9sKG1ldGFkYXRhLnN5bWJvbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztc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AiQ29udmVydGVyIl0KfQo= \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 02b750bbb..5d4bbb6ce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,11 +9,11 @@ importers: .: dependencies: '@types/node': - specifier: ^20.14.2 - version: 20.14.10 + specifier: ^20.16.4 + version: 20.16.4 typedoc-material-theme: - specifier: ^1.0.2 - version: 1.1.0(typedoc@0.25.13) + specifier: ^1.1.0 + version: 1.1.0(typedoc@0.25.13(typescript@5.5.3)) devDependencies: ava: specifier: ^5.3.1 @@ -29,40 +29,40 @@ importers: version: 3.0.3 ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@20.14.10)(typescript@5.4.5) + version: 10.9.2(@types/node@20.16.4)(typescript@5.5.3) tsc-alias: specifier: ^1.8.10 version: 1.8.10 tslib: - specifier: ^2.6.3 - version: 2.6.3 + specifier: ^2.7.0 + version: 2.7.0 tsup: - specifier: ^8.1.0 - version: 8.1.0(ts-node@10.9.2)(typescript@5.4.5) + specifier: ^8.2.4 + version: 8.2.4(postcss@8.4.44)(tsx@3.14.0)(typescript@5.5.3)(yaml@2.4.5) tsx: specifier: ^3.14.0 version: 3.14.0 turbo: - specifier: ^2.0.3 - version: 2.0.6 + specifier: ^2.1.1 + version: 2.1.1 typedoc: specifier: ^0.25.13 - version: 0.25.13(typescript@5.4.5) + version: 0.25.13(typescript@5.5.3) packages/account: dependencies: '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 - version: 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) + version: 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana-suite/config': specifier: workspace:* version: link:../suite-config '@solana/spl-token': specifier: ^0.3.8 - version: 0.3.11(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22) + version: 0.3.11(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bn.js: specifier: ^5.2.1 version: 5.2.1 @@ -71,7 +71,7 @@ importers: version: 4.0.1 mpl-bubblegum-instructions: specifier: github:fukaoi/mpl-bubblegum-instructions - version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(fastestsmallesttextencoderdecoder@1.0.22) + version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) devDependencies: '@solana-suite/spl-token': specifier: workspace:* @@ -107,7 +107,7 @@ importers: devDependencies: '@typescript-eslint/eslint-plugin': specifier: ^6.7.0 - version: 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.5.3) + version: 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3) '@typescript-eslint/parser': specifier: ^6.7.0 version: 6.21.0(eslint@8.57.0)(typescript@5.5.3) @@ -116,10 +116,10 @@ importers: version: 8.57.0 eslint-config-standard-with-typescript: specifier: ^39.0.0 - version: 39.1.1(@typescript-eslint/eslint-plugin@6.21.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.4.0)(eslint@8.57.0)(typescript@5.5.3) + version: 39.1.1(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.4.0(eslint@8.57.0))(eslint@8.57.0)(typescript@5.5.3) eslint-plugin-import: specifier: ^2.28.1 - version: 2.29.1(@typescript-eslint/parser@6.21.0)(eslint@8.57.0) + version: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0) eslint-plugin-n: specifier: ^16.1.0 version: 16.6.2(eslint@8.57.0) @@ -142,13 +142,13 @@ importers: dependencies: '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 - version: 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) + version: 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana-suite/utils': specifier: workspace:* version: link:../suite-utils '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bs58: specifier: ^4.0.1 version: 4.0.1 @@ -157,7 +157,7 @@ importers: version: 1.0.22 mpl-bubblegum-instructions: specifier: github:fukaoi/mpl-bubblegum-instructions - version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(fastestsmallesttextencoderdecoder@1.0.22) + version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) devDependencies: '@types/bs58': specifier: ^4.0.2 @@ -188,7 +188,7 @@ importers: version: link:../suite-config '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) devDependencies: build-configs/ava: specifier: workspace:* @@ -216,7 +216,7 @@ importers: version: link:../suite-config '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -250,7 +250,7 @@ importers: version: link:../suite-config '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) devDependencies: build-configs/ava: specifier: workspace:* @@ -272,16 +272,16 @@ importers: dependencies: '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 - version: 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) + version: 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana-suite/config': specifier: workspace:^ version: link:../suite-config '@solana/spl-token': specifier: ^0.3.8 - version: 0.3.11(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22) + version: 0.3.11(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -293,7 +293,7 @@ importers: version: 4.0.1 mpl-bubblegum-instructions: specifier: github:fukaoi/mpl-bubblegum-instructions - version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(fastestsmallesttextencoderdecoder@1.0.22) + version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) devDependencies: build-configs/eslint: specifier: workspace:* @@ -318,22 +318,22 @@ importers: version: 3.613.0 '@irys/sdk': specifier: ^0.0.3 - version: 0.0.3(arweave@1.15.1) + version: 0.0.3(arweave@1.15.1)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 - version: 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) + version: 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana-suite/config': specifier: workspace:* version: link:../suite-config '@solana/spl-account-compression': specifier: ^0.2.0 - version: 0.2.1(@solana/web3.js@1.95.0) + version: 0.2.1(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@solana/spl-token': specifier: ^0.3.8 - version: 0.3.11(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22) + version: 0.3.11(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -348,7 +348,7 @@ importers: version: 4.0.0 mpl-bubblegum-instructions: specifier: github:fukaoi/mpl-bubblegum-instructions - version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(fastestsmallesttextencoderdecoder@1.0.22) + version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) devDependencies: '@types/bs58': specifier: ^4.0.4 @@ -401,7 +401,7 @@ importers: dependencies: '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 - version: 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) + version: 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana-suite/config': specifier: workspace:^ version: link:../suite-config @@ -410,10 +410,10 @@ importers: version: 4.0.1 '@solana/spl-token': specifier: ^0.3.8 - version: 0.3.11(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22) + version: 0.3.11(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -425,7 +425,7 @@ importers: version: 4.0.1 mpl-bubblegum-instructions: specifier: github:fukaoi/mpl-bubblegum-instructions - version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(fastestsmallesttextencoderdecoder@1.0.22) + version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) devDependencies: build-configs/ava: specifier: workspace:* @@ -449,58 +449,6 @@ importers: specifier: workspace:* version: link:../test-tools - packages/suite-phantom: - dependencies: - '@aws-sdk/client-s3': - specifier: ^3.590.0 - version: 3.613.0 - '@irys/sdk': - specifier: ^0.0.3 - version: 0.0.3(arweave@1.15.1) - '@metaplex-foundation/mpl-token-metadata': - specifier: ^2.13.0 - version: 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) - '@solana-suite/config': - specifier: workspace:^ - version: link:../suite-config - '@solana/spl-token': - specifier: ^0.3.8 - version: 0.3.11(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22) - '@solana/web3.js': - specifier: ^1.78.5 - version: 1.95.0 - bignumber.js: - specifier: ^9.1.2 - version: 9.1.2 - bn.js: - specifier: ^5.2.1 - version: 5.2.1 - bs58: - specifier: ^4.0.1 - version: 4.0.1 - cross-fetch: - specifier: ^4.0.0 - version: 4.0.0 - mpl-bubblegum-instructions: - specifier: github:fukaoi/mpl-bubblegum-instructions - version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(fastestsmallesttextencoderdecoder@1.0.22) - devDependencies: - build-configs/eslint: - specifier: workspace:* - version: link:../build-configs/eslint - build-configs/prettier: - specifier: workspace:* - version: link:../build-configs/prettier - build-configs/tsconfig: - specifier: workspace:* - version: link:../build-configs/tsconfig - build-configs/tsup: - specifier: workspace:* - version: link:../build-configs/tsup - build-configs/typedoc: - specifier: workspace:* - version: link:../build-configs/typedoc - packages/suite-regular-nft: dependencies: '@aws-sdk/client-s3': @@ -508,19 +456,19 @@ importers: version: 3.613.0 '@irys/sdk': specifier: ^0.0.3 - version: 0.0.3(arweave@1.15.1) + version: 0.0.3(arweave@1.15.1)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 - version: 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) + version: 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana-suite/config': specifier: workspace:* version: link:../suite-config '@solana/spl-token': specifier: ^0.3.8 - version: 0.3.11(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22) + version: 0.3.11(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -535,7 +483,7 @@ importers: version: 4.0.0 mpl-bubblegum-instructions: specifier: github:fukaoi/mpl-bubblegum-instructions - version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(fastestsmallesttextencoderdecoder@1.0.22) + version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) devDependencies: '@types/bn.js': specifier: ^5.1.2 @@ -566,16 +514,16 @@ importers: dependencies: '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 - version: 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) + version: 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana-suite/config': specifier: workspace:^ version: link:../suite-config '@solana/spl-token': specifier: ^0.3.8 - version: 0.3.11(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22) + version: 0.3.11(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -587,7 +535,7 @@ importers: version: 4.0.1 mpl-bubblegum-instructions: specifier: github:fukaoi/mpl-bubblegum-instructions - version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(fastestsmallesttextencoderdecoder@1.0.22) + version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) devDependencies: build-configs/ava: specifier: workspace:* @@ -618,19 +566,19 @@ importers: version: 3.613.0 '@irys/sdk': specifier: ^0.0.3 - version: 0.0.3(arweave@1.15.1) + version: 0.0.3(arweave@1.15.1)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 - version: 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) + version: 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana-suite/config': specifier: workspace:^ version: link:../suite-config '@solana/spl-token': specifier: ^0.3.8 - version: 0.3.11(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22) + version: 0.3.11(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -645,7 +593,7 @@ importers: version: 4.0.0 mpl-bubblegum-instructions: specifier: github:fukaoi/mpl-bubblegum-instructions - version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(fastestsmallesttextencoderdecoder@1.0.22) + version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) devDependencies: build-configs/ava: specifier: workspace:* @@ -676,10 +624,10 @@ importers: version: 3.613.0 '@irys/sdk': specifier: ^0.0.4 - version: 0.0.4(arweave@1.15.1) + version: 0.0.4(arweave@1.15.1)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 - version: 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) + version: 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@smithy/protocol-http': specifier: ^4.0.1 version: 4.0.3 @@ -688,10 +636,10 @@ importers: version: link:../suite-config '@solana/spl-token': specifier: ^0.3.8 - version: 0.3.11(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22) + version: 0.3.11(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -703,7 +651,7 @@ importers: version: 4.0.1 mpl-bubblegum-instructions: specifier: github:fukaoi/mpl-bubblegum-instructions - version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(fastestsmallesttextencoderdecoder@1.0.22) + version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) pino: specifier: ^9.2.0 version: 9.2.0 @@ -734,16 +682,16 @@ importers: dependencies: '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 - version: 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) + version: 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana-suite/config': specifier: workspace:* version: link:../suite-config '@solana/spl-token': specifier: ^0.3.8 - version: 0.3.11(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22) + version: 0.3.11(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bignumber.js: specifier: ^9.1.2 version: 9.1.2 @@ -755,7 +703,7 @@ importers: version: 4.0.1 mpl-bubblegum-instructions: specifier: github:fukaoi/mpl-bubblegum-instructions - version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(fastestsmallesttextencoderdecoder@1.0.22) + version: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) devDependencies: build-configs/ava: specifier: workspace:* @@ -780,7 +728,7 @@ importers: dependencies: '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bs58: specifier: ^5.0.0 version: 5.0.0 @@ -808,10 +756,10 @@ importers: version: 4.0.1 '@solana/spl-token': specifier: ^0.3.8 - version: 0.3.11(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22) + version: 0.3.11(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) devDependencies: build-configs/ava: specifier: workspace:* @@ -836,7 +784,7 @@ importers: dependencies: '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) devDependencies: build-configs/eslint: specifier: workspace:* @@ -855,10 +803,10 @@ importers: dependencies: '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 - version: 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) + version: 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) '@solana/web3.js': specifier: ^1.78.5 - version: 1.95.0 + version: 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bn.js: specifier: ^5.2.1 version: 5.2.1 @@ -886,7 +834,7 @@ importers: dependencies: '@metaplex-foundation/mpl-token-metadata': specifier: ^2.13.0 - version: 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) + version: 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) fastestsmallesttextencoderdecoder: specifier: ^1.0.22 version: 1.0.22 @@ -1083,28 +1031,12 @@ packages: resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} - '@babel/generator@7.24.7': - resolution: {integrity: sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==} + '@babel/generator@7.25.6': + resolution: {integrity: sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==} engines: {node: '>=6.9.0'} - '@babel/helper-environment-visitor@7.24.7': - resolution: {integrity: sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-function-name@7.24.7': - resolution: {integrity: sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-hoist-variables@7.24.7': - resolution: {integrity: sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==} - engines: {node: '>=6.9.0'} - - '@babel/helper-split-export-declaration@7.24.7': - resolution: {integrity: sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-string-parser@7.24.7': - resolution: {integrity: sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==} + '@babel/helper-string-parser@7.24.8': + resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} '@babel/helper-validator-identifier@7.24.7': @@ -1115,8 +1047,8 @@ packages: resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.24.7': - resolution: {integrity: sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==} + '@babel/parser@7.25.6': + resolution: {integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==} engines: {node: '>=6.0.0'} hasBin: true @@ -1124,25 +1056,25 @@ packages: resolution: {integrity: sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==} engines: {node: '>=6.9.0'} - '@babel/template@7.24.7': - resolution: {integrity: sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==} + '@babel/template@7.25.0': + resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.24.7': - resolution: {integrity: sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==} + '@babel/traverse@7.25.6': + resolution: {integrity: sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==} engines: {node: '>=6.9.0'} - '@babel/types@7.24.7': - resolution: {integrity: sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==} + '@babel/types@7.25.6': + resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==} engines: {node: '>=6.9.0'} '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} - '@esbuild/aix-ppc64@0.21.5': - resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} - engines: {node: '>=12'} + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + engines: {node: '>=18'} cpu: [ppc64] os: [aix] @@ -1152,9 +1084,9 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.21.5': - resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} - engines: {node: '>=12'} + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + engines: {node: '>=18'} cpu: [arm64] os: [android] @@ -1164,9 +1096,9 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.21.5': - resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} - engines: {node: '>=12'} + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + engines: {node: '>=18'} cpu: [arm] os: [android] @@ -1176,9 +1108,9 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.21.5': - resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} - engines: {node: '>=12'} + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + engines: {node: '>=18'} cpu: [x64] os: [android] @@ -1188,9 +1120,9 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.21.5': - resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} - engines: {node: '>=12'} + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + engines: {node: '>=18'} cpu: [arm64] os: [darwin] @@ -1200,9 +1132,9 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.21.5': - resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} - engines: {node: '>=12'} + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + engines: {node: '>=18'} cpu: [x64] os: [darwin] @@ -1212,9 +1144,9 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.21.5': - resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} - engines: {node: '>=12'} + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + engines: {node: '>=18'} cpu: [arm64] os: [freebsd] @@ -1224,9 +1156,9 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.21.5': - resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} - engines: {node: '>=12'} + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + engines: {node: '>=18'} cpu: [x64] os: [freebsd] @@ -1236,9 +1168,9 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.21.5': - resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} - engines: {node: '>=12'} + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + engines: {node: '>=18'} cpu: [arm64] os: [linux] @@ -1248,9 +1180,9 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.21.5': - resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} - engines: {node: '>=12'} + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + engines: {node: '>=18'} cpu: [arm] os: [linux] @@ -1260,9 +1192,9 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.21.5': - resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} - engines: {node: '>=12'} + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + engines: {node: '>=18'} cpu: [ia32] os: [linux] @@ -1272,9 +1204,9 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.21.5': - resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} - engines: {node: '>=12'} + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + engines: {node: '>=18'} cpu: [loong64] os: [linux] @@ -1284,9 +1216,9 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.21.5': - resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} - engines: {node: '>=12'} + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + engines: {node: '>=18'} cpu: [mips64el] os: [linux] @@ -1296,9 +1228,9 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.21.5': - resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} - engines: {node: '>=12'} + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + engines: {node: '>=18'} cpu: [ppc64] os: [linux] @@ -1308,9 +1240,9 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.21.5': - resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} - engines: {node: '>=12'} + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + engines: {node: '>=18'} cpu: [riscv64] os: [linux] @@ -1320,9 +1252,9 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.21.5': - resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} - engines: {node: '>=12'} + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + engines: {node: '>=18'} cpu: [s390x] os: [linux] @@ -1332,9 +1264,9 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.21.5': - resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} - engines: {node: '>=12'} + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + engines: {node: '>=18'} cpu: [x64] os: [linux] @@ -1344,21 +1276,27 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.21.5': - resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} - engines: {node: '>=12'} + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + engines: {node: '>=18'} cpu: [x64] os: [netbsd] + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-x64@0.18.20': resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.21.5': - resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} - engines: {node: '>=12'} + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + engines: {node: '>=18'} cpu: [x64] os: [openbsd] @@ -1368,9 +1306,9 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.21.5': - resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} - engines: {node: '>=12'} + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + engines: {node: '>=18'} cpu: [x64] os: [sunos] @@ -1380,9 +1318,9 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.21.5': - resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} - engines: {node: '>=12'} + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + engines: {node: '>=18'} cpu: [arm64] os: [win32] @@ -1392,9 +1330,9 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.21.5': - resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} - engines: {node: '>=12'} + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + engines: {node: '>=18'} cpu: [ia32] os: [win32] @@ -1404,9 +1342,9 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.21.5': - resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} - engines: {node: '>=12'} + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -1665,83 +1603,83 @@ packages: '@randlabs/myalgo-connect@1.4.2': resolution: {integrity: sha512-K9hEyUi7G8tqOp7kWIALJLVbGCByhilcy6123WfcorxWwiE1sbQupPyIU5f3YdQK6wMjBsyTWiLW52ZBMp7sXA==} - '@rollup/rollup-android-arm-eabi@4.18.1': - resolution: {integrity: sha512-lncuC4aHicncmbORnx+dUaAgzee9cm/PbIqgWz1PpXuwc+sa1Ct83tnqUDy/GFKleLiN7ZIeytM6KJ4cAn1SxA==} + '@rollup/rollup-android-arm-eabi@4.21.2': + resolution: {integrity: sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.18.1': - resolution: {integrity: sha512-F/tkdw0WSs4ojqz5Ovrw5r9odqzFjb5LIgHdHZG65dFI1lWTWRVy32KDJLKRISHgJvqUeUhdIvy43fX41znyDg==} + '@rollup/rollup-android-arm64@4.21.2': + resolution: {integrity: sha512-xGU5ZQmPlsjQS6tzTTGwMsnKUtu0WVbl0hYpTPauvbRAnmIvpInhJtgjj3mcuJpEiuUw4v1s4BimkdfDWlh7gA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.18.1': - resolution: {integrity: sha512-vk+ma8iC1ebje/ahpxpnrfVQJibTMyHdWpOGZ3JpQ7Mgn/3QNHmPq7YwjZbIE7km73dH5M1e6MRRsnEBW7v5CQ==} + '@rollup/rollup-darwin-arm64@4.21.2': + resolution: {integrity: sha512-99AhQ3/ZMxU7jw34Sq8brzXqWH/bMnf7ZVhvLk9QU2cOepbQSVTns6qoErJmSiAvU3InRqC2RRZ5ovh1KN0d0Q==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.18.1': - resolution: {integrity: sha512-IgpzXKauRe1Tafcej9STjSSuG0Ghu/xGYH+qG6JwsAUxXrnkvNHcq/NL6nz1+jzvWAnQkuAJ4uIwGB48K9OCGA==} + '@rollup/rollup-darwin-x64@4.21.2': + resolution: {integrity: sha512-ZbRaUvw2iN/y37x6dY50D8m2BnDbBjlnMPotDi/qITMJ4sIxNY33HArjikDyakhSv0+ybdUxhWxE6kTI4oX26w==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.18.1': - resolution: {integrity: sha512-P9bSiAUnSSM7EmyRK+e5wgpqai86QOSv8BwvkGjLwYuOpaeomiZWifEos517CwbG+aZl1T4clSE1YqqH2JRs+g==} + '@rollup/rollup-linux-arm-gnueabihf@4.21.2': + resolution: {integrity: sha512-ztRJJMiE8nnU1YFcdbd9BcH6bGWG1z+jP+IPW2oDUAPxPjo9dverIOyXz76m6IPA6udEL12reYeLojzW2cYL7w==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.18.1': - resolution: {integrity: sha512-5RnjpACoxtS+aWOI1dURKno11d7krfpGDEn19jI8BuWmSBbUC4ytIADfROM1FZrFhQPSoP+KEa3NlEScznBTyQ==} + '@rollup/rollup-linux-arm-musleabihf@4.21.2': + resolution: {integrity: sha512-flOcGHDZajGKYpLV0JNc0VFH361M7rnV1ee+NTeC/BQQ1/0pllYcFmxpagltANYt8FYf9+kL6RSk80Ziwyhr7w==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.18.1': - resolution: {integrity: sha512-8mwmGD668m8WaGbthrEYZ9CBmPug2QPGWxhJxh/vCgBjro5o96gL04WLlg5BA233OCWLqERy4YUzX3bJGXaJgQ==} + '@rollup/rollup-linux-arm64-gnu@4.21.2': + resolution: {integrity: sha512-69CF19Kp3TdMopyteO/LJbWufOzqqXzkrv4L2sP8kfMaAQ6iwky7NoXTp7bD6/irKgknDKM0P9E/1l5XxVQAhw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.18.1': - resolution: {integrity: sha512-dJX9u4r4bqInMGOAQoGYdwDP8lQiisWb9et+T84l2WXk41yEej8v2iGKodmdKimT8cTAYt0jFb+UEBxnPkbXEQ==} + '@rollup/rollup-linux-arm64-musl@4.21.2': + resolution: {integrity: sha512-48pD/fJkTiHAZTnZwR0VzHrao70/4MlzJrq0ZsILjLW/Ab/1XlVUStYyGt7tdyIiVSlGZbnliqmult/QGA2O2w==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.18.1': - resolution: {integrity: sha512-V72cXdTl4EI0x6FNmho4D502sy7ed+LuVW6Ym8aI6DRQ9hQZdp5sj0a2usYOlqvFBNKQnLQGwmYnujo2HvjCxQ==} + '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': + resolution: {integrity: sha512-cZdyuInj0ofc7mAQpKcPR2a2iu4YM4FQfuUzCVA2u4HI95lCwzjoPtdWjdpDKyHxI0UO82bLDoOaLfpZ/wviyQ==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.18.1': - resolution: {integrity: sha512-f+pJih7sxoKmbjghrM2RkWo2WHUW8UbfxIQiWo5yeCaCM0TveMEuAzKJte4QskBp1TIinpnRcxkquY+4WuY/tg==} + '@rollup/rollup-linux-riscv64-gnu@4.21.2': + resolution: {integrity: sha512-RL56JMT6NwQ0lXIQmMIWr1SW28z4E4pOhRRNqwWZeXpRlykRIlEpSWdsgNWJbYBEWD84eocjSGDu/XxbYeCmwg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.18.1': - resolution: {integrity: sha512-qb1hMMT3Fr/Qz1OKovCuUM11MUNLUuHeBC2DPPAWUYYUAOFWaxInaTwTQmc7Fl5La7DShTEpmYwgdt2hG+4TEg==} + '@rollup/rollup-linux-s390x-gnu@4.21.2': + resolution: {integrity: sha512-PMxkrWS9z38bCr3rWvDFVGD6sFeZJw4iQlhrup7ReGmfn7Oukrr/zweLhYX6v2/8J6Cep9IEA/SmjXjCmSbrMQ==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.18.1': - resolution: {integrity: sha512-7O5u/p6oKUFYjRbZkL2FLbwsyoJAjyeXHCU3O4ndvzg2OFO2GinFPSJFGbiwFDaCFc+k7gs9CF243PwdPQFh5g==} + '@rollup/rollup-linux-x64-gnu@4.21.2': + resolution: {integrity: sha512-B90tYAUoLhU22olrafY3JQCFLnT3NglazdwkHyxNDYF/zAxJt5fJUB/yBoWFoIQ7SQj+KLe3iL4BhOMa9fzgpw==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.18.1': - resolution: {integrity: sha512-pDLkYITdYrH/9Cv/Vlj8HppDuLMDUBmgsM0+N+xLtFd18aXgM9Nyqupb/Uw+HeidhfYg2lD6CXvz6CjoVOaKjQ==} + '@rollup/rollup-linux-x64-musl@4.21.2': + resolution: {integrity: sha512-7twFizNXudESmC9oneLGIUmoHiiLppz/Xs5uJQ4ShvE6234K0VB1/aJYU3f/4g7PhssLGKBVCC37uRkkOi8wjg==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.18.1': - resolution: {integrity: sha512-W2ZNI323O/8pJdBGil1oCauuCzmVd9lDmWBBqxYZcOqWD6aWqJtVBQ1dFrF4dYpZPks6F+xCZHfzG5hYlSHZ6g==} + '@rollup/rollup-win32-arm64-msvc@4.21.2': + resolution: {integrity: sha512-9rRero0E7qTeYf6+rFh3AErTNU1VCQg2mn7CQcI44vNUWM9Ze7MSRS/9RFuSsox+vstRt97+x3sOhEey024FRQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.18.1': - resolution: {integrity: sha512-ELfEX1/+eGZYMaCIbK4jqLxO1gyTSOIlZr6pbC4SRYFaSIDVKOnZNMdoZ+ON0mrFDp4+H5MhwNC1H/AhE3zQLg==} + '@rollup/rollup-win32-ia32-msvc@4.21.2': + resolution: {integrity: sha512-5rA4vjlqgrpbFVVHX3qkrCo/fZTj1q0Xxpg+Z7yIo3J2AilW7t2+n6Q8Jrx+4MrYpAnjttTYF8rr7bP46BPzRw==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.18.1': - resolution: {integrity: sha512-yjk2MAkQmoaPYCSu35RLJ62+dz358nE83VfTePJRp8CG7aMg25mEJYpXFiD+NcevhX8LxD5OP5tktPXnXN7GDw==} + '@rollup/rollup-win32-x64-msvc@4.21.2': + resolution: {integrity: sha512-6UUxd0+SKomjdzuAcp+HAmxw1FlGBnl1v2yEPSabtx4lBfdXHDVsW7+lQkgz9cNFJGY3AWR7+V8P5BqkD9L9nA==} cpu: [x64] os: [win32] @@ -2067,8 +2005,11 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@20.14.10': - resolution: {integrity: sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==} + '@types/node@20.16.4': + resolution: {integrity: sha512-ioyQ1zK9aGEomJ45zz8S8IdzElyxhvP1RVWnPrXDf6wFaUb+kk1tEcVVJkF7RPGM0VWI7cp5U57oCPIn5iN1qg==} + + '@types/node@22.5.3': + resolution: {integrity: sha512-njripolh85IA9SQGTAqbmnNZTdxv7X/4OYGPz8tgy5JDr8MP+uDBa921GpYEoDDnwm0Hmn5ZPeJgiiSTPoOzkQ==} '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} @@ -2146,20 +2087,20 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@vue/compiler-core@3.4.31': - resolution: {integrity: sha512-skOiodXWTV3DxfDhB4rOf3OGalpITLlgCeOwb+Y9GJpfQ8ErigdBUHomBzvG78JoVE8MJoQsb+qhZiHfKeNeEg==} + '@vue/compiler-core@3.5.0': + resolution: {integrity: sha512-ja7cpqAOfw4tyFAxgBz70Z42miNDeaqTxExTsnXDLomRpqfyCgyvZvFp482fmsElpfvsoMJUsvzULhvxUTW6Iw==} - '@vue/compiler-dom@3.4.31': - resolution: {integrity: sha512-wK424WMXsG1IGMyDGyLqB+TbmEBFM78hIsOJ9QwUVLGrcSk0ak6zYty7Pj8ftm7nEtdU/DGQxAXp0/lM/2cEpQ==} + '@vue/compiler-dom@3.5.0': + resolution: {integrity: sha512-xYjUybWZXl+1R/toDy815i4PbeehL2hThiSGkcpmIOCy2HoYyeeC/gAWK/Y/xsoK+GSw198/T5O31bYuQx5uvQ==} - '@vue/compiler-sfc@3.4.31': - resolution: {integrity: sha512-einJxqEw8IIJxzmnxmJBuK2usI+lJonl53foq+9etB2HAzlPjAS/wa7r0uUpXw5ByX3/0uswVSrjNb17vJm1kQ==} + '@vue/compiler-sfc@3.5.0': + resolution: {integrity: sha512-B9DgLtrqok2GLuaFjLlSL15ZG3ZDBiitUH1ecex9guh/ZcA5MCdwuVE6nsfQxktuZY/QY0awJ35/ripIviCQTQ==} - '@vue/compiler-ssr@3.4.31': - resolution: {integrity: sha512-RtefmITAje3fJ8FSg1gwgDhdKhZVntIVbwupdyZDSifZTRMiWxWehAOTCc8/KZDnBOcYQ4/9VWxsTbd3wT0hAA==} + '@vue/compiler-ssr@3.5.0': + resolution: {integrity: sha512-E263QZmA1dqRd7c3u/sWTLRMpQOT0aZ8av/L9SoD/v/BVMZaWFHPUUBswS+bzrfvG2suJF8vSLKx6k6ba5SUdA==} - '@vue/shared@3.4.31': - resolution: {integrity: sha512-Yp3wtJk//8cO4NItOPpi3QkLExAr/aLBGZMmTtW9WpdwBCJpRM6zj9WgWktXAl8IDIozwNMByT45JP3tO3ACWA==} + '@vue/shared@3.5.0': + resolution: {integrity: sha512-m9IgiteBpCkFaMNwCOBkFksA7z8QiKc30ooRuoXWUFRDu0mGyNPlFHmbncF0/Kra1RlX8QrmBbRaIxVvikaR0Q==} JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} @@ -2454,11 +2395,11 @@ packages: builtins@5.1.0: resolution: {integrity: sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==} - bundle-require@4.2.1: - resolution: {integrity: sha512-7Q/6vkyYAwOmQNRw75x+4yRtZCZJXUDmHHlFdkiV0wgv/reNjtJwpu1jPJ0w2kbEpIM0uoKI3S4/f39dU7AjSA==} + bundle-require@5.0.0: + resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: - esbuild: '>=0.17' + esbuild: '>=0.18' cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} @@ -2594,6 +2535,10 @@ packages: resolution: {integrity: sha512-hv95iU5uXPbK83mjrJKuZyFM/LBAoCV/XhVGkS5Je6tl7sxr6A0ITMw5WoRV46/UaJ46Nllm3Xt7IaJhXTIkzw==} engines: {node: ^12.20.0 || >=14} + commander@9.5.0: + resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} + engines: {node: ^12.20.0 || >=14} + common-path-prefix@3.0.0: resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} @@ -2604,6 +2549,10 @@ packages: resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} + consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} + convert-to-spaces@2.0.1: resolution: {integrity: sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2681,6 +2630,15 @@ packages: supports-color: optional: true + debug@4.3.6: + resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} @@ -2807,13 +2765,13 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.21.5: - resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} - engines: {node: '>=12'} + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + engines: {node: '>=18'} hasBin: true - escalade@3.1.2: - resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} escape-string-regexp@1.0.5: @@ -3064,8 +3022,8 @@ packages: for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} - foreground-child@3.2.1: - resolution: {integrity: sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==} + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} form-data@4.0.0: @@ -3109,6 +3067,9 @@ packages: get-tsconfig@4.7.5: resolution: {integrity: sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==} + get-tsconfig@4.8.0: + resolution: {integrity: sha512-Pgba6TExTZ0FJAn1qkJAjIeKoDJ3CsI2ChuLohJnZl/tTU8MVrq3b+2t5UOPfRa4RMsorClBjJALkJUMjG1PAw==} + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -3232,6 +3193,10 @@ packages: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -3300,6 +3265,10 @@ packages: resolution: {integrity: sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==} engines: {node: '>= 0.4'} + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + is-data-view@1.0.1: resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} engines: {node: '>= 0.4'} @@ -3412,9 +3381,8 @@ packages: peerDependencies: ws: '*' - jackspeak@3.4.2: - resolution: {integrity: sha512-qH3nOSj8q/8+Eg8LUPOq3C+6HWkpUioIjDsq1+D4zY91oZvpPttw8GwtF1nReRYKXl+1AORyFqtm2f5Q1SB6/Q==} - engines: {node: 14 >=14.21 || 16 >=16.20 || >=18} + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} jayson@4.1.1: resolution: {integrity: sha512-5ZWm4Q/0DHPyeMfAsrwViwUS2DMVsQgWh8bEEIVTkfb3DzHZ2L3G5WUnF+AKmGjjM9r1uAv73SaqC1/U4RL45w==} @@ -3544,8 +3512,8 @@ packages: lunr@2.3.9: resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} - magic-string@0.30.10: - resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} + magic-string@0.30.11: + resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} @@ -3581,8 +3549,8 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - micromatch@4.0.7: - resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} mime-db@1.52.0: @@ -3635,7 +3603,6 @@ packages: mpl-bubblegum-instructions@https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110: resolution: {tarball: https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110} - name: mpl-bubblegum-instructions version: 0.10.0 ms@2.1.2: @@ -3847,8 +3814,8 @@ packages: resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} engines: {node: '>=0.12'} - picocolors@1.0.1: - resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + picocolors@1.1.0: + resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} @@ -3887,20 +3854,26 @@ packages: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} - postcss-load-config@4.0.2: - resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} - engines: {node: '>= 14'} + postcss-load-config@6.0.1: + resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} + engines: {node: '>= 18'} peerDependencies: + jiti: '>=1.21.0' postcss: '>=8.0.9' - ts-node: '>=9.0.0' + tsx: ^4.8.1 + yaml: ^2.4.2 peerDependenciesMeta: + jiti: + optional: true postcss: optional: true - ts-node: + tsx: + optional: true + yaml: optional: true - postcss@8.4.39: - resolution: {integrity: sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==} + postcss@8.4.44: + resolution: {integrity: sha512-Aweb9unOEpQ3ezu4Q00DPvvM2ZTUitJdNKeP/+uQgr1IBIqu574IaZoURId7BKtWMREwzKa9OgzPzezWGPWFQw==} engines: {node: ^10 || ^12 || >=14} prelude-ls@1.2.1: @@ -4016,8 +3989,8 @@ packages: ripemd160@2.0.2: resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} - rollup@4.18.1: - resolution: {integrity: sha512-Elx2UT8lzxxOXMpy5HWQGZqkrQOtrVDDa/bm9l10+U4rQnVzbL/LgZ4NOM1MPIDyHk69W4InuYDF5dzRh4Kw1A==} + rollup@4.21.2: + resolution: {integrity: sha512-e3TapAgYf9xjdLvKQCkQTnbTKd4a6jwlpQSJJFokHGaX2IVjoEqkIIhiQfqsi0cdwlOD+tQGuOd5AJkc5RngBw==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -4071,6 +4044,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + serialize-error@7.0.1: resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} engines: {node: '>=10'} @@ -4320,11 +4298,11 @@ packages: tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} - tslib@2.6.3: - resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} + tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} - tsup@8.1.0: - resolution: {integrity: sha512-UFdfCAXukax+U6KzeTNO2kAARHcWxmKsnvSPXUcfA1D+kU05XDccCrkffCQpFaWDsZfV0jMyTsxU39VfCp6EOg==} + tsup@8.2.4: + resolution: {integrity: sha512-akpCPePnBnC/CXgRrcy72ZSntgIEUa1jN0oJbbvpALWKNOz1B7aM+UVDWGRGIO/T/PZugAESWDJUAb5FD48o8Q==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -4346,38 +4324,38 @@ packages: resolution: {integrity: sha512-xHtFaKtHxM9LOklMmJdI3BEnQq/D5F73Of2E1GDrITi9sgoVkvIsrQUTY1G8FlmGtA+awCI4EBlTRRYxkL2sRg==} hasBin: true - turbo-darwin-64@2.0.6: - resolution: {integrity: sha512-XpgBwWj3Ggmz/gQVqXdMKXHC1iFPMDiuwugLwSzE7Ih0O13JuNtYZKhQnopvbDQnFQCeRq2Vsm5OTWabg/oB/g==} + turbo-darwin-64@2.1.1: + resolution: {integrity: sha512-aYNuJpZlCoi0Htd79fl/2DywpewGKijdXeOfg9KzNuPVKzSMYlAXuAlNGh0MKjiOcyqxQGL7Mq9LFhwA0VpDpQ==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.0.6: - resolution: {integrity: sha512-RfeZYXIAkiA21E8lsvfptGTqz/256YD+eI1x37fedfvnHFWuIMFZGAOwJxtZc6QasQunDZ9TRRREbJNI68tkIw==} + turbo-darwin-arm64@2.1.1: + resolution: {integrity: sha512-tifJKD8yHY48rHXPMcM8o1jI/Jk2KCaXiNjTKvvy9Zsim61BZksNVLelIbrRoCGwAN6PUBZO2lGU5iL/TQJ5Pw==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.0.6: - resolution: {integrity: sha512-92UDa0xNQQbx0HdSp9ag3YSS3xPdavhc7q9q9mxIAcqyjjD6VElA4Y85m4F/DDGE5SolCrvBz2sQhVmkOd6Caw==} + turbo-linux-64@2.1.1: + resolution: {integrity: sha512-Js6d/bSQe9DuV9c7ITXYpsU/ADzFHABdz1UIHa7Oqjj9VOEbFeA9WpAn0c+mdJrVD+IXJFbbDZUjN7VYssmtcg==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.0.6: - resolution: {integrity: sha512-eQKu6utCVUkIH2kqOzD8OS6E0ba6COjWm6PRDTNCHQRljZW503ycaTUIdMOiJrVg1MkEjDyOReUg8s8D18aJ4Q==} + turbo-linux-arm64@2.1.1: + resolution: {integrity: sha512-LidzTCq0yvQ+N8w8Qub9FmhQ/mmEIeoqFi7DSupekEV2EjvE9jw/zYc9Pk67X+g7dHVfgOnvVzmrjChdxpFePw==} cpu: [arm64] os: [linux] - turbo-windows-64@2.0.6: - resolution: {integrity: sha512-+9u4EPrpoeHYCQ46dRcou9kbkSoelhOelHNcbs2d86D6ruYD/oIAHK9qgYK8LeARRz0jxhZIA/dWYdYsxJJWkw==} + turbo-windows-64@2.1.1: + resolution: {integrity: sha512-GKc9ZywKwy4xLDhwXd6H07yzl0TB52HjXMrFLyHGhCVnf/w0oq4sLJv2sjbvuarPjsyx4xnCBJ3m3oyL2XmFtA==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.0.6: - resolution: {integrity: sha512-rdrKL+p+EjtdDVg0wQ/7yTbzkIYrnb0Pw4IKcjsy3M0RqUM9UcEi67b94XOAyTa5a0GqJL1+tUj2ebsFGPgZbg==} + turbo-windows-arm64@2.1.1: + resolution: {integrity: sha512-oFKkMj11KKUv3xSK9/fhAEQTxLUp1Ol1EOktwc32+SFtEU0uls7kosAz0b+qe8k3pJGEMFdDPdqoEjyJidbxtQ==} cpu: [arm64] os: [win32] - turbo@2.0.6: - resolution: {integrity: sha512-/Ftmxd5Mq//a9yMonvmwENNUN65jOVTwhhBPQjEtNZutYT9YKyzydFGLyVM1nzhpLWahQSMamRc/RDBv5EapzA==} + turbo@2.1.1: + resolution: {integrity: sha512-u9gUDkmR9dFS8b5kAYqIETK4OnzsS4l2ragJ0+soSMHh6VEeNHjTfSjk1tKxCqLyziCrPogadxP680J+v6yGHw==} hasBin: true tweetnacl@1.0.3: @@ -4431,11 +4409,6 @@ packages: typescript-collections@1.3.3: resolution: {integrity: sha512-7sI4e/bZijOzyURng88oOFZCISQPTHozfE2sUu5AviFYk5QV7fYGb6YiDl+vKjF/pICA354JImBImL9XJWUvdQ==} - typescript@5.4.5: - resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} - engines: {node: '>=14.17'} - hasBin: true - typescript@5.5.3: resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==} engines: {node: '>=14.17'} @@ -4444,8 +4417,8 @@ packages: unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -4621,13 +4594,13 @@ snapshots: dependencies: '@aws-crypto/util': 5.2.0 '@aws-sdk/types': 3.609.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-crypto/crc32c@5.2.0': dependencies: '@aws-crypto/util': 5.2.0 '@aws-sdk/types': 3.609.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-crypto/sha1-browser@5.2.0': dependencies: @@ -4636,7 +4609,7 @@ snapshots: '@aws-sdk/types': 3.609.0 '@aws-sdk/util-locate-window': 3.568.0 '@smithy/util-utf8': 2.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-crypto/sha256-browser@5.2.0': dependencies: @@ -4646,23 +4619,23 @@ snapshots: '@aws-sdk/types': 3.609.0 '@aws-sdk/util-locate-window': 3.568.0 '@smithy/util-utf8': 2.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-crypto/sha256-js@5.2.0': dependencies: '@aws-crypto/util': 5.2.0 '@aws-sdk/types': 3.609.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-crypto/supports-web-crypto@5.2.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@aws-crypto/util@5.2.0': dependencies: '@aws-sdk/types': 3.609.0 '@smithy/util-utf8': 2.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/client-s3@3.613.0': dependencies: @@ -4672,7 +4645,7 @@ snapshots: '@aws-sdk/client-sso-oidc': 3.613.0(@aws-sdk/client-sts@3.613.0) '@aws-sdk/client-sts': 3.613.0 '@aws-sdk/core': 3.609.0 - '@aws-sdk/credential-provider-node': 3.613.0(@aws-sdk/client-sso-oidc@3.613.0)(@aws-sdk/client-sts@3.613.0) + '@aws-sdk/credential-provider-node': 3.613.0(@aws-sdk/client-sso-oidc@3.613.0(@aws-sdk/client-sts@3.613.0))(@aws-sdk/client-sts@3.613.0) '@aws-sdk/middleware-bucket-endpoint': 3.609.0 '@aws-sdk/middleware-expect-continue': 3.609.0 '@aws-sdk/middleware-flexible-checksums': 3.609.0 @@ -4723,7 +4696,7 @@ snapshots: '@smithy/util-stream': 3.0.6 '@smithy/util-utf8': 3.0.0 '@smithy/util-waiter': 3.1.2 - tslib: 2.6.3 + tslib: 2.7.0 transitivePeerDependencies: - aws-crt @@ -4733,7 +4706,7 @@ snapshots: '@aws-crypto/sha256-js': 5.2.0 '@aws-sdk/client-sts': 3.613.0 '@aws-sdk/core': 3.609.0 - '@aws-sdk/credential-provider-node': 3.613.0(@aws-sdk/client-sso-oidc@3.613.0)(@aws-sdk/client-sts@3.613.0) + '@aws-sdk/credential-provider-node': 3.613.0(@aws-sdk/client-sso-oidc@3.613.0(@aws-sdk/client-sts@3.613.0))(@aws-sdk/client-sts@3.613.0) '@aws-sdk/middleware-host-header': 3.609.0 '@aws-sdk/middleware-logger': 3.609.0 '@aws-sdk/middleware-recursion-detection': 3.609.0 @@ -4768,7 +4741,7 @@ snapshots: '@smithy/util-middleware': 3.0.3 '@smithy/util-retry': 3.0.3 '@smithy/util-utf8': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 transitivePeerDependencies: - aws-crt @@ -4811,7 +4784,7 @@ snapshots: '@smithy/util-middleware': 3.0.3 '@smithy/util-retry': 3.0.3 '@smithy/util-utf8': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 transitivePeerDependencies: - aws-crt @@ -4821,7 +4794,7 @@ snapshots: '@aws-crypto/sha256-js': 5.2.0 '@aws-sdk/client-sso-oidc': 3.613.0(@aws-sdk/client-sts@3.613.0) '@aws-sdk/core': 3.609.0 - '@aws-sdk/credential-provider-node': 3.613.0(@aws-sdk/client-sso-oidc@3.613.0)(@aws-sdk/client-sts@3.613.0) + '@aws-sdk/credential-provider-node': 3.613.0(@aws-sdk/client-sso-oidc@3.613.0(@aws-sdk/client-sts@3.613.0))(@aws-sdk/client-sts@3.613.0) '@aws-sdk/middleware-host-header': 3.609.0 '@aws-sdk/middleware-logger': 3.609.0 '@aws-sdk/middleware-recursion-detection': 3.609.0 @@ -4856,7 +4829,7 @@ snapshots: '@smithy/util-middleware': 3.0.3 '@smithy/util-retry': 3.0.3 '@smithy/util-utf8': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 transitivePeerDependencies: - aws-crt @@ -4868,14 +4841,14 @@ snapshots: '@smithy/smithy-client': 3.1.7 '@smithy/types': 3.3.0 fast-xml-parser: 4.2.5 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/credential-provider-env@3.609.0': dependencies: '@aws-sdk/types': 3.609.0 '@smithy/property-provider': 3.1.3 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/credential-provider-http@3.613.0': dependencies: @@ -4887,40 +4860,40 @@ snapshots: '@smithy/smithy-client': 3.1.7 '@smithy/types': 3.3.0 '@smithy/util-stream': 3.0.6 - tslib: 2.6.3 + tslib: 2.7.0 - '@aws-sdk/credential-provider-ini@3.613.0(@aws-sdk/client-sso-oidc@3.613.0)(@aws-sdk/client-sts@3.613.0)': + '@aws-sdk/credential-provider-ini@3.613.0(@aws-sdk/client-sso-oidc@3.613.0(@aws-sdk/client-sts@3.613.0))(@aws-sdk/client-sts@3.613.0)': dependencies: '@aws-sdk/client-sts': 3.613.0 '@aws-sdk/credential-provider-env': 3.609.0 '@aws-sdk/credential-provider-http': 3.613.0 '@aws-sdk/credential-provider-process': 3.609.0 - '@aws-sdk/credential-provider-sso': 3.609.0(@aws-sdk/client-sso-oidc@3.613.0) + '@aws-sdk/credential-provider-sso': 3.609.0(@aws-sdk/client-sso-oidc@3.613.0(@aws-sdk/client-sts@3.613.0)) '@aws-sdk/credential-provider-web-identity': 3.609.0(@aws-sdk/client-sts@3.613.0) '@aws-sdk/types': 3.609.0 '@smithy/credential-provider-imds': 3.1.4 '@smithy/property-provider': 3.1.3 '@smithy/shared-ini-file-loader': 3.1.4 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 transitivePeerDependencies: - '@aws-sdk/client-sso-oidc' - aws-crt - '@aws-sdk/credential-provider-node@3.613.0(@aws-sdk/client-sso-oidc@3.613.0)(@aws-sdk/client-sts@3.613.0)': + '@aws-sdk/credential-provider-node@3.613.0(@aws-sdk/client-sso-oidc@3.613.0(@aws-sdk/client-sts@3.613.0))(@aws-sdk/client-sts@3.613.0)': dependencies: '@aws-sdk/credential-provider-env': 3.609.0 '@aws-sdk/credential-provider-http': 3.613.0 - '@aws-sdk/credential-provider-ini': 3.613.0(@aws-sdk/client-sso-oidc@3.613.0)(@aws-sdk/client-sts@3.613.0) + '@aws-sdk/credential-provider-ini': 3.613.0(@aws-sdk/client-sso-oidc@3.613.0(@aws-sdk/client-sts@3.613.0))(@aws-sdk/client-sts@3.613.0) '@aws-sdk/credential-provider-process': 3.609.0 - '@aws-sdk/credential-provider-sso': 3.609.0(@aws-sdk/client-sso-oidc@3.613.0) + '@aws-sdk/credential-provider-sso': 3.609.0(@aws-sdk/client-sso-oidc@3.613.0(@aws-sdk/client-sts@3.613.0)) '@aws-sdk/credential-provider-web-identity': 3.609.0(@aws-sdk/client-sts@3.613.0) '@aws-sdk/types': 3.609.0 '@smithy/credential-provider-imds': 3.1.4 '@smithy/property-provider': 3.1.3 '@smithy/shared-ini-file-loader': 3.1.4 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 transitivePeerDependencies: - '@aws-sdk/client-sso-oidc' - '@aws-sdk/client-sts' @@ -4932,17 +4905,17 @@ snapshots: '@smithy/property-provider': 3.1.3 '@smithy/shared-ini-file-loader': 3.1.4 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 - '@aws-sdk/credential-provider-sso@3.609.0(@aws-sdk/client-sso-oidc@3.613.0)': + '@aws-sdk/credential-provider-sso@3.609.0(@aws-sdk/client-sso-oidc@3.613.0(@aws-sdk/client-sts@3.613.0))': dependencies: '@aws-sdk/client-sso': 3.609.0 - '@aws-sdk/token-providers': 3.609.0(@aws-sdk/client-sso-oidc@3.613.0) + '@aws-sdk/token-providers': 3.609.0(@aws-sdk/client-sso-oidc@3.613.0(@aws-sdk/client-sts@3.613.0)) '@aws-sdk/types': 3.609.0 '@smithy/property-provider': 3.1.3 '@smithy/shared-ini-file-loader': 3.1.4 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 transitivePeerDependencies: - '@aws-sdk/client-sso-oidc' - aws-crt @@ -4953,7 +4926,7 @@ snapshots: '@aws-sdk/types': 3.609.0 '@smithy/property-provider': 3.1.3 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/middleware-bucket-endpoint@3.609.0': dependencies: @@ -4963,14 +4936,14 @@ snapshots: '@smithy/protocol-http': 4.0.3 '@smithy/types': 3.3.0 '@smithy/util-config-provider': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/middleware-expect-continue@3.609.0': dependencies: '@aws-sdk/types': 3.609.0 '@smithy/protocol-http': 4.0.3 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/middleware-flexible-checksums@3.609.0': dependencies: @@ -4981,33 +4954,33 @@ snapshots: '@smithy/protocol-http': 4.0.3 '@smithy/types': 3.3.0 '@smithy/util-utf8': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/middleware-host-header@3.609.0': dependencies: '@aws-sdk/types': 3.609.0 '@smithy/protocol-http': 4.0.3 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/middleware-location-constraint@3.609.0': dependencies: '@aws-sdk/types': 3.609.0 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/middleware-logger@3.609.0': dependencies: '@aws-sdk/types': 3.609.0 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/middleware-recursion-detection@3.609.0': dependencies: '@aws-sdk/types': 3.609.0 '@smithy/protocol-http': 4.0.3 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/middleware-sdk-s3@3.609.0': dependencies: @@ -5019,7 +4992,7 @@ snapshots: '@smithy/smithy-client': 3.1.7 '@smithy/types': 3.3.0 '@smithy/util-config-provider': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/middleware-signing@3.609.0': dependencies: @@ -5029,13 +5002,13 @@ snapshots: '@smithy/signature-v4': 3.1.2 '@smithy/types': 3.3.0 '@smithy/util-middleware': 3.0.3 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/middleware-ssec@3.609.0': dependencies: '@aws-sdk/types': 3.609.0 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/middleware-user-agent@3.609.0': dependencies: @@ -5043,7 +5016,7 @@ snapshots: '@aws-sdk/util-endpoints': 3.609.0 '@smithy/protocol-http': 4.0.3 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/region-config-resolver@3.609.0': dependencies: @@ -5052,7 +5025,7 @@ snapshots: '@smithy/types': 3.3.0 '@smithy/util-config-provider': 3.0.0 '@smithy/util-middleware': 3.0.3 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/signature-v4-multi-region@3.609.0': dependencies: @@ -5061,86 +5034,69 @@ snapshots: '@smithy/protocol-http': 4.0.3 '@smithy/signature-v4': 3.1.2 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 - '@aws-sdk/token-providers@3.609.0(@aws-sdk/client-sso-oidc@3.613.0)': + '@aws-sdk/token-providers@3.609.0(@aws-sdk/client-sso-oidc@3.613.0(@aws-sdk/client-sts@3.613.0))': dependencies: '@aws-sdk/client-sso-oidc': 3.613.0(@aws-sdk/client-sts@3.613.0) '@aws-sdk/types': 3.609.0 '@smithy/property-provider': 3.1.3 '@smithy/shared-ini-file-loader': 3.1.4 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/types@3.609.0': dependencies: '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/util-arn-parser@3.568.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/util-endpoints@3.609.0': dependencies: '@aws-sdk/types': 3.609.0 '@smithy/types': 3.3.0 '@smithy/util-endpoints': 2.0.5 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/util-locate-window@3.568.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/util-user-agent-browser@3.609.0': dependencies: '@aws-sdk/types': 3.609.0 '@smithy/types': 3.3.0 bowser: 2.11.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/util-user-agent-node@3.609.0': dependencies: '@aws-sdk/types': 3.609.0 '@smithy/node-config-provider': 3.1.4 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@aws-sdk/xml-builder@3.609.0': dependencies: '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@babel/code-frame@7.24.7': dependencies: '@babel/highlight': 7.24.7 - picocolors: 1.0.1 + picocolors: 1.1.0 - '@babel/generator@7.24.7': + '@babel/generator@7.25.6': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.6 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 - '@babel/helper-environment-visitor@7.24.7': - dependencies: - '@babel/types': 7.24.7 - - '@babel/helper-function-name@7.24.7': - dependencies: - '@babel/template': 7.24.7 - '@babel/types': 7.24.7 - - '@babel/helper-hoist-variables@7.24.7': - dependencies: - '@babel/types': 7.24.7 - - '@babel/helper-split-export-declaration@7.24.7': - dependencies: - '@babel/types': 7.24.7 - - '@babel/helper-string-parser@7.24.7': {} + '@babel/helper-string-parser@7.24.8': {} '@babel/helper-validator-identifier@7.24.7': {} @@ -5149,40 +5105,37 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.0.1 + picocolors: 1.1.0 - '@babel/parser@7.24.7': + '@babel/parser@7.25.6': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.6 '@babel/runtime@7.24.7': dependencies: regenerator-runtime: 0.14.1 - '@babel/template@7.24.7': + '@babel/template@7.25.0': dependencies: '@babel/code-frame': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 + '@babel/parser': 7.25.6 + '@babel/types': 7.25.6 - '@babel/traverse@7.24.7': + '@babel/traverse@7.25.6': dependencies: '@babel/code-frame': 7.24.7 - '@babel/generator': 7.24.7 - '@babel/helper-environment-visitor': 7.24.7 - '@babel/helper-function-name': 7.24.7 - '@babel/helper-hoist-variables': 7.24.7 - '@babel/helper-split-export-declaration': 7.24.7 - '@babel/parser': 7.24.7 - '@babel/types': 7.24.7 - debug: 4.3.5 + '@babel/generator': 7.25.6 + '@babel/parser': 7.25.6 + '@babel/template': 7.25.0 + '@babel/types': 7.25.6 + debug: 4.3.6 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.24.7': + '@babel/types@7.25.6': dependencies: - '@babel/helper-string-parser': 7.24.7 + '@babel/helper-string-parser': 7.24.8 '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 @@ -5190,139 +5143,142 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 - '@esbuild/aix-ppc64@0.21.5': + '@esbuild/aix-ppc64@0.23.1': optional: true '@esbuild/android-arm64@0.18.20': optional: true - '@esbuild/android-arm64@0.21.5': + '@esbuild/android-arm64@0.23.1': optional: true '@esbuild/android-arm@0.18.20': optional: true - '@esbuild/android-arm@0.21.5': + '@esbuild/android-arm@0.23.1': optional: true '@esbuild/android-x64@0.18.20': optional: true - '@esbuild/android-x64@0.21.5': + '@esbuild/android-x64@0.23.1': optional: true '@esbuild/darwin-arm64@0.18.20': optional: true - '@esbuild/darwin-arm64@0.21.5': + '@esbuild/darwin-arm64@0.23.1': optional: true '@esbuild/darwin-x64@0.18.20': optional: true - '@esbuild/darwin-x64@0.21.5': + '@esbuild/darwin-x64@0.23.1': optional: true '@esbuild/freebsd-arm64@0.18.20': optional: true - '@esbuild/freebsd-arm64@0.21.5': + '@esbuild/freebsd-arm64@0.23.1': optional: true '@esbuild/freebsd-x64@0.18.20': optional: true - '@esbuild/freebsd-x64@0.21.5': + '@esbuild/freebsd-x64@0.23.1': optional: true '@esbuild/linux-arm64@0.18.20': optional: true - '@esbuild/linux-arm64@0.21.5': + '@esbuild/linux-arm64@0.23.1': optional: true '@esbuild/linux-arm@0.18.20': optional: true - '@esbuild/linux-arm@0.21.5': + '@esbuild/linux-arm@0.23.1': optional: true '@esbuild/linux-ia32@0.18.20': optional: true - '@esbuild/linux-ia32@0.21.5': + '@esbuild/linux-ia32@0.23.1': optional: true '@esbuild/linux-loong64@0.18.20': optional: true - '@esbuild/linux-loong64@0.21.5': + '@esbuild/linux-loong64@0.23.1': optional: true '@esbuild/linux-mips64el@0.18.20': optional: true - '@esbuild/linux-mips64el@0.21.5': + '@esbuild/linux-mips64el@0.23.1': optional: true '@esbuild/linux-ppc64@0.18.20': optional: true - '@esbuild/linux-ppc64@0.21.5': + '@esbuild/linux-ppc64@0.23.1': optional: true '@esbuild/linux-riscv64@0.18.20': optional: true - '@esbuild/linux-riscv64@0.21.5': + '@esbuild/linux-riscv64@0.23.1': optional: true '@esbuild/linux-s390x@0.18.20': optional: true - '@esbuild/linux-s390x@0.21.5': + '@esbuild/linux-s390x@0.23.1': optional: true '@esbuild/linux-x64@0.18.20': optional: true - '@esbuild/linux-x64@0.21.5': + '@esbuild/linux-x64@0.23.1': optional: true '@esbuild/netbsd-x64@0.18.20': optional: true - '@esbuild/netbsd-x64@0.21.5': + '@esbuild/netbsd-x64@0.23.1': + optional: true + + '@esbuild/openbsd-arm64@0.23.1': optional: true '@esbuild/openbsd-x64@0.18.20': optional: true - '@esbuild/openbsd-x64@0.21.5': + '@esbuild/openbsd-x64@0.23.1': optional: true '@esbuild/sunos-x64@0.18.20': optional: true - '@esbuild/sunos-x64@0.21.5': + '@esbuild/sunos-x64@0.23.1': optional: true '@esbuild/win32-arm64@0.18.20': optional: true - '@esbuild/win32-arm64@0.21.5': + '@esbuild/win32-arm64@0.23.1': optional: true '@esbuild/win32-ia32@0.18.20': optional: true - '@esbuild/win32-ia32@0.21.5': + '@esbuild/win32-ia32@0.23.1': optional: true '@esbuild/win32-x64@0.18.20': optional: true - '@esbuild/win32-x64@0.21.5': + '@esbuild/win32-x64@0.23.1': optional: true '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': @@ -5485,7 +5441,7 @@ snapshots: dependencies: '@ethersproject/logger': 5.7.0 - '@ethersproject/providers@5.7.2': + '@ethersproject/providers@5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@ethersproject/abstract-provider': 5.7.0 '@ethersproject/abstract-signer': 5.7.0 @@ -5506,7 +5462,7 @@ snapshots: '@ethersproject/transactions': 5.7.0 '@ethersproject/web': 5.7.1 bech32: 1.1.4 - ws: 7.4.6 + ws: 7.4.6(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -5617,22 +5573,22 @@ snapshots: transitivePeerDependencies: - debug - '@irys/sdk@0.0.3(arweave@1.15.1)': + '@irys/sdk@0.0.3(arweave@1.15.1)(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@ethersproject/bignumber': 5.7.0 '@ethersproject/contracts': 5.7.0 - '@ethersproject/providers': 5.7.2 + '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@ethersproject/wallet': 5.7.0 '@irys/query': 0.0.1 '@near-js/crypto': 0.0.3 '@near-js/keystores-browser': 0.0.3 '@near-js/providers': 0.0.4 '@near-js/transactions': 0.1.1 - '@solana/web3.js': 1.95.0 + '@solana/web3.js': 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@supercharge/promise-pool': 3.2.0 algosdk: 1.24.1 aptos: 1.8.5 - arbundles: 0.10.1(arweave@1.15.1) + arbundles: 0.10.1(arweave@1.15.1)(bufferutil@4.0.8)(utf-8-validate@5.0.10) async-retry: 1.3.3 axios: 1.7.2 base64url: 3.0.1 @@ -5651,22 +5607,22 @@ snapshots: - encoding - utf-8-validate - '@irys/sdk@0.0.4(arweave@1.15.1)': + '@irys/sdk@0.0.4(arweave@1.15.1)(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@ethersproject/bignumber': 5.7.0 '@ethersproject/contracts': 5.7.0 - '@ethersproject/providers': 5.7.2 + '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@ethersproject/wallet': 5.7.0 '@irys/query': 0.0.1 '@near-js/crypto': 0.0.3 '@near-js/keystores-browser': 0.0.3 '@near-js/providers': 0.0.4 '@near-js/transactions': 0.1.1 - '@solana/web3.js': 1.95.0 + '@solana/web3.js': 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@supercharge/promise-pool': 3.2.0 algosdk: 1.24.1 aptos: 1.8.5 - arbundles: 0.10.1(arweave@1.15.1) + arbundles: 0.10.1(arweave@1.15.1)(bufferutil@4.0.8)(utf-8-validate@5.0.10) async-retry: 1.3.3 axios: 1.7.2 base64url: 3.0.1 @@ -5718,22 +5674,22 @@ snapshots: '@material/material-color-utilities@0.2.7': {} - '@metaplex-foundation/beet-solana@0.4.0': + '@metaplex-foundation/beet-solana@0.4.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@metaplex-foundation/beet': 0.7.1 - '@solana/web3.js': 1.95.0 + '@solana/web3.js': 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bs58: 5.0.0 - debug: 4.3.5 + debug: 4.3.6 transitivePeerDependencies: - bufferutil - encoding - supports-color - utf-8-validate - '@metaplex-foundation/beet-solana@0.4.1': + '@metaplex-foundation/beet-solana@0.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@metaplex-foundation/beet': 0.7.2 - '@solana/web3.js': 1.95.0 + '@solana/web3.js': 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bs58: 5.0.0 debug: 4.3.5 transitivePeerDependencies: @@ -5746,7 +5702,7 @@ snapshots: dependencies: ansicolors: 0.3.2 bn.js: 5.2.1 - debug: 4.3.5 + debug: 4.3.6 transitivePeerDependencies: - supports-color @@ -5761,13 +5717,13 @@ snapshots: '@metaplex-foundation/cusper@0.0.2': {} - '@metaplex-foundation/mpl-token-metadata@2.13.0(fastestsmallesttextencoderdecoder@1.0.22)': + '@metaplex-foundation/mpl-token-metadata@2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10)': dependencies: '@metaplex-foundation/beet': 0.7.2 - '@metaplex-foundation/beet-solana': 0.4.1 + '@metaplex-foundation/beet-solana': 0.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@metaplex-foundation/cusper': 0.0.2 - '@solana/spl-token': 0.3.11(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22) - '@solana/web3.js': 1.95.0 + '@solana/spl-token': 0.3.11(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) + '@solana/web3.js': 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bn.js: 5.2.1 debug: 4.3.5 transitivePeerDependencies: @@ -5906,52 +5862,52 @@ snapshots: '@randlabs/communication-bridge': 1.0.1 optional: true - '@rollup/rollup-android-arm-eabi@4.18.1': + '@rollup/rollup-android-arm-eabi@4.21.2': optional: true - '@rollup/rollup-android-arm64@4.18.1': + '@rollup/rollup-android-arm64@4.21.2': optional: true - '@rollup/rollup-darwin-arm64@4.18.1': + '@rollup/rollup-darwin-arm64@4.21.2': optional: true - '@rollup/rollup-darwin-x64@4.18.1': + '@rollup/rollup-darwin-x64@4.21.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.18.1': + '@rollup/rollup-linux-arm-gnueabihf@4.21.2': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.18.1': + '@rollup/rollup-linux-arm-musleabihf@4.21.2': optional: true - '@rollup/rollup-linux-arm64-gnu@4.18.1': + '@rollup/rollup-linux-arm64-gnu@4.21.2': optional: true - '@rollup/rollup-linux-arm64-musl@4.18.1': + '@rollup/rollup-linux-arm64-musl@4.21.2': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.18.1': + '@rollup/rollup-linux-powerpc64le-gnu@4.21.2': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.18.1': + '@rollup/rollup-linux-riscv64-gnu@4.21.2': optional: true - '@rollup/rollup-linux-s390x-gnu@4.18.1': + '@rollup/rollup-linux-s390x-gnu@4.21.2': optional: true - '@rollup/rollup-linux-x64-gnu@4.18.1': + '@rollup/rollup-linux-x64-gnu@4.21.2': optional: true - '@rollup/rollup-linux-x64-musl@4.18.1': + '@rollup/rollup-linux-x64-musl@4.21.2': optional: true - '@rollup/rollup-win32-arm64-msvc@4.18.1': + '@rollup/rollup-win32-arm64-msvc@4.21.2': optional: true - '@rollup/rollup-win32-ia32-msvc@4.18.1': + '@rollup/rollup-win32-ia32-msvc@4.21.2': optional: true - '@rollup/rollup-win32-x64-msvc@4.18.1': + '@rollup/rollup-win32-x64-msvc@4.21.2': optional: true '@scure/base@1.1.7': {} @@ -5964,16 +5920,16 @@ snapshots: '@smithy/abort-controller@3.1.1': dependencies: '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/chunked-blob-reader-native@3.0.0': dependencies: '@smithy/util-base64': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/chunked-blob-reader@3.0.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/config-resolver@3.0.5': dependencies: @@ -5981,7 +5937,7 @@ snapshots: '@smithy/types': 3.3.0 '@smithy/util-config-provider': 3.0.0 '@smithy/util-middleware': 3.0.3 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/core@2.2.6': dependencies: @@ -5992,7 +5948,7 @@ snapshots: '@smithy/smithy-client': 3.1.7 '@smithy/types': 3.3.0 '@smithy/util-middleware': 3.0.3 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/credential-provider-imds@3.1.4': dependencies: @@ -6000,37 +5956,37 @@ snapshots: '@smithy/property-provider': 3.1.3 '@smithy/types': 3.3.0 '@smithy/url-parser': 3.0.3 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/eventstream-codec@3.1.2': dependencies: '@aws-crypto/crc32': 5.2.0 '@smithy/types': 3.3.0 '@smithy/util-hex-encoding': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/eventstream-serde-browser@3.0.4': dependencies: '@smithy/eventstream-serde-universal': 3.0.4 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/eventstream-serde-config-resolver@3.0.3': dependencies: '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/eventstream-serde-node@3.0.4': dependencies: '@smithy/eventstream-serde-universal': 3.0.4 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/eventstream-serde-universal@3.0.4': dependencies: '@smithy/eventstream-codec': 3.1.2 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/fetch-http-handler@3.2.1': dependencies: @@ -6038,52 +5994,52 @@ snapshots: '@smithy/querystring-builder': 3.0.3 '@smithy/types': 3.3.0 '@smithy/util-base64': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/hash-blob-browser@3.1.2': dependencies: '@smithy/chunked-blob-reader': 3.0.0 '@smithy/chunked-blob-reader-native': 3.0.0 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/hash-node@3.0.3': dependencies: '@smithy/types': 3.3.0 '@smithy/util-buffer-from': 3.0.0 '@smithy/util-utf8': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/hash-stream-node@3.1.2': dependencies: '@smithy/types': 3.3.0 '@smithy/util-utf8': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/invalid-dependency@3.0.3': dependencies: '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/is-array-buffer@2.2.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/is-array-buffer@3.0.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/md5-js@3.0.3': dependencies: '@smithy/types': 3.3.0 '@smithy/util-utf8': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/middleware-content-length@3.0.3': dependencies: '@smithy/protocol-http': 4.0.3 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/middleware-endpoint@3.0.5': dependencies: @@ -6093,7 +6049,7 @@ snapshots: '@smithy/types': 3.3.0 '@smithy/url-parser': 3.0.3 '@smithy/util-middleware': 3.0.3 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/middleware-retry@3.0.9': dependencies: @@ -6104,25 +6060,25 @@ snapshots: '@smithy/types': 3.3.0 '@smithy/util-middleware': 3.0.3 '@smithy/util-retry': 3.0.3 - tslib: 2.6.3 + tslib: 2.7.0 uuid: 9.0.1 '@smithy/middleware-serde@3.0.3': dependencies: '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/middleware-stack@3.0.3': dependencies: '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/node-config-provider@3.1.4': dependencies: '@smithy/property-provider': 3.1.3 '@smithy/shared-ini-file-loader': 3.1.4 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/node-http-handler@3.1.2': dependencies: @@ -6130,28 +6086,28 @@ snapshots: '@smithy/protocol-http': 4.0.3 '@smithy/querystring-builder': 3.0.3 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/property-provider@3.1.3': dependencies: '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/protocol-http@4.0.3': dependencies: '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/querystring-builder@3.0.3': dependencies: '@smithy/types': 3.3.0 '@smithy/util-uri-escape': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/querystring-parser@3.0.3': dependencies: '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/service-error-classification@3.0.3': dependencies: @@ -6160,7 +6116,7 @@ snapshots: '@smithy/shared-ini-file-loader@3.1.4': dependencies: '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/signature-v4@3.1.2': dependencies: @@ -6170,7 +6126,7 @@ snapshots: '@smithy/util-middleware': 3.0.3 '@smithy/util-uri-escape': 3.0.0 '@smithy/util-utf8': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/smithy-client@3.1.7': dependencies: @@ -6179,45 +6135,45 @@ snapshots: '@smithy/protocol-http': 4.0.3 '@smithy/types': 3.3.0 '@smithy/util-stream': 3.0.6 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/types@3.3.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/url-parser@3.0.3': dependencies: '@smithy/querystring-parser': 3.0.3 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-base64@3.0.0': dependencies: '@smithy/util-buffer-from': 3.0.0 '@smithy/util-utf8': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-body-length-browser@3.0.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-body-length-node@3.0.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-buffer-from@2.2.0': dependencies: '@smithy/is-array-buffer': 2.2.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-buffer-from@3.0.0': dependencies: '@smithy/is-array-buffer': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-config-provider@3.0.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-defaults-mode-browser@3.0.9': dependencies: @@ -6225,7 +6181,7 @@ snapshots: '@smithy/smithy-client': 3.1.7 '@smithy/types': 3.3.0 bowser: 2.11.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-defaults-mode-node@3.0.9': dependencies: @@ -6235,28 +6191,28 @@ snapshots: '@smithy/property-provider': 3.1.3 '@smithy/smithy-client': 3.1.7 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-endpoints@2.0.5': dependencies: '@smithy/node-config-provider': 3.1.4 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-hex-encoding@3.0.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-middleware@3.0.3': dependencies: '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-retry@3.0.3': dependencies: '@smithy/service-error-classification': 3.0.3 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-stream@3.0.6': dependencies: @@ -6267,32 +6223,32 @@ snapshots: '@smithy/util-buffer-from': 3.0.0 '@smithy/util-hex-encoding': 3.0.0 '@smithy/util-utf8': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-uri-escape@3.0.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-utf8@2.3.0': dependencies: '@smithy/util-buffer-from': 2.2.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-utf8@3.0.0': dependencies: '@smithy/util-buffer-from': 3.0.0 - tslib: 2.6.3 + tslib: 2.7.0 '@smithy/util-waiter@3.1.2': dependencies: '@smithy/abort-controller': 3.1.1 '@smithy/types': 3.3.0 - tslib: 2.6.3 + tslib: 2.7.0 - '@solana/buffer-layout-utils@0.2.0': + '@solana/buffer-layout-utils@0.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@solana/buffer-layout': 4.0.1 - '@solana/web3.js': 1.95.0 + '@solana/web3.js': 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bigint-buffer: 1.1.5 bignumber.js: 9.1.2 transitivePeerDependencies: @@ -6346,11 +6302,11 @@ snapshots: '@solana/codecs-core': 2.0.0-preview.2 '@solana/codecs-numbers': 2.0.0-preview.2 - '@solana/spl-account-compression@0.1.10(@solana/web3.js@1.95.0)': + '@solana/spl-account-compression@0.1.10(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@metaplex-foundation/beet': 0.7.1 - '@metaplex-foundation/beet-solana': 0.4.0 - '@solana/web3.js': 1.95.0 + '@metaplex-foundation/beet-solana': 0.4.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana/web3.js': 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bn.js: 5.2.1 borsh: 0.7.0 js-sha3: 0.8.0 @@ -6361,11 +6317,11 @@ snapshots: - supports-color - utf-8-validate - '@solana/spl-account-compression@0.2.1(@solana/web3.js@1.95.0)': + '@solana/spl-account-compression@0.2.1(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@metaplex-foundation/beet': 0.7.2 - '@metaplex-foundation/beet-solana': 0.4.1 - '@solana/web3.js': 1.95.0 + '@metaplex-foundation/beet-solana': 0.4.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana/web3.js': 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bn.js: 5.2.1 js-sha3: 0.9.3 typescript-collections: 1.3.3 @@ -6379,14 +6335,14 @@ snapshots: dependencies: '@solana/codecs': 2.0.0-preview.2(fastestsmallesttextencoderdecoder@1.0.22) '@solana/spl-type-length-value': 0.1.0 - '@solana/web3.js': 1.95.0 + '@solana/web3.js': 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - fastestsmallesttextencoderdecoder - '@solana/spl-token@0.1.8': + '@solana/spl-token@0.1.8(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.24.7 - '@solana/web3.js': 1.95.0 + '@solana/web3.js': 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) bn.js: 5.2.1 buffer: 6.0.3 buffer-layout: 1.2.2 @@ -6396,12 +6352,12 @@ snapshots: - encoding - utf-8-validate - '@solana/spl-token@0.3.11(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22)': + '@solana/spl-token@0.3.11(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10)': dependencies: '@solana/buffer-layout': 4.0.1 - '@solana/buffer-layout-utils': 0.2.0 + '@solana/buffer-layout-utils': 0.2.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@solana/spl-token-metadata': 0.1.4(@solana/web3.js@1.95.0)(fastestsmallesttextencoderdecoder@1.0.22) - '@solana/web3.js': 1.95.0 + '@solana/web3.js': 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) buffer: 6.0.3 transitivePeerDependencies: - bufferutil @@ -6413,7 +6369,7 @@ snapshots: dependencies: buffer: 6.0.3 - '@solana/web3.js@1.95.0': + '@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.24.7 '@noble/curves': 1.4.2 @@ -6426,7 +6382,7 @@ snapshots: bs58: 4.0.1 buffer: 6.0.3 fast-stable-stringify: 1.0.0 - jayson: 4.1.1 + jayson: 4.1.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) node-fetch: 2.7.0 rpc-websockets: 9.0.2 superstruct: 2.0.2 @@ -6439,7 +6395,7 @@ snapshots: '@swc/helpers@0.5.11': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@tsconfig/node10@1.0.11': {} @@ -6451,16 +6407,16 @@ snapshots: '@types/bn.js@5.1.5': dependencies: - '@types/node': 20.14.10 + '@types/node': 22.5.3 '@types/bs58@4.0.4': dependencies: - '@types/node': 20.14.10 + '@types/node': 22.5.3 base-x: 3.0.10 '@types/connect@3.4.38': dependencies: - '@types/node': 20.14.10 + '@types/node': 12.20.55 '@types/estree@1.0.5': {} @@ -6474,9 +6430,13 @@ snapshots: '@types/node@12.20.55': {} - '@types/node@20.14.10': + '@types/node@20.16.4': + dependencies: + undici-types: 6.19.8 + + '@types/node@22.5.3': dependencies: - undici-types: 5.26.5 + undici-types: 6.19.8 '@types/parse-json@4.0.2': {} @@ -6486,13 +6446,13 @@ snapshots: '@types/ws@7.4.7': dependencies: - '@types/node': 20.14.10 + '@types/node': 12.20.55 '@types/ws@8.5.10': dependencies: - '@types/node': 20.14.10 + '@types/node': 22.5.3 - '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.5.3)': + '@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3)': dependencies: '@eslint-community/regexpp': 4.11.0 '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.3) @@ -6507,6 +6467,7 @@ snapshots: natural-compare: 1.4.0 semver: 7.6.2 ts-api-utils: 1.3.0(typescript@5.5.3) + optionalDependencies: typescript: 5.5.3 transitivePeerDependencies: - supports-color @@ -6519,6 +6480,7 @@ snapshots: '@typescript-eslint/visitor-keys': 6.21.0 debug: 4.3.5 eslint: 8.57.0 + optionalDependencies: typescript: 5.5.3 transitivePeerDependencies: - supports-color @@ -6535,6 +6497,7 @@ snapshots: debug: 4.3.5 eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.5.3) + optionalDependencies: typescript: 5.5.3 transitivePeerDependencies: - supports-color @@ -6549,8 +6512,9 @@ snapshots: globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.6.2 + semver: 7.6.3 ts-api-utils: 1.3.0(typescript@5.5.3) + optionalDependencies: typescript: 5.5.3 transitivePeerDependencies: - supports-color @@ -6576,37 +6540,37 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vue/compiler-core@3.4.31': + '@vue/compiler-core@3.5.0': dependencies: - '@babel/parser': 7.24.7 - '@vue/shared': 3.4.31 + '@babel/parser': 7.25.6 + '@vue/shared': 3.5.0 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.2.0 - '@vue/compiler-dom@3.4.31': + '@vue/compiler-dom@3.5.0': dependencies: - '@vue/compiler-core': 3.4.31 - '@vue/shared': 3.4.31 + '@vue/compiler-core': 3.5.0 + '@vue/shared': 3.5.0 - '@vue/compiler-sfc@3.4.31': + '@vue/compiler-sfc@3.5.0': dependencies: - '@babel/parser': 7.24.7 - '@vue/compiler-core': 3.4.31 - '@vue/compiler-dom': 3.4.31 - '@vue/compiler-ssr': 3.4.31 - '@vue/shared': 3.4.31 + '@babel/parser': 7.25.6 + '@vue/compiler-core': 3.5.0 + '@vue/compiler-dom': 3.5.0 + '@vue/compiler-ssr': 3.5.0 + '@vue/shared': 3.5.0 estree-walker: 2.0.2 - magic-string: 0.30.10 - postcss: 8.4.39 + magic-string: 0.30.11 + postcss: 8.4.44 source-map-js: 1.2.0 - '@vue/compiler-ssr@3.4.31': + '@vue/compiler-ssr@3.5.0': dependencies: - '@vue/compiler-dom': 3.4.31 - '@vue/shared': 3.4.31 + '@vue/compiler-dom': 3.5.0 + '@vue/shared': 3.5.0 - '@vue/shared@3.4.31': {} + '@vue/shared@3.5.0': {} JSONStream@1.3.5: dependencies: @@ -6701,11 +6665,11 @@ snapshots: transitivePeerDependencies: - debug - arbundles@0.10.1(arweave@1.15.1): + arbundles@0.10.1(arweave@1.15.1)(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/hash': 5.7.0 - '@ethersproject/providers': 5.7.2 + '@ethersproject/providers': 5.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@ethersproject/signing-key': 5.7.0 '@ethersproject/transactions': 5.7.0 '@ethersproject/wallet': 5.7.0 @@ -6858,7 +6822,7 @@ snapshots: common-path-prefix: 3.0.0 concordance: 5.0.4 currently-unhandled: 0.4.1 - debug: 4.3.5 + debug: 4.3.6 emittery: 1.0.3 figures: 5.0.0 globby: 13.2.2 @@ -7003,6 +6967,7 @@ snapshots: bufferutil@4.0.8: dependencies: node-gyp-build: 4.8.1 + optional: true builtin-modules@3.3.0: {} @@ -7010,9 +6975,9 @@ snapshots: dependencies: semver: 7.6.2 - bundle-require@4.2.1(esbuild@0.21.5): + bundle-require@5.0.0(esbuild@0.23.1): dependencies: - esbuild: 0.21.5 + esbuild: 0.23.1 load-tsconfig: 0.2.5 cac@6.7.14: {} @@ -7138,6 +7103,8 @@ snapshots: commander@9.3.0: {} + commander@9.5.0: {} + common-path-prefix@3.0.0: {} concat-map@0.0.1: {} @@ -7150,9 +7117,11 @@ snapshots: js-string-escape: 1.0.1 lodash: 4.17.21 md5-hex: 3.0.1 - semver: 7.6.2 + semver: 7.6.3 well-known-symbols: 2.0.0 + consola@3.2.3: {} + convert-to-spaces@2.0.1: {} cosmiconfig@7.1.0: @@ -7247,6 +7216,10 @@ snapshots: dependencies: ms: 2.1.2 + debug@4.3.6: + dependencies: + ms: 2.1.2 + deep-is@0.1.4: {} defaults@1.0.4: @@ -7271,17 +7244,17 @@ snapshots: depcheck@1.4.7: dependencies: - '@babel/parser': 7.24.7 - '@babel/traverse': 7.24.7 - '@vue/compiler-sfc': 3.4.31 + '@babel/parser': 7.25.6 + '@babel/traverse': 7.25.6 + '@vue/compiler-sfc': 3.5.0 callsite: 1.0.0 camelcase: 6.3.0 cosmiconfig: 7.1.0 - debug: 4.3.5 + debug: 4.3.6 deps-regex: 0.2.0 findup-sync: 5.0.0 - ignore: 5.3.1 - is-core-module: 2.14.0 + ignore: 5.3.2 + is-core-module: 2.15.1 js-yaml: 3.14.1 json5: 2.2.3 lodash: 4.17.21 @@ -7292,7 +7265,7 @@ snapshots: require-package-name: 2.0.1 resolve: 1.22.8 resolve-from: 5.0.0 - semver: 7.6.2 + semver: 7.6.3 yargs: 16.2.0 transitivePeerDependencies: - supports-color @@ -7461,33 +7434,34 @@ snapshots: '@esbuild/win32-ia32': 0.18.20 '@esbuild/win32-x64': 0.18.20 - esbuild@0.21.5: + esbuild@0.23.1: optionalDependencies: - '@esbuild/aix-ppc64': 0.21.5 - '@esbuild/android-arm': 0.21.5 - '@esbuild/android-arm64': 0.21.5 - '@esbuild/android-x64': 0.21.5 - '@esbuild/darwin-arm64': 0.21.5 - '@esbuild/darwin-x64': 0.21.5 - '@esbuild/freebsd-arm64': 0.21.5 - '@esbuild/freebsd-x64': 0.21.5 - '@esbuild/linux-arm': 0.21.5 - '@esbuild/linux-arm64': 0.21.5 - '@esbuild/linux-ia32': 0.21.5 - '@esbuild/linux-loong64': 0.21.5 - '@esbuild/linux-mips64el': 0.21.5 - '@esbuild/linux-ppc64': 0.21.5 - '@esbuild/linux-riscv64': 0.21.5 - '@esbuild/linux-s390x': 0.21.5 - '@esbuild/linux-x64': 0.21.5 - '@esbuild/netbsd-x64': 0.21.5 - '@esbuild/openbsd-x64': 0.21.5 - '@esbuild/sunos-x64': 0.21.5 - '@esbuild/win32-arm64': 0.21.5 - '@esbuild/win32-ia32': 0.21.5 - '@esbuild/win32-x64': 0.21.5 - - escalade@3.1.2: {} + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 + + escalade@3.2.0: {} escape-string-regexp@1.0.5: {} @@ -7502,23 +7476,23 @@ snapshots: eslint: 8.57.0 semver: 7.6.2 - eslint-config-standard-with-typescript@39.1.1(@typescript-eslint/eslint-plugin@6.21.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.4.0)(eslint@8.57.0)(typescript@5.5.3): + eslint-config-standard-with-typescript@39.1.1(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3))(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.4.0(eslint@8.57.0))(eslint@8.57.0)(typescript@5.5.3): dependencies: - '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0)(typescript@5.5.3) '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.3) eslint: 8.57.0 - eslint-config-standard: 17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.4.0)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0)(eslint@8.57.0) + eslint-config-standard: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.4.0(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0) eslint-plugin-n: 16.6.2(eslint@8.57.0) eslint-plugin-promise: 6.4.0(eslint@8.57.0) typescript: 5.5.3 transitivePeerDependencies: - supports-color - eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.2)(eslint-plugin-promise@6.4.0)(eslint@8.57.0): + eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0))(eslint-plugin-n@16.6.2(eslint@8.57.0))(eslint-plugin-promise@6.4.0(eslint@8.57.0))(eslint@8.57.0): dependencies: eslint: 8.57.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0) eslint-plugin-n: 16.6.2(eslint@8.57.0) eslint-plugin-promise: 6.4.0(eslint@8.57.0) @@ -7530,10 +7504,11 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.3) debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.3) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: @@ -7546,9 +7521,8 @@ snapshots: eslint: 8.57.0 eslint-compat-utils: 0.5.1(eslint@8.57.0) - eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0)(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint@8.57.0): dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.3) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 @@ -7557,7 +7531,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.14.0 is-glob: 4.0.3 @@ -7567,6 +7541,8 @@ snapshots: object.values: 1.2.0 semver: 6.3.1 tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -7706,7 +7682,7 @@ snapshots: '@nodelib/fs.walk': 1.2.8 glob-parent: 5.1.2 merge2: 1.4.1 - micromatch: 4.0.7 + micromatch: 4.0.8 fast-json-stable-stringify@2.1.0: {} @@ -7759,7 +7735,7 @@ snapshots: dependencies: detect-file: 1.0.0 is-glob: 4.0.3 - micromatch: 4.0.7 + micromatch: 4.0.8 resolve-dir: 1.0.1 flat-cache@3.2.0: @@ -7776,7 +7752,7 @@ snapshots: dependencies: is-callable: 1.2.7 - foreground-child@3.2.1: + foreground-child@3.3.0: dependencies: cross-spawn: 7.0.3 signal-exit: 4.1.0 @@ -7825,6 +7801,10 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 + get-tsconfig@4.8.0: + dependencies: + resolve-pkg-maps: 1.0.0 + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -7835,8 +7815,8 @@ snapshots: glob@10.4.5: dependencies: - foreground-child: 3.2.1 - jackspeak: 3.4.2 + foreground-child: 3.3.0 + jackspeak: 3.4.3 minimatch: 9.0.5 minipass: 7.1.2 package-json-from-dist: 1.0.0 @@ -7881,7 +7861,7 @@ snapshots: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.1 + ignore: 5.3.2 merge2: 1.4.1 slash: 3.0.0 @@ -7889,7 +7869,7 @@ snapshots: dependencies: dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.1 + ignore: 5.3.2 merge2: 1.4.1 slash: 4.0.0 @@ -7968,6 +7948,8 @@ snapshots: ignore@5.3.1: {} + ignore@5.3.2: {} + import-fresh@3.3.0: dependencies: parent-module: 1.0.1 @@ -8047,6 +8029,10 @@ snapshots: dependencies: hasown: 2.0.2 + is-core-module@2.15.1: + dependencies: + hasown: 2.0.2 + is-data-view@1.0.1: dependencies: is-typed-array: 1.1.13 @@ -8131,15 +8117,15 @@ snapshots: isomorphic-ws@4.0.1(ws@7.5.10): dependencies: - ws: 7.5.10 + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) - jackspeak@3.4.2: + jackspeak@3.4.3: dependencies: '@isaacs/cliui': 8.0.2 optionalDependencies: '@pkgjs/parseargs': 0.11.0 - jayson@4.1.1: + jayson@4.1.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@types/connect': 3.4.38 '@types/node': 12.20.55 @@ -8152,7 +8138,7 @@ snapshots: isomorphic-ws: 4.0.1(ws@7.5.10) json-stringify-safe: 5.0.1 uuid: 8.3.2 - ws: 7.5.10 + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -8252,7 +8238,7 @@ snapshots: lunr@2.3.9: {} - magic-string@0.30.10: + magic-string@0.30.11: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -8287,7 +8273,7 @@ snapshots: merge2@1.4.1: {} - micromatch@4.0.7: + micromatch@4.0.8: dependencies: braces: 3.0.3 picomatch: 2.3.1 @@ -8328,16 +8314,15 @@ snapshots: mixme@0.5.10: {} - mpl-bubblegum-instructions@https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(fastestsmallesttextencoderdecoder@1.0.22): - id: mpl-bubblegum-instructions@https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110 + mpl-bubblegum-instructions@https://codeload.github.com/fukaoi/mpl-bubblegum-instructions/tar.gz/357842f69922be400fe3f4fb809ced42afab3110(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10): dependencies: '@metaplex-foundation/beet': 0.7.1 - '@metaplex-foundation/beet-solana': 0.4.0 + '@metaplex-foundation/beet-solana': 0.4.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@metaplex-foundation/cusper': 0.0.2 - '@metaplex-foundation/mpl-token-metadata': 2.13.0(fastestsmallesttextencoderdecoder@1.0.22) - '@solana/spl-account-compression': 0.1.10(@solana/web3.js@1.95.0) - '@solana/spl-token': 0.1.8 - '@solana/web3.js': 1.95.0 + '@metaplex-foundation/mpl-token-metadata': 2.13.0(bufferutil@4.0.8)(fastestsmallesttextencoderdecoder@1.0.22)(utf-8-validate@5.0.10) + '@solana/spl-account-compression': 0.1.10(@solana/web3.js@1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana/spl-token': 0.1.8(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana/web3.js': 1.95.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) js-sha3: 0.8.0 transitivePeerDependencies: - bufferutil @@ -8551,7 +8536,7 @@ snapshots: safe-buffer: 5.2.1 sha.js: 2.4.11 - picocolors@1.0.1: {} + picocolors@1.1.0: {} picomatch@2.3.1: {} @@ -8597,16 +8582,18 @@ snapshots: possible-typed-array-names@1.0.0: {} - postcss-load-config@4.0.2(ts-node@10.9.2): + postcss-load-config@6.0.1(postcss@8.4.44)(tsx@3.14.0)(yaml@2.4.5): dependencies: lilconfig: 3.1.2 - ts-node: 10.9.2(@types/node@20.14.10)(typescript@5.4.5) + optionalDependencies: + postcss: 8.4.44 + tsx: 3.14.0 yaml: 2.4.5 - postcss@8.4.39: + postcss@8.4.44: dependencies: nanoid: 3.3.7 - picocolors: 1.0.1 + picocolors: 1.1.0 source-map-js: 1.2.0 prelude-ls@1.2.1: {} @@ -8685,7 +8672,7 @@ snapshots: resolve@1.22.8: dependencies: - is-core-module: 2.14.0 + is-core-module: 2.15.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -8707,26 +8694,26 @@ snapshots: hash-base: 3.1.0 inherits: 2.0.4 - rollup@4.18.1: + rollup@4.21.2: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.18.1 - '@rollup/rollup-android-arm64': 4.18.1 - '@rollup/rollup-darwin-arm64': 4.18.1 - '@rollup/rollup-darwin-x64': 4.18.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.18.1 - '@rollup/rollup-linux-arm-musleabihf': 4.18.1 - '@rollup/rollup-linux-arm64-gnu': 4.18.1 - '@rollup/rollup-linux-arm64-musl': 4.18.1 - '@rollup/rollup-linux-powerpc64le-gnu': 4.18.1 - '@rollup/rollup-linux-riscv64-gnu': 4.18.1 - '@rollup/rollup-linux-s390x-gnu': 4.18.1 - '@rollup/rollup-linux-x64-gnu': 4.18.1 - '@rollup/rollup-linux-x64-musl': 4.18.1 - '@rollup/rollup-win32-arm64-msvc': 4.18.1 - '@rollup/rollup-win32-ia32-msvc': 4.18.1 - '@rollup/rollup-win32-x64-msvc': 4.18.1 + '@rollup/rollup-android-arm-eabi': 4.21.2 + '@rollup/rollup-android-arm64': 4.21.2 + '@rollup/rollup-darwin-arm64': 4.21.2 + '@rollup/rollup-darwin-x64': 4.21.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.21.2 + '@rollup/rollup-linux-arm-musleabihf': 4.21.2 + '@rollup/rollup-linux-arm64-gnu': 4.21.2 + '@rollup/rollup-linux-arm64-musl': 4.21.2 + '@rollup/rollup-linux-powerpc64le-gnu': 4.21.2 + '@rollup/rollup-linux-riscv64-gnu': 4.21.2 + '@rollup/rollup-linux-s390x-gnu': 4.21.2 + '@rollup/rollup-linux-x64-gnu': 4.21.2 + '@rollup/rollup-linux-x64-musl': 4.21.2 + '@rollup/rollup-win32-arm64-msvc': 4.21.2 + '@rollup/rollup-win32-ia32-msvc': 4.21.2 + '@rollup/rollup-win32-x64-msvc': 4.21.2 fsevents: 2.3.3 rpc-websockets@9.0.2: @@ -8750,7 +8737,7 @@ snapshots: rxjs@7.8.1: dependencies: - tslib: 2.6.3 + tslib: 2.7.0 safe-array-concat@1.1.2: dependencies: @@ -8785,6 +8772,8 @@ snapshots: semver@7.6.2: {} + semver@7.6.3: {} + serialize-error@7.0.1: dependencies: type-fest: 0.13.1 @@ -9012,28 +9001,28 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-node@10.9.2(@types/node@20.14.10)(typescript@5.4.5): + ts-node@10.9.2(@types/node@20.16.4)(typescript@5.5.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.14.10 + '@types/node': 20.16.4 acorn: 8.12.1 acorn-walk: 8.3.3 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.4.5 + typescript: 5.5.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 tsc-alias@1.8.10: dependencies: chokidar: 3.6.0 - commander: 9.3.0 + commander: 9.5.0 globby: 11.1.0 mylas: 2.1.13 normalize-path: 3.0.0 @@ -9046,63 +9035,69 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 - tslib@2.6.3: {} + tslib@2.7.0: {} - tsup@8.1.0(ts-node@10.9.2)(typescript@5.4.5): + tsup@8.2.4(postcss@8.4.44)(tsx@3.14.0)(typescript@5.5.3)(yaml@2.4.5): dependencies: - bundle-require: 4.2.1(esbuild@0.21.5) + bundle-require: 5.0.0(esbuild@0.23.1) cac: 6.7.14 chokidar: 3.6.0 - debug: 4.3.5 - esbuild: 0.21.5 + consola: 3.2.3 + debug: 4.3.6 + esbuild: 0.23.1 execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 4.0.2(ts-node@10.9.2) + picocolors: 1.1.0 + postcss-load-config: 6.0.1(postcss@8.4.44)(tsx@3.14.0)(yaml@2.4.5) resolve-from: 5.0.0 - rollup: 4.18.1 + rollup: 4.21.2 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tree-kill: 1.2.2 - typescript: 5.4.5 + optionalDependencies: + postcss: 8.4.44 + typescript: 5.5.3 transitivePeerDependencies: + - jiti - supports-color - - ts-node + - tsx + - yaml tsx@3.14.0: dependencies: esbuild: 0.18.20 - get-tsconfig: 4.7.5 + get-tsconfig: 4.8.0 source-map-support: 0.5.21 optionalDependencies: fsevents: 2.3.3 - turbo-darwin-64@2.0.6: + turbo-darwin-64@2.1.1: optional: true - turbo-darwin-arm64@2.0.6: + turbo-darwin-arm64@2.1.1: optional: true - turbo-linux-64@2.0.6: + turbo-linux-64@2.1.1: optional: true - turbo-linux-arm64@2.0.6: + turbo-linux-arm64@2.1.1: optional: true - turbo-windows-64@2.0.6: + turbo-windows-64@2.1.1: optional: true - turbo-windows-arm64@2.0.6: + turbo-windows-arm64@2.1.1: optional: true - turbo@2.0.6: + turbo@2.1.1: optionalDependencies: - turbo-darwin-64: 2.0.6 - turbo-darwin-arm64: 2.0.6 - turbo-linux-64: 2.0.6 - turbo-linux-arm64: 2.0.6 - turbo-windows-64: 2.0.6 - turbo-windows-arm64: 2.0.6 + turbo-darwin-64: 2.1.1 + turbo-darwin-arm64: 2.1.1 + turbo-linux-64: 2.1.1 + turbo-linux-arm64: 2.1.1 + turbo-windows-64: 2.1.1 + turbo-windows-arm64: 2.1.1 tweetnacl@1.0.3: {} @@ -9148,23 +9143,21 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 - typedoc-material-theme@1.1.0(typedoc@0.25.13): + typedoc-material-theme@1.1.0(typedoc@0.25.13(typescript@5.5.3)): dependencies: '@material/material-color-utilities': 0.2.7 - typedoc: 0.25.13(typescript@5.4.5) + typedoc: 0.25.13(typescript@5.5.3) - typedoc@0.25.13(typescript@5.4.5): + typedoc@0.25.13(typescript@5.5.3): dependencies: lunr: 2.3.9 marked: 4.3.0 minimatch: 9.0.5 shiki: 0.14.7 - typescript: 5.4.5 + typescript: 5.5.3 typescript-collections@1.3.3: {} - typescript@5.4.5: {} - typescript@5.5.3: {} unbox-primitive@1.0.2: @@ -9174,7 +9167,7 @@ snapshots: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 - undici-types@5.26.5: {} + undici-types@6.19.8: {} uri-js@4.4.1: dependencies: @@ -9183,6 +9176,7 @@ snapshots: utf-8-validate@5.0.10: dependencies: node-gyp-build: 4.8.1 + optional: true util-deprecate@1.0.2: {} @@ -9278,12 +9272,18 @@ snapshots: imurmurhash: 0.1.4 signal-exit: 4.1.0 - ws@7.4.6: {} + ws@7.4.6(bufferutil@4.0.8)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.8 + utf-8-validate: 5.0.10 - ws@7.5.10: {} + ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10): + optionalDependencies: + bufferutil: 4.0.8 + utf-8-validate: 5.0.10 ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): - dependencies: + optionalDependencies: bufferutil: 4.0.8 utf-8-validate: 5.0.10 @@ -9291,7 +9291,8 @@ snapshots: yaml@1.10.2: {} - yaml@2.4.5: {} + yaml@2.4.5: + optional: true yargs-parser@20.2.9: {} @@ -9300,7 +9301,7 @@ snapshots: yargs@16.2.0: dependencies: cliui: 7.0.4 - escalade: 3.1.2 + escalade: 3.2.0 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 @@ -9310,7 +9311,7 @@ snapshots: yargs@17.7.2: dependencies: cliui: 8.0.1 - escalade: 3.1.2 + escalade: 3.2.0 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3