Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@MyFieldᴰⁿ@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiTXlGaWVsZOG0sOKBvyIsImF1dGhvciI6IuaWreW/tSbpgZPplb/prZTmlLkiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IiwidmVyc2lvbiI6NDI5LCJjb2xfdHlwZSI6InRleHRfY2VudGVyXzEiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InRvb2wiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoi5bel5YW3IiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbi8vbG9nKE1PQklMRV9VQSk7XG4gICAgY29uc3Qge2RlbW9EYXRhLGRlZmF1bHRTZXRzLGZsb29yc30gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvZGVtb0RhdGE/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xuY29uc3Qge2dldE9uZSx1bmlxdWUyLGR1cGxpY2F0ZXN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL3V0aWxzP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbmxldCBzalRlc3QgPVtdO2ZvcihsZXQgaSBpbiBkZW1vRGF0YSl7c2pUZXN0PXNqVGVzdC5jb25jYXQoZGVtb0RhdGFbaV0pfVxudGhpcy5kID0gW107XG5jb25zdCBqeEl0ZW0gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvanhJdGVtP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbnZhciBSb3V0ZSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9Sb3V0ZT9ydWxlPU15RmllbGThtLDigb9cIik7XG5ldmFsK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WQwXCIsIFwiJiZcIikuc3BsaXQoXCImJlwiKVswXS5yZXBsYWNlKC/wn5GJL2csJycpO1xuICAgICAgICAgICAgbG9nKCd0aXRsZTonK3RpdGxlKTtcbiAgICAgICAgICAgIGlmKGdldEl0ZW0oJ2RuLnRlc3RfbW9kZScpPT09J+aWreaPkicmJiEvXuS4jemAiSR8XumtlOaWrSQvLnRlc3QodGl0bGUpKXtcbiAgICAgICAgICAgICAgICBldmFsKFwidmFyIGNvbmZpZyA9XCIgKyByZXF1ZXN0KFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cIikpO1xuICAgICAgICAgICAgICAgIGV2YWwocmVxdWVzdChjb25maWcuY2opKTtcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBnZXRJdGVtKFwic2VsZWN0ZWQwXCIsIFwiJiZcIikuc3BsaXQoXCImJlwiKVswXS5yZXBsYWNlKC/wn5GJL2csJycpLnJlcGxhY2UoL+S4jemAiS9nLCcnKTtcbiAgICAgICAgICAgICAgICBsb2coJ+W8gOWni+iwg+eUqOaWreaPkua1i+ivlSxteUZpbGVk6LaF5pe25Li6OicrZ2V0SXRlbSgnZG4udGltZW91dCcsJzUwMDAnKSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZSh1cmwsdGl0bGUscGFyc2VJbnQoZ2V0SXRlbSgnZG4udGltZW91dCcsJzUwMDAnKSkpO1xuICAgICAgICAgICAgfWVsc2UgaWYoZ2V0SXRlbSgnZG4udGVzdF9tb2RlJyk9PT0n5pat5o+SJyYmL17prZTmlq0kLy50ZXN0KHRpdGxlKSl7XG4gICAgICAgICAgICAgICAgZXZhbChcInZhciBjb25maWcgPVwiICsgcmVxdWVzdChcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXCIpKTtcbiAgICAgICAgICAgICAgICBldmFsKHJlcXVlc3QoY29uZmlnLmNqKSk7XG4gICAgICAgICAgICAgICAg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ICAgICAgICAgICAgICAgIGxldCBpID0gdGl0bGVBcnIuaW5kZXhPZihpdCk7XG4gICAgICAgICAgICAgICAgbGV0IGNvZGUgPSB1cmxBcnJbaV18fCcnO1xuICAgICAgICAgICAgICAgIGxldCBvdXRDb2RlID0gKHR5cGVvZihjb2RlKT09PSdzdHJpbmcnKT9jb2RlLnRyaW0oKTpiYXNlNjRFbmNvZGUoY29kZS50b1N0cmluZygpLnRyaW0oKSk7XG4gICAgICAgICAgICAgICAgbGV0IG91dFRpdGxlID0gaXQucmVwbGFjZSgv8J+RiS9nLCcnKTtcbiAgICAgICAgICAgICAgICBpZihvdXRUaXRsZS5zdGFydHNXaXRoKCdodHRwJykmJih0eXBlb2Yob3V0Q29kZSk9PT0ndW5kZWZpbmVkJ3x8IW91dENvZGUpKXtcbiAgICAgICAgICAgICAgICAgICAganhDb2RlLnB1c2gob3V0VGl0bGUrJywnK291dFRpdGxlKTtcbiAgICAgICAgICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgICAgICAgICAganhDb2RlLnB1c2gob3V0VGl0bGUrJywnK291dENvZGV8fCcnKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgbGV0IG91dFRleHQgPSBqeENvZGUuam9pbignXFxuJyk7XG4gICAgICAgICAgICBsZXQgb3V0UGF0aCA9ICdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2VPdXRfJyttb2RlKycudHh0JztcbiAgICAgICAgICAgIHdyaXRlRmlsZShvdXRQYXRoLG91dFRleHQpO1xuICAgICAgICAgICAgbGV0IHBhc3RlcyA9IGdldFBhc3RlcygpO1xuICAgICAgICAgICAgbGV0IGltcG9ydFVybCA9IHNoYXJlUGFzdGUoYmFzZTY0RW5jb2RlKG91dFRleHQpLHBhc3Rlc1sxXSk7XG4gICAgICAgICAgICBsZXQgaW1wb3J0Q29kZSA9ICfprZTmlq3op6PmnpDlr7zlhaXlj6Pku6TCpcKlJytpbXBvcnRVcmw7XG4gICAgICAgICAgICBjb3B5KGltcG9ydENvZGUpO1xuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWh+S7tuW3suWvvOWHuuWIsDonK291dFBhdGgrJ1xcbuivt+iHquihjOmAmui/h01U566h55CG5Zmo5p+l55yLJ1xuICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/miJHkuI3muIXmpZrkvaDopoHlgZrku4DkuYg/XFxuJyttb2RlO1xuICAgICAgICB9XG4gICAgfSx0aXRsZUFycix1cmxBcnIpLFxufSk7XG5kLnB1c2goe1xuICAgIHRpdGxlOifwn5Ol5a+85YWlVFhUJyxcbiAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXG4gICAgdXJsOiQoKS5ydWxlKCgpPT57XG4gICAgICAgIGxldCBkID0gW107XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTon5a+85YWl6K+05piOJyxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzEnLFxuICAgICAgICAgICAgZGVzYzon5pSv5oyB5q2k5o+S5Lu25a+85Ye65qC85byP55qE5paH5pys6L+b6KGM5a+85YWl44CCXFxu5qC85byPMTog5ZCN56ewLOWcsOWdgCDkuIDooYzkuIDkuKrop6PmnpBcXG7moLzlvI8yOuS6keWJquWIh+advyDprZTmlq3op6PmnpDlr7zlhaXlj6Pku6TCpcKl5Ymq5YiH5p2/5Zyw5Z2AJyxcbiAgICAgICAgICAgIHVybDonaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgfSk7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICBkZXNjOiBcInR4dOaWh+acrOino+aekOinhOWImSzkuIDooYzkuIDkuKpcIixcbiAgICAgICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxuICAgICAgICAgICAgdGl0bGU6J+ino+aekOaWh+acrCcsXG4gICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoJ2RuLmltcG9ydF90ZXh0JywgJycpLFxuICAgICAgICAgICAgICAgIHR5cGU6IFwidGV4dGFyZWFcIixcbiAgICAgICAgICAgICAgICBoZWlnaHQ6LTEsXG4gICAgICAgICAgICAgICAgb25DaGFuZ2U6ICdwdXRWYXIoXCJkbi5pbXBvcnRfdGV4dFwiLGlucHV0KSdcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTon8J+TpeWvvOWFpScsXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScsXG4gICAgICAgICAgICB1cmw6JCgn56Gu5a6a57yW6L6R5aW95LqG5ZCXP+atpOaTjeS9nOWwhuimhuebluacrOWcsOW3suacieeahOiusOW9le+8jOW7uuiuruWkh+S7veWQjueUqOepuuaWh+S7tuWvvOWFpScpLmNvbmZpcm0oKCk9PntcbiAgICAgICAgICAgICAgICBjb25zdCB7ZGVmYXVsdFNldHN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2RlbW9EYXRhP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VSb3V0ZSA9ICdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbic7XG4gICAgICAgICAgICAgICAgbGV0IGpzQ29kZSA9IHJlcXVlc3QocGFyc2VSb3V0ZSl8fEpTT04uc3RyaW5naWZ5KHt0aXRsZTpbXSxjb2Rlczp7fSxzZXR0aW5nczpkZWZhdWx0U2V0c30pO1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsganNDb2RlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WPkeeUn+mUmeivrzpcXG4nK2UubWVzc2FnZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgdG9JbXBvcnQgPSBnZXRWYXIoXCJkbi5pbXBvcnRfdGV4dFwiKTtcbiAgICAgICAgICAgICAgICBpZigv6a2U5pat6Kej5p6Q5a+85YWl5Y+j5LukwqXCpS8udGVzdCh0b0ltcG9ydCkmJnRvSW1wb3J0LnNwbGl0KCfCpcKlJykubGVuZ3RoPjEpe1xuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gdG9JbXBvcnQuc3BsaXQoJ8KlwqUnKVsxXTtcbiAgICAgICAgICAgICAgICAgICAgaWYoIS9eaHR0cC8udGVzdCh1cmwpKXtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/liarliIfmnb/lnLDlnYDmnInor68s5a+85YWl5aSx6LSlJ1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRvSW1wb3J0ID0gcGFyc2VQYXN0ZSh1cmwpO1xuICAgICAgICAgICAgICAgICAgICB0b0ltcG9ydCA9IGJhc2U2NERlY29kZSh0b0ltcG9ydCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vbG9nKHRvSW1wb3J0KTtcbiAgICAgICAgICAgICAgICBsZXQgamlleGkgPSB0b0ltcG9ydC5zcGxpdCgnXFxuJykuZmlsdGVyKGl0PT5pdC50cmltKCkpO1xuICAgICAgICAgICAgICAgLy8gbG9nKGppZXhpKTtcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VUaXRsZSA9IFtdO1xuICAgICAgICAgICAgICAgIGxldCBwYXJzZUNvZGUgPSB7fTtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIGppZXhpKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZT1qaWV4aVtpXS5zcGxpdCgnLCcpWzBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgY29kZT1qaWV4aVtpXS5zcGxpdCgnLCcpWzFdO1xuICAgICAgICAgICAgICAgICAgICBpZighdGl0bGV8fCFjb2RlKXtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn6ZSZ6K+v6Kej5p6QOicramlleGlbaV0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcbiAgICAgICAgICAgICAgICAgICAgLy9sb2codGl0bGUpO1xuICAgICAgICAgICAgICAgICAgICBpZighKGNvZGUucmVwbGFjZSgvW1xcc10vZywnJykuc3RhcnRzV2l0aCgnaHR0cCcpKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2codGl0bGUrJ+S4uuWHveaVsOino+aekCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29kZS5yZXBsYWNlKC9bXFxzXS9nLCcnKS5sZW5ndGg+MjApey8v6KeG5Li6ZnVuY3Rpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlID0gZXZhbChiYXNlNjREZWNvZGUoY29kZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coY29kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgPSBlLm1lc3NhZ2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IHNjT2JqZWN0ID0gW1wiQ2l0eUlQXCIsIFwicGNVQVwiLCBcImNhY2hlTTN1OFwiLCBcImRlZmF1bHRQYXJzZVdlYlwiLFwibWFvc3NcIiwgXCJMTFFcIl07XG4gICAgICAgICAgICAgICAgcGFyc2VUaXRsZSA9IHBhcnNlVGl0bGU/cGFyc2VUaXRsZS5maWx0ZXIoaXQ9PiFzY09iamVjdC5pbmNsdWRlcyhpdCkpOltdO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciBuZXdQYXJzZVRpdGxlID0ganNvbi50aXRsZS5jb25jYXQocGFyc2VUaXRsZSk7XG4gICAgICAgICAgICAgICAganNvbi50aXRsZSA9IEFycmF5LmZyb20obmV3IFNldChuZXdQYXJzZVRpdGxlKSk7XG4gICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBwYXJzZUNvZGUpO1xuICAgICAgICAgICAgICAgIGxldCBuZXdGaWxlID0gJC5zdHJpbmdpZnkoanNvbik7IC8vSlNPTi5wYXJzZeS8muaKpemUmVxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCBuZXdGaWxlKTtcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaIkOWKn+WvvOWFpScramlleGkubGVuZ3RoKyfmnaHop6PmnpAnO1xuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBleHRyYTp7XG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6dHJ1ZVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xuICAgIH0pLFxufSk7XG5kLnB1c2goe1xuICAgIHRpdGxlOifimK/vuI/mn6Xph43lpITnkIYnLFxuICAgIGNvbF90eXBlOidzY3JvbGxfYnV0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mVfY3QgPSBub3JtYWxfbGlzdC5sZW5ndGggLSByZU5vckxpc3QubGVuZ3RoOyAvL+S7o+eggemHjeWkjVxuICAgICAgICBsZXQgdmFsdWVzX3JlID0gZHVwbGljYXRlcyhub3JtYWxfbGlzdCk7Ly/ph43lpI3nmoTlgLxcbiAgICAgICAgbGV0IGZ0bGlzdCA9IFtdO1xuICAgICAgICBsZXQgZmxhZ3MgPSB7fTtcbiAgICAgICAgbGV0IG15Rmxvb3JzID0gZmxvb3JzO1xuICAgICAgICBmb3IobGV0IGogaW4gY29kZXMpey8v6YGN5Y6G5omA5pyJXG4gICAgICAgICAgICBsZXQgb25lID0gY29kZXNbal07XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Yob25lKSAhPT0gJ2Z1bmN0aW9uJyYmdmFsdWVzX3JlLmluY2x1ZGVzKG9uZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiAoZmxhZ3Nbb25lXSkgPT09ICd1bmRlZmluZWQnIHx8ICFmbGFnc1tvbmVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvL+WPluWHuuesrOS4gOS4quagh+W/l1xuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3Nbb25lXSA9IG15Rmxvb3JzWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgbXlGbG9vcnMuc3BsaWNlKDAsIDEpOy8v5Yig6Zmk5qCH5b+X5YiX6KGo6YeM55qE56ys5LiA5Liq5YWD57SgXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZnRsaXN0LnB1c2goe2tleTogZmxhZ3Nbb25lXSArIGosIHZhbHVlOiBvbmV9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBmdGxpc3QucHVzaCh7a2V5OiBqLCB2YWx1ZTogb25lfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfWNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgbG9nKGUubWVzc2FnZSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyBsb2coSlNPTi5zdHJpbmdpZnkoZmxhZ3MpKTtcbiAgICAgICAgbGV0IG5ld0NvZGVzID0ge307XG4gICAgICAgIGZvcihsZXQgayBpbiBmdGxpc3Qpe1xuICAgICAgICAgICAgbmV3Q29kZXNbZnRsaXN0W2tdLmtleV0gPSBmdGxpc3Rba10udmFsdWU7XG4gICAgICAgIH1cbiAgICAgICAgbGV0IHRpcHMgPSAn5qOA5rWL5Yiw5ZCN56ew5aSN55So6aG555uu5pWwOicra2V5c19yZV9jdCsnLOS7o+eggemHjeWkjemhueebruaVsOmHjzonK3ZhbHVlX3JlX2N0KydcXG7pnIDopoHkuIDplK7miZPkuKrmoIfor4blkJc/5LiN5pSv5oyB6Ieq5Yqo5Yig6ZmkLOaJk+agh+W/l+iHquihjOino+WGsyc7XG4gICAgICAgIHJldHVybiAkKHRpcHMpLmNvbmZpcm0oKHZhbHVlX3JlX2N0LGpzb24sbmV3Q29kZXMscGFyc2VSb3V0ZSk9PntcbiAgICAgICAgICAgIGlmKHZhbHVlX3JlX2N0PDEpe1xuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ml6LnhLbpg73mmK8w5Liq6YeN5aSN6aG555uu5LqG77yM5bCx5LiN6ZyA6KaB5oiR5YGa5LuA5LmI5LqGISdcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNvbXBhcmUoKXtcbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGEsIGIpe1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB7Zmxvb3JzfSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9kZW1vRGF0YT9ydWxlPU15RmllbGThtLDigb9cIik7XG4gICAgICAgICAgICAgICAgICAgIGxldCB4ID0gYS5zdWJzdHJpbmcoMCwxKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHkgPSBiLnN1YnN0cmluZygwLDEpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmxvb3JzLmluZGV4T2YoeSktZmxvb3JzLmluZGV4T2YoeCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAganNvbi5jb2RlcyA9IG5ld0NvZGVzO1xuICAgICAgICAgICAgbGV0IHRpdGxlcyA9IE9iamVjdC5rZXlzKG5ld0NvZGVzKTtcbiAgICAgICAgICAgIHRpdGxlcyA9IHRpdGxlcy5zb3J0KGNvbXBhcmUoKSk7XG4gICAgICAgICAgICBqc29uLnRpdGxlID0gdGl0bGVzO1xuICAgICAgICAgICAgdmFyIG5ld0ZpbGUgPSAkLnN0cmluZ2lmeShqc29uKTsgLy9KU09OLnBhcnNl5Lya5oql6ZSZXG4gICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgbmV3RmlsZSk7XG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5LiA6ZSu5omT5LiK5qCH5b+XJztcbiAgICAgICAgfSx2YWx1ZV9yZV9jdCxqc29uLG5ld0NvZGVzLHBhcnNlUm91dGUpXG4gICAgfSx1bmlxdWUyLGR1cGxpY2F0ZXMsZmxvb3JzKSxcbn0pO1xuZC5wdXNoKHtcbiAgICB0aXRsZTpcIvCflITph43nva5C56uZVUFcIixcbiAgICBjb2xfdHlwZTogXCJzY3JvbGxfYnV0dG9uXCIsXG4gICAgdXJsOiBcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9cIixcbiAgICBleHRyYToge1xuICAgICAgICB1YTogUENfVUFcbiAgICB9XG59KTtcbmQucHVzaCh7XG4gICAgdGl0bGU6XCLwn5eR77iP5om56YeP5pON5L2cXCIsXG4gICAgY29sX3R5cGU6IFwic2Nyb2xsX2J1dHRvblwiLFxu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ICAgfVxcbiAgICAgICAgI3RpcHN7XFxuICAgICAgICAgICAgbWFyZ2luLXRvcDotMTBweDtcXG4gICAgICAgICAgICBtYXJnaW4tYm90dG9tOjVweDtcXG4gICAgICAgIH1cXG4gICAgICAgIC5mdW5ne1xcbiAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyXFxuICAgICAgICB9XFxuICAgICAgICBkaXYuYm94IHtcXG4gICAgICAgICAgICBtYXJnaW4tdG9wOi0xcHg7XFxuICAgICAgICAgICAgaGVpZ2h0OiA0M3B4O1xcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAyMHB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrovpPlhaXmoYblsLrlr7gqL1xcbiAgICAgICAgZm9ybSB7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XFxuICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xcbiAgICAgICAgICAgIHdpZHRoOiAxMDAlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaW5wdXQsIGxhYmVsLCBzZWxlY3Qge1xcbiAgICAgICAgICAgIGJvcmRlcjogbm9uZTtcXG4gICAgICAgICAgICBvdXRsaW5lOiBub25lO1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrlrZfkvZPkvY3nva4qL1xcbiAgICAgICAgaW5wdXQge1xcbiAgICAgICAgICAgIHdpZHRoOiA3NyU7XFxuICAgICAgICAgICAgaGVpZ2h0OiAzMnB4O1xcbiAgICAgICAgICAgIHBhZGRpbmctbGVmdDogNjZweDtcXG4gICAgICAgICAgICBwYWRkaW5nLXJpZ2h0OiAwcHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBsYWJlbCB7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDQzcHg7XFxuICAgICAgICAgICAgaGVpZ2h0OiA0MHB4O1xcbiAgICAgICAgICAgIHdpZHRoOiA2MHB4O1xcbiAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcXG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKuWwj+ahhiovXFxuICAgICAgICAuYmFyIGxhYmVsIHtcXG4gICAgICAgICAgICAvKmJhY2tncm91bmQ6ICNEMDZCNkM7Ki9cXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1cHggNTU1cHggNTU1cHggNXB4O1xcbiAgICAgICAgICAgIHdpZHRoOiA2MHB4O1xcbiAgICAgICAgICAgIGZvbnQtc2l6ZTogMTNweDtcXG4gICAgICAgICAgICB0b3A6IDA7XFxuICAgICAgICAgICAgbGVmdDogM3B4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrovpPlhaXmoYbmoLflvI8qL1xcbiAgICAgICAgLmJhciBpbnB1dCB7XFxuICAgICAgICAgICAgLypib3JkZXItcmFkaXVzOiA1cHggNTU1cHggNTU1cHggNXB4O1xcbiAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC8q5YiX6KGoKi9cXG4gICAgICAgIHNlbGVjdCB7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6NDBweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgd2lkdGg6IDIwcHg7XFxuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC8q5YiX6KGoKi9cXG4gICAgICAgIC5saWViIHNlbGVjdHtcXG4gICAgICAgICAgICAvKmJvcmRlci1yYWRpdXM6IDRweDsqL1xcbiAgICAgICAgICAgIGJvcmRlci1y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gJ3BhcnNlTGMnLCAnZ3BhcnNlJywgJ25wYXJzZSddO1xcbiAgICAgICAgbXlTZWxlY3QgPSBuZXdDb25maWcudGl0bGUuZmlsdGVyKGNvbXBhcmUoeWNUaXRsZSkpO1xcbiAgICAgICAgLy8gbXlTZWxlY3QgPSBteVNlbGVjdC5tYXAoKGl0KT0+e1xcbiAgICAgICAgLy8gICAgIGxldCBmbGFnID0gJ+KTiic7XFxuICAgICAgICAvLyAgICAgaWYodHlwZW9mKG5ld0NvbmZpZy5jb2Rlc1tpdF0pPT09J2Z1bmN0aW9uJyl7XFxuICAgICAgICAvLyAgICAgICAgIGZsYWcgPSAn4pK/JztcXG4gICAgICAgIC8vICAgICB9ZWxzZSBpZih0eXBlb2YobmV3Q29uZmlnLmNvZGVzW2l0XSk9PT0ndW5kZWZpbmVkJyl7XFxuICAgICAgICAvLyAgICAgICAgIGZsYWcgPSAnJztcXG4gICAgICAgIC8vICAgICB9XFxuICAgICAgICAvLyAgICAgcmV0dXJuIGZsYWcraXRcXG4gICAgICAgIC8vIH0pO1xcbiAgICB9XFxuICAgIC8vZmJhLmxvZyhKU09OLnN0cmluZ2lmeShteVNlbGVjdCkpO1xcblxcbiAgICBsZXQgb3B0aW9ucyA9IFtcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifniLHlpYfoibonLFxcbiAgICAgICAgICAgIGlkOidxeScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MucXksXFxuICAgICAgICAgICAgcGxhY2Vob2xkZXI6J+iuvue9rueIseWlh+iJuidcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5LyY6YW3JyxcXG4gICAgICAgICAgICBpZDoneWsnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnlrXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+iFvuiurycsXFxuICAgICAgICAgICAgaWQ6J3R4JyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy50eFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifoipLmnpwnLFxcbiAgICAgICAgICAgIGlkOidtZycsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MubWdcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5ZOU5ZOp5ZOU5ZOpJyxcXG4gICAgICAgICAgICBpZDonYmwnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLmJsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+aQnOeLkCcsXFxuICAgICAgICAgICAgaWQ6J3NoJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5zaFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifopb/nk5wnLFxcbiAgICAgICAgICAgIGlkOid4ZycsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MueGdcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTonUFBUVicsXFxuICAgICAgICAgICAgaWQ6J3BwJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5wcFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflkqrlkpUnLFxcbiAgICAgICAgICAgIGlkOidtaScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MubWlcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5LmQ6KeGJyxcXG4gICAgICAgICAgICBpZDonbGUnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLmxlXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6JzE5MDUnLFxcbiAgICAgICAgICAgIGlkOidvbmUnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLm9uZVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifpo47ooYwnLFxcbiAgICAgICAgICAgIGlkOidmdW4nLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLmZ1blxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifpvpnohb4nLFxcbiAgICAgICAgICAgIGlkOidsdCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MubHRcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5Lq65Lq66L+3JyxcXG4gICAgICAgICAgICBpZDoncnInLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnJyXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+S6lOavkicsXFxuICAgICAgICAgICAgaWQ6J3dkJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy53ZFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflhbbku5YnLFxcbiAgICAgICAgICAgIGlkOidvdGgnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLm90aFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflhajlsYAnLFxcbiAgICAgICAgICAgIGlkOidxanUnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnFqdVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifmj5Lku7YnLFxcbiAgICAgICAgICAgIGlkOidjaicsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuY2pcXG4gICAgICAgIH0sXFxuICAgIF07XFxuXFxuICAgIGZ1bmN0aW9uIERpZChpZCl7XFxuICAgICAgICByZXR1cm4gZG9jdW1lb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sXFxuICAgICAgICAgICAgZXh0cmE6IHt9XFxuICAgICAgICB9KSk7XFxuICAgIH1cXG4gICAgZnVuY3Rpb24gb3BlblRoZW1lKCl7XFxuICAgICAgICBmYmEub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgcnVsZTogXFxcIj1eX149XFxcIixcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuS4u+mimOeuoeeQhlxcXCIsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBvyZ0eXBlPeS4u+mimCNub0hpc3RvcnkjI25vUmVjb3JkSGlzdG9yeSNcXFwiLFxcbiAgICAgICAgICAgIGdyb3VwOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgcHJlUnVsZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHt9XFxuICAgICAgICB9KSk7XFxuICAgIH1cXG4gICAgZnVuY3Rpb24gb3Blbkp4TWFuYWdlKCl7XFxuICAgICAgICBmYmEub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgcnVsZTogXFxcIj1eX149XFxcIixcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuino+aekOmFjee9rueuoeeQhlxcXCIsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBvyZ0eXBlPeino+aekCNub0hpc3RvcnkjI25vUmVjb3JkSGlzdG9yeSNcXFwiLFxcbiAgICAgICAgICAgIGdyb3VwOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgcHJlUnVsZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHt9XFxuICAgICAgICB9KSk7XFxuICAgIH1cXG4gICAgZnVuY3Rpb24gY2FuY2VsKCl7XFxuICAgICAgICBpZighbXlTZXQpe1xcbiAgICAgICAgICAgIGZiYS53cml0ZUZpbGUob2xkUm91dGUsIEpTT04uc3RyaW5naWZ5KHNldHRpbmdzLCBudWxsLCA0KSk7XFxuICAgICAgICAgICAgZmJhLnJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgZmJhLmJhY2soZmFsc2UpO1xcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIGZ1bmN0aW9uIGNsaWNrbWUobXNnLGR1cmF0aW9uLHRpdGxlKXtcXG4gICAgICAgIHRyeXtcXG4gICAgICAgICAgICBmb3IobGV0IGtleSBpbiBzZXR0aW5ncyl7XFxuICAgICAgICAgICAgICAgIC8vIGZiYS5sb2coRGlkKGtleSkrJycra2V5KTtcXG4gICAgICAgICAgICAgICAgdHJ5e1xcbiAgICAgICAgICAgICAgICAgICAgLy9zZXR0aW5nc1trZXldID0gRGlkKGtleSkudmFsdWUucmVwbGFjZSgv4pOKfOKSvy9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgIHNldHRpbmdzW2tleV0gPSBEaWQoa2V5KS52YWx1ZTtcXG4gICAgICAgICAgICAgICAgfWNhdGNoKGUpe1xcbiAgICAgICAgICAgICAgICAgICAgYWxlcnQoXFxcIuacquiOt+WPluWIsOiKgueCuTpcXFwiK2tleStcXFwiXFxcXG5cXFwiK2UubWVzc2FnZSk7XFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYobXlTZWxlY3Qpe1xcbiAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKG5ld0NvbmZpZy5zZXR0aW5ncywgc2V0dGluZ3MpO1xcbiAgICAgICAgICAgICAgICBmYmEud3JpdGVGaWxlKG5ld1JvdXRlLCAkJCQuc3RyaW5naWZ5KG5ld0NvbmZpZykpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBmYmEud3JpdGVGaWxlKG9sZFJvdXRlLCAkJCQuc3RyaW5naWZ5KHNldHRpbmdzKSk7XFxuICAgICAgICAgICAgVG9hc3QobXNnLGR1cmF0aW9uKTtcXG4gICAgICAgICAgICBpZih0aXRsZT09PVxcXCLlhbNcXFwiKXtcXG4gICAgICAgICAgICAgICAgZmJhLmJhY2soKTtcXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgZmJhLnJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1jYXRjaChlKXtcXG4gICAgICAgICAgICBhbGVydChlLm1lc3NhZ2UpXFxuICAgICAgICB9XFxuICAgIH1cXG5cXG4gICAgLy9sZXQgd2lkdGg9d2luZG93LnNjcmVlbi5hdmFpbFdpZHRoO1xcbiAgICAvL2xldCB3aWR0aFB4PXdpZHRoLTM5Mys1MjtcXG4gICAgLy9hbGVydChcXFwi5b2T5YmN5YiG6L6o546HOlxcXCIrd2luZG93LnNjcmVlbi5hdmFpbFdpZHRoK1xcXCIqXFxcIit3aW5kb3cuc2NyZWVuLmhlaWdodCk7XFxuICAgIHZhciB2ZXJpbmZvID0gW3tcXG4gICAgICAgIGlkOidkbicsXFxuICAgICAgICBhdXRob3I6J+aWreW/tScsXFxuICAgICAgICBhdmF0YXI6J2h0dHBzOi8vczMuYXgxeC5jb20vMjAyMS8wMi8yMi95N3diOU8uanBnJyxcXG4gICAgICAgIG9wdGlvbjpvcGVuRG5QYWdlLFxcbiAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGlkOidkeicsXFxuICAgICAgICAgICAgYXV0aG9yOifpgZPplb8nLFxcbiAgICAgICAgICAgIGF2YXRhcjonaHR0cDovL3ExLnFsb2dvLmNuL2c/Yj1xcSZuaz00MzQ4NTcwMDUmcz02NDAnLFxcbiAgICAgICAgICAgIG9wdGlvbjpvcGVuVGhlbWVcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICA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AgIHZhciBjb25maWdfYXJyeSA9IFtdO1xcbiAgICAgICAgdmFyIGNvbmZpZ19iID0gY29uZmlnX2EubGVuZ3RoO1xcbiAgICAgICAgaWYgKHRva2VuID09IDB4MSkge1xcbiAgICAgICAgICAgIHZhciBjb25maWdfdXJsID0gYXRvYihjb25maWdfdXJsKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdmFyIGNvbmZpZ191cmwgPSBlbmNvZGVVUklDb21wb25lbnQoY29uZmlnX3VybCk7XFxuICAgICAgICB9XFxuICAgICAgICB2YXIgY29uZmlnX2MgPSBjb25maWdfdXJsLmxlbmd0aDtcXG4gICAgICAgIGZvciAoaSA9IDB4MDsgaSA8IDB4MTAwOyBpKyspIHtcXG4gICAgICAgICAgICB0ZW1baV0gPSBjb25maWdfYVtpICUgY29uZmlnX2JdLmNoYXJDb2RlQXQoKTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVtpXSA9IGk7XFxuICAgICAgICB9XFxuICAgICAgICBmb3IgKGogPSBpID0gMHgwOyBpIDwgMHgxMDA7IGkrKykge1xcbiAgICAgICAgICAgIGogPSAoaiArIGNvbmZpZ19hcnJ5W2ldICsgdGVtW2ldKSAlIDB4MTAwO1xcbiAgICAgICAgICAgIHRtcCA9IGNvbmZpZ19hcnJ5W2ldO1xcbiAgICAgICAgICAgIGNvbmZpZ19hcnJ5W2ldID0gY29uZmlnX2Fycnlbal07XFxuICAgICAgICAgICAgY29uZmlnX2Fycnlbal0gPSB0bXA7XFxuICAgICAgICB9XFxuICAgICAgICBmb3IgKGEgPSBqID0gaSA9IDB4MDsgaSA8IGNvbmZpZ19jOyBpKyspIHtcXG4gICAgICAgICAgICBhID0gKGEgKyAweDEpICUgMHgxMDA7XFxuICAgICAgICAgICAgaiA9IChqICsgY29uZmlnX2FycnlbYV0pICUgMHgxMDA7XFxuICAgICAgICAgICAgdG1wID0gY29uZmlnX2FycnlbYV07XFxuICAgICAgICAgICAgY29uZmlnX2Fycnl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ICAgICAgICAgICBwbGF5VXJscz1wbGF5VXJscy5tYXAoKGl0LGlkKT0+aXQrXFxcIjtcXFwiK25hbWVzW2lkXSk7XFxuICAgICAgICAgICAgLy9sb2cocGxheVVybHMpO1xcbiAgICAgICAgICAgIGNvbnN0IHtMYXp5UGFyc2VGYXN0fSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2dsb2JhbFBhcnNlP3J1bGU96YGT6ZW/5LuT5bqTUHJvJyk7XFxuICAgICAgICAgICAgbGV0IHJldCA9IExhenlQYXJzZUZhc3QocGxheVVybHMsdGltZW91dCx0aW1lb3V0KTtcXG4gICAgICAgICAgICBpZih0eXBlb2YocmV0KT09PSdvYmplY3QnJiZyZXQubGVuZ3RoPjApe1xcbiAgICAgICAgICAgICAgICAvL3JldHVybiByZXRbMF1cXG4gICAgICAgICAgICAgICAgLy9sb2cocmV0KTtcXG4gICAgICAgICAgICAgICAgbGV0IHYgPSBnZXRBcHBWZXJzaW9uKCk7XFxuICAgICAgICAgICAgICAgIGlmKHBhcnNlSW50KHYpPj0yMTk0JiZyZXQubGVuZ3RoPjEpe1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybHMgPSBBcnJheS5mcm9tKG5ldyBTZXQocmV0KSk7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lcz11cmxzLm1hcCgoaXQsaWQpPT5pdC5zcGxpdChcXFwi4piFXFxcIikubGVuZ3RoPjE/aXQuc3BsaXQoXFxcIuKYhVxcXCIpWzFdOlxcXCLnur/ot686XFxcIitwYXJzZUludChpZCsxKSk7XFxuICAgICAgICAgICAgICAgICAgICB1cmxzPXVybHMubWFwKGl0PT5pdC5zcGxpdChcXFwi4piFXFxcIilbMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWRlcnMgPSB1cmxzLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoIS87Ly50ZXN0KGl0KXx8aXQuc3BsaXQoJzsnKS5sZW5ndGg8Mil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7fVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZCA9IGl0LnNwbGl0KCc7JylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEvQC8udGVzdChoZWFkKXx8IS97fH0vLnRlc3QoaGVhZCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHt9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZD1oZWFkLnNwbGl0KFxcXCJ7XFxcIilbMV0uc3BsaXQoXFxcIn1cXFwiKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9oZWFkID0gaGVhZC5yZXBsYWNlKC97fH0vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQgPSBoZWFkLnNwbGl0KCcmJicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgb2JqID0ge307XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSBpbiBoZWFkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrZXkgPSBoZWFkW2ldLnNwbGl0KCdAJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSBoZWFkW2ldLnNwbGl0KCdAJylbMV0ucmVwbGFjZSgvOy8sJ++8m++8mycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqW2tleV0gPSB2YWx1ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2JqXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB1cmxzID0gdXJscy5tYXAoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0dXJsPWl0LnNwbGl0KCc7JylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXQuaW5jbHVkZXMoXFxcIiNpc1ZpZGVvPXRydWUjXFxcIikmJiF0dXJsLmluY2x1ZGVzKFxcXCIjaXNWaWRlbz10cnVlI1xcXCIpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHVybCs9XFxcIiNpc1ZpZGVvPXRydWUjXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHR1cmxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHt1cmxzOnVybHMsaGVhZGVyczpoZWFkZXJzLG5hbWVzOm5hbWVzfSk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldFswXS5zcGxpdChcXFwi4piFXFxcIilbMF1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICByZXR1cm4gcmV0XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgY29uc3Qge2xhenlQYXJzZX0gPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9nbG9iYWxQYXJzZT9ydWxlPemBk+mVv+S7k+W6k1BybycpO1xcbiAgICAgICAgICAgIGxldCB4NVBsYXk9bGF6eVBhcnNlKHBsYXlVcmwsdGltZW91dCk7XFxuICAgICAgICAgICAgaWYodHlwZW9mKHg1UGxheSk9PVxcXCJ1bmRlZmluZWRcXFwifHwheDVQbGF5KXtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+mBk+mVv+S7k+W6k+ino+aekOWksei0pVxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IHRpcHM9L3g1UnVsZXx3ZWJSdWxlLy50ZXN0KHg1UGxheSk/XFxcIng1L3dlYuWFjeWXheW8gOWni1xcXCI6XFxcIuaegemAn+WFjeWXheaOouWujOavle+8jOWcsOWdgDpcXFwiKygvXmh0dHAvLnRlc3QoeDVQbGF5KT94NVBsYXk6J+mdnuato+W4uOmTvuaOpScpO1xcbiAgICAgICAgICAgIGxvZyh0aXBzKTtcXG4gICAgICAgICAgICByZXR1cm4geDVQbGF5O1xcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBcXFwibWFvc3NcXFwiOlxcbiAgICAgICAgZnVuY3Rpb24gKGp4dXJsLCByZWYsIGtleSkge1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzLueMqyhqeHVybCwgcmVmLCBrZXkpXFxuICAgICAgICB9LFxcbiAgICDlhY3ll4U6ZnVuY3Rpb24odmlwVXJsLGspe1xcbiAgICAgICAgaz1rfHxbXFxcInVybFxcXCIsXFxcImRhdGEudXJsXFxcIl07XFxuICAgICAgICB0cnl7XFxuICAgICAgICAgICAgbGV0IHJqc29uPUpTT04ucGFyc2UoZmV0Y2godmlwVXJsKSk7XFxuICAgICAgICAgICAgLy9sb2cocmpzb24pO1xcbiAgICAgICAgICAgIGxldCByZWFsVXJsPScnO1xcbiAgICAgICAgICAgIGlmKHR5cGVvZihrKT09J3N0cmluZycpe1xcbiAgICAgICAgICAgICAgICByZWFsVXJsPWV2YWwoYHJqc29uLiR7a31gKTtcXG4gICAgICAgICAgICB9ZWxzZSBpZihBcnJheS5pc0FycmF5KGspKXtcXG4gICAgICAgICAgICAgICAgZm9yKGxldCBpIG9mIGspe1xcbiAgICAgICAgICAgICAgICAgICAgLy9sb2coaSk7XFxuICAgICAgICAgICAgICAgICAgICByZWFsVXJsPWV2YWwoYHJqc29uLiR7aX1gKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmKHJlYWxVcmwpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmKHJlYWxVcmwuc3RhcnRzV2l0aCgnLycpKXtcXG4gICAgICAgICAgICAgICAgcmVhbFVybCA9ICdodHRwczovLycrcmVhbFVybDtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuaXNWaWRlbyhyZWFsVXJsKXx8XFxcIlxcXCI7XFxuICAgICAgICB9Y2F0Y2goZSl7XFxuICAgICAgICAgICAgbG9nKGUubWVzc2FnZSk7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJcXFwiXFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIFg1OmZ1bmN0aW9uKHZpcFVybCxyZWYpey8vIGh0dHBzOi8vYXBpLjUyd3liLmNvbS93ZWJjbG91ZC8/dj1odHRwOi8vdmlwLjE5MDUuY29tL3BsYXkvNjkxOTQwLnNodG1sIGh0dHA6Ly93d3cuY2RjZXIubmV0L1xcbiAgICAgICAgbGV0IF94NSA9ICQudG9TdHJpbmcoKHZpcFVybCkgPT4ge1xcbiAgICAgICAgICAgIGlmKCFsb2NhdGlvbi5ocmVmLmluY2x1ZGVzKHZpcFVybCkpe1xcbiAgICAgICAgICAgICAgICBsb2NhdGlvbi5ocmVmID0gdmlwVXJsO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZih3aW5kb3cuY291bnQgPT0gbnVsbCl7XFxuICAgICAgICAgICAgICAgIHdpbmRvdy5jb3VudD0xO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB3aW5kb3cuY291bnQrKztcXG4gICAgICAgICAgICBpZiggd2luZG93LmNvdW50ID49IDIwKXtcXG4gICAgICAgICAgICAgICAgZmJhLmxvZyhcX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nVybCA9IGRlY29kZVVSSUNvbXBvbmVudCh0b29scy5BRVMoY29uZmlnLnVybCwga2V5LCBpdikpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gY29uZmlnLnVybDtcXG4gICAgICAgIH1cXG4gICAgICAgIGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgLy8gcmV0dXJuIFxcXCJcXFwiO1xcbiAgICAgICAgICAgIHJldHVybiBqeHVybDtcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgTExROiBmdW5jdGlvbihqeHVybCkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB2YXIgYXBpID0ganh1cmwuc3BsaXQoJz91cmw9JylbMF0gKyBcXFwiYXBpLnBocFxcXCI7XFxuICAgICAgICAgICAgdmFyIGI2NGlkID0gYmFzZTY0RW5jb2RlKGp4dXJsLnNwbGl0KCd1cmw9JylbMV0pO1xcbiAgICAgICAgICAgIHZhciBwYXJzZWlkID0gdG9vbHMuY2Flc2FyQ2lwaGVyKGI2NGlkLCAtMSk7XFxuICAgICAgICAgICAgdmFyIGpzb24gPSBKU09OLnBhcnNlKHJlcXVlc3QoYXBpLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICdSZWZlcmVyJzoganh1cmxcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXFxuICAgICAgICAgICAgICAgIGJvZHk6ICd1cmw9JyArIHBhcnNlaWRcXG4gICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgdXJsID0gKGpzb24uY29kZSA9PSAyMDAgPyBiYXNlNjREZWNvZGUodG9vbHMuY2Flc2FyQ2lwaGVyKGpzb24udXJsLCAtMSkpIDogJycpO1xcbiAgICAgICAgICAgIHJldHVybiB1cmw7XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgcmV0dXJuICcnO1xcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBQYW5HdTogZnVuY3Rpb24odmlwVXJsLCBkYXRhKSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIC8qdmFyIHJlZiA9ICdodHRwczovL3d3dy5wYW5ndWppZXhpLmNvbS8nO1xcbiAgICAgICAgICAgIHZhciBwYXJzZSA9ICdodHRwczovL3Bhbmd1YXBpLm50cnlqZC5uZXQvamlleGkvP3VybD0nICsgdmlwVXJsO1xcbiAgICAgICAgICAgIHZhciBhcGkgPSAnaHR0cHM6Ly9wYW5ndWFwaS5udHJ5amQubmV0L2ppZXhpL2FwaS5waHAnO1xcbiAgICAgICAgICAgICovXFxuICAgICAgICAgICAgLy92YXIgcmVmID0gJ2h0dHBzOi8veG15c3R2LmNvbS8nO1xcbiAgICAgICAgICAgIC8vdmFyIHBhcnNlID0gJ2h0dHBzOi8vd3d3Ljk5a3B3LmNvbS9wYW5ndS9pbmRleC5waHA/dXJsPScgKyB0YWlsVXJsO1xcbiAgICAgICAgICAgIC8vdmFyIGFwaSA9ICdodHRwczovL3d3dy45OWtwdy5jb20vcGFuZ3UvYXBpLnBocCc7XFxuICAgICAgICAgICAgdmFyIHBhcnNlID0gJ2h0dHBzOi8vd3d3LnBhbmd1amlleGkuY29tL3Bhbmd1Lz91cmw9JyArIHZpcFVybDtcXG4gICAgICAgICAgICB2YXIgYXBpID0gJ2h0dHBzOi8vcGFuZ3VhcGkubnRyeWpkLm5ldC9wYW5ndTIwMjEvYXBpLnBocCc7XFxuICAgICAgICAgICAgaWYgKGRhdGEpIHtcXG4gICAgICAgICAgICAgICAgcmVmID0gZGF0YVswXTtcXG4gICAgICAgICAgICAgICAgcGFyc2UgPSBkYXRhWzFdO1xcbiAgICAgICAgICAgICAgICBhcGkgPSBkYXRhWzJdO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2YXIgVGltZSA9IChNYXRoLmZsb29yKG5ldyBEYXRlKCkuZ2V0VGltZSgpIC8gM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gIGxldCBqaWV4aXMgPSB7fTtcXG4gICAgdHJ5IHtcXG4gICAgICAgIE15SmlleGkgPSBKU09OLnBhcnNlKGZldGNoKGp4c1JvdXRlKSk7XFxuICAgICAgICBqaWV4aXMgPSBNeUppZXhpLmppZXhpcy5maWx0ZXIoaXQ9Pml0Lm5hbWU9PT1NeUppZXhpLm5vdylbMF07XFxuICAgIH1jYXRjaCAoZSkge31cXG4gICAgZnVuY3Rpb24gZ2V0UGxheUp4KGtleSl7XFxuICAgICAgICBsZXQgcGxheVVybExpc3QgPSBbXTsvL+aJuemHj+aSreaUvuWcsOWdgOWIl+ihqFxcbiAgICAgICAgbGV0IG5hbWVMaXN0ID0gW107XFxuICAgICAgICBsZXQganhzID0gamlleGlzW2tleV07IC8vIOmAgueUqOS6jui/meS4que9keermeeahOino+aekOWIl+ihqFxcbiAgICAgICAgaWYoanhzKXtcXG4gICAgICAgICAgICBmb3IobGV0IGkgaW4ganhzKXtcXG4gICAgICAgICAgICAgICAgaWYodHlwZW9mIFBhcnNlU1tqeHNbaV1dID09ICdzdHJpbmcnJiZQYXJzZVNbanhzW2ldXS5tYXRjaCgvaHR0cC4qPz0vKSl7XFxuICAgICAgICAgICAgICAgICAgICBwbGF5VXJsTGlzdC5wdXNoKFBhcnNlU1tqeHNbaV1dK3ZpcFVybCk7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdC5wdXNoKGp4c1tpXSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICAvLyByZXR1cm4gcGxheVVybExpc3RcXG4gICAgICAgIHJldHVybiB7cGxheVVybExpc3Q6cGxheVVybExpc3QsbmFtZUxpc3Q6bmFtZUxpc3R9XFxuICAgIH1cXG4gICAgZnVuY3Rpb24gZ2V0TGF6eUxpc3Qoa2V5KXsvL+WPquiOt+WPluWkh+iDjuWIl+ihqOeahOWFjeWXheaOouino+aekOWIl+ihqFxcbiAgICAgICAgbGV0IHBhcnNlcyA9IFtdO1xcbiAgICAgICAgbGV0IGp4cyA9IGppZXhpc1trZXldfHxbXTsgLy8g6YCC55So5LqO6L+Z5Liq572R56uZ55qE6Kej5p6Q5YiX6KGoXFxuICAgICAgICAvLyBsb2coanhzKTtcXG4gICAgICAgIGlmKGp4cyl7XFxuICAgICAgICAgICAgZm9yKGxldCBpIGluIGp4cyl7XFxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZiBQYXJzZVNbanhzW2ldXSA9PSAnZnVuY3Rpb24nJiYhL+mAmuWFjS8udGVzdChQYXJzZVNbanhzW2ldXS50b1N0cmluZygpKSl7XFxuICAgICAgICAgICAgICAgICAgICBwYXJzZXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTpqeHNbaV0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcnVsZTpQYXJzZVNbanhzW2ldXVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiBwYXJzZXNcXG4gICAgfVxcbiAgICB2YXIgZXh0cmEgPSB7fTtcXG4gICAgdmFyIHBhcnNlcyA9IFtdOyAvL+WFjeWXheaOouWIl+ihqFxcbiAgICAvLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1cXG4gICAgaWYoIXN0clRpdGxlKXtcXG4gICAgICAgIGlmKC9MVC8udGVzdCh2aXBVcmwpKXtcXG4gICAgICAgICAgICBzdHIgPSBteVNldC5sdDtcXG4gICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnbHQnKTtcXG4gICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnbHQnLHN0cik7XFxuICAgICAgICB9IGVsc2UgaWYoL3JlbnJlbm1pLy50ZXN0KHZpcFVybCkpe1xcbiAgICAgICAgICAgIHN0ciA9IG15U2V0LnJyO1xcbiAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdycicpO1xcbiAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdycicsc3RyKTtcXG4gICAgICAgIH1lbHNlIGlmKC93dWR1eXVuLy50ZXN0KHZpcFVybCkpe1xcbiAgICAgICAgICAgIHN0ciA9IG15U2V0LndkO1xcbiAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCd3ZCcpO1xcbiAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCd3ZCcsc3RyKTtcXG4gICAgICAgIH1lbHNlIGlmKC95YW5haWZlaXx4aW5sdWFufExUfHJ1aWZlbmdsYnxzdW95b3x4Znl8cmVucmVubWl8Um9uZ1hpbmdWUnx4dWVyZW58d3VkdXl1bnxsYW9kaXxOYWlmZWltaXxkYW9kbXxYTU1UfHYwMjBjLy50ZXN0KHZpcFVybCkpe1xcbiAgICAgICAgICAgIHN0ciA9IG15U2V0Lm90aDtcXG4gICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnb3RoJyk7XFxuICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ290aCcsc3RyKTtcXG4gICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgIHZhciBob3N0O1xcbiAgICAgICAgICAgIHRyeXtcXG4gICAgICAgICAgICAgICAgaG9zdCA9IHZpcFVybC5tYXRjaCgvXFxcXC4oLio/KVxcXFwvLylbMV07XFxuICAgICAgICAgICAgfWNhdGNoKGUpe1xcbiAgICAgICAgICAgICAgICBpZighL15odHRwLy50ZXN0KHBsYXlVcmwpKXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwi5pat5o+S6LCD55So5aSx6LSl77yBXFxcXG7pnZ7mraPluLjnmoR2aXDmraPniYjlnLDlnYDkuJTmnKror4bliKvljp/nq5nop6PmnpDmkq3mlL7lnLDlnYBcXFwiO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQYXJzZVMu6YGT6ZW/5LuT5bqT6YCa5YWNKHBsYXlVcmwsdGltZW91dClcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAvL2hvc3QgPSBkZWNvZGVVUklDb21wb25lbnQoaG9zdCk7XFxuICAgICAgICAgICAgc3dpdGNoIChteVNldC5xanUpIHtcXG4gICAgICAgICAgICAgICAgY2FzZSBcXFwi6buY6K6kXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoaG9zdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInFxLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnR4O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgndHgnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3R4Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImlxaXlpLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnF5O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgncXknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3F5Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInlvdWt1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnlrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgneWsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3lrJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImFsaXp5XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuYWw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdhbCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnYWxpenknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwibWd0di5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5tZztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ21nJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdtZycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJiaWxpYmlsaS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5ibDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2JsJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdibCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJzb2h1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnNoO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnc2gnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3NoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInR2LnNvaHUuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuc2g7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdzaCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnc2gnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiaXhpZ3VhLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnhnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgneGcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3hnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBwdHYuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQucHA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdwcCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgncHAnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwibWlndXZpZGVvLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0Lm1pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnbWknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ21pJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImxlLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmxlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnbGUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ2xlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIjE5MDUuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQub25lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnb25lJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdvbmUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiZnVuLnR2XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuZnVuO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnZnVuJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdmdW4nKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQub3RoO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnb3RoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdvdGgnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnFqdTtcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfWVsc2V7XFxuICAgICAgICBsb2coJ+mtlOaWreaJp+ihjOWumuWQkeino+aekOe6v+i3r+WktDonK3N0clRpdGxlKTtcXG4gICAgICAgIHN0ciA9IHN0clRpdGxlO1xcbiAgICB9XFxuICAgIGxldCB3aXRoQmF0Y2ggPSAhIShNeUppZXhpLmlzQXV0byAmJiBNeUppZXhpLmF1dG9Nb2RlID09PSAn6YCf5bqm5LyY5YWIJyk7XFxuICAgIGxldCB3aXRoQmF0Y2hPcmRlciA9ICEhKE15SmlleGkuaXNBdXRvICYmIC/pobrluo/kvJjlhYh85ZeF5o6i5LyY5YWILy50ZXN0KE15SmlleGkuYXV0b01vZGUpKTtcXG4gICAgbGV0IHNpbmdsZUJhY2sgPSBNeUppZXhpLnNpbmdsZUJhY2t8fGZhbHNlOyAvL+WQiu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z2AXFxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIGZhbHNlXFxuICAgIH1cXG5cXG4gICAgZnVuY3Rpb24gdW5pcXVlMihhcnJheSl7Ly/ljrvph43lh73mlbBcXG4gICAgICAgIHJldHVybiBBcnJheS5mcm9tKG5ldyBTZXQoYXJyYXkpKTtcXG4gICAgfVxcbiAgICBmdW5jdGlvbiBBcnJTZXQoQXJyLCBpZCkgey8v5a+56LGh5pWw57uE5Y676YeNXFxuICAgICAgICB2YXIgb2JqID0ge307XFxuICAgICAgICBjb25zdCBhcnJheXMgPSBBcnIucmVkdWNlKChzZXRBcnIsIGl0ZW0pID0+IHtcXG4gICAgICAgICAgICBvYmpbaXRlbVtpZF1dID8gJycgOiBvYmpbaXRlbVtpZF1dID0gdHJ1ZSAmJiBzZXRBcnIucHVzaChpdGVtKTtcXG4gICAgICAgICAgICByZXR1cm4gc2V0QXJyO1xcbiAgICAgICAgfSwgW10pO1xcbiAgICAgICAgcmV0dXJuIGFycmF5cztcXG4gICAgfVxcbiAgICBmdW5jdGlvbiBzb3J0QnlLZXkoYXJyYXksIGtleSwgb3JkZXIpIHsvL+WvueixoeaVsOe7hOaMieafkOS4qumUruWAvOaOkuW6j1xcbiAgICAgICAgcmV0dXJuIGFycmF5LnNvcnQoZnVuY3Rpb24oYSwgYikge1xcbiAgICAgICAgICAgIHZhciB4ID0gcGFyc2VJbnQoYVtrZXldLm1hdGNoKC8oXFxcXGQrKS8pWzFdKTsvL+S/ruWkjeWkp+S6jjEw5Ye66Zeu6aKYXFxuICAgICAgICAgICAgdmFyIHkgPSBwYXJzZUludChiW2tleV0ubWF0Y2goLyhcXFxcZCspLylbMV0pO1xcbiAgICAgICAgICAgIC8vIGxvZygneDonK3grXFxcIix5OlxcXCIreSk7XFxuICAgICAgICAgICAgaWYgKG9yZGVyKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybi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xheVVybExpc3QpO1xcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgZXh0cmEubmFtZUxpc3QgPSBbXTtcXG4gICAgICAgICAgICBleHRyYS5wbGF5VXJsTGlzdCA9IFtdO1xcbiAgICAgICAgfVxcbiAgICAgICAgZnVuY3Rpb24gZ2V0TXlVcmxzKHVybHMpe1xcbiAgICAgICAgICAgIHJldHVybiB1cmxzLm1hcCgoaXQpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHR1cmwgPSBpdC5zcGxpdCgnOycpWzBdO1xcbiAgICAgICAgICAgICAgICBpZiAoaXQuaW5jbHVkZXMoXFxcIiNpc1ZpZGVvPXRydWUjXFxcIikgJiYgIXR1cmwuaW5jbHVkZXMoXFxcIiNpc1ZpZGVvPXRydWUjXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIHR1cmwgKz0gXFxcIiNpc1ZpZGVvPXRydWUjXFxcIjtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gdHVybFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgZnVuY3Rpb24gZ2V0TXlIZWFkZXJzKHVybHMpe1xcbiAgICAgICAgICAgIHJldHVybiB1cmxzLm1hcCgoaXQpID0+IHtcXG4gICAgICAgICAgICAgICAgaWYgKCEvOy8udGVzdChpdCkgfHwgaXQuc3BsaXQoJzsnKS5sZW5ndGggPCAyKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge31cXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBoZWFkID0gaXQuc3BsaXQoJzsnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgIGlmICghL0AvLnRlc3QoaGVhZCkgfHwgIS97fH0vLnRlc3QoaGVhZCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge31cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGhlYWQgPSBoZWFkLnNwbGl0KFxcXCJ7XFxcIilbMV0uc3BsaXQoXFxcIn1cXFwiKVswXTtcXG4gICAgICAgICAgICAgICAgICAgIC8vaGVhZCA9IGhlYWQucmVwbGFjZSgve3x9L2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgaGVhZCA9IGhlYWQuc3BsaXQoJyYmJyk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgb2JqID0ge307XFxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIGhlYWQpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQga2V5ID0gaGVhZFtpXS5zcGxpdCgnQCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVsxXS5yZXBsYWNlKC87LywgJ++8m++8mycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG9ialtrZXldID0gdmFsdWU7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2JqXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGZ1bmN0aW9uIGdldE15UGxheVVybExpc3QoKXtcXG4gICAgICAgICAgICBpZihBcnJheS5pc0FycmF5KGV4dHJhLnBsYXlVcmxMaXN0KSl7XFxuICAgICAgICAgICAgICAgIC8vIHJldHVybiBleHRyYS5wbGF5VXJsTGlzdC5tYXAoaXQ9Pid2aWRlbzovLycraXQucmVwbGFjZSgnP3VybD0nLCc/aWQ9Jyt0KycmdXJsPScpLnJlcGxhY2UoJz92PScsJz9pZD0nK3QrJyZ2PScpKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGV4dHJhLnBsYXlVcmxMaXN0Lm1hcChpdD0+J3ZpZGVvOi8vJytpdCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBbXVxcbiAgICAgICAgfVxcblxcblxcbiAgICAgICAgaWYoIXdpdGhCYXRjaE9yZGVyfHxzdHJUaXRsZSkgey8v5LiN5byA5aSa57q/6Lev6aG65bqP5LyY5YWI5oiW6ICF5oyH5a6a5LqG6Kej5p6QXFxuICAgICAgICAgICAgdXJsID0gUGFyc2VTW3N0cl0odmlwVXJsLHRpbWVvdXQpO1xcbiAgICAgICAgfVxcbiAgICAgICAgZWxzZXsvL+W8gOS6huWkmue6v+i3r+mhuuW6j+S8mOWFiOaJp+ihjOWFjeWXheWkmuS7u+WKoVxcbiAgICAgICAgICAgIGlmKHR5cGVvZiBQYXJzZVNbc3RyXSA9PSAnZnVuY3Rpb24nJiYhL+mAmuWFjS8udGVzdChQYXJzZVNbc3RyXS50b1N0cmluZygpKSl7XFxuICAgICAgICAgICAgICAgIHBhcnNlcy51bnNoaWZ0KHtuYW1lOnN0cn0pOyAvL+aKiuS4u+mFjee9rueahOWFjeWXheaOouWKoOWFpeWIsOWkmuS7u+WKoeWIl+ihqFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBwYXJzZXMgPSBBcnJTZXQocGFyc2VzLCduYW1lJyk7IC8v5Y676YeNXFxuICAgICAgICAgICAgaWYodXNlX214KSB7IC8vIOWmguaenOS9v+eUqOWFjeWXhSzlhYjlpJrku7vliqHot5HlhY3ll4VcXG4gICAgICAgICAgICAgICAgdmFyIGNvdW50ID0gcGFyc2VzLmxlbmd0aDsgLy/orr7nva7ku7vliqHmlbDph49cXG4gICAgICAgICAgICAgICAgbG9nKCfprZTmlq3lvIDlkK/lpJrku7vliqHop6PmnpAs5Lu75Yqh5pWw6YePOicgKyBjb3VudCk7XFxuICAgICAgICAgICAgICAgIGxvZygn6Kej5p6Q5YiX6KGoOicgKyBKU09OLnN0cmluZ2lmeShwYXJzZXMpKTtcXG4gICAgICAgICAgICAgICAgdmFyIHBhcnNlUmV0ID0gW107IC8v6Kej5p6Q57uT5p6c5YiX6KGoXFxuICAgICAgICAgICAgICAgIGxldCB0YXNrcyA9IHBhcnNlcy5tYXAoKGl0LCBpZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmM6IHRhc2ssXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW06IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogaXQubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcnVsZTppdC5ydWxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aXBVcmw6IHZpcFVybCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltZW91dDogdGltZW91dFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IFxcXCJ0YXNrXFxcIiArIGlkZXhcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHNob3dMb2FkaW5nKFxcXCLprZTmlq3lubblj5Hop6PmnpDkuK3vvIzliankvZnop6PmnpA6XFxcIiArIGNvdW50KTtcXG5cXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gaXNEbShyZXQpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICghcmV0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWVcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBoYXNEbShyZXQuc3BsaXQoJyMnKVswXS5zcGxpdCgnOycpWzBdLCBkbVVybHMpXFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgYmUodGFza3MsIHtcXG4gICAgICAgICAgICAgICAgICAgIGZ1bmM6IGZ1bmN0aW9uIChvYmosIGlkLCBlcnJvciwgcmV0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLnm5HlkKzliLDku7vliqFcXFwiICsgaWQgKyAn5bey57uT5p2fLGVycm9yOicgKyBlcnJvciArICcscmV0OicgKyByZXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldCA9IHJldCB8fCAnJztcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVJldC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFzazogaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldDogcmV0LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiB0YXNrcy5maWx0ZXIoaXQgPT4gaXQuaWQgPT09IGlkKVswXS5wYXJhbS5uYW1lXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNpbmdsZUJhY2spIHsvL+WQiuavm+aooeW8j+W8gOWni+eahOivnSzliKTmlq1yZXTmnInmlYjmgKdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCfku7vliqEnICsgaWQgKyAn57uT5p6c5piv5ZCK5q+bPycgKyBpc0RtKHJldCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWlzRG0ocmV0KSAmJiBQYXJzZVMuaXNWaWRlbyhyZXQuc3BsaXQoJyMnKVswXS5zcGxpdCgnOycpWzBdKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn5ZCK5q+b5qih5byP5Lit5pat6Kej5p6Q5bm26L+U5Zue6KeG6aKRJyArIHJldCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2JyZWFrJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50IC09IDE7IC8v5a6M5oiQ5LqG5Lu75Yqh77yM5Lu75Yqh5pWw6YePLTFcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2xvZyhvYmopO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb3VudCA+IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcIumtlOaWreW5tuWPkeino+aekOS4re+8jOWJqeS9meino+aekDpcXFwiICsgY291bnQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgcGFyYW06IHsvL+S8oOWIsOebkeWQrOWHveaVsOeahG9iauWPguaVsOmHjFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhpOiBcXFwiY2NjXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7Ly/miafooYzlpJrku7vliqFcXG4gICAgICAgICAgICAgICAgLy8gbGV0IHZhbHVhYmxlID0gcGFyc2VSZXQuZmlsdGVyKGl0PT4vbTN1OHxtcDQvLnRlc3QoaXQucmV0KSk7XFxuICAgICAgICAgICAgICAgIGxvZyhcXFwi5aSa5Lu75Yqh5omn6KGM57uT5p6c5pWwOlxcXCIgKyBwYXJzZVJldC5sZW5ndGgpO1xcbiAgICAgICAgICAgICAgICBsZXQgdmFsdWFibGUgPSBbXTtcXG4gICAgICAgICAgICAgICAgcGFyc2VSZXQuZm9yRWFjaCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICBpZihpdC5yZXQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKC9uYW1lcy8udGVzdChpdC5yZXQpJiYvdXJscy8udGVzdChpdC5yZXQpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCflsJ3or5XogZrlkIjop6PmnpDop6PljIU6JytpdC5yZXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJldHMgPSBKU09OLnBhcnNlKGl0LnJldC5yZXBsYWNlKC8jaXNWaWRlbz10cnVlIy9nLCcnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXRzLm5hbWVzLmZvckVhY2goKG5hbWUsaWRleCk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1YWJsZS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTpuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXQ6cmV0cy51cmxzW2lkZXhdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXNrOml0LnRhc2ssXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coJ+ino+WMheWPkeeUn+mUmeivrzonK2UubWVzc2FnZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihQYXJzZVMuaXNWaWRlbyhpdC5yZXQuc3BsaXQoJyMnKVswXS5zcGxpdCgnOycpWzBdKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVhYmxlLnB1c2goaXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGl0LnJldC5zdGFydHNXaXRoKCd2aWRlbzovLycpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWFibGUucHVzaChpdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgLy8gbGV0IHZhbHVhYmxlID0gcGFyc2VSZXQuZmlsdGVyKGl0ID0+IGl0LnJldCAmJiBQYXJzZVMuaXNWaWRlbyhpdC5yZXQuc3BsaXQoJyMnKVswXS5zcGxpdCgnOycpWzBdKSk7XFxuICAgICAgICAgICAgICAgIHZhbHVhYmxlID0gdmFsdWFibGUuZmlsdGVyKGl0ID0+ICFpc0RtKGl0LnJldCkpOy8v6L+H5ruk5ZCK5q+b6KeG6aKRXFxuICAgICAgICAgICAgICAgIGxvZygn5aSa5Lu75Yqh6aG65bqP5omn6KGM5pyJ5pWI57uT5p6cOicgKyBKU09OLnN0cmluZ2lmeSh2YWx1YWJsZSkpO1xcbiAgICAgICAgICAgICAgICBpZiAodmFsdWFibGUubGVuZ3RoID4gMSkgey8v5aSa57q/6LevXFxuICAgICAgICAgICAgICAgICAgICB2YWx1YWJsZSA9IHNvcnRCeUtleSh2YWx1YWJsZSwgJ3Rhc2snLCB0cnVlKTsvL+WNh+W6j+aOkuWIl1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybHMgPSB2YWx1YWJsZS5tYXAoaXQgPT4gaXQucmV0KTsvL+WPluWHuumTvuaOpSznvJPlrZjliY3nmoRcXG4gICAgICAgICAgICAgICAgICAgIGlmIChnZXRWYXIoJ2RwLmNhY2hlVmlkZW8nLCAndHJ1ZScpID09PSAndHJ1ZScgJiYgcGFyc2VJbnQoZ2V0QXBwVmVyc2lvbigpKSA+PSAyMjU1KSB7Ly/lvIDlp4vnvJPlrZhcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuWwiuaVrOeahOmtlOaWreeUqOaIt++8jOinhumikee8k+WtmOW3suWQr+eUqO+8jOivt+WwveaDheS6q+WPl+eci+WJp+aXtuWFiVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb3NDYWNoZSA9IHVybHMubWFwKChpdCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZGVycyA9IHt9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXQuc3BsaXQoXFxcIjtcXFwiKS5sZW5ndGggPiAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZCA9IGl0LnNwbGl0KCc7JylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL0AvLnRlc3QoaGVhZCkgJiYgL3t8fS8udGVzdChoZWFkKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vaGVhZCA9IGhlYWQucmVwbGFjZSgve3x9L2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQgPSBoZWFkLnNwbGl0KFxcXCJ7XFxcIilbMV0uc3BsaXQoXFxcIn1cXFwiKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdCgnJiYnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIGhlYWQpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGtleSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gaGVhZFtpXS5zcGxpdCgnQCcpWzFdLnJlcGxhY2UoLzsvLCAn77yb77ybJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnNba2V5XSA9IHZhbHVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBpdC5zcGxpdChcXFwiO1xcXCIpWzBdLnNwbGl0KFxcXCIjXFxcIilbMF0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogaGVhZGVyc1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRhdGEgPSBiYXRjaENhY2hlTTN1OCh2aWRlb3NDYWNoZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YSA9IGRhdGEubWFwKChpdCwgaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGV4dHJhID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmxzW2lkXS5zcGxpdChcXFwiO1xcXCIpLmxlbmd0aCA+IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gXFxcIjtcXFwiICsgdXJsc1tpZF0uc3BsaXQoXFxcIjtcXFwiKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh1cmxzW2lkXS5zcGxpdChcXFwi4piFXFxcIikubGVuZ3RoID4gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBcXFwi4piFXFxcIiArIHVybHNbaWRdLnNwbGl0KFxcXCLimIVcXFwiKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXQgKyBcXFwiXFxcIiAhPT0gXFxcIm51bGxcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXQgKyBleHRyYVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNbaWRdXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmxzID0gZGF0YVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgLy8gbG9nKCfmjpLluo/lrozmr5XlkI7nu5Pmnpw6JytKU09OLnN0cmluZ2lmeSh2YWx1YWJsZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWVzID0gdmFsdWFibGUubWFwKGl0ID0+IGl0Lm5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWRlcnMgPSBnZXRNeUhlYWRlcnModXJscyk7XFxuICAgICAgICAgICAgICAgICAgICB1cmxzID0gZ2V0TXlVcmxzKHVybHMpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYoTXlKaWV4aS5hdXRvTW9kZSA9PT0gJ+WXheaOouS8mOWFiCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybHMgPSB1cmxzLmNvbmNhdChnZXRNeVBsYXlVcmxMaXN0KCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzID0gbmFtZXMuY29uY2F0KGV4dHJhLm5hbWVMaXN0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBoZWFkZXJzID0gaGVhZGVycy5jb25jYXQoZXh0cmEubmFtZUxpc3QubWFwKChpdCk9PntyZXR1cm4ge319KSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe3VybHM6IHVybHMsIGhlYWRlcnM6IGhlYWRlcnMsIG5hbWVzOiBuYW1lc30pO1xcblxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHZhbHVhYmxlLmxlbmd0aCA9PT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGV4dHJhLm5hbWVMaXN0Lmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBoaWRlTG9hZGluZygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/oiq3mr5RR5LqGLOWkmuS7u+WKoeWFjeWXheino+aekOWFqOWGm+imhuayoeW5tuS4lOayoeacieWPr+eUqOeahGpzb258eDXop6PmnpDkuoYnXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBzaG93TG9hZGluZyhcXFwi6a2U5pat5aSa5Lu75Yqh5YWN5ZeF5aSx6LSlLOWwneivlWpzb258eDVcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIC8v5o6S6Zmk56ys5LiA5LiqXFxuICAgICAgICAgICAgICAgICAgICBsZXQgZXh0cmEyID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0OiBleHRyYS5uYW1lTGlzdCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwbGF5VXJsTGlzdDogZXh0cmEucGxheVVybExpc3Quc2xpY2UoMSksXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBpZihNeUppZXhpLmF1dG9Nb2RlID09PSAn5ZeF5o6i5LyY5YWIJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogZ2V0TXlQbGF5VXJsTGlzdCgpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lczogZXh0cmEubmFtZUxpc3RcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBQYXJzZVMuZGVmYXVsdFBhcnNlV2ViID8gUGFyc2VTLmRlZmF1bHRQYXJzZVdlYihleHRyYS5wbGF5VXJsTGlzdFswXSwgdGltZW91dCwgZXh0cmEyKSA6IGV4dHJhLnBsYXlVcmxMaXN0WzBdO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgLy8gbG9nKGV4dHJhLnBsYXlVcmxMaXN0WzBdKTtcXG4gICAgICAgICAgICAgICAgICAgIC8vIGxvZyhleHRyYTIpO1xcblxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgLy8g5YWN5ZeF5ZCO5Y+q5pyJ5LiA5Liq57uT5p6cLOWXheaOouS8mOWFiOiHquWKqOaLvHg15ZKManNvbiwg6aG65bqP5LyY5YWI6Ieq5Yqo6L+U5Zue5LiA5Liq5pKt5pS+6ZO+5o6lXFxuICAgICAgICAgICAgICAgICAgICBpZihNeUppZXhpLmF1dG9Nb2RlID09PSAn5ZeF5o6i5LyY5YWIJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmxzID0gdmFsdWFibGUubWFwKGl0ID0+IGl0LnJldCk7Ly/lj5blh7rpk77mjqUs57yT5a2Y5YmN55qEXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWVzID0gdmFsdWFibGUubWFwKGl0ID0+IGl0Lm5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWFkZXJzID0gZ2V0TXlIZWFkZXJzKHVybHMpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybHMgPSBnZXRNeVVybHModXJscyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXMgPSBuYW1lcy5jb25jYXQoZXh0cmEubmFtZUxpc3QpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybHMgPSB1cmxzLmNvbmNhdChnZXRNeVBsYXlVcmxMaXN0KCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGhlYWRlcnMgPSBoZWFkZXJzLmNvbmNhdChleHRyYS5uYW1lTGlzdC5tYXAoKGl0KT0+e3JldHVybiB7fX0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmxzOiB1cmxzLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lczogbmFtZXMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6aGVhZGVyc1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVhYmxlWzBdLnJldFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfWVsc2V7IC8vIOe6r3ZpZGVvOi8v5YiG5pSvXFxuICAgICAgICAgICAgICAgIGlmIChleHRyYS5uYW1lTGlzdC5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICBoaWRlTG9hZGluZygpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+iKreavlFHkuoYs5aSa5Lu75Yqh5YWN5ZeF6Kej5p6Q5YWo5Yab6KaG5rKh5bm25LiU5rKh5pyJ5Y+v55So55qEanNvbnx4Neino+aekOS6hidcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBsb2coXFxcIumtlOaWreWkmuS7u+WKoeWFjeWXheWksei0pSzlsJ3or5Vqc29ufHg1XFxcIik7XFxuICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICB1cmxzOiBnZXRNeVBsYXlVcmxMaXN0KCksXFxuICAgICAgICAgICAgICAgICAgICBuYW1lczogZXh0cmEubmFtZUxpc3RcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgaWYoL15oaWtlcjp8XnRvYXN0OnxecnVsZTp8Xng1UnVsZTp8XndlYlJ1bGU6fF5zZWxlY3QvLnRlc3QodXJsKSl7XFxuICAgICAgICAgICAgcmV0dXJuIHVybDtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmKCF1cmwmJiEvXmh0dHAvLnRlc3QodmlwVXJsKSl7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mtlOaWreino+aekOWksei0pT4nK3ZpcFVybFxcbiAgICAgICAgfVxcbiAgICAgICAgLy8gbG9nKHZpcFVybCsn5YWN5ZeF5o6i57uT5p6cOicrdXJsKTtcXG4gICAgICAgIGlmICgvXlxcXFwvLy50ZXN0KHVybCkpIHtcXG4gICAgICAgICAgICB1cmwgPSAnaHR0cHM6JyArIHVybFxcbiAgICAgICAgfVxcbiAgICAgICAgLy8g6a2U5pat5YWN5ZeF5oiq5Y+WXFxuICAgICAgICAvLyBpZiAoLz1odHRwLy50ZXN0KHVybCkpIHtcXG4gICAgICAgIC8vICAgICB1cmwgPSAvJnVybD0vLnRlc3QodXJsKSA/IHVybCA6ICdodHRwJyArIGRlY29kZVVSSUNvbXBvbmVudCh1cmwuc3BsaXQoJz1odHRwJylbMV0pO1xcbiAgICAgICAgLy8gfVxcbiAgICAgICAgLyppZih1cmwubWF0Y2goL21ndHYuY29tL2cpPT0nbWd0di5jb20nKXtcXG4gICAgIC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ZXJfeHg6IGZ1bmN0aW9uKGp1cmwsIExhYmVsKSB7XFxuICAgICAgICByZXR1cm4gJChqdXJsKS5sYXp5UnVsZSgoaykgPT4ge1xcbiAgICAgICAgICAgIHZhciBqc1VybCA9IEpTT04ucGFyc2UoZmV0Y2goZ2V0VmFyKCdvbGRDb25maWcnKSkpLmNqO1xcbiAgICAgICAgICAgIHZhciBMYWJlbCA9IGs7XFxuICAgICAgICAgICAgdmFyIGZhID0gWydsZXR2JywgJ3BwdHYnLCAncXEnLCAneW91a3UnLCAncWl5aScsICdpcWl5aScsICdtZ3R2JywgJ2JpbGliaWxpJywgJ3NvaHUnLCAnbWlndScsICdtMTkwNScsICd2aXAnXTtcXG4gICAgICAgICAgICB2YXIgaHRtbCA9IHBhcnNlRG9tKHJlcXVlc3QoaW5wdXQpLCBMYWJlbCk7XFxuICAgICAgICAgICAgZXZhbChodG1sLnJlcGxhY2UoL3BsYXllcl8uKj89ey8sICdwZGF0YT17JykpO1xcbiAgICAgICAgICAgIGV2YWwoZmV0Y2goanNVcmwpKTtcXG4gICAgICAgICAgICBpZiAocGRhdGEudXJsLnN1YnN0cigwLCA4KS5tYXRjaCgvSlQuLkpULi4vKSkge1xcbiAgICAgICAgICAgICAgICBwZGF0YS51cmwgPSBiYXNlNjREZWNvZGUocGRhdGEudXJsKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKHBkYXRhLnVybC5zdWJzdHIoMCwgOCkubWF0Y2goLyUuLiUuLi8pKSB7XFxuICAgICAgICAgICAgICAgIHBkYXRhLnVybCA9IHVuZXNjYXBlKHBkYXRhLnVybCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChmYS5pbmNsdWRlcyhwZGF0YS5mcm9tKSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHBkYXRhLnVybCk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHBkYXR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dteUZ1bmN0aW9uJywgZnVuY3Rpb25Db2RlKTtcXG4gICAgc2V0SXRlbSgndXBkYXRlRGF0ZScsIHVwZGF0ZURhdGUpO1xcbn1cXG52YXIgYmpJdGVtID0ge1xcbiAgICBoZlBsdWdpbjogZnVuY3Rpb24ocGFyc2VSb3V0ZSkge1xcbiAgICAgICAgcmV0dXJuICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICBpZiAoZmlsZUV4aXN0KGspKSB7XFxuICAgICAgICAgICAgICAgIHZhciBjamNhY2hlID0gZ2V0VmFyKCdjakNhY2hlJyk7XFxuICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2goaykpO1xcbiAgICAgICAgICAgICAgICBqc29uLnNldHRpbmdzLmNqID0gY2pjYWNoZTtcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKGssICQuc3RyaW5naWZ5KGpzb24pKTtcXG4gICAgICAgICAgICAgICAgdmFyIG9sZFJvdXRlID0gZ2V0VmFyKCdvbGRDb25maWcnKTtcXG4gICAgICAgICAgICAgICAgdmFyIG9sZENvbmZpZyA9IGpzb24uc2V0dGluZ3M7XFxuICAgICAgICAgICAgICAgIG9sZENvbmZpZy5jaiA9IGNqY2FjaGU7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShvbGRSb3V0ZSwgJC5zdHJpbmdpZnkob2xkQ29uZmlnKSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aBouWkjeaIkOWKnyc7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mcgOimgeWFiOaLieWPluWIl+ihqCdcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCBwYXJzZVJvdXRlKVxcbiAgICB9LFxcbiAgICBwdWxsQ29kZTogZnVuY3Rpb24oaykge1xcbiAgICAgICAgcmV0dXJuICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICB2YXIgcHVsbE1vZGUgPSBrWzBdO1xcbiAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0ga1sxXTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VGaWxlID0gZmV0Y2gocGFyc2VSb3V0ZSk7XFxuICAgICAgICAgICAgaWYgKCFwYXJzZUZpbGUpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHNldHRpbmdzID0gZmV0Y2goZ2V0VmFyKCdvbGRDb25maWcnKSk7XFxuICAgICAgICAgICAgICAgIHNldHRpbmdzID0gIXNldHRpbmdzID8ge30gOiBKU09OLnBhcnNlKHNldHRpbmdzKTtcXG4gICAgICAgICAgICAgICAgdmFyIGpzb24gPSB7fTtcXG4gICAgICAgICAgICAgICAganNvbi5zZXR0aW5ncyA9IHNldHRpbmdzO1xcbiAgICAgICAgICAgICAgICBqc29uLnRpdGxlID0gW107XFxuICAgICAgICAgICAgICAgIGpzb24uY29kZXMgPSB7fTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIHBhcnNlRmlsZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBwYXJzZVRpdGxlID0gW107XFxuICAgICAgICAgICAgdmFyIHBhcnNlQ29kZT17fTtcXG4gICAgICAgICAgICB2YXIgY2pMaW5rID0gZ2V0VmFyKCdwbHVnaW5MaW5rJyk7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgaWYoL0BiYXNlNjQ6XFxcXC9cXFxcLy8udGVzdChjakxpbmspKXtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoYmFzZTY0RGVjb2RlKGNqTGluay5zcGxpdCgnQGJhc2U2NDovLycpWzFdKSk7XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKC/mj5Lku7blkI0vLnRlc3QoY2pMaW5rKSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcmVhbExpbmsgPSBjakxpbmsuc3BsaXQoJ+aPkuS7tuWQjScpWzBdLnJlcGxhY2UoL1tcXFxcc10vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICBsb2coJ+ino+aekOS6keWJquWIh+advzonK3JlYWxMaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB5UGFzdGUgPSBwYXJzZVBhc3RlKHJlYWxMaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmKC9AYmFzZTY0OlxcXFwvXFxcXC8vLnRlc3QoeVBhc3RlKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChiYXNlNjREZWNvZGUoeVBhc3RlLnNwbGl0KCdAYmFzZTY0Oi8vJylbMV0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZW9mIFBhcnNlUz09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mi4nlj5bkuKrpuKHmr5vmj5Lku7Ys6YeM6Z2i6L+eUGFyc2VT5a+56LGh6YO95rKh5pyJISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6bih5q+b5o+S5Lu25omn6KGM5oql6ZSZOlxcXFxuJytlLm1lc3NhZ2U7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+acquiDveivhuWIq+S6keWJquWIh+adv+S4reeahOWGheWuuTpcXFxcbicreVBhc3RlLnN1YnN0cmluZygwLDEwMCk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2pMaW5rID09PSAnUeelnicpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBqaWV4aSA9IGZldGNoKCdoaWtlcjovL2ZpbGVzL2ppZXhpL2ppZXhpLnR4dCcpLnNwbGl0KCdcXFxcbicpO1xcbiAgICAgICAgICAgICAgICAgICAgZm9yIChpIGluIGppZXhpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlPWppZXhpW2ldLnNwbGl0KCcmJicpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlPWppZXhpW2ldLnNwbGl0KCcmJicpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlW3RpdGxlXT1jb2RlO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIH1lbHNlIGlmKC9eI1thLXpBLVowLTldezIsMTB9JC8udGVzdChjakxpbmspKXsvL+emj+WIqeWPo+S7pDLliLAxMOS9jVxcbiAgICAgICAgICAgICAgICBlbHNlIGlmKC9eI1tcXFxcU117MiwxMH0kLy50ZXN0KGNqTGluaykpey8v56aP5Yip5Y+j5LukMuWIsDEw5L2N5Lu75oSP6Z2e56m65a2X56ym5LiyXFxuICAgICAgICAgICAgICAgICAgICBjb25zdCB7dGFza0NhbGwsIHRhc2tSdW4sdGFza1JlcX0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS90YXNrQ2FsbD9ydWxlPemBk+mVv+S7k+W6k1Byb1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgLy8gbG9nKCflvIDlp4vmiafooYzku7vliqHku5PlupPojrflj5bmlq3lv7Xmj5Lku7bnpo/liKnlj6Pku6QnKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCByZXN1bHQgPSB0YXNrQ2FsbCgxNywnRG5GdWxpJyxbY2pMaW5rXSk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0LnN0YXR1cyA9PT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXQgPSBKU09OLnBhcnNlKHJlc3VsdC5yZXN1bHQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZyhyZXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHJldC5vcHQ9PT0nZXJyb3InKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycrcmV0Lm1zZztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihyZXQub3B0PT09J3VybCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IGZldGNoKHJldC5yZXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXJyID0gaHRtbC5pbmNsdWRlcygnaHR0cCcpPyBodG1sOmJhc2U2NERlY29kZShodG1sKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGppZXhpID0gYXJyLm1hdGNoKC9bXFxcXFNdKj8sLio/W1xcXFxzXS9nKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSBpbiBqaWV4aSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlPWppZXhpW2ldLnNwbGl0KCcsJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZT1qaWV4aVtpXS5zcGxpdCgnLCcpWzFdLnNwbGl0KFxcXCJcXFxcblxcXCIpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIS9eaHR0cHxmdW5jdGlvbi8udGVzdChjb2RlKSYmY29kZS5sZW5ndGg+MjApey8vYmFzZTY057yW56CB55qE5Ye95pWwXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29kZSA9IGJhc2U2NERlY29kZShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPS9mdW5jdGlvbi8udGVzdChjb2RlKT9ldmFsKGNvZGUpOmNvZGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihyZXQub3B0PT09J2p4Jyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKC9bXFxcXFNdKj8saHR0cFtcXFxcU10vLnRlc3QocmV0LnJldCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gcmV0LnJldC5zcGxpdCgnLCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSByZXQucmV0LnNwbGl0KCcsJylbMV0uc3BsaXQoJ1xcXFxuJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlLnB1c2godGl0bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlW3RpdGxlXT1jb2RlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZigvXmh0dHAvLnRlc3QocmV0LnJldCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gY2pMaW5rLnNwbGl0KCcjJylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IHJldC5yZXQuc3BsaXQoJ1xcXFxuJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlLnB1c2godGl0bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlW3RpdGxlXT1jb2RlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mnKrnn6XnmoTnpo/liKk6XFxcXG4nK3JldC5yZXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihyZXQub3B0PT09J3ZpcEp4Jyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGNqTGluay5zcGxpdCgnIycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IHJldC5yZXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZyhjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlW3RpdGxlXT0vZnVuY3Rpb24vLnRlc3QoY29kZSk/ZXZhbChjb2RlKTpjb2RlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ku5PlupPpnZ7mnIDmlrDniYjmiJbogIXnpo/liKnnpL7lip/og73lvIDlj5HkuK0nXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKGNqTGluaz09PSfmlq3mj5InKXtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvUGFyc2VfRG4uanNcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlPU9iamVjdC5rZXlzKFBhcnNlUyk7XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKC9eaGlrZXI6XFxcXC9cXFxcL3xeZmlsZTpcXFxcL1xcXFwvfF5odHRwfF5cXFxcL3N0b3JhZ2VcXFxcL3xeXFxcXC9zZGNhcmRcXFxcLy8udGVzdChjakxpbmspKXtcXG4gICAgICAgICAgICAgICAgICAgIGlmKC9eXFxcXC9zdG9yYWdlXFxcXC98XlxcXFwvc2RjYXJkXFxcXC8vLnRlc3QoY2pMaW5rKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2pMaW5rID0gJ2ZpbGU6Ly8nK2NqTGluaztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goY2pMaW5rKSk7XFxuICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlPU9iamVjdC5rZXlzKFBhcnNlUyk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aLieWPluWPo+S7pOacieivrydcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgbG9nKGUubWVzc2FnZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBqeEp1ZGdlID0gdHlwZW9mIFBhcnNlUyA9PSAnb2JqZWN0JztcXG4gICAgICAgICAgICB2YXIgbGJKdWRnZSA9IHR5cGVvZihwYXJzZVRpdGxlKSA9PSAnb2JqZWN0JztcXG4gICAgICAgICAgICBpZiAoanhKdWRnZSB8fCBsYkp1ZGdlKSB7XFxuICAgICAgICAgICAgICAgIC8vIGlmIChwdWxsTW9kZSA9PT0gJ+WIl+ihqCcpIHtcXG4gICAgICAgICAgICAgICAgLy8gICAgIGlmICghbGJKdWRnZSkge1xcbiAgICAgICAgICAgICAgICAvLyAgICAgICAgIHBhcnNlVGl0bGUgPSBPYmplY3Qua2V5cyhQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICAvLyAgICAgfVxcbiAgICAgICAgICAgICAgICAvLyAgICAgdmFyIG5ld1BhcnNlVGl0bGUgPSBqc29uLnRpdGxlLmNvbmNhdChwYXJzZVRpdGxlKTtcXG4gICAgICAgICAgICAgICAgLy8gICAgIGpzb24udGl0bGUgPSBBcnJheS5mcm9tKG5ldyBTZXQobmV3UGFyc2VUaXRsZSkpO1xcbiAgICAgICAgICAgICAgICAvLyB9XFxuICAgICAgICAgICAgICAgIC8vIOS4jeeuoeaLieWPluS7o+eggei/mOaYr+WIl+ihqOmDveimgeaKiuWIl+ihqOaLieS6hlxcbiAgICAgICAgICAgICAgICBpZiAoIWxiSnVkZ2UpIHtcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUgPSBPYmplY3Qua2V5cyhQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKHBhcnNlVGl0bGUpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHZhciBzY09iamVjdCA9IFtcXFwiQ2l0eUlQXFxcIiwgXFxcInBjVUFcXFwiLCBcXFwiY2FjaGVNM3U4XFxcIixcXFwiaXNWaWRlb1xcXCIsXFxcInRpbWVPdXRcXFwiLFxcXCLmupDnoIHljLnphY1cXFwiLCBcXFwiZGVmYXVsdFBhcnNlXFxcIixcXFwiZGVmYXVsdFBhcnNlV2ViXFxcIixcXFwibWFvc3NcXFwiLCBcXFwiTExRXFxcIixcXFwicGFyc2VMY1xcXCJdO1xcbiAgICAgICAgICAgICAgICBwYXJzZVRpdGxlID0gcGFyc2VUaXRsZT9wYXJzZVRpdGxlLmZpbHRlcihpdD0+IXNjT2JqZWN0LmluY2x1ZGVzKGl0KSk6W107XFxuICAgICAgICAgICAgICAgIHZhciBuZXdQYXJzZVRpdGxlID0ganNvbi50aXRsZS5jb25jYXQocGFyc2VUaXRsZSk7XFxuICAgICAgICAgICAgICAgIGpzb24udGl0bGUgPSBBcnJheS5mcm9tKG5ldyBTZXQobmV3UGFyc2VUaXRsZSkpO1xcblxcbiAgICAgICAgICAgICAgICBpZiAocHVsbE1vZGUgPT09ICfku6PnoIEnKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9yaWdpbmFsUGFyc2VTID09ICdvYmplY3QnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSBpbiBzY09iamVjdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgb3JpZ2luYWxQYXJzZVNbc2NPYmplY3RbaV1dO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBvcmlnaW5hbFBhcnNlUyA9b3JpZ2luYWxQYXJzZVMuZmlsdGVyKGl0PT4hc2NPYmplY3QuaW5jbHVkZXMoT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMoaXQpWzBdKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBvcmlnaW5hbFBhcnNlUyk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZihQYXJzZVMpPT1cXFwidW5kZWZpbmVkXFxcIil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2RlcywgcGFyc2VDb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9yZXR1cm4gXFxcInRvYXN0Oi8v5rKh5pyJ5Luj56CB77yM5LiN5Y+v5ouJ5Y+WXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKGpzb24uY29kZXMsIFBhcnNlUyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vdmFyIG5ld0ZpbGUgPSB0b29scy50b0pTT04oanNvbik7Ly/oh6rlrprkuYlzdHJpbmdpZnnlh73mlbDvvIzluKbmnInovazkuYnlrZfnrKZcXG4gICAgICAgICAgICAgICAgdmFyIG5ld0ZpbGUgPSAkLnN0cmluZ2lmeShqc29uKTsgLy9KU09OLnBhcnNl5Lya5oql6ZSZXFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCBuZXdGaWxlKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ouJ5Y+WJyArIHB1bGxNb2RlICsgJ+aIkOWKnyc7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+acquiOt+WPluWIsOWvueixoSc7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgW2ssIF9teVNldC5wYXJzZVJvdXRlXSlcXG4gICAgfSxcXG4gICAgcHVsbFNjcmlwdDogZnVuY3Rpb24oY2osIHg1KSB7XFxuICAgICAgICByZXR1cm4gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaykgPT4ge1xcbiAgICAgICAgICAgIHZhciBjakZyb20gPSAnaGlrZXI6Ly9wYWdlL1BhcnNlX0RuLmpzP3J1bGU9TXlGaWVsZOG0sOKBvyc7XFxuICAgICAgICAgICAgdmFyIHg1RnJvbSA9ICdoaWtlcjovL3BhZ2UvUGFyc2Vf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nNlRG9tRm9ySHRtbChpbnB1dCwgJ3NwYW4mJnRpdGxlJykuc3BsaXQoJ3x8Jyk7XFxuICAgICAgICAgICAgICAgIC8vIOS/ruaUuSzov6rov6osMCAgIOaTjeS9nOexu+WeiyzlkI3np7As57Si5byVXFxuICAgICAgICAgICAgICAgIHZhciB0eXBlID0gbmV3SW5wdXRbMF07XFxuICAgICAgICAgICAgICAgIHZhciBuYW1lID0gbmV3SW5wdXRbMV07XFxuICAgICAgICAgICAgICAgIHZhciBudW0gPSBuZXdJbnB1dFsyXTtcXG4gICAgICAgICAgICAgICAgdmFyIG51bTIgPSBuZXdJbnB1dFszXTtcXG4gICAgICAgICAgICAgICAgc3dpdGNoICh0eXBlKSB7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLliKDpmaRcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrID0gW25hbWUsIG51bV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8g5oC75oSf6KeJ562b6YCJ5oiW6ICF5pCc57Si5ZCO77yM55Sx5LqObnVt55qE5L2N572u5LiN5a+55Y+v6IO95Lya5Yig6Zmk6ZSZLOS6i+WunuWmguatpCzlt7Lkv64/XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcIuWNs+WwhuWIoOmZpDogXFxcIiArIG5hbWUpLmNvbmZpcm0oKGspID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBrWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbnVtID0ga1sxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBnZXRWYXIoJ3BhcnNlUm91dGUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqc29uLmNvZGVzLmhhc093blByb3BlcnR5KG5hbWUpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUganNvbi5jb2Rlc1tuYW1lXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW0gPSBqc29uLnRpdGxlLmluZGV4T2YobmFtZSk7IC8v6L+Z5qC35omN5Lya5b6X5Yiw5q2j56Gu55qE57Si5byVXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24udGl0bGUuc3BsaWNlKG51bSwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+W3suWwhuOAllxcXCIgKyBuYW1lICsgXFxcIuOAl+WIoOmZpFxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgayk7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLpmpDol49cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKFxcXCJoaWtlcjovL2VtcHR5I25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoaykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IGtbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBudW0gPSBrWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGFyc2VSb3V0ZSA9IGdldFZhcigncGFyc2VSb3V0ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpzb24uY29kZXMuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bSA9IGpzb24udGl0bGUuaW5kZXhPZihuYW1lKTsgLy/ov5nmoLfmiY3kvJrlvpfliLDmraPnoa7nmoTntKLlvJVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24udGl0bGUuc3BsaWNlKG51bSwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+W3suWwhuOAllxcXCIgKyBuYW1lICsgXFxcIuOAl+makOiXj1xcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5Y+v6IO95piv5Liq572R5Z2ALCDmgqjlj6/pgInmi6nliKDpmaRcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW25hbWUsIG51bV0pO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi5L+u5pS5XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2lmIChqc29uLmNvZGVzW25hbWVdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5Db2RlID0gbmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGVzID0ganNvbi50aXRsZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbk5hbWUgPSBcXFwi6L+Z5piv5ZCN56ewXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoanNvbi5jb2Rlc1tuYW1lXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuQ29kZSA9IGpzb24uY29kZXNbbmFtZV0udG9TdHJpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbk5hbWUgPSBuYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChcXFwiaGlrZXI6Ly9lbXB0eSNub1JlY29yZEhpc3RvcnkjXFxcIikucnVsZSgoayx0aXRsZXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGQgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChnZXRJdGVtKCdteUZ1bmN0aW9uJykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IGtbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjb2RlID0ga1sxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5L+dIOWtmCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHNhdmVCdXR0b24gKyBcXFwic2F2ZUJ1dHRvbihnZXRWYXIoJ2lucHV0X2VkaXQnKSxuYW1lKTtiYWNrKCk7XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuW7uuiuruaMiem7mOiupOeahOS7o+eggeagvOW8j+S/ruaUueWTplxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0VmFyKCdpbnB1dF9lZGl0JywgaW5wdXQpXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogXFxcIi0xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaWdobGlnaHQ6IHRydWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6ICfkv67mlLnimIUnICsgbmFtZSArICfimIUnICsgY29kZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzZFQjg5N1xcXCI+5qC85byP5Li677ya5pON5L2c57G75Z6L4piF5qCH6aKY4piFZnVuY3Rpb24oKXvoh6rlrprkuYnlhoXlrrl9PGJyPuivt+WLv+Whq+WFpeWFtuS7luagvOW8jycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHNhdmVCdXR0b24sbmFtZSx0aXRsZXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdG1wQXIgPSBnZXRWYXIoJ2lucHV0X2VkaXQnKS5zcGxpdCgn4piFJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodG1wQXIubGVuZ3RoPDIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L+u5pS55qC85byP5pyJ6K+v77yM6K6/6Zeu6KKr5ouS57udJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3TmFtZSA9IHRtcEFyWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG5ld05hbWUhPT1uYW1lJiZ0aXRsZXMuaW5jbHVkZXMobmV3TmFtZSkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn5qOA5rWL5Yiw5ZCM5ZCN5o6l5Y+jOicrbmV3TmFtZSsnLOaYr+WQpuimhueblj8nKS5jb25maXJtKChzYXZlQnV0dG9uLG5hbWUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IHNhdmVCdXR0b24oZ2V0VmFyKCdpbnB1dF9lZGl0JyksbmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+d5a2Y5L+u5pS5XFxcXG7or7foh6rooYzmo4DmtYvopobnm5blkI7nmoTlhoXlrrknO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LHNhdmVCdXR0b24sbmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gc2F2ZUJ1dHRvbihnZXRWYXIoJ2lucHV0X2VkaXQnKSxuYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFjaygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+d5a2Y5L+u5pS5JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYodHlwZW9mKGNvZGUpPT09J3N0cmluZycmJmNvZGUubGVuZ3RoPjIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICByZXR1cm4gY29kZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+d5a2Y5L+u5pS5JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBzYXZlQnV0dG9uLG5hbWUsdGl0bGVzKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfigJjigJjigJnigJk8YmlnPjxiaWc+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiMyOThBMDhcXFwiPuS/nSDlrZgnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtuTmFtZSwgbkNvZGVdLHRpdGxlcykgLy9bbmFtZSwganNvbi5jb2Rlc1tuYW1lXS50b1N0cmluZygpXSlcXG4gICAgICAgICAgICAgICAgICAgIC8qfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5Y+q5pyJ572R5Z2A5oiW6ICF5qCH6aKYLCDkuI3mlK/mjIHkv67mlLlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9Ki9cXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIue9rumhtlxcXCI6XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLnva7lupVcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bSA9IGpzb24udGl0bGUuaW5kZXhPZihuYW1lKTsgLy/ov5nmoLfmiY3kvJrlvpfliLDmraPnoa7nmoTntKLlvJVcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihudW0+LTEpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaXRlbSA9IGpzb24udGl0bGUuc3BsaWNlKG51bSwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24udGl0bGUuc3BsaWNlKG51bTIsIDAsIGl0ZW1bMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/msqHmib7liLA6JytuYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuenu+WKqFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHkjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignYmlhbmppJywgJ+enu+WKqCMnICsgayk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIG51bSk7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLliIbkuqtcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi5LqR5YiG5LqrXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoanNvbi5jb2Rlc1tuYW1lXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGFyc2VUZXh0ID0gdHlwZW9mIGpzb24uY29kZXNbbmFtZV0gPT0gJ2Z1bmN0aW9uJyA/ICQuc3RyaW5naWZ5KGpzb24uY29kZXNbbmFtZV0pIDoganNvbi5jb2Rlc1tuYW1lXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUZXh0ID0gJ015UGFyc2VT4piFJyArIG5hbWUgKyAn4piFJyArIGJhc2U2NEVuY29kZShwYXJzZVRleHQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZVRleHQgPSAn55u06ZO+4piFJyArIGpzb24udGl0bGVbbnVtXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGUgPT0gJ+S6keWIhuS6qycgJiYgcGFyc2VUZXh0LnN1YnN0cigwLCA4KSA9PSAnTXlQYXJzZVMnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGV4dCA9IHNoYXJlUGFzdGUocGFyc2VUZXh0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlVGV4dC5zdWJzdHIoMCwgNikgIT0gJ2Vycm9yOicgPyAnY29weTovLycgKyBwYXJzZVRleHQgKyAnXFxcXG7imIXimIXimIVcXFxcbicgKyAnTXlQYXJzZVPvvJonICsgbmFtZSA6ICd0b2FzdDovL+WIhuS6q+Wksei0pSEh5LqR5Ymq6LS05p2/5Y+v6IO95oyC5LqGJztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2NvcHk6Ly8nICsgcGFyc2VUZXh0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aaguS4jeaUr+aMgSc7XFxuICAgICAgICAgICAgICAgIH0gLy9zd2l0Y2jnmoRcXG4gICAgICAgICAgICB9KSAvL1N0cmluZ+eahFxcbiAgICAgICAgfSkgLy9zdHJpbmdpZnnnmoRcXG4gICAgfSxcXG4gICAgeGpQYXJzZTogZnVuY3Rpb24oKSB7XFxuICAgICAgICByZXR1cm4gJChcXFwiaGlrZXI6Ly9lbXB0eSNub0hpc3RvcnkjXFxcIikucnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGQgPSBbXTtcXG4gICAgICAgICAgICBldmFsKGdldEl0ZW0oJ215RnVuY3Rpb24nKSk7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfkv50g5a2YJyxcXG4gICAgICAgICAgICAgICAgdXJsOiBzYXZlQnV0dG9uICsgXFxcInNhdmVCdXR0b24oaW5wdXQpO2JhY2soKTtjbGVhclZhcignaW5wdXRfYWRkJylcXFwiLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgICAgICAgICAgICAgZGVzYzogXFxcIui+k+WFpeato+ehruagvOW8j+WGheWuuVxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogJ3B1dFZhcihcXFwiaW5wdXRfYWRkXFxcIiwgaW5wdXQpJyxcXG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IFxcXCJ0ZXh0YXJlYVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IFxcXCItMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBoaWdobGlnaHQ6IHRydWUsXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoJ2lucHV0X2FkZCcpLFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8c21hbGw+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiM2RUI4OTdcXFwiPuaMieaPj+i/sOivieagvOW8j+i+k+WFpSwg6K+35Yu/5aGr5YWl5YW25LuW5qC85byPPGJyPuacrOWcsOWPo+S7pDog5pON5L2c57G75Z6L4piF5ZCN56ew4piF5Luj56CBPGJyPuS6keWPo+S7pDog6ZO+5o6l4piF4piF4piF5ZCN56ewOyDnuq/nvZHlnYA6IOebtOmTvuKYhXVybDHimIV1cmwyJyxcXG4gICAgICAgICAgICAgICAgZGVzYzogJ+KAmOKAmOKAmeKAmTxiaWc+PGJpZz48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzI5OEEwOFxcXCI+5L+dIOWtmCcsXFxuICAgICAgICAgICAgICAgIHVybDogJCgnbm9Mb2FkaW5nJykubGF6eVJ1bGUoKHNhdmVCdXR0b24pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzYXZlQnV0dG9uKGdldFZhcignaW5wdXRfYWRkJykpO1xcbiAgICAgICAgICAgICAgICB9LCBzYXZlQnV0dG9uKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgIH0pXFxuICAgIH0sXFxuICAgIHlkUGFyc2U6IGZ1bmN0aW9uKEJKbW9kZSwgaSkge1xcbiAgICAgICAgcmV0dXJuICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICB2YXIgQSA9IGtbMF0uc3BsaXQoJyMnKVsxXTtcXG4gICAgICAgICAgICB2YXIgQiA9IGtbMV07XFxuICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBnZXRWYXIoJ3BhcnNlUm91dGUnKTtcXG4gICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgICAgICB2YXIgaXRlbSA9IGpzb24udGl0bGUuc3BsaWNlKEEsIDEpOyAvLyAxOiDmoIforrDlvIDlp4vkvY3nva7vvIwyOiDliKDpmaTliLDlk6rkuKrkvY3nva5cXG4gICAgICAgICAgICBqc29uLnRpdGxlLnNwbGljZShCLCAwLCBpdGVtWzBdKTsgLy8gMTog5ZCM5LiK77yMMjogMOihqOekuuS4jeWIoOmZpO+8jDM6IOa3u+WKoOWvueixoVxcbiAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgY2xlYXJWYXIoJ2JpYW5qaScpO1xcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZ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gdGV4dC5yZXBsYWNlKFxcXCLigJzigJzigJ3igJ1cXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0nXFxcIiArIGNvbG9yICsgXFxcIic+XFxcIiArIHRleHQgKyBcXFwiPC9mb250PlxcXCI7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAna3pXREsnOiBmdW5jdGlvbihfMHg0ODU0YTksIF8weDNlOThjNSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NDg1NGE5ICsgXzB4M2U5OGM1O1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ1hYeVFyJzogJ+enu+WKqCMnLFxcbiAgICAgICAgICAgICdndFVuaic6IGZ1bmN0aW9uKF8weDU5YWFmNywgXzB4MjJjNjZiKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg1OWFhZjcgKyBfMHgyMmM2NmI7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnVXRmV2YnOiAn4oCY4oCY4oCZ4oCZPHNtYWxsPjxzcGFuIHN0eWxlPVxcXFxcXFwiY29sb3I6I0ZFOUEyRVxcXFxcXFwiPicsXFxuICAgICAgICAgICAgJ1FPdkpWJzogJ+enu+WKqDogJyxcXG4gICAgICAgICAgICAnQUJFd0InOiAn4oCY4oCY4oCZ4oCZPHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjojMjk4QTA4XFxcXFxcXCI+JyxcXG4gICAgICAgICAgICAnb3p6V0cnOiAndGV4dF8yJyxcXG4gICAgICAgICAgICAnbldmVlInOiBmdW5jdGlvbihfMHg0ODBmM2EsIF8weDRjODRmYykge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NDgwZjNhICsgXzB4NGM4NGZjO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ0pDY05ZJzogJ3BhcnNlUm91dGUnLFxcbiAgICAgICAgICAgICdyZ0RJcCc6ICdiaWFuamknLFxcbiAgICAgICAgICAgICdob0lkSic6ICfigJjigJjigJnigJk8YmlnPjxzcGFuIHN0eWxlPVxcXFxcXFwiY29sb3I6IzZFQjg5N1xcXFxcXFwiPuaWsCDlu7og6KejIOaekCcsXFxuICAgICAgICAgICAgJ0ZyR09IJzogZnVuY3Rpb24oXzB4MTJkNmRiLCBfMHgyYTA2OGQpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDEyZDZkYiA8IF8weDJhMDY4ZDtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdvQ0NTaic6IGZ1bmN0aW9uKF8weDE5YjE3OCwgXzB4NGVmOGY2KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHgxOWIxNzggPT09IF8weDRlZjhmNjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdIWmhsYyc6IGZ1bmN0aW9uKF8weDVjYWUwMywgXzB4MjZlMjQyKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg1Y2FlMDMgPT0gXzB4MjZlMjQyO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ2NnSWVBJzogZnVuY3Rpb24oXzB4MjVlMzY4LCBfMHg4YmM4ZTkpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDI1ZTM2OCArIF8weDhiYzhlOTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICd4ZHJGdic6IGZ1bmN0aW9uKF8weDRhYjVkOCwgXzB4MjEyNDJmKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0YWI1ZDggKyBfMHgyMTI0MmY7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAneXdqdXgnOiBmdW5jdGlvbihfMHg1ZTMwNTEsIF8weDRlMDIzMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NWUzMDUxKF8weDRlMDIzMCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfTtcXG4gICAgICAgIHZhciBfMHgxZDhiYjEgPSBnZXRWYXIoXzB4NGMwNDI3WydKQ2NOWSddKTtcXG4gICAgICAgIHZhciBfMHgzYjg5YWIgPSBwYXJzZUZpbGVbJ3RpdGxlJ107XFxuICAgICAgICB2YXIgXzB4NDlkYTk2ID0gZ2V0VmFyKF8weDRjMDQyN1sncmdESXAnXSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBfMHg0YzA0MjdbJ2hvSWRKJ10sXFxuICAgICAgICAgICAgZGVzYzon5rOo5oSPOuS9jee9ruaTjeS9nOWKn+iDveWPquWcqOWIhuexu+etm+mAieS4uuWFqOmDqOaXtueUn+aViFxcXFxu5LiL5pa55pCc57Si5oyJ5ZCN56ew5oiW5Zyw5Z2ALOmHjee9ruivt+eVmeepuuaIlueCueino+aekOaVsOmHj+aMiemSricsXFxuICAgICAgICAgICAgdXJsOiBiakl0ZW1bJ3hqUGFyc2UnXSgpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6ZmFsc2VcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+aQnOe0oicsXFxuICAgICAgICAgICAgZGVzYzonbWVuZ3gnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidpbnB1dCcsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRWYXIoJ2RwLnNlYXJjaEp4JyxpbnB1dClcXFwiLFxcbiAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IHRydWUsXFxuICAgICAgICAgICAgICAgIHRleHRTaXplOiAxMSxcXG4gICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOmdldFZhcignZHAuc2VhcmNoSngnLCcnKSxcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHVybDokLnRvU3RyaW5nKCgpPT57XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGV0IGZpbHRlcnMgPSBbJ+WFqOmDqCcsJ+mTvuaOpScsJ2pzb24nLCflhY3ll4UnXTtcXG4gICAgICAgIGZvcihsZXQgbyBpbiBmaWx0ZXJzKXtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpnZXRWYXIoJ2RuLmp4X2ZpbHRlcicsJ+WFqOmDqCcpPT09ZmlsdGVyc1tvXT8n4oCc4oCc4oCd4oCdPHNwYW4gc3R5bGU9XFxcImNvbG9yOiMyOThBMDhcXFwiPicrZmlsdGVyc1tvXTpmaWx0ZXJzW29dLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4uanhfZmlsdGVyJyxpdCk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSxmaWx0ZXJzW29dKSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIHZhciBfMHgyZWNiZTUgPSBfMHgzYjg5YWJbJ2xlbmd0aCddO1xcbiAgICAgICAgdmFyIGpzb249e3RpdGxlOltdLGNvZGVzOnt9fTtcXG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lhYltfMHhlMmMzZDhdO1xcbiAgICAgICAgICAgIHZhciBfMHgzNzg3MWUgPSBfMHg0YzA0MjdbJ25XZlZSJ10oXzB4MzM3ODhjLCAnJylbJ3JlcGxhY2UnXSgvaHR0cC4qXFxcXC9cXFxcLy9nLCAnJyk7XFxuICAgICAgICAgICAgaWYgKC/np7vliqgvIFsndGVzdCddKF8weDQ5ZGE5NikpIHtcXG4gICAgICAgICAgICAgICAgaWYgKF8weDRjMDQyN1snb0NDU2onXSgndUtMeEYnLCAndUtMeEYnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg0YzA0MjdbJ0haaGxjJ10oXzB4NGMwNDI3WydYWHlRciddICsgXzB4ZTJjM2Q4LCBfMHg0OWRhOTYpID8gXzB4NGMwNDI3WyduV2ZWUiddKF8weDRjMDQyN1snY2dJZUEnXShfMHg0YzA0MjdbJ1V0ZldmJ10sIF8weDRjMDQyN1snUU92SlYnXSksIF8weDM3ODcxZSkgOiBfMHg0YzA0MjdbJ2NnSWVBJ10oXzB4NGMwNDI3WydBQkV3QiddLCBfMHgzNzg3MWUpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3lkUGFyc2UnXShfMHg0OWRhOTYsIF8weGUyYzNkOCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogJ3RleHRfMidcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIF8weDJiYzYxOCA9IF8weDNiODlhYltfMHhlMmMzZDhdO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIF8weDVjZjQxNyA9IF8weDRjMDQyN1snVVZXb0YnXShfMHgyYmM2MTgsICcnKVsncmVwbGFjZSddKC9odHRwLipcXFxcL1xcXFwvL2csICcnKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmICgv56e75YqoLyBbJ3Rlc3QnXShfMHg0OWRhOTYpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NGMwNDI3WydreldESyddKF8weDRjMDQyN1snWFh5UXInXSwgXzB4ZTJjM2Q4KSA9PSBfMHg0OWRhOTYgPyBfMHg0YzA0MjdbJ2d0VW5qJ10oXzB4NGMwNDI3WydndFVuaiddKF8weDRjMDQyN1snVXRmV2YnXSwgXzB4NGMwNDI3WydRT3ZKViddKSwgXzB4NWNmNDE3KSA6IF8weDRjMDQyN1snQUJFd0InXSArIF8weDVjZjQxNyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneWRQYXJzZSddKF8weDQ5ZGE5NiwgXzB4ZTJjM2Q4KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NGMwNDI3WydvenpXRyddXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBfMHgxMTkzNjUgPSBbXzB4MmJjNjE4LCBfMHg0YzA0MjdbJ2d0VW5qJ10oXzB4ZTJjM2Q4LCAnfHwnKV1bJ2pvaW4nXSgnfHwnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg0YzA0MjdbJ25XZlZSJ10oXzB4NGMwNDI3WydBQkV3QiddLCBfMHg1Y2Y0MTcpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg0YzA0MjdbJ296eldHJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3hsU2VsZWN0J10oXzB4MTE5MzY1LCBfMHgyZWNiZTVbJ3RvU3RyaW5nJ10oKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHZhciBfMHhiNzAxOTIgPSBbXzB4MzM3ODhjLCBfMHhlMmMzZDggKyAnfHwnXVsnam9pbiddKCd8fCcpO1xcbiAgICAgICAgICAgICAgICAvLyDov6rov6rlvbHpmaJ8fDB8fCAg5ZCN56ewfHzntKLlvJUg55qE5pWw57uEXFxuICAgICAgICAgICAgICAgIC8vIEFCRXdCIOaYr+e7v+iJsiBfMHgzNzg3MWUg5piv5qCH6aKY5ZCN56ewICB4ZHJGduaYr+Wtl+espuS4sui/nuaOpeWHveaVsFxcbiAgICAgICAgICAgICAgICAvLyBsZXQgZmxhZyA9ICfigJjigJjik4rigJnigJknO1xcbiAgICAgICAgICAgICAgICBsZXQgZmxhZyA9IF8weDRjMDQyNy5jb2xvcign4pOKJywnIzAwNTFmZicpO1xcbiAgICAgICAgICAgICAgICBpZih0eXBlb2YoanNvbi5jb2Rlc1tfMHgzNzg3MWVdKT09PSdmdW5jdGlvbicpe1xcbiAgICAgICAgICAgICAgICAgICAgLy8gZmxhZyA9ICfigJzigJzikr/igJ3igJ0nO1xcbiAgICAgICAgICAgICAgICAgICAgZmxhZyA9IF8weDRjMDQyNy5jb2xvcign4pK/JywnI2ZmNzAwMCcpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZih0eXBlb2YoanNvbi5jb2Rlc1tfMHgzNzg3MWVdKT09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgICAgICAgICAgICAgIGZsYWcgPSAnJztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvLyBsZXQgY2xzID0gJzxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMjk4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gICAgICAgJ1p4VWd0JzogJ+aTjeS9nOaMh+W8lScsXFxuICAgICAgICAgICAgJ3NXRm9jJzogZnVuY3Rpb24oXzB4MmEwNDRiLCBfMHgxNDlhM2YpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDJhMDQ0YiArIF8weDE0OWEzZjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdPRWhhdCc6ICfmi4nlj5bku6PnoIEnLFxcbiAgICAgICAgICAgICdadnRTdSc6ICfnvJbovpHop6PmnpAnLFxcbiAgICAgICAgICAgICdnWEtNYic6ICd0b2FzdDovL+ivt+WFiOaLieWPluWIl+ihqCcsXFxuICAgICAgICAgICAgJ1dDT0RDJzogZnVuY3Rpb24oXzB4NGFkM2Q1LCBfMHgzMWZhMWUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDRhZDNkNSA8IF8weDMxZmExZTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdyQWtBaCc6ICd0ZXh0XzMnLFxcbiAgICAgICAgICAgICd5V2FPSSc6ICfmgaLlpI3mj5Lku7bot6/lvoTkuLrpu5jorqQnLFxcbiAgICAgICAgICAgICd5anlqSyc6ICflvZPliY3orr7nva7kuLo6ICcsXFxuICAgICAgICAgICAgJ3RIWGVFJzogJ+aLieWPluino+aekOWIl+ihqOaIluiAheino+aekOS7o+eggScsXFxuICAgICAgICAgICAgJ0dNVVl1JzogJ+WtmOaUvui3r+W+hDogL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbicsXFxuICAgICAgICAgICAgJ21wWkJaJzogJ2xpbmVfYmxhbmsnLFxcbiAgICAgICAgICAgICd4dnFnRic6ICfovpPlhaXmnInmlYjmj5Lku7blnLDlnYAnLFxcbiAgICAgICAgICAgICdoZXVLeCc6ICdwdXRWYXIoXFxcInBsdWdpbkxpbmtcXFwiLGlucHV0KScsXFxuICAgICAgICAgICAgJ0lpZmlhJzogJ+KAmOKAmOKAmeKAmTxzdHJ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ICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2Wyd4ZmRIayddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsncHVsbFNjcmlwdCddKF9teVNldFsnY2pjYWNoZSddLCBfbXlTZXRbJ3g1Y2FjaGUnXSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3NlsnckdMdUEnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF8weDU0MWQ3NlsnaHZpRGwnXShldmFsLCBfMHg1NDFkNzZbJ2h2aURsJ10oZ2V0VmFyLCBfMHg1NDFkNzZbJ3FSUWRBJ10pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMic6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiAnbGluZV9ibGFuaydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzMnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgXzB4MmFiMzk5ID0gJ2hpa2VyOi8vZW1wdHkjbm9IaXN0b3J5I0BydWxlPWpzOnRoaXMuZD1bXTskLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9qeEl0ZW0/cnVsZT1NeUZpZWxk4bSw4oG/XFxcIikuanhMaXN0KCk7c2V0UmVzdWx0KGQpOyc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydaeFVndCddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IHR5cGVvZiBjekd1aWRlID09ICdmdW5jdGlvbicgPyBjekd1aWRlKCkgOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhkUm91dGUgPSBfMHg1NDFkNzZbJ3NXRm9jJ10oeGRSb3V0ZSwgX215U2V0WydwYXJzZVJvdXRlJ10pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc2JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF8weDNhOWFmZSA9IFt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiAn5ouJ5Y+W5YiX6KGoJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3B1bGxDb2RlJ10oJ+WIl+ihqCcpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsnT0VoYXQnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3B1bGxDb2RlJ10oJ+S7o+eggScpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsnWnZ0U3UnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBfMHg1NDFkNzZbJ2h2aURsJ10oZmlsZUV4aXN0LCBfMHg1NDFkNzZbJ2h2aURsJ10oZ2V0VmFyLCAncGFyc2VSb3V0ZScpKSA9PSAhIVtdID8gXzB4MmFiMzk5IDogXzB4NTQxZDc2WydnWEtNYiddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1dO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc3JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgXzB4MWEyY2RiID0gMHgwOyBfMHg1NDFkNzZbJ1dDT0RDJ10oXzB4MWEyY2RiLCBfMHgzYTlhZmVbJ2xlbmd0aCddKTsgXzB4MWEyY2RiKyspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4M2E5YWZlW18weDFhMmNkYl1bJ3RpdGxlJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IF8weDNhOWFmZVtfMHgxYTJjZGJdWyd1cmwnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ3JBa0FoJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzgnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2Wyd5V2FPSSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsnaGZQbHVnaW4nXShfbXlTZXRbJ3BhcnNlUm91dGUnXSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3Nlsnc1dGb2MnXShfMHg1NDFkNzZbJ3lqeWpLJ10gKyBteVNldFsnY2onXSwgJ1xcXFxu5a2Y5pS+6Lev5b6EOiAvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ3pRU0xFJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzknOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2Wyd0SFhlRSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6ICd0b2FzdDovL+ivt+WcqOS4i+aWuemAiemhueaTjeS9nCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3NlsnR01VWXUnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMTAnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2WydtcFpCWiddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxMSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3NlsneHZxZ0YnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6ICdpbnB1dCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZXh0cmEnOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlVmlzaWJsZSc6ICFbXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVmYXVsdFZhbHVlJzogXzB4NTQxZDc2WydodmlEbCddKGdldFZhciwgJ3BsdWdpbkxpbmsnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfMHg1NDFkNzZbJ2hldUt4J11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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gICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kv67mlLnmiJDlip9cXFwiO1xcbiAgICAgICAgICAgIH0sIHRpdGxlKTtcXG4gICAgICAgIH07XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSBcXFwiMVxcXCI6XFxuICAgICAgICBmdW5jID0gZnVuY3Rpb24odXJsLCB0aXRsZSwgaW5kZXgpIHtcXG4gICAgICAgICAgICByZXR1cm4gJCh1cmwsIFxcXCLor7fovpPlhaXjgIxcXFwiICsgdGl0bGUgKyBcXFwi44CN55qE5paw5o6l5Y+jXFxcIikuaW5wdXQoKHRpdGxlLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VVcmxUZXh0ID0gcmVxdWVzdChcXFwiaGlrZXI6Ly9maWxlcy9qaWV4aS9qaWV4aS50eHRcXFwiKTtcXG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlVXJsQXJyYXkgPSBwYXJzZVVybFRleHQuc3BsaXQoL1xcXFxuLyk7XFxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RlZDEgPSBwYXJzZVVybEFycmF5W2luZGV4XTtcXG4gICAgICAgICAgICAgICAgcGFyc2VVcmxBcnJheVtpbmRleF0gPSB0aXRsZSArIFxcXCImJlxcXCIgKyBpbnB1dDtcXG4gICAgICAgICAgICAgICAgcGFyc2VVcmxUZXh0ID0gcGFyc2VVcmxBcnJheS5qb2luKFxcXCJcXFxcblxcXCIpO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvamlleGkvamlleGkudHh0XFxcIiwgcGFyc2VVcmxUZXh0KTtcXG4gICAgICAgICAgICAgICAgaWYgKHNlbGVjdGVkMSA9PSBnZXRJdGVtKFxcXCJzZWxlY3RlZDBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFw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IHBhcnNlVXJsVGV4dCk7XFxuICAgICAgICAgICAgICAgIGlmIChzZWxlY3RlZDEgPT0gZ2V0SXRlbShcXFwic2VsZWN0ZWQwXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChwYXJzZVVybEFycmF5WzBdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwic2VsZWN0ZWRcXFwiLCBwYXJzZVVybEFycmF5WzBdLnNwbGl0KFxcXCImJlxcXCIpWzFdIHx8IFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJzZWxlY3RlZDBcXFwiLCBwYXJzZVVybEFycmF5WzBdKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwic2VsZWN0ZWRcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwic2VsZWN0ZWQwXFxcIiwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S/ruaUueaIkOWKn1xcXCI7XFxuICAgICAgICAgICAgfSwgdGl0bGUsIGluZGV4KTtcXG4gICAgICAgIH07XFxuICAgICAgICBicmVhaztcXG5cXG59XFxuZm9yIChsZXQgaSBpbiBwYXJzZVVybEFycmF5KSB7XFxuICAgIGxldCBpdGVtID0gcGFyc2VVcmxBcnJheVtpXS5zcGxpdChcXFwiJiZcXFwiKTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBzZWxlY3RlZCA9PSBpdGVtWzFdID8gXFxcIuKAmOKAmFxcXCIgKyBpdGVtWzBdICsgXFxcIuKAmeKAmVxcXCIgOiBp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ICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lorr7nva7mk43kvZznsbvlnovkuLo6JytpbnB1dDtcXG4gICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBsZXQgdGhlbWVSb3V0ZSA9IFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL015VGhlbWUuanNvblxcXCI7XFxuICAgICAgICBsZXQgbXlUaGVtZXMgPSB7fTtcXG4gICAgICAgIGxldCB0aGVtZXMgPSB7fTtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgbXlUaGVtZXMgPSBKU09OLnBhcnNlKGZldGNoKHRoZW1lUm91dGUpKTtcXG4gICAgICAgICAgICB0aGVtZXMgPSBteVRoZW1lcy50aGVtZXNbbXlUaGVtZXMubm93X3RoZW1lXTtcXG4gICAgICAgIH1jYXRjaCAoZSkge31cXG5cXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+WvvOWFpScsXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDokKCcnLCfor7fovpPlhaXlr7zlhaXlj6Pku6QnKS5pbnB1dCgobXlUaGVtZXMsdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgaWYoL17mlq3mj5LkuLvpophALio/QGh0dHAvLnRlc3QoaW5wdXQpKXtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBuYW1lID0gaW5wdXQuc3BsaXQoJ0AnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBpbnB1dC5zcGxpdCgnQCcpWzJdO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ+ehruWumuimgeWvvOWFpeaWreaPkuS4u+mimC0nK25hbWUrJyDlkJc/JykuY29uZmlybSgobmFtZSx1cmwsbXlUaGVtZXMsdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IHBhcnNlUGFzdGUodXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGFzVGhlbWUgPSBteVRoZW1lcy50aGVtZXMuZmlsdGVyKGl0PT5pdC5uYW1lPT09bmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaGFzVGhlbWUmJmhhc1RoZW1lLmxlbmd0aD4wKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlkID0gbnVsbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBqIGluIG15VGhlbWVzLnRoZW1lcyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihteVRoZW1lcy50aGVtZXNbal0ubmFtZSA9PT0gbmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQgPSBqO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFpZCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v57Si5byV6ZSZ6K+v5peg5rOV6KaG55uW5a+85YWlOlxcXFxuJytpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZygn6KaG55uW5a+85YWl5Li76aKYaWQ6JytpZCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lc1tpZF0gPSBPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMudGhlbWVzLnB1c2goT2JqZWN0LmFzc2lnbihKU09OLnBhcnNlKGJhc2U2NERlY29kZShjb250ZW50KSkseyduYW1lJzpuYW1lfSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2cobXlUaGVtZXMpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaIkOWKn+WvvOWFpeS4u+mimDpcXFxcbicrbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSxuYW1lLHVybCxteVRoZW1lcyx0aGVtZVJvdXRlKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5peg5rOV6K+G5Yir55qE5a+85YWl5Y+j5LukOlxcXFxuJytpbnB1dDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sbXlUaGVtZXMsdGhlbWVSb3V0ZSksXFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+aWsOWinicsXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDokKCkucnVsZSgobXlUaGVtZXMsdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgbGV0IGQ9W107XFxuICAgICAgICAgICAgICAgIGFkZExpc3RlbmVyKCdvbkNsb3NlJywgJC50b1N0cmluZygoKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5Li76aKY5ZCN56ewJyxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLmlq3mj5It6JOd6I6T5Li76aKYXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRWYXIoJ3RoZW1lLm5ld19hZGRfbmFtZScsaW5wdXQpXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IHRydWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoJ3RoZW1lLm5ld19hZGRfbmFtZScsICcnKVxcbiAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDokLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3X2FkZF9uYW1lID0gZ2V0VmFyKCd0aGVtZS5uZXdfYWRkX25hbWUnLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S9oOi+k+WFpeeahOaYrzonK25ld19hZGRfbmFtZTtcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCJcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi5Luj56CBXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0VmFyKCd0aGVtZS5uZXdfYWRkX2NvZGUnLCAnJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXFxcInRleHRhcmVhXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6LTEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6ICdwdXRWYXIoXFxcInRoZW1lLm5ld19hZGRfY29kZVxcXCIsaW5wdXQpJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOifkv53lrZgnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiQoKS5sYXp5UnVsZSgobXlUaGVtZXMsdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IGdldFZhcigndGhlbWUubmV3X2FkZF9jb2RlJywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuYW1lID0gZ2V0VmFyKCd0aGVtZS5uZXdfYWRkX25hbWUnLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoIW5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g6L+Y5rKh5aGr5YaZ5Li76aKY5ZCN56ew5ZGiJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3VGhlbWUgPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdUaGVtZSA9IEpTT04ucGFyc2UoY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/plJnor6/nmoTkuLvpophqc29u5qC85byPOlxcXFxuJytlLm1lc3NhZ2U7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24obmV3VGhlbWUseyduYW1lJzpuYW1lfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMudGhlbWVzLnB1c2gobmV3VGhlbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaWsOWinuaWreaPkuS4u+mimDonK25hbWVcXG4gICAgICAgICAgICAgICAgICAgIH0sbXlUaGVtZXMsdGhlbWVSb3V0ZSlcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgICAgICB9LG15VGhlbWVzLHRoZW1lUm91dGUpLFxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOm15VGhlbWVzLnRoZW1lcz8n5Li76aKY5YiX6KGoOuWFseiuoTonK2NvbG9yKG15VGhlbWVzLnRoZW1lcy5sZW5ndGgsJyNmZjcwMDAnKSsn5Liq5Li76aKYJzpcXFwi56ys5LiA5qyh5Yqg6L2977yM54K55q2k6L+b5Y675Yid5aeL5YyW5Li76aKY5YiX6KGoXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8x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q3mj5LkuLvpopjlt7Lph43nva7kuLrlh7rljoLorr7nva4nXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZm9yKHZhciBpIGluIG15VGhlbWVzLnRoZW1lcyl7XFxuICAgICAgICAgICAgbGV0IG5vd1RoZW0gPSBteVRoZW1lcy50aGVtZXNbaV07XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6bXlUaGVtZXMubm93X3RoZW1lPT09bm93VGhlbS5uYW1lPyfwn5GJJytub3dUaGVtLm5hbWU6bm93VGhlbS5uYW1lLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTonZmxleF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB1cmw6JCgpLmxhenlSdWxlKChteXRoZW1lLG15VGhlbWVzLGksdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBvcHRpb24gPSBnZXRWYXIoJ3RoZW1lLmRuX29wdGlvbicsJ+aWsOWinicpO1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChvcHRpb24pe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WvvOWHuic6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBteXRoZW1lQ29kZSA9IGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShteXRoZW1lKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBzaGFyZVBhc3RlKG15dGhlbWVDb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSAn5pat5o+S5Li76aKYQCcrbXl0aGVtZS5uYW1lKydAJyt1cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvcHkoY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Llr7zlh7rkuLrkupHlj6Pku6TlubblpI3liLbliLDliarliIfmnb8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5L+u5pS5JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoSlNPTi5zdHJpbmdpZnkobXl0aGVtZSkpLmlucHV0KChteXRoZW1lLG15VGhlbWVzLGksdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG15dGhlbWUubmFtZT09PW15VGhlbWVzLm5vd190aGVtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOS4u+mimOW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOS/ruaUuSEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXNbaV09SlNPTi5wYXJzZShpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSxKU09OLnN0cmluZ2lmeShteVRoZW1lcykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+u5pS5J1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WIoOmZpCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7orqTliKDpmaTkuLvpopg6JytteXRoZW1lLm5hbWUrJz8nKS5jb25maXJtKChteXRoZW1lLG15VGhlbWVzLGksdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG15dGhlbWUubmFtZT09PW15VGhlbWVzLm5vd190aGVtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOS4u+mimOW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOWIoOmZpCEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXMuc3BsaWNlKGksMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSxKU09OLnN0cmluZ2lmeShteVRoZW1lcykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5Yig6ZmkJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLm5vd190aGVtZT1teXRoZW1lLm5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g6YCJ5oup5LqGJytteXRoZW1lLm5hbWUrJ+S9nOS4uum7mOiupOS4u+mimCc7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sbm93VGhlbSxte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ZhlxcbjxiciAvPlxcbjxiciAvPlxcbjxzdHJvbmc+PGJpZz7nvJbovpHnr4c8L2JpZz48L3N0cm9uZz5cXG48YnIgLz7pmpDol4/lip/og73pnIDnn6XvvJpcXG48YnIgLz7pmpDol4/lip/og73mmK/ku47liJfooajkuIrliKDpmaTmoIfpopjvvIzmlYXml6DlpI3njrDlip/og71cXG48YnIgLz7nnIvlh4bkuobvvIzkuI3nlKjnmoTmiY3ngrnpmpDol49cXG48YnIgLz7opoHlpI3njrDnmoTor53ljrvkv67mlLnmlrDnmoRNeVBhcnNlLmpzb27vvIzlnKh0aXRsZeeahOaVsOe7hOmCo+aMieagvOW8j+a3u+WKoOagh+mimFxcbjxiciAvPlxcbjxiciAvPlxcbjxzdHJvbmc+PGJpZz7lroznu5M8L2JpZz48YnIgLz48L3N0cm9uZz5cXG48cD52My40OSzlsI/nmb3mnIDlkI7nmoTlgJTlvLos5bCP55m95YWz5oCA5qih5byPPC9wPlxcbjxwPuS4gOmUruWunueOsOmFjee9ruWujOavleWNs+WPr+mAmui/h+aUr+aMgemtlOaWreeahOWwj+eoi+W6j+eci+inhumike+8jOWbnuW9kueZveWrluinhumikei/meS4qumcgOaxguacrOi6qzwvcD5cXG48cD7mjqjojZDkvb/nlKjpnZLosYYsYXBw5b2x6KeGLmRwPC9wPlxcbjxwPumtlOaWrSjmlq3mj5LpgZPplb/prZTmlLnniYgp5bey5byD5Z2R6LeR6Lev77yM5oSf6LCi5Y6f5L2c6ICF5pat5b+155qE5o+S5Lu26Kej5p6Q5Y+K5pys5bCP56iL5bqP5qC45b+D5Luj56CBPC9wPlxcbjwvYm9keT5cXG48L2h0bWw+XCJ9LHtcIm5hbWVcIjpcIua1i+ivleaVsOaNrlwiLFwicGF0aFwiOlwiZGVtb0RhdGFcIixcInJ1bGVcIjpcImpzOlxcbiAgICBsZXQgZGVtb0RhdGEgPSB7XFxuICAgICAgICDniLHlpYfoibo6WydodHRwczovL3d3dy5pcWl5aS5jb20vdl8xenA3c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25lID0gZ2V0T25lO1xcbiQuZXhwb3J0cy51bmlxdWUyID0gdW5pcXVlMjtcXG4kLmV4cG9ydHMuZHVwbGljYXRlcyA9IGR1cGxpY2F0ZXM7XCJ9LHtcIm5hbWVcIjpcIuino+aekOeuoeeQhlwiLFwicGF0aFwiOlwianhNYW5hZ2VcIixcInJ1bGVcIjpcImpzOlxcbiAgICBmdW5jdGlvbiBqeE1hbmFnZSgpe1xcbiAgICAgICAgY29uc3Qge2NvbG9yLHNtYWxsfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3V0aWxpeT9ydWxlPemBk+mVv+S7k+W6k1Byb1xcXCIpO1xcbiAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgIGxldCBvcHRpb25zID0gWyfpgInmi6knLCfkv67mlLknLCfliKDpmaQnLCflr7zlh7onXTtcXG5cXG4gICAgICAgIGZvcihsZXQgaSBpbiBvcHRpb25zKXtcXG4gICAgICAgICAgICBsZXQgb3B0aW9uID0gb3B0aW9uc1tpXTtcXG4gICAgICAgICAgICBsZXQgZmxhZyA9IGdldFZhcignZG4uanhtX29wdGlvbicsJ+mAieaLqScpPT09b3B0aW9uPyfwn5GJJzonJztcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpmbGFnK29wdGlvbixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob3B0aW9uKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5qeG1fb3B0aW9uJywgb3B0aW9uKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICAgICAgfSxvcHRpb24pLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IGp4c1JvdXRlID0gXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlKaWV4aS5qc29uXFxcIjtcXG4gICAgICAgIGxldCBkbVBhdGggPSBcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9kaWFvbWFvLnR4dFxcXCI7XFxuICAgICAgICBsZXQgTXlKaWV4aSA9IHtqaWV4aXM6W119O1xcbiAgICAgICAgbGV0IGppZXhpcyA9IHt9O1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBNeUppZXhpID0gSlNPTi5wYXJzZShmZXRjaChqeHNSb3V0ZSkpO1xcbiAgICAgICAgICAgIGppZXhpcyA9IE15SmlleGkuamlleGlzLmZpbHRlcihpdD0+aXQubmFtZT09PU15SmlleGkubm93KVswXTtcXG4gICAgICAgIH1jYXRjaCAoZSkge31cXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+WvvOWFpScsXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDokKCcnLCfor7fovpPlhaXlr7zlhaXlj6Pku6QnKS5pbnB1dCgoTXlKaWV4aSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgaWYoL17prZTmlq3op6PmnpDphY3nva5ALio/QGh0dHAvLnRlc3QoaW5wdXQpKXtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBuYW1lID0gaW5wdXQuc3BsaXQoJ0AnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBpbnB1dC5zcGxpdCgnQCcpWzJdO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ+ehruWumuimgeWvvOWFpeaWreaPkuino+aekOmFjee9ri0nK25hbWUrJyDlkJc/JykuY29uZmlybSgobmFtZSx1cmwsTXlKaWV4aSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IHBhcnNlUGFzdGUodXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGFzSXQgPSBNeUppZXhpLmppZXhpcy5maWx0ZXIoaXQ9Pml0Lm5hbWU9PT1uYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihoYXNJdCYmaGFzSXQubGVuZ3RoPjApe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWQgPSBudWxsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGogaW4gTXlKaWV4aS5qaWV4aXMpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoTXlKaWV4aS5qaWV4aXNbal0ubmFtZSA9PT0gbmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQgPSBqO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFpZCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v57Si5byV6ZSZ6K+v5peg5rOV6KaG55uW5a+85YWlOlxcXFxuJytpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZygn6KaG55uW5a+85YWl5Li76aKYaWQ6JytpZCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXSA9IE9iamVjdC5hc3NpZ24oSlNPTi5wYXJzZShiYXNlNjREZWNvZGUoY29udGVudCkpLHsnbmFtZSc6bmFtZX0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpcy5wdXNoKE9iamVjdC5hc3NpZ24oSlNPTi5wYXJzZShiYXNlNjREZWNvZGUoY29udGVudCkpLHsnbmFtZSc6bmFtZX0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5oiQ5Yqf5a+85YWl6Kej5p6Q6YWN572uOlxcXFxuJytuYW1lXFxuICAgICAgICAgICAgICAgICAgICB9LG5hbWUsdXJsLE15SmlleGksanhzUm91dGUpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ml6Dms5Xor4bliKvnmoTlr7zlhaXlj6Pku6Q6XFxcXG4nK2lucHV0O1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSxNeUppZXhpLGp4c1JvdXRlKSxcXG4gICAgICAgIH0pO1xcblxcbiAgICAgICAgbGV0IGlzQXV0byA9IE15SmlleGkuaXNBdXRvO1xcbiAgICAgICAgbGV0IGF1dG9Nb2RlID0gTXlKaWV4aS5hdXRvTW9kZTtcXG4gICAgICAgIGxldCBzaW5nbGVCYWNrID0gTXlKaWV4aS5zaW5nbGVCYWNrfHxmYWxzZTsgLy/lkIrmr5vmqKHlvI/jgILljZXkuKrnu5Pmnpznm7TmjqXov5Tlm57vvIzlgZzmraLlkI7pnaLnmoRcXG4gICAgICAgIGxldCBpZ25vcmVfbXggPSBNeUppZXhpLmlnbm9yZV9teHx8ZmFsc2U7IC8v5b+955Wl5YWN5ZeFLOWXheaOouS8mOWFiOaooeW8j+S9v+eUqFxcbiAgICAgICAgbGV0IHRpcHMgPSAn6Kej5p6Q6YWN572u5YiX6KGoOuWFseiuoTonK2NvbG9yKE15SmlleGkuamlleGlzLmxlbmd0aCwnI2ZmNzAwMCcpKyfkuKrphY3nva4s6Ieq5Yqo5qGj5byA5YWzOicrY29sb3IoaXNBdXRvPyflvIAnOiflhbMnLCcjZmY3MDAwJyk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOk15SmlleGkuamlleGlzJiZNeUppZXhpLmppZXhpcy5sZW5ndGg+MD90aXBzOlxcXCLnrKzkuIDmrKHliqDovb3vvIzngrnmraTov5vljrvliJ3lp4vljJbop6PmnpDliJfooahcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzEnLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBpZihNeUppZXhpLmppZXhpcyYmTXlKaWV4aS5qaWV4aXMubGVuZ3RoPjApe1xcbiAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5pc0F1dG8gPSAhTXlKaWV4aS5pc0F1dG87XFxuICAgICAgICAgICAgICAgICAgICBpZighTXlKaWV4aS5hdXRvTW9kZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5hdXRvTW9kZSA9ICfll4XmjqLkvJjlhYgnO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRpcHMgPSBNeUppZXhpLmlzQXV0bz8n5byAJzon5YWzJztcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lorr7nva7oh6rliqjmoaPmqKHlvI/kuLo6Jyt0aXBzXFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGluaXRTZXQgPSB7J25vdyc6XFxcIumBk+mVv+aOqOiNkFxcXCIsJ2ppZXhpcyc6W3tuYW1lOifpgZPplb/mjqjojZAnLHF5Olsn5LiH6IO96Kej5p6Q4pK/J10seWs6WyfkuIfog73op6PmnpDikr8nXSx0eDpbJ+S4h+iDveino+aekOKSvyddLG1nOlsn5LiH6IO96Kej5p6Q4pK/J10sYmw6WyfkuIfog73op6PmnpDikr8nXSxzaDpbJ+S4h+iDveino+aekOKSvyddLHhnOlsn5LiH6IO96Kej5p6Q4pK/J10scHA6WyfkuIfog73op6PmnpDikr8nXSxtaTpbJ+S4h+iDveino+aekOKSvyddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZTpbJ+S4h+iDveino+aekOKSvyddLGZ1bjpbJ+S4h+iDveino+aekOKSvyddLG9uZTpbJ+S4h+iDveino+aekOKSvyddLGx0Olsn5LiH6IO96Kej5p6Q4pK/J10scnI6WyfkuIfog73op6PmnpDikr8nXSx3ZDpbJ+S4h+iDveino+aekOKSvyddfV19O1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KGluaXRTZXQpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWreaPkuino+aekOmFjee9ruW3suWIneWni+WMlidcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSlcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGV0IGMxID0gJyMxNWFiMjEnO1xcbiAgICAgICAgbGV0IGMyID0gJyM5MDBhMGEnO1xcbiAgICAgICAgbGV0IGF1dG9Nb2RlU2VsID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gICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lorr7nva7lpIfog47lrqDlubjmlrnmoYjkuLo6JytpbnB1dFxcbiAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSksXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6Y29sb3IoXFxcIuaBouWkjeWHuuWOguiuvue9rlxcXCIsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8yJyxcXG4gICAgICAgICAgICB1cmw6JChcXFwi5aaC5p6c5L2g55qE6Kej5p6Q566h55CG5peg5rOV5q2j5bi455So5LqG77yM5q2k5pa55rOV5Y+v5Lul5pWR56CW77yM56Gu6K6k5oGi5aSNP1xcXCIpLmNvbmZpcm0oKGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgaW5pdFNldCA9IHsnbm93JzpcXFwi6YGT6ZW/5o6o6I2QXFxcIiwnamlleGlzJzpbe25hbWU6J+mBk+mVv+aOqOiNkCcscXk6WyfkuIfog73op6PmnpDikr8nXSx5azpbJ+S4h+iDveino+aekOKSvyddLHR4Olsn5LiH6IO96Kej5p6Q4pK/J10sbWc6WyfkuIfog73op6PmnpDikr8nXSxibDpbJ+S4h+iDveino+aekOKSvyddLHNoOlsn5LiH6IO96Kej5p6Q4pK/J10seGc6WyfkuIfog73op6PmnpDikr8nXSxwcDpbJ+S4h+iDveino+aekOKSvyddLG1pOlsn5LiH6IO96Kej5p6Q4pK/J10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGU6WyfkuIfog73op6PmnpDikr8nXSxmdW46WyfkuIfog73op6PmnpDikr8nXSxvbmU6WyfkuIfog73op6PmnpDikr8nXSxsdDpbJ+S4h+iDveino+aekOKSvyddLHJyOlsn5LiH6IO96Kej5p6Q4pK/J10sd2Q6WyfkuIfog73op6PmnpDikr8nXX1df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KE15SmlleGkuc2luZ2xlQmFja3x8ZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruWQiuavm+aooeW8j+W8gOWFs+S4ujonKyhNeUppZXhpLnNpbmdsZUJhY2s/J+W8gCc6J+WFsycpXFxuICAgICAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSlcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1lbHNlIGlmKGF1dG9Nb2RlPT09J+WXheaOouS8mOWFiCcpe1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogY29sb3IoJ+WvvOWFpei+heWKqScsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOmNvbF90eXBlMixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnaGlrZXI6Ly9lbXB0eSNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdCgnaHR0cHM6Ly9uZXRjdXQuY24vcC9hNWQxYzhlMWVjZWUyOGQzJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBodG1sLm1hdGNoKC97Lipub3RlX2NvbnRlbnQuKnVwZGF0ZWRfYXQuKn0vKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IEpTT04ucGFyc2UoZGF0YSkubm90ZV9jb250ZW50O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cERhdGEgPSBKU09OLnBhcnNlKGRhdGEpLnVwZGF0ZWRfYXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlybSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5piv5ZCm5a+85YWlJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudDogJ+iEmuacrOabtOaWsOaXpeacn1xcXFxuJyArIHVwRGF0YSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlybTokLnRvU3RyaW5nKChjb250ZW50KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbnRlbnRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxjb250ZW50KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FuY2VsOiAoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5Y+W5raI5a+85YWlJztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICk7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6c21hbGwoJ+W/veeVpeWFjeWXhTonKStjb2xvcihpZ25vcmVfbXhfdGlwcywnI2ZmNzAwMCcpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTpjb2xfdHlwZTIsXFxuICAgICAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5pZ25vcmVfbXggPSAhKE15SmlleGkuaWdub3JlX214fHxmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruW/veeVpeWFjeWXheW8gOWFs+S4ujonKyhNeUppZXhpLmlnbm9yZV9teD8n5byAJzon5YWzJylcXG4gICAgICAgICAgICAgICAgfSxNeUppZXhpLGp4c1JvdXRlKVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpzbWFsbCgn5aSa57q/6Lev57yT5a2YOicpK2NvbG9yKGNhY2hlVmlkZW9Td2l0Y2gsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTpjb2xfdHlwZTIsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGNhY2hlVmlkZW9Td2l0Y2gpPT57XFxuICAgICAgICAgICAgICAgIGlmKGNhY2hlVmlkZW9Td2l0Y2g9PT0n5byAJyl7XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RwLmNhY2hlVmlkZW8nLCdmYWxzZScpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignZHAuY2FjaGVWaWRlbycsJ3RydWUnKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sY2FjaGVWaWRlb1N3aXRjaClcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpzbWFsbCgn6Kej5p6Q6LaF5pe2OicpK2NvbG9yKGp4VGltZW91dCwnI2ZmNzAwMCcpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOmNvbF90eXBlMixcXG4gICAgICAgICAgICB1cmw6JChqeFRpbWVvdXQsJ+ivt+iuvue9rumtlOaWreino+aekOi2heaXtizlv4XpobvkuLrmlbTmlbAnKS5pbnB1dCgoKT0+e1xcbiAgICAgICAgICAgICAgICBpZighcGFyc2VJbnQoaW5wdXQpKXtcXG4gICAgICAgICAgICAgICAgICAgIGlucHV0ID0gNzAwMDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBwdXRWYXIoJ2RwLmp4VGltZW91dCcsaW5wdXQpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruS4ujonK3BhcnNlSW50KGlucHV0KVxcbiAgICAgICAgICAgIH0sanhUaW1lb3V0KVxcbiAgICAgICAgfSk7XFxuICAgICAgICBpZihhdXRvTW9kZSYmc2luZ2xlQmFjayl7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGNvbG9yKCfmiZPlvIDnvJbovpHlkIrmr5vov4fmu6Tmlofku7YnLCcjMTM3OUNCJyksXFxuICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoZG1QYXRoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgZGVmX2RtcyA9IFsnaHR0cHM6Ly92ZDMuYmRzdGF0aWMuY29tL21kYS1raTl1Z3E1NDMwYmh4eXM4L3YxLWNhZS8xMDgwcC9tZGEta2k5dWdxNTQzMGJoeHlzOC5tcDQnXTtcXG4gICAgICAgICAgICAgICAgICAgIGlmKCFmaWxlRXhpc3QoZG1QYXRoKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGRtUGF0aCwnLy/kuIDooYzkuIDkuKrpk77mjqUs5Y+v5rOo6YeK44CCXFxcXG4nK2RlZl9kbXMuam9pbignXFxcXG4nKSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2VkaXRGaWxlOi8vJytkbVBhdGg7XFxuICAgICAgICAgICAgICAgIH0sZG1QYXRoKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogY29sb3IoJ+aJk+W8gOe8lui+keino+aekOaWh+S7ticsJyMxMzc5Q0InKSxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGp4c1JvdXRlKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly8nK2p4c1JvdXRlO1xcbiAgICAgICAgICAgIH0sanhzUm91dGUpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgIH0pO1xcblxcbiAgICAgICAgZm9yKGxldCBpIGluIE15SmlleGkuamlleGlzKXtcXG4gICAgICAgICAgICBsZXQgbm93SnggPSBNeUppZXhpLmppZXhpc1tpXTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpNeUppZXhpLm5vdz09PW5vd0p4Lm5hbWU/J/CfkYknK25vd0p4Lm5hbWU6bm93SngubmFtZSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J2ZsZXhfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgZXh0cmE6e1xcbiAgICAgICAgICAgICAgICAgICAgbm93Sng6bm93SngsXFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpOk15SmlleGksXFxuICAgICAgICAgICAgICAgICAgICBqeHNSb3V0ZTpqeHNSb3V0ZVxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgobm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvbiA9IGdldFZhcignZG4uanhtX29wdGlvbicsJ+mAieaLqScpO1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChvcHRpb24pe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WvvOWHuic6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub3dKeENvZGUgPSBiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkobm93SngpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHNoYXJlUGFzdGUobm93SnhDb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSAn6a2U5pat6Kej5p6Q6YWN572uQCcrbm93SngubmFtZSsnQCcrdXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3B5KGNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5a+85Ye65Li65LqR5Y+j5Luk5bm25aSN5Yi25Yiw5Ymq5YiH5p2/J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+S/ruaUuSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmKG5vd0p4Lm5hbWU9PT1NeUppZXhpLm5vdyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k6Kej5p6Q6YWN572u5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645L+u5pS5ISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBlbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvanhFZGl0P3J1bGU9TXlGaWVsZOG0sOKBvydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9qeEVkaXQ/cnVsZT1NeUZpZWxk4bSw4oG/J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WIoOmZpCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7orqTliKDpmaTop6PmnpDphY3nva46Jytub3dKeC5uYW1lKyc/JykuY29uZmlybSgobm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobm93SngubmFtZT09PU15SmlleGkubm93KXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k6Kej5p6Q6YWN572u5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645Yig6ZmkISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzLnNwbGljZShpLDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWIoOmZpCdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxub3dKeCxNeUppZXhpLGksanhzUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5ub3c9bm93SngubmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDpgInmi6nkuoYnK25vd0p4Lm5hbWUrJ+S9nOS4uuW9k+WJjeino+aekOmFjee9ric7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sbm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgfVxcbiQuZXhwb3J0cy5qeE1hbmFnZT1qeE1hbmFnZTtcIn0se1wibmFtZVwiOlwi6Kej5p6Q57yW6L6RXCIsXCJwYXRoXCI6XCJqeEVkaXRcIixcInJ1bGVcIjpcImpzOlxcbmxldCB7bm93SngsTXlKaWV4aSxqeHNSb3V0ZX0gPSBNWV9QQVJBTVM7XFxubGV0IG5vd0p4VCA9IEpTT04ucGFyc2UoZ2V0VmFyKCdkbi5ub3dKeCcpfHwne30nKTtcXG5ub3dKeCA9IG5vd0p4VC5uYW1lP25vd0p4VDpub3dKeDtcXG5hZGRMaXN0ZW5lcignb25DbG9zZScsICQudG9TdHJpbmcoKCk9PntcXG4gICAgY2xlYXJWYXIoXFxcImRuLmp4X3RpdGxlc1xcXCIpO1xcbiAgICBjbGVhclZhcihcXFwiZG4ubm93SnhcXFwiKTtcXG4gICAgY2xlYXJWYXIoXFxcImRuLmp4bV9uYW1lXFxcIik7XFxufSk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IGZsYWcgPSAn4oCY4oCY4pOK4oCZ4oCZJztcXG4gICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZihqc29uLmNvZGVzW2l0XSk9PT0nZnVuY3Rpb24nKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmbGFnID0gJ+KAnOKAnOKSv+KAneKAnSc7XFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZih0eXBlb2YoanNvbi5jb2Rlc1tpdF0pPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZsYWcgPSAnJztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmbGFnK2l0XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJChzZWxfdGl0bGUsMikuc2VsZWN0KChNeUppZXhpLGp4cyxub3dKeCx0aXRsZSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgIGlucHV0ID0gaW5wdXQucmVwbGFjZSgv4oCY4oCY4pOK4oCZ4oCZfOKAnOKAnOKSv+KAneKAnS9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBpZCA9IG51bGw7XFxuICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGogaW4gTXlKaWV4aS5qaWV4aXMpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKE15SmlleGkuamlleGlzW2pdLm5hbWUgPT09IG5vd0p4Lm5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCA9IGo7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGlmKCFpZCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+e0ouW8lemUmeivr+aXoOazleS/neWtmDpcXFxcbicraWRcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGp4cy5wdXNoKGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyhqeHMpO1xcbiAgICAgICAgICAgICAgICAgICAgbm93SnhbdGl0bGVdID0ganhzO1xcbiAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdID0gbm93Sng7XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RuLm5vd0p4JyxKU09OLnN0cmluZ2lmeShub3dKeCkpO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LE15SmlleGksanhzLG5vd0p4LHRpdGxlLGp4c1JvdXRlKTtcXG4gICAgICAgICAgICB9ZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeClcXG4gICAgfSk7XFxuICAgIGZvcihsZXQgayBpbiBqeHMpe1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpqeHNba10sXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCh0aXRsZXMsdGl0bGUsanhzLGp4c1JvdXRlLE15SmlleGksbm93Sngsbmp4LGlkLGssbWF4KT0+e1xcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKGdldFZhcignZG4uanhtX3dyaXRlTW9kZScsJ+aWsOWinicpKXtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WIoOmZpCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgQXJyYXkucHJvdG90eXBlLnJlbW92ZSA9IGZ1bmN0aW9uKHZhbCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaW5kZXggPSB0aGlzLmluZGV4T2YodmFsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ID4gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3BsaWNlKGluZGV4LCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAganhzLnJlbW92ZShuangpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vd0p4W3RpdGxlXSA9IGp4cztcXG4gICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpc1tpZF0gPSBub3dKeDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RuLm5vd0p4JyxKU09OLnN0cmluZ2lmeShub3dKeCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAn56e75YqoJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChrLCfnp7vliqjliLDntKLlvJXlpJrlsJE/JykuaW5wdXQoKGssbWF4LGp4cyxub3dKeCxNeUppZXhpLGlkLHRpdGxlLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBNb3ZlKGFyciwgZnJvbUluZGV4LCB0b0luZGV4KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZWxlbWVudCA9IGFycltmcm9tSW5kZXhdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJyLnNwbGljZShmcm9tSW5kZXgsIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJyLnNwbGljZSh0b0luZGV4LCAwLCBlbGVtZW50KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwYXJzZUludChpbnB1dCk9PT1rKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/llaXkuZ/msqHlgZonXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHBhcnNlSW50KGlucHV0KT5tYXgtMXx8cGFyc2VJbnQoaW5wdXQpPC0xKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDmnIDlpKfnp7vliqjojIPlm7QwLScrcGFyc2VJbnQobWF4LTEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxldCBuZXdBciA9IGp4cy5zcGxpY2UoaywgMSk7IC8vIOWIoOaOiVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBqeHMudW5zaGlmdChuZXdBclswXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1vdmUoanhzLGsscGFyc2VJbnQoaW5wdXQpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm93SnhbdGl0bGVdID0ganhzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpc1tpZF0gPSBub3dKeDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5ub3dKeCcsSlNPTi5zdHJpbmdpZnkobm93SngpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LGssbWF4LGp4cyxub3dKeCxNeUppZXhpLGlkLHRpdGxlLGp4c1JvdXRlKVxcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k5YWD57Sg5LiN5pSv5oyB6L+b6KGMOicrZ2V0VmFyKCdkbi5qeG1fd3JpdGVNb2RlJywn5paw5aKeJylcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sdGl0bGVzLHRpdGxlLGp4cyxqeHNSb3V0ZSxNeUppZXhpLG5vd0p4LGp4c1trXSxpZCxrLGp4cy5sZW5ndGgpXFxuICAgICAgICB9KTtcXG4gICAgfVxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgLy8gY29sX3R5cGU6J2xpbmUnLFxcbiAgICAgICAgY29sX3R5cGU6J2JsYW5rX2Jsb2NrJ1xcbiAgICB9KVxcbn1cXG5kLnB1c2goe1xcbiAgICBjb2xfdHlwZTonbGluZScsXFxufSk7XFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6J+S/neWtmCcsXFxuICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJyxcXG4gICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKE15SmlleGksaWQsanhzUm91dGUpPT57XFxuICAgICAgICBp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cbiAgICAgICAgaWYoZHhfZmlsdGVyID09PSAn5bey6YCJJyl7XFxuICAgICAgICAgICAganhzID0ganhzLmZpbHRlcihpdD0+ZGF0YS5pbmNsdWRlcyhpdCkpO1xcbiAgICAgICAgfWVsc2UgaWYoZHhfZmlsdGVyPT09ICfmnKrpgIknKXtcXG4gICAgICAgICAgICBqeHMgPSBqeHMuZmlsdGVyKGl0PT4hZGF0YS5pbmNsdWRlcyhpdCkpO1xcbiAgICAgICAgfVxcbiAgICAgICAgZD1qeHMubWFwKChpdCk9PntcXG4gICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTooQXJyYXkuaXNBcnJheShkYXRhKSYmZGF0YS5pbmNsdWRlcyhpdCkpP2NvbG9yKGl0LCcjMTJiNjY4Jyk6aXQsXFxuICAgICAgICAgICAgICAgIC8vIHVybDondG9hc3Q6Ly/lip/og73lvIDlj5HkuK0nLFxcbiAgICAgICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaXQsY29sb3IpPT57XFxuICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YSA9IHN0b3JhZ2UwLmdldE15VmFyKCdqeF9zZWxlY3RlZCcpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYoQXJyYXkuaXNBcnJheShkYXRhKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YS5pbmNsdWRlcyhpdCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coJ+WMheWQqzonK2l0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5zcGxpY2UoZGF0YS5pbmRleE9mKGl0KSwxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5wdXNoKGl0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcignanhfc2VsZWN0ZWQnLCBkYXRhKVxcbiAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ2p4X3NlbGVjdGVkJywgW2l0XSlcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGlmKHN0b3JhZ2UwLmdldE15VmFyKCdqeF9zZWxlY3RlZCcpLmluY2x1ZGVzKGl0KSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbShpdCx7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOmNvbG9yKGl0LCcjMTJiNjY4JylcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbShpdCx7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOml0XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSxpdCxjb2xvciksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzMnLFxcbiAgICAgICAgICAgICAgICBleHRyYTp7XFxuICAgICAgICAgICAgICAgICAgICBpZDppdFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBsZXQgb3A9W107XFxuICAgICAgICBvcC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5YWo6YCJJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoanhzLGNvbG9yKT0+e1xcbiAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcignanhfc2VsZWN0ZWQnLCBqeHMpO1xcbiAgICAgICAgICAgICAgICBqeHMuZm9yRWFjaChpdD0+e1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7dGl0bGU6IGNvbG9yKGl0LCcjMTJiNjY4JyksIGV4dHJhOiB7aWQ6IGl0fX0pO1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sanhzLGNvbG9yKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pO1xcbiAgICAgICAgb3AucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+WFqOS4jemAiScsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGp4cyk9PntcXG4gICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ2p4X3NlbGVjdGVkJywgW10pO1xcbiAgICAgICAgICAgICAgICBqeHMuZm9yRWFjaChpdD0+e1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7dGl0bGU6IGl0LCBleHRyYToge2lkOiBpdH19KTtcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LGp4cyksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nXFxuICAgICAgICB9KTtcXG4gICAgICAgIG9wLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiflj43pgIknLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChqeHMsY29sb3IpPT57XFxuICAgICAgICAgICAgICAgIGxldCBvbGRTZWwgPSBzdG9yYWdlMC5nZXRNeVZhcignanhfc2VsZWN0ZWQnLCBbXSk7XFxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGdldERpZmZlcmVudERhdGEoYXJyQSwgYXJyQikge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFyckEuY29uY2F0KGFyckIpLmZpbHRlcihmdW5jdGlvbiAodiwgaSwgYXJyKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFyci5pbmRleE9mKHYpID09PSBhcnIubGFzdEluZGV4T2Yodik7XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBsZXQgbmV3U2VsID0gZ2V0RGlmZmVyZW50RGF0YShqeHMsb2xkU2VsKTtcXG4gICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ2p4X3NlbGVjdGVkJywgbmV3U2VsKTtcXG4gICAgICAgICAgICAgICAgb2xkU2VsLmZvckVhY2goaXQ9PntcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe3RpdGxlOiBpdCwgZXh0cmE6IHtpZDogaXR9fSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBuZXdTZWwuZm9yRWFjaChpdD0+e1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7dGl0bGU6IGNvbG9yKGl0LCcjMTJiNjY4JyksIGV4dHJhOiB7aWQ6IGl0fX0pO1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sanhzLGNvbG9yKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pO1xcbiAgICAgICAgb3AucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+WIoOmZpCcsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCk9PntcXG4gICAgICAgICAgICAgICAgbGV0IHNlbCA9IHN0b3JhZ2UwLmdldE15VmFyKCdqeF9zZWxlY3RlZCcsIFtdKTtcXG4gICAgICAgICAgICAgICAgaWYoc2VsLmxlbmd0aCA8IDEpe1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WVpemDveayoemAie+8jOWIoOmZpOS4qum4oeavm34nXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoJ+ehruiupOWIoOmZpOW3sumAieaLqeeahDonK3NlbFswXSsn562JJytzZWwubGVuZ3RoKyfmnaHop6PmnpA/JykuY29uZmlybSgoc2VsKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBnZXRWYXIoJ3BhcnNlUm91dGUnKTtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBuYW1lIGluIHNlbCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpzb24uY29kZXMuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGpzb24uY29kZXNbbmFtZV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAganNvbi50aXRsZSA9IGpzb24udGl0bGUuZmlsdGVyKGl0PT4hc2VsLmluY2x1ZGVzKGl0KSk7IC8vIOetm+mAieayoeacieiiq+WIoOmZpOeahOagh+mimFxcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsICQuc3RyaW5naWZ5KGpzb24pKTtcXG4gICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdqeF9zZWxlY3RlZCcsIFtdKTsvL+WIoOmZpOWujOS6hua4heepuumAieS4remhueebrlxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+W3suWwhuOAllxcXCIgKyBzZWxbMF0gKyBcXFwi44CX562JXFxcIitzZWwubGVuZ3RoK1xcXCLmnaHop6PmnpDliKDpmaRcXFwiO1xcbiAgICAgICAgICAgICAgICB9LHNlbClcXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pO1xcbiAgICAgICAgb3AucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+aTjeS9nHznrZvpgIkgJytjb2xvcihqeHMubGVuZ3RoLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgdXJsOid0b2FzdDovL+WJjemdouaMiemSruaYr+aTjeS9nO+8jOWQjumdouaMiemSruaYr+etm+mAiScsXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nXFxuICAgICAgICB9KTtcXG4gICAgICAgIG9wLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOmR4X2ZpbHRlcj09PSflhajpg6gnP2NvbG9yKCflhajpg6gnLCcjMTJiNjY4Jyk6J+WFqOmDqCcsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCk9PntcXG4gICAgICAgICAgICAgICAgc2V0SXRlbSgnZHhfZmlsdGVyJywn5YWo6YOoJyk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICBvcC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpkeF9maWx0ZXI9PT0n5bey6YCJJz9jb2xvcign5bey6YCJJywnIzEyYjY2OCcpOiflt7LpgIknLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2R4X2ZpbHRlcicsJ+W3sumAiScpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pO1xcbiAgICAgICAgb3AucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ZHhfZmlsdGVyPT09J+acqumAiSc/Y29sb3IoJ+acqumAiScsJyMxMmI2NjgnKTon5pyq6YCJJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKT0+e1xcbiAgICAgICAgICAgICAgICBzZXRJdGVtKCdkeF9maWx0ZXInLCfmnKrpgIknKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nXFxuICAgICAgICB9KTtcXG4gICAgICAgIGQ9b3AuY29uY2F0KGQpO1xcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICB9LGR4X3Rlc3QsY29sb3IpXFxufSk7XFxuZnVuY3Rpb24gc29ydEJ5S2V5KGFycmF5LCBrZXksIG9yZGVyKSB7Ly/lr7nosaHmlbDnu4TmjInmn5DkuKrplK7lgLzmjpLluo9cXG4gICAgcmV0dXJuIGFycmF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Bjb25maWdfZHAgPScgKyBmZXRjaChnZXRWYXIoJ29sZENvbmZpZycpKSk7XFxuICAgICAgICAgICAgZXZhbChmZXRjaChjb25maWdfZHAuY2opKTtcXG4gICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKG9iai52aXBVcmwsb2JqLm5hbWUsb2JqLnRpbWVvdXQpO1xcbiAgICAgICAgfTtcXG4gICAgICAgIHZhciBwYXJzZVJldCA9IFtdOyAvL+ino+aekOe7k+aenOWIl+ihqFxcbiAgICAgICAgbGV0IHRhc2tzID0ganNvbi5tYXAoKGl0LGlkZXgpPT57XFxuICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgZnVuYzogdGFzayxcXG4gICAgICAgICAgICAgICAgcGFyYW06IHtcXG4gICAgICAgICAgICAgICAgICAgIC8vbmFtZTppdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6bm93UGFyc2UsXFxuICAgICAgICAgICAgICAgICAgICB0eXBlOml0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgLy8gcnVsZTppdC5ydWxlLFxcbiAgICAgICAgICAgICAgICAgICAgdmlwVXJsOiBpdC51cmwsXFxuICAgICAgICAgICAgICAgICAgICB0aW1lb3V0OiB0aW1lb3V0XFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGlkOiBcXFwidGFza1xcXCIraWRleFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgc2hvd0xvYWRpbmcoXFxcIumtlOaWreW5tuWPkeino+aekOS4re+8jOWJqeS9meW+hea1izpcXFwiK2NvdW50KTtcXG4gICAgICAgIGJlKHRhc2tzLHtcXG4gICAgICAgICAgICBmdW5jOiBmdW5jdGlvbihvYmosIGlkLCBlcnJvcixyZXQpIHtcXG4gICAgICAgICAgICAgICAgbG9nKFxcXCLnm5HlkKzliLDku7vliqFcXFwiICsgaWQrJ+W3sue7k+adnyxlcnJvcjonK2Vycm9yKycscmV0OicrcmV0KTtcXG4gICAgICAgICAgICAgICAgcmV0ID0gcmV0fHwnJztcXG4gICAgICAgICAgICAgICAgZXJyb3I9ZXJyb3J8fCcnO1xcbiAgICAgICAgICAgICAgICBwYXJzZVJldC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRhc2s6aWQsXFxuICAgICAgICAgICAgICAgICAgICByZXQ6cmV0LFxcbiAgICAgICAgICAgICAgICAgICAgZXJyb3I6ZXJyb3IsXFxuICAgICAgICAgICAgICAgICAgICBuYW1lOnRhc2tzLmZpbHRlcihpdD0+aXQuaWQ9PT1pZClbMF0ucGFyYW0udHlwZVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgY291bnQgLT0gMTsgLy/lrozmiJDkuobku7vliqHvvIzku7vliqHmlbDph48tMVxcbiAgICAgICAgICAgICAgICAvL2xvZyhvYmopO1xcbiAgICAgICAgICAgICAgICBpZiAoY291bnQgPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICBzaG93TG9hZGluZyhcXFwi6a2U5pat5bm25Y+R6Kej5p6Q5Lit77yM5Ymp5L2Z5b6F5rWLOlxcXCIgKyBjb3VudClcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHBhcmFtOiB7Ly/kvKDliLDnm5HlkKzlh73mlbDnmoRvYmrlj4LmlbDph4xcXG4gICAgICAgICAgICAgICAgaGk6IFxcXCJjY2NcXFwiLFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pOy8v5omn6KGM5aSa5Lu75YqhXFxuICAgICAgICAvL2xvZyhcXFwi5aSa5Lu75Yqh5omn6KGM57uT5p6c5pWwOlxcXCIrcGFyc2VSZXQubGVuZ3RoKTtcXG4gICAgICAgIHBhcnNlUmV0PXNvcnRCeUtleShwYXJ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AgICAgICAgICAgICAgICAgICAgc2hvd19tb2RlID0gc2hvd19tb2RlPT09J+ivpue7hic/J+eyvueugCc6J+ivpue7hic7XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdzaG93X21vZGUnLHNob3dfbW9kZSk7XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKCdzaG93X21vZGUnLHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTon5pi+56S65qih5byPOicrY29sb3Ioc2hvd19tb2RlLCcjZmE4YzM1JylcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbF90eXBlID0gc2hvd19tb2RlPT09J+ivpue7hic/J3RleHRfMSc6J3RleHRfMyc7XFxuICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGk9MDtpPGNudDtpKyspe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3Nob3dfcmV0XycraSx7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOmNvbF90eXBlXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sY29sb3IscGFyc2VSZXQubGVuZ3RoKSxcXG4gICAgICAgICAgICAgICAgZXh0cmE6e1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6J3Nob3dfbW9kZSdcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHBhcnNlUmV0LmZvckVhY2goKGl0LGlkeCk9PntcXG4gICAgICAgICAgICAgICAgbGV0IHRpdGxlPWl0Lm5hbWU7XFxuICAgICAgICAgICAgICAgIGlmKGl0LnJldCYmIWl0LnJldC5pbmNsdWRlcygndW5kZWZpbmVkJykmJigvI2lzVmlkZW89dHJ1ZSMvLnRlc3QoaXQucmV0KXx8aXNWaWRlbyhpdC5yZXQpKSl7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZT1jb2xvcih0aXRsZSwnIzEyYjY2OCcpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbGV0IGRlc2M9KGl0LnJldHx8aXQuZXJyb3IpLnN1YnN0cigwLDYwKTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzpzbWFsbChkZXNjKSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOmNvbF90eXBlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOml0LnJldCxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXQ6aXQucmV0fHxpdC5lcnJvcixcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDonc2hvd19yZXRfJytpZHhcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgfSxwYXJzZVJldClcXG4gICAgfSxqc29uLG5vd1BhcnNlLHRpbWVvdXQsc29ydEJ5S2V5KSxcXG4gICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgZXh0cmE6e1xcbiAgICAgICAgbGluZVZpc2libGU6ZmFsc2VcXG4gICAgfVxcbn0pO1xcbi8qXFxudmFyIHBhcnNlUm91dGUgPSAnaGlrZXI6Ly9maWxlcy9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nO1xcbnZhciBNeVBhcnNlUyA9IHt9O1xcbmV2YWwoJ3ZhciBwYXJzZUZpbGUgPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuTXlQ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ID0ganNvbltpXS5waWNfdXJsO1xcbiAgICBpZihnZXRNeVZhcignemR5JykgPT09IHp1cmwpe1xcbiAgICAgICAgdGFnPXRpdGxlO1xcbiAgICAgICAgdGl0bGU9J+KbsycrdGl0bGU7XFxuICAgIH1cXG4gICAgaXRlbXMucHVzaCh7XFxuICAgICAgICB0aXRsZTp0aXRsZSxcXG4gICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoenVybCxub3dQYXJzZSx0aW1lb3V0LHZpcE9iaikgPT4ge1xcbiAgICAgICAgICAgIGlmKGdldE15VmFyKCd6ZHknKSE9PXp1cmwpe1xcbiAgICAgICAgICAgICAgICBwdXRNeVZhcignemR5JywgenVybCk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIGR4X21vZGUgPSBnZXRJdGVtKCfngrnpgIknLCfljZXmtYsnKTsvL+eCuemAieaooeW8j1xcbiAgICAgICAgICAgIGlmKGR4X21vZGU9PT0n5Y2V5rWLJyl7XFxuICAgICAgICAgICAgICAgIHNob3dMb2FkaW5nKCfprZTmlq3liqjmgIHop6PmnpDkuK0s6K+356iN562JLi4uJyk7XFxuICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBjb25maWdfZHAgPScgKyBmZXRjaChnZXRWYXIoJ29sZENvbmZpZycpKSk7XFxuICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnX2RwLmNqKSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UoenVybCxub3dQYXJzZSx0aW1lb3V0KTtcXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBzdG9yYWdlMC5nZXRNeVZhcignanhfc2VsZWN0ZWQnKXx8W107XFxuICAgICAgICAgICAgICAgIGlmKGRhdGEubGVuZ3RoPjMyKXtcXG4gICAgICAgICAgICAgICAgIC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oKGNvbmZpZ19kcC5jaikpO1xcbiAgICAgICAgcmV0dXJuIGF5dG1QYXJzZSh2aXBVcmwsb2JqLm5hbWUsdGltZW91dCk7XFxuICAgIH07XFxuICAgIHZhciBwYXJzZVJldCA9IFtdOyAvL+ino+aekOe7k+aenOWIl+ihqFxcbiAgICBsZXQgdGFza3MgPSBqeHMubWFwKChpdCxpZGV4KT0+e1xcbiAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICBmdW5jOiB0YXNrLFxcbiAgICAgICAgICAgIHBhcmFtOiB7XFxuICAgICAgICAgICAgICAgIG5hbWU6aXQsXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBpZDogXFxcInRhc2tcXFwiK2lkZXhcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuICAgIHNob3dMb2FkaW5nKFxcXCLprZTmlq3lubblj5Hop6PmnpDkuK3vvIzliankvZnlvoXmtYs6XFxcIitjb3VudCk7XFxuICAgIGJlKHRhc2tzLHtcXG4gICAgICAgIGZ1bmM6IGZ1bmN0aW9uKG9iaiwgaWQsIGVycm9yLHJldCkge1xcbiAgICAgICAgICAgIGxvZyhcXFwi55uR5ZCs5Yiw5Lu75YqhXFxcIiArIGlkKyflt7Lnu5PmnZ8sZXJyb3I6JytlcnJvcisnLHJldDonK3JldCk7XFxuICAgICAgICAgICAgcmV0ID0gcmV0fHwnJztcXG4gICAgICAgICAgICBlcnJvcj1lcnJvcnx8Jyc7XFxuICAgICAgICAgICAgcGFyc2VSZXQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRhc2s6aWQsXFxuICAgICAgICAgICAgICAgIHJldDpyZXQsXFxuICAgICAgICAgICAgICAgIGVycm9yOmVycm9yLFxcbiAgICAgICAgICAgICAgICBuYW1lOnRhc2tzLmZpbHRlcihpdD0+aXQuaWQ9PT1pZClbMF0ucGFyYW0ubmFtZVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGNvdW50IC09IDE7IC8v5a6M5oiQ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5P3J1bGU96YGT6ZW/5LuT5bqTUHJvXFxcIik7XFxuICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgbGV0IHNob3dfbW9kZSA9IGdldEl0ZW0oJ3Nob3dfbW9kZScsICfor6bnu4YnKTtcXG4gICAgICAgIGxldCBjb2xfdHlwZSA9IHNob3dfbW9kZSA9PT0gJ+ivpue7hicgPyAndGV4dF8xJyA6ICd0ZXh0XzMnO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+aYvuekuuaooeW8jzonICsgY29sb3Ioc2hvd19tb2RlLCAnI2ZhOGMzNScpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChjb2xvciwgY250KSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBzaG93X21vZGUgPSBnZXRJdGVtKCdzaG93X21vZGUnLCAn6K+m57uGJyk7XFxuICAgICAgICAgICAgICAgIHNob3dfbW9kZSA9IHNob3dfbW9kZSA9PT0gJ+ivpue7hicgPyAn57K+566AJyA6ICfor6bnu4YnO1xcbiAgICAgICAgICAgICAgICBzZXRJdGVtKCdzaG93X21vZGUnLCBzaG93X21vZGUpO1xcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKCdzaG93X21vZGUnLCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+aYvuekuuaooeW8jzonICsgY29sb3Ioc2hvd19tb2RlLCAnI2ZhOGMzNScpXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBsZXQgY29sX3R5cGUgPSBzaG93X21vZGUgPT09ICfor6bnu4YnID8gJ3RleHRfMScgOiAndGV4dF8zJztcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjbnQ7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSgnc2hvd19yZXRfJyArIGksIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogY29sX3R5cGVcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCBjb2xvciwgcGFyc2VSZXQubGVuZ3RoKSxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogJ3Nob3dfbW9kZSdcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIHBhcnNlUmV0LmZvckVhY2goKGl0LCBpZHgpID0+IHtcXG4gICAgICAgICAgICBsZXQgdGl0bGUgPSBpdC5uYW1lO1xcbiAgICAgICAgICAgIGlmIChpdC5yZXQgJiYgIWl0LnJldC5pbmNsdWRlcygndW5kZWZpbmVkJykgJiYgKC8jaXNWaWRlbz10cnVlIy8udGVzdChpdC5yZXQpIHx8IGlzVmlkZW8oaXQucmV0KSkpIHtcXG4gICAgICAgICAgICAgICAgdGl0bGUgPSBjb2xvcih0aXRsZSwgJyMxMmI2NjgnKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsZXQgZGVzYyA9IChpdC5yZXQgfHwgaXQuZXJyb3IpLnN1YnN0cigwLCA2MCk7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBzbWFsbChkZXNjKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IGNvbF90eXBlLFxcbiAgICAgICAgICAgICAgICB1cmw6IGl0LnJldCxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldDogaXQucmV0IHx8IGl0LmVycm9yLFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6ICdzaG93X3JldF8nICsgaWR4XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0pO1xcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICB9LHZpcE5hbWUscGFyc2VSZXQpXFxufVxcblxcbiQuZXhwb3J0cy5zb3J0QnlLZXk9c29ydEJ5S2V5O1xcbiQuZXhwb3J0cy50ZXN0X3JlcG9ydD10ZXN0X3JlcG9ydDtcIn1dIiwiaWNvbiI6Imh0dHBzOi8vbGFubWVpZ3VvamlhbmcuY29tL3R1Ymlhby9tb3ZpZS80LnN2ZyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment