Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@MyFieldᴰⁿ@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiTXlGaWVsZOG0sOKBvyIsImF1dGhvciI6IuaWreW/tSbpgZPplb/prZTmlLkiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IiwidmVyc2lvbiI6NDE1LCJjb2xfdHlwZSI6InRleHRfY2VudGVyXzEiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InRvb2wiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoi5bel5YW3IiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbi8vbG9nKE1PQklMRV9VQSk7XG5jb25zdCB7ZGVtb0RhdGEsZGVmYXVsdFNldHMsZmxvb3JzfSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9kZW1vRGF0YT9ydWxlPU15RmllbGThtLDigb9cIik7XG5jb25zdCB7Z2V0T25lLHVuaXF1ZTIsZHVwbGljYXRlc30gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvdXRpbHM/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xubGV0IHNqVGVzdCA9W107Zm9yKGxldCBpIGluIGRlbW9EYXRhKXtzalRlc3Q9c2pUZXN0LmNvbmNhdChkZW1vRGF0YVtpXSl9XG50aGlzLmQgPSBbXTtcbmNvbnN0IGp4SXRlbSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9qeEl0ZW0/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xudmFyIFJvdXRlID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbmV2YWwoZ2V0SX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udGVzdChzZWwpKXtcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/nnIvotbfmnaXmkq3mlL7lnLDlnYDkvLzkuY7kuI3lr7nlirI/XFxuJytwbGF5VXJsXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuICQoKS5sYXp5UnVsZSgocGxheVVybCx1cmwpPT57XG4gICAgICAgICAgICBsZXQgdGl0bGUgPSBnZXRJdGVtKFwic2VsZWN0ZWQwXCIsIFwiJiZcIikuc3BsaXQoXCImJlwiKVswXS5yZXBsYWNlKC/wn5GJL2csJycpO1xuICAgICAgICAgICAgbG9nKCd0aXRsZTonK3RpdGxlKTtcbiAgICAgICAgICAgIGlmKGdldEl0ZW0oJ2RuLnRlc3RfbW9kZScpPT09J+aWreaPkicmJiEvXuS4jemAiSR8XumtlOaWrSQvLnRlc3QodGl0bGUpKXtcbiAgICAgICAgICAgICAgICBldmFsKFwidmFyIGNvbmZpZyA9XCIgKyBmZXRjaChcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXCIpKTtcbiAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGdldEl0ZW0oXCJzZWxlY3RlZDBcIiwgXCImJlwiKS5zcGxpdChcIiYmXCIpWzBdLnJlcGxhY2UoL/CfkYkvZywnJykucmVwbGFjZSgv5LiN6YCJL2csJycpO1xuICAgICAgICAgICAgICAgIGxvZygn5byA5aeL6LCD55So5pat5o+S5rWL6K+VLG15RmlsZWTotoXml7bkuLo6JytnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHVybCx0aXRsZSxwYXJzZUludChnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKSk7XG4gICAgICAgICAgICB9ZWxzZSBpZihnZXRJdGVtKCdkbi50ZXN0X21vZGUnKT09PSfmlq3mj5InJiYvXumtlOaWrSQvLnRlc3QodGl0bGUpKXtcbiAgICAgICAgICAgICAgICBldmFsKFwidmFyIGNvbmZpZyA9XCIgKyBmZXRjaChcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXCIpKTtcbiAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xuICAgICAgICAgICAgICAgIGxvZygn5byA5aeL6LCD55So6a2U5pat5ouf55yf5rWL6K+VLG15RmlsZWTotoXml7bkuLo6JytnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHVybCwnJyxwYXJzZUludChnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNle1xuICAgICAgICAgICAgICAgIGNvbnN0IHtsYXp5UGFyc2V9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvZ2xvYmFsUGFyc2U/cnVsZT3pgZPplb/ku5PlupNQcm8nKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbGF6eVBhcnNlKHBsYXlVcmwscGFyc2VJbnQoZ2V0SXRlbSgnZG4udGltZW91dCcsJzUwMDAnKSkpfHwndG9hc3Q6Ly/op6PmnpDlpLHotKUs5YW35L2T55yL5pel5b+XJ1xuICAgICAgICAgICAgfVxuICAgICAgICB9LHBsYXlVcmwsdXJsKVxuICAgIH0pLFxuICAgIGV4dHJhOiB7XG4gICAgICAgIGpzTG9hZGluZ0luamVjdDogdHJ1ZSxcbiAgICAgICAgYmxvY2tSdWxlczogWydiYWlkdS4qLnBuZycsICcuanBnJywnLm1wMycsJy5tcDQnLCcubTN1OCcsJy5mbHYnLCcuYXZpJywnLjNncCcsJy5tcGVnJywnLndtdicsJy5tb3YnLCcucm12YicsJy5naWYnLCcuanBnJywnLmpwZWcnLCcucG5nJywnLmljbycsJy5zdmcnXS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j6Ms55u05o6l6L+b6KGM55u06ZO+6Kej5p6QXCI7XG4gICAgICAgIH1lbHNlIGlmKGlucHV0PT09J+mtlOaWrScpe1xuICAgICAgICAgICAgc2V0SXRlbShcInNlbGVjdGVkXCIsICcnKTtcbiAgICAgICAgICAgIHNldEl0ZW0oXCJzZWxlY3RlZDBcIiwgaW5wdXQgKyBcIiYmXCIgKyAnJyk7XG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+W3suiuvue9ruS4uumtlOaWreino+aekO+8jOWPr+ebtOaOpeinpuWPkeWkh+iDjuaooeW8j1wiO1xuICAgICAgICB9XG4gICAgICAgIGxldCBpID0gcmVhbFRpdGxlcy5pbmRleE9mKGlucHV0KTtcbiAgICAgICAgbGV0IHVybCA9IHVybEFycltpXTtcbiAgICAgICAgbG9nKFwiXFxu5pu05pS55o6l5Y+jPiBcIiArIHVybCk7XG4gICAgICAgIGlmKHR5cGVvZih1cmwpIT09J3N0cmluZycpe1xuICAgICAgICAgICAgbG9nKCQudG9TdHJpbmcodXJsKSk7XG4gICAgICAgICAgICBzZXRJdGVtKFwic2VsZWN0ZWRcIiwgJC50b1N0cmluZyh1cmwpKTtcbiAgICAgICAgICAgIC8vIHJldHVybiAndG9hc3Q6Ly/mmoLkuI3mlK/mjIHmlq3mj5JmdW5jdGlvbuezu+WIl+eahOmrmOe6p+ino+aekOa1i+ivlSdcbiAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICBzZXRJdGVtKFwic2VsZWN0ZWRcIiwgdXJsKTtcbiAgICAgICAgfVxuICAgICAgICBzZXRJdGVtKFwic2VsZWN0ZWQwXCIsIGlucHV0ICsgXCImJlwiICsgdXJsKTtcbiAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xuICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+WIh+aNouino+aekOWPo+S4ujpcIitpbnB1dDtcbiAgICB9LCByZWFsVGl0b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d1bmRlZmluZWQnfHwhb3V0Q29kZSkpe1xuICAgICAgICAgICAgICAgICAgICBqeENvZGUucHVzaChvdXRUaXRsZSsnLCcrb3V0VGl0bGUpO1xuICAgICAgICAgICAgICAgIH1lbHNle1xuICAgICAgICAgICAgICAgICAgICBqeENvZGUucHVzaChvdXRUaXRsZSsnLCcrb3V0Q29kZXx8JycpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBsZXQgb3V0VGV4dCA9IGp4Q29kZS5qb2luKCdcXG4nKTtcbiAgICAgICAgICAgIGxldCBvdXRQYXRoID0gJ2hpa2VyOi8vZmlsZXMvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZU91dF8nK21vZGUrJy50eHQnO1xuICAgICAgICAgICAgd3JpdGVGaWxlKG91dFBhdGgsb3V0VGV4dCk7XG4gICAgICAgICAgICBsZXQgcGFzdGVzID0gZ2V0UGFzdGVzKCk7XG4gICAgICAgICAgICBsZXQgaW1wb3J0VXJsID0gc2hhcmVQYXN0ZShiYXNlNjRFbmNvZGUob3V0VGV4dCkscGFzdGVzWzFdKTtcbiAgICAgICAgICAgIGxldCBpbXBvcnRDb2RlID0gJ+mtlOaWreino+aekOWvvOWFpeWPo+S7pMKlwqUnK2ltcG9ydFVybDtcbiAgICAgICAgICAgIGNvcHkoaW1wb3J0Q29kZSk7XG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5paH5Lu25bey5a+85Ye65YiwOicrb3V0UGF0aCsnXFxu6K+36Ieq6KGM6YCa6L+HTVTnrqHnkIblmajmn6XnnIsnXG4gICAgICAgIH1lbHNle1xuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aIkeS4jea4healmuS9oOimgeWBmuS7gOS5iD9cXG4nK21vZGU7XG4gICAgICAgIH1cbiAgICB9LHRpdGxlQXJyLHVybEFyciksXG59KTtcbmQucHVzaCh7XG4gICAgdGl0bGU6J/Cfk6Xlr7zlhaVUWFQnLFxuICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcbiAgICB1cmw6JCgpLnJ1bGUoKCk9PntcbiAgICAgICAgbGV0IGQgPSBbXTtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiflr7zlhaXor7TmmI4nLFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMScsXG4gICAgICAgICAgICBkZXNjOifmlK/mjIHmraTmj5Lku7blr7zlh7rmoLzlvI/nmoTmlofmnKzov5vooYzlr7zlhaXjgIJcXG7moLzlvI8xOiDlkI3np7As5Zyw5Z2AIOS4gOihjOS4gOS4quino+aekFxcbuagvOW8jzI65LqR5Ymq5YiH5p2/IOmtlOaWreino+aekOWvvOWFpeWPo+S7pMKlwqXliarliIfmnb/lnLDlnYAnLFxuICAgICAgICAgICAgdXJsOidoaWtlcjovL2VtcHR5J1xuICAgICAgICB9KTtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIGRlc2M6IFwidHh05paH5pys6Kej5p6Q6KeE5YiZLOS4gOihjOS4gOS4qlwiLFxuICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXG4gICAgICAgICAgICB0aXRsZTon6Kej5p6Q5paH5pysJyxcbiAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldFZhcignZG4uaW1wb3J0X3RleHQnLCAnJyksXG4gICAgICAgICAgICAgICAgdHlwZTogXCJ0ZXh0YXJlYVwiLFxuICAgICAgICAgICAgICAgIGhlaWdodDotMSxcbiAgICAgICAgICAgICAgICBvbkNoYW5nZTogJ3B1dFZhcihcImRuLmltcG9ydF90ZXh0XCIsaW5wdXQpJ1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOifwn5Ol5a+85YWlJyxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJyxcbiAgICAgICAgICAgIHVybDokKCfnoa7lrprnvJbovpHlpb3kuoblkJc/5q2k5pON5L2c5bCG6KaG55uW5pys5Zyw5bey5pyJ55qE6K6w5b2V77yM5bu66K6u5aSH5Lu95ZCO55So56m65paH5Lu25a+85YWlJykuY29uZmlybSgoKT0+e1xuICAgICAgICAgICAgICAgIGNvbnN0IHtkZWZhdWx0U2V0c30gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvZGVtb0RhdGE/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xuICAgICAgICAgICAgICAgIGxldCBwYXJzZVJvdXRlID0gJ2hpa2VyOi8vZmlsZXMvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uJztcbiAgICAgICAgICAgICAgICBsZXQganNDb2RlID0gZmV0Y2gocGFyc2VSb3V0ZSl8fEpTT04uc3RyaW5naWZ5KHt0aXRsZTpbXSxjb2Rlczp7fSxzZXR0aW5nczpkZWZhdWx0U2V0c30pO1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsganNDb2RlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WPkeeUn+mUmeivrzpcXG4nK2UubWVzc2FnZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgdG9JbXBvcnQgPSBnZXRWYXIoXCJkbi5pbXBvcnRfdGV4dFwiKTtcbiAgICAgICAgICAgICAgICBpZigv6a2U5pat6Kej5p6Q5a+85YWl5Y+j5LukwqXCpS8udGVzdCh0b0ltcG9ydCkmJnRvSW1wb3J0LnNwbGl0KCfCpcKlJykubGVuZ3RoPjEpe1xuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gdG9JbXBvcnQuc3BsaXQoJ8KlwqUnKVsxXTtcbiAgICAgICAgICAgICAgICAgICAgaWYoIS9eaHR0cC8udGVzdCh1cmwpKXtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/liarliIfmnb/lnLDlnYDmnInor68s5a+85YWl5aSx6LSlJ1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRvSW1wb3J0ID0gcGFyc2VQYXN0ZSh1cmwpO1xuICAgICAgICAgICAgICAgICAgICB0b0ltcG9ydCA9IGJhc2U2NERlY29kZSh0b0ltcG9ydCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxldCBqaWV4aSA9IHRvSW1wb3J0LnNwbGl0KCdcXG4nKS5maWx0ZXIoaXQ9Pml0LnRyaW0oKSk7XG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlVGl0bGUgPSBbXTtcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VDb2RlID0ge307XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSBpbiBqaWV4aSkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGU9amlleGlbaV0uc3BsaXQoJywnKVswXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGU9amlleGlbaV0uc3BsaXQoJywnKVsxXTtcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcbiAgICAgICAgICAgICAgICAgICAgLy9sb2codGl0bGUpO1xuICAgICAgICAgICAgICAgICAgICBpZighKGNvZGUucmVwbGFjZSgvW1xcc10vZywnJykuc3RhcnRzV2l0aCgnaHR0cCcpKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2codGl0bGUrJ+S4uuWHveaVsOino+aekCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29kZS5yZXBsYWNlKC9bXFxzXS9nLCcnKS5sZW5ndGg+MjApey8v6KeG5Li6ZnVuY3Rpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlID0gZXZhbChiYXNlNjREZWNvZGUoY29kZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coY29kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgPSBlLm1lc3NhZ2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IHNjT2JqZWN0ID0gW1wiQ2l0eUlQXCIsIFwicGNVQVwiLCBcImNhY2hlTTN1OFwiLCBcImRlZmF1bHRQYXJzZVdlYlwiLFwibWFvc3NcIiwgXCJMTFFcIl07XG4gICAgICAgICAgICAgICAgcGFyc2VUaXRsZSA9IHBhcnNlVGl0bGU/cGFyc2VUaXRsZS5maWx0ZXIoaXQ9PiFzY09iamVjdC5pbmNsdWRlcyhpdCkpOltdO1xuICAgICAgICAgICAgICAgIHZhciBuZXdQYXJzZVRpdGxlID0ganNvbi50aXRsZS5jb25jYXQocGFyc2VUaXRsZSk7XG4gICAgICAgICAgICAgICAganNvbi50aXRsZSA9IEFycmF5LmZyb20obmV3IFNldChuZXdQYXJzZVRpdGxlKSk7XG4gICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBwYXJzZUNvZGUpO1xuICAgICAgICAgICAgICAgIGxldCBuZXdGaWxlID0gJC5zdHJpbmdpZnkoanNvbik7IC8vSlNPTi5wYXJzZeS8muaKpemUmVxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCBuZXdGaWxlKTtcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaIkOWKn+WvvOWFpScramlleGkubGVuZ3RoKyfmnaHop6PmnpAnO1xuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBleHRyYTp7XG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6dHJ1ZVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xuICAgIH0pLFxufSk7XG5kLnB1c2goe1xuICAgIHRpdGxlOifimK/vuI/mn6Xph43lpITnkIYnLFxuICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcbiAgICB1cmw6JCgpLmxhenlSdWxlKCh1bmlxdWUyLGR1cGxpY2F0ZXMsZmxvb3JzKT0+e1xuICAgICAgICBsZXQgcGFyc2VSb3V0ZSA9ICdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbic7XG4gICAgICAgIGxldCBqc0NvZGUgPSBmZXRjaChwYXJzZVJvdXRlKTtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsganNDb2RlKTtcbiAgICAgICAgfVxuICAgICAgICBjYXRjaCAoZSkge1xuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+acrOWcsOmCo+S4qk15UGFyc2UuanNvbuaWh+S7tuaciemXrumimCzov5nkuKrlip/og73kuI3nu5nkvaDnlKjkuoYhJ1xuICAgICAgICB9XG4gICAgICAgIGxldCB0aXRsZXMgPSBqc29uLnRpdGxlO1xuICAgICAgICBsZXQgY29kZXMgPSBqc29uLmNvZGVzO1xuICAgICAgICBsZXQga2V5cz0gT2JqZWN0LmtleXMoY29kZXMpO1xuICAgICAgICBsZXQga2V5c19yZV9jdCA9IGtleXMubGVuZ3RoIC0gdW5pcXVlMihrZXlzKS5sZW5ndGg7IC8vIOWQjeensOmHjeWkjVxuICAgICAgICBsZXQgbm9ybWFsX2xpc3QgPSBbXTtcbiAgICAgICAgZm9yKGxldCBvIGluIGNvZGVzKXtcbiAgICAgICAgICAgIGlmKHR5cGVvZihjb2Rlc1tvXSkhPT0ndW5kZWZpbmVkJyYmdHlwZW9mKGNvZGVzW29dKSE9PSdmdW5jdGlvbicpe1xuICAgICAgICAgICAgICAgIG5vcm1hbF9saXN0LnB1c2goY29kZXNbb10pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGxldCByZU5vckxpc3QgPSB1bmlxdWUyKG5vcm1hbF9saXN0KTtcbiAgICAgICAgbGV0IHZhbHVlX3JlX2N0ID0gbm9ybWFsX2xpc3QubGVuZ3RoIC0gcmVOb3JMaXN0Lmxlbmd0aDsgLy/ku6PnoIHph43lpI1cbiAgICAgICAgbGV0IHZhbHVlc19yZSA9IGR1cGxpY2F0ZXMobm9ybWFsX2xpc3QpOy8v6YeN5aSN55qE5YC8XG4gICAgICAgIGxldCBmdGxpc3QgPSBbXTtcbiAgICAgICAgbGV0IGZsYWdzID0ge307XG4gICAgICAgIGxldCBteUZsb29ycyA9IGZsb29ycztcbiAgICAgICAgZm9yKGxldCBqIGluIGNvZGVzKXsvL+mBjeWOhuaJgOaciVxuICAgICAgICAgICAgbGV0IG9uZSA9IGNvZGVzW2pdO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mKG9uZSkgIT09ICdmdW5jdGlvbicmJnZhbHVlc19yZS5pbmNsdWRlcyhvbmUpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgKGZsYWdzW29uZV0pID09PSAndW5kZWZpbmVkJyB8fCAhZmxhZ3Nbb25lXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy/lj5blh7rnrKzkuIDkuKrmoIflv5dcbiAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzW29uZV0gPSBteUZsb29yc1swXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG15Rmxvb3JzLnNwbGljZSgwLCAxKTsvL+WIoOmZpOagh+W/l+WIl+ihqOmHjOeahOesrOS4gOS4quWFg+e0oFxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGZ0bGlzdC5wdXNoKHtrZXk6IGZsYWdzW29uZV0gKyBqLCB2YWx1ZTogb25lfSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZnRsaXN0LnB1c2goe2tleTogaiwgdmFsdWU6IG9uZX0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1jYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIGxvZyhlLm1lc3NhZ2UpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gbG9nKEpTT04uc3RyaW5naWZ5KGZsYWdzKSk7XG4gICAgICAgIGxldCBuZXdDb2RlcyA9IHt9O1xuICAgICAgICBmb3IobGV0IGsgaW4gZnRsaXN0KXtcbiAgICAgICAgICAgIG5ld0NvZGVzW2Z0bGlzdFtrXS5rZXldID0gZnRsaXN0W2tdLnZhbHVlO1xuICAgICAgICB9XG4gICAgICAgIGxldCB0aXBzID0gJ+ajgOa1i+WIsOWQjeensOWkjeeUqOmhueebruaVsDonK2tleXNfcmVfY3QrJyzku6PnoIHph43lpI3pobnnm67mlbDph486Jyt2YWx1ZV9yZV9jdCsnXFxu6ZyA6KaB5LiA6ZSu5omT5Liq5qCH6K+G5ZCXP+S4jeaUr+aMgeiHquWKqOWIoOmZpCzmiZPmoIflv5foh6rooYzop6PlhrMnO1xuICAgICAgICByZXR1cm4gJCh0aXBzKS5jb25maXJtKCh2YWx1ZV9yZV9jdCxqc29uLG5ld0NvZGVzLHBhcnNlUm91dGUpPT57XG4gICAgICAgICAgICBpZih2YWx1ZV9yZV9jdDwxKXtcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pei54S26YO95pivMOS4qumHjeWkjemhueebruS6hu+8jOWwseS4jemcgOimgeaIkeWBmuS7gOS5iOS6hiEnXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjb21wYXJlKCl7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChhLCBiKXtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qge2Zsb29yc30gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvZGVtb0RhdGE/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeCA9IGEuc3Vic3RyaW5nKDAsMSk7XG4gICAgICAgICAgICAgICAgICAgIGxldCB5ID0gYi5zdWJzdHJpbmcoMCwxKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZsb29ycy5pbmRleE9mKHkpLWZsb29ycy5pbmRleE9mKHgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGpzb24uY29kZXMgPSBuZXdDb2RlcztcbiAgICAgICAgICAgIGxldCB0aXRsZXMgPSBPYmplY3Qua2V5cyhuZXdDb2Rlcyk7XG4gICAgICAgICAgICB0aXRsZXMgPSB0aXRsZXMuc29ydChjb21wYXJlKCkpO1xuICAgICAgICAgICAganNvbi50aXRsZSA9IHRpdGxlcztcbiAgICAgICAgICAgIHZhciBuZXdGaWxlID0gJC5zdHJpbmdpZnkoanNvbik7IC8vSlNPTi5wYXJzZeS8muaKpemUmVxuICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsIG5ld0ZpbGUpO1xuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suS4gOmUruaJk+S4iuagh+W/lyc7XG4gICAgICAgIH0sdmFsdWVfcmVfY3Q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cGFkZGluZzogMCAwcHggMCAwcHg7XFxuICAgICAgICAgICAgLyogICAgICAgICAgICBiYWNrZ3JvdW5kOiAjRjlGMERBOyovXFxuICAgICAgICAgICAgZm9udC13ZWlnaHQ6IDA7XFxuICAgICAgICAgICAgZm9udC1mYW1pbHk6IFxcXCJNaWNyb3NvZnQgWWFIZWlcXFwiLFxcXCLlrovkvZNcXFwiLFxcXCJTZWdvZSBVSVxcXCIsIFxcXCJMdWNpZGEgR3JhbmRlXFxcIiwgSGVsdmV0aWNhLCBBcmlhbCxzYW5zLXNlcmlmLCBGcmVlU2FucywgQXJpbW87XFxuICAgICAgICB9XFxuICAgICAgICAjYXBwe1xcbiAgICAgICAgICAgIG1hcmdpbi10b3A6LTEwcHg7XFxuICAgICAgICB9XFxuICAgICAgICAjdGlwc3tcXG4gICAgICAgICAgICBtYXJnaW4tdG9wOi0xMHB4O1xcbiAgICAgICAgICAgIG1hcmdpbi1ib3R0b206NXB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgLmZ1bmd7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXJcXG4gICAgICAgIH1cXG4gICAgICAgIGRpdi5ib3gge1xcbiAgICAgICAgICAgIG1hcmdpbi10b3A6LTFweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQzcHg7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDIwcHg7XFxuICAgICAgICB9XFxuICAgICAgICAvKui+k+WFpeahhuWwuuWvuCovXFxuICAgICAgICBmb3JtIHtcXG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcXG4gICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XFxuICAgICAgICAgICAgd2lkdGg6IDEwMCU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBpbnB1dCwgbGFiZWwsIHNlbGVjdCB7XFxuICAgICAgICAgICAgYm9yZGVyOiBub25lO1xcbiAgICAgICAgICAgIG91dGxpbmU6IG5vbmU7XFxuICAgICAgICB9XFxuICAgICAgICAvKuWtl+S9k+S9jee9riovXFxuICAgICAgICBpbnB1dCB7XFxuICAgICAgICAgICAgd2lkdGg6IDc3JTtcXG4gICAgICAgICAgICBoZWlnaHQ6IDMycHg7XFxuICAgICAgICAgICAgcGFkZGluZy1sZWZ0OiA2NnB4O1xcbiAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IDBweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGxhYmVsIHtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDogNDNweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgd2lkdGg6IDYwcHg7XFxuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC8q5bCP5qGGKi9cXG4gICAgICAgIC5iYXIgbGFiZWwge1xcbiAgICAgICAgICAgIC8qYmFja2dyb3VuZDogI0QwNkI2QzsqL1xcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDVweCA1NTVweCA1NTVweCA1cHg7XFxuICAgICAgICAgICAgd2lkdGg6IDYwcHg7XFxuICAgICAgICAgICAgZm9udC1zaXplOiAxM3B4O1xcbiAgICAgICAgICAgIHRvcDogMDtcXG4gICAgICAgICAgICBsZWZ0OiAzcHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKui+k+WFpeahhuagt+W8jyovXFxuICAgICAgICAuYmFyIGlucHV0IHtcXG4gICAgICAgICAgICAvKmJvcmRlci1yYWRpdXM6IDVweCA1NTVweCA1NTVweCA1cHg7XFxuICAgICAgICAgICAgICovXFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNHB4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrliJfooagqL1xcbiAgICAgICAgc2VsZWN0IHtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDo0MHB4O1xcbiAgICAgICAgICAgIGhlaWdodDogNDBweDtcXG4gICAgICAgICAgICB3aWR0aDogMjBweDtcXG4gICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XFxuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrliJfooagqL1xcbiAgICAgICAgLmxpZWIgc2VsZWN0e1xcbiAgICAgICAgICAgIC8qYm9yZGVyLXJhZGl1czogNHB4OyovXFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNTU1cHggNXB4IDVweCA1NTVweDtcXG4gICAgICAgICAgICB3aWR0aDogODBweDtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBmb250LXNpemU6IDEzcHg7XFxuICAgICAgICAgICAgdG9wOiAwO1xcbiAgICAgICAgICAgIHJpZ2h0OiAycHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKuWktOWDjyovXFxuICAgICAgICAucm91bmRfaWNvbntcXG4gICAgICAgICAgICB3aWR0aDogNDBweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1MCU7XFxuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcXG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcXG4gICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xcbiAgICAgICAgfVxcbiAgICA8L3N0eWxlPlxcbjwvaGVhZD5cXG48Ym9keT5cXG48ZGl2IGNsYXNzPVxcXCJmdW5nXFxcIj5cXG4gICAgPGEgc3R5bGU9XFxcImZsb2F0OmxlZnQ7X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s6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgdHg6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgbWc6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgYmw6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgc2g6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgeGc6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgLy8gYWw6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgcHA6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgbWk6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgbGU6ICfkuIfog73op6PmnpDikr8nLFxcbiAgICAgICAgbHQ6ICfkuIfog73op6PmnpDikr8nLC8v6b6Z6IW+XFxuICAgICAgICBycjon5LiH6IO96Kej5p6Q4pK/JywvL+S6uuS6uui/t1xcbiAgICAgICAgd2Q6J+S4h+iDveino+aekOKSvycsLy/kupTmr5LkupFcXG4gICAgICAgIG90aDogJ+mBk+mVv+S7k+W6k+mAmuWFjScsXFxuICAgICAgICBvbmU6ICcxMDgwJyxcXG4gICAgICAgIGZ1bjogJ+iejeWFtCcsXFxuICAgICAgICBxanU6ICfpu5jorqQnLFxcbiAgICAgICAgY2o6ICdoaWtlcjovL2ZpbGVzL2NhY2hlL1BhcnNlX0RuLmpzJ1xcbiAgICB9O1xcbiAgICB2YXIgb2xkUm91dGUgPSBcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cXFwiO1xcbiAgICB2YXIgbXlTZXQgPSBmYmEuZmV0Y2gob2xkUm91dGUpO1xcbiAgICB2YXIgbmV3Um91dGUgPSBcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb25cXFwiO1xcbiAgICBpZighZmJhLmZldGNoKG5ld1JvdXRlKSl7XFxuICAgICAgICBmYmEud3JpdGVGaWxlKG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AgICAgICAgICAgIG5hbWU6J+eIseWlh+iJuicsXFxuICAgICAgICAgICAgaWQ6J3F5JyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5xeSxcXG4gICAgICAgICAgICBwbGFjZWhvbGRlcjon6K6+572u54ix5aWH6Im6J1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifkvJjphbcnLFxcbiAgICAgICAgICAgIGlkOid5aycsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MueWtcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6IW+6K6vJyxcXG4gICAgICAgICAgICBpZDondHgnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnR4XFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+iKkuaenCcsXFxuICAgICAgICAgICAgaWQ6J21nJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5tZ1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflk5Tlk6nlk5Tlk6knLFxcbiAgICAgICAgICAgIGlkOidibCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuYmxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5pCc54uQJyxcXG4gICAgICAgICAgICBpZDonc2gnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnNoXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+ilv+eTnCcsXFxuICAgICAgICAgICAgaWQ6J3hnJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy54Z1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOidQUFRWJyxcXG4gICAgICAgICAgICBpZDoncHAnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnBwXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WSquWSlScsXFxuICAgICAgICAgICAgaWQ6J21pJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5taVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifkuZDop4YnLFxcbiAgICAgICAgICAgIGlkOidsZScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MubGVcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTonMTkwNScsXFxuICAgICAgICAgICAgaWQ6J29uZScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3Mub25lXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+mjjuihjCcsXFxuICAgICAgICAgICAgaWQ6J2Z1bicsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuZnVuXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+m+meiFvicsXFxuICAgICAgICAgICAgaWQ6J2x0JyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5sdFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifkurrkurrov7cnLFxcbiAgICAgICAgICAgIGlkOidycicsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MucnJcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5LqU5q+SJyxcXG4gICAgICAgICAgICBpZDond2QnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLndkXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WFtuS7licsXFxuICAgICAgICAgICAgaWQ6J290aCcsXFxuICAgICAgICAgICAgdmFsdWU6c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ICAgICAgIHRpdGxlOiBcXFwi6Kej5p6Q6YWN572u566h55CGXFxcIixcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvUm91dGU/cnVsZT1NeUZpZWxk4bSw4oG/JnR5cGU96Kej5p6QI25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5I1xcXCIsXFxuICAgICAgICAgICAgZ3JvdXA6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBwcmVSdWxlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBleHRyYToge31cXG4gICAgICAgIH0pKTtcXG4gICAgfVxcbiAgICBmdW5jdGlvbiBjYW5jZWwoKXtcXG4gICAgICAgIGlmKCFteVNldCl7XFxuICAgICAgICAgICAgZmJhLndyaXRlRmlsZShvbGRSb3V0ZSwgSlNPTi5zdHJpbmdpZnkoc2V0dGluZ3MsIG51bGwsIDQpKTtcXG4gICAgICAgICAgICBmYmEucmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICBmYmEuYmFjayhmYWxzZSk7XFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgZnVuY3Rpb24gY2xpY2ttZShtc2csZHVyYXRpb24sdGl0bGUpe1xcbiAgICAgICAgdHJ5e1xcbiAgICAgICAgICAgIGZvcihsZXQga2V5IGluIHNldHRpbmdzKXtcXG4gICAgICAgICAgICAgICAgLy8gZmJhLmxvZyhEaWQoa2V5KSsnJytrZXkpO1xcbiAgICAgICAgICAgICAgICB0cnl7XFxuICAgICAgICAgICAgICAgICAgICAvL3NldHRpbmdzW2tleV0gPSBEaWQoa2V5KS52YWx1ZS5yZXBsYWNlKC/ik4p84pK/L2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0dGluZ3Nba2V5XSA9IERpZChrZXkpLnZhbHVlO1xcbiAgICAgICAgICAgICAgICB9Y2F0Y2goZSl7XFxuICAgICAgICAgICAgICAgICAgICBhbGVydChcXFwi5pyq6I635Y+W5Yiw6IqC54K5OlxcXCIra2V5K1xcXCJcXFxcblxcXCIrZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZihteVNlbGVjdCl7XFxuICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24obmV3Q29uZmlnLnNldHRpbmdzLCBzZXR0aW5ncyk7XFxuICAgICAgICAgICAgICAgIGZiYS53cml0ZUZpbGUobmV3Um91dGUsICQkJC5zdHJpbmdpZnkobmV3Q29uZmlnKSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGZiYS53cml0ZUZpbGUob2xkUm91dGUsICQkJC5zdHJpbmdpZnkoc2V0dGluZ3MpKTtcXG4gICAgICAgICAgICBUb2FzdChtc2csZHVyYXRpb24pO1xcbiAgICAgICAgICAgIGlmKHRpdGxlPT09XFxcIuWFs1xcXCIpe1xcbiAgICAgICAgICAgICAgICBmYmEuYmFjaygpO1xcbiAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICBmYmEucmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfWNhdGNoKGUpe1xcbiAgICAgICAgICAgIGFsZXJ0KGUubWVzc2FnZSlcXG4gICAgICAgIH1cXG4gICAgfVxcblxcbiAgICAvL2xldCB3aWR0aD13aW5kb3cuc2NyZWVuLmF2YWlsV2lkdGg7XFxuICAgIC8vbGV0IHdpZHRoUHg9d2lkdGgtMzkzKzUyO1xcbiAgICAvL2FsZXJ0KFxcXCLlvZPliY3liIbovqjnjoc6XFxcIit3aW5kb3cuc2NyZWVuLmF2YWlsV2lkdGgrXFxcIipcXFwiK3dpbmRvdy5zY3JlZW4uaGVpZ2h0KTtcXG4gICAgdmFyIHZlcmluZm8gPSBbe1xcbiAgICAgICAgaWQ6J2RuJyxcXG4gICAgICAgIGF1dGhvcjon5pat5b+1JyxcXG4gICAgICAgIGF2YXRhcjonaHR0cHM6Ly9zMy5heDF4LmNvbS8yMDIxLzAyLzIyL3k3d2I5Ty5qcGcnLFxcbiAgICAgICAgb3B0aW9uOm9wZW5EblBhZ2UsXFxuICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgaWQ6J2R6JyxcXG4gICAgICAgICAgICBhdXRob3I6J+mBk+mVvycsXFxuICAgICAgICAgICAgYXZhdGFyOidodHRwOi8vcTEucWxvZ28uY24vZz9iPXFxJm5rPTQzNDg1NzAwNSZzPTY0MCcsXFxuICAgICAgICAgICAgb3B0aW9uOm9wZW5UaGVtZVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBpZDonbG0nLFxcbiAgICAgICAgICAgIGF1dGhvcjogJ+iTneiOkycsXFxuICAgICAgICAgICAgYXZhdGFyOiAnaHR0cDovL3ExLnFsb2dvLmNuL2c/Yj1xcSZuaz0yNTc5OTQ5Mzc4JnM9NjQwJyxcXG4gICAgICAgICAgICBvcHRpb246b3Blbkp4TWFuYWdlXFxuICAgICAgICB9XFxuICAgIF07XFxuXFxuICAgIGZ1bmN0aW9uIGRvT3B0aW9uKG9wdGlvbl9pZCl7XFxuICAgICAgICBsZXQgdmVyID0gdmVyaW5mby5maWx0ZXIoaXQ9Pml0LmlkPT09b3B0aW9uX2lkKVswXTtcXG4gICAgICAgIHZlci5vcHRpb24oKTtcXG4gICAgfVxcblxcbiAgICBjb25zdCBSZW5kZXJIdG1sQXBwID0ge1xcbiAgICAgICAgZGF0YSgpIHtcXG4gICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICAvLyByYXdIdG1sOiAnPHNwYW4gc3R5bGU9XFxcImNvbG9yOiByZWRcXFwiPui/memHjOS8muaYvuekuue6ouiJsu+8gTwvc3Bhbj4nLFxcbiAgICAgICAgICAgICAgICBvcHRpb25zOm9wdGlvbnMsXFxuICAgICAgICAgICAgICAgI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RheTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBkYXRlU3RyICs9IFxcXCItXFxcIiArIGRheTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gZGF0ZVN0cjtcXG4gICAgfSxcXG4gICAgbm93RGF0ZVN0cjpmdW5jdGlvbiAoKXsgLy8g5Yip55SoJOW3peWFt+iOt+WPluagvOW8j+WMluWQjueahOW9k+WJjeaXtumXtFxcbiAgICAgICAgcmV0dXJuICAkLmRhdGVGb3JtYXQobmV3IERhdGUoKSxcXFwieXl5eS1NTS1kZCBISDptbTpzc1xcXCIpO1xcbiAgICB9LFxcbiAgICB0b0pTT046IGZ1bmN0aW9uKGpzb24pIHtcXG4gICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShqc29uLCAoa2V5LCB2YWx1ZSkgPT4ge1xcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT0gJ2Z1bmN0aW9uJykge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWUudG9TdHJpbmcoKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWU7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgNCk7XFxuICAgIH0sXFxuICAgIHRvVk51bTogZnVuY3Rpb24oYSkge1xcbiAgICAgICAgdmFyIGEgPSBhLnRvU3RyaW5nKCk7XFxuICAgICAgICB2YXIgYyA9IGEuc3BsaXQoJy4nKTtcXG4gICAgICAgIHZhciBudW1fcGxhY2UgPSBbXFxcIlxcXCIsIFxcXCIwXFxcIiwgXFxcIjAwXFxcIiwgXFxcIjAwMFxcXCIsIFxcXCIwMDAwXFxcIl0sXFxuICAgICAgICAgICAgciA9IG51bV9wbGFjZS5yZXZlcnNlKCk7XFxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGMubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgIC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mlnX2FycnlbaV0gPSBjb25maWdfYXJyeVtqXTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVtqXSA9IHRtcDtcXG4gICAgICAgIH1cXG4gICAgICAgIGZvciAoYSA9IGogPSBpID0gMHgwOyBpIDwgY29uZmlnX2M7IGkrKykge1xcbiAgICAgICAgICAgIGEgPSAoYSArIDB4MSkgJSAweDEwMDtcXG4gICAgICAgICAgICBqID0gKGogKyBjb25maWdfYXJyeVthXSkgJSAweDEwMDtcXG4gICAgICAgICAgICB0bXAgPSBjb25maWdfYXJyeVthXTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVthXSA9IGNvbmZpZ19hcnJ5W2pdO1xcbiAgICAgICAgICAgIGNvbmZpZ19hcnJ5W2pdID0gdG1wO1xcbiAgICAgICAgICAgIGsgPSBjb25maWdfYXJyeVsoY29uZmlnX2FycnlbYV0gKyBjb25maWdfYXJyeVtqXSkgJSAweDEwMF07XFxuICAgICAgICAgICAgdmlkZW8gKz0gU3RyaW5nLmZyb21DaGFyQ29kZShjb25maWdfdXJsW2ldLmNoYXJDb2RlQXQoKSBeIGspO1xcbiAgICAgICAgfVxcbiAgICAgICAgbG9nKGRlY29kZVVSSUNvbXBvbmVudCh2aWRlbykpO1xcbiAgICAgICAgaWYgKHRva2VuID09IDB4MSkge1xcbiAgICAgICAgICAgIHJldHVybiBkZWNvZGVVUklDb21wb25lbnQodmlkZW8pO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICByZXR1cm4gYnRvYSh2aWRlbyk7XFxuICAgICAgICB9XFxuICAgIH1cXG59O1xcbmlmIChnZXRWYXIoXFxcImp4T2xkVlxcXCIsIFxcXCIwXFxcIikgIT0gdmVyc2lvbikge1xcbiAgICBwdXRWYXIoJ2NqQ2FjaGUnLCBfbXlTZXQuY2pjYWNoZSk7XFxuICAgIHB1dFZhcigneDVDYWNoZScsIF9teVNldC54NUNhY2hlKTtcXG4gICAgcHV0VmFyKCdvbGRDb25maWcnLCB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ZXQgcGxheVVybHM9cGxheVVybExpc3Quc2xpY2UoMCw0KTtcXG4gICAgICAgICAgICBsZXQgbmFtZXM9ZXh0cmEubmFtZUxpc3Quc2xpY2UoMCw0KTtcXG4gICAgICAgICAgICAvLyBsb2coJ+W8gOWni+aJuemHj+ino+aekCjlt7Lljrvph40s5Y+q5Y+W5YmNM+S4quWkh+iDju+8jOWKoOmBk+mVv+e+pDo0ODY3MjIzMjjojrflj5bmnIDmlrDprZTmlq3liqjmgIEpOicrbmFtZXMpO1xcbiAgICAgICAgICAgIHBsYXlVcmxzPXBsYXlVcmxzLm1hcCgoaXQsaWQpPT5pdCtcXFwiO1xcXCIrbmFtZXNbaWRdKTtcXG4gICAgICAgICAgICAvL2xvZyhwbGF5VXJscyk7XFxuICAgICAgICAgICAgY29uc3Qge0xhenlQYXJzZUZhc3R9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvZ2xvYmFsUGFyc2U/cnVsZT3pgZPplb/ku5PlupNQcm8nKTtcXG4gICAgICAgICAgICBsZXQgcmV0ID0gTGF6eVBhcnNlRmFzdChwbGF5VXJscyx0aW1lb3V0LHRpbWVvdXQpO1xcbiAgICAgICAgICAgIGlmKHR5cGVvZihyZXQpPT09J29iamVjdCcmJnJldC5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgIC8vcmV0dXJuIHJldFswXVxcbiAgICAgICAgICAgICAgICAvL2xvZyhyZXQpO1xcbiAgICAgICAgICAgICAgICBsZXQgdiA9IGdldEFwcFZlcnNpb24oKTtcXG4gICAgICAgICAgICAgICAgaWYocGFyc2VJbnQodik+PTIxOTQmJnJldC5sZW5ndGg+MSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJscyA9IEFycmF5LmZyb20obmV3IFNldChyZXQpKTtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVzPXVybHMubWFwKChpdCxpZCk9Pml0LnNwbGl0KFxcXCLimIVcXFwiKS5sZW5ndGg+MT9pdC5zcGxpdChcXFwi4piFXFxcIilbMV06XFxcIue6v+i3rzpcXFwiK3BhcnNlSW50KGlkKzEpKTtcXG4gICAgICAgICAgICAgICAgICAgIHVybHM9dXJscy5tYXAoaXQ9Pml0LnNwbGl0KFxcXCLimIVcXFwiKVswXSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZGVycyA9IHVybHMubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZighLzsvLnRlc3QoaXQpfHxpdC5zcGxpdCgnOycpLmxlbmd0aDwyKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHt9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWFkID0gaXQuc3BsaXQoJzsnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIS9ALy50ZXN0KGhlYWQpfHwhL3t8fS8udGVzdChoZWFkKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge31cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkPWhlYWQuc3BsaXQoXFxcIntcXFwiKVsxXS5zcGxpdChcXFwifVxcXCIpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2hlYWQgPSBoZWFkLnJlcGxhY2UoL3t8fS9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCA9IGhlYWQuc3BsaXQoJyYmJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvYmogPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpIGluIGhlYWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGtleSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVsxXS5yZXBsYWNlKC87Lywn77yb77ybJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpba2V5XSA9IHZhbHVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmpcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIHVybHMgPSB1cmxzLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR1cmw9aXQuc3BsaXQoJzsnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihpdC5pbmNsdWRlcyhcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiKSYmIXR1cmwuaW5jbHVkZXMoXFxcIiNpc1ZpZGVvPXRydWUjXFxcIikpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0dXJsKz1cXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHVybFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe3VybHM6dXJscyxoZWFkZXJzOmhlYWRlcnMsbmFtZXM6bmFtZXN9KTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0WzBdLnNwbGl0KFxcXCLimIVcXFwiKVswXVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgIHJldHVybiByZXRcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9ZWxzZXtcXG4gICA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ICAgICAgICAgICAgICByZWFsVXJsID0gJ2h0dHBzOi8vJytyZWFsVXJsO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5pc1ZpZGVvKHJlYWxVcmwpfHxcXFwiXFxcIjtcXG4gICAgICAgIH1jYXRjaChlKXtcXG4gICAgICAgICAgICAvL2xvZyhlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiXFxcIlxcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBYNTpmdW5jdGlvbih2aXBVcmwscmVmKXsvLyBodHRwczovL2FwaS41Mnd5Yi5jb20vd2ViY2xvdWQvP3Y9aHR0cDovL3ZpcC4xOTA1LmNvbS9wbGF5LzY5MTk0MC5zaHRtbCBodHRwOi8vd3d3LmNkY2VyLm5ldC9cXG4gICAgICAgIGxldCBfeDUgPSAkLnRvU3RyaW5nKCh2aXBVcmwpID0+IHtcXG4gICAgICAgICAgICBpZighbG9jYXRpb24uaHJlZi5pbmNsdWRlcyh2aXBVcmwpKXtcXG4gICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IHZpcFVybDtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYod2luZG93LmNvdW50ID09IG51bGwpe1xcbiAgICAgICAgICAgICAgICB3aW5kb3cuY291bnQ9MTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgd2luZG93LmNvdW50Kys7XFxuICAgICAgICAgICAgaWYoIHdpbmRvdy5jb3VudCA+PSAyMCl7XFxuICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcIuacquiOt+WPluWIsOi1hOa6kOWcsOWdgO+8jOi3s+WIsOino+aekOmhtVxcXCIpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdmlwVXJsXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciB1cmxzID0gX2dldFVybHMoKTtcXG4gICAgICAgICAgICBmb3IgKHZhciBpIGluIHVybHMpIHtcXG4g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MuQUVTKHRleHQsIGtleSwgaXYpO1xcbiAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgbGV0IGhlYWRlcnMgPSB7aGVhZGVyczoge1xcXCJSZWZlcmVyXFxcIjogcmVmfHwnJ319O1xcbiAgICAgICAgICAgIGtleSA9IGtleSA9PSB1bmRlZmluZWQgPyBcXFwiZHZ5WVJRbG5QUkNNZFFTZVxcXCIgOiBrZXk7XFxuICAgICAgICAgICAgdmFyIGh0bWwgPSByZWY/cmVxdWVzdChqeHVybCwgaGVhZGVycyk6cmVxdWVzdChqeHVybCk7XFxuICAgICAgICAgICAgaWYgKC8mYnR3YWY9Ly50ZXN0KGh0bWwpKSB7XFxuICAgICAgICAgICAgICAgIGh0bWwgPSByZXF1ZXN0KGp4dXJsICsgXFxcIiZidHdhZlxcXCIgKyBodG1sLm1hdGNoKC8mYnR3YWYoLio/KVxcXCIvKVsxXSwgaGVhZGVycyk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBpdiA9IGh0bWwuc3BsaXQoXFxcIl90b2tlbiA9IFxcXFxcXFwiXFxcIilbMV0uc3BsaXQoXFxcIlxcXFxcXFwiXFxcIilbMF07XFxuICAgICAgICAgICAgZXZhbChodG1sLm1hdGNoKC92YXIgY29uZmlnID0ge1tcXFxcc1xcXFxTXSo/fS8pWzBdICsgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgIGlmICghL15odHRwLy50ZXN0KGNvbmZpZy51cmwpKSB7XFxuICAgICAgICAgICAgICAgIGNvbmZpZy51cmwgPSBkZWNvZGVVUklDb21wb25lbnQodG9vbHMuQUVTKGNvbmZpZy51cmwsIGtleSwgaXYpKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIGNvbmZpZy51cmw7XFxuICAgICAgICB9XFxuICAgICAgICBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIC8vIHJldHVybiBcXFwiXFxcIjtcXG4gICAgICAgICAgICByZXR1cm4ganh1cmw7XFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIExMUTogZnVuY3Rpb24oanh1cmwpIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgdmFyIGFwaSA9IGp4dXJsLnNwbGl0KCc/dXJsPScpWzBdICsgXFxcImFwaS5waHBcXFwiO1xcbiAgICAgICAgICAgIHZhciBiNjRpZCA9IGJhc2U2NEVuY29kZShqeHVybC5zcGxpdCgndXJsPScpWzFdKTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VpZCA9IHRvb2xzLmNhZXNhckNpcGhlcihiNjRpZCwgLTEpO1xcbiAgICAgICAgICAgIHZhciBqc29uID0gSlNPTi5wYXJzZShyZXF1ZXN0KGFwaSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6IGp4dXJsXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxcbiAgICAgICAgICAgICAgICBib2R5OiAndXJsPScgKyBwYXJzZWlkXFxuICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgIHVybCA9IChqc29uLmNvZGUgPT0gMjAwID8gYmFzZTY0RGVjb2RlKHRvb2xzLmNhZXNhckNpcGhlcihqc29uLnVybCwgLTEpKSA6ICcnKTtcXG4gICAgICAgICAgICByZXR1cm4gdXJsO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiAnJztcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgUGFuR3U6IGZ1bmN0aW9uKHZpcFVybCwgZGF0YSkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAvKnZhciByZWYgPSAnaHR0cHM6Ly93d3cucGFuZ3VqaWV4aS5jb20vJztcXG4gICAgICAgICAgICB2YXIgcGFyc2UgPSAnaHR0cHM6Ly9wYW5ndWFwaS5udHJ5amQubmV0L2ppZXhpLz91cmw9JyArIHZpcFVybDtcXG4gICAgICAgICAgICB2YXIgYXBpID0gJ2h0dHBzOi8vcGFuZ3VhcGkubnRyeWpkLm5ldC9qaWV4aS9hcGkucGhwJztcXG4gICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIC8vdmFyIHJlZiA9ICdodHRwczovL3hteXN0di5jb20vJztcXG4gICAgICAgICAgICAvL3ZhciBwYXJzZSA9ICdodHRwczovL3d3dy45OWtwdy5jb20vcGFuZ3UvaW5kZXgucGhwP3VybD0nICsgdGFpbFVybDtcXG4gICAgICAgICAgICAvL3ZhciBhcGkgPSAnaHR0cHM6Ly93d3cuOTlrcHcuY29tL3Bhbmd1L2FwaS5waHAnO1xcbiAgICAgICAgICAgIHZhciBwYXJzZSA9ICdodHRwczovL3d3dy5wYW5ndWppZXhpLmNvbS9wYW5ndS8/dXJsPScgKyB2aXBVcmw7XFxuICAgICAgICAgICAgdmFyIGFwaSA9ICdodHRwczovL3Bhbmd1YXBpLm50cnlqZC5uZXQvcGFuZ3UyMDIxL2FwaS5waHAnO1xcbiAgICAgICAgICAgIGlmIChkYXRhKSB7XFxuICAgICAgICAgICAgICAgIHJlZiA9IGRhdGFbMF07XFxuICAgICAgICAgICAgICAgIHBhcnNlID0gZGF0YVsxXTtcXG4gICAgICAgICAgICAgICAgYXBpID0gZGF0YVsyXTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIFRpbWUgPSAoTWF0aC5mbG9vcihuZXcgRGF0ZSgpLmdldFRpbWUoKSAvIDEwMDApICogMSkudG9TdHJpbmcoKTtcXG4gICAgICAgICAgICB2YXIgdXJsID0gSlNPTi5wYXJzZShyZXF1ZXN0KGFwaSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6IHBhcnNlXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGJvZHk6ICd1cmw9JyArIHZpcFVybCArICcmcmVmZXJlcj0nICsgYmFzZTY0RW5jb2RlKHBhcnNlKSArICcmcmVmPTEmdGltZT0nICsgVGltZSArICcmdHlwZT0mb3RoZXI9JyArIGJhc2U2NEVuY29kZSh2aXBVcmwpICsgJyZpb3M9MCcsXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgICAgICAgICAgfSkpLnVybDtcXG4gICAgICAgICAgICByZXR1cm4gdXJsO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiAnJztcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgeXVuMTcxNzogZnVuY3Rpb24gKHZpcFVybCkge1xcbiAgICAgICAgdmFyIGlzeWsgPSB2aXBVcmwuaW5kZXhPZigneW91a3UnKTtcXG4gICAgICAgIHZhciByZWYgPSBcXFwiaHR0cHM6Ly93d3cuMTcxN3l1bi5jb20vangvdHkucGhwP3VybD1cXFwiICsgdmlwVXJsO1xcbiAgICAgICAgdmFyIHBhcnNlID0gXFxcImh0dHBzOi8vMTcxN3l1bi5jb20uemgxODgubmV0LzA4MjgvP3VybD1cXFwiICsgdmlwVXJsO1xcbiAgICAgICAgdmFyIGFwaSA9IFxcXCJodHRwczovLzE3MTd5dW4uY29tLnpoMTg4Lm5ldC8xMDA0Ly4uaW5kZXguLnBocFxcXCI7XFxuICAgICAgICByZXR1cm4gaXN5ayA9PSAtMSA/IHRoaXMuUGFuR3UodmlwVXJsLCBbcmVmLCBwYXJzZSwgYXBpXSkgOiB0aGlzLlBhbkd1KHZpcFVybCwgW3JlZiArICcsdmlwOicsIHBhcnNlICsgJyx2aXA6JywgYXBpXSk7XFxuICAgIH0sXFxuICAgIE9L6Kej5p6QOidodHRwczovL29ranguY2MvP3VybD0nLFxcbiAgICBNM1U4VFY6J2h0dHBzOi8vangubTN1OC50di9qaWV4aS8/dXJsPScsXFxuICAgIOmBk+mVv+S7k+W6k+mAmuWFjTpmdW5jdGlvbiAodXJsLHRpbWVvdXQpe1x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AgICAgbGV0IHBsYXlVcmxMaXN0ID0gW107Ly/mibnph4/mkq3mlL7lnLDlnYDliJfooahcXG4gICAgICAgIGxldCBuYW1lTGlzdCA9IFtdO1xcbiAgICAgICAgbGV0IGp4cyA9IGppZXhpc1trZXldOyAvLyDpgILnlKjkuo7ov5nkuKrnvZHnq5nnmoTop6PmnpDliJfooahcXG4gICAgICAgIGlmKGp4cyl7XFxuICAgICAgICAgICAgZm9yKGxldCBpIGluIGp4cyl7XFxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZiBQYXJzZVNbanhzW2ldXSA9PSAnc3RyaW5nJyYmUGFyc2VTW2p4c1tpXV0ubWF0Y2goL2h0dHAuKj89Lykpe1xcbiAgICAgICAgICAgICAgICAgICAgcGxheVVybExpc3QucHVzaChQYXJzZVNbanhzW2ldXSt2aXBVcmwpO1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaChqeHNbaV0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgLy8gcmV0dXJuIHBsYXlVcmxMaXN0XFxuICAgICAgICByZXR1cm4ge3BsYXlVcmxMaXN0OnBsYXlVcmxMaXN0LG5hbWVMaXN0Om5hbWVMaXN0fVxcbiAgICB9XFxuICAgIGZ1bmN0aW9uIGdldExhenlMaXN0KGtleSl7Ly/lj6rojrflj5blpIfog47liJfooajnmoTlhY3ll4XmjqLop6PmnpDliJfooahcXG4gICAgICAgIGxldCBwYXJzZXMgPSBbXTtcXG4gICAgICAgIGxldCBqeHMgPSBqaWV4aXNba2V5XXx8W107IC8vIOmAgueUqOS6jui/meS4que9keermeeahOino+aekOWIl+ihqFxcbiAgICAgICAgLy8gbG9nKGp4cyk7XFxuICAgICAgICBpZihqeHMpe1xcbiAgICAgICAgICAgIGZvcihsZXQgaSBpbiBqeHMpe1xcbiAgICAgICAgICAgICAgICBpZih0eXBlb2YgUGFyc2VTW2p4c1tpXV0gPT0gJ2Z1bmN0aW9uJyYmIS/pgJrlhY0vLnRlc3QoUGFyc2VTW2p4c1tpXV0udG9TdHJpbmcoKSkpe1xcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VzLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6anhzW2ldLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJ1bGU6UGFyc2VTW2p4c1tpXV1cXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gcGFyc2VzXFxuICAgIH1cXG4gICAgdmFyIGV4dHJhID0ge307XFxuICAgIHZhciBwYXJzZXMgPSBbXTsgLy/lhY3ll4XmjqLliJfooahcXG4gICAgLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXFxuICAgIGlmKCFzdHJUaXRsZSl7XFxuICAgICAgICBpZigvTFQvLnRlc3QodmlwVXJsKSl7XFxuICAgICAgICAgICAgc3RyID0gbXlTZXQubHQ7XFxuICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2x0Jyk7XFxuICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ2x0JyxzdHIpO1xcbiAgICAgICAgfSBlbHNlIGlmKC9yZW5yZW5taS8udGVzdCh2aXBVcmwpKXtcXG4gICAgICAgICAgICBzdHIgPSBteVNldC5ycjtcXG4gICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgncnInKTtcXG4gICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgncnInLHN0cik7XFxuICAgICAgICB9ZWxzZSBpZigvd3VkdXl1bi8udGVzdCh2aXBVcmwpKXtcXG4gICAgICAgICAgICBzdHIgPSBteVNldC53ZDtcXG4gICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnd2QnKT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B7XFxuICAgICAgICAgICAgICAgIGNhc2UgXFxcIum7mOiupFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGhvc3QpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJxcS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC50eDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3R4Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCd0eCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJpcWl5aS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5xeTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3F5Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdxeScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJ5b3VrdS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC55aztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3lrJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCd5aycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJhbGl6eVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmFsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnYWwnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ2FsaXp5Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIm1ndHYuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQubWc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdtZycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnbWcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiYmlsaWJpbGkuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuYmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdibCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnYmwnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwic29odS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5zaDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3NoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdzaCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJ0di5zb2h1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnNoO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnc2gnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3NoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIml4aWd1YS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC54ZztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3hnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCd4ZycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwcHR2LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnBwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgncHAnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3BwJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIm1pZ3V2aWRlby5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5taTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ21pJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdtaScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJsZS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5sZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2xlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdsZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCIxOTA1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0Lm9uZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ29uZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnb25lJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImZ1bi50dlxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmZ1bjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2Z1bicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnZnVuJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0Lm90aDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ290aCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnb3RoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5xanU7XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgIH1lbHNle1xcbiAgICAgICAgbG9nKCfprZTmlq3miafooYzlrprlkJHop6PmnpDnur/ot6/lpLQ6JytzdHJUaXRsZSk7XFxuICAgICAgICBzdHIgPSBzdHJUaXRsZTtcXG4gICAgfVxcbiAgICBsZXQgd2l0aEJhdGNoID0gISEoTXlKaWV4aS5pc0F1dG8gJiYgTXlKaWV4aS5hdXRvTW9kZSA9PT0gJ+mAn+W6puS8mOWFiCcpO1xcbiAgICBsZXQgd2l0aEJhdGNoT3JkZXIgPSAhIShNeUppZXhpLmlzQXV0byAmJiBNeUppZXhpLmF1dG9Nb2RlID09PSAn6aG65bqP5LyY5YWIJyk7XFxuICAgIGxldCBzaW5nbGVCYWNrID0gTXlKaWV4aS5zaW5nbGVCYWNrfHxmYWxzZTsgLy/lkIrmr5vmqKHlvI/jgILljZXkuKrnu5Pmnpznm7TmjqXov5Tlm57vvIzlgZzmraLlkI7pnaLnmoRcXG4gICAgbGV0IGRtUGF0aCA9ICdoaWtlcjovL2ZpbGVzL2NhY2hlL2RpYW9tYW8udHh0JzsvL+WQiuavm+aooeW8j+i/h+a7pOaWh+S7tui3r+W+hFxcbiAgICBsZXQgZG1VcmxzO1xcbiAgICB0cnkge1xcbiAgICAgICAgZG1VcmxzID0gZmV0Y2goZG1QYXRoKS50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xuICAgICAgICByZXR1cm4gYXJyYXlzO1xcbiAgICB9XFxuICAgIGZ1bmN0aW9uIHNvcnRCeUtleShhcnJheSwga2V5LCBvcmRlcikgey8v5a+56LGh5pWw57uE5oyJ5p+Q5Liq6ZSu5YC85o6S5bqPXFxuICAgICAgICByZXR1cm4gYXJyYXkuc29ydChmdW5jdGlvbihhLCBiKSB7XFxuICAgICAgICAgICAgdmFyIHggPSBwYXJzZUludChhW2tleV0ubWF0Y2goLyhcXFxcZCspLylbMV0pOy8v5L+u5aSN5aSn5LqOMTDlh7rpl67pophcXG4gICAgICAgICAgICB2YXIgeSA9IHBhcnNlSW50KGJba2V5XS5tYXRjaCgvKFxcXFxkKykvKVsxXSk7XFxuICAgICAgICAgICAgLy8gbG9nKCd4OicreCtcXFwiLHk6XFxcIit5KTtcXG4gICAgICAgICAgICBpZiAob3JkZXIpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICgoeCA8IHkpID8gLTEgOiAoKHggPiB5KSA/IDEgOiAwKSlcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gKCh4IDwgeSkgPyAoKHggPiB5KSA/IDEgOiAwKSA6IC0xKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH1cXG4gICAgaWYgKHR5cGVvZiBQYXJzZVNbc3RyXSA9PSAnZnVuY3Rpb24nKSB7XFxuICAgICAgICBpZigv6YCa5YWNLy50ZXN0KHN0cikpe1xcbiAgICAgICAgICAgIHJldHVybiBQYXJzZVNbc3RyXSh2aXBVcmwsdGltZW91dCk7XFxuICAgICAgICB9XFxuICAgICAgICB2YXIgdXJsO1xcbiAgICAgICAgdmFyIHRhc2sgPSBmdW5jdGlvbihvYmopIHtcXG4gICAgICAgICAgICBldmFsKCd2YXIgY29uZmlnX2RwID0nICsgZmV0Y2goZ2V0VmFyKCdvbGRDb25maWcnKSkpO1xcbiAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnX2RwLmNqKSk7XFxuICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZShvYmoudmlwVXJsLG9iai5uYW1lLG9iai50aW1lb3V0KTtcXG4gICAgICAgIH07XFxuICAgICAgICBpZighd2l0aEJhdGNoT3JkZXJ8fHN0clRpdGxlKSB7Ly/kuI3lvIDlpJrnur/ot6/pobrluo/kvJjlhYjmiJbogIXmjIflrprkuobop6PmnpBcXG4gICAgICAgICAgICB1cmwgPSBQYXJzZVNbc3RyXSh2aXBVcmwsdGltZW91dCk7XFxuICAgICAgICB9ZWxzZXsvL+W8gOS6huWkmue6v+i3r+mhuuW6j+S8mOWFiOaJp+ihjOWFjeWXheWkmuS7u+WKoVxcbiAgICAgICAgICAgIHBhcnNlcy51bnNoaWZ0KHtuYW1lOnN0cn0pOyAvL+aKiuS4u+mFjee9rueahOWFjeWXheaOouWKoOWFpeWIsOWkmuS7u+WKoeWIl+ihqFxcbiAgICAgICAgICAgIHBhcnNlcyA9IEFyclNldChwYXJzZXMsJ25hbWUnKTsgLy/ljrvph41cXG4gICAgICAgICAgICB2YXIgY291bnQgPSBwYXJzZXMubGVuZ3RoOyAvL+iuvue9ruS7u+WKoeaVsOmHj1xcbiAgICAgICAgICAgIGxvZygn6a2U5pat5byA5ZCv5aSa5Lu75Yqh6Kej5p6QLOS7u+WKoeaVsOmHjzonK2NvdW50KTtcXG4gICAgICAgICAgICBsb2coJ+ino+aekOWIl+ihqDonK0pTT04uc3RyaW5naWZ5KHBhcnNlcykpO1xcbiAgICAgICAgICAgIHZhciBwYXJzZVJldCA9IFtdOyAvL+ino+aekOe7k+aenOWIl+ihqFxcbiAgICAgICAgICAgIGxldCB0YXNrcyA9IHBhcnNlcy5tYXAoKGl0LGlkZXgpPT57XFxuICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICBmdW5jOiB0YXNrLFxcbiAgICAgICAgICAgICAgICAgICAgcGFyYW06IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOml0Lm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcnVsZTppdC5ydWxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZpcFVybDogdmlwVXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVvdXQ6IHRpbWVvdXRcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICBpZDogXFxcInRhc2tcXFwiK2lkZXhcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHNob3dMb2FkaW5nKFxcXCLprZTmlq3lubblj5Hop6PmnpDkuK3vvIzliankvZnop6PmnpA6XFxcIitjb3VudCk7XFxuICAgICAgICAgICAgZnVuY3Rpb24gaXNEbShyZXQpe1xcbiAgICAgICAgICAgICAgICBpZighcmV0KXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIGhhc0RtKHJldC5zcGxpdCgnIycpWzBdLnNwbGl0KCc7JylbMF0sZG1VcmxzKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBiZSh0YXNrcyx7XFxuICAgICAgICAgICAgICAgIGZ1bmM6IGZ1bmN0aW9uKG9iaiwgaWQsIGVycm9yLHJldCkge1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLnm5HlkKzliLDku7vliqFcXFwiICsgaWQrJ+W3sue7k+adnyxlcnJvcjonK2Vycm9yKycscmV0OicrcmV0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJldCA9IHJldHx8Jyc7XFxuICAgICAgICAgICAgICAgICAgICBwYXJzZVJldC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0YXNrOmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldDpyZXQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTp0YXNrcy5maWx0ZXIoaXQ9Pml0LmlkPT09aWQpWzBdLnBhcmFtLm5hbWVcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgICAgICAgICAgaWYoc2luZ2xlQmFjayl7Ly/lkIrmr5vmqKHlvI/lvIDlp4vnmoTor50s5Yik5patcmV05pyJ5pWI5oCnXFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCfku7vliqEnK2lkKyfnu5PmnpzmmK/lkIrmr5s/Jytpc0RtKHJldCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFpc0RtKHJldCkmJlBhcnNlUy5pc1ZpZGVvKHJldC5zcGxpdCgnIycpWzBdLnNwbGl0KCc7JylbMF0pKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCflkIrmr5vmqKHlvI/kuK3mlq3op6PmnpDlubbov5Tlm57op4bpopEnK3JldCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnYnJlYWsnXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgY291bnQgLT0gMTsgLy/lrozmiJDkuobku7vliqHvvIzku7vliqHmlbDph48tMVxcbiAgICAgICAgICAgICAgICAgICAgLy9sb2cob2JqKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb3VudCA+IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzaG93TG9hZGluZyhcXFwi6a2U5pat5bm25Y+R6Kej5p6Q5Lit77yM5Ymp5L2Z6Kej5p6QOlxcXCIgKyBjb3VudClcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICA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Sd0cnVlJyYmcGFyc2VJbnQoZ2V0QXBwVmVyc2lvbigpKT49MjI1NSkgey8v5byA5aeL57yT5a2YXFxuICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuWwiuaVrOeahOmtlOaWreeUqOaIt++8jOinhumikee8k+WtmOW3suWQr+eUqO+8jOivt+WwveaDheS6q+WPl+eci+WJp+aXtuWFiVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvc0NhY2hlPXVybHMubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZGVycz17fTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihpdC5zcGxpdChcXFwiO1xcXCIpLmxlbmd0aD4xKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWQgPSBpdC5zcGxpdCgnOycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZigvQC8udGVzdChoZWFkKSYmL3t8fS8udGVzdChoZWFkKSl7XFxuLy9oZWFkID0gaGVhZC5yZXBsYWNlKC97fH0vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdChcXFwie1xcXCIpWzFdLnNwbGl0KFxcXCJ9XFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdCgnJiYnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSBpbiBoZWFkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQga2V5ID0gaGVhZFtpXS5zcGxpdCgnQCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9aGVhZFtpXS5zcGxpdCgnQCcpWzFdLnJlcGxhY2UoLzsvLCfvvJvvvJsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzW2tleV0gPSB2YWx1ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6aXQuc3BsaXQoXFxcIjtcXFwiKVswXS5zcGxpdChcXFwiI1xcXCIpWzBdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zOntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6aGVhZGVyc1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgZGF0YT1iYXRjaENhY2hlTTN1OCh2aWRlb3NDYWNoZSk7XFxuICAgICAgICAgICAgICAgICAgICBkYXRhPWRhdGEubWFwKChpdCxpZCk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZXh0cmE9XFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYodXJsc1tpZF0uc3BsaXQoXFxcIjtcXFwiKS5sZW5ndGg+MSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhPVxcXCI7XFxcIit1cmxzW2lkXS5zcGxpdChcXFwiO1xcXCIpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHVybHNbaWRdLnNwbGl0KFxcXCLimIVcXFwiKS5sZW5ndGg+MSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhPVxcXCLimIVcXFwiK3VybHNbaWRdLnNwbGl0KFxcXCLimIVcXFwiKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXQrXFxcIlxcXCIhPT1cXFwibnVsbFxcXCIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXQrZXh0cmFcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNbaWRdXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB1cmxzID0gZGF0YVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIGxvZygn5o6S5bqP5a6M5q+V5ZCO57uT5p6cOicrSlNPTi5zdHJpbmdpZnkodmFsdWFibGUpKTtcXG4gICAgICAgICAgICAgICAgbGV0IG5hbWVzPXZhbHVhYmxlLm1hcChpdD0+aXQubmFtZSk7XFxuICAgICAgICAgICAgICAgIGxldCBoZWFkZXJzID0gdXJscy5tYXAoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgaWYoIS87Ly50ZXN0KGl0KXx8aXQuc3BsaXQoJzsnKS5sZW5ndGg8Mil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHt9XFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZCA9IGl0LnNwbGl0KCc7JylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoIS9ALy50ZXN0KGhlYWQpfHwhL3t8fS8udGVzdChoZWFkKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7fVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkPWhlYWQuc3BsaXQoXFxcIntcXFwiKVsxXS5zcGxpdChcXFwifVxcXCIpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vaGVhZCA9IGhlYWQucmVwbGFjZSgve3x9L2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQgPSBoZWFkLnNwbGl0KCcmJicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvYmogPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgaW4gaGVhZCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrZXkgPSBoZWFkW2ldLnNwbGl0KCdAJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVsxXS5yZXBsYWNlKC87Lywn77yb77ybJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9ialtrZXldID0gdmFsdWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmpcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHVybHMgPSB1cmxzLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdHVybD1pdC5zcGxpdCgnOycpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgaWYoaXQuaW5jbHVkZXMoXFxcIiNpc1ZpZGVvPXRydWUjXFxcIikmJiF0dXJsLmluY2x1ZGVzKFxcXCIjaXNWaWRlbz10cnVlI1xcXCIpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0dXJsKz1cXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHR1cmxcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7dXJsczp1cmxzLGhlYWRlcnM6aGVhZGVycyxuYW1lczpuYW1lc30pO1xcblxcbiAgICAgICAgICAgIH1lbHNlIGlmKHZhbHVhYmxlLmxlbmd0aD09PTApe1xcbiAgICAgICAgICAgICAgICAvLyByZXR1cm4gJ3RvYXN0Oi8v6a2U5pat5aSa5Lu75Yqh5YWN5ZeF6Kej5p6Q5YWo5Yab6KaG5rKhJ1xcbiAgICAgICAgICAgICAgICBpZih0eXBlb2YoZXh0cmEucGxheVVybExpc3QpPT09J29iamVjdCcmJmV4dHJhLnBsYXlVcmxMaXN0Lmxlbmd0aD4wKXtcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhLnBsYXlVcmxMaXN0ID0gZXh0cmEucGxheVVybExpc3QuZmlsdGVyKGl0PT5pdCE9PShQYXJzZVNbc3RyXXx8c3RyKSArIHZpcFVybCk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZUxpc3QgPSBleHRyYS5uYW1lTGlzdDtcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhLm5hbWVMaXN0PXVuaXF1ZTIobmFtZUxpc3QpO1xcbiAgICAgICAgICAgICAgICAgICAgZXh0cmEucGxheVVybExpc3QgPSB1bmlxdWUyKGV4dHJhLnBsYXlVcmxMaXN0KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZihleHRyYS5uYW1lTGlzdC5sZW5ndGg8MSl7XFxuICAgICAgICAgICAgICAgICAgICBoaWRlTG9hZGluZygpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+iKreavlFHkuoYs5aSa5Lu75Yqh5YWN5ZeF6Kej5p6Q5YWo5Yab6KaG5rKh5bm25LiU5rKh5pyJ5Y+v55So55qEanNvbnx4Neino+aekOS6hidcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBzaG93TG9hZGluZyhcXFwi6a2U5pat5aSa5Lu75Yqh5YWN5ZeF5aSx6LSlLOWwneivlWpzb258eDVcXFwiKTtcXG4gICAgICAgICAgICAgICAgLy/mjpLpmaTnrKzkuIDkuKpcXG4gICAgICAgICAgICAgICAgbGV0IGV4dHJhMiA9IHtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0OmV4dHJhLm5hbWVMaXN0LFxcbiAgICAgICAgICAgICAgICAgICAgcGxheVVybExpc3Q6ZXh0cmEucGxheVVybExpc3Quc2xpY2UoMSksXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy8gbG9nKGV4dHJhLnBsYXlVcmxMaXN0WzBdKTtcXG4gICAgICAgICAgICAgICAgLy8gbG9nKGV4dHJhMik7XFxuICAgICAgICAgICAgICAgIHJldHVybiBQYXJzZVMuZGVmYXVsdFBhcnNlV2ViP1BhcnNlUy5kZWZhdWx0UGFyc2VXZWIoZXh0cmEucGxheVVybExpc3RbMF0sdGltZW91dCxleHRyYTIpOmV4dHJhLnBsYXlVcmxMaXN0WzBdO1xcblxcbiAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWFibGVbMF0ucmV0XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgaWYoL15oaWtlcjp8XnRvYXN0OnxecnVsZTp8Xng1UnVsZTp8XndlYlJ1bGU6fF5zZWxlY3QvLnRlc3QodXJsKSl7XFxuICAgICAgICAgICAgcmV0dXJuIHVybDtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmKCF1cmwmJiEvXmh0dHAvLnRlc3QodmlwVXJsKSl7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mtlOaWreino+aekOWksei0pT4nK3ZpcFVybFxcbiAgICAgICAgfVxcbiAgICAgICAgLy8gbG9nKHZpcFVybCsn5YWN5ZeF5o6i57uT5p6cOicrdXJsKTtcXG4gICAgICAgIGlmICgvXlxcXFwvLy50ZXN0KHVybCkpIHtcXG4gICAgICAgICAgICB1cmwgPSAnaHR0cHM6JyArIHVybFxcbiAgICAgICAgfVxcbiAg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ICAgICBwZGF0YS51cmwgPSB1bmVzY2FwZShwZGF0YS51cmwpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoZmEuaW5jbHVkZXMocGRhdGEuZnJvbSkpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZShwZGF0YS51cmwpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBwZGF0YS51cmwgKyAnI2lzVmlkZW89dHJ1ZSMnO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIExhYmVsKVxcbiAgICB9XFxufTtcXG5mdW5jdGlvbiBtelBvcHVwKCkge1xcbiAgICAvKlxcbiAgICBpZiAoZ2V0VmFyKFxcXCJpamstdHhcXFwiLCBcXFwiXFxcIikgPT0gXFxcIjFcXFwiKSB7XFxuICAgICAgICBzZXRJdGVtKFxcXCJ0aXhpbmdcXFwiLCBcXFwiMVxcXCIpXFxuICAgICAgICBjbGVhclZhcihcXFwiaWprLXR4XFxcIilcXG4gICAgfVxcbiAgICBpZiAoZ2V0SXRlbShcXFwidGl4aW5nXFxcIiwgXFxcIlxcXCIpID09IFxcXCJcXFwiKSB7XFxuICAgICAgICBjb25maXJtKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+WFjei0o+WjsOaYjicsXFxuICAgICAgICAgICAgY29udGVudDogJ+acrOeoi+W6j+S4jeaPkOS+m+inhumikeino+aekOacjeWKoVxcXFxu5omA5pyJ5YaF5a655Z2H5LuO55So5oi35YiG5Lqr5Lit5pS26ZuGXFxcXG7ku4XkvpvmtYvor5XlkozlrabkuaDkuqTmtYFcXFxcblxcXFxu56Gu5a6a5Y2z6K6k5Y+v77yM5LiN5YaN5o+Q6YaSJyxcXG4gICAgICAgICAgICBjb25maXJtOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgcHV0VmFyKFxcXCJpamstdHhcXFwiLCBcXFwiMVxcXCIpO1xcbiA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x1ZS5zcGxpdCgnZnVuY3Rpb24nKS5sZW5ndGggPiAxKSB7XFxuICAgICAgICAgICAgZXZhbCgnb2JqVmFsdWU9JyArIG9ialZhbHVlKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGFyckxpc3Quc3BsaWNlKDAsIDAsIG9iaktleSk7IC8v5re75Yqg6aG555uu6Z2e5Yig6ZmkXFxuICAgICAgICBvYmpDb2RlW29iaktleV0gPSBvYmpWYWx1ZTtcXG5cXG4gICAgfSBlbHNlIGlmICh0eXBlID09PSAn55u06ZO+Jykge1xcbiAgICAgICAgYXJyTGlzdCA9IGRhdGE7XFxuICAgICAgICBhcnJMaXN0LnNwbGljZSgwLCAxKTtcXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIGFyckxpc3QgPSBudWxsO1xcbiAgICB9XFxuICAgIGlmIChhcnJMaXN0ICE9IG51bGwpIHtcXG4gICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgIEFycmF5LnByb3RvdHlwZS5yZW1vdmUgPSBmdW5jdGlvbih2YWwpIHtcXG4gICAgICAgICAgICBsZXQgaW5kZXggPSB0aGlzLmluZGV4T2YodmFsKTtcXG4gICAgICAgICAgICBpZiAoaW5kZXggPiAtMSkge1xcbiAgICAgICAgICAgICAgICB0aGlzLnNwbGljZShpbmRleCwgMSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfTtcXG4gICAgICAgIGlmKG5hbWUpey8v5Yig6Zmk5ZCN56ew5YiX6KGo5ZKM5Luj56CBXFxuICAgICAgICAgICAganNvbi50aXRsZS5yZW1vdmUobmFtZSk7XFxuICAgICAgICAgICAgZGVsZXRlIGpzb24uY29kZXNbbmFtZV07XFxuICAgICAgICB9XFxuICAgICAgICBhcnJMaXN0ID0gYXJyTGlzdC5jb25jYXQoanNvbi50aXRs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VuY3Rpb27lj5jmiJBzdHJpbmdcXG4gICAgbGV0IGZ1bmN0aW9uQ29kZSA9IHNhdmVCdXR0b24gKyAnOycrbXpQb3B1cDtcXG4gICAgLy8gd3JpdGVGaWxlKCdoaWtlcjovL2ZpbGVzL2NhY2hlL3Bsc2NQYXJzZS5odG1sJywgZmV0Y2goX215U2V0LmNrTGluayArICdwbHNjUGFyc2UuaHRtbCcpKTtcXG4gICAgc2V0SXRlbSgnbXlGdW5jdGlvbicsIGZ1bmN0aW9uQ29kZSk7XFxuICAgIHNldEl0ZW0oJ3VwZGF0ZURhdGUnLCB1cGRhdGVEYXRlKTtcXG59XFxudmFyIGJqSXRlbSA9IHtcXG4gICAgaGZQbHVnaW46IGZ1bmN0aW9uKHBhcnNlUm91dGUpIHtcXG4gICAgICAgIHJldHVybiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgaWYgKGZpbGVFeGlzdChrKSkge1xcbiAgICAgICAgICAgICAgICB2YXIgY2pjYWNoZSA9IGdldFZhcignY2pDYWNoZScpO1xcbiAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKGspKTtcXG4gICAgICAgICAgICAgICAganNvbi5zZXR0aW5ncy5jaiA9IGNqY2FjaGU7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShrLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgICAgIHZhciBvbGRSb3V0ZSA9IGdldFZhcignb2xkQ29uZmlnJyk7XFxuICAgICAgICAgICAgICAgIHZhciBvbGRDb25maWcgPSBqc29uLnNldHRpbmdzO1xcbiAgICAgICAgICAgICAgICBvbGRDb25maWcuY2ogPSBjamNhY2hlO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUob2xkUm91dGUsICQuc3RyaW5naWZ5KG9sZENvbmZpZykpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mgaLlpI3miJDlip8nO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pnIDopoHlhYjmi4nlj5bliJfooagnXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgcGFyc2VSb3V0ZSlcXG4gICAgfSxcXG4gICAgcHVsbENvZGU6IGZ1bmN0aW9uKGspIHtcXG4gICAgICAgIHJldHVybiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgdmFyIHB1bGxNb2RlID0ga1swXTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VSb3V0ZSA9IGtbMV07XFxuICAgICAgICAgICAgdmFyIHBhcnNlRmlsZSA9IGZldGNoKHBhcnNlUm91dGUpO1xcbiAgICAgICAgICAgIGlmICghcGFyc2VGaWxlKSB7XFxuICAgICAgICAgICAgICAgIHZhciBzZXR0aW5ncyA9IGZldGNoKGdldFZhcignb2xkQ29uZmlnJykpO1xcbiAgICAgICAgICAgICAgICBzZXR0aW5ncyA9ICFzZXR0aW5ncyA/IHt9IDogSlNPTi5wYXJzZShzZXR0aW5ncyk7XFxuICAgICAgICAgICAgICAgIHZhciBqc29uID0ge307XFxuICAgICAgICAgICAgICAgIGpzb24uc2V0dGluZ3MgPSBzZXR0aW5ncztcXG4gICAgICAgICAgICAgICAganNvbi50aXRsZSA9IFtdO1xcbiAgICAgICAgICAgICAgICBqc29uLmNvZGVzID0ge307XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBwYXJzZUZpbGUpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2YXIgcGFyc2VUaXRsZSA9IFtdO1xcbiAgICAgICAgICAgIHZhciBwYXJzZUNvZGU9e307XFxuICAgICAgICAgICAgdmFyIGNqTGluayA9IGdldFZhcigncGx1Z2luTGluaycpO1xcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIGlmKC9AYmFzZTY0OlxcXFwvXFxcXC8vLnRlc3QoY2pMaW5rKSl7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKGJhc2U2NERlY29kZShjakxpbmsuc3BsaXQoJ0BiYXNlNjQ6Ly8nKVsxXSkpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZigv5o+S5Lu25ZCNLy50ZXN0KGNqTGluaykpe1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlYWxMaW5rID0gY2pMaW5rLnNwbGl0KCfmj5Lku7blkI0nKVswXS5yZXBsYWNlKC9bXFxcXHNdL2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKCfop6PmnpDkupHliarliIfmnb86JytyZWFsTGluayk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgeVBhc3RlID0gcGFyc2VQYXN0ZShyZWFsTGluayk7XFxuICAgICAgICAgICAgICAgICAgICBpZigvQGJhc2U2NDpcXFxcL1xcXFwvLy50ZXN0KHlQYXN0ZSkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoYmFzZTY0RGVjb2RlKHlQYXN0ZS5zcGxpdCgnQGJhc2U2NDovLycpWzFdKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZiBQYXJzZVM9PT0ndW5kZWZpbmVkJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ouJ5Y+W5Liq6bih5q+b5o+S5Lu2LOmHjOmdoui/nlBhcnNlU+WvueixoemDveayoeaciSEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+m4oeavm+aPkuS7tuaJp+ihjOaKpemUmTpcXFxcbicrZS5tZXNzYWdlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mnKrog73or4bliKvkupHliarliIfmnb/kuK3nmoTlhoXlrrk6XFxcXG4nK3lQYXN0ZS5zdWJzdHJpbmcoMCwxMDApO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNqTGluayA9PT0gJ1HnpZ4nKSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgamlleGkgPSBmZXRjaCgnaGlrZXI6Ly9maWxlcy9qaWV4aS9qaWV4aS50eHQnKS5zcGxpdCgnXFxcXG4nKTtcXG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSBpbiBqaWV4aSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZT1qaWV4aVtpXS5zcGxpdCgnJiYnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZT1qaWV4aVtpXS5zcGxpdCgnJiYnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlLnB1c2godGl0bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvLyB9ZWxzZSBpZigvXiNbYS16QS1aMC05XXsyLDEwfSQvLnRlc3QoY2pMaW5rKSl7Ly/npo/liKnlj6Pku6Qy5YiwMTDkvY1cXG4gICAgICAgICAgICAgICAgZWxzZSBpZigvXiNbXFxcXFNdezIsMTB9JC8udGVzdChjakxpbmspKXsvL+emj+WIqeWPo+S7pDLliLAxMOS9jeS7u+aEj+mdnuepuuWtl+espuS4slxcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qge3Rhc2tDYWxsLCB0YXNrUnVuLHRhc2tSZXF9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvdGFza0NhbGw/cnVsZT3pgZPplb/ku5PlupNQcm9cXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIC8vIGxvZygn5byA5aeL5omn6KGM5Lu75Yqh5LuT5bqT6I635Y+W5pat5b+15o+S5Lu256aP5Yip5Y+j5LukJyk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0gdGFza0NhbGwoMTcsJ0RuRnVsaScsW2NqTGlua10pO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5zdGF0dXMgPT09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmV0ID0gSlNPTi5wYXJzZShyZXN1bHQucmVzdWx0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2cocmV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihyZXQub3B0PT09J2Vycm9yJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly8nK3JldC5tc2c7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYocmV0Lm9wdD09PSd1cmwnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBmZXRjaChyZXQucmV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFyciA9IGh0bWwuaW5jbHVkZXMoJ2h0dHAnKT8gaHRtbDpiYXNlNjREZWNvZGUoaHRtbCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBqaWV4aSA9IGFyci5tYXRjaCgvW1xcXFxTXSo/LC4qP1tcXFxcc10vZyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgaW4gamlleGkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZT1qaWV4aVtpXS5zcGxpdCgnLCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGU9amlleGlbaV0uc3BsaXQoJywnKVsxXS5zcGxpdChcXFwiXFxcXG5cXFwiKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEvXmh0dHB8ZnVuY3Rpb24vLnRlc3QoY29kZSkmJmNvZGUubGVuZ3RoPjIwKXsvL2Jhc2U2NOe8lueggeeahOWHveaVsFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgPSBiYXNlNjREZWNvZGUoY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlLnB1c2godGl0bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlW3RpdGxlXT0vZnVuY3Rpb24vLnRlc3QoY29kZSk/ZXZhbChjb2RlKTpjb2RlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYocmV0Lm9wdD09PSdqeCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZigvW1xcXFxTXSo/LGh0dHBbXFxcXFNdLy50ZXN0KHJldC5yZXQpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHJldC5yZXQuc3BsaXQoJywnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gcmV0LnJldC5zcGxpdCgnLCcpWzFdLnNwbGl0KCdcXFxcbicpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoL15odHRwLy50ZXN0KHJldC5yZXQpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGNqTGluay5zcGxpdCgnIycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSByZXQucmV0LnNwbGl0KCdcXFxcbicpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pyq55+l55qE56aP5YipOlxcXFxuJytyZXQucmV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYocmV0Lm9wdD09PSd2aXBKeCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBjakxpbmsuc3BsaXQoJyMnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSByZXQucmV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09L2Z1bmN0aW9uLy50ZXN0KGNvZGUpP2V2YWwoY29kZSk6Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5LuT5bqT6Z2e5pyA5paw54mI5oiW6ICF56aP5Yip56S+5Yqf6IO95byA5Y+R5LitJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZihjakxpbms9PT0n5pat5o+SJyl7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKGZldGNoKFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL1BhcnNlX0RuLmpzXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZT1PYmplY3Qua2V5cyhQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZigvXmhpa2VyOlxcXFwvXFxcXC98XmZpbGU6XFxcXC9cXFxcL3xeaHR0cHxeXFxcXC9zdG9yYWdlXFxcXC98XlxcXFwvc2RjYXJkXFxcXC8vLnRlc3QoY2pMaW5rKSl7XFxuICAgICAgICAgICAgICAgICAgICBpZigvXlxcXFwvc3RvcmFnZVxcXFwvfF5cXFxcL3NkY2FyZFxcXFwvLy50ZXN0KGNqTGluaykpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNqTGluayA9ICdmaWxlOi8vJytjakxpbms7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNqTGluaykpO1xcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZT1PYmplY3Qua2V5cyhQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mi4nlj5blj6Pku6TmnInor68nXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIGxvZyhlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2YXIganhKdWRnZSA9IHR5cGVvZiBQYXJzZVMgPT0gJ29iamVjdCc7XFxuICAgICAgICAgICAgdmFyIGxiSnVkZ2UgPSB0eXBlb2YocGFyc2VUaXRsZSkgPT0gJ29iamVjdCc7XFxuICAgICAgICAgICAgaWYgKGp4SnVkZ2UgfHwgbGJKdWRnZSkge1xcbiAgICAgICAgICAgICAgICAvLyBpZiAocHVsbE1vZGUgPT09ICfliJfooagnKSB7XFxuICAgICAgICAgICAgICAgIC8vICAgICBpZiAoIWxiSnVkZ2UpIHtcXG4gICAgICAgICAgICAgICAgLy8gICAgICAgICBwYXJzZVRpdGxlID0gT2JqZWN0LmtleXMoUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgLy8gICAgIH1cXG4gICAgICAgICAgICAgICAgLy8gICAgIHZhciBuZXdQYXJzZVRpdGxlID0ganNvbi50aXRsZS5jb25jYXQocGFyc2VUaXRsZSk7XFxuICAgICAgICAgICAgICAgIC8vICAgICBqc29uLnRpdGxlID0gQXJyYXkuZnJvbShuZXcgU2V0KG5ld1BhcnNlVGl0bGUpKTtcXG4gICAgICAgICAgICAgICAgLy8gfVxcbiAgICAgICAgICAgICAgICAvLyDkuI3nrqHmi4nlj5bku6PnoIHov5jmmK/liJfooajpg73opoHmiorliJfooajmi4nkuoZcXG4gICAgICAgICAgICAgICAgaWYgKCFsYkp1ZGdlKSB7XFxuICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlID0gT2JqZWN0LmtleXMoUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyhwYXJzZVRpdGxlKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB2YXIgc2NPYmplY3QgPSBbXFxcIkNpdHlJUFxcXCIsIFxcXCJwY1VBXFxcIiwgXFxcImNhY2hlTTN1OFxcXCIsXFxcImlzVmlkZW9c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lbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YoUGFyc2VTKT09XFxcInVuZGVmaW5lZFxcXCIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKGpzb24uY29kZXMsIHBhcnNlQ29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuIFxcXCJ0b2FzdDovL+ayoeacieS7o+egge+8jOS4jeWPr+aLieWPllxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvL3ZhciBuZXdGaWxlID0gdG9vbHMudG9KU09OKGpzb24pOy8v6Ieq5a6a5LmJc3RyaW5naWZ55Ye95pWw77yM5bim5pyJ6L2s5LmJ5a2X56ymXFxuICAgICAgICAgICAgICAgIHZhciBuZXdGaWxlID0gJC5zdHJpbmdpZnkoanNvbik7IC8vSlNPTi5wYXJzZeS8muaKpemUmVxcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgbmV3RmlsZSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aLieWPlicgKyBwdWxsTW9kZSArICfmiJDlip8nO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mnKrojrflj5bliLDlr7nosaEnO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIFtrLCBfbXlTZXQucGFyc2VSb3V0ZV0pXFxuICAgIH0sXFxuICAgIHB1bGxTY3JpcHQ6IGZ1bmN0aW9uKGNqLCB4NSkge1xcbiAgICAgICAgcmV0dXJuICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICB2YXIgY2pGcm9tID0gJ2hpa2VyOi8vcGFnZS9QYXJzZV9Ebi5qcz9ydWxlPU15RmllbGThtLDigb8nO1xcbiAgICAgICAgICAgIHZhciB4NUZyb20gPSAnaGlrZXI6Ly9wYWdlL1BhcnNlX0RuLmh0bWw/cnVsZT1NeUZpZWxk4bSw4oG/JztcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICB2YXIgY2pGaWxlID0gSlNPTi5wYXJzZShmZXRjaChjakZyb20pKS5ydWxlO1xcbiAgICAgICAgICAgICAgICB2YXIgeDVGaWxlID0gSlNPTi5wYXJzZShmZXRjaCh4NUZyb20pKS5ydWxlO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoa1swXSwgY2pGaWxlKTtcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKGtbMV0sIHg1RmlsZSk7XFxuICAgICAgICAgICAgICAgIGNsZWFyVmFyKCdqeE9sZFYnKTtcXG4gICAgICAgICAgICAgICAgY2xlYXJWYXIoJ2p4TmV3VicpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mi4nlj5bmiJDlip8nO1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+acquaIkOWKn+iOt+WPluWGheWuuSc7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgW2NqLCB4NV0pXFxuICAgIH0sXFxuICAgIHhsU2VsZWN0OiBmdW5jdGlvbihiaWFuamksIGxiTGVuZ3RoKSB7XFxuICAgICAgICByZXR1cm4gXFxcInNlbGVjdDovL1xcXCIgKyBKU09OLnN0cmlu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AgICBjb2w6ICcyJyxcXG4gICAgICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgICAgICB2YXIgbmV3SW5wdXQgPSBwYXJzZURvbUZvckh0bWwoaW5wdXQsICdzcGFuJiZ0aXRsZScpLnNwbGl0KCd8fCcpO1xcbiAgICAgICAgICAgICAgICAvLyDkv67mlLks6L+q6L+qLDAgICDmk43kvZznsbvlnoss5ZCN56ewLOe0ouW8lVxcbiAgICAgICAgICAgICAgICB2YXIgdHlwZSA9IG5ld0lucHV0WzBdO1xcbiAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IG5ld0lucHV0WzFdO1xcbiAgICAgICAgICAgICAgICB2YXIgbnVtID0gbmV3SW5wdXRbMl07XFxuICAgICAgICAgICAgICAgIHZhciBudW0yID0gbmV3SW5wdXRbM107XFxuICAgICAgICAgICAgICAgIHN3aXRjaCAodHlwZSkge1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi5Yig6ZmkXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgayA9IFtuYW1lLCBudW1dO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIOaAu+aEn+inieetm+mAieaIluiAheaQnOe0ouWQju+8jOeUseS6jm51beeahOS9jee9ruS4jeWvueWPr+iDveS8muWIoOmZpOmUmSzkuovlrp7lpoLmraQs5bey5L+uP1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKFxcXCLljbPlsIbliKDpmaQ6IFxcXCIgKyBuYW1lKS5jb25maXJtKChrKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuYW1lID0ga1swXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG51bSA9IGtbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoanNvbi5jb2Rlcy5oYXNPd25Qcm9wZXJ0eShuYW1lKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGpzb24uY29kZXNbbmFtZV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtID0ganNvbi50aXRsZS5pbmRleE9mKG5hbWUpOyAvL+i/meagt+aJjeS8muW+l+WIsOato+ehrueahOe0ouW8lVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uLnRpdGxlLnNwbGljZShudW0sIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LlsIbjgJZcXFwiICsgbmFtZSArIFxcXCLjgJfliKDpmaRcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGspO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi6ZqQ6JePXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChcXFwiaGlrZXI6Ly9lbXB0eSNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBrWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbnVtID0ga1sxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBnZXRWYXIoJ3BhcnNlUm91dGUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqc29uLmNvZGVzLmhhc093blByb3BlcnR5KG5hbWUpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW0gPSBqc29uLnRpdGxlLmluZGV4T2YobmFtZSk7IC8v6L+Z5qC35omN5Lya5b6X5Yiw5q2j56Gu55qE57Si5byVXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uLnRpdGxlLnNwbGljZShudW0sIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsICQuc3RyaW5naWZ5KGpzb24pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LlsIbjgJZcXFwiICsgbmFtZSArIFxcXCLjgJfpmpDol49cXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+WPr+iDveaYr+S4que9keWdgCwg5oKo5Y+v6YCJ5oup5Yig6ZmkXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtuYW1lLCBudW1dKTtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuS/ruaUuVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9pZiAoanNvbi5jb2Rlc1tuYW1lXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuQ29kZSA9IG5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlcyA9IGpzb24udGl0bGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5OYW1lID0gXFxcIui/meaYr+WQjeensFxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpzb24uY29kZXNbbmFtZV0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbkNvZGUgPSBqc29uLmNvZGVzW25hbWVdLnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5OYW1lID0gbmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcImhpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5I1xcXCIpLnJ1bGUoKGssdGl0bGVzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZ2V0SXRlbSgnbXlGdW5jdGlvbicpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBrWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29kZSA9IGtbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+S/nSDlrZgnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBzYXZlQnV0dG9uICsgXFxcInNhdmVCdXR0b24oZ2V0VmFyKCdpbnB1dF9lZGl0JyksbmFtZSk7YmFjaygpO1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLlu7rorq7mjInpu5jorqTnmoTku6PnoIHmoLzlvI/kv67mlLnlk6ZcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dFZhcignaW5wdXRfZWRpdCcsIGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXFxcInRleHRhcmVhXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IFxcXCItMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGlnaGxpZ2h0OiB0cnVlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiAn5L+u5pS54piFJyArIG5hbWUgKyAn4piFJyArIGNvZGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8c21hbGw+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiM2RUI4OTdcXFwiPuagvOW8j+S4uu+8muaTjeS9nOexu+Wei+KYheagh+mimOKYhWZ1bmN0aW9uKCl76Ieq5a6a5LmJ5YaF5a65fTxicj7or7fli7/loavlhaXlhbbku5bmoLzlvI8nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChzYXZlQnV0dG9uLG5hbWUsdGl0bGVzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRtcEFyID0gZ2V0VmFyKCdpbnB1dF9lZGl0Jykuc3BsaXQoJ+KYhScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHRtcEFyLmxlbmd0aDwyKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/ruaUueagvOW8j+acieivr++8jOiuv+mXruiiq+aLkue7nSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld05hbWUgPSB0bXBBclsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihuZXdOYW1lIT09bmFtZSYmdGl0bGVzLmluY2x1ZGVzKG5ld05hbWUpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ+ajgOa1i+WIsOWQjOWQjeaOpeWPozonK25ld05hbWUrJyzmmK/lkKbopobnm5Y/JykuY29uZmlybSgoc2F2ZUJ1dHRvbixuYW1lKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSBzYXZlQnV0dG9uKGdldFZhcignaW5wdXRfZWRpdCcpLG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFjaygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suS/neWtmOS/ruaUuVxcXFxu6K+36Ieq6KGM5qOA5rWL6KaG55uW5ZCO55qE5YaF5a65JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxzYXZlQnV0dG9uLG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IHNhdmVCdXR0b24oZ2V0VmFyKCdpbnB1dF9lZGl0JyksbmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2soKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suS/neWtmOS/ruaUuSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmKHR5cGVvZihjb2RlKT09PSdzdHJpbmcnJiZjb2RlLmxlbmd0aD4yKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgcmV0dXJuIGNvZGVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgcmV0dXJuICd0b2FzdDovL+W3suS/neWtmOS/ruaUuSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgc2F2ZUJ1dHRvbixuYW1lLHRpdGxlcyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn4oCY4oCY4oCZ4oCZPGJpZz48YmlnPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMjk4QTA4XFxcIj7kv50g5a2YJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbbk5hbWUsIG5Db2RlXSx0aXRsZXMpIC8vW25hbWUsIGpzb24uY29kZXNbbmFtZV0udG9TdHJpbmcoKV0pXFxuICAgICAgICAgICAgICAgICAgICAvKn0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+WPquaciee9keWdgOaIluiAheagh+mimCwg5LiN5pSv5oyB5L+u5pS5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSovXFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLnva7pobZcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi572u5bqVXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBudW0gPSBqc29uLnRpdGxlLmluZGV4T2YobmFtZSk7IC8v6L+Z5qC35omN5Lya5b6X5Yiw5q2j56Gu55qE57Si5byVXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYobnVtPi0xKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGl0ZW0gPSBqc29uLnRpdGxlLnNwbGljZShudW0sIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uLnRpdGxlLnNwbGljZShudW0yLCAwLCBpdGVtWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsICQuc3RyaW5naWZ5KGpzb24pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5rKh5om+5YiwOicrbmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLnp7vliqhcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCdoaWtlcjovL2VtcHR5I25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2JpYW5qaScsICfnp7vliqgjJyArIGspO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpbnB1dDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBudW0pO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi5YiG5LqrXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuS6keWIhuS6q1xcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpzb24uY29kZXNbbmFtZV0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcnNlVGV4dCA9IHR5cGVvZiBqc29uLmNvZGVzW25hbWVdID09ICdmdW5jdGlvbicgPyAkLnN0cmluZ2lmeShqc29uLmNvZGVzW25hbWVdKSA6IGpzb24uY29kZXNbbmFtZV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGV4dCA9ICdNeVBhcnNlU+KYhScgKyBuYW1lICsgJ+KYhScgKyBiYXNlNjRFbmNvZGUocGFyc2VUZXh0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGFyc2VUZXh0ID0gJ+ebtOmTvuKYhScgKyBqc29uLnRpdGxlW251bV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlID09ICfkupHliIbkuqsnICYmIHBhcnNlVGV4dC5zdWJzdHIoMCwgOCkgPT0gJ015UGFyc2VTJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRleHQgPSBzaGFyZVBhc3RlKHBhcnNlVGV4dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZVRleHQuc3Vic3RyKDAsIDYpICE9ICdlcnJvcjonID8gJ2NvcHk6Ly8nICsgcGFyc2VUZXh0ICsgJ1xcXFxu4piF4piF4piFXFxcXG4nICsgJ015UGFyc2VT77yaJyArIG5hbWUgOiAndG9hc3Q6Ly/liIbkuqvlpLHotKUhIeS6keWJqui0tOadv+WPr+iDveaMguS6hic7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdjb3B5Oi8vJyArIHBhcnNlVGV4dDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mmoLkuI3mlK/mjIEnO1xcbiAgICAgICAgICAgICAgICB9IC8vc3dpdGNo55qEXFxuICAgICAgICAgICAgfSkgLy9TdHJpbmfnmoRcXG4gICAgICAgIH0pIC8vc3RyaW5naWZ555qEXFxuICAgIH0sXFxuICAgIHhqUGFyc2U6IGZ1bmN0aW9uKCkge1xcbiAgICAgICAgcmV0dXJuICQoXFxcImhpa2VyOi8vZW1wdHkjbm9IaXN0b3J5I1xcXCIpLnJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgIHZhciBkID0gW107XFxuICAgICAgICAgICAgZXZhbChnZXRJdGVtKCdteUZ1bmN0aW9uJykpO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5L+dIOWtmCcsXFxuICAgICAgICAgICAgICAgIHVybDogc2F2ZUJ1dHRvbiArIFxcXCJzYXZlQnV0dG9uKGlucHV0KTtiYWNrKCk7Y2xlYXJWYXIoJ2lucHV0X2FkZCcpXFxcIixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCIsXFxuICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLovpPlhaXmraPnoa7moLzlvI/lhoXlrrlcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6ICdwdXRWYXIoXFxcImlucHV0X2FkZFxcXCIsIGlucHV0KScsXFxuICAgICAgICAgICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBcXFwiLTFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgaGlnaGxpZ2h0OiB0cnVlLFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0VmFyKCdpbnB1dF9hZGQnKSxcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPHNtYWxsPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjojNkVCODk3XFxcIj7mjInmj4/ov7Dor4nmoLzlvI/ovpPlhaUsIOivt+WLv+Whq+WFpeWFtuS7luagvOW8jzxicj7mnKzlnLDlj6Pku6Q6IOaTjeS9nOexu+Wei+KYheWQjeensOKYheS7o+eggTxicj7kupHlj6Pku6Q6IOmTvuaOpeKYheKYheKYheWQjeensDsg57qv572R5Z2AOiDnm7Tpk77imIV1cmwx4piFdXJsMicsXFxuICAgICAgICAgICAgICAgIGRlc2M6ICfigJjigJjigJnigJk8YmlnPjxiaWc+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiMyOThBMDhcXFwiPuS/nSDlrZgnLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJ25vTG9hZGluZycpLmxhenlSdWxlKChzYXZlQnV0dG9uKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2F2ZUJ1dHRvbihnZXRWYXIoJ2lucHV0X2FkZCcpKTtcXG4gICAgICAgICAgICAgICAgfSwgc2F2ZUJ1dHRvbiksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgICAgICB9KVxcbiAgICB9LFxcbiAgICB5ZFBhcnNlOiBmdW5jdGlvbihCSm1vZGUsIGkpIHtcXG4gICAgICAgIHJldHVybiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgdmFyIEEgPSBrWzBdLnNwbGl0KCcjJylbMV07XFxuICAgICAgICAgICAgdmFyIEIgPSBrWzFdO1xcbiAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICAgICAgdmFyIGl0ZW0gPSBqc29uLnRpdGxlLnNwbGljZShBLCAxKTsgLy8gMTog5qCH6K6w5byA5aeL5L2N572u77yMMjog5Yig6Zmk5Yiw5ZOq5Liq5L2N572uXFxuICAgICAgICAgICAganNvbi50aXRsZS5zcGxpY2UoQiwg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xcbiAgICAgICAgICAgICdjb2xvcic6ZnVuY3Rpb24odGV4dCwgY29sb3IpIHtcXG4gICAgICAgICAgICAgICAgdGV4dCArPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICAgICAgaWYgKHRleHQuaW5kZXhPZihcXFwi4oCc4oCc4oCd4oCdXFxcIikgPT09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgIHRleHQucmVwbGFjZShcXFwi4oCc4oCc4oCd4oCdXFxcIiwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwi4oCc4oCc4oCd4oCdPGZvbnQgY29sb3I9J1xcXCIgKyBjb2xvciArIFxcXCInPlxcXCIgKyB0ZXh0ICsgXFxcIjwvZm9udD5cXFwiO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ2t6V0RLJzogZnVuY3Rpb24oXzB4NDg1NGE5LCBfMHgzZTk4YzUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDQ4NTRhOSArIF8weDNlOThjNTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdYWHlRcic6ICfnp7vliqgjJyxcXG4gICAgICAgICAgICAnZ3RVbmonOiBmdW5jdGlvbihfMHg1OWFhZjcsIF8weDIyYzY2Yikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NTlhYWY3ICsgXzB4MjJjNjZiO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ1V0ZldmJzogJ+KAmOKAmOKAmeKAmTxzbWFsbD48c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiNGRTlBMkVcXFxcXFxcIj4nLFxcbiAgICAgICAgICAgICdRT3ZKVic6ICfnp7vliqg6ICcsXFxuICAgICAgICAgICAgJ0FCRXdCJzogJ+KAmOKAmOKAmeKAmTxzcGFuIHN0eWxlPVxcXFxcXFwiY29sb3I6IzI5OEEwOFxcXFxcXFwiPicsXFxuICAgICAgICAgICAgJ296eldHJzogJ3RleHRfMicsXFxuICAgICAgICAgICAgJ25XZlZSJzogZnVuY3Rpb24oXzB4NDgwZjNhLCBfMHg0Yzg0ZmMpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDQ4MGYzYSArIF8weDRjODRmYztcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdKQ2NOWSc6ICdwYXJzZVJvdXRlJyxcXG4gICAgICAgICAgICAncmdESXAnOiAnYmlhbmppJyxcXG4gICAgICAgICAgICAnaG9JZEonOiAn4oCY4oCY4oCZ4oCZPGJpZz48c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiM2RUI4OTdcXFxcXFxcIj7mlrAg5bu6IOinoyDmnpAnLFxcbiAgICAgICAgICAgICdGckdPSCc6IGZ1bmN0aW9uKF8weDEyZDZkYiwgXzB4MmEwNjhkKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHgxMmQ2ZGIgPCBfMHgyYTA2OGQ7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnb0NDU2onOiBmdW5jdGlvbihfMHgxOWIxNzgsIF8weDRlZjhmNikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4MTliMTc4ID09PSBfMHg0ZWY4ZjY7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnSFpobGMnOiBmdW5jdGlvbihfMHg1Y2FlMDMsIF8weDI2ZTI0Mikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NWNhZTAzID09IF8weDI2ZTI0MjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdjZ0llQSc6IGZ1bmN0aW9uKF8weDI1ZTM2OCwgXzB4OGJjOGU5KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHgyNWUzNjggKyBfMHg4YmM4ZTk7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAneGRyRnYnOiBmdW5jdGlvbihfMHg0YWI1ZDgsIF8weDIxMjQyZikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NGFiNWQ4ICsgXzB4MjEyNDJmO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ3l3anV4JzogZnVuY3Rpb24oXzB4NWUzMDUxLCBfMHg0ZTAyMzApIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDVlMzA1MShfMHg0ZTAyMzApO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH07XFxuICAgICAgICB2YXIgXzB4MWQ4YmIxID0gZ2V0VmFyKF8weDRjMDQyN1snSkNjTlknXSk7XFxuICAgICAgICB2YXIgXzB4M2I4OWFiID0gcGFyc2VGaWxlWyd0aXRsZSddO1xcbiAgICAgICAgdmFyIF8weDQ5ZGE5NiA9IGdldFZhcihfMHg0YzA0MjdbJ3JnRElwJ10pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogXzB4NGMwNDI3Wydob0lkSiddLFxcbiAgICAgICAgICAgIGRlc2M6J+azqOaEjzrkvY3nva7mk43kvZzlip/og73lj6rlnKjliIbnsbvnrZvpgInkuLrlhajpg6jml7bnlJ/mlYhcXFxcbuS4i+aWueaQnOe0ouaMieWQjeensOaIluWcsOWdgCzph43nva7or7fnlZnnqbrmiJbngrnop6PmnpDmlbDph4/mjInpkq4nLFxcbiAgICAgICAgICAgIHVybDogYmpJdGVtWyd4alBhcnNlJ10oKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOmZhbHNlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOifmkJzntKInLFxcbiAgICAgICAgICAgIGRlc2M6J21lbmd4JyxcXG4gICAgICAgICAgICBjb2xfdHlwZTonaW5wdXQnLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0VmFyKCdkcC5zZWFyY2hKeCcsaW5wdXQpXFxcIixcXG4gICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiB0cnVlLFxcbiAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTEsXFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTpnZXRWYXIoJ2RwLnNlYXJjaEp4JywnJyksXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICB1cmw6JC50b1N0cmluZygoKT0+e1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KTtcXG4gICAgICAgIGxldCBmaWx0ZXJzID0gWyflhajpg6gnLCfpk77mjqUnLCdqc29uJywn5YWN5ZeFJ107XFxuICAgICAgICBmb3IobGV0IG8gaW4gZmlsdGVycyl7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6Z2V0VmFyKCdkbi5qeF9maWx0ZXInLCflhajpg6gnKT09PWZpbHRlcnNbb10/J+KAnOKAnOKAneKAnTxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMjk4QTA4XFxcIj4nK2ZpbHRlcnNbb106ZmlsdGVyc1tvXSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RuLmp4X2ZpbHRlcicsaXQpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4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4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBfMHgyYmM2MTggPSBfMHgzYjg5YWJbXzB4ZTJjM2Q4XTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBfMHg1Y2Y0MTcgPSBfMHg0YzA0MjdbJ1VWV29GJ10oXzB4MmJjNjE4LCAnJylbJ3JlcGxhY2UnXSgvaHR0cC4qXFxcXC9cXFxcLy9nLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoL+enu+WKqC8gWyd0ZXN0J10oXzB4NDlkYTk2KSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDRjMDQyN1sna3pXREsnXShfMHg0YzA0MjdbJ1hYeVFyJ10sIF8weGUyYzNkOCkgPT0gXzB4NDlkYTk2ID8gXzB4NGMwNDI3WydndFVuaiddKF8weDRjMDQyN1snZ3RVbmonXShfMHg0YzA0MjdbJ1V0ZldmJ10sIF8weDRjMDQyN1snUU92SlYnXSksIF8weDVjZjQxNykgOiBfMHg0YzA0MjdbJ0FCRXdCJ10gKyBfMHg1Y2Y0MTcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3lkUGFyc2UnXShfMHg0OWRhOTYsIF8weGUyYzNkOCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDRjMDQyN1snb3p6V0cnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgXzB4MTE5MzY1ID0gW18weDJiYzYxOCwgXzB4NGMwNDI3WydndFVuaiddKF8weGUyYzNkOCwgJ3x8JyldWydqb2luJ10oJ3x8Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NGMwNDI3WyduV2ZWUiddKF8weDRjMDQyN1snQUJFd0InXSwgXzB4NWNmNDE3KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NGMwNDI3WydvenpXRyddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWyd4bFNlbGVjdCddKF8weDExOTM2NSwgXzB4MmVjYmU1Wyd0b1N0cmluZyddKCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgXzB4YjcwMTkyID0gW18weDMzNzg4YywgXzB4ZTJjM2Q4ICsgJ3x8J11bJ2pvaW4nXSgnfHwnKTtcXG4gICAgICAgICAgICAgICAgLy8g6L+q6L+q5b2x6ZmifHwwfHwgIOWQjeensHx857Si5byVIOeahOaVsOe7hFxcbiAgICAgICAgICAgICAgICAvLyBBQkV3QiDmmK/nu7/oibIgXzB4Mzc4NzFlIOaYr+agh+mimOWQjeensCAgeGRyRnbmmK/lrZfnrKbkuLLov57mjqXlh73mlbBcXG4gICAgICAgICAgICAgICAgLy8gbGV0IGZsYWcgPSAn4oCY4oCY4pOK4oCZ4oCZJztcXG4gICAgICAgICAgICAgICAgbGV0IGZsYWcgPSBfMHg0YzA0MjcuY29sb3IoJ+KTiicsJyMwMDUxZmYnKTtcXG4gICAgICAgICAgICAgICAgaWYodHlwZW9mKGpzb24uY29kZXNbXzB4Mzc4NzFlXSk9PT0nZnVuY3Rpb24nKXtcXG4gICAgICAgICAgICAgICAgICAgIC8vIGZsYWcgPSAn4oCc4oCc4pK/4oCd4oCdJztcXG4gICAgICAgICAgICAgICAgICAgIGZsYWcgPSBfMHg0YzA0MjcuY29sb3IoJ+KSvycsJyNmZjcwMDAnKTtcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYodHlwZW9mKGpzb24uY29kZXNbXzB4Mzc4NzFlXSk9PT0ndW5kZWZpbmVkJyl7XFxuICAgICAgICAgICAgICAgICAgICBmbGFnID0gJyc7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy8gbGV0IGNscyA9ICc8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzI5OEEwOFxcXCI+JztcXG4gICAgICAgICAgICAgICAgLy8gbGV0IHRpdGxlID0gXzB4NGMwNDI3Wyd4ZHJGdiddKF8weDRjMDQyN1snQUJFd0InXSwgZmxhZytfMHgzNzg3MWUpO1xcbiAgICAgICAgICAgICAgICAvLyBsZXQgdGl0bGUgPSBmbGFnK2NscytfMHgzNzg3MWU7XFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGZsYWcrXzB4NGMwNDI3LmNvbG9yKF8weDM3ODcxZSwnIzI5OEEwOCcpO1xcbiAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAvLyAndGl0bGUnOiBfMHgzNzg3MWUsXFxuICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg0YzA0MjdbJ296eldHJ10sXFxuICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWyd4bFNlbGVjdCddKF8weGI3MDE5MiwgXzB4MmVjYmU1Wyd0b1N0cmluZyddKCkpXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIF8weDRjMDQyN1sneXdqdXgnXShjbGVhclZhciwgXzB4NGMwNDI3WydyZ0RJcCddKTtcXG4gICAgfSxcXG4gICAgJ2xxRmlsZSc6IGZ1bmN0aW9uKCkge1xcbiAgICAgICAgdmFyIF8weDU0MWQ3NiA9IHtcXG4gICAgICAgICAgICAnYVdpUnMnOiBmdW5jdGlvbihfMHg0OGQ3N2IsIF8weDE5MTYxZiwgXzB4MjFjYjg1KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0OGQ3N2IoXzB4MTkxNjFmLCBfMHgyMWNiODUpO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ3dTZm56JzogZnVuY3Rpb24oXzB4NDg1MGVhKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0ODUwZWEoKTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdxUlFkQSc6ICdqZFJvdXRlJyxcXG4gICAgICAgICAgICAnV1FpcWsnOiAndmFyIHhkUm91dGU9XFxcIlxcXCI7JyxcXG4gICAgICAgICAgICAncHNHZHQnOiBmdW5jdGlvbihfMHgxNzA3ODAsIF8weDNiNTEyYSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4MTcwNzgwID09IF8weDNiNTEyYTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdpbXhyaSc6ICd0cnVlJyxcXG4gICAgICAgICAgICAnblNrangnOiBmdW5jdGlvbihfMHg5NWJmMzgsIF8weDMxM2YyNSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4OTViZjM4ICE9PSBfMHgzMTNmMjU7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnaVZOZU0nOiAnZWVMSm0nLFxcbiAgICAgICAgICAgICdJd01UbCc6ICcwfDF8NXw5fDExfDN8Nnw3fDEwfDR8Mnw4JyxcXG4gICAgICAgICAgICAneGZkSGsnOiAn5ouJ5Y+W5Li75o+S5Lu25ZKM572R6aG16ISa5pysJyxcXG4gICAgICAgICAgICAnckdMdUEnOiAn5Li75o+S5Lu25a2Y5pS+6Lev5b6EOiAvY2FjaGUvUGFyc2VfRG4uanNcXFxceDBh572R6aG16ISa5pys5a2Y5pS+6Lev5b6EOiAvY2FjaGUvUGFyc2VfRG4uaHRtbCcsXFxuICAgICAgICAgICAgJ3pRU0xFJzogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgICAgICdodmlEbCc6IGZ1bmN0aW9uKF8weDI2ZGI2MiwgXzB4MzEyZjFjKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHgyNmRiNjIoXzB4MzEyZjFjKTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdaeFVndCc6ICfmk43kvZzmjIflvJUnLFxcbiAgICAgICAgICAgICdzV0ZvYyc6IGZ1bmN0aW9uKF8weDJhMDQ0YiwgXzB4MTQ5YTNmKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHgyYTA0NGIgKyBfMHgxNDlhM2Y7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnT0VoYXQnOiAn5ouJ5Y+W5Luj56CBJyxcXG4gICAgICAgICAgICAnWnZ0U3UnOiAn57yW6L6R6Kej5p6QJyxcXG4gICAgICAgICAgICAnZ1hLTWInOiAndG9hc3Q6Ly/or7flhYjmi4nlj5bliJfooagnLFxcbiAgICAgICAgICAgICdXQ09EQyc6IGZ1bmN0aW9uKF8weDRhZDNkNSwgXzB4MzFmYTFlKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0YWQzZDUgPCBfMHgzMWZhMWU7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnckFrQWgnOiAndGV4dF8zJyxcXG4gICAgICAgICAgICAneVdhT0knOiAn5oGi5aSN5o+S5Lu26Lev5b6E5Li66buY6K6kJyxcXG4gICAgICAgICAgICAneWp5aksnOiAn5b2T5YmN6K6+572u5Li6OiAnLFxcbiAgICAgICAgICAgICd0SFhlRSc6ICfmi4nlj5bop6PmnpDliJfooajmiJbogIXop6PmnpDku6PnoIEnLFxcbiAgICAgICAgICAgICdHTVVZdSc6ICflrZjmlL7ot6/lvoQ6IC9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nLFxcbiAgICAgICAgICAgICdtcFpCWic6ICdsaW5lX2JsYW5rJyxcXG4gICAgICAgICAgICAneHZxZ0YnOiAn6L6T5YWl5pyJ5pWI5o+S5Lu25Zyw5Z2AJyxcXG4gICAgICAgICAgICAnaGV1S3gnOiAncHV0VmFyKFxcXCJwbHVnaW5MaW5rXFxcIixpbnB1dCknLFxcbiAgICAgICAgICAgICdJaWZpYSc6ICfigJjigJjigJnigJk8c3Ryb25nPjxiaWc+55m75b2V5o+Q56S6JyxcXG4gICAgICAgICAgICAnUEZSSEEnOiAn5L2/55So55u45YWz5Yqf6IO96ZyA55m75b2V6KeG55WM6K665Z2b6LSm5Y+3XFxcXG7lpoLmnInpl67popjliY3lvoDorrrlnZvkuobop6Por6bmg4UnLFxcbiAgICAgICAgICAgICdVTHdrVCc6ICdodHRwczovL2hhaWt1b3NoaWppZS5jbi91c2VyL3NpZ25pbidcXG4gICAgICAgIH07XFxuICAgICAgICBpZiAoXzB4NTQxZDc2Wydwc0dkdCddKF8weDU0MWQ3Nlsnd1NmbnonXShiYnNZWiksIF8weDU0MWQ3NlsnaW14cmknXSl8fHRydWUpIHtcXG4gICAgICAgICAgICBpZiAoXzB4NTQxZDc2WyduU2tqeCddKF8weDU0MWQ3NlsnaVZOZU0nXSwgXzB4NTQxZDc2WydpVk5lTSddKSkge1xcbiAgICAgICAgICAgICAgICBfMHg1NDFkNzZbJ2FXaVJzJ10ocHV0VmFyLCAnYmJzWVonLCBfMHg1NDFkNzZbJ3dTZm56J10oaXNMb2dpbnx8ZnVuY3Rpb24gKCl7cmV0dXJuIHRydWV9KSk7XFxuICAgICAgICAgICAgICAgIF8weDU0MWQ3NlsnYVdpUnMnXShwdXRWYXIsIF8weDU0MWQ3NlsncVJRZEEnXSwgXzB4NTQxZDc2WydXUWlxayddKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgXzB4NGQyNWZmID0gXzB4NTQxZDc2WydJd01UbCddWydzcGxpdCddKCd8JyksXFxuICAgICAgICAgICAgICAgICAgICBfMHg0YTk3YzkgPSAweDA7XFxuICAgICAgICAgICAgICAgIHdoaWxlICghIVtdKSB7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKF8weDRkMjVmZltfMHg0YTk3YzkrK10pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcwJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsneGZkSGsnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3B1bGxTY3JpcHQnXShfbXlTZXRbJ2NqY2FjaGUnXSwgX215U2V0Wyd4NWNhY2hlJ10pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Rlc2MnOiBfMHg1NDFkNzZbJ3JHTHVBJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ3pRU0xFJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzEnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfMHg1NDFkNzZbJ2h2aURsJ10oZXZhbCwgXzB4NTQxZDc2WydodmlEbCddKGdldFZhciwgXzB4NTQxZDc2WydxUlFkQSddKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzInOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogJ2xpbmVfYmxhbmsnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICczJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF8weDJhYjM5OSA9ICdoaWtlcjovL2VtcHR5I25vSGlzdG9yeSNAcnVsZT1qczp0aGlzLmQ9W107JC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvanhJdGVtP3J1bGU9TXlGaWVsZOG0sOKBv1xcXCIpLmp4TGlzdCgpO3NldFJlc3VsdChkKTsnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc0JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsnWnhVZ3QnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiB0eXBlb2YgY3pHdWlkZSA9PSAnZnVuY3Rpb24nID8gY3pHdWlkZSgpIDogJycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ3pRU0xFJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzUnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ZFJvdXRlID0gXzB4NTQxZDc2WydzV0ZvYyddKHhkUm91dGUsIF9teVNldFsncGFyc2VSb3V0ZSddKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNic6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBfMHgzYTlhZmUgPSBbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogJ+aLieWPluWIl+ihqCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydwdWxsQ29kZSddKCfliJfooagnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ09FaGF0J10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydwdWxsQ29kZSddKCfku6PnoIEnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ1p2dFN1J10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogXzB4NTQxZDc2WydodmlEbCddKGZpbGVFeGlzdCwgXzB4NTQxZDc2WydodmlEbCddKGdldFZhciwgJ3BhcnNlUm91dGUnKSkgPT0gISFbXSA/IF8weDJhYjM5OSA6IF8weDU0MWQ3NlsnZ1hLTWInXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIF8weDFhMmNkYiA9IDB4MDsgXzB4NTQxZDc2WydXQ09EQyddKF8weDFhMmNkYiwgXzB4M2E5YWZlWydsZW5ndGgnXSk7IF8weDFhMmNkYisrKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDNhOWFmZVtfMHgxYTJjZGJdWyd0aXRsZSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBfMHgzYTlhZmVbXzB4MWEyY2RiXVsndXJsJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2WydyQWtBaCddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc4JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsneVdhT0knXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ2hmUGx1Z2luJ10oX215U2V0WydwYXJzZVJvdXRlJ10pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Rlc2MnOiBfMHg1NDFkNzZbJ3NXRm9jJ10oXzB4NTQxZDc2Wyd5anlqSyddICsgbXlTZXRbJ2NqJ10sICdcXFxcbuWtmOaUvui3r+W+hDogL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbicpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc5JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsndEhYZUUnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiAndG9hc3Q6Ly/or7flnKjkuIvmlrnpgInpobnmk43kvZwnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Rlc2MnOiBfMHg1NDFkNzZbJ0dNVVl1J10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ3pRU0xFJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzEwJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnbXBaQlonXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMTEnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Rlc2MnOiBfMHg1NDFkNzZbJ3h2cWdGJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiAnaW5wdXQnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2V4dHJhJzoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZVZpc2libGUnOiAhW10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2RlZmF1bHRWYWx1ZSc6IF8weDU0MWQ3NlsnaHZpRGwnXShnZXRWYXIsICdwbHVnaW5MaW5rJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2hhbmdlJzogXzB4NTQxZDc2WydoZXVLeCddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ0lpZmlhJ10sXFxuICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydQRlJIQSddLFxcbiAgICAgICAgICAgICAgICAndXJsJzogXzB4NTQxZDc2WydVTHdrVCddLFxcbiAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ3pRU0xFJ11cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfVxcbn07XFxuJC5leHBvcnRzID0ganhJdGVtO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi6Kej5p6QVXJs57yW6L6RXCIsXCJwYXRoXCI6XCJFZGl0VXJsXCIsXCJydWxlXCI6XCJqczpcXG5zZXRQYWdlVGl0bGUoXFxcIuaPkuS7tuaOpeWPo+iuvue9rlxcXCIpO1xcbmxldCBkID0gW107XFxubGV0IHBhcnNlVXJsVGV4dCA9IHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvamlleGkvamlleGkudHh0XFxcIik7XFxubGV0IHBhcnNlVXJsQXJyYXkgPSBwYXJzZVVybFRleHQuc3BsaXQoL1xcXFxuLyk7XFxub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Ck7XFxuICAgICAgICAgICAgICAgIGlmIChzZWxlY3RlZDEgPT0gZ2V0SXRlbShcXFwic2VsZWN0ZWQwXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInNlbGVjdGVkXFxcIiwgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwic2VsZWN0ZWQwXFxcIiwgdGl0bGUgKyBcXFwiJiZcXFwiICsgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S/ruaUueaIkOWKn1xcXCI7XFxuICAgICAgICAgICAgfSwgdGl0bGUsIGluZGV4KTtcXG4gICAgICAgIH07XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSBcXFwiMlxcXCI6XFxuICAgICAgICBmdW5jID0gZnVuY3Rpb24odXJsLCB0aXRsZSwgaW5kZXgpIHtcXG4gICAgICAgICAgICByZXR1cm4gJChcXFwi56Gu6K6k5Yig6Zmk44CMXFxcIiArIHRpdGxlICsgXFxcIuOAje+8n1xcXCIpLmNvbmZpcm0oKHRpdGxlLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VVcmxUZXh0ID0gcmVxdWVzdChcXFwiaGlrZXI6Ly9maWxlcy9qaWV4aS9qaWV4aS50eHRcXFwiKTtcXG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlVXJsQXJyYXkgPSBwYXJzZVVybFRleHQuc3BsaXQoL1xcXFxuLyk7XFxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RlZDEgPSBwYXJzZVVybEFycmF5W2luZGV4XTtcXG4gICAgICAgICAgICAgICAgcGFyc2VVcmxBcnJheS5zcGxpY2UoaW5kZXgsIDEpO1xcbiAgICAgICAgICAgICAgICBwYXJzZVVybFRleHQgPSBwYXJzZVVybEFycmF5LmpvaW4oXFxcIlxcXFxuXFxcIik7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9qaWV4aS9qaWV4aS50eHRcXFwiLCBwYXJzZVVybFRleHQpO1xcbiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0ZWQxID09IGdldEl0ZW0oXFxcInNlbGVjdGVkMFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAocGFyc2VVcmxBcnJheVswXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInNlbGVjdGVkXFxcIiwgcGFyc2VVcmxBcnJheVswXS5zcGxpdChcXFwiJiZcXFwiKVsxXSB8fCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwic2VsZWN0ZWQwXFxcIiwgcGFyc2VVcmxBcnJheVswXSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInNlbGVjdGVkXFxcIiwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInNlbGVjdGVkMFxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kv67mlLnmiJDlip9cXFwiO1xcbiAgICAgICAgICAgIH0sIHRpdGxlLCBpbmRleCk7XFxuICAgICAgICB9O1xcbiAgICAgICAgYnJlYWs7XFxuXFxufVxcbmZvciAobGV0IGkgaW4gcGFyc2VVcmxBcnJheSkge1xcbiAgICBsZXQgaXRlbSA9IHBhcnNlVXJsQXJyYXlbaV0uc3BsaXQoXFxcIiYmXFxcIik7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogc2VsZWN0ZWQgPT0gaXRlbVsxXSA/IFxcXCLigJjigJhcXFwiICsgaXRlbVswXSArIFxcXCLigJnigJlcXFwiIDogaXRlbVswXSxcXG4gICAgICAgIHVybDogZnVuYyhpdGVtWzFdLCBpdGVtWzBdLCBpKSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8zXFxcIlxcbiAgICB9KTtcXG59XFxuc2V0UmVzdWx0KGQpO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5Li76aKY566h55CGXCIsXCJwYXRoXCI6XCJ0aGVtZVwiLFwicnVsZVwiOlwianM6XFxuICAgIGZ1bmN0aW9uIHRoZW1lSW5pdCgpe1xcbiAgICAgICAgY29uc3Qge2NvbG9yLHNtYWxsfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3V0aWxpeT9ydWxlPemBk+mVv+S7k+W6k1Byb1xcXCIpO1xcbiAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgIGxldCBvcHRpb25zID0gWyfpgInmi6knLCfkv67mlLknLCfliKDpmaQnLCflr7zlh7onXTtcXG5cXG4gICAgICAgIGZvcih2YXIgaSBpbiBvcHRpb25zKXtcXG4gICAgICAgICAgICBsZXQgb3B0aW9uID0gb3B0aW9uc1tpXTtcXG4gICAgICAgICAgICBsZXQgZmxhZyA9IGdldFZhcigndGhlbWUuZG5fb3B0aW9uJywn5paw5aKeJyk9PT1vcHRpb24/J/CfkYknOicnO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOmZsYWcrb3B0aW9uLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKG9wdGlvbikubGF6eVJ1bGUoKCk9PntcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcigndGhlbWUuZG5fb3B0aW9uJywgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey6K6+572u5pON5L2c57G75Z6L5Li6OicraW5wdXQ7XFxuICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgbGV0IHRoZW1lUm91dGUgPSBcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVRoZW1lLmpzb25cXFwiO1xcbiAgICAgICAgbGV0IG15VGhlbWVzID0ge307XFxuICAgICAgICBsZXQgdGhlbWVzID0ge307XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIG15VGhlbWVzID0gSlNPTi5wYXJzZShmZXRjaCh0aGVtZVJvdXRlKSk7XFxuICAgICAgICAgICAgdGhlbWVzID0gbXlUaGVtZXMudGhlbWVzW215VGhlbWVzLm5vd190aGVtZV07XFxuICAgICAgICB9Y2F0Y2ggKGUpIHt9XFxuXFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiflr7zlhaUnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgnJywn6K+36L6T5YWl5a+85YWl5Y+j5LukJykuaW5wdXQoKG15VGhlbWVzLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGlmKC9e5pat5o+S5Li76aKYQC4qP0BodHRwLy50ZXN0KGlucHV0KSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IGlucHV0LnNwbGl0KCdAJylbMV07XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gaW5wdXQuc3BsaXQoJ0AnKVsyXTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7lrpropoHlr7zlhaXmlq3mj5LkuLvpopgtJytuYW1lKycg5ZCXPycpLmNvbmZpcm0oKG5hbWUsdXJsLG15VGhlbWVzLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBwYXJzZVBhc3RlKHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhhc1RoZW1lID0gbXlUaGVtZXMudGhlbWVzLmZpbHRlcihpdD0+aXQubmFtZT09PW5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGhhc1RoZW1lJiZoYXNUaGVtZS5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpZCA9IG51bGw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaiBpbiBteVRoZW1lcy50aGVtZXMpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXlUaGVtZXMudGhlbWVzW2pdLm5hbWUgPT09IG5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gajtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighaWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+e0ouW8lemUmeivr+aXoOazleimhuebluWvvOWFpTpcXFxcbicraWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coJ+imhuebluWvvOWFpeS4u+mimGlkOicraWQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXNbaWRdID0gT2JqZWN0LmFzc2lnbihKU09OLnBhcnNlKGJhc2U2NERlY29kZShjb250ZW50KSkseyduYW1lJzpuYW1lfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lcy5wdXNoKE9iamVjdC5hc3NpZ24oSlNPTi5wYXJzZShiYXNlNjREZWNvZGUoY29udGVudCkpLHsnbmFtZSc6bmFtZX0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKG15VGhlbWVzKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSxKU09OLnN0cmluZ2lmeShteVRoZW1lcykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LmiJDlip/lr7zlhaXkuLvpopg6XFxcXG4nK25hbWVcXG4gICAgICAgICAgICAgICAgICAgIH0sbmFtZSx1cmwsbXlUaGVtZXMsdGhlbWVSb3V0ZSk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aXoOazleivhuWIq+eahOWvvOWFpeWPo+S7pDpcXFxcbicraW5wdXQ7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LG15VGhlbWVzLHRoZW1lUm91dGUpLFxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOifmlrDlop4nLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgpLnJ1bGUoKG15VGhlbWVzLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGxldCBkPVtdO1xcbiAgICAgICAgICAgICAgICBhZGRMaXN0ZW5lcignb25DbG9zZScsICQudG9TdHJpbmcoKCk9PntcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+S4u+mimOWQjeensCcsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi5pat5o+SLeiTneiOk+S4u+mimFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0VmFyKCd0aGVtZS5uZXdfYWRkX25hbWUnLGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiB0cnVlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0VmFyKCd0aGVtZS5uZXdfYWRkX25hbWUnLCAnJylcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICB1cmw6JC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19hZGRfbmFtZSA9IGdldFZhcigndGhlbWUubmV3X2FkZF9uYW1lJywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDovpPlhaXnmoTmmK86JytuZXdfYWRkX25hbWU7XFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuS7o+eggVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldFZhcigndGhlbWUubmV3X2FkZF9jb2RlJywgJycpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFxcXCJ0ZXh0YXJlYVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0Oi0xLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiAncHV0VmFyKFxcXCJ0aGVtZS5uZXdfYWRkX2NvZGVcXFwiLGlucHV0KSdcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTon5L+d5a2YJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDokKCkubGF6eVJ1bGUoKG15VGhlbWVzLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSBnZXRWYXIoJ3RoZW1lLm5ld19hZGRfY29kZScsICcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IGdldFZhcigndGhlbWUubmV3X2FkZF9uYW1lJywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFuYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S9oOi/mOayoeWhq+WGmeS4u+mimOWQjeensOWRoidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld1RoZW1lID0ge307XFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3VGhlbWUgPSBKU09OLnBhcnNlKGNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6ZSZ6K+v55qE5Li76aKYanNvbuagvOW8jzpcXFxcbicrZS5tZXNzYWdlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKG5ld1RoZW1lLHsnbmFtZSc6bmFtZX0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lcy5wdXNoKG5ld1RoZW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSxKU09OLnN0cmluZ2lmeShteVRoZW1lcykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LmlrDlop7mlq3mj5LkuLvpopg6JytuYW1lXFxuICAgICAgICAgICAgICAgICAgICB9LG15VGhlbWVzLHRoZW1lUm91dGUpXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgICAgICAgICAgfSxteVRoZW1lcyx0aGVtZVJvdXRlKSxcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpteVRoZW1lcy50aGVtZXM/J+S4u+mimOWIl+ihqDrlhbHorqE6Jytjb2xvcihteVRoZW1lcy50aGVtZXMubGVuZ3RoLCcjZmY3MDAwJykrJ+S4quS4u+mimCc6XFxcIuesrOS4gOasoeWKoOi9ve+8jOeCueatpOi/m+WOu+WIneWni+WMluS4u+mimOWIl+ih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pO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pat5o+S5Li76aKY5bey6YeN572u5Li65Ye65Y6C6K6+572uJ1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KTtcXG4gICAgICAgIGZvcih2YXIgaSBpbiBteVRoZW1lcy50aGVtZXMpe1xcbiAgICAgICAgICAgIGxldCBub3dUaGVtID0gbXlUaGVtZXMudGhlbWVzW2ldO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOm15VGhlbWVzLm5vd190aGVtZT09PW5vd1RoZW0ubmFtZT8n8J+RiScrbm93VGhlbS5uYW1lOm5vd1RoZW0ubmFtZSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J2ZsZXhfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQoKS5sYXp5UnVsZSgobXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICBsZXQgb3B0aW9uID0gZ2V0VmFyKCd0aGVtZS5kbl9vcHRpb24nLCfmlrDlop4nKTtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAob3B0aW9uKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICflr7zlh7onOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbXl0aGVtZUNvZGUgPSBiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkobXl0aGVtZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gc2hhcmVQYXN0ZShteXRoZW1lQ29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gJ+aWreaPkuS4u+mimEAnK215dGhlbWUubmFtZSsnQCcrdXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3B5KGNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5a+85Ye65Li65LqR5Y+j5Luk5bm25aSN5Yi25Yiw5Ymq5YiH5p2/J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+S/ruaUuSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKEpTT04uc3RyaW5naWZ5KG15dGhlbWUpKS5pbnB1dCgobXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihteXRoZW1lLm5hbWU9PT1teVRoZW1lcy5ub3dfdGhlbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mraTkuLvpopjlvZPliY3mraPlnKjkvb/nlKjkuK3vvIzkuI3lhYHorrjkv67mlLkhJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMudGhlbWVzW2ldPUpTT04ucGFyc2UoaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSlNPTi5zdHJpbmdpZnkobXlUaGVtZXMpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suS/ruaUuSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxteXRoZW1lLG15VGhlbWVzLGksdGhlbWVSb3V0ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfliKDpmaQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu6K6k5Yig6Zmk5Li76aKYOicrbXl0aGVtZS5uYW1lKyc/JykuY29uZmlybSgobXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihteXRoZW1lLm5hbWU9PT1teVRoZW1lcy5ub3dfdGhlbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mraTkuLvpopjlvZPliY3mraPlnKjkvb/nlKjkuK3vvIzkuI3lhYHorrjliKDpmaQhJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMudGhlbWVzLnNwbGljZShpLDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSlNPTi5zdHJpbmdpZnkobXlUaGVtZXMpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWIoOmZpCdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxteXRoZW1lLG15VGhlbWVzLGksdGhlbWVSb3V0ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy5ub3dfdGhlbWU9bXl0aGVtZS5uYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSxKU09OLnN0cmluZ2lmeShteVRoZW1lcykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S9oOmAieaLqeS6hicrbXl0aGVtZS5uYW1lKyfkvZzkuLrpu5jorqTk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nVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XFxuICAgICAgICAgICAgICAgIH0sb3B0aW9uKSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBqeHNSb3V0ZSA9IFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL015SmlleGkuanNvblxcXCI7XFxuICAgICAgICBsZXQgZG1QYXRoID0gXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvZGlhb21hby50eHRcXFwiO1xcbiAgICAgICAgbGV0IE15SmlleGkgPSB7amlleGlzOltdfTtcXG4gICAgICAgIGxldCBqaWV4aXMgPSB7fTtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgTXlKaWV4aSA9IEpTT04ucGFyc2UoZmV0Y2goanhzUm91dGUpKTtcXG4gICAgICAgICAgICBqaWV4aXMgPSBNeUppZXhpLmppZXhpcy5maWx0ZXIoaXQ9Pml0Lm5hbWU9PT1NeUppZXhpLm5vdylbMF07XFxuICAgICAgICB9Y2F0Y2ggKGUpIHt9XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiflr7zlhaUnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgnJywn6K+36L6T5YWl5a+85YWl5Y+j5LukJykuaW5wdXQoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGlmKC9e6a2U5pat6Kej5p6Q6YWN572uQC4qP0BodHRwLy50ZXN0KGlucHV0KSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IGlucHV0LnNwbGl0KCdAJylbMV07XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gaW5wdXQuc3BsaXQoJ0AnKVsyXTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7lrpropoHlr7zlhaXmlq3mj5Lop6PmnpDphY3nva4tJytuYW1lKycg5ZCXPycpLmNvbmZpcm0oKG5hbWUsdXJsLE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBwYXJzZVBhc3RlKHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhhc0l0ID0gTXlKaWV4aS5qaWV4aXMuZmlsdGVyKGl0PT5pdC5uYW1lPT09bmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaGFzSXQmJmhhc0l0Lmxlbmd0aD4wKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlkID0gbnVsbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBqIGluIE15SmlleGkuamlleGlzKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKE15SmlleGkuamlleGlzW2pdLm5hbWUgPT09IG5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gajtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighaWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+e0ouW8lemUmeivr+aXoOazleimhuebluWvvOWFpTpcXFxcbicraWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coJ+imhuebluWvvOWFpeS4u+mimGlkOicraWQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpc1tpZF0gPSBPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXMucHVzaChPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaIkOWKn+WvvOWFpeino+aekOmFjee9rjpcXFxcbicrbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSxuYW1lLHVybCxNeUppZXhpLGp4c1JvdXRlKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5peg5rOV6K+G5Yir55qE5a+85YWl5Y+j5LukOlxcXFxuJytpbnB1dDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSksXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGxldCBpc0F1dG8gPSBNeUppZXhpLmlzQXV0bztcXG4gICAgICAgIGxldCBhdXRvTW9kZSA9IE15SmlleGkuYXV0b01vZGU7XFxuICAgICAgICBsZXQgc2luZ2xlQmFjayA9IE15SmlleGkuc2luZ2xlQmFja3x8ZmFsc2U7IC8v5ZCK5q+b5qih5byP44CC5Y2V5Liq57uT5p6c55u05o6l6L+U5Zue77yM5YGc5q2i5ZCO6Z2i55qEXFxuICAgICAgICBsZXQgdGlwcyA9ICfop6PmnpDphY3nva7liJfooag65YWx6K6hOicrY29sb3IoTXlKaWV4aS5qaWV4aXMubGVuZ3RoLCcjZmY3MDAwJykrJ+S4qumFjee9rizoh6rliqjmoaPlvIDlhbM6Jytjb2xvcihpc0F1dG8/J+W8gCc6J+WFsycsJyNmZjcwMDAnKTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6TXlKaWV4aS5qaWV4aXMmJk15SmlleGkuamlleGlzLmxlbmd0aD4wP3RpcHM6XFxcIuesrOS4gOasoeWKoOi9ve+8jOeCueatpOi/m+WOu+WIneWni+WMluino+aekOWIl+ihqFxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMScsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGlmKE15SmlleGkuamlleGlzJiZNeUppZXhpLmppZXhpcy5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmlzQXV0byA9ICFNeUppZXhpLmlzQXV0bztcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB0aXBzID0gTXlKaWV4aS5pc0F1dG8/J+W8gCc6J+WFsyc7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey6K6+572u6Ieq5Yqo5qGj5qih5byP5Li6OicrdGlwc1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBpbml0U2V0ID0geydub3cnOlxcXCLpgZPplb/mjqjojZBcXFwiLCdqaWV4aXMnOlt7bmFtZTon6YGT6ZW/5o6o6I2QJyxxeTpbJ+S4h+iDveino+aekOKSvyddLHlrOlsn5LiH6IO96Kej5p6Q4pK/J10sdHg6WyfkuIfog73op6PmnpDikr8nXSxtZzpbJ+S4h+iDveino+aekOKSvyddLGJsOlsn5LiH6IO96Kej5p6Q4pK/J10sc2g6WyfkuIfog73op6PmnpDikr8nXSx4ZzpbJ+S4h+iDveino+aekOKSvyddLHBwOlsn5LiH6IO96Kej5p6Q4pK/J10sbWk6WyfkuIfog73op6PmnpDikr8nXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGU6WyfkuIfog73op6PmnpDikr8nXSxmdW46WyfkuIfog73op6PmnpDikr8nXSxvbmU6WyfkuIfog73op6PmnpDikr8nXSxsdDpbJ+S4h+iDveino+aekOKSvyddLHJyOlsn5LiH6IO96Kej5p6Q4pK/J10sd2Q6WyfkuIfog73op6PmnpDikr8nXX1dfTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShpbml0U2V0KSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mlq3mj5Lop6PmnpDphY3nva7lt7LliJ3lp4vljJYnXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LE15SmlleGksanhzUm91dGUpXFxuICAgICAgICB9KTtcXG4gICAgICAgIGxldCBhdXRvTW9kZVRpcHMgPSBhdXRvTW9kZT09PSfpgJ/luqbkvJjlhYgnPyfpgJ/luqbkvJjlhYgnOifpobrluo/kvJjlhYgnO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpzbWFsbChcXFwi5aSH6IOO5a6g5bm45pa55qGIOlxcXCIpK2NvbG9yKGF1dG9Nb2RlVGlwcywnI2ZmNzAwMCcpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzInLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBNeUppZXhpLmF1dG9Nb2RlID0gTXlKaWV4aS5hdXRvTW9kZT09PSfpgJ/luqbkvJjlhYgnPyfpobrluo/kvJjlhYgnOifpgJ/luqbkvJjlhYgnO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruWkh+iDjuWuoOW5uOaWueahiOS4ujonK015SmlleGkuYXV0b01vZGVcXG4gICAgICAgICAgICB9LE15SmlleGksanhzUm91dGUpXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6Y29sb3IoXFxcIuaBouWkjeWHuuWOguiuvue9rlxcXCIsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8yJyxcXG4gICAgICAgICAgICB1cmw6JChcXFwi5aaC5p6c5L2g55qE6Kej5p6Q566h55CG5peg5rOV5q2j5bi455So5LqG77yM5q2k5pa55rOV5Y+v5Lul5pWR56CW77yM56Gu6K6k5oGi5aSNP1xcXCIpLmNvbmZpcm0oKGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgaW5pdFNldCA9IHsnbm93JzpcXFwi6YGT6ZW/5o6o6I2QXFxcIiwnamlleGlzJzpbe25hbWU6J+mBk+mVv+aOqOiNkCcscXk6WyfkuIfog73op6PmnpDikr8nXSx5azpbJ+S4h+iDveino+aekOKSvyddLHR4Olsn5LiH6IO96Kej5p6Q4pK/J10sbWc6WyfkuIfog73op6PmnpDikr8nXSxibDpbJ+S4h+iDveino+aekOKSvyddLHNoOlsn5LiH6IO96Kej5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byPOicpK2NvbG9yKHNpbmdsZUJhY2tUaXBzLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOmNvbF90eXBlMixcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpLnNpbmdsZUJhY2sgPSAhKE15SmlleGkuc2luZ2xlQmFja3x8ZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruWQiuavm+aooeW8j+W8gOWFs+S4ujonKyhNeUppZXhpLnNpbmdsZUJhY2s/J+W8gCc6J+WFsycpXFxuICAgICAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSlcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6c21hbGwoJ+Wkmue6v+i3r+e8k+WtmDonKStjb2xvcihjYWNoZVZpZGVvU3dpdGNoLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6Y29sX3R5cGUyLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChjYWNoZVZpZGVvU3dpdGNoKT0+e1xcbiAgICAgICAgICAgICAgICBpZihjYWNoZVZpZGVvU3dpdGNoPT09J+W8gCcpe1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkcC5jYWNoZVZpZGVvJywnZmFsc2UnKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RwLmNhY2hlVmlkZW8nLCd0cnVlJyk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LGNhY2hlVmlkZW9Td2l0Y2gpXFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6c21hbGwoJ+ino+aekOi2heaXtjonKStjb2xvcihqeFRpbWVvdXQsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTpjb2xfdHlwZTIsXFxuICAgICAgICAgICAgdXJsOiQoanhUaW1lb3V0LCfor7forr7nva7prZTmlq3op6PmnpDotoXml7Ys5b+F6aG75Li65pW05pWwJykuaW5wdXQoKCk9PntcXG4gICAgICAgICAgICAgICAgaWYoIXBhcnNlSW50KGlucHV0KSl7XFxuICAgICAgICAgICAgICAgICAgICBpbnB1dCA9IDcwMDA7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcHV0VmFyKCdkcC5qeFRpbWVvdXQnLGlucHV0KTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lorr7nva7kuLo6JytwYXJzZUludChpbnB1dClcXG4gICAgICAgICAgICB9LGp4VGltZW91dClcXG4gICAgICAgIH0pO1xcbiAgICAgICAgaWYoYXV0b01vZGUmJnNpbmdsZUJhY2spe1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBjb2xvcign5omT5byA57yW6L6R5ZCK5q+b6L+H5ruk5paH5Lu2JywnIzEzNzlDQicpLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGRtUGF0aCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRlZl9kbXMgPSBbJ2h0dHBzOi8vdmQzLmJkc3RhdGljLmNvbS9tZGEta2k5dWdxNTQzMGJoeHlzOC92MS1jYWUvMTA4MHAvbWRhLWtpOXVncTU0MzBiaHh5czgubXA0J107XFxuICAgICAgICAgICAgICAgICAgICBpZighZmlsZUV4aXN0KGRtUGF0aCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShkbVBhdGgsJy8v5LiA6KGM5LiA5Liq6ZO+5o6lLOWPr+azqOmHiuOAglxcXFxuJytkZWZfZG1zLmpvaW4oJ1xcXFxuJykpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdlZGl0RmlsZTovLycrZG1QYXRoO1xcbiAgICAgICAgICAgICAgICB9LGRtUGF0aCksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IGNvbG9yKCfmiZPlvIDnvJbovpHop6PmnpDmlofku7YnLCcjMTM3OUNCJyksXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChqeHNSb3V0ZSkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2VkaXRGaWxlOi8vJytqeHNSb3V0ZTtcXG4gICAgICAgICAgICB9LGp4c1JvdXRlKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGZvcihsZXQgaSBpbiBNeUppZXhpLmppZXhpcyl7XFxuICAgICAgICAgICAgbGV0IG5vd0p4ID0gTXlKaWV4aS5qaWV4aXNbaV07XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6TXlKaWV4aS5ub3c9PT1ub3dKeC5uYW1lPyfwn5GJJytub3dKeC5uYW1lOm5vd0p4Lm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgICAgIG5vd0p4Om5vd0p4LFxcbiAgICAgICAgICAgICAgICAgICAgTXlKaWV4aTpNeUppZXhpLFxcbiAgICAgICAgICAgICAgICAgICAganhzUm91dGU6anhzUm91dGVcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBvcHRpb24gPSBnZXRWYXIoJ2RuLmp4bV9vcHRpb24nLCfpgInmi6knKTtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAob3B0aW9uKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICflr7zlh7onOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbm93SnhDb2RlID0gYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBzaGFyZVBhc3RlKG5vd0p4Q29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gJ+mtlOaWreino+aekOmFjee9rkAnK25vd0p4Lm5hbWUrJ0AnK3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWvvOWHuuS4uuS6keWPo+S7pOW5tuWkjeWItuWIsOWJquWIh+advydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfkv67mlLknOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpZihub3dKeC5uYW1lPT09TXlKaWV4aS5ub3cpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgcmV0dXJuICd0b2FzdDovL+atpOino+aekOmFjee9ruW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOS/ruaUuSEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL2p4RWRpdD9ydWxlPU15RmllbGThtLDigb8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvanhFZGl0P3J1bGU9TXlGaWVsZOG0sOKBvydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfliKDpmaQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu6K6k5Yig6Zmk6Kej5p6Q6YWN572uOicrbm93SngubmFtZSsnPycpLmNvbmZpcm0oKG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG5vd0p4Lm5hbWU9PT1NeUppZXhpLm5vdyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOino+aekOmFjee9ruW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOWIoOmZpCEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpcy5zcGxpY2UoaSwxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliKDpmaQnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkubm93PW5vd0p4Lm5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g6YCJ5oup5LqGJytub3dKeC5uYW1lKyfkvZzkuLrlvZPliY3op6PmnpDphY3nva4nO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgIH1cXG4kLmV4cG9ydHMuanhNYW5hZ2U9anhNYW5hZ2U7XCJ9LHtcIm5hbWVcIjpcIuino+aekOe8lui+kVwiLFwicGF0aFwiOlwianhFZGl0XCIsXCJydWxlXCI6XCJqczpcXG5sZXQge25vd0p4LE15SmlleGksanhzUm91dGV9ID0gTVlfUEFSQU1TO1xcbmxldCBub3dKeFQgPSBKU09OLnBhcnNlKGdldFZhcignZG4ubm93SngnKXx8J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d0p4KS5maWx0ZXIoaXQ9Pml0IT09J25hbWUnJiZpdCE9PSdvdGgnKTtcXG5sZXQgZmxhZ3MgPSBPYmplY3Qua2V5cyh0aXRsZU9yZGVyKTtcXG5sZXQgamRzID0gT2JqZWN0LmtleXMobm93SngpLmZpbHRlcihpdD0+aXQhPT0nbmFtZScmJmZsYWdzLmluY2x1ZGVzKGl0KSk7XFxuLy9sb2coamRzKTtcXG5mb3IobGV0IGsgb2YgZmxhZ3Mpe1xcbiAgICBpZighamRzLmluY2x1ZGVzKGspKXtcXG4gICAgICAgIGpkcy5wdXNoKGspXFxuICAgIH1cXG59XFxuamRzID0gamRzLnNvcnQoY29tcGFyZU9kKHRpdGxlT3JkZXIpKTtcXG5mb3IobGV0IGogaW4gamRzKXtcXG4gICAgbGV0IGp4cyA9IG5vd0p4W2pkc1tqXV18fFtdO1xcbiAgICBsZXQgdGl0bGUgPSBqZHNbal07XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTp0aXRsZURpY1t0aXRsZV18fHRpdGxlLFxcbiAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeCk9PntcXG4gICAgICAgICAgICB2YXIganNvbj17dGl0bGU6W10sY29kZXM6e319O1xcbiAgICAgICAgICAgIGxldCBzZXRGaWxlID0gcmVxdWVzdCgnaGlrZXI6Ly9maWxlcy9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nKTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBldmFsKCdqc29uPScrc2V0RmlsZSk7XFxuICAgICAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIGxvZygnSnNvbuino+aekOWPkeeUn+S6humUmeivrzonK2UubWVzc2FnZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmKGdldFZhcignZG4uanhtX3dyaXRlTW9kZScsJ+aWsOWinicpPT09J+aWsOWinicpe1xcbiAgICAgICAgICAgICAgICBsZXQgc2VsX3RpdGxlID0gdGl0bGVzLmZpbHRlcihpdD0+IWp4cy5pbmNsdWRlcyhpdCkpO1xcbiAgICAgICAgICAgICAgICBzZWxfdGl0bGUgPSBzZWxfdGl0bGUubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBmbGFnID0gJ+KAmOKAmOKTiuKAmeKAmSc7XFxuICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YoanNvbi5jb2Rlc1tpdF0pPT09J2Z1bmN0aW9uJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZyA9ICfigJzigJzikr/igJ3igJ0nO1xcbiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYodHlwZW9mKGpzb24uY29kZXNbaXRdKT09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmbGFnID0gJyc7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmxhZytpdFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoc2VsX3RpdGxlLDIpLnNlbGVjdCgoTXlKaWV4aSxqeHMsbm93SngsdGl0bGUsanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICBpbnB1dCA9IGlucHV0LnJlcGxhY2UoL+KAmOKAmOKTiuKAmeKAmXzigJzigJzikr/igJ3igJ0vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaWQgPSBudWxsO1xcbiAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBqIGluIE15SmlleGkuamlleGlzKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihNeUppZXhpLmppZXhpc1tqXS5uYW1lID09PSBub3dKeC5uYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQgPSBqO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBpZighaWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ntKLlvJXplJnor6/ml6Dms5Xkv53lrZg6XFxcXG4nK2lkXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBqeHMucHVzaChpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICBsb2coanhzKTtcXG4gICAgICAgICAgICAgICAgICAgIG5vd0p4W3RpdGxlXSA9IGp4cztcXG4gICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXSA9IG5vd0p4O1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5ub3dKeCcsSlNPTi5zdHJpbmdpZnkobm93SngpKTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSxNeUppZXhpLGp4cyxub3dKeCx0aXRsZSxqeHNSb3V0ZSk7XFxuICAgICAgICAgICAgfWVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSx0aXRsZXMsdGl0bGUsanhzLGp4c1JvdXRlLE15SmlleGksbm93SngpXFxuICAgIH0pO1xcbiAgICBmb3IobGV0IGsgaW4ganhzKXtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6anhzW2tdLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgodGl0bGVzLHRpdGxlLGp4cyxqeHNSb3V0ZSxNeUppZXhpLG5vd0p4LG5qeCxpZCxrLG1heCk9PntcXG4gICAgICAgICAgICAgICAgc3dpdGNoIChnZXRWYXIoJ2RuLmp4bV93cml0ZU1vZGUnLCfmlrDlop4nKSl7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICfliKDpmaQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIEFycmF5LnByb3RvdHlwZS5yZW1vdmUgPSBmdW5jdGlvbih2YWwpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGluZGV4ID0gdGhpcy5pbmRleE9mKHZhbCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA+IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNwbGljZShpbmRleCwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGp4cy5yZW1vdmUobmp4KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBub3dKeFt0aXRsZV0gPSBqeHM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdID0gbm93Sng7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5ub3dKeCcsSlNPTi5zdHJpbmdpZnkobm93SngpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ+enu+WKqCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoaywn56e75Yqo5Yiw57Si5byV5aSa5bCRPycpLmlucHV0KChrLG1heCxqeHMsbm93SngsTXlKaWV4aSxpZCx0aXRsZSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gTW92ZShhcnIsIGZyb21JbmRleCwgdG9JbmRleCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVsZW1lbnQgPSBhcnJbZnJvbUluZGV4XTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyci5zcGxpY2UoZnJvbUluZGV4LCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyci5zcGxpY2UodG9JbmRleCwgMCwgZWxlbWVudCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGFyc2VJbnQoaW5wdXQpPT09ayl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ZWl5Lmf5rKh5YGaJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihwYXJzZUludChpbnB1dCk+bWF4LTF8fHBhcnNlSW50KGlucHV0KTwtMSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g5pyA5aSn56e75Yqo6IyD5Zu0MC0nK3BhcnNlSW50KG1heC0xKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsZXQgbmV3QXIgPSBqeHMuc3BsaWNlKGssIDEpOyAvLyDliKDmjolcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8ganhzLnVuc2hpZnQobmV3QXJbMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNb3ZlKGp4cyxrLHBhcnNlSW50KGlucHV0KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vd0p4W3RpdGxlXSA9IGp4cztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdID0gbm93Sng7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4ubm93SngnLEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxrLG1heCxqeHMsbm93SngsTXlKaWV4aSxpZCx0aXRsZSxqeHNSb3V0ZSlcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOWFg+e0oOS4jeaUr+aMgei/m+ihjDonK2dldFZhcignZG4uanhtX3dyaXRlTW9kZScsJ+aWsOWinicpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeCxqeHNba10saWQsayxqeHMubGVuZ3RoKVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIC8vIGNvbF90eXBlOidsaW5lJyxcXG4gICAgICAgIGNvbF90eXBlOidibGFua19ibG9jaydcXG4gIC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XdPbmxpbmUpXFxufSk7XFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6c21hbGwoJ+aWreaPkuino+aekOiHquWKqOaho+aooeW8j+aYr+S7gOS5iD8nKStjb2xvcign5LiN55+l6YGTLOadpeS4gOS7vemBk+mVv+eahCcsJyM1RkI4NzgnKSxcXG4gICAgZGVzYzon6Ieq5Yqo5ouJ5Y+W6YGT6ZW/5Zyo55So55qETXlKaWV4aS5qc29u5paH5Lu2JyxcXG4gICAgY29sX3R5cGU6J3RleHRfMScsXFxuICAgIHVybDokKCfnoa7orqTlkJc/5aaC5p6c5L2g5LiN5piv5bCP55m977yM5oC76K+l5Lya5o+Q5YmN5aSH5Lu96Ieq5bex55qE6Ieq5Yqo5qGj5pa55qGI5ZCnIVxcXFxuJytqeHNSb3V0ZSkuY29uZmlybSgoanhzUm91dGUsanhPbmxpbmUpPT57XFxuICAgICAgICBsZXQganhDb2RlID0gZmV0Y2goanhPbmxpbmUpO1xcbiAgICAgICAgaWYoIS9qaWV4aXMvLnRlc3QoanhDb2RlKSl7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+Wksei0pSHkuI7pgZPplb/mnI3liqHlmajpgJrorq/plJnor68s5Lyw6K6h5piv572R57uc5Y2h5LqGJ1xcbiAgICAgICAgfVxcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsIGp4Q29kZSk7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWreaPkuino+aekOmFjee9ruWPium7mOiupOWIl+ihqOW3sue7j+mFjee9ruaIkOWKnydcXG4gICAgICAgIH1cXG4gICAgICAgIGNhdGNoKGUpe1xcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/oh6rliqjmoaPlupTnlKjlpLHotKVcXFxcbuacquacn+acm+eahOmUmeivrzonK2UubWVzc2FnZTtcXG4gICAgICAgIH1cXG4gICAgfSxqeHNSb3V0ZSxqeE9ubGluZSlcXG59K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xcbiAgICAgICAgICAgIC8vIGxvZygnanhDb2RlOicranhDb2RlKTtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5aSx6LSlIeS4jumBk+mVv+acjeWKoeWZqOmAmuiur+mUmeivryzkvLDorqHmmK/nvZHnu5zljaHkuoYnXFxuICAgICAgICB9XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHdyaXRlRmlsZShjamNhY2hlLCBjakZpbGUpOyAvLyDmi4nmj5Lku7ZcXG4gICAgICAgICAgICB3cml0ZUZpbGUoeDVjYWNoZSwgeDVGaWxlKTsgLy/mi4nnvZHpobXmlofku7ZcXG4gICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSwgdGhlbWVDb2RlKTsgLy/mi4nkuLvpopjmlofku7ZcXG4gICAgICAgICAgICBjbGVhclZhcihcXFwianhPbGRWXFxcIik7XFxuICAgICAgICAgICAgY2xlYXJWYXIoXFxcImp4TmV3VlxcXCIpO1xcbiAgICAgICAgICAgIHdyaXRlRmlsZShvbGRSb3V0ZSwgb2xkQ29kZSk7IC8v5ouJ5pat5o+S6buY6K6k6YCJ5oup55WM6Z2i55qE6YWN572uXFxuICAgICAgICAgICAgd3JpdGVGaWxlKG5ld1JvdXRlLCBuZXdDb2RlKTsgLy/mi4nmlq3mj5LlhoXnmoTop6PmnpBcXG4gICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsIGp4Q29kZSk7IC8vIOaLieiHquWKqOaho+aWh+S7tlxcbiAgICAgICAgICAgIGlmKGRtQ29kZSYmL21wNHxtM3U4Ly50ZXN0KGRtQ29kZSkpIHsvL+mqjOivgeWQiuavm+aWh+S7tuWQiOazleaAp1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoZG1QYXRoLCBkbUNvZGUpOyAvLyDmi4nlkIrmr5vov4fmu6Tmlofku7ZcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgYmFjayh0cnVlKTtcXG4gICAgICAgICAgICByZX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AgICAgICAgICAgICAgICAgICAgbG9nKCfljIXlkKs6JytpdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEuc3BsaWNlKGRhdGEuaW5kZXhPZihpdCksMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucHVzaChpdClcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ2p4X3NlbGVjdGVkJywgZGF0YSlcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdqeF9zZWxlY3RlZCcsIFtpdF0pXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBpZihzdG9yYWdlMC5nZXRNeVZhcignanhfc2VsZWN0ZWQnKS5pbmNsdWRlcyhpdCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oaXQse1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTpjb2xvcihpdCwnIzEyYjY2OCcpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oaXQse1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTppdFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0saXQsY29sb3IpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTondGV4dF8zJyxcXG4gICAgICAgICAgICAgICAgZXh0cmE6e1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6aXRcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGV0IG9wPVtdO1xcbiAgICAgICAgb3AucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+WFqOmAiScsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGp4cyxjb2xvcik9PntcXG4gICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ2p4X3NlbGVjdGVkJywganhzKTtcXG4gICAgICAgICAgICAgICAganhzLmZvckVhY2goaXQ9PntcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe3RpdGxlOiBjb2xvcihpdCwnIzEyYjY2OCcpLCBleHRyYToge2lkOiBpdH19KTtcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LGp4cyxjb2xvciksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nXFxuICAgICAgICB9KTtcXG4gICAgICAgIG9wLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiflhajkuI3pgIknLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChqeHMpPT57XFxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdqeF9zZWxlY3RlZCcsIFtdKTtcXG4gICAgICAgICAgICAgICAganhzLmZvckVhY2goaXQ9PntcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe3RpdGxlOiBpdCwgZXh0cmE6IHtpZDogaXR9fSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSxqeHMpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICBvcC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5Y+N6YCJJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoanhzLGNvbG9yKT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgb2xkU2VsID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ2p4X3NlbGVjdGVkJywgW10pO1xcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXREaWZmZXJlbnREYXRhKGFyckEsIGFyckIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBhcnJBLmNvbmNhdChhcnJCKS5maWx0ZXIoZnVuY3Rpb24gKHYsIGksIGFycikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBhcnIuaW5kZXhPZih2KSA9PT0gYXJyLmxhc3RJbmRleE9mKHYpO1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbGV0IG5ld1NlbCA9IGdldERpZmZlcmVudERhdGEoanhzLG9sZFNlbCk7XFxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdqeF9zZWxlY3RlZCcsIG5ld1NlbCk7XFxuICAgICAgICAgICAgICAgIG9sZFNlbC5mb3JFYWNoKGl0PT57XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHt0aXRsZTogaXQsIGV4dHJhOiB7aWQ6IGl0fX0pO1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgbmV3U2VsLmZvckVhY2goaXQ9PntcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe3RpdGxlOiBjb2xvcihpdCwnIzEyYjY2OCcpLCBleHRyYToge2lkOiBpdH19KTtcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LGp4cyxjb2xvciksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nXFxuICAgICAgICB9KTtcXG4gICAgICAgIG9wLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOifliKDpmaQnLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgIGxldCBzZWwgPSBzdG9yYWdlMC5nZXRNeVZhcignanhfc2VsZWN0ZWQnLCBbXSk7XFxuICAgICAgICAgICAgICAgIGlmKHNlbC5sZW5ndGggPCAxKXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/llaXpg73msqHpgInvvIzliKDpmaTkuKrpuKHmr5t+J1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7orqTliKDpmaTlt7LpgInmi6nnmoQ6JytzZWxbMF0rJ+etiScrc2VsLmxlbmd0aCsn5p2h6Kej5p6QPycpLmNvbmZpcm0oKHNlbCk9PntcXG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgICAgICAgICAgICAgIGZvcihsZXQgbmFtZSBpbiBzZWwpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqc29uLmNvZGVzLmhhc093blByb3BlcnR5KG5hbWUpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBqc29uLmNvZGVzW25hbWVdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGpzb24udGl0bGUgPSBqc29uLnRpdGxlLmZpbHRlcihpdD0+IXNlbC5pbmNsdWRlcyhpdCkpOyAvLyDnrZvpgInmsqHmnInooqvliKDpmaTnmoTmoIfpophcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcignanhfc2VsZWN0ZWQnLCBbXSk7Ly/liKDpmaTlrozkuobmuIXnqbrpgInkuK3pobnnm65cXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LlsIbjgJZcXFwiICsgc2VsWzBdICsgXFxcIuOAl+etiVxcXCIrc2VsLmxlbmd0aCtcXFwi5p2h6Kej5p6Q5Yig6ZmkXFxcIjtcXG4gICAgICAgICAgICAgICAgfSxzZWwpXFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nXFxuICAgICAgICB9KTtcXG4gICAgICAgIG9wLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOifmk43kvZx8562b6YCJICcrY29sb3IoanhzLmxlbmd0aCwnI2ZmNzAwMCcpLFxcbiAgICAgICAgICAgIHVybDondG9hc3Q6Ly/liY3pnaLmjInpkq7mmK/mk43kvZzvvIzlkI7pnaLmjInpkq7mmK/nrZvpgIknLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICBvcC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpkeF9maWx0ZXI9PT0n5YWo6YOoJz9jb2xvcign5YWo6YOoJywnIzEyYjY2OCcpOiflhajpg6gnLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2R4X2ZpbHRlcicsJ+WFqOmDqCcpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pO1xcbiAgICAgICAgb3AucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ZHhfZmlsdGVyPT09J+W3sumAiSc/Y29sb3IoJ+W3sumAiScsJyMxMmI2NjgnKTon5bey6YCJJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKT0+e1xcbiAgICAgICAgICAgICAgICBzZXRJdGVtKCdkeF9maWx0ZXInLCflt7LpgIknKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nXFxuICAgICAgICB9KTtcXG4gICAgICAgIG9wLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOmR4X2ZpbHRlcj09PSfmnKrpgIknP2NvbG9yKCfmnKrpgIknLCcjMTJiNjY4Jyk6J+acqumAiScsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCk9PntcXG4gICAgICAgICAgICAgICAgc2V0SXRlbSgnZHhfZmlsdGVyJywn5pyq6YCJJyk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAg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Oivt+WFiOWcqOS4i+aWuemAieS4gOS4quaOpeWPo+WGjei/m+ihjOa1i+ivlSdcXG4gICAgICAgIH1cXG4gICAgICAgIHZhciBjb3VudCA9IGpzb24ubGVuZ3RoOyAvL+iuvue9ruS7u+WKoeaVsOmHj1xcbiAgICAgICAgbG9nKCfprZTmlq3lvIDlkK/lpJrku7vliqHop6PmnpAs5Lu75Yqh5pWw6YePOicrY291bnQpO1xcbiAgICAgICAgdmFyIHRhc2sgPSBmdW5jdGlvbihvYmopIHtcXG4gICAgICAgICAgICBldmFsKCd2YXIgY29uZmlnX2RwID0nICsgZmV0Y2goZ2V0VmFyKCdvbGRDb25maWcnKSkpO1xcbiAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnX2RwLmNqKSk7XFxuICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZShvYmoudmlwVXJsLG9iai5uYW1lLG9iai50aW1lb3V0KTtcXG4gICAgICAgIH07XFxuICAgICAgICB2YXIgcGFyc2VSZXQgPSBbXTsgLy/op6PmnpDnu5PmnpzliJfooahcXG4gICAgICAgIGxldCB0YXNrcyA9IGpzb24ubWFwKChpdCxpZGV4KT0+e1xcbiAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgIGZ1bmM6IHRhc2ssXFxuICAgICAgICAgICAgICAgIHBhcmFtOiB7XFxuICAgICAgICAgICAgICAgICAgICAvL25hbWU6aXQudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBuYW1lOm5vd1BhcnNlLFxcbiAgICAgICAgICAgICAgICAgICAgdHlwZTppdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIC8vIHJ1bGU6aXQucnVsZSxcXG4gICAgICAgICAgICAgICAgICAgIHZpcFVybDogaXQudXJsLFxcbiAgICAgICAgICAgICAgICAgICAgdGltZW91dDogdGltZW91dFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBpZDogXFxcInRhc2tcXFwiK2lkZXhcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIHNob3dMb2FkaW5nKFxcXCLprZTmlq3lubblj5Hop6PmnpDkuK3vvIzliankvZnlvoXmtYs6XFxcIitjb3VudCk7XFxuICAgICAgICBiZSh0YXNrcyx7XFxuICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24ob2JqLCBpZCwgZXJyb3IscmV0KSB7XFxuICAgICAgICAgICAgICAgIGxvZyhcXFwi55uR5ZCs5Yiw5Lu75YqhXFxcIiArIGlkKyflt7Lnu5PmnZ8sZXJyb3I6JytlcnJvcisnLHJldDonK3JldCk7XFxuICAgICAgICAgICAgICAgIHJldCA9IHJldHx8Jyc7XFxuICAgICAgICAgICAgICAgIGVycm9yPWVycm9yfHwnJztcXG4gICAgICAgICAgICAgICAgcGFyc2VSZXQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0YXNrOmlkLFxcbiAgICAgICAgICAgICAgICAgICAgcmV0OnJldCxcXG4gICAgICAgICAgICAgICAgICAgIGVycm9yOmVycm9yLFxcbiAgICAgICAgICAgICAgICAgICAgbmFtZTp0YXNrcy5maWx0ZXIoaXQ9Pml0LmlkPT09aWQpWzBdLnBhcmFtLnR5cGVcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGNvdW50IC09IDE7IC8v5a6M5oiQ5LqG5Lu75Yqh77yM5Lu75Yqh5pWw6YePLTFcXG4gICAgICAgICAgICAgICAgLy9sb2cob2JqKTtcXG4gICAgICAgICAgICAgICAgaWYgKGNvdW50ID4gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcIumtlOaWreW5tuWPkeino+aekOS4re+8jOWJqeS9meW+hea1izpcXFwiICsgY291bnQpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBoaWRlTG9hZGluZygpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSxcXG4g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gICAgICAgICAgICAgICB0aXRsZTon5pi+56S65qih5byPOicrY29sb3Ioc2hvd19tb2RlLCcjZmE4YzM1JyksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGNvbG9yLGNudCk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBzaG93X21vZGUgPSBnZXRJdGVtKCdzaG93X21vZGUnLCfor6bnu4YnKTtcXG4gICAgICAgICAgICAgICAgICAgIHNob3dfbW9kZSA9IHNob3dfbW9kZT09PSfor6bnu4YnPyfnsr7nroAnOifor6bnu4YnO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnc2hvd19tb2RlJyxzaG93X21vZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSgnc2hvd19tb2RlJyx7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6J+aYvuekuuaooeW8jzonK2NvbG9yKHNob3dfbW9kZSwnI2ZhOGMzNScpXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2xfdHlwZSA9IHNob3dfbW9kZT09PSfor6bnu4YnPyd0ZXh0XzEnOid0ZXh0XzMnO1xcbiAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpPTA7aTxjbnQ7aSsrKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKCdzaG93X3JldF8nK2kse1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTpjb2xfdHlwZVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LGNvbG9yLHBhcnNlUmV0Lmxlbmd0aCksXFxuICAgICAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgICAgIGlkOidzaG93X21vZGUnXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBwYXJzZVJldC5mb3JFYWNoKChpdCxpZHgpPT57XFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZT1pdC5uYW1lO1xcbiAgICAgICAgICAgICAgICBpZihpdC5yZXQmJiFpdC5yZXQuaW5jbHVkZXMoJ3VuZGVmaW5lZCcpJiYoLyNpc1ZpZGVvPXRydWUjLy50ZXN0KGl0LnJldCl8fGlzVmlkZW8oaXQucmV0KSkpe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU9Y29sb3IodGl0bGUsJyMxMmI2NjgnKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGxldCBkZXNjPShpdC5yZXR8fGl0LmVycm9yKS5zdWJzdHIoMCw2MCk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTp0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6c21hbGwoZGVzYyksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTpjb2xfdHlwZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDppdC5yZXQsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYTp7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0Oml0LnJldHx8aXQuZXJyb3IsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6J3Nob3dfcmV0XycraWR4XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgIH0scGFyc2VSZXQpXFxuICAgIH0sanNvbixub3dQYXJzZSx0aW1lb3V0LHNvcnRCeUtleSksXFxu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ByZXR1cm4gJ3RvYXN0Oi8v5bey6YCJ5o6l5Y+jJytpcHQ7XFxuICAgICAgICAgICAgfSx0aXRsZSkgLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pO1xcbiAgICB9XFxufVxcbmxldCB0YWc9Jyc7XFxuZm9yIChsZXQgaSBpbiBqc29uKSB7XFxuICAgIGxldCB0aXRsZSA9IGpzb25baV0udGl0bGU7XFxuICAgIGxldCB6dXJsPWpzb25baV0udXJsO1xcbiAgICBsZXQgenBpYyA9IGpzb25baV0ucGljX3VybDtcXG4gICAgaWYoZ2V0TXlWYXIoJ3pkeScpID09PSB6dXJsKXtcXG4gICAgICAgIHRhZz10aXRsZTtcXG4gICAgICAgIHRpdGxlPSfim7MnK3RpdGxlO1xcbiAgICB9XFxuICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgdGl0bGU6dGl0bGUsXFxuICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHp1cmwsbm93UGFyc2UsdGltZW91dCx2aXBPYmopID0+IHtcXG4gICAgICAgICAgICBpZihnZXRNeVZhcignemR5JykhPT16dXJsKXtcXG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3pkeScsIHp1cmwpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBkeF9tb2RlID0gZ2V0SXRlbSgn54K56YCJJywn5Y2V5rWLJyk7Ly/ngrnpgInmqKHlvI9cXG4gICAgICAgICAgICBpZihkeF9tb2RlPT09J+WNlea1iycpe1xcbiAgICAgICAgICAgICAgICBzaG93TG9hZGluZygn6a2U5pat5Yqo5oCB6Kej5p6Q5LitLOivt+eojeetiS4uLicpO1xcbiAgICAgICAgICAgICAgICBldmFsKCd2YXIgY29uZmlnX2RwID0nICsgZmV0Y2goZ2V0VmFyKCdvbGRDb25maWcnKSkpO1xcbiAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZ19kcC5jaikpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHp1cmwsbm93UGFyc2UsdGltZW91dCk7XFxuICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgIGxldCBkYXRhID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ2p4X3NlbGVjdGVkJyl8fFtdO1xcbiAgICAgICAgICAgICAgICBpZihkYXRhLmxlbmd0aD4zMil7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn5L2g5omA6YCJ5oup5b6F5rWL6K+V55qE6Kej5p6Q5pWw5YWx6K6hOicrZGF0YS5sZW5ndGgrJ+S4qu+8jOi2heWHuuS6huaOqOiNkOacgOWkp+aVsDMyLOaAp+iDveWPr+iDveaegeW3rizmmK/lkKbnu6fnu60/JykuY29uZmlybSgoZGF0YSx2aXBPYmosdGltZW91dCk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB7dGVzdF9yZXBvcnR9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvdGVzdF9yZXBvcnQnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGVzdF9yZXBvcnQoZGF0YSx2aXBPYmosdGltZW91dClcXG4gICAgICAgICAgICAgICAgICAgIH0sZGF0YSx2aXBPYmosdGltZW91dClcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICBjb25zdCB7dGVzdF9yZXBvcnR9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvdGVzdF9yZXBvcnQnKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0ZXN0X3JlcG9ydChkYXRhLHZpcE9iaix0aW1lb3V0KVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSx6dXJsLG5vd1BhcnNlLHRpbWVv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9ruS7u+WKoeaVsOmHj1xcbiAgICBsb2coJ+mtlOaWreW8gOWQr+WkmuS7u+WKoeino+aekCzku7vliqHmlbDph486Jytjb3VudCk7XFxuICAgIHZhciB0YXNrID0gZnVuY3Rpb24ob2JqKSB7XFxuICAgICAgICBldmFsKCd2YXIgY29uZmlnX2RwID0nICsgZmV0Y2goZ2V0VmFyKCdvbGRDb25maWcnKSkpO1xcbiAgICAgICAgZXZhbChmZXRjaChjb25maWdfZHAuY2opKTtcXG4gICAgICAgIHJldHVybiBheXRtUGFyc2UodmlwVXJsLG9iai5uYW1lLHRpbWVvdXQpO1xcbiAgICB9O1xcbiAgICB2YXIgcGFyc2VSZXQgPSBbXTsgLy/op6PmnpDnu5PmnpzliJfooahcXG4gICAgbGV0IHRhc2tzID0ganhzLm1hcCgoaXQsaWRleCk9PntcXG4gICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgZnVuYzogdGFzayxcXG4gICAgICAgICAgICBwYXJhbToge1xcbiAgICAgICAgICAgICAgICBuYW1lOml0LFxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgaWQ6IFxcXCJ0YXNrXFxcIitpZGV4XFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICBzaG93TG9hZGluZyhcXFwi6a2U5pat5bm25Y+R6Kej5p6Q5Lit77yM5Ymp5L2Z5b6F5rWLOlxcXCIrY291bnQpO1xcbiAgICBiZSh0YXNrcyx7XFxuICAgICAgICBmdW5jOiBmdW5jdGlvbihvYmosIGlkLCBlcnJvcixyZXQpIHtcXG4gICAgICAgICAgICBsb2coXFxcIuebkeWQrOWIsOS7u+WKoVxcXCIgKyBpZCsn5bey57uT5p2fLGVycm9yOicrZXJyb3IrJyxyZXQ6JytyZXQpO1xcbiAgICAgICAgICAgIHJldCA9IHJldHx8Jyc7XFxuICAgICAgICAgICAgZXJyb3I9ZXJyb3J8fCcnO1xcbiAgICAgICAgICAgIHBhcnNlUmV0LnB1c2goe1xcbiAgICAgICAgICAgICAgICB0YXNrOmlkLFxcbiAgICAgICAgICAgICAgICByZXQ6cmV0LFxcbiAgICAgICAgICAgICAgICBlcnJvcjplcnJvcixcXG4gICAgICAgICAgICAgICAgbmFtZTp0YXNrcy5maWx0ZXIoaXQ9Pml0LmlkPT09aWQpWzBdLnBhcmFtLm5hbWVcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBjb3VudCAtPSAxOyAvL+WujOaIkOS6huS7u+WKoe+8jOS7u+WKoeaVsOmHjy0xXFxuICAgICAgICAgICAgLy9sb2cob2JqKTtcXG4gICAgICAgICAgICBpZiAoY291bnQgPiAwKSB7XFxuICAgICAgICAgICAgICAgIHNob3dMb2FkaW5nKFxcXCLprZTmlq3lubblj5Hop6PmnpDkuK3vvIzliankvZnlvoXmtYs6XFxcIiArIGNvdW50KVxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIHBhcmFtOiB7Ly/kvKDliLDnm5HlkKzlh73mlbDnmoRvYmrlj4LmlbDph4xcXG4gICAgICAgICAgICBoaTogXFxcImNjY1xcXCIsXFxuICAgICAgICB9XFxuICAgIH0pOy8v5omn6KGM5aSa5Lu75YqhXFxuICAgIC8vbG9nKFxcXCLlpJrku7vliqHmiafooYznu5PmnpzmlbA6XFxcIitwYXJzZVJldC5sZW5ndGgpO1xcbiAgICBwYXJzZVJldD1zb3J0QnlLZXkocGFyc2VSZXQsJ3Rhc2snLHRydWUpOy8v5Y2H5bqP5o6S5YiXXFxuICAgIC8vIGxvZyhwYXJzZVJldC5tYXAoaXQ9Pml0LnRhc2spKTtcXG4gICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5IyNub0hpc3RvcnkjJykucnVsZSgodmlwTmFtZSxwYXJzZVJldCk9PiB7XFxuICAgICAgICBzZXRQYWdlVGl0bGUodmlwTmFtZSArICfop6PmnpDmiqXlkYonKTtcXG4gICAgICAgIGNvbnN0IHtpc1ZpZGVvfSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2dsb2JhbFBhcnNlP3J1bGU96YGT6ZW/5LuT5bqTUHJvJyk7XFxuICAgICAgICBjb25zdCB7Y29sb3IsIHNtYWxsfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3V0aWxpeT9ydWxlPemBk+mVv+S7k+W6k1Byb1xcXCIpO1xcbiAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgIGxldCBzaG93X21vZGUgPSBnZXRJdGVtKCdzaG93X21vZGUnLCAn6K+m57uGJyk7XFxuICAgICAgICBsZXQgY29sX3R5cGUgPSBzaG93X21vZGUgPT09ICfor6bnu4YnID8gJ3RleHRfMScgOiAndGV4dF8zJztcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfmmL7npLrmqKHlvI86JyArIGNvbG9yKHNob3dfbW9kZSwgJyNmYThjMzUnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoY29sb3IsIGNudCkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgc2hvd19tb2RlID0gZ2V0SXRlbSgnc2hvd19tb2RlJywgJ+ivpue7hicpO1xcbiAgICAgICAgICAgICAgICBzaG93X21vZGUgPSBzaG93X21vZGUgPT09ICfor6bnu4YnID8gJ+eyvueugCcgOiAn6K+m57uGJztcXG4gICAgICAgICAgICAgICAgc2V0SXRlbSgnc2hvd19tb2RlJywgc2hvd19tb2RlKTtcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbSgnc2hvd19tb2RlJywge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmmL7npLrmqKHlvI86JyArIGNvbG9yKHNob3dfbW9kZSwgJyNmYThjMzUnKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgbGV0IGNvbF90eXBlID0gc2hvd19tb2RlID09PSAn6K+m57uGJyA/ICd0ZXh0XzEnIDogJ3RleHRfMyc7XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY250OyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3Nob3dfcmV0XycgKyBpLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGNvbF90eXBlXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgY29sb3IsIHBhcnNlUmV0Lmxlbmd0aCksXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6ICdzaG93X21vZGUnXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBwYXJzZVJldC5mb3JFYWNoKChpdCwgaWR4KSA9PiB7XFxuICAgICAgICAgICAgbGV0IHRpdGxlID0gaXQubmFtZTtcXG4gICAgICAgICAgICBpZiAoaXQucmV0ICYmICFpdC5yZXQuaW5jbHVkZXMoJ3VuZGVmaW5lZCcpICYmICgvI2lzVmlkZW89dHJ1ZSMvLnRlc3QoaXQucmV0KSB8fCBpc1ZpZGVvKGl0LnJldCkpKSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlID0gY29sb3IodGl0bGUsICcjMTJiNjY4JylcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IGRlc2MgPSAoaXQucmV0IHx8IGl0LmVycm9yKS5zdWJzdHIoMCwgNjApO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgZGVzYzogc21hbGwoZGVzYyksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBjb2xfdHlwZSxcXG4gICAgICAgICAgICAgICAgdXJsOiBpdC5yZXQsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICByZXQ6IGl0LnJldCB8fCBpdC5lcnJvcixcXG4gICAgICAgICAgICAgICAgICAgIGlkOiAnc2hvd19yZXRfJyArIGlkeFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9KTtcXG4gICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgfSx2aXBOYW1lLHBhcnNlUmV0KVxcbn1cXG5cXG4kLmV4cG9ydHMuc29ydEJ5S2V5PXNvcnRCeUtleTtcXG4kLmV4cG9ydHMudGVzdF9yZXBvcnQ9dGVzdF9yZXBvcnQ7XCJ9XSIsImljb24iOiJodHRwczovL2xhbm1laWd1b2ppYW5nLmNvbS90dWJpYW8vbW92aWUvNC5zdmciLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment