xiaomianao666

小程序:MyFieldᴰⁿ

Dec 30th, 2021
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@MyFieldᴰⁿ@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiTXlGaWVsZOG0sOKBvyIsImF1dGhvciI6IuaWreW/tSbpgZPplb/prZTmlLkiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IiwidmVyc2lvbiI6MzczLCJjb2xfdHlwZSI6InRleHRfY2VudGVyXzEiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6ImFsbCIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxuLy9sb2coTU9CSUxFX1VBKTtcbmNvbnN0IHtkZW1vRGF0YSxkZWZhdWx0U2V0cyxmbG9vcnN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2RlbW9EYXRhP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbmNvbnN0IHtnZXRPbmUsdW5pcXVlMixkdXBsaWNhdGVzfSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS91dGlscz9ydWxlPU15RmllbGThtLDigb9cIik7XG5sZXQgc2pUZXN0ID1bXTtmb3IobGV0IGkgaW4gZGVtb0RhdGEpe3NqVGVzdD1zalRlc3QuY29uY2F0KGRlbW9EYXRhW2ldKX1cbnRoaXMuZCA9IFtdO1xuY29uc3QganhJdGVtID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2p4SXRlbT9ydWxlPU15RmllbGThtLDigb9cIik7XG52YXIgUm91dGUgPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvUm91dGU/cnVsZT1NeUZpZW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L015UGFyc2VTZXQuanNvblwiKSk7XG4gICAgICAgICAgICAgICAgZXZhbChmZXRjaChjb25maWcuY2opKTtcbiAgICAgICAgICAgICAgICBsb2coJ+W8gOWni+iwg+eUqOmtlOaWreaLn+ecn+a1i+ivlSxteUZpbGVk6LaF5pe25Li6OicrZ2V0SXRlbSgnZG4udGltZW91dCcsJzUwMDAnKSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZSh1cmwsJycscGFyc2VJbnQoZ2V0SXRlbSgnZG4udGltZW91dCcsJzUwMDAnKSkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZXtcbiAgICAgICAgICAgICAgICBjb25zdCB7bGF6eVBhcnNlfSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2dsb2JhbFBhcnNlP3J1bGU96YGT6ZW/5LuT5bqTUHJvJyk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGxhenlQYXJzZShwbGF5VXJsLHBhcnNlSW50KGdldEl0ZW0oJ2RuLnRpbWVvdXQnLCc1MDAwJykpKXx8J3RvYXN0Oi8v6Kej5p6Q5aSx6LSlLOWFt+S9k+eci+aXpeW/lydcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxwbGF5VXJsLHVybClcbiAgICB9KSxcbiAgICBleHRyYToge1xuICAgICAgICBibG9ja1J1bGVzOiBbJ2JhaWR1LioucG5nJywgJy5qcGcnLCcubXAzJywnLm1wNCcsJy5tM3U4JywnLmZsdicsJy5hdmknLCcuM2dwJywnLm1wZWcnLCcud212JywnLm1vdicsJy5ybXZiJywnLmdpZicsJy5qcGcnLCcuanBlZycsJy5wbmcnLCcuaWNvJywnLnN2ZyddLFxuICAgICAgICB0aXRsZVZpc2libGU6IHRydWUsXG4gICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0VmFyKCdwYXJzZVVybC51cmwnLCAnJykgfHwgXCJcIixcbiAgICAgICAgb25DaGFuZ2U6ICdwdXRWYXIoXCJwYXJz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XRUaXRsZS5zdGFydHNXaXRoKCdodHRwJykmJih0eXBlb2Yob3V0Q29kZSk9PT0ndW5kZWZpbmVkJ3x8IW91dENvZGUpKXtcbiAgICAgICAgICAgICAgICAgICAganhDb2RlLnB1c2gob3V0VGl0bGUrJywnK291dFRpdGxlKTtcbiAgICAgICAgICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgICAgICAgICAganhDb2RlLnB1c2gob3V0VGl0bGUrJywnK291dENvZGV8fCcnKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgbGV0IG91dFRleHQgPSBqeENvZGUuam9pbignXFxuJyk7XG4gICAgICAgICAgICBsZXQgb3V0UGF0aCA9ICdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2VPdXRfJyttb2RlKycudHh0JztcbiAgICAgICAgICAgIHdyaXRlRmlsZShvdXRQYXRoLG91dFRleHQpO1xuICAgICAgICAgICAgbGV0IHBhc3RlcyA9IGdldFBhc3RlcygpO1xuICAgICAgICAgICAgbGV0IGltcG9ydFVybCA9IHNoYXJlUGFzdGUoYmFzZTY0RW5jb2RlKG91dFRleHQpLHBhc3Rlc1sxXSk7XG4gICAgICAgICAgICBsZXQgaW1wb3J0Q29kZSA9ICfprZTmlq3op6PmnpDlr7zlhaXlj6Pku6TCpcKlJytpbXBvcnRVcmw7XG4gICAgICAgICAgICBjb3B5KGltcG9ydENvZGUpO1xuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+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+S7tuWvvOWFpScpLmNvbmZpcm0oKCk9PntcbiAgICAgICAgICAgICAgICBjb25zdCB7ZGVmYXVsdFNldHN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2RlbW9EYXRhP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VSb3V0ZSA9ICdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbic7XG4gICAgICAgICAgICAgICAgbGV0IGpzQ29kZSA9IGZldGNoKHBhcnNlUm91dGUpfHxKU09OLnN0cmluZ2lmeSh7dGl0bGU6W10sY29kZXM6e30sc2V0dGluZ3M6ZGVmYXVsdFNldHN9KTtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGpzQ29kZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lj5HnlJ/plJnor686XFxuJytlLm1lc3NhZ2VcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IHRvSW1wb3J0ID0gZ2V0VmFyKFwiZG4uaW1wb3J0X3RleHRcIik7XG4gICAgICAgICAgICAgICAgaWYoL+mtlOaWreino+aekOWvvOWFpeWPo+S7pMKlwqUvLnRlc3QodG9JbXBvcnQpJiZ0b0ltcG9ydC5zcGxpdCgnwqXCpScpLmxlbmd0aD4xKXtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHRvSW1wb3J0LnNwbGl0KCfCpcKlJylbMV07XG4gICAgICAgICAgICAgICAgICAgIGlmKCEvXmh0dHAvLnRlc3QodXJsKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5Ymq5YiH5p2/5Zyw5Z2A5pyJ6K+vLOWvvOWFpeWksei0pSdcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0b0ltcG9ydCA9IHBhcnNlUGFzdGUodXJsKTtcbiAgICAgICAgICAgICAgICAgICAgdG9JbXBvcnQgPSBiYXNlNjREZWNvZGUodG9JbXBvcnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgamlleGkgPSB0b0ltcG9ydC5zcGxpdCgnXFxuJykuZmlsdGVyKGl0PT5pdC50cmltKCkpO1xuICAgICAgICAgICAgICAgIGxldCBwYXJzZVRpdGxlID0gW107XG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlQ29kZSA9IHt9O1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgaW4gamlleGkpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlPWppZXhpW2ldLnNwbGl0KCcsJylbMF07XG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2RlPWppZXhpW2ldLnNwbGl0KCcsJylbMV07XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XG4gICAgICAgICAgICAgICAgICAgIGlmKCEoY29kZS5yZXBsYWNlKC9bXFxzXS9nLCcnKS5zdGFydHNXaXRoKCdodHRwJykpKXtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZyh0aXRsZSsn5Li65Ye95pWw6Kej5p6QJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZihjb2RlLnJlcGxhY2UoL1tcXHNdL2csJycpLmxlbmd0aD4yMCl7Ly/op4bkuLpmdW5jdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgPSBldmFsKGJhc2U2NERlY29kZShjb2RlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZyhjb2RlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29kZSA9IGUubWVzc2FnZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlW3RpdGxlXT1jb2RlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgc2NPYmplY3QgPSBbXCJDaXR5SVBcIiwgXCJwY1VBXCIsIFwiY2FjaGVNM3U4XCIsIFwiZGVmYXVsdFBhcnNlV2ViXCIsXCJtYW9zc1wiLCBcIkxMUVwiXTtcbiAgICAgICAgICAgICAgICBwYXJzZVRpdGxlID0gcGFyc2VUaXRsZT9wYXJzZVRpdGxlLmZpbHRlcihpdD0+IXNjT2JqZWN0LmluY2x1ZGVzKGl0KSk6W107XG4gICAgICAgICAgICAgICAgdmFyIG5ld1BhcnNlVGl0bGUgPSBqc29uLnRpdGxlLmNvbmNhdChwYXJzZVRpdGxlKTtcbiAgICAgICAgICAgICAgICBqc29uLnRpdGxlID0gQXJyYXkuZnJvbShuZXcgU2V0KG5ld1BhcnNlVGl0bGUpKTtcbiAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKGpzb24uY29kZXMsIHBhcnNlQ29kZSk7XG4gICAgICAgICAgICAgICAgbGV0IG5ld0ZpbGUgPSAkLnN0cmluZ2lmeShqc29uKTsgLy9KU09OLnBhcnNl5Lya5oql6ZSZXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsIG5ld0ZpbGUpO1xuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5oiQ5Yqf5a+85YWlJytqaWV4aS5sZW5ndGgrJ+adoeino+aekCc7XG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIGV4dHJhOntcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTp0cnVlXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBzZXRSZXN1bHQoZCk7XG4gICAgfSksXG59KTtcbmQucHVzaCh7XG4gICAgdGl0bGU6J+KYr++4j+afpemHjeWkhOeQhicsXG4gICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxuICAgIHVybDokKCkubGF6eVJ1bGUoKHVuaXF1ZTIsZHVwbGljYXRlcyxmbG9vcnMpPT57XG4gICAgICAgIGxldCBwYXJzZVJvdXRlID0gJ2hpa2VyOi8vZmlsZXMvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uJztcbiAgICAgICAgbGV0IGpzQ29kZSA9IGZldGNoKHBhcnNlUm91dGUpO1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBqc0NvZGUpO1xuICAgICAgICB9XG4gICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pys5Zyw6YKj5LiqTXlQYXJzZS5qc29u5paH5Lu25pyJ6Zeu6aKYLOi/meS4quWKn+iDveS4jee7meS9oOeUqOS6hiEnXG4gICAgICAgIH1cbiAgICAgICAgbGV0IHRpdGxlcyA9IGpzb24udGl0bGU7XG4gICAgICAgIGxldCBjb2RlcyA9IGpzb24uY29kZXM7XG4gICAgICAgIGxldCBrZXlzPSBPYmplY3Qua2V5cyhjb2Rlcyk7XG4gICAgICAgIGxldCBrZXlzX3Jl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/l1xuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3Nbb25lXSA9IG15Rmxvb3JzWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgbXlGbG9vcnMuc3BsaWNlKDAsIDEpOy8v5Yig6Zmk5qCH5b+X5YiX6KGo6YeM55qE56ys5LiA5Liq5YWD57SgXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZnRsaXN0LnB1c2goe2tleTogZmxhZ3Nbb25lXSArIGosIHZhbHVlOiBvbmV9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBmdGxpc3QucHVzaCh7a2V5OiBqLCB2YWx1ZTogb25lfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfWNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgbG9nKGUubWVzc2FnZSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyBsb2coSlNPTi5zdHJpbmdpZnkoZmxhZ3MpKTtcbiAgICAgICAgbGV0IG5ld0NvZGVzID0ge307XG4gICAgICAgIGZvcihsZXQgayBpbiBmdGxpc3Qpe1xuICAgICAgICAgICAgbmV3Q29kZXNbZnRsaXN0W2tdLmtleV0gPSBmdGxpc3Rba10udmFsdWU7XG4gICAgICAgIH1cbiAgICAgICAgbGV0IHRpcHMgPSAn5qOA5rWL5Yiw5ZCN56ew5aSN55So6aG555uu5pWwOicra2V5c19yZV9jdCsnLOS7o+eggemHjeWkjemhueebruaVsOmHjzonK3ZhbHVlX3JlX2N0KydcXG7pnIDopoHkuIDplK7miZPkuKrmoIfor4blkJc/5LiN5pSv5oyB6Ieq5Yqo5Yig6ZmkLOaJk+agh+W/l+iHquihjOino+WGsyc7XG4gICAgICAgIHJldHVybiAkKHRpcHMpLmNvbmZpcm0oKHZhbHVlX3JlX2N0LGpzb24sbmV3Q29kZXMscGFyc2VSb3V0ZSk9PntcbiAgICAgICAgICAgIGlmKHZhbHVlX3JlX2N0PDEpe1xuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ml6LnhLbpg73mmK8w5Liq6YeN5aSN6aG555uu5LqG77yM5bCx5LiN6ZyA6KaB5oiR5YGa5LuA5LmI5LqGISdcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNvbXBhcmUoKXtcbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGEsIGIpe1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB7Zmxvb3JzfSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9kZW1vRGF0YT9ydWxlPU15RmllbGThtLDigb9cIik7XG4gICAgICAgICAgICAgICAgICAgIGxldCB4ID0gYS5zdWJzdHJpbmcoMCwxKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHkgPSBiLnN1YnN0cmluZygwLDEpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmxvb3JzLmluZGV4T2YoeSktZmxvb3JzLmluZGV4T2YoeCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAganNvbi5jb2RlcyA9IG5ld0NvZGVzO1xuICAgICAgICAgICAgbGV0IHRpdGxlcyA9IE9iamVjdC5rZXlzKG5ld0NvZGVzKTtcbiAgICAgICAgICAgIHRpdGxlcyA9IHRpdGxlcy5zb3J0KGNvbXBhcmUoKSk7XG4gICAgICAgICAgICBqc29uLnRpdGxlID0gdGl0bGVzO1xuICAgICAgICAgICAgdmFyIG5ld0ZpbGUgPSAkLnN0cmluZ2lmeShqc29uKTsgLy9KU09OLnBhcnNl5Lya5oql6ZSZXG4gICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgbmV3RmlsZSk7XG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5LiA6ZSu5omT5LiK5qCH5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xcXCIsIEhlbHZldGljYSwgQXJpYWwsc2Fucy1zZXJpZiwgRnJlZVNhbnMsIEFyaW1vO1xcbiAgICAgICAgfVxcbiAgICAgICAgI2FwcHtcXG4gICAgICAgICAgICBtYXJnaW4tdG9wOi0xMHB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgI3RpcHN7XFxuICAgICAgICAgICAgbWFyZ2luLXRvcDotMTBweDtcXG4gICAgICAgICAgICBtYXJnaW4tYm90dG9tOjVweDtcXG4gICAgICAgIH1cXG4gICAgICAgIC5mdW5ne1xcbiAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyXFxuICAgICAgICB9XFxuICAgICAgICBkaXYuYm94IHtcXG4gICAgICAgICAgICBtYXJnaW4tdG9wOi0xcHg7XFxuICAgICAgICAgICAgaGVpZ2h0OiA0M3B4O1xcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAyMHB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrovpPlhaXmoYblsLrlr7gqL1xcbiAgICAgICAgZm9ybSB7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XFxuICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xcbiAgICAgICAgICAgIHdpZHRoOiAxMDAlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaW5wdXQsIGxhYmVsLCBzZWxlY3Qge1xcbiAgICAgICAgICAgIGJvcmRlcjogbm9uZTtcXG4gICAgICAgICAgICBvdXRsaW5lOiBub25lO1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrlrZfkvZPkvY3nva4qL1xcbiAgICAgICAgaW5wdXQge1xcbiAgICAgICAgICAgIHdpZHRoOiA3NyU7XFxuICAgICAgICAgICAgaGVpZ2h0OiAzMnB4O1xcbiAgICAgICAgICAgIHBhZGRpbmctbGVmdDogNjZweDtcXG4gICAgICAgICAgICBwYWRkaW5nLXJpZ2h0OiAwcHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBsYWJlbCB7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDQzcHg7XFxuICAgICAgICAgICAgaGVpZ2h0OiA0MHB4O1xcbiAgICAgICAgICAgIHdpZHRoOiA2MHB4O1xcbiAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcXG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKuWwj+ahhiovXFxuICAgICAgICAuYmFyIGxhYmVsIHtcXG4gICAgICAgICAgICAvKmJhY2tncm91bmQ6ICNEMDZCNkM7Ki9cXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1cHggNTU1cHggNTU1cHggNXB4O1xcbiAgICAgICAgICAgIHdpZHRoOiA2MHB4O1xcbiAgICAgICAgICAgIGZvbnQtc2l6ZTogMTNweDtcXG4gICAgICAgICAgICB0b3A6IDA7XFxuICAgICAgICAgICAgbGVmdDogM3B4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrovpPlhaXmoYbmoLflvI8qL1xcbiAgICAgICAgLmJhciBpbnB1dCB7XFxuICAgICAgICAgICAgLypib3JkZXItcmFkaXVzOiA1cHggNTU1cHggNTU1cHggNXB4O1xcbiAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC8q5YiX6KGoKi9cXG4gICAgICAgIHNlbGVjdCB7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6NDBweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgd2lkdGg6IDIwcHg7XFxuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0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hcnNlJ107XFxuICAgICAgICBteVNlbGVjdCA9IG5ld0NvbmZpZy50aXRsZS5maWx0ZXIoY29tcGFyZSh5Y1RpdGxlKSk7XFxuICAgICAgICAvLyBteVNlbGVjdCA9IG15U2VsZWN0Lm1hcCgoaXQpPT57XFxuICAgICAgICAvLyAgICAgbGV0IGZsYWcgPSAn4pOKJztcXG4gICAgICAgIC8vICAgICBpZih0eXBlb2YobmV3Q29uZmlnLmNvZGVzW2l0XSk9PT0nZnVuY3Rpb24nKXtcXG4gICAgICAgIC8vICAgICAgICAgZmxhZyA9ICfikr8nO1xcbiAgICAgICAgLy8gICAgIH1lbHNlIGlmKHR5cGVvZihuZXdDb25maWcuY29kZXNbaXRdKT09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgIC8vICAgICAgICAgZmxhZyA9ICcnO1xcbiAgICAgICAgLy8gICAgIH1cXG4gICAgICAgIC8vICAgICByZXR1cm4gZmxhZytpdFxcbiAgICAgICAgLy8gfSk7XFxuICAgIH1cXG4gICAgLy9mYmEubG9nKEpTT04uc3RyaW5naWZ5KG15U2VsZWN0KSk7XFxuXFxuICAgIGxldCBvcHRpb25zID0gW1xcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+eIseWlh+iJuicsXFxuICAgICAgICAgICAgaWQ6J3F5JyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5xeSxcXG4gICAgICAgICAgICBwbGFjZWhvbGRlcjon6K6+572u54ix5aWH6Im6J1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifkvJjphbcnLFxcbiAgICAgICAgICAgIGlkOid5aycsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MueWtcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6IW+6K6vJyxcXG4gICAgICAgICAgICBpZDondHgnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnR4XFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+iKkuaenCcsXFxuICAgICAgICAgICAgaWQ6J21nJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5tZ1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflk5Tlk6nlk5Tlk6knLFxcbiAgICAgICAgICAgIGlkOidibCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuYmxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5pCc54uQJyxcXG4gICAgICAgICAgICBpZDonc2gnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnNoXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+ilv+eTnCcsXFxuICAgICAgICAgICAgaWQ6J3hnJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy54Z1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifpmL/ph4wnLFxcbiAgICAgICAgICAgIGlkOidhbCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuYWxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTonUFBUVicsXFxuICAgICAgICAgICAgaWQ6J3BwJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5wcFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflkqrlkpUnLFxcbiAgICAgICAgICAgIGlkOidtaScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MubWlcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5LmQ6KeGJyxcXG4gICAgICAgICAgICBpZDonbGUnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLmxlXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6JzE5MDUnLFxcbiAgICAgICAgICAgIGlkOidvbmUnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLm9uZVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifpo47ooYwnLFxcbiAgICAgICAgICAgIGlkOidmdW4nLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLmZ1blxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflhbbku5YnLFxcbiAgICAgICAgICAgIGlkOidvdGgnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLm90aFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflhajlsYAnLFxcbiAgICAgICAgICAgIGlkOidxanUnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnFqdVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifmj5Lku7YnLFxcbiAgICAgICAgICAgIGlkOidjaicsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuY2pcXG4gICAgICAgIH0sXFxuICAgIF07XFxuXFxuICAgIGZ1bmN0aW9uIERpZChpZCl7XFxuICAgICAgICByZXR1cm4gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoaWQpO1xcbiAgICB9XFxuICAgIGZ1bmN0aW9uIGdldE9wdGlvbihpZCx0aXRsZSkge1xcbiAgICAgICAgdmFyIG9iaiA9IERpZChpZCk7XFxuICAgICAgICBEaWQodGl0bGUpLnZhbHVlID0gb2JqLm9wdGlvbnNbb2JqLnNlbGVjdGVkSW5kZXhdLnRleHQ7XFxuICAgICAgICAvLyBEaWQodGl0bGUpLnZhbHVlID0gb2JqLm9wdGlvbnNbb2JqLnNlbGVjdGVkSW5kZXhdLnRleHQucmVwbG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G0sOKBvyZ0eXBlPeS4u+mimCNub0hpc3RvcnkjI25vUmVjb3JkSGlzdG9yeSNcXFwiLFxcbiAgICAgICAgICAgIGdyb3VwOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgcHJlUnVsZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHt9XFxuICAgICAgICB9KSk7XFxuICAgIH1cXG4gICAgZnVuY3Rpb24gb3Blbkp4TWFuYWdlKCl7XFxuICAgICAgICBmYmEub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgcnVsZTogXFxcIj1eX149XFxcIixcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuino+aekOmFjee9rueuoeeQhlxcXCIsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBvyZ0eXBlPeino+aekCNub0hpc3RvcnkjI25vUmVjb3JkSGlzdG9yeSNcXFwiLFxcbiAgICAgICAgICAgIGdyb3VwOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgcHJlUnVsZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHt9XFxuICAgICAgICB9KSk7XFxuICAgIH1cXG4gICAgZnVuY3Rpb24gY2FuY2VsKCl7XFxuICAgICAgICBpZighbXlTZXQpe1xcbiAgICAgICAgICAgIGZiYS53cml0ZUZpbGUob2xkUm91dGUsIEpTT04uc3RyaW5naWZ5KHNldHRpbmdzLCBudWxsLCA0KSk7XFxuICAgICAgICAgICAgZmJhLnJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgZmJhLmJhY2soZmFsc2UpO1xcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIGZ1bmN0aW9uIGNsaWNrbWUobXNnLGR1cmF0aW9uLHRpdGxlKXtcXG4gICAgICAgIHRyeXtcXG4gICAgICAgICAgICBmb3IobGV0IGtleSBpbiBzZXR0aW5ncyl7XFxuICAgICAgICAgICAgICAgIC8vIGZiYS5sb2coRGlkKGtleSkrJycra2V5KTtcXG4gICAgICAgICAgICAgICAgdHJ5e1xcbiAgICAgICAgICAgICAgICAgICAgLy9zZXR0aW5nc1trZXldID0gRGlkKGtleSkudmFsdWUucmVwbGFjZSgv4pOKfOKSvy9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgIHNldHRpbmdzW2tleV0gPSBEaWQoa2V5KS52YWx1ZTtcXG4gICAgICAgICAgICAgICAgfWNhdGNoKGUpe1xcbiAgICAgICAgICAgICAgICAgICAgYWxlcnQoXFxcIuacquiOt+WPluWIsOiKgueCuTpcXFwiK2tleStcXFwiXFxcXG5cXFwiK2UubWVzc2FnZSk7XFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYobXlTZWxlY3Qpe1xcbiAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKG5ld0NvbmZpZy5zZXR0aW5ncywgc2V0dGluZ3MpO1xcbiAgICAgICAgICAgICAgICBmYmEud3JpdGVGaWxlKG5ld1JvdXRlLCAkJCQuc3RyaW5naWZ5KG5ld0NvbmZpZykpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBmYmEud3JpdGVGaWxlKG9sZFJvdXRlLCAkJCQuc3RyaW5naWZ5KHNldHRpbmdzKSk7XFxuICAgICAgICAgICAgVG9hc3QobXNnLGR1cmF0aW9uKTtcXG4gICAgICAgICAgICBpZih0aXRsZT09PVxcXCLlhbNcXFwiKXtcXG4gICAgICAgICAgICAgICAgZmJhLmJhY2soKTtcXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgZmJhLnJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1jYXRjaChlKXtcXG4gICAgICAgICAgICBhbGVydChlLm1lc3NhZ2UpXFxuICAgICAgICB9XFxuICAgIH1cXG5cXG4gICAgLy9sZXQgd2lkdGg9d2luZG93LnNjcmVlbi5hdmFpbFdpZHRoO1xcbiAgICAvL2xldCB3aWR0aFB4PXdpZHRoLTM5Mys1MjtcXG4gICAgLy9hbGVydChcXFwi5b2T5YmN5YiG6L6o546HOlxcXCIrd2luZG93LnNjcmVlbi5hdmFpbFdpZHRoK1xcXCIqXFxcIit3aW5kb3cuc2NyZWVuLmhlaWdodCk7XFxuICAgIHZhciB2ZXJpbmZvID0gW3tcXG4gICAgICAgIGlkOidkbicsXFxuICAgICAgICBhdXRob3I6J+aWreW/tScsXFxuICAgICAgICBhdmF0YXI6J2h0dHBzOi8vczMuYXgxeC5jb20vMjAyMS8wMi8yMi95N3diOU8uanBnJyxcXG4gICAgICAgIG9wdGlvbjpvcGVuRG5QYWdlLFxcbiAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGlkOidkeicsXFxuICAgICAgICAgICAgYXV0aG9yOifpgZPplb8nLFxcbiAgICAgICAgICAgIGF2YXRhcjonaHR0cDovL3ExLnFsb2dvLmNuL2c/Yj1xcSZuaz00MzQ4NTcwMDUmcz02NDAnLFxcbiAgICAgICAgICAgIG9wdGlvbjpvcGVuVGhlbWVcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgaWQ6J2xtJyxcXG4gICAgICAgICAgICBhdXRob3I6ICfok53ojpMnLFxcbiAgICAgICAgICAgIGF2YXRhcjogJ2h0dHA6Ly9xMS5xbG9nby5jbi9nP2I9cXEmbms9MjU3OTk0OTM3OCZzPTY0MCcsXFxuICAgICAgICAgICAgb3B0aW9uOm9wZW5KeE1hbmFnZVxcbiAgICAgICAgfVxcbiAgICBdO1xcblxcbiAgICBmdW5jdGlvbiBkb09wdGlvbihvcHRpb25faWQpe1xcbiAgICAgICAgbGV0IHZlciA9IHZlcmluZm8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ogZnVuY3Rpb24oanNvbikge1xcbiAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KGpzb24sIChrZXksIHZhbHVlKSA9PiB7XFxuICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PSAnZnVuY3Rpb24nKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZS50b1N0cmluZygpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCA0KTtcXG4gICAgfSxcXG4gICAgdG9WTnVtOiBmdW5jdGlvbihhKSB7XFxuICAgICAgICB2YXIgYSA9IGEudG9TdHJpbmcoKTtcXG4gICAgICAgIHZhciBjID0gYS5zcGxpdCgnLicpO1xcbiAgICAgICAgdmFyIG51bV9wbGFjZSA9IFtcXFwiXFxcIiwgXFxcIjBcXFwiLCBcXFwiMDBcXFwiLCBcXFwiMDAwXFxcIiwgXFxcIjAwMDBcXFwiXSxcXG4gICAgICAgICAgICByID0gbnVtX3BsYWNlLnJldmVyc2UoKTtcXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYy5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIHZhciBsZW4gPSBjW2ldLmxlbmd0aDtcXG4gICAgICAgICAgICBjW2ldID0gcltsZW5dICsgY1tpXTtcXG4gICAgICAgIH1cXG4gICAgICAgIHZhciByZXMgPSBjLmpvaW4oJycpO1xcbiAgICAgICAgcmV0dXJuIHJlcztcXG4gICAgfSxcXG4gICAgY3ByVmVyc2lvbjogZnVuY3Rpb24oYSwgYikge1xcbiAgICAgICAgdmFyIF9hID0gcGFyc2VJbnQodGhpcy50b1ZOdW0oYSkpLFxcbiAgICAgICAgICAgIF9iID0gcGFyc2VJbnQodGhpcy50b1ZOdW0oYikpO1xcbiAgICAgICAgYiA9IGlzTmFOKF9iKSA/IHZlcnNpb24gOiBiO1xcbiAgICAg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iA9IGNvbmZpZ19hLmxlbmd0aDtcXG4gICAgICAgIGlmICh0b2tlbiA9PSAweDEpIHtcXG4gICAgICAgICAgICB2YXIgY29uZmlnX3VybCA9IGF0b2IoY29uZmlnX3VybCk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHZhciBjb25maWdfdXJsID0gZW5jb2RlVVJJQ29tcG9uZW50KGNvbmZpZ191cmwpO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIGNvbmZpZ19jID0gY29uZmlnX3VybC5sZW5ndGg7XFxuICAgICAgICBmb3IgKGkgPSAweDA7IGkgPCAweDEwMDsgaSsrKSB7XFxuICAgICAgICAgICAgdGVtW2ldID0gY29uZmlnX2FbaSAlIGNvbmZpZ19iXS5jaGFyQ29kZUF0KCk7XFxuICAgICAgICAgICAgY29uZmlnX2FycnlbaV0gPSBpO1xcbiAgICAgICAgfVxcbiAgICAgICAgZm9yIChqID0gaSA9IDB4MDsgaSA8IDB4MTAwOyBpKyspIHtcXG4gICAgICAgICAgICBqID0gKGogKyBjb25maWdfYXJyeVtpXSArIHRlbVtpXSkgJSAweDEwMDtcXG4gICAgICAgICAgICB0bXAgPSBjb25maWdfYXJyeVtpXTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVtpXSA9IGNvbmZpZ19hcnJ5W2pdO1xcbiAgICAgICAgICAgIGNvbmZpZ19hcnJ5W2pdID0gdG1wO1xcbiAgICAgICAgfVxcbiAgICAgICAgZm9yIChhID0gaiA9IGkgPSAweDA7IGkgPCBjb25maWdfYzsgaSsrKSB7XFxuICAgICAgICAgICAgYSA9IChhICsgMHgxKSAlIDB4MTAwO1xcbiAgICAgICAgICAgIGogPSAoaiArIGNvbmZpZ19hcnJ5W2FdKSAlIDB4MTAwO1xcbiAgICAgICAgICAgIHRtcCA9IGNvbmZpZ19hcnJ5W2FdO1xcbiAgICAgICAgICAgIGNvbmZpZ19hcnJ5W2FdID0gY29uZmlnX2Fycnlbal07XFxuICAgICAgIC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FxcIjtcXFwiK25hbWVzW2lkXSk7XFxuICAgICAgICAgICAgLy9sb2cocGxheVVybHMpO1xcbiAgICAgICAgICAgIGNvbnN0IHtMYXp5UGFyc2VGYXN0fSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2dsb2JhbFBhcnNlP3J1bGU96YGT6ZW/5LuT5bqTUHJvJyk7XFxuICAgICAgICAgICAgbGV0IHJldCA9IExhenlQYXJzZUZhc3QocGxheVVybHMsdGltZW91dCx0aW1lb3V0KTtcXG4gICAgICAgICAgICBpZih0eXBlb2YocmV0KT09PSdvYmplY3QnJiZyZXQubGVuZ3RoPjApe1xcbiAgICAgICAgICAgICAgICAvL3JldHVybiByZXRbMF1cXG4gICAgICAgICAgICAgICAgLy9sb2cocmV0KTtcXG4gICAgICAgICAgICAgICAgbGV0IHYgPSBnZXRBcHBWZXJzaW9uKCk7XFxuICAgICAgICAgICAgICAgIGlmKHBhcnNlSW50KHYpPj0yMTk0JiZyZXQubGVuZ3RoPjEpe1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybHMgPSBBcnJheS5mcm9tKG5ldyBTZXQocmV0KSk7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lcz11cmxzLm1hcCgoaXQsaWQpPT5pdC5zcGxpdChcXFwi4piFXFxcIikubGVuZ3RoPjE/aXQuc3BsaXQoXFxcIuKYhVxcXCIpWzFdOlxcXCLnur/ot686XFxcIitwYXJzZUludChpZCsxKSk7XFxuICAgICAgICAgICAgICAgICAgICB1cmxzPXVybHMubWFwKGl0PT5pdC5zcGxpdChcXFwi4piFXFxcIilbMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWRlcnMgPSB1cmxzLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoIS87Ly50ZXN0KGl0KXx8aXQuc3BsaXQoJzsnKS5sZW5ndGg8Mil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7fVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZCA9IGl0LnNwbGl0KCc7JylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEvQC8udGVzdChoZWFkKXx8IS97fH0vLnRlc3QoaGVhZCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHt9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZD1oZWFkLnNwbGl0KFxcXCJ7XFxcIilbMV0uc3BsaXQoXFxcIn1cXFwiKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9oZWFkID0gaGVhZC5yZXBsYWNlKC97fH0vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQgPSBoZWFkLnNwbGl0KCcmJicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgb2JqID0ge307XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSBpbiBoZWFkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrZXkgPSBoZWFkW2ldLnNwbGl0KCdAJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSBoZWFkW2ldLnNwbGl0KCdAJylbMV0ucmVwbGFjZSgvOy8sJ++8m++8mycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqW2tleV0gPSB2YWx1ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2JqXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB1cmxzID0gdXJscy5tYXAoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0dXJsPWl0LnNwbGl0KCc7JylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXQuaW5jbHVkZXMoXFxcIiNpc1ZpZGVvPXRydWUjXFxcIikmJiF0dXJsLmluY2x1ZGVzKFxcXCIjaXNWaWRlbz10cnVlI1xcXCIpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHVybCs9XFxcIiNpc1ZpZGVvPXRydWUjXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHR1cmxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHt1cmxzOnVybHMsaGVhZGVyczpoZWFkZXJzLG5hbWVzOm5hbWVzfSk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldFswXS5zcGxpdChcXFwi4piFXFxcIilbMF1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICByZXR1cm4gcmV0XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgY29uc3Qge2xhenlQYXJzZX0gPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9nbG9iYWxQYXJzZT9ydWxlPemBk+mVv+S7k+W6k1BybycpO1xcbiAgICAgICAgICAgIGxldCB4NVBsYXk9bGF6eVBhcnNlKHBsYXlVcmwsdGltZW91dCk7XFxuICAgICAgICAgICAgaWYodHlwZW9mKHg1UGxheSk9PVxcXCJ1bmRlZmluZWRcXFwifHwheDVQbGF5KXtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+mBk+mVv+S7k+W6k+ino+aekOWksei0pVxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IHRpcHM9L3g1UnVsZXx3ZWJSdWxlLy50ZXN0KHg1UGxheSk/XFxcIng1L3dlYuWFjeWXheW8gOWni1xcXCI6XFxcIuaegemAn+WFjeWXheaOouWujOavle+8jOWcsOWdgDpcXFwiKygvXmh0dHAvLnRlc3QoeDVQbGF5KT94NVBsYXk6J+mdnuato+W4uOmTvuaOpScpO1xcbiAgICAgICAgICAgIGxvZyh0aXBzKTtcXG4gICAgICAgICAgICByZXR1cm4geDVQbGF5O1xcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBcXFwibWFvc3NcXFwiOlxcbiAgICAgICAgZnVuY3Rpb24gKGp4dXJsLCByZWYsIGtleSkge1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzLueMqyhqeHVybCwgcmVmLCBrZXkpXFxuICAgICAgICB9LFxcbiAgICDlhY3ll4U6ZnVuY3Rpb24odmlwVXJsLGspe1xcbiAgICAgICAgaz1rfHxcXFwidXJsXFxcIjtcXG4gICAgICAgIHRyeXtcXG4gICAgICAgICAgICBsZXQgcmVhbFVybD1KU09OLnBhcnNlKGZldGNoKHZpcFVybCkpW2tdO1xcbiAgICAgICAgICAgIGlmKHJlYWxVcmwuc3RhcnRzV2l0aCgnLycpKXtcXG4gICAgICAgICAgICAgICAgcmVhbFVybCA9ICdodHRwczovLycrcmVhbFVybDtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuaXNWaWRlbyhyZWFsVXJsKXx8XFxcIlxcXCI7XFxuICAgICAgICB9Y2F0Y2goZSl7XFxuICAgICAgICAgICAgLy9sb2coZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICByZXR1cm4gXFxcIlxcXCJcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgJ+eMqyc6ZnVuY3Rpb24gKGp4dXJsLCByZWYsIGtleSkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB2YXIg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AgICAgICAgICByZXR1cm4gXFxcIlxcXCI7XFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIExMUTogZnVuY3Rpb24oanh1cmwpIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgdmFyIGFwaSA9IGp4dXJsLnNwbGl0KCc/dXJsPScpWzBdICsgXFxcImFwaS5waHBcXFwiO1xcbiAgICAgICAgICAgIHZhciBiNjRpZCA9IGJhc2U2NEVuY29kZShqeHVybC5zcGxpdCgndXJsPScpWzFdKTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VpZCA9IHRvb2xzLmNhZXNhckNpcGhlcihiNjRpZCwgLTEpO1xcbiAgICAgICAgICAgIHZhciBqc29uID0gSlNPTi5wYXJzZShyZXF1ZXN0KGFwaSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6IGp4dXJsXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxcbiAgICAgICAgICAgICAgICBib2R5OiAndXJsPScgKyBwYXJzZWlkXFxuICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgIHVybCA9IChqc29uLmNvZGUgPT0gMjAwID8gYmFzZTY0RGVjb2RlKHRvb2xzLmNhZXNhckNpcGhlcihqc29uLnVybCwgLTEpKSA6ICcnKTtcXG4gICAgICAgICAgICByZXR1cm4gdXJsO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiAnJztcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgUGFuR3U6IGZ1bmN0aW9uKHZpcFVybCwgZGF0YSkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAvKnZhciByZWYgPSAnaHR0cHM6Ly93d3cucGFuZ3VqaWV4aS5jb20vJztcXG4gICAgICAgICAgICB2YXIgcGFyc2UgPSAnaHR0cHM6Ly9wYW5ndWFwaS5udHJ5amQubmV0L2ppZXhpLz91cmw9JyArIHZpcFVybDtcXG4gICAgICAgICAgICB2YXIgYXBpID0gJ2h0dHBzOi8vcGFuZ3VhcGkubnRyeWpkLm5ldC9qaWV4aS9hcGkucGhwJztcXG4gICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIC8vdmFyIHJlZiA9ICdodHRwczovL3hteXN0di5jb20vJztcXG4gICAgICAgICAgICAvL3ZhciBwYXJzZSA9ICdodHRwczovL3d3dy45OWtwdy5jb20vcGFuZ3UvaW5kZXgucGhwP3VybD0nICsgdGFpbFVybDtcXG4gICAgICAgICAgICAvL3ZhciBhcGkgPSAnaHR0cHM6Ly93d3cuOTlrcHcuY29tL3Bhbmd1L2FwaS5waHAnO1xcbiAgICAgICAgICAgIHZhciBwYXJzZSA9ICdodHRwczovL3d3dy5wYW5ndWppZXhpLmNvbS9wYW5ndS8/dXJsPScgKyB2aXBVcmw7XFxuICAgICAgICAgICAgdmFyIGFwaSA9ICdodHRwczovL3Bhbmd1YXBpLm50cnlqZC5uZXQvcGFuZ3UyMDIxL2FwaS5waHAnO1xcbiAgICAgICAgICAgIGlmIChkYXRhKSB7XFxuICAgICAgICAgICAgICAgIHJlZiA9IGRhdGFbMF07XFxuICAgICAgICAgICAgICAgIHBhcnNlID0gZGF0YVsxXTtcXG4gICAgICAgICAgICAgICAgYXBpID0gZGF0YVsyXTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIFRpbWUgPSAoTWF0aC5mbG9vcihuZXcgRGF0ZSgpLmdldFRpbWUoKSAvIDEwMDApICogMSkudG9TdHJpbmcoKTtcXG4gICAgICAgICAgICB2YXIgdXJsID0gSlNPTi5wYXJzZShyZXF1ZXN0KGFwaSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6IHBhcnNlXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGJvZHk6ICd1cmw9JyArIHZpcFVybCArICcmcmVmZXJlcj0nICsgYmFzZTY0RW5jb2RlKHBhcnNlKSArICcmcmVmPTEmdGltZT0nICsgVGltZSArICcmdHlwZT0mb3RoZXI9JyArIGJhc2U2NEVuY29kZSh2aXBVcmwpICsgJyZpb3M9MCcsXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgICAgICAgICAgfSkpLnVybDtcXG4gICAgICAgICAgICByZXR1cm4gdXJsO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiAnJztcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgeXVuMTcxNzogZnVuY3Rpb24gKHZpcFVybCkge1xcbiAgICAgICAgdmFyIGlzeWsgPSB2aXBVcmwuaW5kZXhPZigneW91a3UnKTtcXG4gICAgICAgIHZhciByZWYgPSBcXFwiaHR0cHM6Ly93d3cuMTcxN3l1bi5jb20vangvdHkucGhwP3VybD1cXFwiICsgdmlwVXJsO1xcbiAgICAgICAgdmFyIHBhcnNlID0gXFxcImh0dHBzOi8vMTcxN3l1bi5jb20uemgxODgubmV0LzA4MjgvP3VybD1cXFwiICsgdmlwVXJsO1xcbiAgICAgICAgdmFyIGFwaSA9IFxcXCJodHRwczovLzE3MTd5dW4uY29tLnpoMTg4Lm5ldC8xMDA0Ly4uaW5kZXguLnBocFxcXCI7XFxuICAgICAgICByZXR1cm4gaXN5ayA9PSAtMSA/IHRoaXMuUGFuR3UodmlwVXJsLCBbcmVmLCBwYXJzZSwgYXBpXSkgOiB0aGlzLlBhbkd1KHZpcFVybCwgW3JlZiArICcsdmlwOicsIHBhcnNlICsgJyx2aXA6JywgYXBpXSk7XFxuICAgIH0sXFxuICAgIE9L6Kej5p6QOidodHRwczovL29ranguY2MvP3VybD0nLFxcbiAgICBNM1U4VFY6J2h0dHBzOi8vangubTN1OC50di9qaWV4aS8/dXJsPScsXFxuICAgIOmBk+mVv+S7k+W6k+mAmuWFjTp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AgICAgIH1jYXRjaChlKXtcXG4gICAgICAgICAgICAgICAgaWYoIS9eaHR0cC8udGVzdChwbGF5VXJsKSl7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcIuaWreaPkuiwg+eUqOWksei0pe+8gVxcXFxu6Z2e5q2j5bi455qEdmlw5q2j54mI5Zyw5Z2A5LiU5pyq6K+G5Yir5Y6f56uZ6Kej5p6Q5pKt5pS+5Zyw5Z2AXFxcIjtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUGFyc2VTLumBk+mVv+S7k+W6k+mAmuWFjShwbGF5VXJsLHRpbWVvdXQpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgLy9ob3N0ID0gZGVjb2RlVVJJQ29tcG9uZW50KGhvc3QpO1xcbiAgICAgICAgICAgIHN3aXRjaCAobXlTZXQucWp1KSB7XFxuICAgICAgICAgICAgICAgIGNhc2UgXFxcIum7mOiupFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGhvc3QpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJxcS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC50eDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3R4Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImlxaXlpLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnF5O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgncXknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwieW91a3UuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQueWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCd5aycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJhbGl6eVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmFsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnYWwnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwibWd0di5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5tZztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ21nJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImJpbGliaWxpLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnYmwnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwic29odS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5zaDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3NoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInR2LnNvaHUuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuc2g7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdzaCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJpeGlndWEuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQueGc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCd4ZycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwcHR2LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnBwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgncHAnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwibWlndXZpZGVvLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0Lm1pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnbWknKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwibGUuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQubGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdsZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCIxOTA1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0Lm9uZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ29uZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJmdW4udHZcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5mdW47XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdmdW4nKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQub3RoO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQucWp1O1xcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9ZWxzZXtcXG4gICAgICAgIGxvZygn6a2U5pat5omn6KGM5a6a5ZCR6Kej5p6Q57q/6Lev5aS0Oicrc3RyVGl0bGUpO1xcbiAgICAgICAgc3RyID0gc3RyVGl0bGU7XFxuICAgIH1cXG4gICAgbGV0IHdpdGhCYXRjaCA9ICEhKE15SmlleGkuaXNBdXRvICYmIE15SmlleGkuYXV0b01vZGUgPT09ICfpgJ/luqbkvJjlhYgnKTtcXG4gICAgaW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ICAgICAgIHJldHVybiAkKGp1cmwpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGpzVXJsID0gSlNPTi5wYXJzZShmZXRjaChnZXRWYXIoJ29sZENvbmZpZycpKSkuY2o7XFxuICAgICAgICAgICAgdmFyIExhYmVsID0gaztcXG4gICAgICAgICAgICB2YXIgZmEgPSBbJ2xldHYnLCAncHB0dicsICdxcScsICd5b3VrdScsICdxaXlpJywgJ2lxaXlpJywgJ21ndHYnLCAnYmlsaWJpbGknLCAnc29odScsICdtaWd1JywgJ20xOTA1JywgJ3ZpcCddO1xcbiAgICAgICAgICAgIHZhciBodG1sID0gcGFyc2VEb20ocmVxdWVzdChpbnB1dCksIExhYmVsKTtcXG4gICAgICAgICAgICBldmFsKGh0bWwucmVwbGFjZSgvcGxheWVyXy4qPz17LywgJ3BkYXRhPXsnKSk7XFxuICAgICAgICAgICAgZXZhbChmZXRjaChqc1VybCkpO1xcbiAgICAgICAgICAgIGlmIChwZGF0YS51cmwuc3Vic3RyKDAsIDgpLm1hdGNoKC9KVC4uSlQuLi8pKSB7XFxuICAgICAgICAgICAgICAgIHBkYXRhLnVybCA9IGJhc2U2NERlY29kZShwZGF0YS51cmwpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAocGRhdGEudXJsLnN1YnN0cigwLCA4KS5tYXRjaCgvJS4uJS4uLykpIHtcXG4gICAgICAgICAgICAgICAgcGRhdGEudXJsID0gdW5lc2NhcGUocGRhdGEudXJsKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKGZhLmluY2x1ZGVzKHBkYXRhLmZyb20pKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UocGRhdGEudXJsKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gcGRhdGEudXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB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BkYXRhO1xcbiAgICAgICAgYXJyTGlzdC5zcGxpY2UoMCwgMSk7XFxuICAgIH0gZWxzZSB7XFxuICAgICAgICBhcnJMaXN0ID0gbnVsbDtcXG4gICAgfVxcbiAgICBpZiAoYXJyTGlzdCAhPSBudWxsKSB7XFxuICAgICAgICB2YXIgcGFyc2VSb3V0ZSA9IGdldFZhcigncGFyc2VSb3V0ZScpO1xcbiAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICBBcnJheS5wcm90b3R5cGUucmVtb3ZlID0gZnVuY3Rpb24odmFsKSB7XFxuICAgICAgICAgICAgbGV0IGluZGV4ID0gdGhpcy5pbmRleE9mKHZhbCk7XFxuICAgICAgICAgICAgaWYgKGluZGV4ID4gLTEpIHtcXG4gICAgICAgICAgICAgICAgdGhpcy5zcGxpY2UoaW5kZXgsIDEpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH07XFxuICAgICAgICBpZihuYW1lKXsvL+WIoOmZpOWQjeensOWIl+ihqOWSjOS7o+eggVxcbiAgICAgICAgICAgIGpzb24udGl0bGUucmVtb3ZlKG5hbWUpO1xcbiAgICAgICAgICAgIGRlbGV0ZSBqc29uLmNvZGVzW25hbWVdO1xcbiAgICAgICAgfVxcbiAgICAgICAgYXJyTGlzdCA9IGFyckxpc3QuY29uY2F0KGpzb24udGl0bGUpO1xcbiAgICAgICAganNvbi50aXRsZSA9IEFycmF5LmZyb20obmV3IFNldChhcnJMaXN0KSk7XFxuICAgICAgICBPYmplY3QuYXNzaWduKGpzb24uY29kZXMsIG9iakNvZGUpO1xcbiAgICAgICAgaWYgKHR5cGUgPT09ICfmtYvor5UnKSB7XFxuICAgICAgICAgICAgZXZhbCgndmFyIGNvbmZpZyA9JyArIGZldGNoKGdldFZhcignb2xkQ29uZmlnJykpKTtcXG4gICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xcbiAgICAgICAgICAgIGlmICh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PT4ge1xcbiAgICAgICAgICAgIHZhciBwdWxsTW9kZSA9IGtbMF07XFxuICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBrWzFdO1xcbiAgICAgICAgICAgIHZhciBwYXJzZUZpbGUgPSBmZXRjaChwYXJzZVJvdXRlKTtcXG4gICAgICAgICAgICBpZiAoIXBhcnNlRmlsZSkge1xcbiAgICAgICAgICAgICAgICB2YXIgc2V0dGluZ3MgPSBmZXRjaChnZXRWYXIoJ29sZENvbmZpZycpKTtcXG4gICAgICAgICAgICAgICAgc2V0dGluZ3MgPSAhc2V0dGluZ3MgPyB7fSA6IEpTT04ucGFyc2Uoc2V0dGluZ3MpO1xcbiAgICAgICAgICAgICAgICB2YXIganNvbiA9IHt9O1xcbiAgICAgICAgICAgICAgICBqc29uLnNldHRpbmdzID0gc2V0dGluZ3M7XFxuICAgICAgICAgICAgICAgIGpzb24udGl0bGUgPSBbXTtcXG4gICAgICAgICAgICAgICAganNvbi5jb2RlcyA9IHt9O1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgcGFyc2VGaWxlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIHBhcnNlVGl0bGUgPSBbXTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VDb2RlPXt9O1xcbiAgICAgICAgICAgIHZhciBjakxpbmsgPSBnZXRWYXIoJ3BsdWdpbkxpbmsnKTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBpZigvQGJhc2U2NDpcXFxcL1xcXFwvLy50ZXN0KGNqTGluaykpe1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChiYXNlNjREZWNvZGUoY2pMaW5rLnNwbGl0KCdAYmFzZTY0Oi8vJylbMV0pKTtcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYoL+aPkuS7tuWQjS8udGVzdChjakxpbmspKXtcXG4gICAgICAgICAgICAgICAgICAgIGxldCByZWFsTGluayA9IGNqTGluay5zcGxpdCgn5o+S5Lu25ZCNJylbMF0ucmVwbGFjZSgvW1xcXFxzXS9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgIGxvZygn6Kej5p6Q5LqR5Ymq5YiH5p2/OicrcmVhbExpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHlQYXN0ZSA9IHBhcnNlUGFzdGUocmVhbExpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgaWYoL0BiYXNlNjQ6XFxcXC9cXFxcLy8udGVzdCh5UGFzdGUpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKGJhc2U2NERlY29kZSh5UGFzdGUuc3BsaXQoJ0BiYXNlNjQ6Ly8nKVsxXSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YgUGFyc2VTPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aLieWPluS4qum4oeavm+aPkuS7tizph4zpnaLov55QYXJzZVPlr7nosaHpg73msqHmnIkhJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/puKHmr5vmj5Lku7bmiafooYzmiqXplJk6XFxcXG4nK2UubWVzc2FnZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pyq6IO96K+G5Yir5LqR5Ymq5YiH5p2/5Lit55qE5YaF5a65OlxcXFxuJyt5UGFzdGUuc3Vic3RyaW5nKDAsMTAwKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjakxpbmsgPT09ICdR56WeJykge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGppZXhpID0gZmV0Y2goJ2hpa2VyOi8vZmlsZXMvamlleGkvamlleGkudHh0Jykuc3BsaXQoJ1xcXFxuJyk7XFxuICAgICAgICAgICAgICAgICAgICBmb3IgKGkgaW4gamlleGkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGU9amlleGlbaV0uc3BsaXQoJyYmJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGU9amlleGlbaV0uc3BsaXQoJyYmJylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy8gfWVsc2UgaWYoL14jW2EtekEtWjAtOV17MiwxMH0kLy50ZXN0KGNqTGluaykpey8v56aP5Yip5Y+j5LukMuWIsDEw5L2NXFxuICAgICAgICAgICAgICAgIGVsc2UgaWYoL14jW1xcXFxTXXsyLDEwfSQvLnRlc3QoY2pMaW5rKSl7Ly/npo/liKnlj6Pku6Qy5YiwMTDkvY3ku7vmhI/pnZ7nqbrlrZfnrKbkuLJcXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHt0YXNrQ2FsbCwgdGFza1J1bix0YXNrUmVxfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3Rhc2tDYWxsP3J1bGU96YGT6ZW/5LuT5bqTUHJvXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAvLyBsb2coJ+W8gOWni+aJp+ihjOS7u+WKoeS7k+W6k+iOt+WPluaWreW/teaPkuS7tuemj+WIqeWPo+S7pCcpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3VsdCA9IHRhc2tDYWxsKDE3LCdEbkZ1bGknLFtjakxpbmtdKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuc3RhdHVzID09PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJldCA9IEpTT04ucGFyc2UocmVzdWx0LnJlc3VsdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKHJldCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYocmV0Lm9wdD09PSdlcnJvcicpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vJytyZXQubXNnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHJldC5vcHQ9PT0ndXJsJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gZmV0Y2gocmV0LnJldCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhcnIgPSBodG1sLmluY2x1ZGVzKCdodHRwJyk/IGh0bWw6YmFzZTY0RGVjb2RlKGh0bWwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgamlleGkgPSBhcnIubWF0Y2goL1tcXFxcU10qPywuKj9bXFxcXHNdL2cpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIGppZXhpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGU9amlleGlbaV0uc3BsaXQoJywnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlPWppZXhpW2ldLnNwbGl0KCcsJylbMV0uc3BsaXQoXFxcIlxcXFxuXFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlLnB1c2godGl0bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlW3RpdGxlXT1jb2RlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYocmV0Lm9wdD09PSdqeCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZigvW1xcXFxTXSo/LGh0dHBbXFxcXFNdLy50ZXN0KHJldC5yZXQpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHJldC5yZXQuc3BsaXQoJywnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gcmV0LnJldC5zcGxpdCgnLCcpWzFdLnNwbGl0KCdcXFxcbicpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoL15odHRwLy50ZXN0KHJldC5yZXQpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGNqTGluay5zcGxpdCgnIycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSByZXQucmV0LnNwbGl0KCdcXFxcbicpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pyq55+l55qE56aP5YipOlxcXFxuJytyZXQucmV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYocmV0Lm9wdD09PSd2aXBKeCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBjakxpbmsuc3BsaXQoJyMnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSByZXQucmV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09L2Z1bmN0aW9uLy50ZXN0KGNvZGUpP2V2YWwoY29kZSk6Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5LuT5bqT6Z2e5pyA5paw54mI5oiW6ICF56aP5Yip56S+5Yqf6IO95byA5Y+R5LitJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZihjakxpbms9PT0n5pat5o+SJyl7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKGZldGNoKFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL1BhcnNlX0RuLmpzXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZT1PYmplY3Qua2V5cyhQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZigvXmhpa2VyOlxcXFwvXFxcXC98XmZpbGU6XFxcXC9cXFxcL3xeaHR0cHxeXFxcXC9zdG9yYWdlXFxcXC98XlxcXFwvc2RjYXJkXFxcXC8vLnRlc3QoY2pMaW5rKSl7XFxuICAgICAgICAgICAgICAgICAgICBpZigvXlxcXFwvc3RvcmFnZVxcXFwvfF5cXFxcL3NkY2FyZFxcXFwvLy50ZXN0KGNqTGluaykpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNqTGluayA9ICdmaWxlOi8vJytjakxpbms7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNqTGluaykpO1xcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZT1PYmplY3Qua2V5cyhQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mi4nlj5blj6Pku6TmnInor68nXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIGxvZyhlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2YXIganhKdWRnZSA9IHR5cGVvZiBQYXJzZVMgPT0gJ29iamVjdCc7XFxuICAgICAgICAgICAgdmFyIGxiSnVkZ2UgPSB0eXBlb2YocGFyc2VUaXRsZSkgPT0gJ29iamVjdCc7XFxuICAgICAgICAgICAgaWYgKGp4SnVkZ2UgfHwgbGJKdWRnZSkge1xcbiAgICAgICAgICAgICAgICAvLyBpZiAocHVsbE1vZGUgPT09ICfliJfooagnKSB7XFxuICAgICAgICAgICAgICAgIC8vICAgICBpZiAoIWxiSnVkZ2UpIHtcXG4gICAgICAgICAgICAgICAgLy8gICAgICAgICBwYXJzZVRpdGxlID0gT2JqZWN0LmtleXMoUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgLy8gICAgIH1cXG4gICAgICAgICAgICAgICAgLy8gICAgIHZhciBuZXdQYXJzZVRpdGxlID0ganNvbi50aXRsZS5jb25jYXQocGFyc2VUaXRsZSk7XFxuICAgICAgICAgICAgICAgIC8vICAgICBqc29uLnRpdGxlID0gQXJyYXkuZnJvbShuZXcgU2V0KG5ld1BhcnNlVGl0bGUpKTtcXG4gICAgICAgICAgICAgICAgLy8gfVxcbiAgICAgICAgICAgICAgICAvLyDkuI3nrqHmi4nlj5bku6PnoIHov5jmmK/liJfooajpg73opoHmiorliJfooajmi4nkuoZcXG4gICAgICAgICAgICAgICAgaWYgKCFsYkp1ZGdlKSB7XFxuICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlID0gT2JqZWN0LmtleXMoUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyhwYXJzZVRpdGxlKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB2YXIgc2NPYmplY3QgPSBbXFxcIkNpdHlJUFxcXCIsIFxcXCJwY1VBXFxcIiwgXFxcImNhY2hlTTN1OFxcXCIsXFxcImlzVmlkZW9cXFwiLCBcXFwiZGVmYXVsdFBhcnNlXFxcIixcXFwiZGVmYXVsdFBhcnNlV2ViXFxcIixcXFwibWFvc3NcXFwiLCBcXFwiTExRXFxcIixcXFwicGFyc2VMY1xcXCJdO1xcbiAgICAgICAgICAgICAgICBwYXJzZVRpdGxlID0gcGFyc2VUaXRsZT9wYXJzZVRpdGxlLmZpbHRlcihpdD0+IXNjT2JqZWN0LmluY2x1ZGVzKGl0KSk6W107XFxuICAgICAgICAgICAgICAgIHZhciBuZXdQYXJzZVRpdGxlID0ganNvbi50aXRsZS5jb25jYXQocGFyc2VUaXRsZSk7XFxuICAgICAgICAgICAgICAgIGpzb24udGl0bGUgPSBBcnJheS5mcm9tKG5ldyBTZXQobmV3UGFyc2VUaXRsZSkpO1xcblxcbiAgICAgICAgICAgICAgICBpZiAocHVsbE1vZGUgPT09ICfku6PnoIEnKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9yaWdpbmFsUGFyc2VTID09ICdvYmplY3QnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSBpbiBzY09iamVjdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgb3JpZ2luYWxQYXJzZVNbc2NPYmplY3RbaV1dO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBvcmlnaW5hbFBhcnNlUyA9b3JpZ2luYWxQYXJzZVMuZmlsdGVyKGl0PT4hc2NPYmplY3QuaW5jbHVkZXMoT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMoaXQpWzBdKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBvcmlnaW5hbFBhcnNlUyk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZihQYXJzZVMpPT1cXFwidW5kZWZpbmVkXFxcIil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2RlcywgcGFyc2VDb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9yZXR1cm4gXFxcInRvYXN0Oi8v5rKh5pyJ5Luj56CB77yM5LiN5Y+v5ouJ5Y+WXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKGpzb24uY29kZXMsIFBhcnNlUyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vdmFyIG5ld0ZpbGUgPSB0b29scy50b0pTT04oanNvbik7Ly/oh6rlrprkuYlzdHJpbmdpZnnlh73mlbDvvIzluKbmnInovazkuYnlrZfnrKZcXG4gICAgICAgICAgICAgICAgdmFyIG5ld0ZpbGUgPSAkLnN0cmluZ2lmeShqc29uKTsgLy9KU09OLnBhcnNl5Lya5oql6ZSZXFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCBuZXdGaWxlKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ouJ5Y+WJyArIHB1bGxNb2RlICsgJ+aIkOWKnyc7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+acquiOt+WPluWIsOWvueixoSc7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgW2ssIF9teVNldC5wYXJzZVJvdXRlXSlcXG4gICAgfSxcXG4gICAgcHVsbFNjcmlwdDogZnVuY3Rpb24oY2osIHg1KSB7XFxuICAgICAgICByZXR1cm4gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaykgPT4ge1xcbiAgICAgICAgICAgIHZhciBjakZyb20gPSAnaGlrZXI6Ly9wYWdlL1BhcnNlX0RuLmpzP3J1bGU9TXlGaWVsZOG0sOKBvyc7XFxuICAgICAgICAgICAgdmFyIHg1RnJvbSA9ICdoaWtlcjovL3BhZ2UvUGFyc2VfRG4uaHRtbD9ydWxlPU15RmllbGThtLDigb8nO1xcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIHZhciBjakZpbGUgPSBKU09OLnBhcnNlKGZldGNoKGNqRnJvbSkpLnJ1bGU7XFxuICAgICAgICAgICAgICAgIHZhciB4NUZpbGUgPSBKU09OLnBhcnNlKGZldGNoKHg1RnJvbSkpLnJ1bGU7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShrWzBdLCBjakZpbGUpO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoa1sxXSwgeDVGaWxlKTtcXG4gICAgICAgICAgICAgICAgY2xlYXJWYXIoJ2p4T2xkVicpO1xcbiAgICAgICAgICAgICAgICBjbGVhclZhcignanhO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qCcsICfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzA5OEFDMVxcXCIgdGl0bGU9XFxcIue9ruW6lXx8JyArIGJpYW5qaSArIGxiTGVuZ3RoICsgJ1xcXCI+572uIOW6lScsICfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzA0QjQzMVxcXCIgdGl0bGU9XFxcIuWIhuS6q3x8JyArIGJpYW5qaSArICdcXFwiPuWcsOadv+WIhuS6qycsICfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzA0QjQzMVxcXCIgdGl0bGU9XFxcIuS6keWIhuS6q3x8JyArIGJpYW5qaSArICdcXFwiPuS6keadv+WIhuS6qyddLFxcbiAgICAgICAgICAgIGNvbDogJzInLFxcbiAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBnZXRWYXIoJ3BhcnNlUm91dGUnKTtcXG4gICAgICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICAgICAgICAgIHZhciBuZXdJbnB1dCA9IHBhcnNlRG9tRm9ySHRtbChpbnB1dCwgJ3NwYW4mJnRpdGxlJykuc3BsaXQoJ3x8Jyk7XFxuICAgICAgICAgICAgICAgIC8vIOS/ruaUuSzov6rov6osMCAgIOaTjeS9nOexu+WeiyzlkI3np7As57Si5byVXFxuICAgICAgICAgICAgICAgIHZhciB0eXBlID0gbmV3SW5wdXRbMF07XFxuICAgICAgICAgICAgICAgIHZhciBuYW1lID0gbmV3SW5wdXRbMV07XFxuICAgICAgICAgICAgICAgIHZhciBudW0gPSBuZXdJbnB1dFsyXTtcXG4gICAgICAgICAgICAgICAgdmFyIG51bTIgPSBuZXdJbnB1dFszXTtcXG4gICAgICAgICAgICAgICAgc3dpdGNoICh0eXBlKSB7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLliKDpmaRcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrID0gW25hbWUsIG51bV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8g5oC75oSf6KeJ562b6YCJ5oiW6ICF5pCc57Si5ZCO77yM55Sx5LqObnVt55qE5L2N572u5LiN5a+55Y+v6IO95Lya5Yig6Zmk6ZSZLOS6i+WunuWmguatpCzlt7Lkv64/XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcIuWNs+WwhuWIoOmZpDogXFxcIiArIG5hbWUpLmNvbmZpcm0oKGspID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBrWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbnVtID0ga1sxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBnZXRWYXIoJ3BhcnNlUm91dGUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqc29uLmNvZGVzLmhhc093blByb3BlcnR5KG5hbWUpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUganNvbi5jb2Rlc1tuYW1lXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW0gPSBqc29uLnRpdGxlLmluZGV4T2YobmFtZSk7IC8v6L+Z5qC35omN5Lya5b6X5Yiw5q2j56Gu55qE57Si5byVXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24udGl0bGUuc3BsaWNlKG51bSwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+W3suWwhuOAllxcXCIgKyBuYW1lICsgXFxcIuOAl+WIoOmZpFxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgayk7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLpmpDol49cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKFxcXCJoaWtlcjovL2VtcHR5I25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoaykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IGtbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBudW0gPSBrWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGFyc2VSb3V0ZSA9IGdldFZhcigncGFyc2VSb3V0ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpzb24uY29kZXMuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bSA9IGpzb24udGl0bGUuaW5kZXhPZihuYW1lKTsgLy/ov5nmoLfmiY3kvJrlvpfliLDmraPnoa7nmoTntKLlvJVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24udGl0bGUuc3BsaWNlKG51bSwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+W3suWwhuOAllxcXCIgKyBuYW1lICsgXFxcIuOAl+makOiXj1xcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5Y+v6IO95piv5Liq572R5Z2ALCDmgqjlj6/pgInmi6nliKDpmaRcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW25hbWUsIG51bV0pO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi5L+u5pS5XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2lmIChqc29uLmNvZGVzW25hbWVdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5Db2RlID0gbmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGVzID0ganNvbi50aXRsZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbk5hbWUgPSBcXFwi6L+Z5piv5ZCN56ewXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoanNvbi5jb2Rlc1tuYW1lXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuQ29kZSA9IGpzb24uY29kZXNbbmFtZV0udG9TdHJpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbk5hbWUgPSBuYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChcXFwiaGlrZXI6Ly9lbXB0eSNub1JlY29yZEhpc3RvcnkjXFxcIikucnVsZSgoayx0aXRsZXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGQgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChnZXRJdGVtKCdteUZ1bmN0aW9uJykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IGtbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjb2RlID0ga1sxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5L+dIOWtmCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHNhdmVCdXR0b24gKyBcXFwic2F2ZUJ1dHRvbihnZXRWYXIoJ2lucHV0X2VkaXQnKSxuYW1lKTtiYWNrKCk7XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuW7uuiuruaMiem7mOiupOeahOS7o+eggeagvOW8j+S/ruaUueWTplxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0VmFyKCdpbnB1dF9lZGl0JywgaW5wdXQpXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogXFxcIi0xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogJ+S/ruaUueKYhScgKyBuYW1lICsgJ+KYhScgKyBjb2RlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPHNtYWxsPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjojNkVCODk3XFxcIj7moLzlvI/kuLrvvJrmk43kvZznsbvlnovimIXmoIfpopjimIVmdW5jdGlvbigpe+iHquWumuS5ieWGheWuuX08YnI+6K+35Yu/5aGr5YWl5YW25LuW5qC85byPJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2F2ZUJ1dHRvbixuYW1lLHRpdGxlcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0bXBBciA9IGdldFZhcignaW5wdXRfZWRpdCcpLnNwbGl0KCfimIUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0bXBBci5sZW5ndGg8Mil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv67mlLnmoLzlvI/mnInor6/vvIzorr/pl67ooqvmi5Lnu50nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdOYW1lID0gdG1wQXJbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobmV3TmFtZSE9PW5hbWUmJnRpdGxlcy5pbmNsdWRlcyhuZXdOYW1lKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfmo4DmtYvliLDlkIzlkI3mjqXlj6M6JytuZXdOYW1lKycs5piv5ZCm6KaG55uWPycpLmNvbmZpcm0oKHNhdmVCdXR0b24sbmFtZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gc2F2ZUJ1dHRvbihnZXRWYXIoJ2lucHV0X2VkaXQnKSxuYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2soKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lkv53lrZjkv67mlLlcXFxcbuivt+iHquihjOajgOa1i+imhuebluWQjueahOWGheWuuSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sc2F2ZUJ1dHRvbixuYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSBzYXZlQnV0dG9uKGdldFZhcignaW5wdXRfZWRpdCcpLG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lkv53lrZjkv67mlLknO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpZih0eXBlb2YoY29kZSk9PT0nc3RyaW5nJyYmY29kZS5sZW5ndGg+Mil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIHJldHVybiBjb2RlXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lkv53lrZjkv67mlLknO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHNhdmVCdXR0b24sbmFtZSx0aXRsZXMpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+KAmOKAmOKAmeKAmTxiaWc+PGJpZz48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzI5OEEwOFxcXCI+5L+dIOWtmCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgW25OYW1lLCBuQ29kZV0sdGl0bGVzKSAvL1tuYW1lLCBqc29uLmNvZGVzW25hbWVdLnRvU3RyaW5nKCldKVxcbiAgICAgICAgICAgICAgICAgICAgLyp9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lj6rmnInnvZHlnYDmiJbogIXmoIfpopgsIOS4jeaUr+aMgeS/ruaUuVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0qL1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi572u6aG2XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIue9ruW6lVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbnVtID0ganNvbi50aXRsZS5pbmRleE9mKG5hbWUpOyAvL+i/meagt+aJjeS8muW+l+WIsOato+ehrueahOe0ouW8lVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKG51bT4tMSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpdGVtID0ganNvbi50aXRsZS5zcGxpY2UobnVtLCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbi50aXRsZS5zcGxpY2UobnVtMiwgMCwgaXRlbVswXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ayoeaJvuWIsDonK25hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi56e75YqoXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgnaGlrZXI6Ly9lbXB0eSNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdiaWFuamknLCAn56e75YqoIycgKyBrKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaW5wdXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgbnVtKTtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuWIhuS6q1xcXCI6XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLkupHliIbkuqtcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqc29uLmNvZGVzW25hbWVdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZVRleHQgPSB0eXBlb2YganNvbi5jb2Rlc1tuYW1lXSA9PSAnZnVuY3Rpb24nID8gJC5zdHJpbmdpZnkoanNvbi5jb2Rlc1tuYW1lXSkgOiBqc29uLmNvZGVzW25hbWVdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRleHQgPSAnTXlQYXJzZVPimIUnICsgbmFtZSArICfimIUnICsgYmFzZTY0RW5jb2RlKHBhcnNlVGV4dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcnNlVGV4dCA9ICfnm7Tpk77imIUnICsganNvbi50aXRsZVtudW1dO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZSA9PSAn5LqR5YiG5LqrJyAmJiBwYXJzZVRleHQuc3Vic3RyKDAsIDgpID09ICdNeVBhcnNlUycpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUZXh0ID0gc2hhcmVQYXN0ZShwYXJzZVRleHQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VUZXh0LnN1YnN0cigwLCA2KSAhPSAnZXJyb3I6JyA/ICdjb3B5Oi8vJyArIHBhcnNlVGV4dCArICdcXFxcbuKYheKYheKYhVxcXFxuJyArICdNeVBhcnNlU++8micgKyBuYW1lIDogJ3RvYXN0Oi8v5YiG5Lqr5aSx6LSlISHkupHliarotLTmnb/lj6/og73mjILkuoYnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnY29weTovLycgKyBwYXJzZVRleHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pqC5LiN5pSv5oyBJztcXG4gICAgICAgICAgICAgICAgfSAvL3N3aXRjaOeahFxcbiAgICAgICAgICAgIH0pIC8vU3RyaW5n55qEXFxuICAgICAgICB9KSAvL3N0cmluZ2lmeeeahFxcbiAgICB9LFxcbiAgICB4alBhcnNlOiBmdW5jdGlvbigpIHtcXG4gICAgICAgIHJldHVybiAkKFxcXCJoaWtlcjovL2VtcHR5I25vSGlzdG9yeSNcXFwiKS5ydWxlKCgpID0+IHtcXG4gICAgICAgICAgICB2YXIgZCA9IFtdO1xcbiAgICAgICAgICAgIGV2YWwoZ2V0SXRlbSgnbXlGdW5jdGlvbicpKTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+S/nSDlrZgnLFxcbiAgICAgICAgICAgICAgICB1cmw6IHNhdmVCdXR0b24gKyBcXFwic2F2ZUJ1dHRvbihpbnB1dCk7YmFjaygpO2NsZWFyVmFyKCdpbnB1dF9hZGQnKVxcXCIsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwi6L6T5YWl5q2j56Gu5qC85byP5YaF5a65XFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiAncHV0VmFyKFxcXCJpbnB1dF9hZGRcXFwiLCBpbnB1dCknLFxcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogXFxcInRleHRhcmVhXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGhlaWdodDogXFxcIi0xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldFZhcignaW5wdXRfYWRkJyksXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzZFQjg5N1xcXCI+5oyJ5o+P6L+w6K+J5qC85byP6L6T5YWlLCDor7fli7/loavlhaXlhbbku5bmoLzlvI88YnI+5pys5Zyw5Y+j5LukOiDmk43kvZznsbvlnovimIXlkI3np7DimIXku6PnoIE8YnI+5LqR5Y+j5LukOiDpk77mjqXimIXimIXimIXlkI3np7A7IOe6r+e9keWdgDog55u06ZO+4piFdXJsMeKYhXVybDInLFxcbiAgICAgICAgICAgICAgICBkZXNjOiAn4oCY4oCY4oCZ4oCZPGJpZz48YmlnPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMjk4QTA4XFxcIj7kv50g5a2YJyxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCdub0xvYWRpbmcnKS5sYXp5UnVsZSgoc2F2ZUJ1dHRvbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNhdmVCdXR0b24oZ2V0VmFyKCdpbnB1dF9hZGQnKSk7XFxuICAgICAgICAgICAgICAgIH0sIHNhdmVCdXR0b24pLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgfSlcXG4gICAgfSxcXG4gICAgeWRQYXJzZTogZnVuY3Rpb24oQkptb2RlLCBpKSB7XFxuICAgICAgICByZXR1cm4gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaykgPT4ge1xcbiAgICAgICAgICAgIHZhciBBID0ga1swXS5zcGxpdCgnIycpWzFdO1xcbiAgICAgICAgICAgIHZhciBCID0ga1sxXTtcXG4gICAgICAgICAgICB2YXIgc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J10pO1xcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIHJldHVybiBnZXRWYXIoXzB4NDdhOWI0WydGVWpkbSddKTtcXG59XFxudmFyIGp4SXRlbSA9IHtcXG4gICAgJ2p4TGlzdCc6IGZ1bmN0aW9uKCkge1xcbiAgICAgICAgdmFyIF8weDRjMDQyNyA9IHtcXG4gICAgICAgICAgICAnVVZXb0YnOiBmdW5jdGlvbihfMHgyNmJiMDcsIF8weDIyMWI0ZCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4MjZiYjA3ICsgXzB4MjIxYjRkO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ2NvbG9yJzpmdW5jdGlvbih0ZXh0LCBjb2xvcikge1xcbiAgICAgICAgICAgICAgICB0ZXh0ICs9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICBpZiAodGV4dC5pbmRleE9mKFxcXCLigJzigJzigJ3igJ1cXFwiKSA9PT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgdGV4dC5yZXBsYWNlKFxcXCLigJzigJzigJ3igJ1cXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0nXFxcIiArIGNvbG9yICsgXFxcIic+XFxcIiArIHRleHQgKyBcXFwiPC9mb250PlxcXCI7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAna3pXREsnOiBmdW5jdGlvbihfMHg0ODU0YTksIF8weDNlOThjNSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NDg1NGE5ICsgXzB4M2U5OGM1O1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ1hYeVFyJzogJ+enu+WKqCMnLFxcbiAgICAgICAgICAgICdndFVuaic6IGZ1bmN0aW9uKF8weDU5YWFmNywgXzB4MjJjNjZiKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg1OWFhZjcgKyBfMHgyMmM2NmI7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnVXRmV2YnOiAn4oCY4oCY4oCZ4oCZPHNtYWxsPjxzcGFuIHN0eWxlPVxcXFxcXFwiY29sb3I6I0ZFOUEyRVxcXFxcXFwiPicsXFxuICAgICAgICAgICAgJ1FPdkpWJzogJ+enu+WKqDogJyxcXG4gICAgICAgICAgICAnQUJFd0InOiAn4oCY4oCY4oCZ4oCZPHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjojMjk4QTA4XFxcXFxcXCI+JyxcXG4gICAgICAgICAgICAnb3p6V0cnOiAndGV4dF8yJyxcXG4gICAgICAgICAgICAnbldmVlInOiBmdW5jdGlvbihfMHg0ODBmM2EsIF8weDRjODRmYykge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NDgwZjNhICsgXzB4NGM4NGZjO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ0pDY05ZJzogJ3BhcnNlUm91dGUnLFxcbiAgICAgICAgICAgICdyZ0RJcCc6ICdiaWFuamknLFxcbiAgICAgICAgICAgICdob0lkSic6ICfigJjigJjigJnigJk8YmlnPjxzcGFuIHN0eWxlPVxcXFxcXFwiY29sb3I6IzZFQjg5N1xcXFxcXFwiPuaWsCDlu7og6KejIOaekCcsXFxuICAgICAgICAgICAgJ0ZyR09IJzogZnVuY3Rpb24oXzB4MTJkNmRiLCBfMHgyYTA2OGQpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDEyZDZkYiA8IF8weDJhMDY4ZDtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdvQ0NTaic6IGZ1bmN0aW9uKF8weDE5YjE3OCwgXzB4NGVmOGY2KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHgxOWIxNzggPT09IF8weDRlZjhmNjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdIWmhsYyc6IGZ1bmN0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AgICAgICAgICAgdXJsOiBiakl0ZW1bJ3hqUGFyc2UnXSgpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6ZmFsc2VcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+aQnOe0oicsXFxuICAgICAgICAgICAgZGVzYzonbWVuZ3gnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidpbnB1dCcsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRWYXIoJ2RwLnNlYXJjaEp4JyxpbnB1dClcXFwiLFxcbiAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IHRydWUsXFxuICAgICAgICAgICAgICAgIHRleHRTaXplOiAxMSxcXG4gICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOmdldFZhcignZHAuc2VhcmNoSngnLCcnKSxcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHVybDokLnRvU3RyaW5nKCgpPT57XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGV0IGZpbHRlcnMgPSBbJ+WFqOmDqCcsJ+mTvuaOpScsJ2pzb24nLCflhY3ll4UnXTtcXG4gICAgICAgIGZvcihsZXQgbyBpbiBmaWx0ZXJzKXtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpnZXRWYXIoJ2RuLmp4X2ZpbHRlcicsJ+WFqOmDqCcpPT09ZmlsdGVyc1tvXT8n4oCc4oCc4oCd4oCdPHNwYW4gc3R5bGU9XFxcImNvbG9yOiMyOThBMDhcXFwiPicrZmlsdGVyc1tvXTpmaWx0ZXJzW29dLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4uanhfZmlsdGVyJyxpdCk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSxmaWx0ZXJzW29dKSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIHZhciBfMHgyZWNiZTUgPSBfMHgzYjg5YWJbJ2xlbmd0aCddO1xcbiAgICAgICAgdmFyIGpzb249e3RpdGxlOltdLGNvZGVzOnt9fTtcXG4gICAgICAgIGxldCBzZXRGaWxlID0gcmVxdWVzdCgnaGlrZXI6Ly9maWxlcy9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nKTtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgZXZhbCgnanNvbj0nK3NldEZpbGUpO1xcbiAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgbG9nKCdKc29u6Kej5p6Q5Y+R55Sf5LqG6ZSZ6K+vOicrZS5tZXNzYWdlKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmKGdldFZhcignZG4uanhfZmlsdGVyJywn5YWo6YOoJyk9PT0n6ZO+5o6lJyl7XFxuICAgICAgICAgICAgXzB4M2I4OWFiID0gXzB4M2I4OWFiLmZpbHRlcihpdD0+KCEvwqkkLy50ZXN0KGl0KSkmJnR5cGVvZihqc29uLmNvZGVzW18weDRjMDQyN1snbldmVlInXShpdCwgJycpWydyZXBsYWNlJ10oL2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fYnV0dG9uXFxcIixcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKT0+e1xcbiAgICAgICAgICAgICAgICBjbGVhclZhcignZHAuc2VhcmNoSngnKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lph43nva4nXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pO1xcbiAgICAgICAgLy8g5LiL6Z2i5piv6Kej5p6Q5YiX6KGo5o6S5YiXXFxuICAgICAgICAvLyBmb3IgKHZhciBfMHhlMmMzZDggPSAweDA7IF8weDRjMDQyN1snRnJHT0gnXShfMHhlMmMzZDgsIF8weDJlY2JlNSk7IF8weGUyYzNkOCsrKSB7XFxuICAgICAgICBmb3IgKGxldCBfMHhlMmMzZDggaW4gXzB4M2I4OWFiKSB7XFxuICAgICAgICAgICAgdmFyIF8weDMzNzg4YyA9IF8weDNiODlhYltfMHhlMmMzZDhdO1xcbiAgICAgICAgICAgIHZhciBfMHgzNzg3MWUgPSBfMHg0YzA0MjdbJ25XZlZSJ10oXzB4MzM3ODhjLCAnJylbJ3JlcGxhY2UnXSgvaHR0cC4qXFxcXC9cXFxcLy9nLCAnJyk7XFxuICAgICAgICAgICAgaWYgKC/np7vliqgvIFsndGVzdCddKF8weDQ5ZGE5NikpIHtcXG4gICAgICAgICAgICAgICAgaWYgKF8weDRjMDQyN1snb0NDU2onXSgndUtMeEYnLCAndUtMeEYnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg0YzA0MjdbJ0haaGxjJ10oXzB4NGMwNDI3WydYWHlRciddICsgXzB4ZTJjM2Q4LCBfMHg0OWRhOTYpID8gXzB4NGMwNDI3WyduV2ZWUiddKF8weDRjMDQyN1snY2dJZUEnXShfMHg0YzA0MjdbJ1V0ZldmJ10sIF8weDRjMDQyN1snUU92SlYnXSksIF8weDM3ODcxZSkgOiBfMHg0YzA0MjdbJ2NnSWVBJ10oXzB4NGMwNDI3WydBQkV3QiddLCBfMHgzNzg3MWUpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3lkUGFyc2UnXShfMHg0OWRhOTYsIF8weGUyYzNkOCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogJ3RleHRfMidcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIF8weDJiYzYxOCA9IF8weDNiODlhYltfMHhlMmMzZDhdO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIF8weDVjZjQxNyA9IF8weDRjMDQyN1snVVZXb0YnXShfMHgyYmM2MTgsICcnKVsncmVwbGFjZSddKC9odHRwLipcXFxcL1xcXFwvL2csICcnKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmICgv56e75YqoLyBbJ3Rlc3QnXShfMHg0OWRhOTYpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NGMwNDI3WydreldESyddKF8weDRjMDQyN1snWFh5UXInXSwgXzB4ZTJjM2Q4KSA9PSBfMHg0OWRhOTYgPyBfMHg0YzA0MjdbJ2d0VW5qJ10oXzB4NGMwNDI3WydndFVuaiddKF8weDRjMDQyN1snVXRmV2YnXSwgXzB4NGMwNDI3WydRT3ZKViddKSwgXzB4NWNmNDE3KSA6IF8weDRjMDQyN1snQUJFd0InXSArIF8weDVjZjQxNyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneWRQYXJzZSddKF8weDQ5ZGE5NiwgXzB4ZTJjM2Q4KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NGMwNDI3WydvenpXRyddXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBfMHgxMTkzNjUgPSBbXzB4MmJjNjE4LCBfMHg0YzA0MjdbJ2d0VW5qJ10oXzB4ZTJjM2Q4LCAnfHwnKV1bJ2pvaW4nXSgnfHwnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg0YzA0MjdbJ25XZlZSJ10oXzB4NGMwNDI3WydBQkV3QiddLCBfMHg1Y2Y0MTcpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg0YzA0MjdbJ296eldHJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3hsU2VsZWN0J10oXzB4MTE5MzY1LCBfMHgyZWNiZTVbJ3RvU3RyaW5nJ10oKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHZhciBfMHhiNzAxOTIgPSBbXzB4MzM3ODhjLCBfMHhlMmMzZDggKyAnfHwnXVsnam9pbiddKCd8fCcpO1xcbiAgICAgICAgICAgICAgICAvLyDov6rov6rlvbHpmaJ8fDB8fCAg5ZCN56ewfHzntKLlvJUg55qE5pWw57uEXFxuICAgICAgICAgICAgICAgIC8vIEFCRXdCIOaYr+e7v+iJsiBfMHgzNzg3MWUg5piv5qCH6aKY5ZCN56ewICB4ZHJGduaYr+Wtl+espuS4sui/nuaOpeWHveaVsFxcbiAgICAgICAgICAgICAgICAvLyBsZXQgZmxhZyA9ICfigJjigJjik4rigJnigJknO1xcbiAgICAgICAgICAgICAgICBsZXQgZmxhZyA9IF8weDRjMDQyNy5jb2xvcign4pOKJywnIzAwNTFmZicpO1xcbiAgICAgICAgICAgICAgICBpZih0eXBlb2YoanNvbi5jb2Rlc1tfMHgzNzg3MWVdKT09PSdmdW5jdGlvbicpe1xcbiAgICAgICAgICAgICAgICAgICAgLy8gZmxhZyA9ICfigJzigJzikr/igJ3igJ0nO1xcbiAgICAgICAgICAgICAgICAgICAgZmxhZyA9IF8weDRjMDQyNy5jb2xvcign4pK/JywnI2ZmNzAwMCcpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZih0eXBlb2YoanNvbi5jb2Rlc1tfMHgzNzg3MWVdKT09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgICAgICAgICAgICAgIGZsYWcgPSAnJztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvLyBsZXQgY2xzID0gJzxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMjk4QTA4XFxcIj4nO1xcbiAgICAgICAgICAgICAgICAvLyBsZXQgdGl0bGUgPSBfMHg0YzA0MjdbJ3hkckZ2J10oXzB4NGMwNDI3WydBQkV3QiddLCBmbGFnK18weDM3ODcxZSk7XFxuICAgICAgICAgICAgICAgIC8vIGxldCB0aXRsZSA9IGZsYWcrY2xzK18weDM3ODcxZTtcXG4gICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gZmxhZytfMHg0YzA0MjcuY29sb3IoXzB4Mzc4NzFlLCcjMjk4QTA4Jyk7XFxuICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIC8vICd0aXRsZSc6IF8weDM3ODcxZSxcXG4gICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDRjMDQyN1snb3p6V0cnXSxcXG4gICAgICAgICAgICAgICAgICAgICd1c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gICAgICdyQWtBaCc6ICd0ZXh0XzMnLFxcbiAgICAgICAgICAgICd5V2FPSSc6ICfmgaLlpI3mj5Lku7bot6/lvoTkuLrpu5jorqQnLFxcbiAgICAgICAgICAgICd5anlqSyc6ICflvZPliY3orr7nva7kuLo6ICcsXFxuICAgICAgICAgICAgJ3RIWGVFJzogJ+aLieWPluino+aekOWIl+ihqOaIluiAheino+aekOS7o+eggScsXFxuICAgICAgICAgICAgJ0dNVVl1JzogJ+WtmOaUvui3r+W+hDogL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbicsXFxuICAgICAgICAgICAgJ21wWkJaJzogJ2xpbmVfYmxhbmsnLFxcbiAgICAgICAgICAgICd4dnFnRic6ICfovpPlhaXmnInmlYjmj5Lku7blnLDlnYAnLFxcbiAgICAgICAgICAgICdoZXVLeCc6ICdwdXRWYXIoXFxcInBsdWdpbkxpbmtcXFwiLGlucHV0KScsXFxuICAgICAgICAgICAgJ0lpZmlhJzogJ+KAmOKAmOKAmeKAmTxzdHJvbmc+PGJpZz7nmbvlvZXmj5DnpLonLFxcbiAgICAgICAgICAgICdQRlJIQSc6ICfkvb/nlKjnm7jlhbPlip/og73pnIDnmbvlvZXop4bnlYzorrrlnZvotKblj7dcXFxcbuWmguaciemXrumimOWJjeW+gOiuuuWdm+S6huino+ivpuaDhScsXFxuICAgICAgICAgICAgJ1VMd2tUJzogJ2h0dHBzOi8vaGFpa3Vvc2hpamllLmNuL3VzZXIvc2lnbmluJ1xcbiAgICAgICAgfTtcXG4gICAgICAgIGlmIChfMHg1NDFkNzZbJ3BzR2R0J10oXzB4NTQxZDc2Wyd3U2ZueiddKGJic1laKSwgXzB4NTQxZDc2WydpbXhyaSddKSkge1xcbiAgICAgICAgICAgIGlmIChfMHg1NDFkNzZbJ25Ta2p4J10oXzB4NTQxZDc2WydpVk5lTSddLCBfMHg1NDFkNzZbJ2lWTmVNJ10pKSB7XFxuICAgICAgICAgICAgICAgIF8weDU0MWQ3NlsnYVdpUnMnXShwdXRWYXIsICdiYnNZWicsIF8weDU0MWQ3Nlsnd1NmbnonXShpc0xvZ2luKXx8ZnVuY3Rpb24gKCl7cmV0dXJuIHRydWV9KTtcXG4gICAgICAgICAgICAgICAgXzB4NTQxZDc2WydhV2lScyddKHB1dFZhciwgXzB4NTQxZDc2WydxUlFkQSddLCBfMHg1NDFkNzZbJ1dRaXFrJ10pO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHZhciBfMHg0ZDI1ZmYgPSBfMHg1NDFkNzZbJ0l3TVRsJ11bJ3NwbGl0J10oJ3wnKSxcXG4gICAgICAgICAgICAgICAgICAgIF8weDRhOTdjOSA9IDB4MDtcXG4gICAgICAgICAgICAgICAgd2hpbGUgKCEhW10pIHtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoXzB4NGQyNWZmW18weDRhOTdjOSsrXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzAnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2Wyd4ZmRIayddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsncHVsbFNjcmlwdCddKF9teVNldFsnY2pjYWNoZSddLCBfbXlTZXRbJ3g1Y2FjaGUnXSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3NlsnckdMdUEnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF8weDU0MWQ3NlsnaHZpRGwnXShldmFsLCBfMHg1NDFkNzZbJ2h2aURsJ10oZ2V0VmFyLCBfMHg1NDFkNzZbJ3FSUWRBJ10pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMic6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiAnbGluZV9ibGFuaydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzMnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgXzB4MmFiMzk5ID0gJ2hpa2VyOi8vZW1wdHkjbm9IaXN0b3J5I0BydWxlPWpzOnRoaXMuZD1bXTskLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9qeEl0ZW0/cnVsZT1NeUZpZWxk4bSw4oG/XFxcIikuanhMaXN0KCk7c2V0UmVzdWx0KGQpOyc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydaeFVndCddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IHR5cGVvZiBjekd1aWRlID09ICdmdW5jdGlvbicgPyBjekd1aWRlKCkgOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhkUm91dGUgPSBfMHg1NDFkNzZbJ3NXRm9jJ10oeGRSb3V0ZSwgX215U2V0WydwYXJzZVJvdXRlJ10pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc2JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF8weDNhOWFmZSA9IFt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiAn5ouJ5Y+W5YiX6KGoJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3B1bGxDb2RlJ10oJ+WIl+ihqCcpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsnT0VoYXQnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3B1bGxDb2RlJ10oJ+S7o+eggScpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsnWnZ0U3UnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBfMHg1NDFkNzZbJ2h2aURsJ10oZmlsZUV4aXN0LCBfMHg1NDFkNzZbJ2h2aURsJ10oZ2V0VmFyLCAncGFyc2VSb3V0ZScpKSA9PSAhIVtdID8gXzB4MmFiMzk5IDogXzB4NTQxZDc2WydnWEtNYiddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1dO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc3JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgXzB4MWEyY2RiID0gMHgwOyBfMHg1NDFkNzZbJ1dDT0RDJ10oXzB4MWEyY2RiLCBfMHgzYTlhZmVbJ2xlbmd0aCddKTsgXzB4MWEyY2RiKyspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4M2E5YWZlW18weDFhMmNkYl1bJ3RpdGxlJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IF8weDNhOWFmZVtfMHgxYTJjZGJdWyd1cmwnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ3JBa0FoJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzgnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2Wyd5V2FPSSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsnaGZQbHVnaW4nXShfbXlTZXRbJ3BhcnNlUm91dGUnXSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3Nlsnc1dGb2MnXShfMHg1NDFkNzZbJ3lqeWpLJ10gKyBteVNldFsnY2onXSwgJ1xcXFxu5a2Y5pS+6Lev5b6EOiAvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ3pRU0xFJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzknOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2Wyd0SFhlRSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6ICd0b2FzdDovL+ivt+WcqOS4i+aWuemAiemhueaTjeS9nCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3NlsnR01VWXUnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMTAnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2WydtcFpCWiddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxMSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3NlsneHZxZ0YnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6ICdpbnB1dCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZXh0cmEnOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlVmlzaWJsZSc6ICFbXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVmYXVsdFZhbHVlJzogXzB4NTQxZDc2WydodmlEbCddKGdldFZhciwgJ3BsdWdpbkxpbmsnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfMHg1NDFkNzZbJ2hldUt4J11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsnSWlmaWEnXSxcXG4gICAgICAgICAgICAgICAgJ2Rlc2MnOiBfMHg1NDFkNzZbJ1BGUkhBJ10sXFxuICAgICAgICAgICAgICAgICd1cmwnOiBfMHg1NDFkNzZbJ1VMd2tUJ10sXFxuICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICB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29uZmlybSgodGl0bGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBwYXJzZVVybFRleHQgPSByZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL2ppZXhpL2ppZXhpLnR4dFxcXCIpO1xcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VVcmxBcnJheSA9IHBhcnNlVXJsVGV4dC5zcGxpdCgvXFxcXG4vKTtcXG4gICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkMSA9IHBhcnNlVXJsQXJyYXlbaW5kZXhdO1xcbiAgICAgICAgICAgICAgICBwYXJzZVVybEFycmF5LnNwbGljZShpbmRleCwgMSk7XFxuICAgICAgICAgICAgICAgIHBhcnNlVXJsVGV4dCA9IHBhcnNlVXJsQXJyYXkuam9pbihcXFwiXFxcXG5cXFwiKTtcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL2ppZXhpL2ppZXhpLnR4dFxcXCIsIHBhcnNlVXJsVGV4dCk7XFxuICAgICAgICAgICAgICAgIGlmIChzZWxlY3RlZDEgPT0gZ2V0SXRlbShcXFwic2VsZWN0ZWQwXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChwYXJzZVVybEFycmF5WzBdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwic2VsZWN0ZWRcXFwiLCBwYXJzZVVybEFycmF5WzBdLnNwbGl0KFxcXCImJlxcXCIpWzFdIHx8IFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJzZWxlY3RlZDBcXFwiLCBwYXJzZVVybEFycmF5WzBdKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwic2VsZWN0ZWRcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRl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sJ+WvvOWHuiddO1xcblxcbiAgICAgICAgZm9yKHZhciBpIGluIG9wdGlvbnMpe1xcbiAgICAgICAgICAgIGxldCBvcHRpb24gPSBvcHRpb25zW2ldO1xcbiAgICAgICAgICAgIGxldCBmbGFnID0gZ2V0VmFyKCd0aGVtZS5kbl9vcHRpb24nLCfmlrDlop4nKT09PW9wdGlvbj8n8J+RiSc6Jyc7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ZmxhZytvcHRpb24sXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQob3B0aW9uKS5sYXp5UnVsZSgoKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCd0aGVtZS5kbl9vcHRpb24nLCBpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/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+b5Y675Yid5aeL5YyW5Li76aKY5YiX6KGoXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8xJyxcXG4gICAgICAgICAgICB1cmw6J2hpa2VyOi8vcGFnZS9Sb3V0ZT9ydWxlPU15RmllbGThtLDigb8mdHlwZT3orr7nva4jbm9IaXN0b3J5IydcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpcXFwi5oGi5aSN5Ye65Y6C6K6+572uXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgdXJsOiQoXFxcIuWmguaenOS9oOeahOS4u+mimOayoeazleato+W4uOeUqOS6hu+8jOatpOaWueazleWPr+S7peaVkeeglu+8jOehruiupOaBouWkjT9cXFwiKS5jb25maXJtKCgpPT57XFxuICAgICAgICAgICAgICAgIGxldCB0aGVtZXMgPSB7bmFtZTon6buY6K6k5Li76aKYJyxjbG9zZUJ0bjp7Y29sb3I6JyNmNmY2ZjYnLGJhY2tncm91bmQ6JyNhYTk2ZGEnfSxzY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mRuX29wdGlvbicsJ+aWsOWinicpO1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChvcHRpb24pe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WvvOWHuic6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBteXRoZW1lQ29kZSA9IGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShteXRoZW1lKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBzaGFyZVBhc3RlKG15dGhlbWVDb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSAn5pat5o+S5Li76aKYQCcrbXl0aGVtZS5uYW1lKydAJyt1cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvcHkoY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Llr7zlh7rkuLrkupHlj6Pku6TlubblpI3liLbliLDliarliIfmnb8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5L+u5pS5JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoSlNPTi5zdHJpbmdpZnkobXl0aGVtZSkpLmlucHV0KChteXRoZW1lLG15VGhlbWVzLGksdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG15dGhlbWUubmFtZT09PW15VGhlbWVzLm5vd190aGVtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOS4u+mimOW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOS/ruaUuSEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXNbaV09SlNPTi5wYXJzZShpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSxKU09OLnN0cmluZ2lmeShteVRoZW1lcykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+u5pS5J1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WIoOmZpCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7orqTliKDpmaTkuLvpopg6JytteXRoZW1lLm5hbWUrJz8nKS5jb25maXJtKChteXRoZW1lLG15VGhlbWVzLGksdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG15dGhlbWUubmFtZT09PW15VGhlbWVzLm5vd190aGVtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOS4u+mimOW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOWIoOmZpCEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXMuc3BsaWNlKGksMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSxKU09OLnN0cmluZ2lmeShteVRoZW1lcykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5Yig6ZmkJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLm5vd190aGVtZT1teXRoZW1lLm5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g6YCJ5oup5LqGJytteXRoZW1lLm5hbWUrJ+S9nOS4uum7mOiupOS4u+mimCc7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sbm93VGhlbSxteVRoZW1lcyxpLHRoZW1lUm91dGUpLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICB9XFxuJC5leHBvcnRzLnRoZW1lSW5pdD10aGVtZUluaXQ7XCJ9LHtcIm5hbWVcIjpcIuaTjeS9nOaMh+W8lVwiLFwicGF0aFwiOlwiR3VpZGVcIixcInJ1bGVcIjpcIjxodG1sPlxcbjxoZWFkPlxcbiAgICA8bWV0YSBjaGFyc2V0PVxcXCJVVEYtOFxcXCI+XFxuPC9oZWFkPlxcbjxib2R5PlxcbjxzdHJvbmc+IDxiaWc+5ouJ5Y+W56+HPC9iaWc+IDwvc3Ryb25nPlxcbjxiciAvPiDmk43kvZzpobrluo/vvJpcXG48YnIgLz4gMS7mm7TmlrDpgZPplb/ku5PlupNQcm/liLA3NueJiOacrFxcbjxiciAvPiAyLuaLieWPluS4u+aPkuS7tuWSjOe9kemhteiEmuacrFxcbjxici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AgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpmbGFnK29wdGlvbixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob3B0aW9uKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5qeG1fb3B0aW9uJywgb3B0aW9uKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICAgICAgfSxvcHRpb24pLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IGp4c1JvdXRlID0gXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlKaWV4aS5qc29uXFxcIjtcXG4gICAgICAgIGxldCBNeUppZXhpID0ge2ppZXhpczpbXX07XFxuICAgICAgICBsZXQgamlleGlzID0ge307XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIE15SmlleGkgPSBKU09OLnBhcnNlKGZldGNoKGp4c1JvdXRlKSk7XFxuICAgICAgICAgICAgamlleGlzID0gTXlKaWV4aS5qaWV4aXMuZmlsdGVyKGl0PT5pdC5uYW1lPT09TXlKaWV4aS5ub3cpWzBdO1xcbiAgICAgICAgfWNhdGNoIChlKSB7fVxcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5a+85YWlJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoJycsJ+ivt+i+k+WFpeWvvOWFpeWPo+S7pCcpLmlucHV0KChNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBpZigvXumtlOaWreino+aekOmFjee9rkAuKj9AaHR0cC8udGVzdChpbnB1dCkpe1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBpbnB1dC5zcGxpdCgnQCcpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IGlucHV0LnNwbGl0KCdAJylbMl07XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu5a6a6KaB5a+85YWl5pat5o+S6Kej5p6Q6YWN572uLScrbmFtZSsnIOWQlz8nKS5jb25maXJtKChuYW1lLHVybCxNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gcGFyc2VQYXN0ZSh1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoYXNJdCA9IE15SmlleGkuamlleGlzLmZpbHRlcihpdD0+aXQubmFtZT09PW5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGhhc0l0JiZoYXNJdC5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpZCA9IG51bGw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaiBpbiBNeUppZXhpLmppZXhpcyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihNeUppZXhpLmppZXhpc1tqXS5uYW1lID09PSBuYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCA9IGo7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWlkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ntKLlvJXplJnor6/ml6Dms5Xopobnm5blr7zlhaU6XFxcXG4nK2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKCfopobnm5blr7zlhaXkuLvpophpZDonK2lkKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdID0gT2JqZWN0LmFzc2lnbihKU09OLnBhcnNlKGJhc2U2NERlY29kZShjb250ZW50KSkseyduYW1lJzpuYW1lfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzLnB1c2goT2JqZWN0LmFzc2lnbihKU09OLnBhcnNlKGJhc2U2NERlY29kZShjb250ZW50KSkseyduYW1lJzpuYW1lfSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LmiJDlip/lr7zlhaXop6PmnpDphY3nva46XFxcXG4nK25hbWVcXG4gICAgICAgICAgICAgICAgICAgIH0sbmFtZSx1cmwsTXlKaWV4aSxqeHNSb3V0ZSk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aXoOazleivhuWIq+eahOWvvOWFpeWPo+S7pDpcXFxcbicraW5wdXQ7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LE15SmlleGksanhzUm91dGUpLFxcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBsZXQgaXNBdXRvID0gTXlKaWV4aS5pc0F1dG87XFxuICAgICAgICBsZXQgYXV0b01vZGUgPSBNeUppZXhpLmF1dG9Nb2RlO1xcbiAgICAgICAgbGV0IHRpcHMgPSAn6Kej5p6Q6YWN572u5YiX6KGoOuWFseiuoTonK2NvbG9yKE15SmlleGkuamlleGlzLmxlbmd0aCwnI2ZmNzAwMCcpKyfkuKrphY3nva4s6Ieq5Yqo5qGj5byA5YWzOicrY29sb3IoaXNBdXRvPyflvIAnOiflhbMnLCcjZmY3MDAwJyk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOk15SmlleGkuamlleGlzJiZNeUppZXhpLmppZXhpcy5sZW5ndGg+MD90aXBzOlxcXCLnrKzkuIDmrKHliqDovb3vvIzngrnmraTov5vljrvliJ3lp4vljJbop6PmnpDliJfooahcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzEnLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBpZihNeUppZXhpLmppZXhpcyYmTXlKaWV4aS5qaWV4aXMubGVuZ3RoPjApe1xcbiAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5pc0F1dG8gPSAhTXlKaWV4aS5pc0F1dG87XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdGlwcyA9IE15SmlleGkuaXNBdXRvPyflvIAnOiflhbMnO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruiHquWKqOaho+aooeW8j+S4ujonK3RpcHNcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaW5pdFNldCA9IHsnbm93JzpcXFwi6YGT6Z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kZT09PSfpgJ/luqbkvJjlhYgnPyfpobrluo/kvJjlhYgnOifpgJ/luqbkvJjlhYgnO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruWkh+iDjuWuoOW5uOaWueahiOS4ujonK015SmlleGkuYXV0b01vZGVcXG4gICAgICAgICAgICB9LE15SmlleGksanhzUm91dGUpXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6Y29sb3IoXFxcIuaBouWkjeWHuuWOguiuvue9rlxcXCIsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8yJyxcXG4gICAgICAgICAgICB1cmw6JChcXFwi5aaC5p6c5L2g55qE6Kej5p6Q566h55CG5peg5rOV5q2j5bi455So5LqG77yM5q2k5pa55rOV5Y+v5Lul5pWR56CW77yM56Gu6K6k5oGi5aSNP1xcXCIpLmNvbmZpcm0oKGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgaW5pdFNldCA9IHsnbm93JzpcXFwi6YGT6ZW/5o6o6I2QXFxcIiwnamlleGlzJzpbe25hbWU6J+mBk+mVv+aOqOiNkCcscXk6WyfkvaDniLnnp5HmioAnXSx5azpbJ+mihumFtyddLHR4Olsn6I2j6ICAJ10sbWc6WyfomoLomoHlhYTlvJ8nXSxibDpbJ09L6Kej5p6QJ10sc2g6WyfmsZ/muZZEJ10seGc6WyfmsZ/muZZEJ10sYWw6WyfmsZ/muZZEJ10scHA6Wyfkurrkurrov7cnXSxtaTpbJzEwODAnXSxsZTpbJ+i/quWlpeWXheaOoiddLGZ1bjpbJ+iejeWFtCddLG9uZTpbJzEwODAnXSx9XX07XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShpbml0U2V0KSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pat5o+S6Kej5p6Q6YWN572u5bey6YeN572u5Li65Ye65Y6C6K6+572uJ1xcbiAgICAgICAgICAgIH0sanhzUm91dGUpXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGxldCBjYWNoZVZpZGVvU3dpdGNoID0gZ2V0VmFyKCdkcC5jYWNoZVZpZGVvJywndHJ1ZScpPT09J3RydWUnPyflvIAnOiflhbMnO1xcbiAgICAgICAgbGV0IGp4VGltZW91dCA9IGdldFZhcignZHAuanhUaW1lb3V0JywnNzAwMCcpO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpzbWFsbCgn5aSa57q/6Lev57yT5a2YOicpK2NvbG9yKGNhY2hlVmlkZW9Td2l0Y2gsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8yJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoY2FjaGVWaWRlb1N3aXRjaCk9PntcXG4gICAgICAgICAgICAgICAgaWYoY2FjaGVWaWRlb1N3aXRjaD09PSflvIAnKXtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignZHAuY2FjaGVWaWRlbycsJ2ZhbHNlJyk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkcC5jYWNoZVZpZGVvJywndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSxjYWNoZVZpZGVvU3dpdGNoKVxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOnNtYWxsKCflhajlsYDop6PmnpDotoXml7Y6JykrY29sb3IoanhUaW1lb3V0LCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMicsXFxuICAgICAgICAgICAgdXJsOiQoanhUaW1lb3V0LCfor7forr7nva7prZTmlq3op6PmnpDotoXml7Ys5b+F6aG75Li65pW05pWwJykuaW5wdXQoKCk9PntcXG4gICAgICAgICAgICAgICAgaWYoIXBhcnNlSW50KGlucHV0KSl7XFxuICAgICAgICAgICAgICAgICAgICBpbnB1dCA9IDcwMDA7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcHV0VmFyKCdkcC5qeFRpbWVvdXQnLGlucHV0KTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lorr7nva7kuLo6JytwYXJzZUludChpbnB1dClcXG4gICAgICAgICAgICB9LGp4VGltZW91dClcXG4gICAgICAgIH0pO1xcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+aJk+W8gOe8lui+keino+aekOaWh+S7ticsXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChqeHNSb3V0ZSkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2VkaXRGaWxlOi8vJytqeHNSb3V0ZTtcXG4gICAgICAgICAgICB9LGp4c1JvdXRlKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGZvcihsZXQgaSBpbiBNeUppZXhpLmppZXhpcyl7XFxuICAgICAgICAgICAgbGV0IG5vd0p4ID0gTXlKaWV4aS5qaWV4aXNbaV07XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6TXlKaWV4aS5ub3c9PT1ub3dKeC5uYW1lPyfwn5GJJytub3dKeC5uYW1lOm5vd0p4Lm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgICAgIG5vd0p4Om5vd0p4LFxcbiAgICAgICAgICAgICAgICAgICAgTXlKaWV4aTpNeUppZXhpLFxcbiAgICAgICAgICAgICAgICAgICAganhzUm91dGU6anhzUm91dGVcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBvcHRpb24gPSBnZXRWYXIoJ2RuLmp4bV9vcHRpb24nLCfpgInmi6knKTtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAob3B0aW9uKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICflr7zlh7onOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbm93SnhDb2RlID0gYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBzaGFyZVBhc3RlKG5vd0p4Q29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gJ+mtlOaWreino+aekOmFjee9rkAnK25vd0p4Lm5hbWUrJ0AnK3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWvvOWHuuS4uuS6keWPo+S7pOW5tuWkjeWItuWIsOWJquWIh+advydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfkv67mlLknOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpZihub3dKeC5uYW1lPT09TXlKaWV4aS5ub3cpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgcmV0dXJuICd0b2FzdDovL+atpOino+aekOmFjee9ruW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOS/ruaUuSEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL2p4RWRpdD9ydWxlPU15RmllbGThtLDigb8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvanhFZGl0P3J1bGU9TXlGaWVsZOG0sOKBvydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfliKDpmaQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu6K6k5Yig6Zmk6Kej5p6Q6YWN572uOicrbm93SngubmFtZSsnPycpLmNvbmZpcm0oKG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG5vd0p4Lm5hbWU9PT1NeUppZXhpLm5vdyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOino+aekOmFjee9ruW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOWIoOmZpCEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpcy5zcGxpY2UoaSwxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliKDpmaQnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkubm93PW5vd0p4Lm5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g6YCJ5oup5LqGJytub3dKeC5uYW1lKyfkvZzkuLrlvZPliY3op6PmnpDphY3nva4nO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgIH1cXG4kLmV4cG9ydHMuanhNYW5hZ2U9anhNYW5hZ2U7XCJ9LHtcIm5hbWVcIjpcIuino+aekOe8lui+kVwiLFwicGF0aFwiOlwianhFZGl0XCIsXCJydWxlXCI6XCJqczpcXG4gICAgbGV0IHtub3dKeCxNeUppZXhpLGp4c1JvdXRlfSA9IE1ZX1B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CBqIGluIGpkcyl7XFxuICAgIGxldCBqeHMgPSBub3dKeFtqZHNbal1dfHxbXTtcXG4gICAgbGV0IHRpdGxlID0gamRzW2pdO1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6dGl0bGVEaWNbdGl0bGVdfHx0aXRsZSxcXG4gICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCh0aXRsZXMsdGl0bGUsanhzLGp4c1JvdXRlLE15SmlleGksbm93SngpPT57XFxuICAgICAgICAgICAgdmFyIGpzb249e3RpdGxlOltdLGNvZGVzOnt9fTtcXG4gICAgICAgICAgICBsZXQgc2V0RmlsZSA9IHJlcXVlc3QoJ2hpa2VyOi8vZmlsZXMvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uJyk7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgZXZhbCgnanNvbj0nK3NldEZpbGUpO1xcbiAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBsb2coJ0pzb27op6PmnpDlj5HnlJ/kuobplJnor686JytlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZihnZXRWYXIoJ2RuLmp4bV93cml0ZU1vZGUnLCfmlrDlop4nKT09PSfmlrDlop4nKXtcXG4gICAgICAgICAgICAgICAgbGV0IHNlbF90aXRsZSA9IHRpdGxlcy5maWx0ZXIoaXQ9PiFqeHMuaW5jbHVkZXMoaXQpKTtcXG4gICAgICAgICAgICAgICAgc2VsX3RpdGxlID0gc2VsX3RpdGxlLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICBsZXQgZmxhZyA9ICfigJjigJjik4rigJnigJknO1xcbiAgICAgICAgICAgICAgICAgICAgaWYodHlwZW9mKGpzb24uY29kZXNbaXRdKT09PSdmdW5jdGlvbicpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZsYWcgPSAn4oCc4oCc4pK/4oCd4oCdJztcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHR5cGVvZihqc29uLmNvZGVzW2l0XSk9PT0ndW5kZWZpbmVkJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZyA9ICcnO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZsYWcraXRcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKHNlbF90aXRsZSwyKS5zZWxlY3QoKE15SmlleGksanhzLG5vd0p4LHRpdGxlLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgaW5wdXQgPSBpbnB1dC5yZXBsYWNlKC/igJjigJjik4rigJnigJl84oCc4oCc4pK/4oCd4oCdL2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGlkID0gbnVsbDtcXG4gICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaiBpbiBNeUppZXhpLmppZXhpcyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoTXlKaWV4aS5qaWV4aXNbal0ubmFtZSA9PT0gbm93SngubmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gajtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaWYoIWlkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v57Si5byV6ZSZ6K+v5peg5rOV5L+d5a2YOlxcXFxuJytpZFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAganhzLnB1c2goaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKGp4cyk7XFxuICAgICAgICAgICAgICAgICAgICBub3dKeFt0aXRsZV0gPSBqeHM7XFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpc1tpZF0gPSBub3dKeDtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4ubm93SngnLEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sTXlKaWV4aSxqeHMsbm93SngsdGl0bGUsanhzUm91dGUpO1xcbiAgICAgICAgICAgIH1lbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sdGl0bGVzLHRpdGxlLGp4cyxqeHNSb3V0ZSxNeUppZXhpLG5vd0p4KVxcbiAgICB9KTtcXG4gICAgZm9yKGxldCBrIGluIGp4cyl7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOmp4c1trXSxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeCxuangsaWQsayxtYXgpPT57XFxuICAgICAgICAgICAgICAgIHN3aXRjaCAoZ2V0VmFyKCdkbi5qeG1fd3JpdGVNb2RlJywn5paw5aKeJykpe1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAn5Yig6ZmkJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICBBcnJheS5wcm90b3R5cGUucmVtb3ZlID0gZnVuY3Rpb24odmFsKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IHRoaXMuaW5kZXhPZih2YWwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPiAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zcGxpY2UoaW5kZXgsIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBqeHMucmVtb3ZlKG5qeCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbm93SnhbdGl0bGVdID0ganhzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXSA9IG5vd0p4O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4ubm93SngnLEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICBjYXNlICfnp7vliqgnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKGssJ+enu+WKqOWIsOe0ouW8leWkmuWwkT8nKS5pbnB1dCgoayxtYXgsanhzLG5vd0p4LE15SmlleGksaWQsdGl0bGUsanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIE1vdmUoYXJyLCBmcm9tSW5kZXgsIHRvSW5kZXgpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBlbGVtZW50ID0gYXJyW2Zyb21JbmRleF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnIuc3BsaWNlKGZyb21JbmRleCwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnIuc3BsaWNlKHRvSW5kZXgsIDAsIGVsZW1lbnQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhcnNlSW50KGlucHV0KT09PWspe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WVpeS5n+ayoeWBmidcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYocGFyc2VJbnQoaW5wdXQpPm1heC0xfHxwYXJzZUludChpbnB1dCk8LTEpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S9oOacgOWkp+enu+WKqOiMg+WbtDAtJytwYXJzZUludChtYXgtMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbGV0IG5ld0FyID0ganhzLnNwbGljZShrLCAxKTsgLy8g5Yig5o6JXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGp4cy51bnNoaWZ0KG5ld0FyWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTW92ZShqeHMsayxwYXJzZUludChpbnB1dCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3dKeFt0aXRsZV0gPSBqeHM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXSA9IG5vd0p4O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RuLm5vd0p4JyxKU09OLnN0cmluZ2lmeShub3dKeCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sayxtYXgsanhzLG5vd0p4LE15SmlleGksaWQsdGl0bGUsanhzUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mraTlhYPntKDkuI3mlK/mjIHov5vooYw6JytnZXRWYXIoJ2RuLmp4bV93cml0ZU1vZGUnLCfmlrDlop4nKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSx0aXRsZXMsdGl0bGUsanhzLGp4c1JvdXRlLE15SmlleGksbm93SngsanhzW2tdLGlkLGssanhzLmxlbmd0aClcXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIGQucHVzaCh7XFxuICAgICAgICBjb2xfdHlwZTonbGluZSdcXG4gICAgfSlcXG59XFxuXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6J+S/neWtmCcsXFxuICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJyxcXG4gICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKE15SmlleGksaWQsanhzUm91dGUpPT57XFxuICAgICAgICBpZihnZXRWYXIoJ2RuLmp4bV9uYW1lJywnJykhPT1NeUppZXhpLmppZXhpc1tpZF0ubmFtZSl7XFxuICAgICAgICAgICAgaWZIYXMgPSBNeUppZXhpLmppZXhpcy5maWx0ZXIoaXQ9Pml0Lm5hbWU9PT1nZXRWYXIoJ2RuLmp4bV9uYW1lJywnJykpLmxlbmd0aD4wO1xcbiAgICAgICAgICAgIGlmKGlmSGFzKXtcXG4gICAgICAgICAg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GaWxlID0gSlNPTi5wYXJzZShmZXRjaChjakZyb20pKS5ydWxlO1xcbiAgICAgICAgbGV0IHg1RmlsZSA9IEpTT04ucGFyc2UoZmV0Y2goeDVGcm9tKSkucnVsZTtcXG4gICAgICAgIGxldCBvbGRDb2RlID0gZmV0Y2gob2xkT25saW5lKTtcXG4gICAgICAgIGxldCBuZXdDb2RlID0gZmV0Y2gobmV3T25saW5lKTtcXG4gICAgICAgIGlmKCEvUGFyc2VfRG5cXFxcLmpzLy50ZXN0KG9sZENvZGUpfHwhL1BhcnNlX0RuXFxcXC5qcy8udGVzdChuZXdDb2RlKSl7XFxuICAgICAgICAgICAgLy8gbG9nKCdvbGRDb2RlOicrb2xkQ29kZSk7XFxuICAgICAgICAgICAgLy8gbG9nKCduZXdDb2RlOicrbmV3Q29kZSk7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+Wksei0pSHkuI7pgZPplb/mnI3liqHlmajpgJrorq/plJnor68s5Lyw6K6h5piv572R57uc5Y2h5LqGJ1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IGp4Q29kZSA9IGZldGNoKGp4T25saW5lKTtcXG4gICAgICAgIGlmKCEvamlleGlzLy50ZXN0KGp4Q29kZSkpe1xcbiAgICAgICAgICAgIC8vIGxvZygnanhDb2RlOicranhDb2RlKTtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5aSx6LSlIeS4jumBk+mVv+acjeWKoeWZqOmAmuiur+mUmeivryzkvLDorqHmmK/nvZHnu5zljaHkuoYnXFxuICAgICAgICB9XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHdyaXRlRmlsZShjamNhY2hlLCBjakZpbGUpOyAvLyDmi4nmj5Lku7ZcXG4gICAgICAgICAgICB3cml0ZUZpbGUoeDVjYWNoZSwgeDVGaWxlKTsgLy/mi4nnvZHpobXmlofku7ZcXG4gICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSwgdGhlbWVDb2RlKT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ytjamNhY2hlKydcXFxcbuS4u+mFjee9rumAieaLqeeVjOmdouaWh+S7tjonK3g1Y2FjaGU7XFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6J+aWh+S7tuaPj+i/sDpcXFxcbicrZGVzY0luZm8sXFxuICAgIGNvbF90eXBlOidsb25nX3RleHQnLFxcbiAgICBleHRyYTp7dGV4dFNpemU6IDEzLGxpbmVWaXNpYmxlOmZhbHNlfVxcbn0pO1xcbnNldFJlc3VsdChkKTtcIn1dIiwiaWNvbiI6Imh0dHBzOi8vbGFubWVpZ3VvamlhbmcuY29tL3R1Ymlhby9tb3ZpZS80LnN2ZyJ9
Add Comment
Please, Sign In to add comment