xiaomianao666

小程序:Acfunℛ1

Apr 7th, 2022
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@Acfunℛ1@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiQWNmdW7ihJsxIiwiYXV0aG9yIjoiTW9vbiIsInVybCI6Imh0dHBzOi8vd3d3LmFjZnVuLmNuL2Jhbmd1bWlsaXN0P3BhZ2VOdW09ZnlwYWdlIiwidmVyc2lvbiI6MCwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJvdGhlciIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxudmFyIHJlcyA9IHt9O1xudmFyIGQgPSBbXTtcbi8v6aKc6ImyXG52YXIgQ29sb3JzID0gW1wiNFwiLCBcIjVcIiwgXCIwXCIsIFwiMVwiLCBcIkFcIiwgXCIzXCIsIFwiOFwiLCBcIjlcIiwgXCJCXCIsIFwiQ1wiLCBcIkRcIiwgXCJFXCIsIFwiNlwiLCBcIjdcIiwgXCJGXCJdO1xudmFyIENvbG9yID0gJyMnO1xuaWYgKGdldFZhcignWVMnKSA9PSAn6ZqP5py6Jykge1xuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgNjsgaSsrKSB7XG4gICAgICAgIHZhciBudW0gPSBNYXRoLmNlaWwoKE1hdGgucmFuZG9tKCkgKiAxNSkpIC0gMTtcbiAgICAgICAgdmFyIENvbG9yID0gQ29sb3IgKyBDb2xvcnNbbnVtXTtcbiAgICB9XG59IGVsc2Uge1xuICAgIHZhciBDb2xvciA9IFwiI0ZBNzI5OFwiO1xufVxuXG5mdW5jdGlvbiBnZXRIZWF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9IGdldFZhcigna2V5MicsICdEQVknKTtcblxuICAgIGlmIChnZXRWYXIoXCJsYWJlbDFcIikgPT0gJ+aOkuihjOamnCcpIHtcbiAgICAgICAgZm9yICh2YXIgaSBpbiB3b3JkMSkge1xuICAgICAgICAgICAgdmFyIGEgPSB3b3JkMVtpXTtcbiAgICAgICAgICAgIHZhciBiID0gY2xhc3MxW2ldO1xuICAgICAgICAgICAgdmFyIGMgPSBhICsgJyYnICsgYjtcbiAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgdGl0bGU6IGEgPT0gbGFiMSA/IGdldEhlYWQoYSkgOiBhLFxuICAgICAgICAgICAgICAgIHVybDogJChcIiNub0xvYWRpbmcjXCIpLmxhenlSdWxlKChjKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcihcImxhYjFcIiwgYy5zcGxpdCgnJicpWzBdKTtcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKFwia2V5MVwiLCBjLnNwbGl0KCcmJylbMV0pO1xuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcImhpa2VyOi8vZW1wdHlcIlxuICAgICAgICAgICAgICAgIH0sIGMpLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xuICAgICAgICB9KTtcblxuICAgICAgICBmb3IgKHZhciBrIGluIHdvcmQyKSB7XG4gICAgICAgICAgICB2YXIgYSA9IHdvcmQyW2tdO1xuICAgICAgICAgICAgdmFyIGIgPSBjbGFzczJba107XG4gICAgICAgICAgICB2YXIgYyA9IGEgKyAnJicgKyBiO1xuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogYSA9PSBsYWIyID8gZ2V0SGVhZChhKSA6IGEsXG4gICAgICAgICAgICAgICAgdXJsOiAkKFwiI25vTG9hZGluZyNcIikubGF6eVJ1bGUoKGMpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKFwibGFiMlwiLCBjLnNwbGl0KCcmJylbMF0pO1xuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoXCJrZXkyXCIsIGMuc3BsaXQoJyYnKVsxXSk7XG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiaGlrZXI6Ly9lbXB0eVwiXG4gICAgICAgICAgICAgICAgfSwgYyksXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbidcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuICAgIHZhciB1cmwgPSBwdXJsLnJlcGxhY2UoJ+WIhuexuycsIGdldFZhcigna2V5MScpKS5yZXBsYWNlKCfml6XmnJ8nLCBnZXRWYXIoJ2tleTInKSk7XG5cbiAgICB2YXIganNvbiA9IEpTT04ucGFyc2UocmVxdWVzdCh1cmwsIHt9KSk7XG5cbiAgICB2YXIgbGlzdCA9IGpzb24ucmFua0xpc3Q7XG4gICAgZm9yIChsZXQgeCBvZiBsaXN0KSB7XG4gICAgICAgIHZhciBjID0geC5zaGFyZVVybDtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiB4LnRpdGxlLFxuICAgICAgICAgICAgZGVzYzogeC5kZXNjcmlwdGlvbixcbiAgICAgICAgICAgIGltZzogeC52aWRlb0NvdmVyLFxuICAgICAgICAgICAgLy91cmw6eC5zaGFyZVVybCxcbiAgICAgICAgICAgIHVybDogJChcIlwiKS5sYXp5UnVsZSgoYykgPT4ge1xuICAgICAgICAgICAgICAgIHZhciBjb2RlID0gcmVxdWVzdChjLCB7XG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcbiAg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ZGM2MDc3NzQzMzQwN2Q5O2N1cl9ncm91cF9pZD04OTExNjc0NTIxOEE2NEU0X3NlbGZfOTJlMTFiYWY5NWM1ZTg3ZjJkYzYwNzc3NDMzNDA3ZDlfMFwiXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGJvZHk6IFwidmlkZW9JZD1cIiArIHZpZCxcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIlxuICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAvL2xvZyhkbWluZm8pXG4gICAgICAgICAgICAgICAgdmFyIGRhbm11ID0gW107XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBkbWluZm8uYWRkZWQubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgLy9sb2coanNvbi5kYW5tdWt1W2ldWzRdKTtcbiAgICAgICAgICAgICAgICAgICAgZGFubXUucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiBkbWluZm8uYWRkZWRbaV0uYm9keSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpbWU6IGRtaW5mby5hZGRlZFtpXS5wb3NpdGlvbiAvIDEwMDBcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbGV0IHMgPSBKU09OLnN0cmluZ2lmeShkYW5tdSlcbiAgICAgICAgICAgICAgICAvL2xvZyhzKVxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcImhpa2VyOi8vZmlsZXMvY2FjaGUvYWNkYW5tdS5qc29uXCIsIHMpO1xuXG5cbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcnVybCA9IGNvZGUucmVwbGFjZSgvXFxcXC9nLCAnJykuc3BsaXQoJ2JhY2t1cFVybFwiOltcIicpWzFdLnNwbGl0KCdcIicpWzBdO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJ1cmwgPSB1cmxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgdXJsczogW3J1cmxdLFxuICAgICAgICAgICAgICAgICAgICBkYW5tdTogJ2hpa2VyOi8vZmlsZXMvY2FjaGUvYWNkYW5tdS5qc29uJ1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSwgYyksXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3BpY18xX2NhcmQnXG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBzZXRSZXN1bHQoZCk7XG59XG5cbmlmIChsYWJlbCA9PSAnVVDkuLsnKSB7XG4gICAgZC5wdXNoKHtcbiAgICAgICAgZGVzYzogJzAmJiBmbG9hdCcsXG4gICAgICAgIGNvbF90eXBlOiBcIng1X3dlYnZpZXdfc2luZ2xlXCJcbiAgICB9KVxuICAgIHZhciB1aWQgPSBmZXRjaChcImhpa2VyOi8vZmlsZXMvYmlsaS9hY2Z1bi91cF9jYWNoZS50eHRcIiwge30pO1xuICAgIHZhciB4eCA9IGdldFZhcignYWNsYicpLnNwbGl0KCdcXG4nKTtcblxuICAgIGlmIChnZXRWYXIoXCJsYWJlbDJcIikgPT0gJ1VQJykge1xuICAgICAgICBmb3IgKHZhciBrIGluIHh4KSB7XG4gICAgICAgICAgICB2YXIgc3QgPSB1aWQgPT0geHhba10uc3BsaXQoJyYmJylbMV0uc3BsaXQoJyQkJylbMF0gPyAn4piR77iPJyA6ICcnO1xuICAgICAgICAgICAgdmFyIHBpYyA9IHh4W2tdLnNwbGl0KCckJCcpWzFdO1xuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogc3QgKyB4eFtrXS5zcGxpdCgnJiYnKVswXSxcbiAgICAgICAgICAgICAg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nBhZ2U9JyArIHBhZ2UgKyAnJnBhZ2VTaXplPTIwJnQ9JyArIHRzO1xuICAgIHRyeSB7XG4gICAgICAgIHZhciBjb2RlID0gSlNPTi5wYXJzZShmZXRjaCh1cmwsIHtcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcbiAgICAgICAgICAgICAgICBcIlVzZXItQWdlbnRcIjogUENfVUFcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByZWRpcmVjdDogZmFsc2VcbiAgICAgICAgfSkuc3BsaXQoJy8qPCEtLScpWzBdKS5odG1sO1xuICAgICAgICB2YXIgbGlzdCA9IHBhcnNlRG9tRm9yQXJyYXkoY29kZSwgXCJkaXYjYWMtc3BhY2UtdmlkZW8tbGlzdCYmYVwiKTtcbiAgICAgICAgZm9yIChsZXQgeCBvZiBsaXN0KSB7XG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiBwYXJzZURvbUZvckh0bWwoeCwgXCJwLnRpdGxlLmxpbmUmJlRleHRcIiksXG4gICAgICAgICAgICAgICAgaW1nOiBwYXJzZURvbUZvckh0bWwoeCwgXCJpbWcmJnNyY1wiKSxcbiAgICAgICAgICAgICAgICAvL3VybDogcGFyc2VEb20oeCwgXCJhJiZocmVmXCIpICsgYEBsYXp5UnVsZT0uanM6dmFyIGNvZGUgPSByZXF1ZXN0KGlucHV0LHtoZWFkZXJzOntcIlVzZXItQWdlbnRcIjpQQ19VQX19KTt0cnl7dmFyIHVybCA9Y29kZS5tYXRjaCgvYmFja3VwVXJsLio/XCIuKj9cIiguKj8pXCIvKVsxXTt9Y2F0Y2goZSl7dmFyIHVybCA9IGlucHV0fXVybDtgLFxuICAgICAgICAgICAgICAgIHVybDogJChwYXJzZURvbSh4LCBcImEmJmhyZWZcIikpLmxhenlSdWxlKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNvZGUgPSByZXF1ZXN0KGlucHV0LCB7XG4gICAgICAgICAgICAgICAgICAgIC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ZWJwX3N1cHBvcnRlZD0lN0IlMjJsb3NzeSUyMiUzQXRydWUlMkMlMjJsb3NzbGVzcyUyMiUzQXRydWUlMkMlMjJhbHBoYSUyMiUzQXRydWUlMkMlMjJhbmltYXRpb24lMjIlM0F0cnVlJTdEO2N1cl9yZXFfaWQ9ODkxMTY3NDUyMThBNjRFNF9zZWxmXzkyZTExYmFmOTVjNWU4N2YyZGM2MDc3NzQzMzQwN2Q5O2N1cl9ncm91cF9pZD04OTExNjc0NTIxOEE2NEU0X3NlbGZfOTJlMTFiYWY5NWM1ZTg3ZjJkYzYwNzc3NDMzNDA3ZDlfMFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgYm9keTogXCJ2aWRlb0lkPVwiICsgdmlkLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIlxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKGRtaW5mbylcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRhbm11ID0gW107XG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZG1pbmZvLmFkZGVkLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvL2xvZyhqc29uLmRhbm11a3VbaV1bNF0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgZGFubXUucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogZG1pbmZvLmFkZGVkW2ldLmJvZHksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltZTogZG1pbmZvLmFkZGVkW2ldLnBvc2l0aW9uIC8gMTAwMFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBsZXQgcyA9IEpTT04uc3RyaW5naWZ5KGRhbm11KVxuICAgICAgICAgICAgICAgICAgICAvL2xvZyhzKVxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXCJoaWtlcjovL2ZpbGVzL2NhY2hlL2FjZGFubXUuanNvblwiLCBzKTtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB1cmwgPSBjb2RlLm1hdGNoKC9iYWNrdXBVcmwuKj9cIi4qP1wiKC4qPylcIi8pWzFdO1xuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdXJsID0gaW5wdXRcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogW3VybF0sXG4gICAgICAgICAgICAgICAgICAgICAgICBkYW5tdTogJ2hpa2VyOi8vZmlsZXMvY2FjaGUvYWNkYW5tdS5qc29uJ1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9LCApLFxuICAgICAgICAgICAgICAgIGRlc2M6IHBhcnNlRG9tRm9ySHRtbCh4LCBcInAucGxheS1pbmZvJiZUZXh0XCIpLnNwbGl0KCcg4oCiIOW8ueW5lScpWzBdICsgJyAg5LiK5Lyg5pel5pyfOicgKyBwYXJzZURvbUZvckh0bWwoeCwgXCJwLmRhdGUmJlRleHRcIiksXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJ1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9IGNhdGNoIChlKSB7fVxuICAgIHNldFJlc3VsdChkKTtcbn1cblxuaWYgKGxhYmVsID09ICfnlarliacnKSB7XG5cbiAgICBsZXQgZCA9IFtdXG4gICAgdmFyIGNhdGVnb3J5X2h0bWwgPSBnZXRSZXNDb2RlKClcbiAgICB2YXIgY2F0ZWdvcmllcyA9IH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ZTExYmFmOTVjNWU4N2YyZGM2MDc3NzQzMzQwN2Q5O2N1cl9ncm91cF9pZD04OTExNjc0NTIxOEE2NEU0X3NlbGZfOTJlMTFiYWY5NWM1ZTg3ZjJkYzYwNzc3NDMzNDA3ZDlfMFwiXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBib2R5OiBcInZpZGVvSWQ9XCIgKyB2aWQsXG4gICAgICAgICAgICAgICAgbWV0aG9kOiBcIlBPU1RcIlxuICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgLy9sb2coZG1pbmZvKVxuICAgICAgICAgICAgdmFyIGRhbm11ID0gW107XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGRtaW5mby5hZGRlZC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIC8vbG9nKGpzb24uZGFubXVrdVtpXVs0XSk7XG4gICAgICAgICAgICAgICAgZGFubXUucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIHRleHQ6IGRtaW5mby5hZGRlZFtpXS5ib2R5LFxuICAgICAgICAgICAgICAgICAgICB0aW1lOiBkbWluZm8uYWRkZWRbaV0ucG9zaXRpb24gLyAxMDAwXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxldCBzID0gSlNPTi5zdHJpbmdpZnkoZGFubXUpXG4gICAgICAgICAgICAvL2xvZyhzKVxuICAgICAgICAgICAgd3JpdGVGaWxlKFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9hY2Rhbm11Lmpzb25cIiwgcyk7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHZhciB1cmwgPSBjb2RlLm1hdGNoKC9iYWNrdXBVcmwuKj9cIi4qP1wiKC4qPylcIi8pWzFdO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIHZhciB1cmwgPSBpbnB1dFxuICAgICAgICAgICAgfVxuICAgICAgICAg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AgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgLy9sb2coZG1pbmZvKVxuICAgICAgICAgICAgdmFyIGRhbm11ID0gW107XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGRtaW5mby5hZGRlZC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIC8vbG9nKGpzb24uZGFubXVrdVtpXVs0XSk7XG4gICAgICAgICAgICAgICAgZGFubXUucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIHRleHQ6IGRtaW5mby5hZGRlZFtpXS5ib2R5LFxuICAgICAgICAgICAgICAgICAgICB0aW1lOiBkbWluZm8uYWRkZWRbaV0ucG9zaXRpb24gLyAxMDAwXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxldCBzID0gSlNPTi5zdHJpbmdpZnkoZGFubXUpXG4gICAgICAgICAgICAvL2xvZyhzKVxuICAgICAgICAgICAgd3JpdGVGaWxlKFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9hY2Rhbm11Lmpzb25cIiwgcyk7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHZhciBydXJsID0gY29kZS5yZXBsYWNlKC9cXFxcL2csICcnKS5zcGxpdCgnYmFja3VwVXJsXCI6W1wiJylbMV0uc3BsaXQoJ1wiJylbMF07XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgdmFyIHJ1cmwgPSB1cmxcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcbiAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgdXJsczogW3J1cmxdLFxuICAgICAgICAgICAgICAgIGRhbm11OiAnaGlrZXI6Ly9maWxlcy9jYWNoZS9hY2Rhbm11Lmpzb24nXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSwgYywgdmlkKSx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kOTtjdXJfZ3JvdXBfaWQ9ODkxMTY3NDUyMThBNjRFNF9zZWxmXzkyZTExYmFmOTVjNWU4N2YyZGM2MDc3NzQzMzQwN2Q5XzBcIlxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBib2R5OiBcInZpZGVvSWQ9XCIgKyB2aWQsXG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCJcbiAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgLy9sb2coZG1pbmZvKVxuICAgICAgICAgICAgICAgIHZhciBkYW5tdSA9IFtdO1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZG1pbmZvLmFkZGVkLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKGpzb24uZGFubXVrdVtpXVs0XSk7XG4gICAgICAgICAgICAgICAgICAgIGRhbm11LnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogZG1pbmZvLmFkZGVkW2ldLmJvZHksXG4gICAgICAgICAgICAgICAgICAgICAgICB0aW1lOiBkbWluZm8uYWRkZWRbaV0ucG9zaXRpb24gLyAxMDAwXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGxldCBzID0gSlNPTi5zdHJpbmdpZnkoZGFubXUpXG4gICAgICAgICAgICAgICAgLy9sb2cocylcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXCJoaWtlcjovL2ZpbGVzL2NhY2hlL2FjZGFubXUuanNvblwiLCBzKTtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcnVybCA9IGNvZGUucmVwbGFjZSgvXFxcXC9nLCAnJykuc3BsaXQoJ2JhY2t1cFVybFwiOltcIicpWzFdLnNwbGl0KCdcIicpWzBdO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKG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sYXp5UnVsZSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb2RlID0gcmVxdWVzdChpbnB1dCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiVXNlci1BZ2VudFwiOiBQQ19VQVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHZpZCA9IEpTT04ucGFyc2UoY29kZS5zcGxpdChcIndpbmRvdy52aWRlb0luZm8gPSBcIilbMV0uc3BsaXQoXCI7XCIpWzBdKS5jdXJyZW50VmlkZW9JZDtcbiAgICAgICAgICAgICAgICAgICAgbG9nKHZpZClcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRtdXJsID0gXCJodHRwczovL20uYWNmdW4uY24vcmVzdC9tb2JpbGUtZGlyZWN0L25ldy1kYW5tYWt1L3BvbGxcIjtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRtaW5mbyA9IEpTT04ucGFyc2UocmVxdWVzdChkbXVybCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiQ29va2llXCI6IFwiX2RpZD1INV85ODkzNTA1NDlGRUY3NkRFO2FjdG9rZW49S1ZFT1ExWHh1SWRYdWQ2Z3JOdGxEb3hSO3NhZmV0eV9pZD1BQUtRdmRUNmxLUWxndGowRXp0dWJYZk87RUdHX1NFU1M9TGV1VnJEN3NwVWw0UFFmTnJvVzlCRmFpNV9CT2YxUzFMSnktZmhYdGxZbDdkN2o5MG1JMWJNbzNQZlR4RXBhZFV2bWJKaE5oNzFjOGVNQ294RkxQd01fT2I4SmFFMFVTOEJPX0M1aDNINExHeG1mYndJX05SU24tY3Z6b1RFaDlDQThyYXR6bTdlME1PX2R4c3NIcF9nPT07d2VicF9zdXBwb3J0ZWQ9JTdCJTIybG9zc3klMjIlM0F0cnVlJTJDJTIybG9zc2xlc3MlMjIlM0F0cnVlJTJDJTIyYWxwaGElMjIlM0F0cnVlJTJDJTIyYW5pbWF0aW9uJTIyJTNBdHJ1ZSU3RDtjdXJfcmVxX2lkPTg5MTE2NzQ1MjE4QTY0RTRfc2VsZl85MmUxMWJhZjk1YzVlODdmMmRjNjA3Nzc0MzM0MDdkOTtjdXJfZ3JvdXBfaWQ9ODkxMTY3NDUyMThBNjRFNF9zZWxmXzkyZTExYmFmOTVjNWU4N2YyZGM2MDc3NzQzMzQwN2Q5XzBcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IFwidmlkZW9JZD1cIiArIHZpZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXCJQT1NUXCJcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICAvL2xvZyhkbWluZm8pXG4gICAgICAgICAgICAgICAgICAgIHZhciBkYW5tdSA9IFtdO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGRtaW5mby5hZGRlZC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2coanNvbi5kYW5tdWt1W2ldWzRdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhbm11LnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6IGRtaW5mby5hZGRlZFtpXS5ib2R5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWU6IGRtaW5mby5hZGRlZFtpXS5wb3NpdGlvbiAvIDEwMDBcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgbGV0IHMgPSBKU09OLnN0cmluZ2lmeShkYW5tdSlcbiAgICAgICAgICAgICAgICAgICAgLy9sb2cocylcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9hY2Rhbm11Lmpzb25cIiwgcyk7XG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdXJsID0gY29kZS5tYXRjaCgvYmFja3VwVXJsLio/XCIuKj9cIiguKj8pXCIvKVsxXTtcbiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IGlucHV0XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IFt1cmxdLFxuICAgICAgICAgICAgICAgICAgICAgICAgZGFubXU6ICdoaWtlcjovL2ZpbGVzL2NhY2hlL2FjZGFubXUuanNvbidcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSwgKSxcbiAgICAgICAgICAgICAgICBkZXNjOiBwYXJzZURvbUZvckh0bWwoeCwgXCJwLnBsYXktaW5mbyYmVGV4dFwiKS5zcGxpdCgnIOKAoiDlvLnluZUnKVswXSArICcgIOS4iuS8oOaXpeacnzonICsgcGFyc2VEb21Gb3JIdG1sKHgsIFwicC5kYXRlJiZUZXh0XCIpLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYydcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfSBjYXRjaCAoZSkge31cblxufVxucmVzLmRhdGEgPSBkO1xuc2V0UmVzdWx0KHJlcyk7IiwidWEiOiJwYyIsInByZVJ1bGUiOiJcbmV2YWwoZmV0Y2goXCJodHRwczovL2dpdC50eXJhbnRnLmNvbS90eXJhbnRnZW5lc2lzL2hpa2VyVmlld1J1bGVzL3Jhdy9tYXN0ZXIvR29kX1BsYW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